/* Askwell — "Forest".
   Taken from the Askwell owl, used as accents only: a neutral off-white ground holds a floating
   white menu and white cards, with neutral grey text; green appears only where it means something.
   Every page opens with a forest-green banner of layered circles (leaf, deep forest, gold)
   that names the screen. Colour has jobs: forest is the brand and selection, gold (the owl's
   beak) marks the one thing to do, status pills take soft green / sky / plum, red is only
   clinical risk, amber only warnings.
   Everything is local: no external fonts or assets (strict CSP, no inline style). */

:root {
  --ground: #ebeae5;
  --card: #ffffff;
  --raised: #f7f7f4;
  --tint: #dcebd3;
  --border: #e0ded8;
  --rule: #ecebe6;
  --control: #c4c1b9;
  --ink: #121312;
  --muted: #4a4d50;
  --faint: #5a5d60;
  --primary: #24492d;
  --primary-ink: #ffffff;

  --forest: #24492d;
  --forest-2: #2f6339;
  --forest-deep: #14281a;
  --forest-ink: #ffffff;
  --forest-muted: #cfe5c4;
  --leaf: #a8d48f;
  --gold: #e8ab3a;
  --gold-soft: #fbecc8;
  --gold-ink: #6a4a08;
  --sky-soft: #dcecfb;
  --sky-ink: #1c5c94;
  --plum-soft: #ebe4fa;
  --plum-ink: #553a9c;

  --data: #2a5a34;
  --data-soft: #d9e6cf;
  --focus: #2a5a34;
  --critical: #b3261e;
  --critical-bg: #fde8e6;
  --critical-soft: #fcf2f0;
  --critical-ink: #7a1a14;
  --warning: #8a5300;
  --warning-bg: #fdf0d8;
  --warning-soft: #fcf5e6;
  --warning-ink: #6b4000;
  --neutral-bg: #ecebe6;
  --neutral-ink: #45474a;
  --band-low: #c3dfb0;
  --band-mid: #f2d176;
  --band-high: #f09d90;
  --grid: #e8e6e1;
  --soft-btn: #e3e2db;
  --soft-btn-hover: #d7d6ce;
  --soft-btn-edge: rgba(18, 19, 18, 0.05);

  --font: "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", "Noto Sans", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-hero: 2.125rem;   /* 34 */
  --fs-title: 1.5rem;    /* 24 */
  --fs-section: 1.0625rem; /* 17 */
  --fs-body: 0.9375rem;  /* 15 */
  --fs-small: 0.8125rem; /* 13 */

  --r-banner: 30px;
  --r-sheet: 26px;
  --r-card: 18px;
  --r-control: 12px;
  --rail: 244px;
  --control-h: 40px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
/* Avenir Next has no Greek alphabet (only π as a maths sign), so Greek pages use the system face, which has full Greek. */
:root:lang(el) { --font: system-ui, -apple-system, "Segoe UI", "Noto Sans", Roboto, Arial, sans-serif; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ground: #0f1010;
    --card: #1a1b1b;
    --raised: #212322;
    --tint: #1f3a26;
    --border: #2c2e2d;
    --rule: #292b2a;
    --control: #4a4d4c;
    --ink: #eeece6;
    --muted: #bab8b2;
    --faint: #9e9d98;
    --primary: #eeece6;
    --primary-ink: #141515;
    --forest: #1f4428;
    --forest-2: #2a5c34;
    --forest-deep: #0f2014;
    --gold-soft: #382d14;
    --gold-ink: #e8c57e;
    --sky-soft: #172a3d;
    --sky-ink: #9cc9f2;
    --plum-soft: #261e3d;
    --plum-ink: #c9b6ff;
    --data: #a8d48f;
    --data-soft: #263528;
    --focus: #a8d48f;
    --critical: #ff8b80;
    --critical-bg: #3a1d1a;
    --critical-soft: #2a1c1a;
    --critical-ink: #ffc2bb;
    --warning: #f0b860;
    --warning-bg: #33280f;
    --warning-soft: #2a2312;
    --warning-ink: #f6d398;
    --neutral-bg: #262827;
    --neutral-ink: #cfcdc6;
    --band-low: #35513a;
    --band-mid: #6e5a22;
    --band-high: #7d3a33;
    --grid: #2d2f2e;
    --soft-btn: #2b2d2c;
    --soft-btn-hover: #353837;
    --soft-btn-edge: rgba(255, 255, 255, 0.05);
    color-scheme: dark; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--control) transparent; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  caret-color: var(--data);
}
::selection { background: var(--data-soft); color: var(--ink); }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-title); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-section); line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; margin: 32px 0 12px; }
h3 { font-size: var(--fs-body); font-weight: 700; margin: 20px 0 8px; }
p { margin: 0 0 12px; max-width: 72ch; }
a { color: var(--data); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--data) 40%, transparent); }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: currentColor; } }
code { font: 0.86em/1.4 var(--mono); background: var(--raised); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: var(--r-control); }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.pre { white-space: pre-wrap; }
.num, time, td.num { font-variant-numeric: tabular-nums; }
time { white-space: nowrap; }
.code { font: 700 0.875em var(--mono); letter-spacing: 0.03em; white-space: nowrap; }
a.code { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a.code:hover { color: var(--data); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; } }

/* --------------------------------------------------------- the mark */
.logo { display: block; flex: none; height: 40px; width: auto; }
.logo .lg-bubble { fill: var(--forest); stroke: var(--forest); }
.logo .lg-face { fill: #efe3c8; }
.logo .lg-eye { fill: var(--forest); }
.logo .lg-beak { fill: #b8873a; stroke: #b8873a; }
.logo .lg-ask { fill: #1f2e21; }
.logo .lg-well { fill: #4a6b45; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .lg-bubble, :root:not([data-theme="light"]) .logo .lg-eye { fill: #6e9468; stroke: #6e9468; }
  :root:not([data-theme="light"]) .logo .lg-face, :root:not([data-theme="light"]) .logo .lg-ask { fill: #f1e6cc; }
  :root:not([data-theme="light"]) .logo .lg-beak { fill: #d6a64e; stroke: #d6a64e; }
  :root:not([data-theme="light"]) .logo .lg-well { fill: #9cbf8a; }
}

/* ------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 18px; min-height: 100vh; padding: 14px; }
.rail { position: sticky; top: 14px; align-self: start; height: calc(100vh - 28px); display: flex; flex-direction: column; padding: 22px 14px 14px; background: var(--card); border-radius: var(--r-sheet); }
.brand { display: flex; align-items: center; padding: 0 8px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.rail nav { margin-top: 26px; }
.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rail nav .ns { display: none; }
.rail nav a { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 14px; color: var(--muted); text-decoration: none; font-weight: 600; transition: background-color 120ms ease, color 120ms ease; }
@media (hover: hover) and (pointer: fine) { .rail nav a:hover { background: var(--ground); color: var(--ink); } }
.rail nav a[aria-current="page"] { background: var(--tint); color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rail nav a[aria-current="page"] { color: var(--leaf); } }
.rail .who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--ground); }
.rail .who .av { width: 36px; height: 36px; border-radius: 50%; text-decoration: none; transition: transform 160ms var(--ease-out); background: var(--gold); color: var(--forest-deep); display: grid; place-items: center; font-weight: 800; font-size: 0.8125rem; flex: none; }
.who-text { min-width: 0; flex: 1; display: grid; line-height: 1.3; }
.who-text strong { font-size: 0.875rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { font-size: 0.75rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 11px; background: transparent; color: var(--muted); border: 0; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--card); color: var(--ink); } }
.icon-btn .ico { width: 18px; height: 18px; }

.main-col { min-width: 0; max-width: 1280px; display: flex; flex-direction: column; gap: 16px; }
.main-col:focus { outline: none; }
.sheet { background: var(--card); border-radius: var(--r-sheet); }
.content { padding: 28px 32px 32px; }
.main-col.narrow .content > * { max-width: 760px; }
.main-col.board .sheet { background: none; border-radius: 0; }
.main-col.board .content { padding: 0; }
.main-col > .notice { margin: 0; max-width: none; }
.main-col > footer.site { padding: 0 10px 8px; color: var(--faint); font-size: 0.75rem; }

/* Public & client: one white card on the neutral ground */
.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 12px 24px; }
.bar { width: 100%; max-width: 720px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 4px; color: var(--ink); }
.bar .brand { padding: 0; }
.bar select { width: auto; }
/* clip, not hidden: hidden would make the card a scroll container and stop the sticky answer bar from sticking */
.public .sheet { width: 100%; max-width: 720px; overflow: clip; }
.public .sheet.narrow { max-width: 460px; }
.public .content { padding: 32px 36px 36px; }
.public footer.site { width: 100%; max-width: 720px; padding: 14px 4px 0; color: var(--faint); font-size: 0.75rem; }
body.client-page { font-size: 1rem; }
.public:has(.sheet.narrow) { padding-top: 8vh; }
.public:has(.sheet.narrow) .bar, .public:has(.sheet.narrow) footer.site { max-width: 460px; }

/* ------------------------------------------------- the forest banner (every page head) */
.page-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px;
  padding: 30px 32px 28px; border-radius: var(--r-banner); color: var(--forest-ink);
  background:
    radial-gradient(circle at calc(100% - 300px) -6px, color-mix(in srgb, var(--gold) 72%, #fff3d6) 0 42px, transparent 43px),
    radial-gradient(circle at calc(100% - 70px) 26%, color-mix(in srgb, var(--leaf) 22%, var(--forest-2)) 0 92px, transparent 93px),
    radial-gradient(circle at calc(100% + 10px) 105%, var(--forest-deep) 0 70px, transparent 71px),
    radial-gradient(circle at calc(100% - 140px) 40%, var(--forest-2) 0 170px, transparent 171px),
    var(--forest);
}
.page-head > div:first-child { min-width: 0; max-width: 62ch; }
.page-head h1 { color: #fff; font-size: var(--fs-hero); line-height: 1.1; letter-spacing: -0.03em; }
.page-head h1 .hl { color: var(--gold); }
.page-head .lede { margin: 10px 0 0; color: var(--forest-muted); font-size: 1rem; max-width: 60ch; }
.page-head .lede.alert { color: var(--gold); font-weight: 650; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; }
.page-head .button, .page-head button { background: var(--gold); color: var(--forest-deep); border-color: var(--gold); }
.page-head .button.secondary, .page-head button.secondary { background: rgba(6, 20, 10, 0.3); color: #fff; border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .page-head .button:hover { background: color-mix(in srgb, var(--gold) 88%, #fff); }
  .page-head .button.secondary:hover { background: rgba(6, 20, 10, 0.42); }
}
.crumb { display: inline-block; margin-bottom: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--forest-muted); text-decoration-color: color-mix(in srgb, var(--forest-muted) 50%, transparent); }
.page-head a:not(.button) { color: var(--forest-muted); }
.page-head .code { color: inherit; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 30px; margin: 16px 0 0; padding: 0; }
.meta div { display: grid; gap: 1px; }
.meta dt { font-size: 0.75rem; color: var(--forest-muted); }
.meta dd { margin: 0; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.page-head .badge { background: rgba(6, 20, 10, 0.3); color: #fff; }
.page-head code { background: rgba(6, 20, 10, 0.3); border-color: transparent; color: #fff; }
.public .page-head { border-radius: 0; padding: 28px 36px 26px; }
.public .page-head h1 { font-size: 1.75rem; }
.page-head .steps span { background: rgba(255, 255, 255, 0.22); }
.page-head .steps span.done { background: var(--gold); }
.page-head .steps span.current { background: var(--leaf); opacity: 1; }
.page-head .step { color: var(--forest-muted); }

/* -------------------------------------------- sections, cards, layout */
.card { margin: 0 0 32px; }
.card > h2:first-child, section > h2:first-child { margin-top: 0; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 24px; margin: 0 0 16px; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { margin-top: 0; }
.grid { display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin: 0 0 14px; }
.section-head h2 { margin: 0; }
.section-head .aside { font-size: var(--fs-small); color: var(--faint); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.note-item { padding: 12px 0; border-top: 1px solid var(--rule); }
.note-item time { color: var(--muted); font-size: var(--fs-small); }
.note-item p { margin: 4px 0 0; }
details > summary { cursor: pointer; font-weight: 650; padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 7px; border-color: transparent transparent transparent var(--data); transition: transform 160ms var(--ease-out); }
details[open] > summary::before { transform: rotate(90deg); }
details.card > summary { font-size: var(--fs-section); }

/* ----------------------------------------------------------- buttons */
button, .button {
  font: 650 0.875rem/1 var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 18px; border-radius: var(--r-control);
  border: 1px solid var(--primary); background: var(--primary); color: var(--primary-ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 120ms ease, border-color 120ms ease;
}
button:active, .button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  button:hover, .button:hover { background: color-mix(in srgb, var(--primary) 86%, var(--card)); }
  button.secondary:hover, .button.secondary:hover { background: var(--soft-btn-hover); }
}
button.secondary, .button.secondary { background: var(--soft-btn); color: var(--ink); border-color: transparent; box-shadow: inset 0 0 0 1px var(--soft-btn-edge); }
button.danger, .button.danger { background: var(--critical); border-color: var(--critical); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.danger, :root:not([data-theme="light"]) .button.danger { color: #1a0605; } }
@media (hover: hover) and (pointer: fine) { button.danger:hover, .button.danger:hover { background: color-mix(in srgb, var(--critical) 88%, var(--ink)); } }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--data); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.link:hover { background: none; }
button.link:active { transform: none; }
button.small, .button.small { height: 32px; padding: 0 13px; font-size: 0.8125rem; border-radius: 10px; }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
body.client-page button:not(.link):not(.small), body.client-page .button:not(.small) { height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 14px; }
/* The language toggle stays a compact control (still a 40px touch target), not a big action button */
body.client-page .langs button { height: 40px; padding: 0 14px; font-size: 0.875rem; border-radius: 10px; }

/* ------------------------------------------------------------ fields */
label { font-weight: 650; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--control); border-radius: var(--r-control);
  height: 42px; padding: 0 12px; width: 100%; transition: border-color 120ms ease, box-shadow 120ms ease;
}
input[type=file] { padding: 8px 10px; height: auto; }
textarea { height: auto; min-height: 104px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
@media (hover: hover) and (pointer: fine) { input:hover, select:hover, textarea:hover { border-color: var(--faint); } }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
body.client-page input[type=text] { height: 50px; font-size: 1rem; }
body.client-page textarea { font-size: 1rem; }
input.num-input { max-width: 12rem; font-variant-numeric: tabular-nums; }
#pin { font-size: 1.5rem; letter-spacing: 0.3em; height: 58px; max-width: 14rem; font-variant-numeric: tabular-nums; }
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 7px; }
.hint { color: var(--muted); font-size: var(--fs-small); margin: 6px 0 0; }
form.inline { display: inline-flex; gap: 6px; align-items: center; }
.row select, .row input[type=search], .row input[type=date] { width: auto; }
.row .field { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 18px; }
.filters .field { margin: 0; }
.filters select, .filters input { width: auto; min-width: 12rem; }
/* Moving through a form: Back on the left, the way on at the right edge. */
.formnav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.formnav > .back, .formnav > .link { margin-right: auto; }
.formnav .fwd .ico { width: 18px; height: 18px; margin-right: -4px; }
.formnav .back .ico { width: 18px; height: 18px; margin-left: -4px; }

/* forms: one rhythm everywhere */
form.panel, .panel > form, form.stack { display: grid; gap: 20px; align-content: start; }
form.panel > *, .panel > form > *, form.stack > * { margin: 0; }
form.panel .field, .panel > form .field, form.stack .field { margin: 0; }
form.panel > button, .panel > form > button, form.stack > button { justify-self: start; }
.panel > h2:first-child + form { margin-top: 4px; }
.form-section { display: grid; gap: 16px; padding-top: 24px; border-top: 1px solid var(--rule); }
.form-section:first-of-type { padding-top: 0; border-top: 0; }
.form-section > h2 { margin: 0; }
.form-section > h2 + .hint { margin-top: -10px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 20px; align-items: start; }
.field-grid .field { margin: 0; }
.field-grid .span-all { grid-column: 1 / -1; }
/* The end of a form: secondary choices first, the main action last, at the right edge (full width on phones). */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* ----------------------------------------------------------- notices */
.notice { background: var(--tint); border: 0; color: var(--ink); padding: 14px 16px; border-radius: 14px; margin: 0 0 20px; }
.notice.ok { background: var(--tint); }
.notice.warn { background: var(--warning-bg); color: var(--warning-ink); }
.notice.error, .notice.danger { background: var(--critical-bg); color: var(--critical-ink); }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice p:last-child { margin: 0; }
.aid-note { color: var(--muted); font-size: var(--fs-small); margin: 0 0 24px; max-width: 72ch; }
.aid-note strong { color: var(--ink); font-weight: 650; }

/* Risk: the only saturated red in the product. Severity reads by mark size and words, never colour alone. */
.alert-risk { background: var(--critical-bg); border-radius: var(--r-card); padding: 18px 20px; margin: 0 0 28px; color: var(--critical-ink); }
.alert-risk h2 { font-size: var(--fs-body); color: var(--critical-ink); margin: 0 0 12px; }
.alert-risk ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert-risk li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 10px; align-items: baseline; color: var(--ink); }
.alert-risk p { margin: 0; color: var(--ink); }
.sev { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.sev::before { content: ""; flex: none; border-radius: 50%; background: currentColor; }
.sev.critical { color: var(--critical); }
.sev.critical::before { width: 10px; height: 10px; }
.sev.warning { color: var(--warning); }
.sev.warning::before { width: 7px; height: 7px; }

/* ------------------------------------------------------------ tables */
.table-wrap { position: relative; overflow-x: auto; margin: 0 0 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
caption { text-align: left; padding: 16px 18px 4px; font-weight: 700; font-size: var(--fs-section); }
th, td { text-align: left; padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid var(--rule); }
thead th { font-size: 0.75rem; font-weight: 650; color: var(--faint); padding-top: 12px; padding-bottom: 10px; text-wrap: balance; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
th.num, td.num { text-align: right; }
/* Action buttons may wrap onto a second line inside their cell, so a row of them never pushes the table off the page. */
td.actions { white-space: normal; text-align: right; }
td.actions > * { vertical-align: middle; margin-top: 3px; margin-bottom: 3px; }
td.actions > * + * { margin-left: 6px; }
td .sub, th .sub { display: block; margin-top: 2px; color: var(--faint); font-size: 0.75rem; font-weight: 400; }
/* Row under the pointer: a faint wash of the text colour, so it lightens in dark mode and darkens in light mode (the ground
   colour made dark rows darker). Painted on the cells of a real table, where they touch; on the row itself where a table
   is laid out as blocks or cards, so the gaps between values do not leave dark patches around the text. */
@media (hover: hover) and (pointer: fine) {
  tbody tr:hover > * { background: color-mix(in srgb, var(--ink) 4%, transparent); }
  table.stacked tbody tr:hover > *, .history-table tbody tr:hover > *, .result-table tbody tr:hover > *,
  .answers-table tbody tr:hover > * { background: none; }
  table.stacked tbody tr:hover, .history-table tbody tr:hover, .result-table tbody tr:hover,
  .answers-table tbody tr:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
}
tr.positive th { font-weight: 750; }
tr.na th, tr.na td { color: var(--faint); }
td.empty { color: var(--muted); padding: 22px 16px; }
@media (max-width: 900px) { td.actions { white-space: normal; text-align: left; } td.actions > * { margin: 4px 6px 0 0 !important; } }
table.log td { white-space: nowrap; vertical-align: top; }
table.log td:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 16rem; }
table.log code { overflow-wrap: normal; white-space: nowrap; }

/* ------------------------------------------------------------ badges / status pills */
.badge { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; color: var(--neutral-ink); background: var(--neutral-bg); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.in_progress, .badge.active, .badge.approved { color: var(--forest); background: var(--tint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.in_progress, :root:not([data-theme="light"]) .badge.active, :root:not([data-theme="light"]) .badge.approved { color: var(--leaf); } }
.badge.pending { color: var(--sky-ink); background: var(--sky-soft); }
.badge.not_opened { color: var(--gold-ink); background: var(--gold-soft); }
.badge.locked, .badge.revoked { color: var(--plum-ink); background: var(--plum-soft); }
.badge.completed, .badge.low { color: var(--neutral-ink); background: var(--neutral-bg); }
.badge.yes, .badge.warning, .badge.uncertain, .badge.moderate { color: var(--warning-ink); background: var(--warning-bg); }
.badge.critical, .badge.high, .badge.severe { color: var(--critical-ink); background: var(--critical-bg); }
.badge.no, .badge.expired, .badge.cancelled, .badge.retired, .badge.rejected, .badge.not_applicable, .badge.not_explored, .badge.not_asked { color: var(--neutral-ink); background: var(--neutral-bg); }
.badge.no::before, .badge.not_applicable::before, .badge.not_opened::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.badge.tag { font-weight: 600; }
.badge.tag::before { display: none; }

/* ---------------------------------------------- dashboard: banner chips, cards, week */
.chips { position: relative; flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.chip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: rgba(6, 20, 10, 0.28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: rgba(6, 20, 10, 0.4); } }
.chip:active { transform: scale(0.98); }
.chip[aria-current="true"] { background: rgba(6, 20, 10, 0.5); box-shadow: inset 0 0 0 2px var(--leaf); }
.chip .ci { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #102015; }
.chip .ci .ico { width: 21px; height: 21px; }
.chip b { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.chip span { color: var(--forest-muted); font-size: var(--fs-small); font-weight: 600; }
.chip.in_progress .ci { background: #b6d6a4; } .chip.pending .ci { background: #c6dbee; }
.chip.not_opened .ci { background: #ebc57c; } .chip.locked .ci { background: #d8d0ec; }

.board-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.box { background: var(--card); border-radius: var(--r-sheet); padding: 22px 24px; min-width: 0; }
.box + .box, .board-grid + .box { margin-top: 16px; }
.box > .section-head h2 { font-size: var(--fs-section); }
.box .table-wrap { border: 0; border-radius: 0; margin: 0 -8px; background: none; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border-radius: 18px; background: var(--critical-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--critical) 10%, transparent); }
.alert-row.warning { background: var(--warning-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 12%, transparent); }
.alert-row .ab { width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--critical); display: grid; place-items: center; }
.alert-row.warning .ab { color: var(--warning); }
.alert-row h3 { margin: 0; font-size: var(--fs-body); }
.alert-row h3 a { color: var(--ink); text-decoration: none; }
.alert-row h3 .code { color: var(--muted); font-size: 0.75rem; margin-right: 6px; }
.alert-row p { margin: 3px 0 0; color: var(--muted); font-size: 0.84rem; }
.alert-row .am { display: flex; gap: 8px; align-items: center; margin-top: 9px; flex-wrap: wrap; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--card); color: var(--critical); }
.pill.warn { color: var(--warning); }
.empty-state { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--tint); color: var(--ink); }
.empty-state .ab { width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--forest); display: grid; place-items: center; flex: none; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; justify-items: center; gap: 7px; padding: 12px 0 10px; border-radius: 16px; color: var(--muted); font-size: 0.75rem; font-weight: 650; }
.day b { font-size: 1rem; color: var(--ink); }
.day.today { background: var(--forest); color: var(--forest-muted); }
.day.today b { color: #fff; }
.dots { display: flex; gap: 3px; height: 7px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.day.today .dots i { background: var(--gold); }
.week-note { margin: 14px 0 0; color: var(--muted); font-size: 0.875rem; }
.next { margin-top: 16px; padding: 14px; border-radius: 18px; background: var(--gold-soft); display: flex; align-items: center; gap: 12px; }
.next .ab { width: 40px; height: 40px; border-radius: 13px; background: var(--card); color: var(--gold-ink); display: grid; place-items: center; flex: none; }
.next p { margin: 0; flex: 1; font-size: 0.875rem; font-weight: 650; min-width: 0; }
.next p small { display: block; color: var(--muted); font-weight: 500; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--ground); }
.seg a { padding: 6px 13px; border-radius: 10px; text-decoration: none; font-size: 0.8125rem; font-weight: 650; color: var(--muted); }
.seg a[aria-current="true"] { background: var(--forest); color: #fff; }
@media (hover: hover) and (pointer: fine) { .seg a:not([aria-current]):hover { color: var(--ink); } }

/* ---------------------------------------------- secrets shown once */
.secret { font: 0.95rem/1.5 var(--mono); overflow-wrap: anywhere; background: var(--raised); padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--control); margin: 0 0 12px; }
.secret.pin { font: 750 2.25rem/1.2 var(--font); letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
ul.secret { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; border: 0; background: none; }
ul.secret li { padding: 9px 10px; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; text-align: center; }

/* ---------------------------------------------- questionnaire forms */
.steps { display: flex; gap: 5px; margin: 0 0 10px; }
.steps span { flex: 1; height: 7px; border-radius: 99px; background: var(--rule); }
.steps span.done { background: var(--data); }
.steps span.current { background: var(--data); opacity: 0.45; }
.step { color: var(--muted); font-size: var(--fs-small); font-weight: 600; margin: 0 0 6px; }
fieldset.q { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; padding: 24px 0 8px; margin: 0; min-width: 0; }
form > fieldset.q:first-of-type, .content > fieldset.q:first-of-type { border-top: 0; padding-top: 6px; }
fieldset.q.invalid { border-top-color: var(--critical); }
fieldset.q.invalid > legend { color: var(--critical); }
fieldset.q > legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font-weight: 700; font-size: 1rem; line-height: 1.45; }
body.client-page fieldset.q > legend { font-size: 1.125rem; }
fieldset.q > :not(legend) { clear: both; }
.qlabel { display: inline-block; min-width: 2.75rem; margin-right: 6px; color: var(--faint); font-weight: 700; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.qinfo { margin: 24px 0 12px; max-width: 72ch; }
.qinfo > p.pre:first-child { font-size: 1rem; font-weight: 600; }
/* A lead-in ("Before you were 15 years old, did you:"): a band the questions below it clearly belong to */
.qinfo.qhead { max-width: none; margin: 32px 0 6px; padding: 14px 18px; border-radius: 14px; background: var(--tint); }
.qinfo.qhead > p.pre:first-child { margin: 0; color: var(--ink); font-size: 1.0625rem; font-weight: 750; line-height: 1.4; letter-spacing: -0.005em; }
body.client-page .qinfo.qhead > p.pre:first-child { font-size: 1.1875rem; }
.qinfo.qhead:first-child { margin-top: 8px; }
.qinfo.qhead + fieldset.q { border-top: 0; padding-top: 16px; }
/* On the client's pages the questions after a lead-in finish its sentence ("…did you: skip school?"), so the lead-in
   stays pinned at the top while they are on screen; the next lead-in slides over it. */
body.client-page .qinfo.qhead { position: sticky; top: 8px; z-index: 4; box-shadow: 0 -10px 0 0 var(--card), 0 10px 22px -14px rgba(23, 35, 27, 0.45); }
/* Typing a number in an assessment: a centred, bold figure that is easy to check at a glance */
fieldset.q input.num-input { width: 8.5rem; max-width: 100%; height: 54px; padding: 0 12px; text-align: center; font-size: 1.375rem; font-weight: 750; letter-spacing: 0.01em; }
fieldset.q input.num-input::placeholder { font-weight: 500; }
fieldset.q .row:has(> input.num-input) { align-items: center; gap: 10px; }
fieldset.q .row:has(> input.num-input) > span { font-weight: 650; font-size: 1rem; }
.interviewer { font-style: italic; color: var(--muted); font-size: var(--fs-small); background: var(--raised); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; max-width: 72ch; }
.col-label { font-size: var(--fs-small); font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.choices { display: grid; gap: 8px; }
.choices.horizontal { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.choices.scale { grid-template-columns: repeat(11, minmax(34px, 1fr)); gap: 5px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--card);
  cursor: pointer; font-weight: 500; line-height: 1.35;
  transition: border-color 120ms ease, background-color 120ms ease, transform 160ms var(--ease-out);
}
body.client-page .choice label { min-height: 56px; padding: 13px 16px; font-size: 1rem; }
.choice label:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) { .choice label:hover { border-color: var(--control); background: var(--raised); } }
.choice label::before { content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--faint); border-radius: 50%; background: var(--card); transition: border-color 120ms ease, box-shadow 120ms ease; }
.choice input[type=checkbox] + label::before { border-radius: 5px; }
.choices.scale .choice label { justify-content: center; padding: 10px 2px; font-variant-numeric: tabular-nums; }
.choices.scale .choice label::before { display: none; }
.choice input:checked + label { border-color: var(--forest); background: var(--tint); font-weight: 650; }
.choice input:checked + label::before { border-color: var(--forest); box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 9px var(--forest); }
.choice input[type=checkbox]:checked + label::before { background: var(--forest); box-shadow: inset 0 0 0 3px var(--card); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .choice input:checked + label { border-color: var(--data); }
  :root:not([data-theme="light"]) .choice input:checked + label::before { border-color: var(--data); box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 9px var(--data); }
}
.choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice input:disabled + label { cursor: default; opacity: 0.7; }
.scale-ends { display: flex; justify-content: space-between; font-size: var(--fs-small); color: var(--muted); margin-top: 6px; }
.error-text { color: var(--critical); font-weight: 650; margin: 8px 0 0; font-size: var(--fs-small); }
.autosave-status { min-height: 1.4em; font-size: var(--fs-small); color: var(--muted); margin: 8px 0 0; }

/* A single checkbox is a plain row, not a tile; tiles stay for answer choices */
:not(.choices) > .choice > label { min-height: 0; padding: 2px 0; border: 0; background: none; border-radius: 0; font-weight: 550; gap: 10px; align-items: flex-start; }
:not(.choices) > .choice > label::before { margin-top: 2px; }
:not(.choices) > .choice > input:checked + label { background: none; font-weight: 550; }
@media (hover: hover) and (pointer: fine) { :not(.choices) > .choice > label:hover { background: none; } }
:not(.choices) > .choice + .hint { margin-top: -14px; padding-left: 28px; }
fieldset.pick { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
fieldset.pick > legend { padding: 0; margin-bottom: 10px; font-weight: 650; }
fieldset.pick .choice label { align-items: flex-start; }
fieldset.pick .choice .sub { display: block; color: var(--muted); font-weight: 450; font-size: var(--fs-small); }

/* Module strip for long interviews (M.I.N.I. A–P) */
.module-nav { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 24px; }
.module-nav button { height: 32px; min-width: 2.6rem; padding: 0 9px; font-size: 0.75rem; font-weight: 700; background: var(--ground); color: var(--muted); border: 1.5px solid transparent; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) { .module-nav button:hover { background: var(--tint); color: var(--ink); } }
.module-nav button.current { background: var(--forest); color: #fff; border-color: var(--forest); }
.module-nav button.missing:not(.current) { border-style: dashed; border-color: var(--control); background: var(--card); }

/* ----------------------------- signature: the cut-off figure */
.cutoff { display: block; width: 300px; flex: none; max-width: 100%; height: auto; margin: 8px 0 4px; overflow: visible; }
.cutoff .seg { stroke: var(--card); stroke-width: 2; }
.cutoff .seg.low { fill: var(--band-low); }
.cutoff .seg.moderate { fill: var(--band-mid); }
.cutoff .seg.high, .cutoff .seg.severe { fill: var(--band-high); }
.cutoff .seg.none { fill: var(--rule); }
.cutoff .dot { fill: var(--ink); stroke: var(--card); stroke-width: 2.5; }
.cutoff .tick { fill: var(--muted); font: 600 11px var(--font); font-variant-numeric: tabular-nums; }
.cutoff.compact { width: 260px; margin: 4px 0 2px; }
.cutoff.mini { width: 150px; margin: 0; }
.cutoff .range { fill: var(--ink); font: 700 11px var(--font); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 120ms var(--ease-out); }
.cutoff g { outline: none; }
.cutoff g:focus-visible .seg { stroke: var(--focus); stroke-width: 2.5; }
.cutoff g:focus-visible .range, .cutoff g:focus .range { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cutoff g:hover .range { opacity: 1; } .cutoff g:hover .seg { stroke: var(--ink); stroke-width: 1; } }
@media (prefers-reduced-motion: reduce) { .cutoff .range { transition: none; } }

/* scores at a glance (result page) */
.glance-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 0 0 8px; }
.glance-row > :only-child { grid-column: 1 / -1; }
.glance-row .alert-risk { margin: 0; }
.glance h2 { font-size: var(--fs-body); margin: 0 0 10px; }
.glance-item { padding: 12px 0 6px; border-top: 1px solid var(--rule); }
.glance-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.key-result { display: block; }
.key-result + .key-result { margin-top: 8px; }
@media (max-width: 900px) { .glance-row { grid-template-columns: 1fr; } .glance-row .alert-risk { order: -1; } }

/* -------------------------------------------------------------- charts */
.chart-figure { margin: 0 0 32px; }
.chart-figure figcaption { font-weight: 700; margin-bottom: 8px; }
.chart-figure figcaption .sub { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
.chart-wrap { position: relative; max-width: 760px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart-axis { fill: var(--muted); font: 11px var(--font); font-variant-numeric: tabular-nums; }
.chart-end { fill: var(--ink); font: 700 12px var(--font); font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: var(--data); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--data); stroke: var(--card); stroke-width: 2; pointer-events: none; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-hit:focus { outline: none; }
.chart-cross { stroke: var(--faint); stroke-width: 1; pointer-events: none; }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 7px 11px; font-size: var(--fs-small); color: var(--muted); box-shadow: 0 8px 22px rgba(31, 46, 33, 0.14); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.chart-tip strong { display: block; color: var(--ink); font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
svg.qr { width: 196px; height: 196px; background: #fff; padding: 8px; border-radius: 14px; border: 1px solid var(--border); }
svg.qr path { fill: #000; }
pre.code { background: var(--raised); padding: 12px; border-radius: 12px; overflow-x: auto; font-size: 0.78rem; max-height: 340px; }

/* -------------------------------------------------------- settings list */
.settings { margin: 0; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 40px; align-items: center; padding: 22px 0; border-top: 1px solid var(--rule); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting h2 { margin: 0 0 4px; }
.setting p { margin: 0; color: var(--muted); max-width: 56ch; }
.setting .control { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.setting .control select { width: auto; min-width: 11rem; }
.setting .wide { grid-column: 1 / -1; }
details.inline-more { margin-top: 8px; }
details.inline-more > summary { font-size: var(--fs-small); font-weight: 650; color: var(--muted); padding: 2px 0; gap: 8px; }
details.inline-more > summary::before { border-width: 4px 0 4px 6px; }
details.inline-more form { margin-top: 8px; flex-wrap: wrap; }
details.inline-more input { height: 32px; width: 14rem; max-width: 100%; font-size: var(--fs-small); }
td .row select { width: auto; height: 32px; font-size: var(--fs-small); padding-top: 0; padding-bottom: 0; }
.pager { margin-top: 16px; }
.panel.run-now { margin-top: 32px; }
.content > .notice { max-width: none; }
.content > h1:first-child, .content > .notice + h1 { margin-bottom: 18px; }
.public .content > h1:first-child { margin-bottom: 12px; }
.public .sheet .panel { border: 0; padding: 0; background: none; }
h1 + p, h1 + .lede, .step + h1 { margin-top: 8px; }
.content h1 + p.pre { margin-top: 10px; }

/* -------------------------------------------------------------- narrow screens */
@media (max-width: 1100px) { .board-grid { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  /* Phones and small tablets: a slim top bar (logo, you, log out) and a floating tab bar at the bottom,
     where the thumb is. Short labels; the current tab sits on a soft pill. */
  .shell { display: block; padding: 10px 10px calc(92px + env(safe-area-inset-bottom)); }
  .rail { position: relative; top: 0; height: auto; flex-direction: row; align-items: center; justify-content: space-between;
          padding: 10px 10px 10px 14px; margin-bottom: 12px; border-radius: 20px; }
  .rail .brand { padding: 0; }
  .rail .brand .logo { height: 32px; }
  .rail .who { margin: 0; padding: 0; background: none; gap: 6px; }
  .rail .who-text { display: none; }
  .rail .who .av { width: 34px; height: 34px; }
  .rail nav {
    position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0;
    padding: 6px; border-radius: 24px; background: color-mix(in srgb, var(--card) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 0 0 1px var(--border), 0 14px 34px -12px rgba(18, 19, 18, 0.28);
  }
  .rail ul { display: flex; gap: 2px; }
  .rail ul li { flex: 1 1 0; min-width: 0; }
  .rail nav a { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px 7px; border-radius: 18px;
                font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.01em; text-align: center;
                transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
  .rail nav a:active { transform: scale(0.95); }
  .rail nav a .ico { width: 22px; height: 22px; transition: transform 220ms var(--ease-out); }
  .rail nav a[aria-current="page"] .ico { transform: translateY(-1px); }
  .rail nav .nl { display: none; }
  .rail nav .tab-account, .rail nav .tab-extra { display: none; }
  .rail .who .av { text-decoration: none; }
  .rail .who .av:active { transform: scale(0.94); }
  .rail nav .ns { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-col { gap: 12px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .setting { grid-template-columns: 1fr; gap: 12px; }
  .setting .control { justify-content: flex-start; }
  .page-head { padding: 24px 20px 22px; border-radius: 24px; }
  .page-head h1 { font-size: 1.625rem; }
  .content { padding: 22px 18px 24px; }
  .box { padding: 18px 16px; border-radius: 22px; }
  .alert-row { grid-template-columns: auto minmax(0, 1fr); }
  .alert-row > .button { grid-column: 2; justify-self: start; }
  .public { padding: 0 6px 16px; }
  .public .content { padding: 22px 18px 24px; }
  .public .page-head { padding: 22px 18px 20px; }
  .choices.scale { grid-template-columns: repeat(6, 1fr); }
  th, td { padding: 11px 12px; }
  .chip { padding: 12px; gap: 10px; }
  .chip .ci { width: 36px; height: 36px; border-radius: 12px; }
  .chip b { font-size: 1.5rem; }
}

/* --------------------------------------------------------------- print */
@media print {
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .rail, .bar, .no-print, footer.site, .formnav, .module-nav { display: none !important; }
  .shell { display: block; padding: 0; }
  .page-head { background: none; color: #000; padding: 0 0 12px; border-radius: 0; border-bottom: 1px solid #000; }
  .page-head h1, .meta dd { color: #000; }
  .page-head .lede, .meta dt, .crumb { color: #333; }
  .sheet { border-radius: 0; }
  .content { padding: 0; }
  .alert-risk { background: #fff; border: 1px solid #000; }
  a { color: #000; text-decoration: none; }
}

/* Narrow banners (client card, phones): the circles gather in the top-right corner, clear of the text */
.public .page-head, .page-head.compact-art {
  background:
    radial-gradient(circle at calc(100% - 36px) -18px, color-mix(in srgb, var(--gold) 72%, #fff3d6) 0 34px, transparent 35px),
    radial-gradient(circle at calc(100% + 20px) 110%, var(--forest-deep) 0 56px, transparent 57px),
    radial-gradient(circle at calc(100% - 20px) 30%, var(--forest-2) 0 120px, transparent 121px),
    var(--forest);
}
@media (max-width: 700px) {
  .page-head {
    background:
      radial-gradient(circle at calc(100% - 36px) -18px, color-mix(in srgb, var(--gold) 72%, #fff3d6) 0 34px, transparent 35px),
      radial-gradient(circle at calc(100% + 20px) 110%, var(--forest-deep) 0 56px, transparent 57px),
      radial-gradient(circle at calc(100% - 10px) 25%, var(--forest-2) 0 110px, transparent 111px),
      var(--forest);
  }
}
.week { list-style: none; margin: 0; padding: 0; }
.board-grid > .box { margin: 0; }
.bar button.secondary, .bar .button.secondary { background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }

/* Language: a two-option toggle, the same shape as the dashboard filters (no native select) */
.langs { display: inline-flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--card); }
.setting .langs, .content .langs { background: var(--ground); }
.langs button { height: 32px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 0.8125rem; font-weight: 650; }
@media (hover: hover) and (pointer: fine) { .langs button:hover { background: var(--ground); color: var(--ink); } .setting .langs button:hover { background: var(--card); } }
.langs button[aria-pressed="true"] { background: var(--forest); color: #fff; cursor: default; }
.langs button[aria-pressed="true"]:active { transform: none; }

/* Selects: one drawn chevron in every browser (Safari otherwise paints its own native control) */
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%234f625f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23a8bdb9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } }
select::-ms-expand { display: none; }
td .row select { padding-right: 32px; background-position: right 11px center; }

.pill.note { color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.note { color: var(--leaf); } }

/* Delivery choice under a questionnaire that may go by link (Assign page) */
fieldset.delivery { border: 0; margin: 8px 0 0 30px; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
fieldset.delivery .choice label { min-height: 0; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); font-weight: 600; align-items: flex-start; }
fieldset.delivery .choice label::before { margin-top: 2px; }
fieldset.delivery .choice input:checked + label { border-color: var(--forest); background: var(--tint); }
fieldset.delivery .sub { display: block; margin-top: 3px; font-weight: 450; font-size: var(--fs-small); color: var(--muted); }
fieldset.pick .choice:has(> input[type=checkbox]:not(:checked)) > fieldset.delivery { opacity: 0.55; }

/* Follow-up questions: when an answer opens them, they arrive gently and are marked for a moment */
/* The opening and closing themselves are animated by app.js (height and fade), so the page below moves smoothly. */
fieldset.q.just-shown > legend { animation: mark 1600ms ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes mark { 0%, 40% { background: var(--gold-soft); box-shadow: 0 0 0 6px var(--gold-soft); border-radius: 6px; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

/* One-time codes (PIN, 2FA): six boxes drawn over one real input, so typing, pasting and code autofill still work */
.otp { position: relative; display: inline-block; max-width: 100%; }
.otp.ready > input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; max-width: none; padding: 0; border: 0; opacity: 0; cursor: text; font-size: 16px; }
.otp-cells { display: flex; gap: clamp(6px, 2vw, 10px); }
.otp-cells span { width: clamp(40px, 11.5vw, 54px); height: clamp(52px, 14vw, 64px); display: grid; place-items: center; border: 1.5px solid var(--control); border-radius: 14px; background: var(--card); color: var(--ink); font: 750 1.625rem/1 var(--font); font-variant-numeric: tabular-nums; transition: border-color 120ms ease, box-shadow 120ms ease; }
.otp-cells span.filled { border-color: var(--forest-2); }
.otp-cells span.active { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.otp-cells span.active:empty::after { content: ""; width: 2px; height: 1.6rem; background: var(--focus); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.otp.invalid .otp-cells span { border-color: var(--critical); }

/* Confirmation dialog: icon tile, title, a calmer explanation, the account it concerns, then two equal buttons */
dialog.confirm {
  width: min(400px, calc(100vw - 32px)); padding: 28px 28px 24px; border: 0; border-radius: 26px;
  background: var(--card); color: var(--ink); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 30px 70px -10px rgba(31, 46, 33, 0.35), 0 8px 20px -8px rgba(31, 46, 33, 0.25);
  opacity: 0; transform: translateY(8px) scale(0.97); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
dialog.confirm.open { opacity: 1; transform: none; }
dialog.confirm::backdrop { background: rgba(23, 35, 27, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* A soft green wash behind the icon, the banner's circles in miniature */
dialog.confirm::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 120px; pointer-events: none;
  background: radial-gradient(circle at calc(100% + 10px) -30px, var(--tint) 0 95px, transparent 96px),
              radial-gradient(circle at calc(100% - 70px) -20px, color-mix(in srgb, var(--gold) 35%, transparent) 0 26px, transparent 27px);
}
dialog.confirm.danger::before { background: radial-gradient(circle at calc(100% + 10px) -30px, var(--critical-bg) 0 95px, transparent 96px); }
dialog.confirm > * { position: relative; }
.confirm-icon { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; margin-bottom: 18px; background: var(--tint); color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .confirm-icon { color: var(--leaf); } }
.confirm-icon .ico { width: 24px; height: 24px; }
dialog.confirm.danger .confirm-icon { background: var(--critical-bg); color: var(--critical); }
dialog.confirm h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 750; letter-spacing: -0.015em; }
dialog.confirm p { margin: 8px 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.confirm-who { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 16px; background: var(--ground); }
.confirm-who .av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--forest-deep); font-weight: 800; font-size: 0.8125rem; }
.confirm-who strong { display: block; font-size: 0.9375rem; }
.confirm-who small { display: block; color: var(--faint); font-size: 0.8125rem; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.confirm-actions button { min-width: 0; min-height: 46px; height: auto; padding: 8px 12px; border-radius: 14px; font-size: 0.9375rem; line-height: 1.25; white-space: normal; }
@media (prefers-reduced-motion: reduce) { dialog.confirm { transform: none; } }

/* Dashboard filter swap: the table dims while it loads, then its rows ease in one after another */
[data-board] { transition: opacity 160ms ease; scroll-margin-top: 16px; }
[data-board].loading { opacity: 0.55; }
/* backwards, not both: once a row has arrived it keeps no transform, which would make it a layer of its own and draw it
   over the open menu of the row above */
[data-board].swap-in tbody tr { animation: row-in 280ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chips .chip { transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Client pages: the logo, then what this page is ("Secure questionnaire") after a hairline */
.brand-ctx { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--control); color: var(--muted); font-size: var(--fs-small); font-weight: 600; line-height: 1.25; }
.bar .logo { height: 32px; }

/* Client welcome (before the PIN): the owl greets, three reassurances, one way on */
.welcome-head { padding-top: 30px; }
.welcome-owl { display: block; width: 64px; height: 64px; margin-bottom: 16px; }
.welcome-owl .lg-bubble, .welcome-owl .lg-eye { fill: var(--leaf); stroke: var(--leaf); }
.welcome-owl .lg-face { fill: #f7efdc; }
.welcome-owl .lg-eye { fill: var(--forest); stroke: none; }
.welcome-owl .lg-beak { fill: var(--gold); stroke: var(--gold); }
.welcome-points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 18px; }
.welcome-points li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.welcome-points .wp-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--forest); display: grid; place-items: center; }
.welcome-points .wp-ico .ico { width: 21px; height: 21px; }
.welcome-points strong { display: block; font-size: 1rem; margin: 2px 0 2px; }
.welcome-points p { margin: 0; color: var(--muted); }
.welcome-go { display: grid; gap: 10px; justify-items: start; padding-top: 22px; border-top: 1px solid var(--rule); }
.welcome-go p { margin: 0; }
.button.big { height: 50px; padding: 0 28px; font-size: 1rem; border-radius: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .welcome-points .wp-ico { color: var(--leaf); } }
@media (max-width: 560px) { .welcome-go .button.big { width: 100%; } .welcome-go { justify-items: stretch; } }
/* Narrow client cards (welcome, PIN): the page says what it is, so the bar keeps just the logo and languages on one line */
.public:has(.sheet.narrow) .brand-ctx { display: none; }
.bar-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Language toggle on phones: a small "EN | ΕΛ" switch instead of two big words */
.langs .lang-short { display: none; }
@media (max-width: 560px) {
  .langs { padding: 3px; border-radius: 11px; gap: 2px; }
  .langs .lang-long { display: none; }
  .langs .lang-short { display: inline; }
  .langs button, body.client-page .langs button { height: 32px; min-width: 40px; padding: 0 9px; font-size: 0.75rem; letter-spacing: 0.04em; border-radius: 8px; }
  .lp-bar .logo, .bar .logo { height: 30px; }
}

/* ------------------------------------------------- motion
   One authored entrance per page that people see rarely (landing, client welcome, done); nothing on screens
   professionals use all day. Entrances start fast (strong ease-out), stay under ~0.7 s and never block input.
   "Reduce motion" turns all of it off (see the rule near the top), and every element is visible without it. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes peek { from { opacity: 0; transform: translateY(46px) rotate(0deg); } to { opacity: 1; transform: rotate(5deg); } }
@keyframes dot-in { from { transform: translateX(-74px); } to { transform: none; } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }
@keyframes draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {

  /* landing sections, as they scroll in; list items follow their container by a beat */
  .reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease-out, transform 700ms var(--ease-out); }
  .reveal-ready [data-reveal].in { opacity: 1; transform: none; }
  .reveal-ready [data-reveal].in > li { opacity: 1; transform: none; }
  .reveal-ready [data-reveal].in > li:nth-child(2) { transition-delay: 70ms; }
  .reveal-ready [data-reveal].in > li:nth-child(3) { transition-delay: 140ms; }
  .reveal-ready [data-reveal].in > li:nth-child(4) { transition-delay: 210ms; }

  /* the owl blinks now and then (landing, welcome) */
  .welcome-owl .lg-eye { transform-box: fill-box; transform-origin: center; animation: blink 6s 1.6s infinite; }

  /* client welcome: banner, then the three reassurances, then the way on */
  .welcome-head > div > * { animation: rise 600ms var(--ease-out) both; }
  .welcome-head > div > :nth-child(2) { animation-delay: 60ms; }
  .welcome-head > div > :nth-child(3) { animation-delay: 120ms; }
  .welcome-points li { animation: rise 560ms var(--ease-out) both; }
  .welcome-points li:nth-child(1) { animation-delay: 200ms; }
  .welcome-points li:nth-child(2) { animation-delay: 270ms; }
  .welcome-points li:nth-child(3) { animation-delay: 340ms; }
  .welcome-go { animation: rise 560ms var(--ease-out) 420ms both; }

  /* client questionnaire steps: each new page of questions settles in, so moving on feels like moving on */
  body.client-page fieldset.q { animation: rise 420ms var(--ease-out) both; }
  body.client-page fieldset.q:nth-of-type(2) { animation-delay: 40ms; }
  body.client-page fieldset.q:nth-of-type(3) { animation-delay: 80ms; }
  body.client-page fieldset.q:nth-of-type(4) { animation-delay: 120ms; }
  body.client-page fieldset.q:nth-of-type(n+5) { animation-delay: 160ms; }
  /* a follow-up opened by an answer keeps its own, quicker reveal */
  body.client-page fieldset.q.just-shown { animation: none; }
  /* Once the page has settled (app.js), the entrance never plays again: without this, a follow-up faded out and rose
     a second time when its highlight ended, and every question shown again after being hidden rose from nothing. */
  body.client-page form.settled fieldset.q:not(.just-shown) { animation: none; }

  /* done: a calm tick is drawn (only shown when there is no support message) */
  .done-tick { animation: pop 420ms var(--ease-out) both; }
  .done-tick path { animation: draw 520ms var(--ease-out) 220ms both; }
}
.done-tick { display: block; width: 64px; height: 64px; margin-bottom: 16px; }
.done-tick circle { fill: var(--tint); }
.done-tick path { fill: none; stroke: var(--forest); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .done-tick path { stroke: var(--leaf); } }
@media print { .reveal-ready [data-reveal], .reveal-ready [data-reveal] > li { opacity: 1 !important; transform: none !important; } }
/* Wide tables scroll inside their card instead of widening the page (which made phones zoom out) */
.main-col, .main-col > *, .sheet, .content, .box, [data-board] { min-width: 0; }

/* Join (invitation sign-up) and owner pages */
.join-steps { list-style: none; counter-reset: js; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 24px; padding: 0; font-size: var(--fs-small); color: var(--faint); font-weight: 600; }
.join-steps li { counter-increment: js; display: flex; align-items: center; gap: 8px; }
.join-steps li::before { content: counter(js); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-btn); color: var(--muted); font-size: 0.75rem; }
.join-steps li[aria-current="step"] { color: var(--ink); }
.join-steps li[aria-current="step"]::before { background: var(--forest); color: #fff; }
.legal { padding: 20px; border-radius: var(--r-card); background: var(--raised); display: grid; gap: 10px; }
.legal h2 { margin: 0; font-size: var(--fs-section); }
.legal-doc { background: var(--card); border-radius: 12px; padding: 12px 16px; }
.legal-doc summary { cursor: pointer; font-weight: 650; }
.legal-doc p { margin: 10px 0 2px; max-height: 320px; overflow: auto; color: var(--muted); font-size: var(--fs-small); line-height: 1.6; }
.badge.inv-sent { color: var(--forest); background: var(--tint); }
.badge.inv-joined { color: var(--neutral-ink); background: var(--neutral-bg); }
.badge.inv-expired, .badge.inv-revoked { color: var(--plum-ink); background: var(--plum-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.inv-sent { color: var(--leaf); } }
input[readonly] { background: var(--raised); color: var(--muted); border-style: dashed; cursor: default; }
/* Row menu (owner page): a small disclosure with the less common actions */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); min-width: 230px; padding: 8px; border-radius: 14px; background: var(--card);
  box-shadow: 0 0 0 1px var(--border), 0 16px 34px -14px rgba(18, 19, 18, 0.3); display: grid; gap: 2px; text-align: left;
  transform-origin: top right; }
@media (prefers-reduced-motion: no-preference) { .row-menu[open] .row-menu-panel { animation: menu-in 160ms var(--ease-out); } }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.row-menu-panel form { margin: 0; }
.row-menu-panel button.link { width: 100%; justify-content: flex-start; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .row-menu-panel button.link:hover { background: var(--raised); } }
.row-menu-panel button.danger-link { color: var(--critical); }
.table-wrap:has(.row-menu[open]) { overflow: visible; }
.activity { list-style: none; margin: 0 0 32px; padding: 0; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--border); }
.activity li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 11px 16px; border-top: 1px solid var(--rule); font-size: 0.875rem; }
.activity li:first-child { border-top: 0; }
.activity time { color: var(--faint); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .activity li { grid-template-columns: 1fr; gap: 2px; } }
.danger-zone { border: 1px solid color-mix(in srgb, var(--critical) 25%, transparent); border-radius: var(--r-card); padding: 22px; }
.plain-list { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 4px; }
.closing-banner a { font-weight: 650; }
.danger-zone form { margin-top: 10px; }
.row-menu-link { display: block; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-weight: 600; text-decoration: none; font-size: 0.875rem; }
@media (hover: hover) and (pointer: fine) { .row-menu-link:hover { background: var(--raised); } }
/* Operator: a practice's assessments */
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cat-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 20px; align-items: start; padding: 20px 22px; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--card); }
.cat-item.has { border-color: color-mix(in srgb, var(--forest) 30%, var(--border)); }
.cat-item h2 { margin: 0 0 4px; font-size: var(--fs-section); }
.cat-item p { margin: 6px 0 0; }
.cat-actions { display: grid; gap: 8px; justify-items: stretch; }
.cat-actions .button, .cat-actions button { width: 100%; }
@media (max-width: 700px) { .cat-item { grid-template-columns: 1fr; } }
td code, td .code { white-space: nowrap; }
/* Legal texts */
.legal-body { max-width: 68ch; }
.legal-body h2 { font-size: var(--fs-section); margin: 26px 0 8px; }
.legal-body p, .legal-body li { line-height: 1.65; color: var(--ink); }
.legal-body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-body .draft-note { padding: 12px 16px; border-radius: 12px; background: var(--warning-soft); color: var(--warning-ink); font-size: var(--fs-small); font-weight: 600; }
.legal-doc .legal-body { max-height: 340px; overflow: auto; margin-top: 10px; padding-right: 8px; font-size: var(--fs-small); }
.legal-doc .legal-body h2 { font-size: 0.9375rem; margin-top: 18px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.legal-links a { color: var(--muted); text-underline-offset: 3px; }
.legal-account-links { display: grid; gap: 4px; justify-items: start; }
.crumb-plain { margin: 0 0 6px; font-size: var(--fs-small); }

/* =================================================================== landing: "a walk with the owl"
   The Askwell owl (the logo is an owl in a speech bubble) guides a first-time visitor down a winding trail.
   Each stop shows one part of the app coming to life. Every scene's resting state is its finished state;
   the "before" states exist only under .walk-ready (set by app.js when motion is allowed). */
.public:has(.sheet.landing) { padding: 0 20px 28px; }
.public:has(.sheet.landing) .bar, .public:has(.sheet.landing) footer.site { max-width: 1180px; }
.public .sheet.landing { max-width: 1180px; background: none; border-radius: 0; overflow: visible; }
.public .sheet.landing > .content { padding: 0; }
.public:has(.sheet.landing) footer.site { padding-top: 28px; }
.lp-bar { padding: 22px 0; }
.lp-bar .logo { height: 40px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* The owl, wherever it appears: forest bubble on light grounds, leaf on dark ones (so it never melts into its background) */
.owl .lg-bubble { fill: var(--forest); stroke: var(--forest); }
.owl .lg-face { fill: #f7efdc; }
.owl .lg-eye { fill: var(--forest-deep); }
.owl .lg-beak { fill: var(--gold); stroke: var(--gold); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .owl .lg-bubble { fill: var(--leaf); stroke: var(--leaf); }
  :root:not([data-theme="light"]) .owl .lg-eye { fill: #17231b; }
}

/* ---- hero */
.walk-hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 36px; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px; align-items: center;
  padding: 72px 64px 80px; min-height: min(640px, 78vh);
  background:
    radial-gradient(circle at 96% -6%, color-mix(in srgb, var(--gold) 72%, #fff3d6) 0 76px, transparent 77px),
    radial-gradient(circle at 104% 112%, var(--forest-deep) 0 200px, transparent 201px),
    radial-gradient(circle at 76% 56%, var(--forest-2) 0 300px, transparent 301px),
    var(--forest);
}
.walk-hero h1 { color: #fff; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
:root:lang(el) .walk-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); }
.lp-lede { margin: 22px 0 0; color: var(--forest-muted); font-size: 1.1875rem; line-height: 1.55; max-width: 32em; }
.walk-hero .lp-primary { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }
.walk-hero .lp-ghost { background: rgba(6, 20, 10, 0.3); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .walk-hero .lp-primary:hover { background: color-mix(in srgb, var(--gold) 88%, #fff); }
  .walk-hero .lp-ghost:hover { background: rgba(6, 20, 10, 0.44); }
}
.hero-guide { position: relative; justify-self: center; width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; }
.guide-big { width: 62%; }
.owl-hero { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(6, 20, 10, 0.35)); }
.owl-hero .lg-bubble { fill: var(--leaf); stroke: var(--leaf); }
.hero-bubble { position: absolute; top: 2%; left: -8%; max-width: 15em; margin: 0; padding: 12px 16px; border-radius: 18px 18px 18px 4px;
  background: var(--card); color: var(--ink); font-weight: 650; font-size: 0.9375rem; line-height: 1.35; box-shadow: 0 16px 30px -14px rgba(6, 20, 10, 0.5); }
.float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 650;
  background: rgba(6, 20, 10, 0.34); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); white-space: nowrap; }
.float .ico { width: 16px; height: 16px; }
.float b { font-size: 1rem; color: var(--gold); }
.f1 { left: -4%; bottom: 22%; } .f2 { right: -2%; top: 34%; } .f3 { right: 8%; bottom: 4%; }

/* ---- the walk */
.walk { position: relative; padding: 96px 0 40px; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.trail path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-faint { stroke: var(--control); stroke-width: 3; stroke-dasharray: 1 12; opacity: 0.9; }
.trail-line { stroke: var(--forest-2); stroke-width: 4; }
.trail-clip, .trail-shift { position: absolute; inset: 0; pointer-events: none; }
.trail-clip { z-index: 0; overflow: hidden; }
.walk-ready .trail-clip, .walk-ready .trail-shift { will-change: transform; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .trail-line { stroke: var(--leaf); } }
.walker { position: absolute; left: 0; top: 0; width: 56px; height: 56px; z-index: 3; display: none; will-change: transform; }
.walk-ready .walker { display: block; }
.owl-walker { width: 100%; height: 100%; filter: drop-shadow(0 10px 12px rgba(18, 19, 18, 0.25)); }

.scene { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr); align-items: center; gap: 28px;
  min-height: 72vh; padding: 48px 0; }
.scene > .scene-text { grid-column: 1; }
.scene > .stop { grid-column: 2; }
.scene > .scene-art { grid-column: 3; }
.scene.flip > .scene-text { grid-column: 3; grid-row: 1; }
.scene.flip > .scene-art { grid-column: 1; grid-row: 1; }
.scene.flip > .stop { grid-row: 1; }
.scene-text h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.06; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; }
.scene-text p { margin: 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; max-width: 30em; }
.scene-art { display: grid; gap: 14px; justify-items: center; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.pills li { padding: 7px 14px; border-radius: 999px; background: var(--tint); color: var(--forest); font-weight: 650; font-size: 0.8125rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pills li { color: var(--leaf); } }

/* the stop: a numbered marker on the trail, and what the owl says there */
.stop { position: relative; display: grid; justify-items: center; align-self: center; }
.stop-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  background: var(--card); color: var(--muted); box-shadow: 0 0 0 2px var(--control), 0 8px 18px -10px rgba(18, 19, 18, 0.4);
  transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease, transform 420ms var(--ease-out); }
.scene.in .stop-dot { background: var(--forest); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--forest) 18%, transparent), 0 10px 20px -10px rgba(18, 19, 18, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scene.in .stop-dot { background: var(--leaf); color: #17231b; box-shadow: 0 0 0 6px color-mix(in srgb, var(--leaf) 22%, transparent); } }
.end-dot { width: 72px; height: 72px; padding: 6px; }
.end-dot .owl { width: 100%; height: 100%; }
.say { position: absolute; top: calc(100% + 12px); width: max-content; max-width: 168px; margin: 0; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--card); box-shadow: 0 12px 26px -14px rgba(18, 19, 18, 0.45), 0 0 0 1px var(--border);
  font-size: 0.8125rem; font-weight: 650; line-height: 1.3; color: var(--ink); }
.say-owl { width: 26px; height: 26px; flex: none; }

/* ---- the pictures (each one is a real piece of Askwell, simplified) */
.v-card { width: min(100%, 400px); background: var(--card); border-radius: 22px; padding: 20px 22px; box-shadow: 0 30px 60px -30px rgba(18, 19, 18, 0.35), 0 0 0 1px var(--border); }
.v-label { margin: 0 0 8px; font-size: 0.75rem; font-weight: 700; color: var(--faint); letter-spacing: 0.02em; }
.v-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.v-pick li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 650; }
.v-pick li i { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--control); display: grid; place-items: center; flex: none; transition: background-color 200ms ease, box-shadow 200ms ease; }
.v-pick li.tick { background: var(--tint); }
.v-pick li.tick i { background: var(--forest); box-shadow: none; }
.v-pick li.tick i::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.v-ticket { width: min(100%, 340px); margin-top: -6px; transform: rotate(-2deg); }
.v-link { margin: 0 0 14px; font-family: var(--mono); font-size: 0.875rem; padding: 10px 12px; border-radius: 10px; background: var(--raised); }
.v-pin { display: flex; gap: 6px; margin: 0; }
.v-pin i { font-style: normal; width: 36px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 1.125rem;
  background: var(--tint); color: var(--forest-deep); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v-pin i { color: var(--leaf); }
  :root:not([data-theme="light"]) .v-pick li.tick i { background: var(--leaf); }
  :root:not([data-theme="light"]) .v-pick li.tick i::after { border-color: #17231b; }
}

.v-phone { width: 270px; padding: 26px 18px 22px; border-radius: 38px; background: var(--card);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--ink) 88%, transparent), 0 40px 60px -30px rgba(18, 19, 18, 0.55); display: grid; gap: 14px; }
.v-progress { height: 6px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.v-progress i { display: block; height: 100%; width: 58%; border-radius: inherit; background: var(--forest-2); transition: width 900ms var(--ease-out) 200ms; }
.v-q { margin: 0; font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.v-q.small { font-size: 0.9375rem; }
.v-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-choices.three { grid-template-columns: repeat(3, 1fr); }
.v-choices span { padding: 11px 6px; border-radius: 12px; text-align: center; font-weight: 650; font-size: 0.875rem; box-shadow: inset 0 0 0 1.5px var(--control);
  transition: background-color 250ms ease, box-shadow 250ms ease, color 250ms ease; }
.v-choices.three span { font-size: 0.75rem; padding: 10px 4px; }
.v-choices .yes, .v-choices .pick { background: var(--tint); box-shadow: inset 0 0 0 2px var(--forest-2); color: var(--forest-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-choices .yes, :root:not([data-theme="light"]) .v-choices .pick { color: var(--leaf); } }
.v-follow { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 520ms var(--ease-out) 700ms, opacity 400ms ease 750ms; }
.v-follow-in { min-height: 0; overflow: hidden; display: grid; gap: 10px; }
.v-saved { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--faint); transition: opacity 300ms ease 1500ms; }
.v-saved .ico { width: 14px; height: 14px; }

.v-number { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.v-number b { font-size: 4.5rem; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.v-number span { color: var(--faint); font-weight: 650; }
.v-bands { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 20px 0 6px; }
.v-bands i { height: 12px; border-radius: 4px; }
.v-bands .low { background: var(--band-low); } .v-bands .mid { background: var(--band-mid); } .v-bands .high { background: var(--band-high); }
.v-dot { position: absolute; top: 50%; left: 52%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--card);
  transition: left 1100ms var(--ease-out) 300ms; }
.v-bandnames { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; font-size: 0.75rem; color: var(--faint); font-weight: 650; text-align: center; }
.v-flag { margin: 18px 0 0; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--critical-soft);
  color: var(--critical-ink); font-weight: 650; font-size: 0.875rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--critical) 18%, transparent);
  transition: opacity 400ms ease 1300ms, transform 500ms var(--ease-out) 1300ms; }
.v-flag .ico { width: 18px; height: 18px; color: var(--critical); flex: none; }

.v-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 12px; }
.v-head span { font-size: 0.8125rem; font-weight: 700; color: var(--critical); }
.v-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; font-size: 0.9375rem; color: var(--muted); margin-top: 6px;
  background: var(--raised); transition: opacity 400ms ease, transform 500ms var(--ease-out); }
.v-row b { color: var(--ink); font-family: var(--mono); font-size: 0.8125rem; margin-right: 6px; }
.v-row .ico { width: 20px; height: 20px; flex: none; color: var(--forest-2); }
.v-row.risk { background: var(--critical-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--critical) 14%, transparent); }
.v-row.risk .ico { color: var(--critical); }
.v-row.r2 { transition-delay: 120ms; } .v-row.r3 { transition-delay: 240ms; }

.v-graph { width: 100%; height: auto; display: block; }
.v-graph .axis { stroke: var(--rule); stroke-width: 2; }
.v-graph .line { fill: none; stroke: var(--forest-2); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1400ms var(--ease-out) 200ms; }
.v-graph .pts circle { fill: var(--card); stroke: var(--forest-2); stroke-width: 3; transition: opacity 300ms ease, transform 400ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
.v-graph .pts circle.last { fill: var(--gold); stroke: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-graph .line, :root:not([data-theme="light"]) .v-graph .pts circle { stroke: var(--leaf); } }
.v-note { margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }
.v-note b { color: var(--forest-2); font-size: 1.25rem; margin-right: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-note b { color: var(--leaf); } }

.v-safe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(100%, 460px); }
.v-safe li { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--border);
  font-weight: 650; font-size: 0.9375rem; line-height: 1.3; transition: opacity 400ms ease, transform 500ms var(--ease-out); }
.v-safe .ico { width: 22px; height: 22px; flex: none; padding: 9px; box-sizing: content-box; border-radius: 12px; background: var(--tint); color: var(--forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-safe .ico { color: var(--leaf); } }
.v-safe li:nth-child(2) { transition-delay: 80ms; } .v-safe li:nth-child(3) { transition-delay: 160ms; }
.v-safe li:nth-child(4) { transition-delay: 240ms; } .v-safe li:nth-child(5) { transition-delay: 320ms; } .v-safe li:nth-child(6) { transition-delay: 400ms; }

.scene.end { min-height: 56vh; grid-template-columns: 168px minmax(0, 1fr); }
.scene.end > .stop { grid-column: 1; }
.scene.end > .scene-text { grid-column: 2; }
.scene.end h2 { font-size: clamp(2rem, 4vw, 3.25rem); }

/* the client note at the bottom */
.lp-client { margin: 40px 0 0; display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: center; background: var(--tint); border-radius: 28px; padding: 26px 30px; }
.client-owl { width: 64px; height: 64px; }
.lp-client h2 { margin: 0 0 6px; font-size: 1.1875rem; }
.lp-client p { margin: 0; color: var(--muted); max-width: 52em; }

/* ---- before states, only when the walk is animated */
.walk-ready .scene .scene-text { transition: opacity 600ms ease, transform 700ms var(--ease-out); }
.walk-ready .scene:not(.in) .scene-text { opacity: 0; transform: translateY(22px); }
.walk-ready .scene .say { transition: opacity 400ms ease 350ms, transform 500ms var(--ease-out) 350ms; }
.walk-ready .scene:not(.in) .say { opacity: 0; transform: translateY(-6px) scale(0.96); }
.walk-ready .scene-art > * { transition: opacity 600ms ease, transform 800ms var(--ease-out); }
.walk-ready .scene:not(.in) .scene-art > * { opacity: 0; transform: translateY(30px); }
.walk-ready .scene:not(.in) .v-ticket { transform: translateY(40px) rotate(0deg); }
.walk-ready .v-ticket { transition-delay: 650ms; }
.walk-ready .scene:not(.in) .v-pick li.tick { background: transparent; }
.walk-ready .scene:not(.in) .v-pick li.tick i { background: transparent; box-shadow: inset 0 0 0 2px var(--control); }
.walk-ready .scene:not(.in) .v-pick li.tick i::after { opacity: 0; }
.walk-ready .v-pick li { transition: background-color 250ms ease; }
.walk-ready .v-pick li.t1, .walk-ready .v-pick li.t1 i { transition-delay: 300ms; }
.walk-ready .v-pick li.t2, .walk-ready .v-pick li.t2 i { transition-delay: 520ms; }
.walk-ready .v-pin i { transition: opacity 250ms ease, transform 350ms var(--ease-out); }
.walk-ready .scene:not(.in) .v-pin i { opacity: 0; transform: translateY(8px); }
.walk-ready .v-pin i:nth-child(1) { transition-delay: 900ms; } .walk-ready .v-pin i:nth-child(2) { transition-delay: 960ms; }
.walk-ready .v-pin i:nth-child(3) { transition-delay: 1020ms; } .walk-ready .v-pin i:nth-child(4) { transition-delay: 1080ms; }
.walk-ready .v-pin i:nth-child(5) { transition-delay: 1140ms; } .walk-ready .v-pin i:nth-child(6) { transition-delay: 1200ms; }
.walk-ready .scene:not(.in) .v-progress i { width: 30%; }
.walk-ready .v-choices .yes { transition-delay: 450ms; }
.walk-ready .v-choices .pick { transition-delay: 1250ms; }
.walk-ready .scene:not(.in) .v-choices .yes, .walk-ready .scene:not(.in) .v-choices .pick { background: transparent; box-shadow: inset 0 0 0 1.5px var(--control); color: var(--ink); }
.walk-ready .scene:not(.in) .v-follow { grid-template-rows: 0fr; opacity: 0; }
.walk-ready .scene:not(.in) .v-saved { opacity: 0; }
.walk-ready .scene:not(.in) .v-dot { left: 4%; }
.walk-ready .scene:not(.in) .v-flag { opacity: 0; transform: translateY(8px) scale(0.97); }
.walk-ready .scene:not(.in) .v-row { opacity: 0; transform: translateX(24px); }
.walk-ready .scene:not(.in) .v-graph .line { stroke-dashoffset: 1; }
.walk-ready .scene:not(.in) .v-graph .pts circle { opacity: 0; transform: scale(0.4); }
.walk-ready .v-graph .pts circle:nth-child(1) { transition-delay: 300ms; } .walk-ready .v-graph .pts circle:nth-child(2) { transition-delay: 520ms; }
.walk-ready .v-graph .pts circle:nth-child(3) { transition-delay: 740ms; } .walk-ready .v-graph .pts circle:nth-child(4) { transition-delay: 960ms; }
.walk-ready .v-graph .pts circle:nth-child(5) { transition-delay: 1180ms; } .walk-ready .v-graph .pts circle:nth-child(6) { transition-delay: 1400ms; }
.walk-ready .scene:not(.in) .v-safe li { opacity: 0; transform: translateY(14px); }
.walk-ready .scene:not(.in) .v-note { opacity: 0; }
.walk-ready .v-note { transition: opacity 400ms ease 1500ms; }

@media (prefers-reduced-motion: no-preference) {
  .float { animation: drift 7s ease-in-out infinite; }
  .f2 { animation-delay: -2.3s; } .f3 { animation-delay: -4.6s; }
  .owl-walker { animation: bob 1.1s ease-in-out infinite; }
  .walk-hero .hero-text > * { animation: rise 680ms var(--ease-out) both; }
  .walk-hero .hero-text > :nth-child(2) { animation-delay: 80ms; }
  .walk-hero .hero-text > :nth-child(3) { animation-delay: 160ms; }
  .guide-big { animation: pop 700ms var(--ease-out) 200ms both; }
  .hero-bubble { animation: rise 600ms var(--ease-out) 650ms both; }
}
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* ---- smaller screens: the trail runs down the left edge, text and picture stack */
@media (max-width: 1100px) {
  .scene { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 20px; }
  .say { max-width: 120px; }
}
@media (max-width: 900px) {
  .walk-hero { grid-template-columns: minmax(0, 1fr); padding: 44px 26px 36px; border-radius: 28px; min-height: 0; }
  .hero-guide { width: min(100%, 300px); }
  .scene, .scene.flip, .scene.end { grid-template-columns: 52px minmax(0, 1fr); gap: 8px 16px; min-height: 0; padding: 40px 0 56px; align-items: start; }
  .scene > .stop, .scene.flip > .stop, .scene.end > .stop { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .scene > .scene-text, .scene.flip > .scene-text, .scene.end > .scene-text { grid-column: 2; grid-row: 1; }
  .scene > .scene-art, .scene.flip > .scene-art { grid-column: 2; grid-row: 2; justify-items: start; margin-top: 18px; }
  .say { display: none; }   /* on small screens the owl's lines would crowd the text; the guide still walks alongside */
  .stop-dot { width: 40px; height: 40px; }
  .end-dot { width: 52px; height: 52px; }
  .walk { padding-top: 56px; }
  .v-safe { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lp-bar { flex-wrap: nowrap; }
  .lp-bar .bar-end > .button { display: none; }   /* the hero carries the login button */
  .walk-hero .lp-cta .button { flex: 1 1 100%; }
  .hero-bubble { left: 0; top: -2%; font-size: 0.8125rem; }
  .f1 { left: -2%; } .f2 { right: -4%; }
  .lp-client { grid-template-columns: 1fr; padding: 24px; }
  .v-phone { width: 100%; max-width: 280px; }
}

/* Language switch: a quiet "EN | ΕΛ" in the corner, not a control that competes with the page.
   The current language is in ink with a thin green underline; the other is muted until hovered. */
.langs, .setting .langs, .content .langs { display: inline-flex; align-items: center; gap: 2px; padding: 0; border-radius: 0; background: none; }
.langs .lang-long { display: none; }
.langs .lang-short { display: inline; }
.langs button, body.client-page .langs button {
  position: relative; height: 32px; min-width: 0; padding: 0 9px; border: 0; border-radius: 8px; background: none;
  color: var(--faint); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.06em;
  transition: color 150ms ease;
}
.langs button + button::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 1px; background: var(--control); }
.langs button[aria-pressed="true"] { background: none; color: var(--ink); text-decoration: underline; text-decoration-color: var(--forest-2);
  text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .langs button[aria-pressed="true"] { text-decoration-color: var(--leaf); } }
@media (hover: hover) and (pointer: fine) { .langs button:hover, .setting .langs button:hover { background: none; color: var(--ink); } }
.langs button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* -------------------------------------------------------- account page */
.account .content { display: grid; gap: 16px; }
.account .box { margin: 0; }
.acct-head { align-items: center; }
.page-head > .acct-id { display: flex; align-items: center; gap: 22px; min-width: 0; max-width: none; }
.acct-av {
  width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--gold); color: var(--forest-deep); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.02em;
  box-shadow: 0 0 0 6px rgba(6, 20, 10, 0.22);
}
.acct-head .lede { margin-top: 4px; }
.acct-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.acct-tags li { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(6, 20, 10, 0.28); color: #fff; font-size: var(--fs-small); font-weight: 650; }
.acct-tags li.on { color: var(--leaf); }
.acct-tags .ico { width: 15px; height: 15px; }

.acct-box { padding: 26px 28px; }
.acct-box-head { margin-bottom: 20px; }
.acct-box-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.125rem; }
.acct-box-head h2 .ico { color: var(--forest-2); }
.acct-box-head p { margin: 4px 0 0 30px; color: var(--muted); }
.acct-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 32px; align-items: center; padding: 18px 0; border-top: 1px solid var(--rule); }
.acct-box-head + .acct-row { border-top: 0; padding-top: 0; }
.acct-row:last-child { padding-bottom: 0; }
.acct-row.stacked { grid-template-columns: minmax(0, 1fr); }
.acct-row h3 { margin: 0 0 3px; font-size: var(--fs-body); }
.acct-row p { margin: 0; color: var(--muted); max-width: 52ch; }
.acct-row .ico { width: 17px; height: 17px; }
.acct-row p.codes-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; color: var(--ink); font-size: var(--fs-small); font-weight: 650; }
.acct-row p.codes-left.none { color: var(--warning-ink); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.dots i.on { background: var(--forest-2); }
.codes-left.none .dots i { background: color-mix(in srgb, var(--warning) 40%, transparent); }

/* Theme picker: three small drawings of the app. The drawings keep their own colours whatever theme is on. */
.theme-form { margin: 0 0 4px; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.theme-opt { position: relative; display: grid; gap: 2px; cursor: pointer; min-width: 0; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pic {
  position: relative; display: block; aspect-ratio: 2 / 1; margin-bottom: 10px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border); transition: box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .theme-opt:hover .theme-pic { box-shadow: 0 0 0 1px var(--control); } }
.theme-opt:active .theme-pic { transform: scale(0.98); }
.theme-opt:has(input:checked) .theme-pic { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--forest-2); }
.theme-opt:has(input:focus-visible) .theme-pic { outline: 2px solid var(--focus); outline-offset: 6px; }
.theme-tick { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--forest-2); box-shadow: 0 0 0 2px #fff; opacity: 0; transform: scale(0.8); transition: opacity 160ms ease, transform 200ms var(--ease-out); }
.theme-tick::after { content: ""; position: absolute; left: 8px; top: 4.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.theme-opt:has(input:checked) .theme-tick { opacity: 1; transform: none; }
.theme-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; }
.theme-name em { font-style: normal; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 2px 7px; border-radius: 999px; background: var(--raised); }
.theme-hint { color: var(--muted); font-size: var(--fs-small); }
/* Theme previews on the account page (own class: a plain .mini also matched the dashboard's small score charts,
   .cutoff.mini, and pinned them to the top-left corner of the page) */
.theme-mini { --g: #ebeae5; --c: #fff; --f: #24492d; --l: #dcdad3; --a: #e8ab3a; position: absolute; inset: 0; display: flex; gap: 10px; padding: 14px; background: var(--g); }
.theme-mini-dark { --g: #0f1010; --c: #1c1d1d; --f: #1f4428; --l: #343736; --a: #a8d48f; }
.theme-mini + .theme-mini { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.theme-mini i, .theme-mini b { display: block; }
.m-rail { width: 24%; display: flex; flex-direction: column; gap: 7px; padding: 12px 10px; border-radius: 6px; background: var(--c); }
.m-rail b { height: 5px; border-radius: 3px; background: var(--l); }
.m-rail b:last-child { width: 80%; }
.m-rail b:first-child { width: 70%; background: var(--f); }
.m-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-head { height: 36%; border-radius: 7px; background: radial-gradient(circle at 84% 0, var(--a) 0 14%, transparent 15%), var(--f); }
.m-card { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 7px; background: var(--c); }
.m-card b { height: 5px; border-radius: 3px; background: var(--l); width: 85%; }
.m-card b:first-child { width: 55%; }

.acct-grid { display: grid; gap: 16px; align-items: start; }
.acct-grid.two { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.link-list { display: grid; gap: 2px; margin: 0 -10px; }
.link-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--ink); font-weight: 650; text-decoration: none; transition: background-color 150ms ease; }
.link-list a > .ico:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--tint); color: var(--forest-2); }
.link-list a > .ico:last-child { width: 18px; height: 18px; color: var(--faint); transition: transform 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-list a:hover { background: var(--ground); }
  .link-list a:hover > .ico:last-child { transform: translateX(3px); color: var(--ink); }
  .doc-links a:hover { background: var(--soft-btn-hover); }
}
.acct-agree { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }
.acct-agree h3 { margin: 0 0 3px; }
.acct-agree p { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-small); }
.doc-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.doc-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--soft-btn); color: var(--ink); font-size: var(--fs-small); font-weight: 600; text-decoration: none; transition: background-color 150ms ease; }
.doc-links .ico { width: 15px; height: 15px; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .acct-box-head h2 .ico, :root:not([data-theme="light"]) .link-list a > .ico:first-child { color: var(--leaf); }
  :root:not([data-theme="light"]) .dots i.on { background: var(--leaf); }
  :root:not([data-theme="light"]) .theme-opt:has(input:checked) .theme-pic { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--leaf); }
  :root:not([data-theme="light"]) .theme-tick { background: var(--leaf); }
  :root:not([data-theme="light"]) .theme-tick::after { border-color: #10200f; }
}
@media (max-width: 1100px) { .acct-grid.two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .page-head > .acct-id { flex-direction: column; align-items: flex-start; gap: 14px; }
  .acct-tags { margin-top: 12px; }
  .theme-mini { padding: 9px; gap: 6px; }
  .m-rail { padding: 8px 6px; gap: 5px; }
  .m-card { padding: 7px; gap: 5px; }
  .m-main { gap: 5px; }
  .acct-av { width: 56px; height: 56px; font-size: 1.125rem; box-shadow: 0 0 0 4px rgba(6, 20, 10, 0.22); }
  .acct-box { padding: 20px 18px; }
  .acct-box-head p { margin-left: 0; }
  .themes { gap: 10px; }
  .theme-pic { border-radius: 10px; }
  .theme-hint { display: none; }
  .theme-name em { display: none; }
  .acct-row { grid-template-columns: minmax(0, 1fr); }
  .acct-row > .button, .acct-row > form { justify-self: start; }
}

/* -------------------------------------------------------- sign-in and two-step pages */
.sheet.auth .content { padding: 36px 36px 30px; }
.auth-head { margin-bottom: 24px; }
.auth-head h1 { font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.025em; }
.auth-head .lede { margin: 8px 0 0; color: var(--muted); }
.sheet.auth .notice { margin-bottom: 20px; }
.sheet.auth input[type=email], .sheet.auth input[type=password], .sheet.auth input[type=text] { height: 50px; padding: 0 14px; border-radius: 14px; font-size: 1rem; }
.sheet.auth .otp input[type=text] { height: 58px; }
.sheet.auth form.panel { gap: 18px; }
.sheet.auth form.panel > button[type=submit] { justify-self: stretch; height: 52px; margin-top: 6px; border-radius: 14px; font-size: 1rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 96px; }
.pw-toggle {
  position: absolute; right: 7px; top: 50%; translate: 0 -50%; height: 36px; padding: 0 12px;
  background: none; border: 0; border-radius: 10px; color: var(--muted); font-size: var(--fs-small); font-weight: 650;
}
.pw-toggle[aria-pressed="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pw-toggle:hover { background: var(--ground); color: var(--ink); } }
.auth-note { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--fs-small); max-width: none; }
@media (max-width: 700px) {
  .public:has(.sheet.auth) { padding: 3vh 16px 24px; }
  .public:has(.sheet.auth) .bar { padding: 14px 2px 18px; }
  .public:has(.sheet.auth) footer.site { padding: 18px 4px 0; }
  .sheet.auth { border-radius: 26px; }
  .sheet.auth .content { padding: 30px 22px 24px; }
  .auth-head h1 { font-size: 1.5rem; }
}

/* Switching theme on the account page cross-fades the whole page once. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: ease; }

/* ===================================================================== update: forms, client pages, phone */

/* Saving answers: quiet while it works, clear only when it really could not save */
.autosave-status { flex: 1 1 auto; min-height: 0; margin: 0; text-align: right; font-size: var(--fs-small); color: var(--faint); transition: opacity 400ms ease; }
.autosave-status:empty { display: none; }
.autosave-status[data-state="saved"]::before { content: "✓ "; color: var(--data); font-weight: 700; }
.autosave-status[data-state="faded"] { opacity: 0; }
.autosave-status[data-state="fail"] { color: var(--warning-ink); font-weight: 650; opacity: 1; }
.formnav > .autosave-status { order: 0; }
.formnav > .fwd { order: 1; }

/* Client pages on laptops and desktops: room to read and answer, not a phone column in the middle of the screen */
@media (min-width: 900px) {
  body.client-page .public:not(:has(.sheet.narrow)) .bar,
  body.client-page .public:not(:has(.sheet.narrow)) footer.site,
  body.client-page .public .sheet:not(.narrow) { max-width: 940px; }
  body.client-page .public .sheet:not(.narrow) .content { padding: 40px 56px 44px; }
  body.client-page .public .sheet:not(.narrow) .page-head { padding: 34px 56px 30px; }
  body.client-page .public .page-head h1 { font-size: 2rem; }
  body.client-page fieldset.q > legend { max-width: 62ch; }
  /* Up to four answers sit side by side; longer lists stay a column that is easy to scan */
  body.client-page .choices:not(.scale):not(.horizontal):not(:has(> .choice:nth-child(5))) { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  body.client-page .choices:not(.scale):not(.horizontal):has(> .choice:nth-child(5)) { max-width: 640px; }
  body.client-page .choices.horizontal { grid-template-columns: repeat(auto-fill, minmax(150px, 210px)); }
  /* The welcome card is wider than the PIN card: three points to read, one way on */
  .public:has(.sheet.welcome) .bar, .public:has(.sheet.welcome) footer.site, .public .sheet.narrow.welcome { max-width: 600px; }
}

/* The client's top bar: "Finish later" next to the language switch */
.bar:has(.finish-later) .bar-end { flex-wrap: nowrap; gap: 6px; margin-left: auto; }
.bar .finish-later { background: var(--card); box-shadow: inset 0 0 0 1px var(--border); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .bar .finish-later:hover { background: var(--soft-btn); } }

/* Welcome: the PIN note on the left, the way on at the right; one full-width button on phones */
.welcome-go { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.welcome-go p { flex: 1 1 14rem; }

/* A single action on a small public card (PIN): the full width, like the sign-in pages */
.public .sheet.narrow form.panel > button[type=submit] { justify-self: stretch; }

/* Optional fields say so after the label */
.optional { margin-left: 4px; font-weight: 500; color: var(--faint); font-size: var(--fs-small); }

/* One-time codes: pasting and a finished code */
/* Pasting a code: a quiet link under the boxes, on touch screens only (a keyboard pastes with Cmd/Ctrl+V anyway) */
.otp-paste { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: var(--fs-small); text-decoration: none; }
.otp-paste .ico { width: 16px; height: 16px; }
@media (pointer: fine) { .otp-paste { display: none; } }
.otp.complete .otp-cells span { border-color: var(--forest-2); background: var(--tint); }

/* Phones: actions are big, full-width targets with the main one first */
@media (max-width: 700px) {
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions > .button, .form-actions > button { width: 100%; height: 48px; }
  .form-actions > .saved-note { text-align: center; }
  .formnav { flex-wrap: wrap; }
  .formnav > .fwd, .formnav > button[type=submit]:not(.secondary):not(.link) { order: -1; flex: 1 1 100%; height: 50px; }
  .formnav > .back, .formnav > .secondary { flex: 1 1 auto; margin-right: 0; }
  .formnav > .link { flex: 1 1 100%; justify-content: center; margin: 4px 0 0; padding: 8px 0; }
  .formnav > .autosave-status { flex: 1 1 100%; order: 2; text-align: center; }
  /* The questionnaire: Back and Next stay at the bottom of the screen, where the thumb is */
  body.client-page .formnav.sticky {
    position: sticky; bottom: 0; z-index: 5; flex-wrap: wrap; gap: 8px;
    margin: 24px -18px -24px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 94%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--rule);
  }
  body.client-page .formnav.sticky > .fwd { order: 1; flex: 1 1 0; }
  body.client-page .formnav.sticky > .back { order: 0; flex: 0 0 auto; padding: 0 16px; }
  body.client-page .formnav.sticky > .back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.client-page .formnav.sticky > .back .ico { margin: 0; width: 22px; height: 22px; }
  body.client-page .formnav.sticky > .autosave-status { order: -1; flex: 1 1 100%; text-align: center; font-size: 0.75rem; }
  /* the top bar holds the logo, "Finish later" and the language switch; the assessment name gives way */
  body.client-page .bar:has(.finish-later) .brand-ctx { display: none; }
  body.client-page .bar { flex-wrap: nowrap; min-width: 0; }
  .welcome-go .button { flex: 1 1 100%; order: -1; }
}

/* Recovery codes: two tidy columns, numbered, tools under them, then one way on */
ol.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: code; }
ol.codes li { counter-increment: code; display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--border); font: 650 0.95rem/1.2 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
ol.codes li::before { content: counter(code); min-width: 1.4em; color: var(--faint); font: 600 0.75rem var(--font); }
.codes-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.codes-tools .ico, .issued-card .ico { width: 17px; height: 17px; }
.button.block { display: flex; width: 100%; height: 52px; border-radius: 14px; font-size: 1rem; }
.sheet.auth .notice.warn { margin-bottom: 18px; }
button.copied { background: var(--tint); }
@media (max-width: 340px) { ol.codes { grid-template-columns: minmax(0, 1fr); } }

/* Link and PIN */
.issued { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; margin: 0 0 20px; }
.issued-card { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: var(--r-card); background: var(--raised); border: 1px solid var(--border); }
.issued-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-body); }
.issued-card .secret { margin: 0; background: var(--card); }
.issued-card button { justify-self: start; }

/* Client names next to their codes */
.client-cell a { display: grid; gap: 1px; text-decoration: none; color: var(--ink); }
.client-cell .cname { font-weight: 650; }
.client-cell .code { font-size: 0.75rem; color: var(--faint); font-weight: 700; }
.client-cell a:not(:has(.cname)) .code { font-size: 0.875em; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .client-cell a:hover .cname, .client-cell a:hover .code { color: var(--data); } }
.alert-row h3 .who-name { margin-right: 8px; }
.page-head .lede .code { color: var(--forest-muted); }

/* Account: log out is a deliberate act at the end of the page */
.acct-signout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.acct-signout h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.125rem; }
.acct-signout h2 .ico { color: var(--critical); }
.acct-signout p { margin: 0; color: var(--muted); }
.acct-signout .ico { width: 18px; height: 18px; }
@media (max-width: 960px) {
  .rail .who-logout { display: none; }
  .acct-signout form, .acct-signout button { width: 100%; }
  .acct-signout button { height: 50px; }
}

/* Greek tab labels are longer ("Θεραπευόμενοι"): the usual 10px tab-bar size, so they fit uncut */
@media (max-width: 960px) { :root:lang(el) .rail nav a { font-size: 0.625rem; letter-spacing: -0.01em; padding-left: 0; padding-right: 0; } }

/* Phones: the tab bar slides away while scrolling down, and back on the way up */
@media (max-width: 960px) {
  /* A calm slide with ease-in-out both ways, and a soft fade so the shadow does not cut off at the edge */
  .rail nav { transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1), opacity 420ms cubic-bezier(0.65, 0, 0.35, 1); will-change: transform; }
  .nav-away .rail nav { transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom))); opacity: 0; pointer-events: none; }
}

/* A choice between a few named options (language): a segmented control */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 3px; margin: 0; padding: 4px; border: 0; border-radius: 13px; background: var(--ground); min-width: 0; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 10px; font-size: 0.875rem; font-weight: 650; color: var(--muted); transition: background-color 150ms ease, color 150ms ease; }
.segmented input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 19, 18, 0.12), 0 0 0 1px var(--border); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .segmented label:hover input:not(:checked) + span { color: var(--ink); } }
.acct-row form.control { display: flex; align-items: center; gap: 8px; }

/* Practice settings: four small groups, each with its own Save */
.set-index { position: relative; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.set-index a { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px; background: rgba(6, 20, 10, 0.28); color: #fff; font-size: var(--fs-small); font-weight: 650; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .set-index a:hover { background: rgba(6, 20, 10, 0.42); } }
.settings-page .acct-box { scroll-margin-top: 16px; }
.set-form { display: grid; gap: 18px; }
.set-form .field { margin: 0; }
.set-form .form-actions { padding-top: 16px; }
.saved-note { margin-right: auto; color: var(--forest-2); font-size: var(--fs-small); font-weight: 650; }
.saved-note::before { content: "✓ "; }
.set-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--rule); }
.set-run p { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.lang-tabs .segmented { justify-self: start; }
.lang-tabs:has(.lt-en:checked) .lang-pane:not(.lp-en), .lang-tabs:has(.lt-el:checked) .lang-pane:not(.lp-el) { display: none; }
.lang-pane { display: grid; gap: 18px; }
.lang-pane textarea { min-height: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .saved-note { color: var(--leaf); }
  :root:not([data-theme="light"]) .client-cell a:not(:has(.cname)) .code { color: var(--ink); }
}

/* Export and other forms on phones: date and number fields stay inside their card */
input[type=date] { min-width: 0; max-width: 100%; display: block; -webkit-appearance: none; appearance: none; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.field-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.field, .field-grid > * { min-width: 0; }

/* Checking an assessment: a section index beside a plain list of every question */
.review-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; margin: 8px 0 32px; }
.review-index { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 16px; border-radius: var(--r-card); background: var(--raised); }
.ri-sum { margin: 0 0 10px; font-size: var(--fs-small); color: var(--muted); }
.review-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.review-index a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: var(--fs-small); font-weight: 600; line-height: 1.3; }
.review-index a b { color: var(--faint); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .review-index a:hover { background: var(--card); } }
.rv-intro { margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: var(--raised); max-width: 80ch; }
.rv-section { padding: 0 0 8px; margin: 0 0 28px; scroll-margin-top: 16px; }
.rv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 0 0 10px; border-bottom: 2px solid var(--ink); }
.rv-head h3 { margin: 0; font-size: var(--fs-section); }
.rv-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-small); color: var(--muted); }
.rv-note { margin: 12px 0 0; color: var(--muted); }
.rv-items { list-style: none; margin: 0; padding: 0; }
.rv-item { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.rv-num { font: 700 0.75rem/1.9 var(--font); color: var(--faint); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rv-item.info .rv-num { font-style: italic; }
.rv-item.info .rv-body p { margin: 0; color: var(--muted); }
.rv-item.follow { padding-left: 18px; background: linear-gradient(var(--gold), var(--gold)) 4px 14px / 3px calc(100% - 28px) no-repeat; }
.rv-body > * { margin: 0; }
.rv-body > * + * { margin-top: 8px; }
.rv-text { font-weight: 600; max-width: 80ch; }
.rv-when { font-size: var(--fs-small); color: var(--gold-ink); }
.rv-when b { font-weight: 700; }
.rv-when code { font-size: 0.75rem; }
.rv-alt { font-size: var(--fs-small); color: var(--muted); }
.rv-alt span { font-weight: 650; color: var(--ink); }
.rv-cols { font-size: var(--fs-small); color: var(--muted); }
.rv-opts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.rv-opts li { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 3px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); font-size: var(--fs-small); }
.rv-opts li b { padding: 1px 6px; border-radius: 6px; background: var(--raised); color: var(--muted); font: 700 0.6875rem var(--mono); }
.rv-opts li.free { border-style: dashed; color: var(--muted); }
.rv-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--faint); }
.rules-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) {
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .review-index { position: static; max-height: none; }
  .review-index ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .review-index a { background: var(--card); border-radius: 999px; padding: 5px 12px; }
}
@media (max-width: 700px) {
  .rv-item { grid-template-columns: minmax(0, 1fr); }
  .rv-item.follow { padding-left: 14px; }
}

/* Sliders (number or scale questions with display "slider"): the value above, a track that fills up to the thumb,
   the ends labelled below. Until it is moved the question is unanswered: the value says so and the thumb is hollow. */
.slider-q { --pct: 50%; max-width: 560px; }
.slider { display: grid; gap: 6px; padding-top: 2px; }
.slider-value { font: 750 1.5rem/1.2 var(--font); font-variant-numeric: tabular-nums; color: var(--ink); min-height: 1.8rem; }
.slider-q.unset .slider-value { font-size: var(--fs-body); font-weight: 600; color: var(--muted); padding-top: 6px; }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.slider input[type=range]:focus, .slider input[type=range]:focus-visible { outline: none; box-shadow: none; border: 0; }
.slider input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(to right, var(--data) 0 var(--pct), var(--rule) var(--pct) 100%);
}
.slider input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--rule); }
.slider input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--data); }
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--data); box-shadow: 0 2px 8px rgba(18, 19, 18, 0.18);
  transition: transform 140ms var(--ease-out), border-color 120ms ease;
}
.slider input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--data);
  box-shadow: 0 2px 8px rgba(18, 19, 18, 0.18); transition: transform 140ms var(--ease-out);
}
.slider input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.slider input[type=range]:active::-moz-range-thumb { transform: scale(1.12); }
.slider input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 30%, transparent), 0 2px 8px rgba(18, 19, 18, 0.18); }
.slider input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 30%, transparent); }
.slider-q.unset input[type=range]::-webkit-slider-runnable-track { background: var(--rule); }
.slider-q.unset input[type=range]::-moz-range-progress { background: transparent; }
.slider-q.unset input[type=range]::-webkit-slider-thumb { border-style: dashed; border-color: var(--faint); box-shadow: none; }
.slider-q.unset input[type=range]::-moz-range-thumb { border-style: dashed; border-color: var(--faint); box-shadow: none; }
.slider input[type=range]:disabled { cursor: default; opacity: 0.7; }
.slider-ends { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-small); color: var(--muted); }
.slider-ends span:last-child { text-align: right; }
.slider-clear { justify-self: start; font-size: var(--fs-small); }
.slider input[aria-invalid="true"]::-webkit-slider-thumb { border-color: var(--critical); }
body.client-page .slider input[type=range]::-webkit-slider-thumb { width: 32px; height: 32px; margin-top: -12px; }
body.client-page .slider input[type=range]::-moz-range-thumb { width: 28px; height: 28px; }

/* The invisible first button of an answers form (Enter saves and stays; see client/section.html) */
.enter-guard { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none; }

/* Phones, zooming out: nothing may make the page wider than the screen (that left an empty strip on the right). */
html, body { overflow-x: clip; }
/* The language switch and the invisible Enter guard are not answer buttons: they keep their own small size on client
   pages (the big-button rule was more specific and made EN | ΕΛ twice as wide). */
body.client-page .langs button:not(.link):not(.small) { height: 32px; padding: 0 9px; font-size: 0.8125rem; border-radius: 8px; }
body.client-page .enter-guard:not(.link):not(.small) { height: 1px; padding: 0; }
/* Narrow phones on a questionnaire page: the owl alone (no wordmark) beside "Finish later" and the languages, so the bar
   fits even with the longer Greek label. */
@media (max-width: 420px) {
  body.client-page .bar:has(.finish-later) .brand { width: 34px; overflow: hidden; flex: none; }
  body.client-page .bar .finish-later { padding: 0 11px; }
}
/* Phones: fields use 16px text, so tapping one does not make the iPhone zoom in (and leave the page offset). */
@media (pointer: coarse) {
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea { font-size: 16px; }
}

/* Result tables: results never break mid-word ("Not applicable" on two lines), codes keep a readable width. On phones each
   result becomes a small block (name and result side by side, category and codes underneath) instead of three squeezed
   columns where names wrapped word by word and the codes were cut off at the edge. */
.result-table td.val { white-space: nowrap; }
.result-table td.codes { line-height: 1.5; overflow-wrap: anywhere; }
/* Every group's table has the same columns, so names, results and codes line up down the whole page. */
.result-tables .table-wrap { margin-bottom: 14px; }
.result-tables .table-wrap:last-child { margin-bottom: 32px; }
.result-table { table-layout: fixed; }
.result-table col.c-val { width: 22%; }
.result-tables.has-cat .result-table col.c-cat { width: 18%; }
.result-tables.has-codes .result-table col.c-codes { width: 28%; }
.result-tables.has-cat.has-codes .result-table col.c-val { width: 16%; }
.result-tables.has-cat.has-codes .result-table col.c-cat { width: 13%; }
.result-tables.has-cat.has-codes .result-table col.c-codes { width: 31%; }
.result-table caption { padding: 14px 16px 2px; font-size: var(--fs-body); }
/* The column header is shown once, above the first group; later groups keep it for screen readers only. */
.result-tables .table-wrap + .table-wrap thead th { height: 0; padding-top: 0; padding-bottom: 0; border: 0; font-size: 0; line-height: 0; overflow: hidden; }
.result-tables .table-wrap + .table-wrap caption { padding-bottom: 6px; }
.result-table td.cat .cutoff { margin-top: 6px; }
.answers-table td.ans-a { min-width: 7rem; font-weight: 600; }
.answers-table td.ans-id { white-space: nowrap; text-align: left; }
details.card > .table-wrap { margin-top: 12px; }
#notes .row.spread { margin-top: 10px; }
@media (max-width: 900px) {
  .result-table, .answers-table { display: block; }
  .result-table thead, .answers-table thead, .result-table colgroup { display: none; }
  .result-table tbody, .answers-table tbody { display: block; }
  .result-table caption { display: block; padding: 14px 14px 6px; }
  .result-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  .result-table tbody tr:last-child { border-bottom: 0; }
  .result-table tr > * { padding: 0; border: 0; }
  .result-table th[scope=row] { font-size: 0.875rem; line-height: 1.35; }
  .result-table td.val { justify-self: end; }
  .result-table td.cat, .result-table td.codes { grid-column: 1 / -1; min-width: 0; }
  .result-table td.cat:not(:has(*)), .result-table td.codes:not(:has(br)) { display: none; }
  .result-table td.codes br:last-child { display: none; }
  .answers-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  .answers-table tbody tr:last-child { border-bottom: 0; }
  .answers-table tr > * { padding: 0; border: 0; min-width: 0; }
  .answers-table td.ans-a { margin-top: 4px; }
}

/* A client's results, one row per completed assessment: findings are a short list that wraps like text, never pills
   running off the edge; on narrow screens each result becomes a block (date and assessment, then the findings). */
.history-table { table-layout: fixed; }
.history-table th.h-date { width: 10.5rem; }
.history-table th.h-def { width: 11rem; }
.history-table th.h-flags { width: 9rem; }
.history-table td { vertical-align: top; }
.history-table td.h-date { white-space: nowrap; }
.keyres { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.keyres li { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.kr-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.kr-score .kr-label { color: var(--muted); }
.kr-score .badge { align-self: center; }
.kr-pos { position: relative; padding-left: 16px; font-weight: 600; }
.kr-pos::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.kr-more { display: inline-block; margin-top: 8px; font-size: var(--fs-small); }
@media (max-width: 900px) {
  .history-table, .history-table tbody { display: block; }
  .history-table thead { display: none; }
  .history-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
  .history-table tbody tr:last-child { border-bottom: 0; }
  .history-table tr > * { padding: 0; border: 0; min-width: 0; }
  .history-table td.h-date { grid-column: 1; font-weight: 650; }
  .history-table td.h-flags { grid-column: 2; grid-row: 1; justify-self: end; }
  .history-table td.h-def { grid-column: 1 / -1; color: var(--muted); }
  .history-table td.h-keys { grid-column: 1 / -1; margin-top: 8px; }
  .history-table td.empty { grid-column: 1 / -1; }
}

/* Tables that do not fit their box (app.js measures; phones, small laptops, long Greek labels) become stacked cards:
   one block per row, each value under a small label taken from its column header, actions at the bottom. */
table.stacked, table.stacked tbody, table.stacked tr { display: block; }
table.stacked thead, table.stacked caption { display: none; }
table.stacked tr { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
table.stacked tbody tr:last-child { border-bottom: 0; }
table.stacked tr > * { display: grid; grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 4px 0; border: 0; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
table.stacked tr > *::before { content: attr(data-label); font-size: 0.75rem; font-weight: 650; color: var(--faint); }
table.stacked tr > :first-child { display: block; padding-top: 0; padding-bottom: 6px; font-weight: 650; font-size: 0.9375rem; }
table.stacked tr > :first-child::before, table.stacked td.actions::before, table.stacked td.empty::before,
table.stacked tr > [data-label=""]::before { content: none; }
table.stacked tr > [data-label=""] { display: block; }
table.stacked td.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
table.stacked td.actions > * { margin: 0 !important; }
table.stacked td.empty { display: block; padding: 6px 0; }
table.stacked td.num, table.stacked th.num { text-align: left; }
table.stacked tr > * > .badge, table.stacked tr > * > form, table.stacked tr > * > .button { justify-self: start; }
table.stacked tr > * > * { min-width: 0; max-width: 100%; }
table.stacked select, table.stacked input:not([type=checkbox]):not([type=radio]) { width: 100% !important; min-width: 0 !important; max-width: 100%; }
table.stacked form.row, table.stacked form.inline { flex-wrap: wrap; max-width: 100%; }
table.stacked form.row > *, table.stacked form.inline > * { min-width: 0; }
/* Everything in a labelled cell (a value and its small second line) stays in the value column. */
table.stacked tr > [data-label]:not(:first-child):not([data-label=""]):not(.actions) > * { grid-column: 2; }

/* Assignment rows: one control each ("View result" or ⋯), so every row has the same height */
/* "Result" and "Options" are the same button: same size, an icon each, side by side in one tidy column */
.row-act { min-width: 8.25rem; justify-content: center; gap: 7px; }
.row-act .ico { width: 15px; height: 15px; opacity: 0.8; }
.more-btn .chev-down { transform: rotate(90deg); transition: transform 160ms var(--ease-out); }
.row-menu[open] > .more-btn { background: var(--soft-btn-hover); }
.row-menu[open] > .more-btn .chev-down { transform: rotate(-90deg); }
.row-menu-panel { text-align: left; }
td.actions:has(.row-menu) { white-space: nowrap; }
/* The board: the actions column is only as wide as its one control, and every value keeps to one line (cut with …, full
   text on hover), so each row is the same two-line height whatever the names, statuses or buttons. */
[data-board] table:not(.stacked) td.actions { width: 1%; white-space: nowrap; }
[data-board] table:not(.stacked) td.one-line > *, [data-board] table:not(.stacked) .client-cell .cname,
[data-board] table:not(.stacked) .client-cell .code { display: block; max-width: 10.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-board] table:not(.stacked) td.one-line > .badge { display: inline-flex; max-width: 100%; }
[data-board] table:not(.stacked) th, [data-board] table:not(.stacked) td { padding-left: 12px; padding-right: 12px; }
[data-board] table:not(.stacked) tbody tr { height: 74px; }
/* A menu button is a button, not an expandable section: no ▸ in front of it */
.row-menu > summary::before { content: none; display: none; }
/* An open menu sits above everything around it: its row (or card) and its box are lifted over their neighbours */
tr:has(details.row-menu[open]) { position: relative; z-index: 30; }
.box:has(details.row-menu[open]), .table-wrap:has(details.row-menu[open]) { position: relative; z-index: 30; }
.row-menu[open] { z-index: 31; }
.row-menu.up .row-menu-panel { top: auto; bottom: calc(100% + 6px); }
/* In a card the menu opens under the ⋯ button, from the left, so it stays on screen */
table.stacked .row-menu-panel { left: 0; right: auto; }

/* Export of one result or one client: what the file contains, at the top of the confirmation */
.export-what { display: grid; gap: 10px; margin: 0 0 20px; padding: 16px 18px; border-radius: var(--r-card); background: var(--raised); border: 1px solid var(--border); }
.export-what div { display: grid; grid-template-columns: minmax(6rem, 30%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.export-what dt { color: var(--muted); font-size: var(--fs-small); font-weight: 650; }
.export-what dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* "Stay signed in?" after signing in: two equal buttons, the safe choice first */
.stay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stay-choice button { height: 52px; border-radius: 14px; font-size: 1rem; }

/* New password: a strength line (red, yellow, green) and the rules ticked as they are met */
.pw-fields { display: grid; gap: 16px; }
.pw-meter { margin-top: 10px; }
.pw-bar { height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--critical);
  transition: width 260ms var(--ease-out), background-color 260ms ease; }
.pw-meter[data-state="fair"] .pw-bar span { background: var(--gold); }
.pw-meter[data-state="strong"] .pw-bar span { background: var(--data); }
.pw-level { margin: 6px 0 0; font-size: var(--fs-small); font-weight: 650; color: var(--critical); }
.pw-meter[data-state="fair"] .pw-level { color: var(--gold-ink); }
.pw-meter[data-state="strong"] .pw-level { color: var(--data); }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 4px 16px; }
.pw-rules li { position: relative; padding-left: 22px; font-size: var(--fs-small); color: var(--muted); line-height: 1.6; transition: color 160ms ease; }
.pw-rules li::before { content: ""; position: absolute; left: 2px; top: 0.42em; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--control); transition: background-color 160ms ease, box-shadow 160ms ease; }
.pw-rules li.met { color: var(--ink); }
.pw-rules li.met::before { background: var(--data); box-shadow: none; }
.pw-rules li.met::after { content: ""; position: absolute; left: 6px; top: calc(0.42em + 2.5px); width: 3px; height: 6px;
  border: solid var(--card); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.pw-match { margin: 8px 0 0; font-size: var(--fs-small); font-weight: 650; color: var(--critical); }
.pw-match.ok { color: var(--data); }
.pw-match.ok::before { content: "✓ "; }

/* Clinic users: who the person is on one line, their email under it; switched-off accounts recede */
.people-table tr.is-off td:not(.actions) { opacity: 0.6; }
.you-tag { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--forest-2); font-size: 0.6875rem; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
/* Adding a person: the two roles as two plain choices, each saying what it allows */
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.role-pick legend { grid-column: 1 / -1; margin-bottom: 8px; font-weight: 650; font-size: 0.875rem; }
.role-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: 14px; background: var(--card); cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.role-opt input { width: auto; height: auto; margin: 3px 0 0; accent-color: var(--forest); flex: none; }
.role-opt strong { display: block; font-size: 0.9375rem; }
.role-opt small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.role-opt:has(input:checked) { border-color: var(--forest-2); background: var(--tint); }

/* Sharing: one group per professional, their clients folded underneath */
.share-find { display: grid; gap: 6px; max-width: 360px; margin-bottom: 18px; }
.share-find label { font-weight: 650; font-size: 0.875rem; }
.share-group { padding: 22px 24px; margin-bottom: 14px; }
.share-group[hidden] { display: none; }
.share-head { display: flex; align-items: center; gap: 12px; }
.share-head h2 { margin: 0; font-size: 1.0625rem; }
.share-head p { margin: 2px 0 0; }
.share-head .av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--forest-deep); font-weight: 800; font-size: 0.875rem; }
.share-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.share-label { font-size: 0.8125rem; font-weight: 650; color: var(--muted); margin-right: 2px; }
.share-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 11px; border-radius: 999px; background: var(--tint); font-size: 0.8125rem; font-weight: 600; }
.share-chip form { display: inline; margin: 0; }
.chip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.chip-x:hover { background: var(--card); color: var(--critical); }
.share-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.share-all label { font-size: 0.875rem; font-weight: 600; }
.share-all select { width: auto; min-width: 12rem; max-width: 100%; }
.share-clients { margin-top: 14px; border-top: 1px solid var(--rule); }
.share-clients > summary { width: fit-content; padding: 14px 0 2px; font-size: 0.875rem; color: var(--forest-2); }
.share-list { list-style: none; margin: 10px 0 0; padding: 0; }
.share-list li { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.share-list li:first-child { border-top: 0; }
.share-list li[hidden] { display: none; }
.share-who { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
@media (max-width: 560px) {
  .share-group { padding: 18px 16px; }
  .share-list li { grid-template-columns: 1fr auto; }
  .share-list li .share-who { grid-column: 1 / -1; grid-row: 2; }
}

/* Assessments: earlier versions folded under the current one */
.older-versions { margin-top: 4px; font-size: 0.8125rem; }
.older-versions > summary { cursor: pointer; color: var(--muted); width: fit-content; }
.older-versions ul { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 4px; }
.older-versions li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .you-tag, :root:not([data-theme="light"]) .share-clients > summary { color: var(--leaf); }
  :root:not([data-theme="light"]) .role-opt:has(input:checked) { border-color: var(--leaf); }
}

/* Interviews whose client has answered their part: the professional's turn */
.ready-box { margin-bottom: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--tint); }
.ready-box h2 { display: flex; align-items: center; gap: 10px; }
.ready-box > p { margin: 4px 0 12px; }
.ready-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.ready-list { list-style: none; margin: 0; padding: 0; }
.ready-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.ready-list li:first-child { border-top: 0; }
.ready-list h3 { margin: 0; font-size: 0.9375rem; }
.ready-list h3 a { color: var(--ink); text-decoration: none; }
.ready-list h3 .who-name { margin-right: 8px; }
.ready-list h3 .code { margin-right: 8px; color: var(--faint); font-weight: 600; font-size: 0.8125rem; }
.ready-list p { margin: 2px 0 0; }
.ready-list li > div { flex: 1 1 14rem; min-width: 0; }
.ready-list .button { flex: none; }
@media (max-width: 640px) {
  .ready-list li { flex-wrap: wrap; }
  .ready-list .button { flex: 1 1 100%; justify-content: center; }
}
/* The count on the Dashboard tab */
.rail nav a { position: relative; }
.nav-badge { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--gold); color: var(--forest-deep); font-size: 0.75rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.nav-badge[hidden] { display: none; }
@media (max-width: 960px) {
  .nav-badge { position: absolute; top: 4px; left: calc(50% + 4px); margin: 0; min-width: 18px; height: 18px; font-size: 0.6875rem; }
}
/* A new one arrived while the page was open */
.ready-toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 10px 12px 18px; border-radius: 16px; background: var(--forest-deep); color: #f4f2ea; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55); font-weight: 600; font-size: 0.9375rem; animation: toast-in 260ms var(--ease-out) both; }
.ready-toast .chip-x { color: #c9cfc5; }
.ready-toast .chip-x:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 960px) { .ready-toast { bottom: calc(92px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px) { .ready-toast { width: calc(100vw - 32px); } .ready-toast span { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .ready-toast { animation: none; } }
/* Finishing an interview after the client's part */
.notice.handover { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.notice.handover p { flex: 1 1 22rem; margin: 0; }
.by-client { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 0.6875rem; font-weight: 700; vertical-align: 2px; white-space: nowrap; }

/* The client's link as a QR code: always dark on white (scanners need it), whatever the theme */
.qr-box { margin-top: 14px; }
.qr-box > summary { font-size: 0.875rem; }
.qr-frame { width: min(240px, 100%); margin: 10px 0; padding: 12px; border-radius: 14px; background: #fff; }
.qr-frame svg.qr { display: block; width: 100%; height: auto; padding: 0; border: 0; border-radius: 0; }
.qr-frame svg.qr path { fill: #111; }
.qr-box .muted { max-width: 36ch; }

/* Installing Askwell as an app; the page shown without a connection */
.install-row [hidden] { display: none; }
.offline-page { text-align: center; padding: 40px 24px; }
.offline-page h1 { margin: 0 0 8px; }

/* ===== forced dark theme: generated by tools/theme_css.py from the dark media blocks above; do not edit ===== */
:root[data-theme="dark"] { --ground: #0f1010;
    --card: #1a1b1b;
    --raised: #212322;
    --tint: #1f3a26;
    --border: #2c2e2d;
    --rule: #292b2a;
    --control: #4a4d4c;
    --ink: #eeece6;
    --muted: #bab8b2;
    --faint: #9e9d98;
    --primary: #eeece6;
    --primary-ink: #141515;
    --forest: #1f4428;
    --forest-2: #2a5c34;
    --forest-deep: #0f2014;
    --gold-soft: #382d14;
    --gold-ink: #e8c57e;
    --sky-soft: #172a3d;
    --sky-ink: #9cc9f2;
    --plum-soft: #261e3d;
    --plum-ink: #c9b6ff;
    --data: #a8d48f;
    --data-soft: #263528;
    --focus: #a8d48f;
    --critical: #ff8b80;
    --critical-bg: #3a1d1a;
    --critical-soft: #2a1c1a;
    --critical-ink: #ffc2bb;
    --warning: #f0b860;
    --warning-bg: #33280f;
    --warning-soft: #2a2312;
    --warning-ink: #f6d398;
    --neutral-bg: #262827;
    --neutral-ink: #cfcdc6;
    --band-low: #35513a;
    --band-mid: #6e5a22;
    --band-high: #7d3a33;
    --grid: #2d2f2e;
    --soft-btn: #2b2d2c;
    --soft-btn-hover: #353837;
    --soft-btn-edge: rgba(255, 255, 255, 0.05);
    color-scheme: dark; }
:root[data-theme="dark"] .logo .lg-bubble, :root[data-theme="dark"] .logo .lg-eye { fill: #6e9468; stroke: #6e9468; }
:root[data-theme="dark"] .logo .lg-face, :root[data-theme="dark"] .logo .lg-ask { fill: #f1e6cc; }
:root[data-theme="dark"] .logo .lg-beak { fill: #d6a64e; stroke: #d6a64e; }
:root[data-theme="dark"] .logo .lg-well { fill: #9cbf8a; }
:root[data-theme="dark"] .rail nav a[aria-current="page"] { color: var(--leaf); }
:root[data-theme="dark"] button.danger, :root[data-theme="dark"] .button.danger { color: #1a0605; }
:root[data-theme="dark"] .badge.in_progress, :root[data-theme="dark"] .badge.active, :root[data-theme="dark"] .badge.approved { color: var(--leaf); }
:root[data-theme="dark"] .choice input:checked + label { border-color: var(--data); }
:root[data-theme="dark"] .choice input:checked + label::before { border-color: var(--data); box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 9px var(--data); }
:root[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23a8bdb9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .pill.note { color: var(--leaf); }
:root[data-theme="dark"] .confirm-icon { color: var(--leaf); }
:root[data-theme="dark"] .welcome-points .wp-ico { color: var(--leaf); }
:root[data-theme="dark"] .done-tick path { stroke: var(--leaf); }
:root[data-theme="dark"] .badge.inv-sent { color: var(--leaf); }
:root[data-theme="dark"] .owl .lg-bubble { fill: var(--leaf); stroke: var(--leaf); }
:root[data-theme="dark"] .owl .lg-eye { fill: #17231b; }
:root[data-theme="dark"] .trail-line { stroke: var(--leaf); }
:root[data-theme="dark"] .pills li { color: var(--leaf); }
:root[data-theme="dark"] .scene.in .stop-dot { background: var(--leaf); color: #17231b; box-shadow: 0 0 0 6px color-mix(in srgb, var(--leaf) 22%, transparent); }
:root[data-theme="dark"] .v-pin i { color: var(--leaf); }
:root[data-theme="dark"] .v-pick li.tick i { background: var(--leaf); }
:root[data-theme="dark"] .v-pick li.tick i::after { border-color: #17231b; }
:root[data-theme="dark"] .v-choices .yes, :root[data-theme="dark"] .v-choices .pick { color: var(--leaf); }
:root[data-theme="dark"] .v-graph .line, :root[data-theme="dark"] .v-graph .pts circle { stroke: var(--leaf); }
:root[data-theme="dark"] .v-note b { color: var(--leaf); }
:root[data-theme="dark"] .v-safe .ico { color: var(--leaf); }
:root[data-theme="dark"] .langs button[aria-pressed="true"] { text-decoration-color: var(--leaf); }
:root[data-theme="dark"] .acct-box-head h2 .ico, :root[data-theme="dark"] .link-list a > .ico:first-child { color: var(--leaf); }
:root[data-theme="dark"] .dots i.on { background: var(--leaf); }
:root[data-theme="dark"] .theme-opt:has(input:checked) .theme-pic { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--leaf); }
:root[data-theme="dark"] .theme-tick { background: var(--leaf); }
:root[data-theme="dark"] .theme-tick::after { border-color: #10200f; }
:root[data-theme="dark"] .saved-note { color: var(--leaf); }
:root[data-theme="dark"] .client-cell a:not(:has(.cname)) .code { color: var(--ink); }
:root[data-theme="dark"] .you-tag, :root[data-theme="dark"] .share-clients > summary { color: var(--leaf); }
:root[data-theme="dark"] .role-opt:has(input:checked) { border-color: var(--leaf); }
/* ===== end of forced dark theme ===== */
