/* Arcana kit 1 (1.7, Grimoire): the shared look and parts of every Arcana tool.
   Served at /_kit/1/arcana.css. The rules it carries are docs/DESIGN-SYSTEM.md §3.4, §3.6 and §3.7.

   How to read this file:
   - every kit class starts with "ak-"; a page opts in with class="ak" on <body>;
   - a state is a class that starts with "is-" and is only ever styled together with its part (.ak-btn.is-busy),
     so a state can never restyle another part by accident;
   - a variant is the part's name with "--" and a word (.ak-btn--primary);
   - every token is a custom property that starts with "--ak-";
   - nothing here runs forever except moving or fading a whole element (§3.7). portal/tests/test_kit.py checks this,
     the prefix rule, the contrast of the colours and the height of inputs and buttons. */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400..800&display=swap");

/* The look is Grimoire (kit 1.7, chosen by Umang on 2026-11-28; docs/DESIGN-SYSTEM.md §3.10): the look of the home
   page before the kit, on every page. Night is ink (near-black, ember orange, gold line) and day is parchment (warm
   paper, the same orange, a deeper gold). A serif for headings only; hairlines and soft glows; embers and rings
   behind the page. The fonts come with this file (the @import above), so a page needs no link of its own for them.
   Before it: Prism (kit 1.4 to 1.6, pearl and a rim of colours), and kit 1.0's cream paper with hard edges. */
:root {
  --ak-ink: #1E1A16; --ak-ink-2: #4A433B; --ak-ink-3: #6B6257;
  --ak-paper: #F7F3EC; --ak-card: #FFFDF9; --ak-wash: #F1EBE0;
  --ak-line: #E6DFD3; --ak-line-2: #D3CABB; --ak-edge: #8C8173;
  --ak-orange: #FF4802; --ak-orange-dark: #B93400; --ak-orange-ink: #2B1206; --ak-orange-wash: #FFEBDD;
  --ak-ok: #13796F; --ak-ok-dark: #0E5E56; --ak-ok-wash: #E2F5F1; --ak-ok-line: #8FD0C7;
  --ak-warn: #B33B0B; --ak-warn-wash: #FFF1E6; --ak-warn-line: #F5B98A;
  --ak-new-wash: #FFF8DF; --ak-new-line: #EBCF73; --ak-new-ink: #6B4F00;
  --ak-bad: #A3262A; --ak-bad-wash: #FDECEC; --ak-info: #1F5C99; --ak-info-wash: #E6F0FA;   /* kit 1.2: refused or broken; under way */
  --ak-lit: #FFD35C; --ak-focus: #1D5FD6;
  /* kit 1.4: what is chosen, totalled or just said (a pressed chip, a total, the toast), and the text on it.
     By day it is the ink; at night the ink is pale, so it has a colour of its own. */
  --ak-solid: #1E1A16; --ak-on-solid: #FFFDF9;
  /* a tool's own colour: set data-ak-accent on <body>; everything else is shared */
  --ak-accent: #4A65D6; --ak-accent-dark: #2F45A8; --ak-accent-wash: #E8EDFF; --ak-accent-line: #BFCBF5;
  /* kit 1.7: the gold of a line or a sign, its brighter end, the ember a thing turns when it is pointed at, the
     glow under it (strong and faint), and the light at the top of a page */
  --ak-gold: #8A611A; --ak-gold-2: #B8862E; --ak-ember: #D43B00;
  --ak-glow: rgba(255,72,2,.22); --ak-glow-soft: rgba(255,72,2,.07); --ak-halo: rgba(255,72,2,.07);
  /* the rim round what holds a page's main thing (its four stops, and the whole rim), and the ground behind a page */
  --ak-f1: #FF4802; --ak-f2: #D9A34E; --ak-f3: #F0C47A; --ak-f4: #C2571B;
  --ak-foil: conic-gradient(from 210deg, var(--ak-f1), var(--ak-f2), var(--ak-f3), var(--ak-f4), var(--ak-f1));
  --ak-art: radial-gradient(70% 42% at 50% -6%, var(--ak-halo) 0%, transparent 62%);
  --ak-r: 12px; --ak-r-lg: 14px;
  --ak-sh-1: 0 1px 2px rgba(60,40,20,.05), 0 8px 22px rgba(60,40,20,.06);
  --ak-sh-2: 0 2px 6px rgba(60,40,20,.07), 0 18px 44px rgba(60,40,20,.11);
  --ak-sh-3: 0 4px 10px rgba(60,40,20,.08), 0 30px 70px rgba(60,40,20,.18);
  --ak-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --ak-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ak-spring: cubic-bezier(.34,1.56,.64,1); --ak-out: cubic-bezier(.2,.8,.2,1);
  --ak-pad: clamp(16px, 3.4vw, 52px);
}
[data-ak-accent="lilac"] { --ak-accent: #6E5DB3; --ak-accent-dark: #46378A; --ak-accent-wash: #F1EDFB; --ak-accent-line: #CFC6EC; }
[data-ak-accent="sea"] { --ak-accent: #1F6FB5; --ak-accent-dark: #124B7C; --ak-accent-wash: #E8F2FC; --ak-accent-line: #B9D6F0; }
[data-ak-accent="rose"] { --ak-accent: #C13A64; --ak-accent-dark: #8A2347; --ak-accent-wash: #FCEBF1; --ak-accent-line: #F0BFD0; }
[data-ak-accent="teal"] { --ak-accent: #13796F; --ak-accent-dark: #0C544D; --ak-accent-wash: #E2F5F1; --ak-accent-line: #9AD3CB; }
[data-ak-accent="amber"] { --ak-accent: #A85D00; --ak-accent-dark: #7A4300; --ak-accent-wash: #FFF1D6; --ak-accent-line: #F0CF94; }
[data-ak-accent="slate"] { --ak-accent: #4A65D6; --ak-accent-dark: #2F45A8; --ak-accent-wash: #E8EDFF; --ak-accent-line: #BFCBF5; }

/* ============ night (kit 1.4; ink since kit 1.7) ============
   The kit sets data-ak-mode on <html>, and only on a page that says it has been looked at in the dark
   (data-ak-night on <body>). Every colour above has a night; a part needs no rule of its own for it. */
[data-ak-mode="night"] {
  --ak-ink: #F3EFE8; --ak-ink-2: #CFC7BA; --ak-ink-3: #A39A8D;
  --ak-paper: #100E0C; --ak-card: #1B1815; --ak-wash: #26221E;
  --ak-line: #2E2925; --ak-line-2: #3D3731; --ak-edge: #8A8074;
  --ak-orange-dark: #FF8A5C; --ak-orange-wash: #3A1D12;
  --ak-ok-dark: #7FE0D0; --ak-ok-wash: #10302C; --ak-ok-line: #1F5F56;
  --ak-warn: #FF9A6B; --ak-warn-wash: #3A1E10; --ak-warn-line: #7A3E1C;
  --ak-new-wash: #33290A; --ak-new-line: #6B5A1A; --ak-new-ink: #FFE08A;
  --ak-bad: #FF8F93; --ak-bad-wash: #3A1418; --ak-info: #8CC2FF; --ak-info-wash: #10263F;
  --ak-lit: #5A4708; --ak-focus: #F0C47A;
  --ak-solid: #3B2416; --ak-on-solid: #FFE7D6;
  --ak-gold: #E0A253; --ak-gold-2: #F0C47A; --ak-ember: #FF7A3D;
  --ak-glow: rgba(255,90,20,.42); --ak-glow-soft: rgba(255,90,20,.10); --ak-halo: rgba(255,72,2,.17);
  --ak-f2: #E0A253; --ak-f4: #B8541A;
  --ak-sh-1: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px rgba(0,0,0,.3);
  --ak-sh-2: 0 2px 6px rgba(0,0,0,.4), 0 18px 44px rgba(0,0,0,.4);
  --ak-sh-3: 0 4px 10px rgba(0,0,0,.45), 0 30px 70px rgba(0,0,0,.55);
  color-scheme: dark;
}
/* a tool's colour at night: what was a dark shade of it for text becomes a pale one, and its wash a deep one */
[data-ak-mode="night"], [data-ak-mode="night"] [data-ak-accent] {
  --ak-accent-dark: color-mix(in srgb, var(--ak-accent) 42%, #FFFFFF);
  --ak-accent-wash: color-mix(in srgb, var(--ak-accent) 24%, var(--ak-card));
  --ak-accent-line: color-mix(in srgb, var(--ak-accent) 50%, var(--ak-card));
}
/* a meter at night: its track is a groove darker than the card, with a hairline round it, so the fill stands out */
[data-ak-mode="night"] .ak-meter { background: var(--ak-paper); box-shadow: inset 0 0 0 1px var(--ak-line); }
[data-ak-mode="night"] .ak-input::placeholder, [data-ak-mode="night"] .ak-chip-input::placeholder, [data-ak-mode="night"] .ak-switcher-input::placeholder { color: var(--ak-ink-3); }
/* the change from day to night opens out from the button that was pressed (arcana.js); nothing else moves */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ============ the page that opts in ============
   These few rules for plain elements are written with :where(), so they weigh nothing:
   any kit class, and any class of the tool's own, wins over them. */
:where(.ak), :where(.ak) *, :where(.ak) *::before, :where(.ak) *::after { box-sizing: border-box; }
body.ak { margin: 0; min-height: 100vh; font-family: var(--ak-ui); font-size: 16px; line-height: 1.45; color: var(--ak-ink); background: var(--ak-art) fixed, var(--ak-paper); -webkit-font-smoothing: antialiased; }
:where(.ak) :where(h1, h2, h3, h4, p, dl, dd, figure) { margin: 0; }
:where(.ak) :where(h1, h2, h3) { font-family: var(--ak-display); font-weight: 600; letter-spacing: .005em; line-height: 1.12; }
:where(.ak) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.ak) :where(button) { cursor: pointer; }
:where(.ak) :focus-visible { outline: 3px solid var(--ak-focus); outline-offset: 2px; }
.ak [hidden] { display: none !important; }
:where(.ak) :where([id]) { scroll-margin-top: 84px; }   /* kit 1.2: a jump to a part of the page lands clear of the sticky bar */
:where(.ak) kbd { font: 600 12px/1 var(--ak-ui); border: 1px solid var(--ak-line-2); border-radius: 6px; padding: 4px 6px; color: var(--ak-ink-2); background: var(--ak-card); }

/* ============ the same with or without a reset (kit 1.3) ============
   A React or Next.js tool's Tailwind loads a reset that takes away what a browser gives plain elements: a heading's
   size and weight, the room inside a button, the colour of a placeholder. Such a tool puts that reset in a cascade
   layer (kit/react/README.md), and a rule in no layer wins over a layer whatever each weighs. So everything this file
   says holds in a Tailwind tool, and the only gaps were the things it never said because the browser did.
   They are said here and in the parts below, each marked "kit 1.3". The ones here weigh nothing, like the rules
   above: no page already on the kit changes, and every rule of a tool's own still wins.
   A plain element the kit has no part for follows the reset in such a tool: a bare <ul> has no bullets and a bare <a>
   no underline, so a mockup must not lean on those (kit/README.md). */
:where(.ak) :where(h1) { font-size: 2em; }
:where(.ak) :where(h2) { font-size: 1.5em; }
:where(.ak) :where(h3) { font-size: 1.17em; }
:where(.ak) :where(button, input, select, textarea) { letter-spacing: normal; }

.ak-eyebrow { font-family: var(--ak-ui); font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ak-gold); }
.ak-display { font: 500 clamp(38px, 4.4vw, 58px)/1.06 var(--ak-display); letter-spacing: .005em; }
.ak-display em { font-style: italic; color: var(--ak-ember); }   /* kit 1.7: one word of a greeting, in ember */
.ak-lede { color: var(--ak-ink-2); font-size: 18px; max-width: 58ch; }
.ak-num { font-variant-numeric: lining-nums tabular-nums; }
.ak-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* long text, such as a tool's guide */
.ak-prose { max-width: 70ch; font-size: 17px; line-height: 1.6; }
.ak-prose > * + * { margin-top: 14px; }
.ak-prose h2 { font-size: 26px; margin-top: 34px; }
.ak-prose h3 { font-size: 20px; margin-top: 26px; }
.ak-prose a { color: var(--ak-accent-dark); font-weight: 600; text-decoration: underline; }   /* kit 1.3: underlined by the kit, not left to the browser */

/* ============ what stands behind a page (kit 1.7): grain, embers that rise, three rings that turn ============
   arcana.js adds .ak-sky to a page once. It sits under everything a page holds, and each ember and ring is one
   element that only moves or fades, so a still page does no work for them (§3.7). */
body.ak::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ak-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ak-ember { position: absolute; bottom: -8px; width: 3px; height: 3px; border-radius: 50%; background: var(--ak-orange); box-shadow: 0 0 6px 1px var(--ak-glow); opacity: 0;
  animation: ak-ember var(--ak-d, 14s) linear var(--ak-delay, 0s) infinite; will-change: transform, opacity; }
.ak-ring { position: absolute; top: -190px; right: -200px; width: 680px; height: 680px; fill: none; stroke: var(--ak-gold); stroke-width: .7; opacity: .22; will-change: transform; }
[data-ak-mode="night"] .ak-ring { opacity: .13; }
.ak-ring--1 { animation: ak-spin 200s linear infinite; }
.ak-ring--2 { animation: ak-spin 130s linear infinite reverse; }
.ak-ring--3 { animation: ak-spin 95s linear infinite; }
@keyframes ak-ember { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: .7; } 70% { opacity: .3; } 100% { transform: translate(var(--ak-x, 0px), -108vh); opacity: 0; } }

/* ============ the bar: where you are, what you took, every other tool ============ */
.ak-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 var(--ak-pad); background: color-mix(in srgb, var(--ak-paper) 78%, transparent);
  border-bottom: 1px solid var(--ak-line); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.ak-bar-brand { display: inline-flex; align-items: center; padding: 8px 8px 8px 0; border: 0; border-radius: 10px; background: transparent; color: inherit; text-decoration: none;
  font-family: var(--ak-display); font-weight: 600; font-size: 26px; }
.ak-bar-brand svg { display: block; }
.ak-bar-brand:hover .ak-logo-rest { color: var(--ak-orange-dark); }
/* kit 1.7: the name, with Arcana's mark standing as its A. The mark's box is 30, its feet at 25.5 and its top at 4.5,
   so at 1.1em it is as tall as the capitals beside it. */
.ak-logo { display: inline-flex; align-items: center; font-family: var(--ak-display); font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.ak-logo > .ak-char { width: 1.1em; height: 1.1em; margin: 0 -.1em 0 -.04em; }
.ak-logo > .ak-char svg { width: 100%; height: 100%; }
.ak-bar-slash { color: var(--ak-ink-3); font-size: 22px; font-weight: 300; }
.ak-bar-tool { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: 16.5px; white-space: nowrap; }
.ak-bar-char { display: inline-flex; align-items: center; }
.ak-bar-say { flex: 1; min-width: 0; padding-left: 4px; color: var(--ak-ink-2); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-bar-say b { color: var(--ak-ink); }
.ak-bar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ak-bar-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 13px; border: 1.5px solid var(--ak-line-2); border-radius: 12px; background: var(--ak-card); color: inherit; text-decoration: none;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .16s var(--ak-spring), border-color .16s, box-shadow .16s; }
.ak-bar-btn:hover { border-color: var(--ak-edge); transform: translateY(-1px); box-shadow: var(--ak-sh-1); }
.ak-bar-btn:active { transform: translateY(1px); box-shadow: none; }
.ak-bar-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ak-accent); color: #fff; font-size: 12.5px; }
.ak-bar-btn.is-new { animation: ak-pop .5s var(--ak-spring); }
.ak-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ak-solid); color: var(--ak-on-solid); font-weight: 800; font-size: 13px; flex: none; transition: box-shadow .16s, transform .16s var(--ak-spring); }
/* the menu behind the initials (data-ak-email, data-ak-role, data-ak-menu, data-ak-signout): who is signed in, links, Sign out */
.ak-bar-me-wrap { position: relative; }
.ak-bar-me { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.ak-bar-me:hover > .ak-avatar { box-shadow: 0 0 0 3px var(--ak-line-2); }
.ak-bar-me:active > .ak-avatar { transform: scale(.94); }
.ak-bar-me[aria-expanded="true"] > .ak-avatar { box-shadow: 0 0 0 3px var(--ak-ink-3); }
.ak-bar-me { gap: 4px; grid-auto-flow: column; padding: 0 4px 0 0; border-radius: 999px; }
.ak-bar-me-chev { color: var(--ak-ink-2); transition: transform .16s; }
.ak-bar-me[aria-expanded="true"] > .ak-bar-me-chev { transform: rotate(180deg); }
.ak-bar-menu { position: absolute; right: 0; top: 52px; z-index: 80; width: min(300px, calc(100vw - 24px)); padding: 8px; border: 1.5px solid transparent; border-radius: 18px; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box;
  box-shadow: var(--ak-sh-3); animation: ak-drop .24s var(--ak-spring); }
.ak-bar-menu-who { display: grid; justify-items: start; gap: 2px; margin-bottom: 4px; padding: 10px 12px 12px; border-bottom: 1px solid var(--ak-line); }
.ak-bar-menu-who > b { font-size: 15.5px; }
.ak-bar-menu-email { color: var(--ak-ink-2); font-size: 14px; overflow-wrap: anywhere; }
.ak-bar-menu-who > .ak-tag { margin-top: 6px; }
.ak-bar-menu-item { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.ak-bar-menu-item:hover { background: var(--ak-wash); }
.ak-bar-menu-item:active { background: var(--ak-line); }
.ak-bar-menu-item--narrow { display: none; }
/* kit 1.4: day and night, a round button in the bar of a page that has a night */
.ak-bar-mode { position: relative; width: 44px; padding: 0; justify-content: center; border-color: transparent; border-radius: 50%; background: transparent; }
.ak-bar-mode:hover { border-color: transparent; background: var(--ak-wash); box-shadow: none; transform: none; }
.ak-bar-mode svg { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; transition: transform .5s var(--ak-spring), opacity .3s; }
.ak-bar-mode .ak-bar-mode-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-ak-mode="night"] .ak-bar-mode .ak-bar-mode-sun { opacity: 1; transform: none; }
[data-ak-mode="night"] .ak-bar-mode .ak-bar-mode-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
.ak-bar-menu-sep { display: block; height: 1px; margin: 4px 6px; background: var(--ak-line); }
.ak-stage { min-height: calc(100vh - 64px); }
.ak-wrap { max-width: 1440px; margin: 0 auto; padding: 24px var(--ak-pad) 56px; }
/* two columns on a laptop, one on a phone: the work on the left, the answer or the summary on the right */
.ak-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 28px; align-items: start; }
.ak-split-side { position: sticky; top: 84px; display: grid; gap: 18px; }
.ak-stack { display: grid; gap: 16px; }
.ak-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ak-cluster--apart { justify-content: space-between; }

/* ============ a tool's sign: the tool of its trade, drawn in one line inside a ring (kit 1.7) ============
   arcana.js writes the drawing and the ring's size (--ak-size). The class and the attribute keep the names they had
   when this was a character with a face (kit 1.0 to 1.6), so no page changes. */
.ak-char { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--ak-size, 64px); height: var(--ak-size, 64px); border-radius: 50%; line-height: 0; color: var(--ak-gold);
  border: 1px solid color-mix(in srgb, var(--ak-gold) 60%, transparent); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--ak-gold) 16%, transparent), transparent 72%);
  transition: color .2s, border-color .2s, box-shadow .3s; }
.ak-char::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--ak-gold) 38%, transparent); transition: transform .9s var(--ak-out), border-color .2s; }
.ak-char svg { position: relative; display: block; width: 50%; height: 50%; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
/* Arcana's own mark stands alone: no ring, and its own colours */
.ak-char[data-ak-char="arcana"] { border: 0; border-radius: 0; background: none; color: inherit; }
.ak-char[data-ak-char="arcana"]::before { display: none; }
.ak-char[data-ak-char="arcana"] svg { width: 100%; height: 100%; }
/* pointed at, a sign turns ember and its inner ring turns a little; while its tool works, the inner ring keeps turning */
:where(a, button):hover > .ak-char, :where(a, button):focus-visible > .ak-char, .ak-char.is-working, .ak-char.is-cheering { color: var(--ak-ember); border-color: var(--ak-ember); box-shadow: 0 0 20px -2px var(--ak-glow); }
:where(a, button):hover > .ak-char::before, :where(a, button):focus-visible > .ak-char::before { transform: rotate(70deg); border-color: color-mix(in srgb, var(--ak-ember) 55%, transparent); }
.ak-char.is-working::before { border-color: color-mix(in srgb, var(--ak-ember) 55%, transparent); animation: ak-spin 2.6s linear infinite; }
.ak-char.is-cheering { animation: ak-cheer .6s var(--ak-out) 3; }
/* one gentle bob for the sign that greets you; it moves the whole element, so it costs no repaint */
.ak-bob { display: inline-block; animation: ak-bob 3.4s ease-in-out infinite; }
@keyframes ak-bob { 50% { transform: translateY(-3px); } }
@keyframes ak-cheer { 50% { transform: scale(1.12); } }
@keyframes ak-spin { to { transform: rotate(360deg); } }
@keyframes ak-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes ak-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes ak-drop { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
@keyframes ak-fade { from { opacity: 0; } }
@keyframes ak-flash { 0% { background: var(--ak-lit); box-shadow: 0 0 0 6px rgba(255,211,92,.45); } 100% { box-shadow: 0 0 0 0 rgba(255,211,92,0); } }
@keyframes ak-word { to { opacity: 1; transform: none; } }
@keyframes ak-ping { 70%, 100% { transform: scale(2.8); opacity: 0; } }

/* ============ buttons: every one lifts, presses, shows focus, waits and can be off ============ */
.ak-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border: 1.5px solid var(--ak-edge); border-radius: 14px;
  background: var(--ak-card); color: var(--ak-ink); font-weight: 700; font-size: 15.5px; white-space: nowrap; text-decoration: none; box-shadow: var(--ak-sh-1);
  transition: transform .16s var(--ak-spring), box-shadow .16s, background .16s, border-color .16s; }
.ak-btn:hover { transform: translateY(-2px); border-color: var(--ak-ink); box-shadow: var(--ak-sh-2); }
.ak-btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.ak-btn--primary { background: var(--ak-orange); border-color: var(--ak-orange-dark); color: var(--ak-orange-ink); box-shadow: 0 6px 18px rgba(255,72,2,.30); }
.ak-btn--primary:hover { background: #FF5C1F; border-color: var(--ak-orange-dark); box-shadow: 0 12px 28px rgba(255,72,2,.42); }
.ak-btn--primary:active { box-shadow: 0 2px 6px rgba(255,72,2,.3); }
.ak-btn--accent { background: var(--ak-accent); border-color: var(--ak-accent-dark); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--ak-accent) 34%, transparent); }
.ak-btn--accent:hover { border-color: var(--ak-accent-dark); box-shadow: 0 12px 28px color-mix(in srgb, var(--ak-accent) 46%, transparent); filter: brightness(1.07); }
.ak-btn--accent:active { box-shadow: 0 2px 6px color-mix(in srgb, var(--ak-accent) 34%, transparent); }
.ak-btn--quiet { border-color: transparent; background: transparent; box-shadow: none; color: var(--ak-ink-2); }
.ak-btn--quiet:hover { background: var(--ak-wash); color: var(--ak-ink); transform: none; box-shadow: none; border-color: transparent; }
.ak-btn--quiet:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.ak-btn--small { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.ak-btn--wide { width: 100%; min-height: 56px; padding-top: 8px; padding-bottom: 8px; font-size: 17px; white-space: normal; text-align: center; }
.ak-btn:disabled, .ak-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ak-btn.is-busy { color: transparent; pointer-events: none; }
.ak-btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ak-ink); border-right-color: transparent; animation: ak-spin .7s linear infinite; }
.ak-btn--accent.is-busy::after { border-color: #fff; border-right-color: transparent; }
.ak-btn.is-done { background: var(--ak-ok-wash); border-color: var(--ak-ok); color: var(--ak-ok-dark); box-shadow: none; }
.ak-btn svg { flex: none; }
.ak-link { padding: 0; border: 0; background: transparent; color: var(--ak-accent-dark); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ak-link:hover { color: var(--ak-ink); }

/* ============ inputs: tall, with a border you can see ============ */
.ak-input { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--ak-edge); border-radius: 12px; background: var(--ak-card); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea.ak-input { padding: 12px 14px; line-height: 1.45; resize: vertical; }   /* kit 1.2: a text area's own padding */
.ak-input:hover { border-color: var(--ak-ink); }
.ak-input:focus { outline: none; border-color: var(--ak-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ak-focus) 20%, transparent); }
.ak-input:disabled { background: var(--ak-wash); color: var(--ak-ink-3); cursor: not-allowed; }
.ak-input.is-wrong { border-color: var(--ak-warn); box-shadow: 0 0 0 4px rgba(179,59,11,.14); }
textarea.ak-input { min-height: 104px; padding: 12px 14px; resize: vertical; }
select.ak-input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ak-ink) 50%), linear-gradient(135deg, var(--ak-ink) 50%, transparent 50%);
  background-position: calc(100% - 21px) 21px, calc(100% - 15px) 21px; background-size: 6px 6px; background-repeat: no-repeat; }
.ak-field { display: grid; gap: 6px; }
.ak-field-label { font-size: 13.5px; font-weight: 700; color: var(--ak-ink-2); }
.ak-field-help { font-size: 13.5px; color: var(--ak-ink-3); }
.ak-field-wrong { font-size: 13.5px; font-weight: 600; color: var(--ak-warn); }
.ak-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.ak-check input { width: 22px; height: 22px; accent-color: var(--ak-accent); }
.ak-check input[type="checkbox"] { margin: 3px 3px 3px 4px; }   /* kit 1.3: the room a browser gives each, said by the kit */
.ak-check input[type="radio"] { margin: 3px 3px 0 5px; }
.ak-seg { display: inline-flex; padding: 3px; border: 1.5px solid var(--ak-edge); border-radius: 12px; background: var(--ak-card); }
.ak-seg button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14.5px; color: var(--ak-ink-2); transition: background .18s, color .18s; }
.ak-seg button:hover { color: var(--ak-ink); background: var(--ak-wash); }
.ak-seg button[aria-pressed="true"], .ak-seg button[aria-checked="true"] { background: var(--ak-solid); color: var(--ak-on-solid); }

/* ============ the give box: the one thing you hand a tool ============ */
.ak-give { position: relative; border: 2px solid transparent; border-radius: 22px; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box; box-shadow: var(--ak-sh-2); text-align: left;
  transition: transform .22s var(--ak-spring), box-shadow .22s, border-color .22s; }
.ak-give:focus-within { transform: translateY(-2px); border-color: var(--ak-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ak-accent) 34%, transparent), 0 20px 48px color-mix(in srgb, var(--ak-accent) 28%, transparent); }
.ak-give-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 10px 0 18px; }
.ak-give-row > .ak-char { flex: none; }
.ak-give-input { flex: 1; min-width: 0; height: 68px; border: 0; outline: 0; background: transparent; font-size: 21px; font-weight: 500; }
.ak-give-input::placeholder { color: var(--ak-ink-3); font-weight: 400; }
.ak-give-input { padding: 1px 2px; }   /* kit 1.3: the room a browser gives inside a box and a button, said by the kit */
.ak-give-go, .ak-stepper button, .ak-chip-x { padding: 1px 6px; }
/* kit 1.3: the grey a browser gives a placeholder, said by the kit so that a reset cannot make it paler */
.ak-input::placeholder, .ak-chip-input::placeholder, .ak-switcher-input::placeholder { color: #757575; opacity: 1; }
.ak-give-go { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border: 1.5px solid var(--ak-orange-dark); border-radius: 15px; background: var(--ak-orange); color: var(--ak-orange-ink);
  box-shadow: 0 6px 16px rgba(255,72,2,.30); transition: transform .16s var(--ak-spring), box-shadow .16s, background .16s; }
.ak-give-go:hover { transform: translateY(-2px); background: #FF5C1F; box-shadow: 0 10px 22px rgba(255,72,2,.42); }
.ak-give-go:active { transform: translateY(1px) scale(.97); box-shadow: 0 2px 6px rgba(255,72,2,.3); }
.ak-give-go:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ak-give--small { border-radius: 18px; box-shadow: var(--ak-sh-1); }
.ak-give--small .ak-give-row { min-height: 58px; padding-left: 14px; }
.ak-give--small .ak-give-input { height: 54px; font-size: 17.5px; }
.ak-give--small .ak-give-go { width: 44px; height: 44px; border-radius: 12px; }
.ak-give-grow { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ak-out); }
.ak-give.is-open .ak-give-grow { grid-template-rows: 1fr; }
.ak-give-panel { overflow: hidden; min-height: 0; }
.ak-sugs { list-style: none; margin: 0; padding: 6px 10px 12px; border-top: 1px dashed var(--ak-line-2); display: grid; gap: 2px; }
.ak-sug { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 13px; cursor: pointer; }
.ak-sug:hover, .ak-sug.is-selected { background: var(--ak-accent-wash); }
.ak-sug b { font-weight: 700; }
.ak-sug > div span { color: var(--ak-ink-2); font-size: 14.5px; }
.ak-sug mark { background: var(--ak-lit); color: inherit; border-radius: 4px; padding: 0 2px; }
.ak-sug-key { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ak-ink-3); white-space: nowrap; }
.ak-sug--none { color: var(--ak-ink-2); cursor: default; }
.ak-sug--none:hover { background: transparent; }
/* the first screen of a tool that gives an answer: its character, one question, one box */
.ak-hero { max-width: 900px; margin: 0 auto; padding-top: clamp(4px, 4vh, 44px); text-align: center; }
.ak-hero .ak-display { margin: 8px 0 10px; }
.ak-hero .ak-lede { margin: 0 auto 26px; }

/* ============ chips: what the tool understood, and you can change ============ */
.ak-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ak-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 0 14px; border: 1.5px solid var(--ak-line-2); border-radius: 999px; background: var(--ak-card);
  font-weight: 700; font-size: 15px; white-space: nowrap; }
.ak-chip-label { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ak-ink-3); }
.ak-chip-note { color: var(--ak-ink-2); font-weight: 600; font-size: 14px; }
.ak-chip--edit { border-color: var(--ak-edge); padding-right: 6px; }
.ak-stepper { display: inline-flex; gap: 4px; }
.ak-stepper button::after, .ak-chip-x::after { content: ""; position: absolute; inset: -6px -2px; }   /* 32 px to look at, 44 px to press */
.ak-stepper button, .ak-chip-x { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--ak-line-2); border-radius: 50%; background: var(--ak-card); color: inherit; font-weight: 800; font-size: 16px; line-height: 1;
  transition: transform .14s var(--ak-spring), border-color .14s, background .14s; }
.ak-stepper button:hover, .ak-chip-x:hover { border-color: var(--ak-ink); background: var(--ak-wash); transform: scale(1.08); }
.ak-stepper button:active, .ak-chip-x:active { transform: scale(.92); }
.ak-chip-input { width: 9ch; min-height: 32px; padding: 0 2px; font-size: 16px; border: 0; border-bottom: 1.5px dashed var(--ak-edge); border-radius: 0; background: transparent; font-weight: 700; text-align: right; }
.ak-chip-input:focus { outline: none; border-bottom: 2px solid var(--ak-focus); }
.ak-chip--button { cursor: pointer; transition: transform .16s var(--ak-spring), border-color .16s, box-shadow .16s; }
.ak-chip--button:hover { transform: translateY(-2px); border-color: var(--ak-edge); box-shadow: var(--ak-sh-1); }
.ak-chip--button:active { transform: translateY(1px); box-shadow: none; }
.ak-chip.is-on { background: var(--ak-solid); border-color: var(--ak-solid); color: var(--ak-on-solid); }
.ak-chip.is-on .ak-chip-label, .ak-chip.is-on .ak-chip-note { color: color-mix(in srgb, var(--ak-on-solid) 76%, var(--ak-solid)); }
.ak-chip.is-fresh { border-color: var(--ak-accent); box-shadow: 0 0 0 4px var(--ak-accent-wash); }
.ak-chip.is-arriving { animation: ak-pop .45s var(--ak-spring); }
/* anything whose value has just changed flashes once (give any other element the class ak-live) */
.ak-chip.is-changed, .ak-line-value.is-changed, .ak-live.is-changed { animation: ak-flash 1.1s var(--ak-out); }

/* ============ cards, notes, the tally ============ */
.ak-card { border: 1.5px solid var(--ak-line-2); border-radius: var(--ak-r-lg); background: var(--ak-card); box-shadow: var(--ak-sh-1); padding: 20px 22px; }
.ak-card--strong { border: 2px solid transparent; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box; box-shadow: var(--ak-sh-2); }
.ak-card--flush { padding: 0; }
.ak-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ak-card-head h2, .ak-card-head h3 { font-size: 26px; }
/* what has changed since you were last here */
.ak-since { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; border: 1.5px solid var(--ak-new-line); border-radius: 18px; background: var(--ak-new-wash); }
/* the pulse is a second dot that grows and fades (transform and opacity only), so it never repaints the page */
.ak-since-dot { position: relative; flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--ak-orange); }
.ak-since-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ak-orange); opacity: .45; animation: ak-ping 2s ease-out infinite; }
.ak-since-title { display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ak-new-ink); }
/* what the tool has done for you so far */
.ak-tally { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1.5px solid var(--ak-line-2); border-radius: 999px; background: var(--ak-card); font-size: 14.5px; color: var(--ak-ink-2); }
.ak-tally b { color: var(--ak-ink); }
.ak-tally-medal { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; background: var(--ak-accent); color: #fff; font-weight: 800; font-size: 13px; }
.ak-tally.is-up { animation: ak-pop .5s var(--ak-spring); }
.ak-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ak-wash); color: var(--ak-ink-2); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.ak-tag--ok { background: var(--ak-ok-wash); color: var(--ak-ok-dark); }
.ak-tag--warn { background: var(--ak-warn-wash); color: var(--ak-warn); }
.ak-tag--new { background: var(--ak-orange); color: var(--ak-orange-ink); }
.ak-tag--accent { background: var(--ak-accent-wash); color: var(--ak-accent-dark); }
.ak-tag--bad { background: var(--ak-bad-wash); color: var(--ak-bad); }      /* declined, a bug, retired */
.ak-tag--info { background: var(--ak-info-wash); color: var(--ak-info); }  /* being built, being fixed, a question */
/* what a result means, said in a sentence */
.ak-note { padding: 12px 14px; border: 1.5px solid var(--ak-ok-line); border-radius: 14px; background: var(--ak-ok-wash); font-size: 15px; transition: background .3s, border-color .3s; }
.ak-note--warn { border-color: var(--ak-warn-line); background: var(--ak-warn-wash); }
.ak-note:empty { display: none; }
/* where a number came from: the page, the rule or the record behind it */
.ak-source { padding: 16px 18px; border: 1.5px dashed var(--ak-accent-line); border-radius: 18px; background: var(--ak-accent-wash); }
.ak-source h4 { margin-bottom: 8px; font: 800 12.5px/1.2 var(--ak-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ak-accent-dark); }
.ak-source p { font-size: 14.5px; }
.ak-source p + p { margin-top: 6px; }
.ak-source table { width: 100%; margin-top: 10px; border-collapse: collapse; border-radius: 10px; overflow: hidden; background: var(--ak-card); font-size: 14px; }
.ak-source th, .ak-source td { padding: 7px 10px; border-bottom: 1px solid var(--ak-line); text-align: left; }
.ak-source th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ak-ink-3); }
.ak-source td:last-child, .ak-source th:last-child { text-align: right; }
.ak-source tr.is-hit td { background: var(--ak-lit); font-weight: 800; }
.ak-source-cite { margin-top: 10px; font-size: 13px; color: var(--ak-ink-2); }

/* ============ a tool that gives an answer: the working, the result, what you take away ============ */
.ak-lines { list-style: none; margin: 0; padding: 0; }
.ak-line { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 12px; border-bottom: 1px dashed var(--ak-line); border-radius: 14px; cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s var(--ak-out), background .15s, box-shadow .15s; }
.ak-line.is-shown { opacity: 1; transform: none; }
.ak-line-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ak-wash); color: var(--ak-ink-2); font-weight: 800; font-size: 13px; transition: background .3s, color .3s; }
.ak-line.is-done .ak-line-n { background: var(--ak-ok); color: #fff; }
.ak-line-what { display: block; font-weight: 700; font-size: 15.5px; }
.ak-line-how { display: block; color: var(--ak-ink-2); font-size: 14px; }
.ak-line-value { padding: 4px 6px; border-radius: 8px; font: 600 20px/1 var(--ak-display); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.ak-line:hover, .ak-line.is-on { background: var(--ak-accent-wash); box-shadow: inset 4px 0 0 var(--ak-accent); }
.ak-line--total { margin: 6px 0; padding: 10px 12px; border-bottom: 0; background: var(--ak-solid); color: var(--ak-on-solid); }
.ak-line--total:hover, .ak-line--total.is-on { background: color-mix(in srgb, var(--ak-solid) 86%, var(--ak-on-solid)); box-shadow: inset 4px 0 0 var(--ak-orange); }
.ak-line--total .ak-line-how { color: color-mix(in srgb, var(--ak-on-solid) 76%, var(--ak-solid)); }
.ak-line--total .ak-line-value { font-size: 25px; }
.ak-line--total .ak-line-n, .ak-line--total.is-done .ak-line-n { background: var(--ak-orange); color: var(--ak-orange-ink); }
.ak-line-more { grid-column: 1 / -1; }
.ak-big { margin: 8px 0 16px; font: 600 clamp(38px, 4.2vw, 56px)/1 var(--ak-display); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.ak-sums { display: grid; gap: 7px; }
.ak-sums > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15.5px; }
.ak-sums dt { color: var(--ak-ink-2); }
.ak-sums dd { font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.ak-sums-total { margin-top: 3px; padding-top: 9px; border-top: 1.5px solid var(--ak-line); font-size: 17px; }
.ak-sums-total dt { color: var(--ak-ink); font-weight: 700; }
/* what you leave with: one main way and a few others */
.ak-take { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ak-take > .ak-btn--primary { grid-column: 1 / -1; }
.ak-arrives { animation: ak-rise .45s var(--ak-out); }
/* the sentence that reads a chart or a list to you */
.ak-headline { font: 600 clamp(22px, 2.3vw, 30px)/1.25 var(--ak-display); letter-spacing: -.01em; }
.ak-headline b { background: linear-gradient(transparent 62%, var(--ak-accent-line) 62%); font-weight: 600; }

/* ============ a tool that keeps a list: rows, their trail, the finished state ============ */
.ak-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ak-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 12px 14px 12px 16px; border: 1.5px solid var(--ak-line-2); border-radius: 18px; background: var(--ak-card);
  box-shadow: var(--ak-sh-1); transition: transform .18s var(--ak-spring), border-color .18s, box-shadow .18s; }
.ak-row:hover { transform: translateY(-2px); border-color: var(--ak-edge); box-shadow: var(--ak-sh-2); }
.ak-row.is-yours { box-shadow: inset 5px 0 0 var(--ak-accent), var(--ak-sh-1); }
.ak-row.is-open { border-color: var(--ak-ink); box-shadow: 0 0 0 3px var(--ak-line-2), var(--ak-sh-2); transform: none; }
.ak-row-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ak-ink-3); box-shadow: 0 0 0 4px var(--ak-wash); }
.ak-row-dot--go { background: var(--ak-accent); box-shadow: 0 0 0 4px var(--ak-accent-wash); }
.ak-row-dot--late { background: var(--ak-warn); box-shadow: 0 0 0 4px var(--ak-warn-wash); }
.ak-row-dot--done { background: var(--ak-ok); box-shadow: 0 0 0 4px var(--ak-ok-wash); }
.ak-row-title { display: block; font-weight: 700; font-size: 16px; }
.ak-row-meta { display: block; color: var(--ak-ink-2); font-size: 14px; }
.ak-row-when { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.ak-row-when small { display: block; color: var(--ak-ink-2); font-weight: 500; font-size: 13px; }
.ak-row-when.is-late { color: var(--ak-warn); }
.ak-row-more { grid-column: 1 / -1; padding-top: 12px; border-top: 1px dashed var(--ak-line); }
/* how far along something is, as short bars */
.ak-pips { display: inline-flex; gap: 4px; }
.ak-pips i { width: 22px; height: 6px; border-radius: 3px; background: var(--ak-line); }
.ak-pips i.is-on { background: var(--ak-accent); }
/* how far along something is, as one bar (kit 1.6): the fill's width is the share done; is-done when all of it is.
   role="progressbar" with aria-valuemin, -max, -now and aria-label on it; the words beside it are the page's own */
.ak-meter { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--ak-line); overflow: hidden; }
.ak-meter--big { height: 12px; }
.ak-meter > i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--ak-accent); transition: width .6s var(--ak-out), background-color .3s; }
.ak-meter.is-done > i { background: var(--ak-ok); }
/* everything that happened to a row, newest first */
.ak-trail { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--ak-line); display: grid; gap: 10px; }
.ak-trail li { position: relative; font-size: 14.5px; }
.ak-trail li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border: 2px solid var(--ak-edge); border-radius: 50%; background: var(--ak-card); }
.ak-trail li:first-child::before { border-color: var(--ak-accent); background: var(--ak-accent); }
.ak-trail time { display: block; color: var(--ak-ink-3); font-size: 13px; }
/* a list with nothing left for you: calm, and it says so */
.ak-clear { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; border: 1.5px dashed var(--ak-line-2); border-radius: var(--ak-r-lg); text-align: center; color: var(--ak-ink-2); }
.ak-clear h3 { color: var(--ak-ink); font-size: 26px; }
.ak-clear > h3, .ak-clear > p { max-width: 100%; overflow-wrap: anywhere; }
.ak-clear > .ak-cluster { justify-content: center; }

/* ============ a place that keeps records: its sections, a page head, counts, tables, facts, a thread, a bulk bar (kit 1.2) ============
   For a page of many records, such as the Arcana Dashboard: what the rows of a list (.ak-rows) cannot carry. */
/* the sections of one place: a row of links under the bar; the one you are on has aria-current="page" */
.ak-tabs { border-bottom: 1px solid var(--ak-line); background: color-mix(in srgb, var(--ak-card) 62%, transparent); }
.ak-tabs ol { list-style: none; display: flex; gap: 2px; max-width: 1440px; margin: 0 auto; padding: 0 var(--ak-pad); overflow-x: auto; scrollbar-width: none; }
.ak-tabs li { flex: none; }
.ak-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-bottom: 3px solid transparent; color: var(--ak-ink-2); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: color .15s, border-color .15s; }
.ak-tabs a:hover { color: var(--ak-ink); border-bottom-color: var(--ak-line-2); }
.ak-tabs a[aria-current="page"] { color: var(--ak-ink); border-bottom-color: var(--ak-orange); }
.ak-tabs-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ak-orange); color: var(--ak-orange-ink); font-size: 12.5px; font-weight: 800; }
/* a page's title, what it is for, and its main actions */
.ak-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 6px 0 22px; }
.ak-head h1 { font-size: clamp(30px, 3.4vw, 44px); }
.ak-head p { max-width: 72ch; margin-top: 6px; color: var(--ak-ink-2); }
/* a tool's character on its tool's colour (set data-ak-accent on it): a tile in a list, a row, a key; --large on a card */
.ak-face { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; border: 0;
  background: linear-gradient(155deg, color-mix(in srgb, var(--ak-accent) 9%, var(--ak-card)), color-mix(in srgb, var(--ak-accent) 26%, var(--ak-card))); }
.ak-face--small { width: 40px; height: 40px; border-radius: 11px; }
.ak-face > .ak-glyph { width: 38px; height: 38px; }
/* counts that open what they count */
.ak-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ak-stat { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1.5px solid var(--ak-line-2); border-radius: 18px; background: var(--ak-card); color: inherit; text-decoration: none; box-shadow: var(--ak-sh-1);
  transition: border-color .15s, transform .16s var(--ak-spring), box-shadow .16s; }
a.ak-stat:hover { border-color: var(--ak-edge); transform: translateY(-2px); box-shadow: var(--ak-sh-2); }
.ak-stat-n { font: 600 36px/1 var(--ak-display); font-variant-numeric: lining-nums tabular-nums; }
.ak-stat-label { color: var(--ak-ink-2); font-size: 14.5px; font-weight: 700; }
.ak-stat-more { color: var(--ak-ink-3); font-size: 13.5px; }
/* what narrows a list: fields side by side, wrapping */
.ak-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 16px; }
.ak-filters > .ak-field { flex: 1 1 170px; max-width: 260px; }
.ak-filters > .ak-field--find { flex: 0 0 300px; max-width: 300px; }   /* the box that finds: the same size, first, on every list */
/* a table of records; with --cards each row becomes a card on a phone, each cell named by its data-label */
.ak-table-wrap { position: relative; overflow-x: auto; border: 1.5px solid var(--ak-line-2); border-radius: var(--ak-r-lg); background: var(--ak-card); box-shadow: var(--ak-sh-1); }
.ak-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ak-table th { padding: 11px 14px; border-bottom: 1.5px solid var(--ak-line-2); background: var(--ak-wash); color: var(--ak-ink-2); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.ak-table td { padding: 12px 14px; border-top: 1px solid var(--ak-line); vertical-align: top; }
.ak-table tbody tr:first-child td { border-top: 0; }
.ak-table tbody tr:hover { background: var(--ak-paper); }
.ak-table th.ak-num, .ak-table td.ak-num { text-align: right; }
.ak-table-title { font-weight: 700; color: var(--ak-ink); text-decoration: underline; }   /* kit 1.3: said by the kit, not left to the browser */
.ak-table-sub { display: block; margin-top: 2px; color: var(--ak-ink-3); font-size: 13.5px; }
.ak-table tr.is-faded > td { color: var(--ak-ink-3); }
/* facts about one record: a label and its value */
.ak-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; font-size: 15px; }
.ak-facts dt { padding-top: 1px; color: var(--ak-ink-3); font-size: 13.5px; font-weight: 700; }
.ak-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
/* a conversation on a record */
.ak-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ak-thread > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.ak-thread-who { font-weight: 800; }
.ak-thread-who time { margin-left: 8px; color: var(--ak-ink-3); font-size: 13px; font-weight: 600; }
.ak-thread-body { margin-top: 3px; white-space: pre-line; overflow-wrap: anywhere; }
/* a long page's contents beside its text (a guide); the section on screen has aria-current="true" */
.ak-toc { position: sticky; top: 84px; display: grid; gap: 2px; align-content: start; }
.ak-toc > .ak-eyebrow { margin: 0 12px 6px; }
.ak-toc a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ak-ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background .15s, color .15s; }
.ak-toc a:hover { background: var(--ak-wash); color: var(--ak-ink); }
.ak-toc a[aria-current="true"] { background: var(--ak-solid); color: var(--ak-on-solid); }
/* what to do with the rows ticked: it stays in view at the foot of the screen while any are */
.ak-bulk { position: sticky; bottom: 14px; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding: 12px 16px; border: 2px solid transparent; border-radius: 18px; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box; box-shadow: var(--ak-sh-3); }
.ak-bulk-count { font-weight: 800; }

/* ============ words that write themselves, things that fly, what just happened ============ */
.ak-w { display: inline-block; opacity: 0; transform: translateY(6px); animation: ak-word .32s var(--ak-out) forwards; }
.ak-ghost { position: fixed; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1.5px solid var(--ak-ink); border-radius: 12px; background: var(--ak-card); box-shadow: var(--ak-sh-2);
  font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; pointer-events: none; }
/* the toast: what just happened, and the way back */
.ak-toast { position: fixed; left: 12px; right: 12px; bottom: 26px; z-index: 150; display: flex; align-items: center; gap: 14px; width: fit-content; max-width: calc(100vw - 24px); margin: 0 auto; padding: 10px 12px 10px 18px;
  border-radius: 16px; background: var(--ak-solid); color: var(--ak-on-solid); box-shadow: var(--ak-sh-3); font-weight: 600; font-size: 15px; opacity: 0; transform: translateY(30px); transition: transform .35s var(--ak-spring), opacity .25s; }
.ak-toast.is-shown { opacity: 1; transform: none; }
.ak-toast .ak-btn { box-shadow: none; }
.ak-toast-ok { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #3CCBA2; color: #06281F; font-size: 14px; font-weight: 900; }
/* the tray: what you are leaving with */
.ak-tray { position: absolute; right: var(--ak-pad); top: 60px; z-index: 70; width: min(400px, calc(100vw - 24px)); padding: 14px; border: 1.5px solid transparent; border-radius: 18px; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box;
  box-shadow: var(--ak-sh-3); transform-origin: 80% 0; animation: ak-drop .28s var(--ak-spring); }
.ak-tray h3 { margin: 2px 4px 8px; font-size: 17px; }
.ak-tray ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.ak-tray-item { padding: 10px 12px; border: 1px solid var(--ak-line); border-radius: 12px; background: var(--ak-paper); }
.ak-tray-item b { display: block; font-size: 14.5px; }
.ak-tray-item > span { display: block; margin-top: 3px; color: var(--ak-ink-2); font-size: 13.5px; white-space: pre-line; }
/* every other tool: yours first, then a search */
.ak-switcher-back { position: fixed; inset: 0; z-index: 180; display: grid; place-items: start center; padding: 9vh 12px 12px; background: rgba(14,12,26,.44); backdrop-filter: blur(4px); animation: ak-fade .2s; }
.ak-switcher { display: flex; flex-direction: column; width: min(680px, 100%); max-height: 78vh; overflow: hidden; border: 2px solid transparent; border-radius: 22px; background: linear-gradient(var(--ak-card), var(--ak-card)) padding-box, var(--ak-foil) border-box; box-shadow: var(--ak-sh-3);
  animation: ak-drop .28s var(--ak-spring); }
.ak-switcher-input { min-height: 62px; padding: 0 20px; background: transparent; color: inherit; border: 0; border-bottom: 1.5px solid var(--ak-edge); outline: 0; font-size: 19px; }
.ak-switcher-input:focus { border-bottom-color: var(--ak-focus); box-shadow: inset 0 -2px 0 var(--ak-focus); }
.ak-switcher-list { overflow: auto; padding: 8px 10px 12px; }
.ak-switcher-group { padding: 12px 10px 6px; font: 800 12px/1 var(--ak-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ak-ink-3); }
.ak-switcher-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; text-decoration: none; }
.ak-switcher-item:hover, .ak-switcher-item.is-selected { background: var(--ak-wash); }
.ak-switcher-item > div { flex: 1; min-width: 0; }
.ak-switcher-item b { font-size: 15.5px; }
.ak-switcher-item > div > span { display: block; color: var(--ak-ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-switcher-item em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ak-ink-3); white-space: nowrap; }
.ak-glyph { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ak-accent); color: #fff; font-weight: 800; font-size: 14px; }
.ak-glyph--large { width: 60px; height: 60px; border-radius: 17px; font-size: 21px; }
/* a tool in a list of tools (the portal's way in): its character or initials, name, what it does, tags */
.ak-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(296px, 100%), 1fr)); gap: 10px; }
/* a light follows the pointer across the one card pointed at (arcana.js sets --ak-fx and --ak-fy, each 0 to 1, at most
   once a frame). Kit 1.4 to 1.6 tipped the card and turned a rim of colours; since kit 1.7 it is a light and an edge. */
.ak-tool { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 72px; padding: 13px 16px; border: 1px solid var(--ak-line); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none;
  background: color-mix(in srgb, var(--ak-card) 88%, transparent);
  transition: transform .18s var(--ak-out), border-color .18s, box-shadow .3s; }
.ak-tool::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(240px circle at calc(var(--ak-fx, .5) * 100%) calc(var(--ak-fy, .5) * 100%), var(--ak-glow-soft), transparent 70%); }
.ak-tool:hover, .ak-tool:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ak-orange) 62%, var(--ak-line-2)); box-shadow: 0 14px 34px -16px var(--ak-glow); z-index: 1; }
.ak-tool:hover::before { opacity: 1; }
.ak-tool:active { transform: translateY(0) scale(.99); }
.ak-tool > .ak-char, .ak-tool > .ak-glyph { flex: none; }
.ak-tool-text { position: relative; display: grid; gap: 2px; min-width: 0; flex: 1; }
.ak-tool-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.ak-tool-desc { color: var(--ak-ink-2); font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ak-tool-why { color: var(--ak-ink-2); font-size: 13px; }
.ak-tool mark { padding: 0 2px; border-radius: 4px; background: var(--ak-lit); color: inherit; }
.ak-tool-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ak-tool-tags > .ak-tag { max-width: 100%; white-space: normal; }
.ak-tool--yours { box-shadow: inset 3px 0 0 var(--ak-orange); }
.ak-tool--yours:hover { box-shadow: inset 3px 0 0 var(--ak-orange), 0 14px 34px -16px var(--ak-glow); }
.ak-tool--yours.is-selected { box-shadow: inset 3px 0 0 var(--ak-orange), 0 0 0 3px var(--ak-line-2), var(--ak-sh-2); }
.ak-tool--hidden { border: 1px dashed var(--ak-line-2); background: color-mix(in srgb, var(--ak-card) 55%, transparent); box-shadow: none; }
.ak-tool.is-selected { border-color: var(--ak-ink); box-shadow: 0 0 0 3px var(--ak-line-2), var(--ak-sh-2); }
.ak-tool.is-found { border-color: var(--ak-accent); box-shadow: 0 0 0 3px var(--ak-accent); }

/* ============ the look: Grimoire (kit 1.7) ============
   What the tokens alone do not say: a part's line is a hairline, its corners are straighter, a number of a working
   is a gold ring, what is chosen is an ember outline, and a thing glows where Prism lifted it on a shadow.
   Each rule restates one property of a part written above; nothing here adds a part. */
body.ak { font-variant-numeric: lining-nums; }   /* the serif's own figures hang below the line; a number in a heading must not */
.ak-btn { border-radius: 10px; border-width: 1px; font-weight: 600; }
.ak-btn--small { border-radius: 9px; }
.ak-btn--primary { box-shadow: 0 6px 20px -6px var(--ak-glow); }
.ak-btn--primary:hover { box-shadow: 0 10px 30px -6px var(--ak-glow); }
.ak-chip { border-width: 1px; font-weight: 500; }
.ak-chip.is-on { background: color-mix(in srgb, var(--ak-orange) 11%, var(--ak-card)); border-color: var(--ak-orange); color: var(--ak-ink); }
.ak-chip.is-on .ak-chip-label, .ak-chip.is-on .ak-chip-note { color: var(--ak-ink-2); }
.ak-card, .ak-card--strong, .ak-table-wrap, .ak-source { border-width: 1px; }
.ak-card-head h2, .ak-card-head h3 { font-size: 27px; }
.ak-give { border-width: 1px; border-radius: 14px; }
.ak-give--small { border-radius: 12px; }
.ak-give:focus-within { box-shadow: 0 0 0 4px var(--ak-glow-soft), 0 14px 40px -14px var(--ak-glow); }
.ak-table th { font-weight: 600; letter-spacing: .12em; font-size: 11.5px; }
.ak-source { border-radius: 12px; }
.ak-tag { border-radius: 6px; font-weight: 600; }
.ak-big { letter-spacing: 0; font-variant-numeric: lining-nums tabular-nums; }
.ak-line-value { font-family: var(--ak-ui); font-size: 17px; }
.ak-line--total .ak-line-value { font-size: 20px; }
.ak-line-n, .ak-line.is-done .ak-line-n { font-family: var(--ak-display); font-size: 16px; font-weight: 700; font-variant-numeric: lining-nums; background: transparent; border: 1px solid color-mix(in srgb, var(--ak-gold) 55%, transparent); color: var(--ak-gold); }
.ak-glyph { border-radius: 50%; background: transparent; border: 1px solid color-mix(in srgb, var(--ak-gold) 60%, transparent); color: var(--ak-gold); font-weight: 600; }
.ak-glyph--large { border-radius: 50%; }
.ak-face { background: none; border-radius: 50%; }   /* a sign stands in its own ring; the square of the tool's colour behind a character is gone */
.ak-face--small { border-radius: 50%; }

/* ============ pictures: no motion, everything in its last state (the page's address ends in #still) ============ */
.ak-still *, .ak-still *::before, .ak-still *::after { animation: none !important; transition: none !important; }
.ak-still .ak-w { opacity: 1; transform: none; }
.ak-still .ak-line { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ak *, .ak *::before, .ak *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ak-w { opacity: 1; transform: none; }
}

/* ============ narrow screens ============ */
@media (max-width: 899px) {
  .ak-bar { min-height: 56px; gap: 8px; }
  .ak-bar-brand .ak-logo-rest, .ak-bar-slash, .ak-bar-btn kbd, .ak-bar-btn-text, .ak-bar-link { display: none; }
  .ak-bar-brand { font-size: 32px; padding-left: 4px; }
  .ak-bar-menu-item--narrow { display: flex; }
  .ak-link { padding-block: 13px; margin-block: -13px; }
  .ak-tool-desc { display: block; -webkit-line-clamp: unset; overflow: visible; }   /* 44 px to press on a phone, the same line to read */
  .ak-bar { flex-wrap: wrap; }
  .ak-bar-say { order: 9; flex: 0 0 100%; padding: 0 0 8px; white-space: normal; }
  .ak-bar-say:empty { display: none; }
  .ak-bar-tool { min-width: 0; flex: 0 1 auto; overflow-x: clip; font-size: 15.5px; }   /* a long name gives way; the bar never pushes the page wide */
  .ak-bar-tool .ak-char { width: 30px; height: 30px; }
  .ak-bar-right { flex: none; }
  .ak-avatar { width: 36px; height: 36px; }
  .ak-stage { min-height: calc(100vh - 56px); }
  .ak-wrap { padding: 18px var(--ak-pad) 96px; }
  .ak-split { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ak-split-side { position: static; }
  .ak-lede { font-size: 16px; }
  .ak-give-row { min-height: 62px; padding-left: 12px; gap: 8px; }
  .ak-give-input { height: 58px; font-size: 17px; }
  .ak-give-go { width: 46px; height: 46px; }
  .ak-line { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 8px; }
  .ak-line-value { font-size: 17px; }
  .ak-line--total .ak-line-value { font-size: 20px; }
  .ak-row { grid-template-columns: 20px minmax(0, 1fr); row-gap: 10px; }
  .ak-row > :nth-child(n+3) { grid-column: 2; justify-self: start; }
  .ak-row > .ak-btn { justify-self: stretch; }
  .ak-row > .ak-row-more { grid-column: 1 / -1; justify-self: stretch; }
  .ak-take { grid-template-columns: 1fr; }
  .ak-toast { bottom: 14px; font-size: 14px; }
  .ak-head { align-items: flex-start; }
  .ak-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ak-stat { padding: 12px 14px; }
  .ak-stat-n { font-size: 28px; }
  .ak-filters > .ak-field, .ak-filters > .ak-field--find { flex: 1 1 100%; max-width: none; }
  .ak-table--cards thead { display: none; }
  .ak-table--cards tr { display: block; padding: 12px 14px; border-top: 1px solid var(--ak-line); }
  .ak-table--cards tbody tr:first-child { border-top: 0; }
  .ak-table--cards td { display: flex; gap: 10px; padding: 3px 0; border: 0; text-align: left; }
  .ak-table--cards td:not([data-label]) { display: block; padding-bottom: 6px; }   /* the row's title, and what sits under it */
  .ak-table--cards td.ak-num { text-align: left; }
  .ak-table--cards td[data-label]::before { content: attr(data-label); flex: 0 0 40%; color: var(--ak-ink-3); font-size: 13px; font-weight: 700; }
  .ak-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ak-toc { top: 56px; z-index: 30; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; background: var(--ak-paper); }
  .ak-toc > .ak-eyebrow { display: none; }
  .ak-toc a { flex: none; border: 1.5px solid var(--ak-line-2); background: var(--ak-card); white-space: nowrap; }
  .ak-facts dd { margin-bottom: 8px; }
}
