/* Astute card kit: the frame every card shares (see docs/cards/STILE.md).
   A card is <article class="card" style="--c:<subject colour>;--k:<ink>;--edge:<darker colour>">.
   Sizes are in container units (cqh/cqw) so the card is the same on every phone. */
:root{--ground:#000;--paper:#f2f1ec;--muted:#6f6e76;--line:#26262b;
--display:"Fraunces",Georgia,serif;--body:"Figtree",system-ui,sans-serif;--mono:"JetBrains Mono",ui-monospace,monospace;--hand:"Caveat","Comic Sans MS",cursive;color-scheme:dark}
html,body{height:100%}body{margin:0;background:var(--ground);color:var(--paper);font-family:var(--body);overflow:hidden}
.app{height:100%;display:flex;flex-direction:column;align-items:center;padding-inline:16px;padding-block:10px;box-sizing:border-box;gap:8px}
.top{width:100%;max-width:440px;display:flex;flex-direction:column;gap:10px}
.top h1{margin:0;font:800 26px/1 var(--display)}
.dots{display:flex;gap:5px}.dots span{flex:1;height:3px;border-radius:2px;background:var(--line);transition:.3s}.dots span.on{background:var(--paper)}
.kind{font:600 11px/1 var(--body);letter-spacing:.14em;color:var(--muted);text-transform:uppercase}
.stage{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;position:relative}
.nav{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:#000c;color:var(--paper);font-size:16px;cursor:pointer}
#prev{left:-6px}#next{right:-6px}
button:focus-visible,input:focus-visible,.card:focus-visible{outline:2px solid #fff;outline-offset:2px}
.card{container-type:size;height:min(100%, calc((100vw - 32px) * 16 / 9.3));aspect-ratio:9/16;max-width:100%;border-radius:6cqw;display:none;position:relative;background:var(--c);color:var(--k);box-shadow:0 1.1cqh 0 var(--edge);overflow:hidden}
.card.on{display:block}
.in{position:absolute;inset:0;padding:5cqh 7.5cqw 4.4cqh;display:flex;flex-direction:column;gap:2.1cqh}
.label{display:flex;align-items:center;gap:2.6cqw;font:600 1.6cqh/1 var(--body);letter-spacing:.16em;text-transform:uppercase}
.label svg{width:2.5cqh;height:2.5cqh;flex:none}.label .t{opacity:.8}
.tag{margin-left:auto;font:800 1.3cqh/1 var(--body);letter-spacing:.12em;padding:.8cqh 2.4cqw;border-radius:99px;background:var(--k);color:var(--c)}
.mono{font:700 1.25cqh/1.2 var(--mono);letter-spacing:.06em;opacity:.65;text-transform:uppercase}
.q{font:800 3.4cqh/1.13 var(--display);margin:0;text-wrap:balance;letter-spacing:-.012em}.q em{font-style:italic;font-weight:700}
.big{font:900 6cqh/1.04 var(--display);letter-spacing:-.02em;margin:0;text-wrap:balance}
.body{font:500 2.6cqh/1.48 var(--body);margin:0;text-wrap:pretty}
.say{font:600 2.1cqh/1.42 var(--body);margin:0;text-wrap:pretty}.say b{font-weight:800}
.stagebox{flex:1;min-height:0;position:relative}
.keep{margin-top:auto;background:color-mix(in srgb,var(--k) 9%,transparent);border-radius:2.8cqh;padding:2cqh 5.5cqw;font:600 2.05cqh/1.38 var(--body)}
.keep b{display:block;font:700 1.35cqh/1 var(--body);letter-spacing:.16em;opacity:.7;margin-bottom:1cqh}
.foot{display:flex;align-items:center;gap:4cqw}.src{font:500 1.42cqh/1.3 var(--body);opacity:.65;flex:1;min-width:0}
/* The source belongs to the answer, never to the question: hidden while the line to keep is, and on the
   front of a card that turns over; it comes with the answer, in the room it always had. */
.keep.gone~.foot .src,.turn:not(.over) .face.front .foot .src{visibility:hidden}
.btn{font:800 2cqh/1 var(--body);border:0;border-radius:99px;padding:1.8cqh 6cqw;cursor:pointer;background:var(--k);color:var(--c)}
.btn.ghost{background:transparent;color:var(--k);box-shadow:inset 0 0 0 .28cqh var(--k)}
.row{display:flex;gap:3cqw;flex-wrap:wrap}
.float{background:#fff;color:#111;border-radius:2cqh;box-shadow:0 1.4cqh 3cqh rgba(0,0,0,.18),0 .3cqh .8cqh rgba(0,0,0,.1)}
.gone{display:none!important}.num{font-variant-numeric:tabular-nums}
input[type=range]{width:100%;accent-color:var(--k);margin:0}
canvas.full,svg.full{position:absolute;inset:0;width:100%;height:100%;user-select:none;-webkit-user-select:none}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* How sure (Kit.sure): every card that asks ends the same way, the reader's answer, how sure they are, then the
   why. The five levels are the app's own (kConfidenceLevels), and the app keeps the answer and how sure. */
.sure{display:flex;flex-direction:column;gap:1cqh;transition:opacity .2s ease}
.sure .sq{font:700 1.85cqh/1.2 var(--body)}
.sure .row{display:flex;gap:1.6cqw}
.sure .sb{flex:1;font:800 1.9cqh/1 var(--body);color:var(--k);background:color-mix(in srgb,var(--k) 9%,transparent);border:0;box-shadow:inset 0 0 0 .22cqh color-mix(in srgb,var(--k) 34%,transparent);border-radius:99px;padding:1.55cqh 0;cursor:pointer;transition:transform .14s cubic-bezier(.23,1,.32,1),background-color .16s ease}
.sure .sb:active{transform:scale(.96)}
.sure .sb.on{background:var(--k);color:var(--c);box-shadow:none}
.sure.off{opacity:.38;pointer-events:none}
.sure.skip{display:none}
/* What the card did for the reader (Kit.react): three words, the reader's own, under what it taught. */
.react{display:flex;flex-wrap:wrap;gap:1.4cqw}
.react .rb{font:700 1.7cqh/1.1 var(--body);color:var(--k);background:color-mix(in srgb,var(--k) 9%,transparent);border:0;box-shadow:inset 0 0 0 .22cqh color-mix(in srgb,var(--k) 34%,transparent);border-radius:99px;padding:1.2cqh 3.2cqw;cursor:pointer;transition:transform .14s cubic-bezier(.23,1,.32,1),background-color .16s ease}
.react .rb:active{transform:scale(.96)}
.react .rb.on{background:var(--k);color:var(--c);box-shadow:none}
.grade{display:flex;align-items:center;gap:2.4cqw;font:700 1.95cqh/1.25 var(--body)}
.grade i{font-style:normal;flex:none;width:3.3cqh;height:3.3cqh;border-radius:50%;display:grid;place-items:center;background:var(--k);color:var(--c)}
.grade.no i{background:transparent;color:var(--k);box-shadow:inset 0 0 0 .25cqh var(--k)}

/* One card that fills its window (Kit.single): a free card in the app, or the checker standing in for it.
   The app draws the frame (the radius, the edge, the shadow, the save and share in the corner), so the
   page is only the card's face, edge to edge, on the card's own colour. */
.kit-single,.kit-single body{height:100%;margin:0;background:var(--ground);overflow:hidden}
.kit-single .card{display:block;width:100vw;height:100vh;max-width:none;aspect-ratio:auto;border-radius:0;box-shadow:none}
/* In the app the head and the foot are set as a native card sets them (lib/widgets/pill_card.dart), so a free
   card and a native one put their subject in the same place at the same size; and nothing a reader must read
   falls under the size the app's own small print is set at, on the smallest phone it runs on. */
.kit-app .in{padding:26px 28px 26px}
.kit-app .label{font-size:11px;letter-spacing:1.4px;gap:8px}
.kit-app .label svg{width:16px;height:16px}
.kit-app .label .t{opacity:.72}
.kit-app .tag{font-size:10px;letter-spacing:.1em;padding:5px 9px}
.kit-app .q{font-size:max(3.4cqh,18px)}
.kit-app .big{font-size:max(6cqh,30px)}
.kit-app .body{font-size:max(2.6cqh,14.5px)}
.kit-app .say{font-size:max(2.1cqh,13px)}
.kit-app .keep{font-size:max(2.05cqh,13px);padding:max(2cqh,11px) max(5.5cqw,16px);border-radius:max(2.8cqh,14px)}
.kit-app .keep b{font-size:max(1.35cqh,9.5px);margin-bottom:max(1cqh,6px)}
.kit-app .src{font-size:max(1.42cqh,10px)}
.kit-app .mono{font-size:max(1.25cqh,9.5px)}
.kit-app .btn{font-size:max(2cqh,14px);padding:max(1.8cqh,12px) max(6cqw,20px)}
.kit-app .sure .sq{font-size:max(1.85cqh,13px)}
.kit-app .sure .sb{font-size:max(1.9cqh,13.5px);padding:max(1.55cqh,12px) 0}
.kit-app .grade{font-size:max(1.95cqh,13.5px)}
/* In the app the source is a door to Go deeper: dotted, as on a native card. */
.kit-app .foot .src{text-decoration:underline dotted;text-decoration-color:color-mix(in srgb,currentColor 45%,transparent);text-underline-offset:.25em;cursor:pointer}
.kit-app .react .rb{font-size:max(1.7cqh,12.5px);padding:max(1.2cqh,10px) max(3.2cqw,12px)}
.kit-app .grade i{width:max(3.3cqh,22px);height:max(3.3cqh,22px)}
/* The corner the native save and share sit in: the foot keeps it, so the source wraps before it. */
.kit-app .foot{min-height:var(--kit-corner-h,0px);padding-right:var(--kit-corner-w,0px);align-items:flex-end}
/* What a native card says under its head, and the chip beside its subject, when the app has one to say. */
.kit-note{margin:-1cqh 0 0;font:500 12.5px/1.25 var(--body);opacity:.66}
.kit-note.kit-why{cursor:pointer;-webkit-tap-highlight-color:transparent}.kit-note.kit-why::after{content:"\00a0\203A";font-weight:700}
.kit-chip{font:600 9.5px/1 var(--body);letter-spacing:1px;padding:3px 8px;border-radius:99px;background:color-mix(in srgb,var(--k) 9%,transparent);opacity:.7}
/* The head stays one line: the subject's name, the app's chip, the page's tag. A tag that finds no room
   gives way (Kit hides it), never wraps inside its pill. */
.label .t,.label .tag,.kit-chip{white-space:nowrap;flex:none}
.kit-app body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.kit-app[data-platform=web],.kit-app[data-platform=web] body{touch-action:none}
.kit-calm *{transition:none!important;animation:none!important}
.kit-held *{animation-play-state:paused!important}
