/* Love Tarot TAR-03. Instrument Sheet chassis, accent #5A4B8C (violet). The slab is the table. */
:root{
  --paper:#EDE9E2;
  --ink:#1E1D1B;
  --panel:#DEDACF;
  --line:#B7B0A2;
  --chassis:#2A2924;
  --accent:#5A4B8C;
  --deep:#43386C;              /* the card back: the accent, one shade into the shadow of the table */
  --on-accent:#EDE9E2;         /* paper on violet is 6.1:1 */
  --card:#EDE9E2;              /* the card faces keep their colour in both schemes */
  --card-ink:#1E1D1B;
  --card-panel:#DEDACF;
  --card-line:#B7B0A2;
  --hair:rgba(237,233,226,.3);
  --font-ui:"Familjen Grotesk",system-ui,sans-serif;
  --font-spec:"Martian Mono",ui-monospace,monospace;
  --ease:cubic-bezier(.2,.8,.2,1);
  --turn:.35s;
}
@media (prefers-color-scheme:dark){
  :root{--paper:#1E1D1B;--ink:#EDE9E2;--panel:#2A2924;--line:#4A473F;--chassis:#111}
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-ui);font-size:1rem;line-height:1.55;overflow-x:hidden}
a{color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button{font:inherit;color:inherit}
h1,h2,h3,p,dl,dd,ol,ul,figure,pre,fieldset,blockquote{margin:0}
ol,ul{padding:0;list-style:none}
fieldset{padding:0;border:0;min-width:0}
[hidden]{display:none!important}
code{font-family:var(--font-spec);font-size:.8em}
img{max-width:100%}

/* label strip */
.strip{max-width:1120px;margin:0 auto;padding:18px 32px 0;display:flex;justify-content:space-between;align-items:baseline;font-family:var(--font-spec);font-size:.75rem;font-weight:500;letter-spacing:.02em;border-bottom:1px solid var(--line)}
.strip-maker{text-decoration:none;padding-bottom:12px}
.strip-maker:hover{text-decoration:underline;text-underline-offset:3px}
.strip-code{padding-bottom:12px}

/* page */
.wrap{max-width:1120px;margin:0 auto;padding:40px 32px 0}
.title{font-size:4.75rem;font-weight:600;line-height:1;letter-spacing:-.01em;margin-bottom:16px}
.lede{font-size:1.125rem;max-width:62ch;margin-bottom:28px}
.lede strong{font-weight:600}
.subhead{font-size:1.375rem;font-weight:500;line-height:1.25}
.section-head{font-size:2rem;font-weight:600;line-height:1.1;margin:40px 0 14px}

/* the table: the one accent shape */
.hero{position:relative;background:var(--accent);color:var(--on-accent);padding:28px 40px 32px}
.hero::before,.hero::after,.hero>.ticks::before,.hero>.ticks::after{content:"";position:absolute;width:14px;height:14px;border:0 solid var(--on-accent);pointer-events:none;z-index:2}
.hero::before{top:0;left:0;border-top-width:1px;border-left-width:1px}
.hero::after{top:0;right:0;border-top-width:1px;border-right-width:1px}
.hero>.ticks::before{bottom:0;left:0;border-bottom-width:1px;border-left-width:1px}
.hero>.ticks::after{bottom:0;right:0;border-bottom-width:1px;border-right-width:1px}

/* the readout on the table */
.readout{margin-bottom:24px}
.big{font-size:clamp(3rem,7vw,6rem);font-weight:600;line-height:.95;letter-spacing:-.03em;overflow-wrap:anywhere;min-height:1em}
.big.is-tick{animation:tick .22s var(--ease) both}
@keyframes tick{0%{transform:translateY(.22em);opacity:.4}100%{transform:none;opacity:1}}
.verdict{font-size:1.375rem;font-weight:500;line-height:1.3;max-width:58ch;margin-top:10px;min-height:1.3em}

/* the table top: the deck on the left, the felt on the right */
.table{display:grid;grid-template-columns:150px minmax(0,1fr);gap:0 40px;align-items:start}
.deck{position:relative;width:150px;aspect-ratio:3/5}
.deck-card{position:absolute;inset:0;background:var(--deep);border:1px solid var(--on-accent)}
.deck-card:nth-child(1){transform:translate(9px,9px)}
.deck-card:nth-child(2){transform:translate(6px,6px)}
.deck-card:nth-child(3){transform:translate(3px,3px)}
.deck-top{transform:none}
.deck-cap{margin-top:20px;font-size:1rem;font-weight:500;line-height:1.3}
.deck.is-empty .deck-card:not(.deck-top){visibility:hidden}

.felt{position:relative;min-width:0}
.slots{display:grid;gap:22px 20px;justify-content:start;align-content:start}
.slots[data-spread=love]{grid-template-columns:repeat(5,150px)}
.slots[data-spread=three]{grid-template-columns:repeat(3,170px)}
.slots[data-spread=yesno],.slots[data-spread=daily]{grid-template-columns:260px}
.slot{position:relative;min-width:0}
.slot-mark{position:absolute;left:0;right:0;top:0;aspect-ratio:3/5;border:1px dashed var(--hair);pointer-events:none}
.slot.is-filled .slot-mark{display:none}
.cap{margin-top:10px;font-size:1.0625rem;font-weight:600;line-height:1.2}
.cap-sub{display:block;font-size:.9375rem;font-weight:500;line-height:1.25;opacity:.8;margin-top:2px}
.empty{max-width:36ch;font-size:1.25rem;font-weight:500;line-height:1.35;padding-top:4px}
.empty-pair{display:block;width:44px;height:16px;margin-bottom:14px;background:radial-gradient(circle,var(--on-accent) 5px,transparent 5.6px) 0 0/22px 16px repeat-x;opacity:.7}

/* the card back: the family motif, a pair of dots repeating on the deep violet */
.card{position:relative;display:block;width:100%;aspect-ratio:3/5;padding:0;border:0;background:transparent;border-radius:0;cursor:pointer;perspective:1100px;transform:rotate(var(--tilt,0deg))}
.card:focus-visible{outline:2px solid var(--on-accent);outline-offset:5px}
.card-in{position:relative;display:block;width:100%;height:100%;transform-style:preserve-3d;transition:transform var(--turn) var(--ease)}
.card.is-turned .card-in{transform:rotateY(180deg)}
.face{position:absolute;inset:0;display:block;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden}
.face-back{background:var(--deep);border:1px solid var(--on-accent)}
.face-back::before{content:"";position:absolute;inset:7px;border:1px solid var(--hair);
  background-image:radial-gradient(circle,var(--on-accent) 1.3px,transparent 1.9px),radial-gradient(circle,var(--on-accent) 1.3px,transparent 1.9px);
  background-size:18px 18px,18px 18px;background-position:6px 6px,11px 6px;opacity:.85}
.card:not(.is-turned):hover .face-back::before{opacity:1}
.face-front{transform:rotateY(180deg);background:var(--card);border:1px solid var(--card)}
.plate{position:relative;display:block;width:100%;height:100%;background:var(--card);border:1px solid var(--card-line)}
.plate::before,.plate::after,.plate .ticks::before,.plate .ticks::after{content:"";position:absolute;width:14px;height:14px;border:0 solid var(--accent);pointer-events:none;z-index:2}
.plate::before{top:-1px;left:-1px;border-top-width:1px;border-left-width:1px}
.plate::after{top:-1px;right:-1px;border-top-width:1px;border-right-width:1px}
.plate .ticks::before{bottom:-1px;left:-1px;border-bottom-width:1px;border-left-width:1px}
.plate .ticks::after{bottom:-1px;right:-1px;border-bottom-width:1px;border-right-width:1px}
.card .plate{border-color:var(--on-accent)}
.card .plate::before,.card .plate::after,.card .plate .ticks::before,.card .plate .ticks::after{border-color:var(--on-accent)}
.plate img{display:block;width:100%;height:100%;object-fit:cover}
.plate.is-rev img{transform:rotate(180deg)}
.plate .noplate{display:none}
.plate.is-noplate{background:var(--accent);border-color:var(--accent)}
.plate.is-noplate img{display:none}
.plate.is-noplate .noplate{display:flex;align-items:flex-end;height:100%;padding:12px;color:var(--on-accent);font-weight:600;font-size:1.25rem;line-height:1.1;letter-spacing:-.01em}
.plate.is-noplate.is-rev .noplate{transform:rotate(180deg)}
.card.is-dealing{pointer-events:none}

/* the controls row on the table */
.bench{border-top:1px solid var(--hair);margin-top:28px;padding-top:20px;display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px 24px}
.set{min-width:0}
.set-label{display:block;font-size:1.0625rem;font-weight:600;margin-bottom:6px;line-height:1.2}
.set-opt{font-weight:500;opacity:.8}
.seg{display:inline-flex;border:1px solid var(--card)}
.seg-btn{padding:10px 14px;border:0;background:transparent;color:var(--on-accent);font-weight:600;font-size:1.0625rem;line-height:1.2;cursor:pointer;border-radius:0;white-space:nowrap}
.seg-btn+.seg-btn{border-left:1px solid var(--card)}
.seg-btn[aria-checked=true]{background:var(--card);color:var(--card-ink)}
.seg-btn:focus-visible{outline-color:var(--on-accent);outline-offset:-3px}
.field-in{display:block;width:100%;font:inherit;font-size:1rem;line-height:1.4;color:var(--card-ink);background:var(--card);border:1px solid var(--card);border-radius:0;padding:10px 12px;color-scheme:light;min-height:44px}
.field-in::placeholder{color:var(--card-ink);opacity:.55}
.field-in:focus-visible{outline:2px solid var(--on-accent);outline-offset:3px}
.set-q{flex:1 1 280px}
.checks{display:flex;flex-wrap:wrap;gap:6px 18px;flex:1 1 100%}
.check{display:flex;align-items:center;gap:8px;font-size:1.0625rem;font-weight:600}
.check input{width:18px;height:18px;margin:0;accent-color:var(--card-ink)}
.check input:focus-visible{outline:2px solid var(--on-accent);outline-offset:2px}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;flex:1 1 100%}

.btn{position:relative;display:inline-block;padding:12px 18px;border:1px solid var(--ink);background:var(--paper);color:var(--ink);font-weight:500;line-height:1.2;cursor:pointer;border-radius:0;text-decoration:none;text-align:center}
.btn:disabled{opacity:.45;cursor:default}
.btn-primary{background:var(--card-ink);border-color:var(--card-ink);color:var(--card);padding-left:22px;padding-right:22px;font-size:1.0625rem;font-weight:600}
.btn-primary .ticks{position:absolute;inset:0;pointer-events:none}
.btn-primary::before,.btn-primary::after,.btn-primary .ticks::before,.btn-primary .ticks::after{content:"";position:absolute;width:14px;height:14px;border:0 solid var(--on-accent);opacity:0;pointer-events:none}
.btn-primary::before{top:-6px;left:-6px;border-top-width:1px;border-left-width:1px}
.btn-primary::after{top:-6px;right:-6px;border-top-width:1px;border-right-width:1px}
.btn-primary .ticks::before{bottom:-6px;left:-6px;border-bottom-width:1px;border-left-width:1px}
.btn-primary .ticks::after{bottom:-6px;right:-6px;border-bottom-width:1px;border-right-width:1px}
.btn-primary:hover::before,.btn-primary:hover::after,.btn-primary:hover .ticks::before,.btn-primary:hover .ticks::after,
.btn-primary:focus-visible::before,.btn-primary:focus-visible::after,.btn-primary:focus-visible .ticks::before,.btn-primary:focus-visible .ticks::after{opacity:1}
.btn-primary:focus-visible{outline-color:var(--on-accent);outline-offset:4px}
.btn-paper{background:var(--card);border-color:var(--card);color:var(--card-ink)}
.btn-paper:hover:not(:disabled){background:var(--card-panel)}
.btn-paper:focus-visible{outline-color:var(--on-accent)}
.btn-paper.is-done{background:var(--card-ink);border-color:var(--card-ink);color:var(--card)}
.btn-ask{margin-top:auto;padding-top:12px;padding-bottom:12px}
.preset p{margin-bottom:14px}
.btn-ask:hover{background:var(--panel)}

/* reading line */
.reading{font-family:var(--font-spec);font-size:.75rem;font-weight:500;letter-spacing:.02em;white-space:pre;margin:12px 0 0}

/* the readings: one ruled entry per turned card */
.readings{margin-top:32px}
.sent{font-size:1.375rem;font-weight:600;line-height:1.3;max-width:60ch;margin-bottom:12px;color:var(--accent)}
.asked{font-size:1.375rem;font-weight:500;line-height:1.3;max-width:60ch;margin-bottom:18px;overflow-wrap:anywhere}
.asked span{font-weight:600}
.entry{display:grid;grid-template-columns:150px minmax(0,1fr);gap:0 32px;padding:26px 0;border-top:1px solid var(--line);align-items:start}
.entry:last-child{border-bottom:1px solid var(--line)}
.entry.is-new{animation:show .35s var(--ease) both}
@keyframes show{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:none}}
.entry .plate{aspect-ratio:3/5;width:150px}
.entry-pos{font-size:1rem;font-weight:500;margin-bottom:6px}
.entry-name{font-size:2rem;font-weight:600;line-height:1.1;letter-spacing:-.01em}
.entry-meta{font-size:1rem;font-weight:500;margin-top:6px;opacity:.85}
.entry-lean{font-size:1.375rem;font-weight:600;line-height:1.3;margin-top:12px;color:var(--accent)}
.entry-lean span{font-weight:500;color:var(--ink)}
.entry-text{max-width:64ch;margin-top:14px;font-size:1.0625rem}
.entry-general{max-width:64ch;margin-top:10px;font-size:1rem;opacity:.85}

/* the presets */
.presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;margin-top:8px}
.preset{min-width:0;padding-bottom:28px;display:flex;flex-direction:column;align-items:flex-start}
.preset p{max-width:52ch;margin-top:0}
.preset .section-head{margin-top:36px}

/* under: notes on the left, a panel on the right */
.under{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px 32px;margin-top:16px;align-items:start}
.left{grid-column:span 7;min-width:0}
.controls{grid-column:span 5;min-width:0}
.tabnotes{margin-bottom:24px}
.tabnotes p{max-width:64ch;margin-top:8px}
.panel{position:relative;border:1px solid var(--line);background:var(--panel);padding:24px 28px 28px;display:grid;gap:24px}
.field-set{min-width:0}
.field-set legend{font-size:1rem;font-weight:500;margin-bottom:8px;padding:0}
.field-note{font-size:.9375rem;margin-top:6px;opacity:.9}
.keys div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line);font-size:.9375rem}
.keys div:last-child{border-bottom:0}
.keys dd{white-space:nowrap}

/* the seventy-eight */
.suits{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0 24px;margin-top:8px}
.suit{min-width:0}
.suit h3{font-size:1.375rem;font-weight:500;line-height:1.25;padding-bottom:10px;border-bottom:1px solid var(--ink)}
.suit li{padding:8px 0;border-bottom:1px solid var(--line)}
.suit .c-name{font-weight:600;font-size:1.0625rem;line-height:1.2;display:block}
.suit .c-key{font-size:.9375rem;opacity:.85;display:block;font-weight:400}

/* notes */
.notes{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}
.notes>*{grid-column:span 8}
.notes p{max-width:68ch;margin-bottom:14px}

.foot{max-width:1120px;margin:0 auto;padding:20px 32px 40px;font-size:.875rem;opacity:.8}
.foot p{max-width:70ch}

/* narrow screens */
@media (max-width:960px){
  .table{grid-template-columns:120px minmax(0,1fr);gap:0 24px}
  .deck{width:120px}
  .slots[data-spread=love]{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px 12px}
  .slots[data-spread=three]{grid-template-columns:repeat(3,minmax(0,150px))}
  .notes>*{grid-column:span 12}
  .under{grid-template-columns:1fr}
  .left,.controls{grid-column:span 1}
  .controls{order:2}
  .suits{grid-template-columns:repeat(2,minmax(0,1fr))}
  .presets{grid-template-columns:1fr}
}
@media (max-width:640px){
  .strip{padding:14px 16px 0}
  .wrap{padding:28px 16px 0}
  .title{font-size:2.75rem}
  .lede{font-size:1rem}
  .hero{padding:18px 16px 22px}
  .verdict{font-size:1.125rem}
  .table{grid-template-columns:1fr;gap:18px 0}
  .deckside{display:flex;align-items:flex-end;gap:14px}
  .deck{width:72px}
  .deck-cap{margin:0 0 4px}
  .slots{gap:14px 12px}
  .slots[data-spread=love]{grid-template-columns:repeat(3,minmax(0,1fr))}
  .slots[data-spread=three]{grid-template-columns:repeat(3,minmax(0,1fr))}
  .slots[data-spread=yesno],.slots[data-spread=daily]{grid-template-columns:minmax(0,190px)}
  .cap{font-size:.9375rem}
  .cap-sub{font-size:.8125rem}
  .empty{font-size:1.0625rem}
  .bench{margin-top:20px;padding-top:16px;gap:12px 14px}
  .seg{display:flex;flex-wrap:wrap}
  .seg-btn{padding:10px 10px;font-size:.9375rem;flex:1 1 auto}
  .actions .btn{flex:1 1 45%}
  .entry{grid-template-columns:110px minmax(0,1fr);gap:0 16px;padding:22px 0}
  .entry .plate{width:110px}
  .entry-name{font-size:1.5rem}
  .entry-lean{font-size:1.125rem}
  .asked,.sent{font-size:1.125rem}
  .panel{padding:20px 16px 22px;gap:20px}
  .section-head{font-size:1.625rem}
  .suits{grid-template-columns:1fr}
  .foot{padding:16px 16px 32px}
}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
