/* Anker components (docs/ui.md, D-17). Token variables only: colours live in tokens.css. */

/* Fonts: self-hosted, latin subset, OFL 1.1 (LICENSES/third-party.md). Never fetched. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-wrap: break-word;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.ak-prose a, .ak-link { color: var(--accent-text); }
.ak-link-quiet { color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--paper);
}
.ak-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ak-skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 10;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  background: var(--ink); color: var(--on-ink);
}
.ak-skip:focus { top: var(--space-4); }

/* Type */
.ak-display-xl, .ak-display {
  font-family: var(--font-display); font-weight: 400; letter-spacing: var(--text-display-tracking);
}
.ak-display-xl { font-size: var(--text-display-xl-size); line-height: var(--text-display-xl-line); }
.ak-display { font-size: var(--text-display-size); line-height: var(--text-display-line); }
.ak-h1 { font-size: var(--text-h1-size); line-height: var(--text-h1-line); font-weight: var(--text-h1-weight); letter-spacing: var(--text-h1-tracking); }
.ak-h2 { font-size: var(--text-h2-size); line-height: var(--text-h2-line); font-weight: var(--text-h2-weight); letter-spacing: var(--text-h2-tracking); }
.ak-h3 { font-size: var(--text-h3-size); line-height: var(--text-h3-line); font-weight: var(--text-h3-weight); }
.ak-body-sm { font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); }
.ak-overline {
  font-size: var(--text-overline-size); line-height: var(--text-overline-line);
  font-weight: var(--text-overline-weight); letter-spacing: var(--text-overline-tracking);
  text-transform: uppercase; color: var(--ink-2);
}
.ak-overline .ak-mono { text-transform: none; letter-spacing: 0; }
.ak-mono { font-family: var(--font-mono); font-size: var(--text-mono-size); line-height: var(--text-mono-line); font-weight: var(--text-mono-weight); }
.ak-lead { color: var(--ink-2); }
.ak-muted { color: var(--ink-muted); }
.ak-ink-2 { color: var(--ink-2); }
.ak-stack > * + * { margin-top: var(--space-4); }
.ak-stack-sm > * + * { margin-top: var(--space-2); }
.ak-stack-lg > * + * { margin-top: var(--space-6); }
.ak-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

/* Icons (Lucide, ISC): 20px, stroke 1.5 */
.ak-icon { width: 20px; height: 20px; flex: none; stroke-width: 1.5; }

/* Button */
.ak-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-4);
  border: 1px solid transparent; border-radius: var(--radius-md);
  font: inherit; font-size: 14px; font-weight: var(--text-label-weight); line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.ak-button .ak-icon { width: 18px; height: 18px; }
.ak-button--primary { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-sm); }
.ak-button--primary:hover { background: var(--ink-2); }
.ak-button--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.ak-button--secondary:hover { background: var(--surface-sunken); }
.ak-button--accent { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.ak-button--accent:hover { filter: brightness(0.95); }
.ak-button--quiet { background: transparent; color: var(--ink-2); padding: 0 var(--space-3); }
.ak-button--quiet:hover { color: var(--ink); background: var(--surface-sunken); }
.ak-button--block { width: 100%; }
.ak-button--sm { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-label-size); }

/* Input */
.ak-field { display: grid; gap: var(--space-2); }
.ak-label { font-size: 14px; line-height: var(--text-label-line); font-weight: var(--text-label-weight); }
.ak-input {
  width: 100%; min-height: 40px; padding: 0 var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--text-body-size);
}
.ak-textarea { padding: var(--space-3); min-height: 200px; resize: vertical; line-height: 1.5; }
.ak-input::placeholder { color: var(--ink-muted); }
.ak-input[aria-invalid="true"] { border-color: var(--accent-text); border-width: 2px; }
.ak-hint { font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); color: var(--ink-muted); }
.ak-error {
  display: flex; gap: var(--space-2); align-items: flex-start;
  font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); color: var(--accent-text);
}
.ak-error .ak-icon { width: 16px; height: 16px; margin-top: 2px; }

/* Badge */
.ak-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2); border-radius: var(--radius-sm);
  font-size: var(--text-label-size); line-height: var(--text-label-line); font-weight: var(--text-label-weight);
  border: 1px solid var(--line-strong); color: var(--ink-2); background: transparent;
}
.ak-badge--ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.ak-badge--accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* Card */
.ak-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); }
.ak-card--flush { padding: 0; }
.ak-well { background: var(--surface-sunken); border-radius: var(--radius-md); padding: var(--space-4); }

/* Doodle: one scene per screen, alt-free (aria-hidden), token colours */
.ak-doodle { display: block; color: var(--ink); flex: none; }
.ak-doodle svg { width: 100%; height: auto; }
.ak-doodle--scene { width: 240px; }
.ak-doodle--scene-lg { width: 320px; }
.ak-doodle--spot { width: 120px; }
.ak-doodle--spot-sm { width: 96px; }

/* Empty state */
.ak-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-4); padding: var(--space-7) var(--space-5);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
}
.ak-empty--bare { border: 0; background: transparent; }
.ak-empty__body { max-width: 380px; color: var(--ink-2); }
.ak-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-4); margin-top: var(--space-1); }
.ak-empty__title em { font-style: italic; }

/* Table */
.ak-table { width: 100%; border-collapse: collapse; }
.ak-table th {
  text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--line);
  font-size: var(--text-overline-size); line-height: var(--text-overline-line); font-weight: var(--text-overline-weight);
  letter-spacing: var(--text-overline-tracking); text-transform: uppercase; color: var(--ink-2);
}
.ak-table td { padding: var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.ak-card .ak-table tr:last-child td { border-bottom: 0; }
.ak-card .ak-table th, .ak-card .ak-table td { padding-inline: var(--space-5); }

/* Definition list (data rows) */
.ak-rows { display: grid; }
.ak-rows > div { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.ak-rows > div:first-child { border-top: 0; padding-top: 0; }
.ak-rows > div:last-child { padding-bottom: 0; }
.ak-rows dt { font-weight: var(--text-label-weight); }
.ak-rows dd { color: var(--ink-2); font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); }

/* Page shell: public top bar */
.ak-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  height: 80px; padding: 0 var(--space-7); border-bottom: 1px solid var(--line);
}
.ak-logo {
  font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.ak-topbar__end { display: flex; align-items: center; gap: var(--space-5); font-size: 14px; }
.ak-topbar__end a { text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; gap: var(--space-2); }
.ak-topbar__end a:hover { color: var(--ink); }
.ak-public { padding: var(--space-8); }
.ak-narrow { max-width: 440px; margin: 0 auto; }
.ak-medium { max-width: 640px; margin: 0 auto; }
.ak-wide { max-width: 720px; margin: 0 auto; }
.ak-wide--left { margin: 0; }

/* Page shell: signed in (240px sidebar; below 760px a top bar with icon-only nav) */
.ak-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.ak-sidebar {
  display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-6) var(--space-4) var(--space-5);
  background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
}
.ak-sidebar .ak-logo { padding: 0 var(--space-2); }
.ak-nav { display: grid; gap: var(--space-1); }
.ak-nav a, .ak-nav button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-md);
  font: inherit; font-size: 15px; color: var(--ink-2); text-decoration: none;
  background: transparent; border: 0; cursor: pointer; text-align: left;
}
.ak-nav a:hover, .ak-nav button:hover { background: var(--surface-sunken); color: var(--ink); }
.ak-nav a[aria-current="page"] { background: var(--surface-sunken); color: var(--ink); font-weight: 600; }
.ak-sidebar__foot { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.ak-sidebar__foot .ak-button--quiet { padding: 0 var(--space-2); }
/* D-46: Settings and Help live in the foot on desktop and in the bar on phones. */
.ak-nav a.ak-nav__more { display: none; }
.ak-sidebar__link { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; color: var(--ink-2); text-decoration: none; }
.ak-sidebar__link:hover, .ak-sidebar__link[aria-current="page"] { color: var(--ink); }
.ak-meter { display: grid; gap: var(--space-2); }
.ak-meter__row { display: flex; justify-content: space-between; align-items: baseline; }
.ak-meter__bar {
  appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px;
  border: 0; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; color: var(--ink);
}
.ak-meter__bar::-webkit-progress-bar { background: var(--line); }
.ak-meter__bar::-webkit-progress-value { background: var(--ink); }
.ak-meter__bar::-moz-progress-bar { background: var(--ink); }
.ak-chip-user { display: flex; align-items: center; gap: var(--space-3); }
.ak-chip-user__av {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--radius-pill);
  background: var(--surface-sunken); border: 1px solid var(--line); font-size: 12px; font-weight: 600;
}

/* Sub-nav tabs (Settings, Profile) */
.ak-tabs {
  display: flex; align-items: center; gap: var(--space-1); overflow-x: auto;
  margin-bottom: var(--space-6); border-bottom: 1px solid var(--line);
}
.ak-tabs a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-3);
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ak-tabs a:hover { color: var(--ink); }
.ak-tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.ak-tabs__end { margin-left: auto; display: none; }
.ak-main { padding: var(--space-7); max-width: calc(1120px + 2 * var(--space-7)); width: 100%; }
.ak-page-head { margin-bottom: var(--space-6); }
.ak-page-head .ak-overline + .ak-h1 { margin-top: var(--space-2); }
.ak-page-head .ak-lead { margin-top: var(--space-2); }

/* Welcome */
.ak-hero { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 1fr); gap: var(--space-7); align-items: center; max-width: 1120px; }
.ak-hero__art { display: flex; justify-content: center; }
.ak-hero .ak-lead, .ak-hero .ak-steps { max-width: 560px; }
.ak-steps { list-style: none; padding: 0; }
.ak-steps li { display: grid; grid-template-columns: 32px 1fr; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.ak-steps li:first-child { border-top: 0; padding-top: 0; }
.ak-steps__n {
  width: 20px; height: 20px; margin-top: 2px; border: 1px solid var(--ink-2); border-radius: var(--radius-pill);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; line-height: 1;
}
.ak-steps p { color: var(--ink-2); font-size: 14px; line-height: 20px; }

/* Two columns: guide contents + sections */
.ak-split { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.ak-split--end { grid-template-columns: minmax(0, 1fr) 350px; }

/* Track board (track-light.png): six columns; phones scroll sideways inside the board */
.ak-board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.ak-board__col { display: grid; align-content: start; gap: var(--space-3); min-height: 360px; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.ak-board__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.ak-board__head .ak-mono { color: var(--ink-muted); }
.ak-board__card { display: grid; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.ak-board__foot { margin-top: var(--space-3); font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); color: var(--ink-muted); }
.ak-toc { list-style: none; padding: 0; }
.ak-list-plain { list-style: none; padding: 0; }
.ak-toc li { padding: var(--space-2) 0; border-top: 1px solid var(--line); font-size: 14px; }
.ak-toc li:first-child { border-top: 0; padding-top: 0; }
.ak-toc li:last-child { padding-bottom: 0; }
.ak-guide { overflow-wrap: anywhere; }
.ak-guide section + section { margin-top: var(--space-7); }
.ak-guide ul { padding-left: var(--space-5); }
.ak-guide li + li { margin-top: var(--space-1); }
.ak-guide p, .ak-guide li { color: var(--ink-2); }
.ak-guide .ak-table th, .ak-guide .ak-table td { overflow-wrap: normal; min-width: 10ch; }
.ak-guide .ak-table code { overflow-wrap: anywhere; }

/* Media card: doodle beside text */
.ak-media { display: flex; gap: var(--space-5); align-items: center; }
.ak-media--head { align-items: flex-start; }
.ak-grow { flex: 1; min-width: 0; }
.ak-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: var(--ink); }

/* Data patterns (W0.2) */
.ak-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.ak-grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5); align-items: start; }
.ak-grade {
  display: inline-flex; align-items: center; padding: 0 var(--space-1); min-height: 20px;
  border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 11px; line-height: 1;
  border: 1px solid var(--line-strong); color: var(--ink-2);
}
.ak-grade--solid { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ak-grade--word { border-style: dashed; }
.ak-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ak-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.ak-chip:hover { background: var(--surface-sunken); }
.ak-chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ak-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-4); }
.ak-stat__value { margin-top: var(--space-1); }
.ak-stat__value > .ak-mono:first-child { font-size: 28px; line-height: 36px; }
.ak-score { display: grid; justify-items: end; align-content: start; text-align: right; flex: none; }
.ak-score__n { font-size: 20px; line-height: 28px; }
.ak-check { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-2); font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); margin-right: var(--space-3); }
.ak-check .ak-icon { width: 16px; height: 16px; }
.ak-job { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.ak-job:first-of-type { border-top: 0; padding-top: 0; }
.ak-job__initial {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-sunken); font-weight: 600;
}
.ak-job__body { flex: 1; min-width: 0; display: grid; gap: var(--space-1); }
.ak-job__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.ak-job__title .ak-badge { vertical-align: 2px; margin-left: var(--space-1); }
.ak-claim { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-body-sm-size); color: var(--ink); }
.ak-claim .ak-icon { width: 16px; height: 16px; }
.ak-claim--held { color: var(--accent-text); }
.ak-fact { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.ak-fact__main { flex: 1 1 20rem; min-width: 0; display: grid; gap: var(--space-2); }
.ak-fact__quote { margin: 0; padding: var(--space-2) var(--space-3); font-size: var(--text-body-sm-size); color: var(--ink-2); }
.ak-fact__src { font-size: 12px; overflow-wrap: anywhere; }
.ak-fact__side { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); justify-content: flex-end; flex: 0 1 auto; max-width: 45%; }
.ak-cover { padding: var(--space-3); border: 1px solid var(--ink-2); border-radius: var(--radius-md); }
.ak-cover--claimed { border-style: dashed; border-color: var(--line-strong); }
.ak-cover--missing { border-style: dotted; border-color: var(--line-strong); }
.ak-why { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); color: var(--ink-muted); }
.ak-why .ak-icon { width: 16px; height: 16px; margin-top: 2px; }
.ak-file { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--line); list-style: none; }
.ak-file:first-child { border-top: 0; }
.ak-file__name { font-weight: 500; overflow-wrap: anywhere; }
.ak-file__end { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-body-sm-size); color: var(--ink-2); flex: none; }
.ak-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3);
  padding: var(--space-6) var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
}

/* Flow patterns (W0.3) */
.ak-ring { display: inline-flex; align-items: center; gap: var(--space-3); }
.ak-ring__svg { width: 64px; height: 64px; }
.ak-ring__track { fill: none; stroke: var(--line); stroke-width: 4; }
.ak-ring__fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.ak-ring__n { fill: var(--ink); font-family: var(--font-mono); font-size: 16px; }
.ak-pipe { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; padding: 0; }
.ak-pipe__step { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); font-size: 14px; }
.ak-pipe__step--done { color: var(--ink-2); }
.ak-pipe__step--now { color: var(--ink); font-weight: 600; }
.ak-pipe__dot {
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 11px;
}
.ak-pipe__dot .ak-icon { width: 14px; height: 14px; }
.ak-pipe__step--now .ak-pipe__dot { border-color: var(--ink); border-width: 2px; }
.ak-gate { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-top: 1px solid var(--line); list-style: none; }
.ak-gate:first-child { border-top: 0; }
.ak-gate > .ak-icon { margin-top: 2px; }
.ak-ledger--open .ak-label { color: var(--ink); }
.ak-attrs { display: grid; gap: var(--space-1); }
.ak-attrs > div { display: flex; justify-content: space-between; gap: var(--space-4); }
.ak-attrs dt { font-size: 14px; }
.ak-attrs dd { text-align: right; }
.ak-callout { display: grid; gap: var(--space-1); }
.ak-callout__title { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; font-weight: 500; }
.ak-decision__verdict { font-style: italic; }
.ak-lens { list-style: none; display: grid; gap: var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.ak-lens:first-child { border-top: 0; }
.ak-lens__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 14px; }
.ak-nudge { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.ak-diff del { color: var(--ink-muted); }
.ak-diff ins { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* Polish pass (owner, 2026-11-22: every page with better UI/UX). Shared by all screens. */
html { scrollbar-gutter: stable; }
.ak-app { background: linear-gradient(to right, var(--surface) 239px, var(--line) 239px 240px, var(--paper) 240px); }
.ak-sidebar { gap: var(--space-5); padding-top: var(--space-6); }
.ak-sidebar .ak-logo { font-size: 30px; padding: var(--space-1) var(--space-3) var(--space-2); }
.ak-nav a, .ak-nav button { min-height: 44px; transition: background-color 120ms ease, color 120ms ease; }
.ak-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ink); }
.ak-nav a[aria-current="page"] .ak-icon { stroke-width: 2; }
.ak-sidebar__foot { gap: var(--space-3); }
.ak-main { padding-top: var(--space-7); padding-bottom: var(--space-8); }
.ak-page-head { margin-bottom: var(--space-6); }
.ak-page-head .ak-h1 { font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }
.ak-page-head .ak-lead { max-width: 64ch; }
.ak-tabs + * { margin-top: 0; }
.ak-card > .ak-h2:first-child, .ak-card > .ak-h3:first-child { margin-bottom: var(--space-1); }
.ak-card { transition: border-color 120ms ease; }
.ak-card:has(> a:only-child):hover, .ak-card:focus-within { border-color: var(--line-strong); }
.ak-stack-lg > * + * { margin-top: var(--space-6); }
.ak-empty { padding: var(--space-7) var(--space-6); gap: var(--space-3); }
.ak-empty .ak-display { margin-top: var(--space-2); }
.ak-empty__actions { margin-top: var(--space-3); }
.ak-button:active { transform: translateY(1px); }
.ak-input { transition: border-color 120ms ease; }
.ak-input:hover { border-color: var(--ink-2); }
input[type="file"].ak-input, input[type="file"] {
  padding: var(--space-1); min-height: 44px; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-right: var(--space-3); min-height: 34px; padding: 0 var(--space-4); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500;
}
input[type="file"]::file-selector-button:hover { background: var(--surface-sunken); }
.ak-tabs { scrollbar-width: none; }
.ak-tabs::-webkit-scrollbar { display: none; }
.ak-table th { white-space: nowrap; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 18px; height: 18px; }
.ak-board__card a { text-decoration: none; }
.ak-board__card a:hover { text-decoration: underline; }
/* Selectable option card: a label wrapping a radio or checkbox; the checked one gets an ink border */
.ak-option {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.ak-option:hover { background: var(--surface-sunken); }
.ak-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ak-option:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.ak-option input { margin-top: 3px; accent-color: var(--ink); flex: none; }

/* Task loader (X5): centred spot doodle that bobs, a shadow that breathes, live step text. */
.ak-loader { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); text-align: center; }
.ak-loader__art { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: var(--space-2); }
.ak-loader__art .ak-doodle { width: 128px; animation: ak-bob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.ak-loader__shadow { width: 72px; height: 10px; margin-top: var(--space-2); border-radius: 50%; background: var(--line-strong); animation: ak-breathe 1.6s ease-in-out infinite; }
.ak-loader__status { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); width: min(320px, 100%); }
.ak-loader__step { margin: 0; color: var(--ink-2); }
.ak-loader__dots span { animation: ak-blink 1.2s infinite both; }
.ak-loader__dots span:nth-child(2) { animation-delay: .2s; }
.ak-loader__dots span:nth-child(3) { animation-delay: .4s; }
.ak-loader__bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; }
.ak-loader__bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.ak-loader__bar::-webkit-progress-value { background: var(--ink); border-radius: 999px; transition: width .4s ease; }
.ak-loader__bar::-moz-progress-bar { background: var(--ink); border-radius: 999px; }
@keyframes ak-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes ak-breathe { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.65); opacity: .45; } }
@keyframes ak-blink { 0%, 80%, 100% { opacity: .15; } 40% { opacity: 1; } }

.ak-loader__out { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }

/* Task tray (X5): running tasks and end toasts, pinned bottom right on every app page. */
.ak-tray { position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); max-width: min(360px, calc(100vw - 32px)); }
.ak-tray:empty { display: none; }
.ak-tray__item, .ak-toast { display: flex; align-items: center; gap: var(--space-3); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow-md); color: var(--ink); text-decoration: none; }
.ak-tray__item:hover { border-color: var(--line-strong); }
.ak-tray__text { font-weight: 500; }
.ak-tray__pct { color: var(--ink-muted); font-size: 12px; }
.ak-tray__dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--ink); animation: ak-pulse 1.2s ease-in-out infinite; }
.ak-tray__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; animation: ak-ring 1.2s ease-out infinite; }
.ak-toast { border-radius: var(--radius-md); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ak-toast .ak-icon { flex: none; }
.ak-toast__link { color: var(--paper); font-weight: 600; text-decoration: underline; white-space: nowrap; }
.ak-toast__close { display: inline-flex; padding: 4px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--paper); cursor: pointer; }
.ak-toast__close:hover { background: color-mix(in srgb, var(--paper) 15%, transparent); }
@keyframes ak-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ak-ring { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.4); opacity: 0; } }
@media (max-width: 759px) {
  .ak-tray { right: var(--space-4); left: var(--space-4); bottom: var(--space-4); max-width: none; align-items: stretch; }
  .ak-app:has(.ak-tray__item, .ak-toast) .ak-main { padding-bottom: 120px; }
}

/* Responsive */
@media (max-width: 1023px) {
  .ak-board { grid-template-columns: repeat(6, 260px); overflow-x: auto; padding-bottom: var(--space-2); }
  .ak-hero { grid-template-columns: 1fr; }
  .ak-hero__art { justify-content: flex-start; }
}
@media (max-width: 759px) {
  .ak-display-xl { font-size: 40px; line-height: 44px; }
  .ak-display { font-size: 32px; line-height: 36px; }
  .ak-topbar { height: 56px; padding: 0 var(--space-4); }
  .ak-logo { font-size: 24px; }
  .ak-public { padding: var(--space-7) var(--space-5) var(--space-6); }
  .ak-hero { grid-template-columns: 1fr; gap: var(--space-6); }
  .ak-hero__art .ak-doodle { width: 160px; }
  .ak-app { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .ak-sidebar {
    position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between;
    gap: var(--space-2); padding: 0 var(--space-4); min-height: 64px;
    border-right: 0; border-bottom: 1px solid var(--line); background: var(--paper);
  }
  .ak-sidebar .ak-logo { padding: 0; }
  .ak-nav { display: flex; gap: 0; }
  .ak-nav a, .ak-nav button { width: 36px; padding: 0; justify-content: center; }
  .ak-nav .ak-nav__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ak-sidebar__foot { display: none; }
  .ak-nav a.ak-nav__more { display: flex; }
  .ak-tabs__end { display: block; }
  .ak-job__initial { width: 32px; height: 32px; }
  .ak-grid-3, .ak-grid-2 { grid-template-columns: 1fr; }
  .ak-fact { flex-direction: column; }
  .ak-fact__side { justify-content: flex-start; max-width: none; }
  .ak-file { flex-wrap: wrap; }
  .ak-file__end { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; } /* QA-01: long notes wrap at 375 */
  .ak-main { padding: var(--space-5) var(--space-4) var(--space-7); }
  .ak-app { background: var(--paper); }
  .ak-sidebar { position: sticky; top: 0; z-index: 5; min-height: 56px; }
  .ak-sidebar .ak-logo { font-size: 24px; padding: 0; }
  .ak-nav a, .ak-nav button { width: 40px; min-height: 40px; }
  .ak-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .ak-page-head { margin-bottom: var(--space-5); }
  .ak-page-head .ak-h1 { font-size: 26px; line-height: 32px; }
  .ak-tabs { margin-left: calc(-1 * var(--space-4)); margin-right: calc(-1 * var(--space-4)); padding: 0 var(--space-4); margin-bottom: var(--space-5); }
  .ak-tabs a { padding: 0 var(--space-2); font-size: 14px; }
  .ak-card { padding: var(--space-4); }
  .ak-stack-lg > * + * { margin-top: var(--space-5); }
  .ak-empty { padding: var(--space-6) var(--space-4); }
  .ak-split, .ak-split--end { grid-template-columns: 1fr; }
  .ak-media { flex-direction: column; text-align: center; }
  .ak-media--head { text-align: left; }
  .ak-doodle--spot.ak-doodle--heading { display: none; }
  .ak-doodle--scene, .ak-doodle--scene-lg { width: 160px; }
  .ak-empty { padding: var(--space-6) var(--space-4); }
  .ak-table thead { display: none; }
  .ak-table tr { display: block; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
  .ak-card .ak-table tr:last-child { border-bottom: 0; }
  .ak-card .ak-table td { padding-inline: 0; }
  .ak-table td { display: block; padding: var(--space-1) 0; border: 0; }
  .ak-table td::before { content: attr(data-label); display: block; font-size: var(--text-overline-size); font-weight: 600; letter-spacing: var(--text-overline-tracking); text-transform: uppercase; color: var(--ink-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Jobs list search: one compact row, stacks at 375px (F-06). */
.ak-jobs-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3); }
.ak-jobs-search .ak-input { flex: 1 1 12rem; min-width: 0; }
.ak-jobs-search .ak-grow { flex: 3 1 16rem; }
.ak-jobs-bar > .ak-grow { flex: 1 1 16rem; }
.ak-jobs-bar .ak-chip { white-space: nowrap; }

/* Compact one-line notice card: icon, text, one small action (Today, F-08). */
.ak-banner { gap: var(--space-3); padding: var(--space-3) var(--space-5); flex-wrap: wrap; }
.ak-banner > .ak-grow { flex: 1 1 16rem; }
/* Decision page head: initial tile beside the title (decision-werkstudent mockup). */
.ak-job-head { align-items: center; flex-wrap: wrap; margin-bottom: var(--space-6); }
.ak-job-head .ak-page-head { margin-bottom: 0; min-width: 0; }
/* Page-head text block next to actions: takes the row, wraps actions below on phones. */
.ak-head-main { flex: 1 1 18rem; min-width: 0; }

/* Ad text as blocks (F-06): readable measure, headings, bullets, the rest behind <details>. */
.ak-ad { display: flex; flex-direction: column; gap: var(--space-3); max-width: 64ch; overflow-wrap: anywhere; }
.ak-ad p { margin: 0; }
.ak-ad__h { margin: var(--space-2) 0 0; }
.ak-ad__li { padding-left: var(--space-4); text-indent: calc(-1 * var(--space-3)); }
.ak-ad__li::before { content: "– "; color: var(--ink-2); }
.ak-ad__more { display: flex; flex-direction: column; gap: var(--space-3); }
.ak-ad__more > summary { cursor: pointer; margin-bottom: var(--space-3); }
.ak-ad__more[open] > summary { margin-bottom: var(--space-3); }
.ak-job-head .ak-h1 { overflow-wrap: anywhere; text-wrap: balance; }

/* Application record timeline (F-13): date column in mono, event beside it, hairline between rows. */
.ak-timeline__row { display: grid; grid-template-columns: 136px 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.ak-timeline__row:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 759px) { .ak-timeline__row { grid-template-columns: 1fr; gap: var(--space-1); } }

/* Today as a desk (v2 mockup, D-46): head text beside one scene and the two actions. */
.ak-desk-head { align-items: flex-start; flex-wrap: wrap; gap: var(--space-5); }
.ak-desk-head__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); }
.ak-desk-head__scene { width: 200px; }
.ak-desk-status { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.ak-desk-status .ak-icon, .ak-desk-head .ak-head-main .ak-icon { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.ak-ready { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); }
.ak-ready .ak-row { gap: var(--space-3); align-items: baseline; }
@media (max-width: 759px) {
  .ak-desk-head__side { align-items: flex-start; width: 100%; }
  .ak-desk-head__scene { display: none; }
}
/* v2 head scene (Journey v2 canvas): one doodle beside a page head, hidden on phones. */
.ak-head-scene { width: 200px; margin-left: auto; }
@media (max-width: 759px) { .ak-head-scene { display: none; } }
.ak-gap-head { align-items: flex-start; flex-wrap: nowrap; }
.ak-gap-scene { width: 160px; flex: none; }
.ak-gap-answered .ak-gap-scene { float: right; margin-left: var(--space-4); }
@media (max-width: 759px) { .ak-gap-scene { display: none; } }
/* v2 job page (Journey v2 canvas "Job · one answer, one action"). */
.ak-back { display: inline-flex; align-items: center; gap: var(--space-1); text-decoration: none; }
.ak-back .ak-icon { width: 16px; height: 16px; }
.ak-actions { align-items: flex-start; gap: var(--space-3); }
.ak-fold summary { cursor: pointer; }
.ak-fold[open] summary { margin-bottom: var(--space-3); }
.ak-nfm > summary { list-style: none; }
.ak-nfm > summary::-webkit-details-marker { display: none; }
.ak-nfm[open] .ak-nfm__body { margin-top: var(--space-3); }
.ak-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.ak-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.ak-tile .ak-label { display: inline-flex; align-items: center; gap: var(--space-1); }
.ak-tile .ak-icon { width: 16px; height: 16px; }
.ak-tile--missing { border-style: dashed; border-color: var(--line-strong); }
.ak-tile--claimed { background: var(--surface-sunken); }
.ak-tile__quote { overflow-wrap: anywhere; }
@media (max-width: 759px) { .ak-tiles { grid-template-columns: 1fr; } }

/* v2 profile (Journey v2 canvas "Profile · facts and files"): fact rows with a source tag. */
.ak-facts { display: flex; flex-direction: column; }
.ak-fact-row { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.ak-fact-row:first-child { border-top: 0; padding-top: 0; }
.ak-fact-row .ak-fact__src { overflow-wrap: anywhere; }
.ak-tag { flex: none; padding: 2px var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--text-body-sm-size); line-height: var(--text-body-sm-line); color: var(--ink-muted); white-space: nowrap; }
.ak-tag--claimed { border-style: dashed; }
.ak-tag--check { border-color: var(--line-strong); color: var(--ink-2); }
.ak-head-row { align-items: flex-end; flex-wrap: wrap; gap: var(--space-4); }
/* Exact or Rough per number (D-54, v2 canvas "Setup 3"): two joined buttons. */
.ak-seg { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; }
.ak-seg form { display: contents; }
.ak-seg__opt { min-width: 64px; min-height: 36px; padding: 0 var(--space-3); border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-family: var(--font-mono); font-size: var(--text-body-sm-size); cursor: pointer; }
.ak-seg form:first-child .ak-seg__opt { border-left: 0; }
.ak-seg__opt[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.ak-grid-2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 759px) { .ak-grid-2e { grid-template-columns: 1fr; } }
/* v2 setup taps: chips for many-of, joined segments for one-of (no typing). */
.ak-chipset { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ak-chip-opt { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-2); font-size: var(--text-body-sm-size); font-weight: 500; cursor: pointer; }
.ak-chip-opt input, .ak-seg--radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ak-chip-opt:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ak-chip-opt:has(input:focus-visible), .ak-seg--radio label:has(input:focus-visible) { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
.ak-seg--radio { flex-wrap: wrap; }
.ak-seg--radio label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 36px; padding: 0 var(--space-3); border-left: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-family: var(--font-mono); font-size: var(--text-body-sm-size); cursor: pointer; }
.ak-seg--radio label:first-child { border-left: 0; }
.ak-seg--radio label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.ak-drop__scene { width: 200px; }
