/* ── Global foundation ──────────────────────────────────────────────────────
   The whole app is wrapped in `.app2`, which owns the theme tokens — the SINGLE
   source of truth (see the `.app2` block below + the `data-theme="lavender|dark"`
   override blocks). `:root` keeps only a pre-paint backdrop; everything visible
   renders inside `.app2` and inherits its (themeable) tokens. */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: #ffffff; }
body { color: #1A1A22; font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; }

.tagline { color: var(--muted); font-size: 1.1rem; }
.lead, .note { color: var(--muted); line-height: 1.55; }
.note.small, .hint, .verify { font-size: 0.9rem; }
.hint { color: var(--muted); }
.error { color: var(--bad); } .warn { color: var(--warn); }
.loading { color: var(--muted); }

button { font: inherit; cursor: pointer; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 16px; transition: .12s; }
button:hover { border-color: var(--ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--cta); border: none; color: var(--on-cta); font-weight: 600; transition: transform .12s; }
button.primary:hover:not(:disabled) { transform: translateY(-1px); }
button.primary.big { padding: 12px 24px; font-size: 1rem; }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--hover); border-color: transparent; color: var(--ink); }
button.small { padding: 8px 12px; font-size: .85rem; }
.qactions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; align-items: center; }
/* Structured back button sits on the left; the primary stays on the right. */
.qback { margin-right: auto; }


/* Personalise */
.ps h1 { margin-bottom: 4px; }
.ps-row { margin-top: 24px; }
.ps-row h3 { margin: 0 0 8px; color: var(--ink-soft); font-weight: 500; font-size: 13px; }
.ps-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ps-card { text-align: left; padding: 16px; }
.ps-card.selected { border-color: var(--ink); background: var(--fill-soft); }
.ps-card-title { font-weight: 600; margin-bottom: 4px; }
.ps-card-blurb { color: var(--muted); font-size: .85rem; line-height: 1.4; }

/* Assessment — the structured runner sits in the same 680 column as the conversation,
   under the same progress strip (.pstrip, below). */
.app2 .assess { max-width: var(--measure); margin: 0 auto; }

/* Calm entrance per question (keyed remount triggers it) so the next-question
   swap eases in instead of snapping. Respects reduced-motion. */
/* ── Structured question runner (B35 §4) ─────────────────────────────────────
   The question is plain 17/1.6 ink text (no card); its control sits in one
   soft-fill box (max 560) with the ink primary in the box footer; "← Back to
   previous answer" sits under the box. Calm entrance per question (keyed remount);
   reduced-motion respected. */
.qcard { max-width: var(--measure); animation: q-enter .42s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes q-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qcard { animation: none; } }
.qtext, .app2 .qcard .qtext { font-size: 17px; line-height: 1.6; font-weight: 400; letter-spacing: 0; color: var(--ink); margin: 0 0 24px; white-space: pre-line; }
.qcard .statement { font-size: 17px; line-height: 1.6; color: var(--ink); }
.qcard .statement p { margin: 0 0 16px; }
.qbox { max-width: 560px; background: var(--fill-quiet); border-radius: var(--r-tile); padding: 20px 24px; }
.qbox-foot, .qfoot-plain { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.qfoot-plain { justify-content: flex-start; margin-top: 8px; }
.qbox-actions { display: flex; align-items: center; gap: 8px; }
.qbox-link { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.qbox-link:hover { color: var(--ink); text-decoration: underline; border: 0; }
.qbox-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
button.primary.qnext { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; font-weight: 500; }
.q-arrow { flex-shrink: 0; }
.qback { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.qback:hover { color: var(--ink); border: 0; }
.verify { background: var(--surface); border-left: 3px solid var(--ink-soft); padding: 8px 16px; border-radius: var(--r-control); color: var(--ink); margin: 0 0 16px; }
.freeform { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--control-line); border-radius: var(--r-tile); padding: 16px; resize: vertical; font: inherit; }
.freeform:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Slider: 4px track, ink fill, 20px thumb (surface fill, 1.75 ink border, the one
   shadow), value bubble over the thumb. Unset = no thumb, no fill — the input is
   still focusable and clickable underneath (the native control does the work). */
.qslider { display: flex; align-items: center; gap: 16px; padding-top: 28px; }
.qslider .anchor { flex: 0 0 auto; max-width: 96px; font-size: 13px; color: var(--ink-soft); line-height: 1.3; }
.qslider .anchor:last-child { text-align: right; }
.qs-track { position: relative; flex: 1; height: 20px; --thumb: 20px; }
.qs-track input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 20px; margin: 0; background: transparent; cursor: pointer; }
.qs-track input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--ink) 0 calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--pct)), var(--slider-track) 0); }
.qs-track input[type=range]::-moz-range-track { height: 4px; border-radius: var(--r-pill); background: var(--slider-track); }
.qs-track input[type=range]::-moz-range-progress { height: 4px; border-radius: var(--r-pill); background: var(--ink); }
.qs-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: -8px; border-radius: 50%; background: var(--surface); border: 1.75px solid var(--ink); box-shadow: var(--shadow-thumb); }
.qs-track input[type=range]::-moz-range-thumb { width: 16.5px; height: 16.5px; border-radius: 50%; background: var(--surface); border: 1.75px solid var(--ink); box-shadow: var(--shadow-thumb); }
.qs-track input[type=range]:focus { outline: none; }
.qs-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.qs-track input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Unset (demo polish): the thumb and its value label are visible from the start, at the
   midpoint, in a quieter state — no fill, a soft thumb ring, a muted label — so the
   control reads as a slider. It is still not an answer: Next stays disabled and the
   hint stays until the first interaction (a tap on the thumb itself picks the centre). */
.qs-track.is-unset input[type=range]::-webkit-slider-runnable-track { background: var(--slider-track); }
.qs-track.is-unset input[type=range]::-moz-range-progress { background: transparent; }
.qs-track.is-unset input[type=range]::-webkit-slider-thumb { border-color: var(--control-line-hover); }
.qs-track.is-unset input[type=range]::-moz-range-thumb { border-color: var(--control-line-hover); }
.qs-bubble { position: absolute; bottom: calc(100% + 6px); left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--pct)); transform: translateX(-50%);
  font-size: 13px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; pointer-events: none; }
.qs-track.is-unset .qs-bubble { color: var(--ink-soft); font-weight: 400; }
.qs-hint { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }

/* Option boxes: 44px min, 8px radius, hairline; selected = violet fill (--select),
   white text 500. Every card in a question is the SAME height — the tallest one's —
   (grid rows of 1fr): sentence-length labels stack full width; short labels sit in
   equal-width cells that wrap. */
.options { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 8px; }
.options.is-row { grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.option { min-height: 44px; text-align: left; padding: 10px 16px; border-radius: var(--r-control); border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.45; }
.options.is-row .option { padding: 0 12px; text-align: center; }
.option:not(.selected):hover { border-color: var(--control-line-hover); }
.option.selected { background: var(--select); border-color: var(--select); color: var(--on-select); font-weight: 500; }
.option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Generating */
.generating { text-align: center; padding-top: 60px; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--ink); border-radius: 50%; margin: 0 auto 24px; animation: spin 1s linear infinite; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; margin: 0; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Typing indicator (chat "thinking" dots) */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing-bounce 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Report (narrative markdown + safety banner; layout is .app2 .report-* ) */
.safety-banner { background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad-ink); padding: 16px 16px; border-radius: var(--r-container); margin-bottom: 16px; }
.markdown { line-height: 1.65; }
.markdown h1 { font-size: 1.9rem; margin: 8px 0 18px; }
.markdown h2 { font-size: 1.4rem; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.markdown h3 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--ink); }
.markdown p { margin: 0 0 14px; }
.markdown ul { margin: 0 0 14px; padding-left: 22px; }
.markdown li { margin: 4px 0; }
.markdown ul ul { margin: 4px 0; }
/* Hanging blockquote — the Word doc's indented archetype/sub-blocks (bold label + indented body) */
.app2 .report-narrative .markdown blockquote { margin: 12px 0; padding: 2px 0 2px 16px; border-left: 2px solid color-mix(in srgb, var(--brand) 40%, var(--border-c)); color: var(--ink); }
.app2 .report-narrative .markdown blockquote p { margin: 0 0 8px; }

/* Conversation */
.chat { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
/* pre-line keeps the conductor's blank line between its reflection and the question,
   so the two breathe; larger, airier type on desktop for readability. */
.bubble { padding: 16px 16px; border-radius: var(--r-container); max-width: 80%; line-height: 1.55; white-space: pre-line; }
@media (min-width: 760px) { .chat .bubble { font-size: 1.12rem; line-height: 1.7; padding: 16px 24px; } }
/* Peeled reflection + question(s): the question sits on its own line, clearly
   spaced from the empathetic lead (presentation only — see splitReply). */
.reply-lead { display: block; }
.reply-q { display: block; margin-top: 16px; }
/* Fade the assistant reply in so the next question eases in rather than snapping. */
.bubble.assistant.enter { animation: bubble-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble.assistant.enter { animation: none; } }
/* The reply streams in visually (aria-hidden while it does); this live region
   announces it to screen readers once, whole, when it is complete. Out of flow, so
   it takes no slot in the chat's flex gap. */
.chat .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.bubble.assistant { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.user { background: var(--cta); color: var(--on-cta); align-self: flex-end; border-bottom-right-radius: 4px; }
/* A message whose turn failed: nothing reached the server. Dimmed, labelled, and
   replaced in place when the same text is sent again. */
.bubble.user.unsent { opacity: .62; }
.bubble-unsent { display: block; margin-top: 8px; font-size: .78rem; opacity: .85; }
.bubble-note { display: flex; justify-content: flex-end; margin-top: 8px; }
.bubble-note-btn { width: 26px; height: 26px; color: var(--muted); border-color: transparent; background: none; }
.bubble-note-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ── Dev-only transcript export (clinical review) — never shown when dev tools
   are off (investor env / real users). ─────────────────────────────────────── */
.convo-devbar { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto 12px; padding: 8px 12px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-tile); }
.convo-devbar.review-devbar { margin: 4px 0 16px; }
.convo-devbar-tag { font-size: .625rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 8px; }
.convo-dl { font: inherit; font-size: .8125rem; font-weight: 600; color: var(--accent); background: none; border: 1px solid var(--accent); border-radius: var(--r-control); padding: 4px 12px; cursor: pointer; }
.convo-dl:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.convo-devbar-meta { font-size: .75rem; color: var(--muted); }
/* Per-bubble flag toggle — a small corner control; the bubble carries a ring when flagged. */
.chat .bubble { position: relative; }
.convo-flag { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; line-height: 1; border: 0; border-radius: var(--r-control); background: color-mix(in srgb, var(--card) 70%, transparent); cursor: pointer; opacity: .35; filter: grayscale(1); transition: opacity .12s, filter .12s; }
.bubble:hover .convo-flag { opacity: .8; }
.convo-flag.on { opacity: 1; filter: none; background: color-mix(in srgb, var(--warn) 20%, transparent); }
.bubble.flagged { outline: 2px solid var(--warn); outline-offset: 1px; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.input-wrap { position: relative; flex: 1; display: flex; }
.chat-input textarea { flex: 1; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-control); padding: 12px 44px 12px 12px; resize: none; font: inherit; }

/* Speech-to-text dictation */
.mic-btn { position: absolute; right: 6px; bottom: 6px; }
.mic-btn.listening { color: var(--bad); border-color: var(--bad); animation: mic-pulse 1.4s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, .45); } 50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); } }
.dictation-interim { margin: 8px 4px 0; color: var(--muted); font-style: italic; font-size: .9rem; }

/* ── Conversational assessment (B35 §4, boards 04 option-4 / 05 hybrid controls) ──
   One 680 column, centred: the six-area strip, the turns (assistant = plain 17/1.6
   ink text, user = neutral bubble right), inline control cards, then Back above
   the input, which stays at the foot of the viewport. */
.app2 .focus-body:has(> .convo) { padding-bottom: 0; }
.app2 .convo { max-width: var(--measure); margin: 0 auto; min-height: calc(100vh - 100px); display: flex; flex-direction: column; }
/* Strip: six labelled 4px bars; a started area's label in ink 500. */
/* Pinned under the header while the chat scrolls. The -16 margin and 16 padding
   keep the resting position identical (36 under the header, 40 below the bars). */
.app2 .pstrip { position: sticky; top: var(--focus-head-h); z-index: 3; background: var(--canvas); list-style: none; margin: -16px 0 16px; padding: 16px 0 24px; display: grid; grid-template-columns: repeat(var(--pstrip-n, 6), minmax(0, 1fr)); gap: 16px; }
.app2 .pstrip-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app2 .pstrip-label { font-size: 13px; line-height: 1.3; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app2 .pstrip-item.is-started .pstrip-label { color: var(--ink); font-weight: 500; }
/* Structured flow: the section being answered. */
.app2 .pstrip-item.is-current .pstrip-label { color: var(--ink); font-weight: 600; }
.app2 .pstrip-bar { display: block; height: 4px; border-radius: var(--r-pill); background: var(--slider-track); overflow: hidden; }
.app2 .pstrip-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--ink); transition: width .3s ease; }
@media (max-width: 560px) { .app2 .pstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; } }
/* Turns */
.app2 .convo .chat { max-width: none; margin: 0; gap: 24px; flex: 1; }
.app2 .convo .chat .bubble { font-size: 17px; line-height: 1.6; }
.app2 .convo .bubble.assistant { align-self: stretch; max-width: none; padding: 0; background: none; border: 0; border-radius: 0; color: var(--ink); }
.app2 .convo .bubble.user { max-width: 520px; padding: 12px 16px; background: var(--fill-soft); color: var(--ink); border-radius: var(--r-tile); font-size: 15px; }
.app2 .convo .reply-q { margin-top: 16px; }
.app2 .convo .chat-end { scroll-margin-bottom: 180px; }
/* Inline control card: one soft-fill card per control (12px, 20/24, max 560). */
.app2 .icard { max-width: 560px; background: var(--fill-quiet); border-radius: var(--r-tile); padding: 20px 24px; scroll-margin: 160px 0 180px; } /* clear of the pinned header + strip and the composer */
.app2 .icard.is-pending { animation: q-enter .42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.app2 .icard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.app2 .icard-label { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.app2 .icard-edit { flex-shrink: 0; background: none; border: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.app2 .icard-edit:hover { color: var(--ink); text-decoration: underline; border: 0; }
.app2 .icard .options, .app2 .icard .scale-cells { margin-top: 16px; }
/* Answered = read-only at full strength (not the dimmed disabled look). */
.app2 .icard.is-answered .option:disabled, .app2 .icard.is-answered input:disabled { opacity: 1; cursor: default; }
.app2 .icard.is-answered .option:not(.selected):disabled:hover { border-color: var(--control-line); }
/* 1–10: ten equal cells, the option-box states. */
.app2 .scale-cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.app2 .scale-cells .scale-cell { padding: 0; text-align: center; font-variant-numeric: tabular-nums; }
.app2 .scale-anchors { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
/* Back above the input; input row pinned to the foot of the viewport. */
.app2 .convo-foot { position: sticky; bottom: 0; z-index: 2; margin-top: auto; padding: 24px 0 32px; background: var(--canvas); }
.app2 .convo-foot .qback { margin: 0 0 16px; }
.app2 .convo .chat-input { align-items: center; gap: 16px; margin-top: 0; }
.app2 .convo .chat-input textarea { min-height: 56px; max-height: 160px; padding: 15px 52px 15px 16px; border: 1px solid var(--control-line); border-radius: var(--r-tile); background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.5; field-sizing: content; }
@supports not (field-sizing: content) { .app2 .convo .chat-input textarea { height: 56px; } }
.app2 .convo .chat-input textarea:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.app2 .convo .mic-btn { right: 12px; bottom: 12px; border: 1px solid transparent; background: none; color: var(--ink-soft); }
.app2 .convo .mic-btn:hover { color: var(--ink); border-color: transparent; }
.app2 .convo .chat-input button.primary { flex-shrink: 0; height: 44px; padding: 0 24px; font-size: 16px; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .app2 .pstrip-fill { transition: none; } .app2 .icard.is-pending { animation: none; } }

/* History (session list) */
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.session-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.history-head-actions { display: flex; align-items: center; gap: 8px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 16px 16px; }
.session-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
button.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; }

/* Danger buttons */
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button.danger-solid { background: var(--bad); border: none; color: #fff; font-weight: 600; }
button.danger-solid:hover { background: color-mix(in srgb, var(--bad) 88%, #000); border: none; }
.modal-actions.confirm { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.session-when { font-weight: 600; }
.session-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.session-flow { text-transform: capitalize; }
.session-scores { font-variant-numeric: tabular-nums; }
.badge { padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; border: 1px solid var(--line); }
/* "Report ready" — the grey pill (B35 §3b), like Measured / plan stage tags. */
.badge.done { color: var(--ink-soft); border-color: transparent; background: var(--fill-soft); }
.badge.ready { color: var(--ink-soft); border-color: transparent; background: var(--fill-soft); }
.badge.active { color: var(--score-low-ink); border-color: color-mix(in srgb, var(--warn) 38%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* Settings modal (opened from the sidebar gear — B35 §1) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--navy) 40%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-container); padding: 24px; width: 100%; max-width: 460px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1rem; padding: 8px 8px; }
.modal-close:hover { color: var(--ink); border: none; }
.modal .provider-picker { margin: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.modal-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.setting-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 600; }
.setting-value { color: var(--ink); }
.modal-section input[type=range] { width: 100%; accent-color: var(--accent); }
/* Settings sections: Account · Data & consent · (dev) Developer */
.app2 .settings-sec + .settings-sec { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-c); }
.app2 .settings-h { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin: 0 0 12px; letter-spacing: 0; }
.app2 .settings-dl { display: grid; grid-template-columns: 112px 1fr; gap: 8px 16px; margin: 0; font-size: .875rem; }
.app2 .settings-dl dt { color: var(--ink-soft); }
.app2 .settings-dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.app2 .settings-p { margin: 0 0 8px; font-size: .875rem; color: var(--ink); line-height: 1.5; }
.app2 .settings-link { color: var(--ink); font-weight: 500; text-decoration: none; }
.app2 .settings-link:hover { color: var(--brand); }
.app2 .settings-delete { margin-top: 16px; }
.app2 .settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.setting-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* Provider picker */
.provider-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.pp-label { color: var(--muted); font-size: .85rem; }
.pp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-chip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: .85rem; }
.pp-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.pp-chip.disabled { opacity: .4; }
.pp-chip:not(.disabled) .dot { background: var(--good); }
.pp-chip.active { border-color: var(--ink); background: var(--fill-soft); }
.pp-note { color: var(--muted); font-size: .8rem; }

@media (max-width: 760px) {
  .ps-cards { grid-template-columns: 1fr; }
}

/* ── End-of-assessment review (conversational flow) ─────────────────── */
.review h1 { margin-bottom: 8px; }
.review-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0 24px; }
.review-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-container); padding: 16px 16px; }
.review-card.uncertain { border-color: var(--warn); }
.review-card-head { display: flex; align-items: baseline; gap: 8px; }
.review-card-head h2 { font-size: 1.05rem; margin: 0; }
.review-flag { margin-left: auto; font-size: 0.72rem; color: var(--warn); border: 1px solid var(--warn); border-radius: var(--r-pill); padding: 4px 8px; white-space: nowrap; }
.review-summary { color: var(--ink); line-height: 1.5; margin: 8px 0 12px; }
.review-card .ghost.small { padding: 4px 12px; font-size: 0.85rem; }


/* Dev-only demo shortcut (never shown in prod) */
.dev-demo { margin-top: 24px; opacity: 0.7; }

/* ── Auth (login / signup) ──────────────────────────────────────────── */
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-container); padding: 32px 28px; margin-top: 8px; }
.auth-card h1 { font-size: 1.6rem; margin: 0 0 8px; }
.auth-card .lead { margin: 0 0 20px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tabs .tab { flex: 1; }
.auth-tabs .tab.on { border-color: var(--ink); background: var(--fill-soft); color: var(--ink); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { display: flex; flex-direction: column; gap: 8px; font-size: .85rem; color: var(--muted); }
.auth-form .opt { color: var(--muted); font-weight: 400; }
.auth-form input { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-control); padding: 12px 16px; font: inherit; }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form .primary.big { margin-top: 4px; justify-content: center; display: inline-flex; gap: 8px; align-items: center; }
.auth-confidential { color: var(--muted); font-size: .82rem; margin-top: 16px; text-align: center; }

/* ── Auth: confidentiality reassurance (prominent, not fine-print) ───── */
.auth-confidential {
  display: flex; align-items: center; gap: 12px;
  margin-top: 24px; padding: 16px 16px;
  background: var(--fill-soft); border: 0;
  border-radius: var(--r-tile);
}
.auth-confidential .lock { font-size: 1.5rem; line-height: 1; }
.auth-confidential p { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.45; }

/* ── Intro: its own welcoming moment (distinct from assessment cards) ── */
.intro-moment {
  min-height: 56vh; display: flex; flex-direction: column; justify-content: center;
  text-align: center; padding: 24px 8px;
  background: radial-gradient(620px 320px at 50% 30%, color-mix(in srgb, var(--brand-deep) 5%, transparent), transparent);
}
.intro-statement {
  max-width: 56ch; margin: 0 auto; text-align: left; font-size: 1.15rem; line-height: 1.6;
  animation: fade-in .5s ease both;
}
.intro-actions { justify-content: center; min-height: 56px; }
/* The single intro screen: compact orientation card before the first question. */
.intro-orient { max-width: 480px; margin: 0 auto; text-align: left; }
/* .app2-scoped: the later `.app2 h1 { margin: 0 }` reset was winning, so the heading
   sat on the list with no gap (demo polish). */
.app2 .intro-orient h1 { font-size: clamp(1.5rem, 3.4vw, 1.9rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; text-align: center; margin: 0 0 24px; }
.intro-orient ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.intro-orient li { position: relative; padding-left: 24px; font-size: 1rem; line-height: 1.5; color: var(--ink); }
.intro-orient li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* TypedText: calm top-to-bottom fade-in. Each paragraph is laid out up front and
   ONLY opacity/transform animate (per-paragraph delay set inline), so there is zero
   reflow during the entrance. A single paragraph = one 500ms fade; multiple cascade. */
.fade-line { display: block; opacity: 0; animation: line-fade 640ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-line + .fade-line { margin-top: 8px; }
@keyframes line-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fade-line { opacity: 1; animation: none; transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   MindAmp design system v2 — built fresh to the bFluid craft bar.
   Construction studied from design-reference/ (shadcn "base-nova", Tailwind v4,
   Inter): pure-white surfaces, near-black ink, crisp 1px neutral ring borders
   with NO shadows, restrained compact type (14px body · 16px card titles · 20px
   page title · 24px stat numbers), tight spacing, ONE accent + a small chart
   palette, pill badges, neutral avatars. Scoped under `.app2` (the /?design
   sample) until global rollout. PALETTE = a single swappable layer (Tier 1).
   ════════════════════════════════════════════════════════════════════════ */
.app2 {
  /* Tier 1 — raw brand + neutrals (ALL a palette variant redefines) */
  --brand:       #0078ff;   /* primary action · dark end of data-viz */
  --brand-light: #00b4ff;
  --brand-cyan:  #07e0e5;   /* tiny accent only — never a chart fill */
  --ink:         #1A1A22;   /* soft near-black — body + headings (B35 §1: 17.3:1 on white) */
  --ink-soft:    #5F6368;   /* secondary text, meta (B35 §1: 6.05:1 on white) */
  --canvas:      #ffffff;
  --sidebar-bg:  #f7f8fb;
  --surface:     #ffffff;
  --hover:       #f3f5f8;
  --border-c:    #e6e9ee;   /* crisp neutral hairline */
  --fill-soft:   #F2F2F4;   /* neutral soft fill — grey pills, icon squares, quiet blocks (B35 §1) */
  --fill-quiet:  #F7F7F9;   /* quietest fill — report definition blocks (B35 §3) */
  --fill-selected: #EEEBF8; /* selected filter chip (B35 §3b) */
  --term-hl:     #EEEBF8;   /* report key-term highlight (B35 r2 §6) */
  --ink-2:       #3C3C46;   /* report lede, panel and card text (B35 r2 §6) */
  --slider-track: #E0DEE8;  /* assessment slider track (B35 §4) */
  --control-line: #D9D9DE;  /* option-box / input hairline (B35 §4) */
  --control-line-hover: #8E8E99; /* unselected option hover — ≥3:1 on box + option */
  --shadow-thumb: 0 1px 3px rgba(26, 26, 34, .18); /* the one shadow — the slider thumb */
  --side-bg:     #FAFAFB;  /* sidebar surface (B35 §1); --sidebar-bg stays for the Home hero wash */
  --avatar-bg:   #E8E8EC;   /* flat initials avatar — no gradients */
  --good: #16a34a; --warn: #d97706; --bad: #dc2626;

  /* Tier 2 — derived (components reference ONLY these) */
  --brand-tint:  color-mix(in srgb, var(--brand) 8%, transparent);
  --brand-press: color-mix(in srgb, var(--brand) 88%, #000);
  --on-brand: #ffffff;
  /* Primary CTA — ink, one per screen (B35 §1). Hover lifts; it doesn't change colour. */
  --cta: var(--ink);
  --on-cta: #FFFFFF;
  /* Selected answer (option boxes, scale cells) — violet in the product themes. */
  --select: var(--brand);
  --on-select: #FFFFFF;
  --bad-ink: #9a1c1c; /* readable red ink (safety banner) — themed per palette */
  --navy: #0b1b30;     /* fixed dark — modal scrim + FAB shadow (theme-independent) */
  --c-strong: var(--good); --c-mid: #7D69E1; --c-low: var(--warn);   /* band FILLS (mid = the brief's #7D69E1) */
  --c-strong-ink: #15803d; --c-mid-ink: var(--ink-soft); --c-low-ink: #b45309;   /* band TEXT */
  --r-control: 8px; --r-tile: 12px; --r-container: 16px; --r-pill: 999px;
  /* Reading text (B35 §1) — every long-prose surface: report sections, Before you read,
     Summary, plan descriptions, article view. Theme-independent. */
  --measure: 680px; --body-size: 15px; --body-lh: 1.6;
  /* The serif (Newsreader) — only where the brief lists it: the Home quote, the report
     headline insight (§3), and in round 2 the report pull-quotes and term names. */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  /* Legacy aliases — every token the inherited screens reference, mapped to the
     fresh palette so all existing component classes re-skin consistently when
     rendered inside `.app2`. (Global rollout: the whole app is wrapped in .app2.) */
  --bg: var(--canvas); --bg2: var(--hover); --card: var(--surface); --card2: var(--hover);
  --line: var(--border-c); --muted: var(--ink-soft);
  --accent: var(--brand); --accent2: var(--brand-light);
  --accent-tint: var(--brand-tint); --brand-deep: var(--brand); --brand-hover: var(--brand-press);
  --score-strong: var(--c-strong); --score-mid: var(--c-mid); --score-low: var(--c-low);
  --score-strong-ink: var(--c-strong-ink); --score-mid-ink: var(--c-mid-ink); --score-low-ink: var(--c-low-ink);
  --ring-track: #e9edf2;
  /* Home washes/tints — derived from brand + surface so every theme (cyan/lavender/
     dark) inherits automatically; components reference ONLY these, never raw hex. */
  --home-tint:  color-mix(in srgb, var(--brand) 3%, var(--surface));   /* faint surface variation */
  --tint-soft:  color-mix(in srgb, var(--brand) 7%, var(--surface));   /* the HR page's one tint — #F4F2FC in lavender (B35 §3b) */
  --home-shard: color-mix(in srgb, var(--brand) 22%, var(--surface));  /* soft brand shard (avatar/dot bg) */
  --home-hero-bg:
    radial-gradient(90% 160% at 88% -20%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 60%),
    radial-gradient(70% 140% at 8% 120%, color-mix(in srgb, var(--brand) 12%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 3%, var(--surface)) 0%, var(--sidebar-bg) 100%);

  position: fixed; inset: 0; overflow: auto;
  background: var(--canvas); color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; letter-spacing: -0.006em; -webkit-font-smoothing: antialiased;
}
.app2 *, .app2 *::before, .app2 *::after { box-sizing: border-box; }
.app2 h1, .app2 h2, .app2 h3 { margin: 0; color: var(--ink); letter-spacing: -0.02em; }
/* B35 polish — focus rings are keyboard-only, one ring app-wide. A mouse click
   leaves focus where it lands but draws nothing (overrides any browser default
   :focus ring); keyboard focus gets the brand ring. Text fields always match
   :focus-visible when focused, so they keep a visible focus on click by design. */
.app2 :focus:not(:focus-visible) { outline: none; }
.app2 :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Shell */
.app2 .shell2 { display: flex; min-height: 100vh; }
.app2 .side { width: 208px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--side-bg); border-right: 1px solid var(--border-c); }
.app2 .side-logo { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--border-c); }
.app2 .side-logo .wm { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
/* The logo is a link Home. Same keyboard ring as the nav items (the app-wide
   :focus-visible outline on the nav's radius); no underline, no colour change. */
.app2 .side-logo-link, .app2 .focus-logo-link { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; border-radius: var(--r-control); }
/* Agency lockup/mark images (lavender/dark themes) */
.app2 .brand-lockup-img { height: 24px; width: auto; display: block; }
.app2 .brand-mark-img { height: 26px; width: auto; display: block; }
.app2 .side-nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; flex: 1; }
.app2 .nav { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; background: none; border-radius: var(--r-control); color: var(--ink-soft); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.app2 .nav:hover { background: var(--hover); color: var(--ink); }
.app2 .nav.on { background: var(--brand-tint); color: var(--brand); }
.app2 .nav svg { width: 16px; height: 16px; flex-shrink: 0; }
.app2 .side-foot { border-top: 1px solid var(--border-c); padding: 8px; }
/* Quiet utility links (B13) above the account menu — stacked, 8px apart (B35 §1). */
.app2 .side-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px 12px 12px; }
/* Muted grey per the brief (#85838f ≈ --ink-soft); use the token so dark lifts it
   to a legible value rather than the light-only hex. */
.app2 .side-links a { font-size: 12.5px; color: var(--ink-soft); text-decoration: none; }
.app2 .side-links a:hover { color: var(--brand); text-decoration: underline; }
/* Account menu (B35 §1): avatar · name · organisation · chevron; the menu (Sign out)
   opens above the button. */
.app2 .acct { position: relative; }
.app2 .acct-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--r-control); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .acct-btn:hover, .app2 .acct-btn[aria-expanded="true"] { background: var(--hover); border: 0; }
.app2 .acct .av { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--avatar-bg); color: var(--ink-soft); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.app2 .acct .av-img { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.app2 .acct-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.app2 .acct-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app2 .acct-org { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app2 .acct-chev { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-soft); }
.app2 .acct-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 40; padding: 4px; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-tile); }
.app2 .acct-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 0; background: none; border-radius: var(--r-control); color: var(--ink); font: inherit; font-size: .875rem; cursor: pointer; text-align: left; }
.app2 .acct-item:hover, .app2 .acct-item:focus-visible { background: var(--hover); border: 0; }
.app2 .acct-item svg { width: 16px; height: 16px; }
/* Bottom row: Light/Dark toggle (B8) left, settings gear right. */
.app2 .side-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding: 0 4px 4px; }
.app2 .side-gear { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; border-radius: var(--r-control); color: var(--ink-soft); cursor: pointer; }
.app2 .side-gear:hover { background: var(--hover); color: var(--ink); border: 0; }
.app2 .side-gear svg { width: 16px; height: 16px; }
.app2 .theme-toggle { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; height: 32px; padding: 0 12px; border: 1px solid var(--border-c); background: none; border-radius: var(--r-control); color: var(--ink-soft); font: inherit; font-size: .8125rem; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.app2 .theme-toggle:hover { background: var(--hover); color: var(--ink); border-color: var(--brand); }
.app2 .theme-toggle svg { width: 16px; height: 16px; }

/* Main + page header */
.app2 .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app2 .phead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 64px 32px 24px; }   /* no hairline under the header (B35 §3b sign-offs) */
.app2 .phead h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }   /* page title 24/600 (B35 §3b) */
.app2 .phead .sub { color: var(--ink-soft); font-size: 15px; margin-top: 8px; max-width: var(--measure); }
.app2 .pbody { padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 32px; width: 100%; max-width: 1180px; }

/* Buttons */
.app2 .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: var(--r-control); border: 1px solid var(--border-c); background: var(--surface); color: var(--ink); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: .12s; }
/* A link styled as a button (e.g. the executive summary, which opens a PDF) looks
   exactly like one: no link underline. */
.app2 a.btn, .app2 a.btn:hover { text-decoration: none; }
.app2 .btn:hover { background: var(--hover); }
.app2 .btn svg { width: 16px; height: 16px; }
.app2 .btn.primary { background: var(--cta); border-color: transparent; color: var(--on-cta); }
.app2 .btn.primary:hover:not(:disabled) { background: var(--cta); transform: translateY(-1px); }
.app2 .btn.ghost { background: none; border-color: transparent; }
.app2 .btn.ghost:hover { background: var(--hover); }
.app2 .btn.sm { height: 30px; padding: 0 12px; font-size: .8125rem; }

/* Card */
.app2 .card { background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container); }
.app2 .card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-c); }
.app2 .card-h .t { font-size: 1rem; font-weight: 600; }
.app2 .card-h .d { font-size: .8125rem; color: var(--ink-soft); margin-top: 4px; }
.app2 .card-b { padding: 20px; }

/* Stat tiles */
.app2 .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.app2 .tile { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 16px 20px; }
.app2 .tile .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-control); background: var(--fill-soft); color: var(--ink-soft); display: grid; place-items: center; }
.app2 .tile .ic svg { width: 20px; height: 20px; }
.app2 .tile .v { font-size: 1.5rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.app2 .tile .l { font-size: .8125rem; color: var(--ink-soft); margin-top: 4px; }
/* Headline descriptor — one short, performance-positive line. Deliberately neutral
   colour (not band-coloured) so the hero carries no population-ranked verdict. */
.app2 .tile .desc { font-size: .8125rem; font-weight: 500; color: var(--ink); margin-top: 4px; }

/* Badges (pills) */
.app2 .bdg { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: .6875rem; font-weight: 600; border: 1px solid transparent; }
.app2 .bdg.strong { color: var(--c-strong-ink); background: color-mix(in srgb, var(--good) 12%, transparent); }
.app2 .bdg.mid { color: var(--ink-soft); background: var(--fill-soft); }
.app2 .bdg.low { color: var(--c-low-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* Recent rows */
.app2 .rows { display: flex; flex-direction: column; }
.app2 .row { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--border-c); }
.app2 .row:first-child { border-top: 0; }
.app2 .row .rt { font-weight: 500; font-size: .875rem; }
.app2 .row .rs { color: var(--ink-soft); font-size: .8125rem; margin-top: 4px; }
.app2 .row .sp { margin-left: auto; }

.app2 .placeholder h1 { font-size: 1.25rem; font-weight: 600; }
.app2 .placeholder .sub { color: var(--ink-soft); font-size: .875rem; margin-top: 8px; }

/* Metrics: radar hero (six-area shape) + per-area bars (detail) + roll-ups */
.app2 .rollups { display: flex; gap: 24px; }
.app2 .rollups .ru b { display: block; font-size: 1.375rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.app2 .rollups .ru span { font-size: .75rem; color: var(--ink-soft); }
.app2 .metrics-b { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; }
.app2 .radar { width: 300px; max-width: 100%; height: auto; display: block; margin: 0 auto; overflow: visible; }
.app2 .radar-grid { fill: none; stroke: var(--border-c); stroke-width: 1; }
.app2 .radar-spoke { stroke: var(--border-c); stroke-width: 1; }
.app2 .radar-area { fill: color-mix(in srgb, var(--brand) 16%, transparent); stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.app2 .radar-dot { fill: var(--brand); }
.app2 .radar-label { fill: var(--ink-soft); font-size: 11px; font-weight: 500; }
.app2 .areas { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.app2 .abar { padding: 8px 0; }
/* An ODD number of areas (a deployment that suppresses one — B25) would otherwise
   leave a lone bar in a half-empty last row. Span it instead. Count-driven, so it
   holds for any number of areas. */
.app2 .areas > .abar:last-child:nth-child(odd) { grid-column: 1 / -1; }
.app2 .abar-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.app2 .abar-name { font-size: .875rem; font-weight: 500; }
.app2 .abar-num { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.app2 .abar-track { position: relative; height: 4px; background: var(--ring-track); border-radius: var(--r-pill); overflow: hidden; margin: 8px 0 4px; }
.app2 .abar-fill { height: 100%; border-radius: var(--r-pill); }
/* Midpoint "typical" marker — per-area bars only (never the headline roll-ups). */
.app2 .abar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); background: color-mix(in srgb, var(--ink) 38%, transparent); z-index: 1; }
.app2 .abar-tag { font-size: .75rem; color: var(--ink-soft); }
.app2 .abar-tag.strong { color: var(--c-strong-ink); }
.app2 .abar-tag.low { color: var(--c-low-ink); }
.app2 .metrics-legend { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .75rem; color: var(--ink-soft); }
.app2 .legend-tick { width: 1.5px; height: 12px; flex-shrink: 0; border-radius: 1px; background: color-mix(in srgb, var(--ink) 38%, transparent); }
@media (max-width: 760px) {
  .app2 .metrics-b { grid-template-columns: 1fr; gap: 24px; }
  .app2 .areas { grid-template-columns: 1fr; }
}

/* ── Focus mode (auth + assessment flow): no sidebar, centred, slim header ── */
.app2 .focus { --focus-head-h: 64px; min-height: 100vh; display: flex; flex-direction: column; }
.app2 .focus-head { position: relative; display: flex; align-items: center; gap: 8px; height: var(--focus-head-h); padding: 0 32px; border-bottom: 1px solid var(--border-c); flex-shrink: 0; }
/* The assessment header (the one carrying progress) stays at the top of the viewport. */
.app2 .focus-head.is-pinned { position: sticky; top: 0; z-index: 5; background: var(--canvas); }
/* B35 §4: "{n}% complete · about {m} min left" centred on the page; Save and exit right. */
.app2 .focus-progress { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; display: flex; gap: 12px; align-items: baseline; font-size: 14px; white-space: nowrap; }
.app2 .focus-progress b { font-weight: 500; color: var(--ink); }
.app2 .focus-progress span { color: var(--ink-soft); }
.app2 .focus-exit { background: none; border: 0; padding: 8px 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.app2 .focus-exit:hover { color: var(--ink); border: 0; }
.app2 .focus-head .wm { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.app2 .focus-head .spacer { flex: 1; }
/* "Leave this check-in?" (the check-in header's logo link) */
.app2 .leave-dialog { max-width: 420px; }
.app2 .leave-dialog h2 { font-size: 1.125rem; font-weight: 600; }
.app2 .leave-dialog .note { margin: 8px 0 0; line-height: 1.5; color: var(--ink-soft); }
/* Phone: the centred progress collided with the lockup and "Save and exit" (both
   flows). The lockup gives way to its mark and the progress sits in the row between. */
@media (max-width: 560px) {
  .app2 .focus-head.is-pinned { padding: 0 16px; gap: 12px; }
  .app2 .focus-head.is-pinned .wm, .app2 .focus-head.is-pinned .spacer { display: none; }
  .app2 .focus-head.is-pinned .brand-lockup-img { width: 30px; height: 24px; object-fit: cover; object-position: left center; }
  .app2 .focus-head.is-pinned .focus-progress { position: static; transform: none; flex: 1; min-width: 0; justify-content: center; gap: 8px; font-size: 13px; }
  .app2 .focus-head.is-pinned .focus-exit { font-size: 13px; white-space: nowrap; }
}
.app2 .focus-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 24px 72px; }
.app2 .focus-body.wide { max-width: 1080px; }
.app2 .focus-body.narrow { max-width: 480px; padding-top: 56px; }

/* Report screen (in the sidebar shell): metrics hero, then the narrative */
.app2 .report-body { display: flex; flex-direction: column; gap: 24px; }
.app2 .report-narrative { background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container); padding: 28px 32px; }
.app2 .report-narrative .markdown { line-height: 1.7; }
.app2 .report-narrative .markdown h1 { font-size: 1.5rem; margin: 4px 0 16px; }
.app2 .report-narrative .markdown h2 { font-size: 1.15rem; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-c); }
.app2 .report-narrative .markdown h3 { font-size: 1rem; color: var(--ink); margin: 18px 0 8px; }

/* Report → Plan hand-off CTA (closes the assess → understand → improve loop) */
.app2 .report-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--home-tint); border: 0; border-radius: var(--r-container); padding: 24px 32px; }
.app2 .report-cta-text { min-width: 0; flex: 1 1 320px; }
.app2 .report-cta-eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 8px; }
.app2 .report-cta-h { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .report-cta-p { font-size: .9rem; color: var(--ink-soft); margin: 8px 0 0; max-width: 62ch; line-height: 1.55; }
.app2 .report-cta .btn.big { height: 44px; padding: 0 24px; font-size: .95rem; flex-shrink: 0; }
/* Beta-feedback prompt (only when MINDAMP_FEEDBACK_URL is set). Subtle, centred. */
.app2 .report-feedback { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: 24px 0 0; }
.app2 .report-feedback a { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.app2 .report-feedback a:hover { color: var(--brand); }
/* The last line of every report → the Support page (demo polish). */
.app2 .report-support { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 0; }
.app2 .report-support a { color: var(--ink-soft); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: 3px; }
.app2 .report-support a:hover { color: var(--brand); }

/* In-product Support / Privacy / The science pages (InfoPages.tsx). Hairline rows,
   reading measure, tokens only. */
.app2 .pbody.info { gap: 32px; max-width: calc(var(--measure) + 64px); }
.app2 .info-sec { display: flex; flex-direction: column; gap: 8px; }
.app2 .info-sec h2 { font-size: 17px; font-weight: 600; }
.app2 .info-sec p { margin: 0; font-size: var(--body-size); line-height: var(--body-lh); color: var(--ink); }
.app2 .info-meta { color: var(--ink-soft) !important; font-size: 13px !important; }
.app2 .info-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--border-c); }
.app2 .info-row b { font-size: 14px; font-weight: 600; }
.app2 .info-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border-c); }
.app2 .info-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0; border-bottom: 1px solid var(--border-c); }
.app2 .info-line-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 0; }
/* Above phone width the number always stays on the right, however long the line
   (the CALM line wrapped its number underneath at 1440). Phones stack. */
@media (min-width: 561px) { .app2 .info-line { flex-wrap: nowrap; } }
.app2 .info-line-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.app2 .info-line-d { font-size: 14px; color: var(--ink-soft); }
.app2 .info-line-num { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app2 a.info-line-num:hover { color: var(--brand); }
.app2 .info-line-l { font-size: 15px; line-height: 1.5; color: var(--ink); }
.app2 .info-line-l strong { font-weight: 600; }
.app2 .pbody.info a:not(.info-line-num):not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; }
.app2 .pbody.info a:not(.info-line-num):not(.btn):hover { color: var(--brand); }
/* A phone number never breaks across lines (the employer row's 0808 157 0192 did). */
.app2 .pbody.info a[href^="tel:"], .app2 .pbody.info a[href^="sms:"] { white-space: nowrap; }
.app2 .phead .sub.info-strong { color: var(--ink); font-weight: 500; margin-top: 4px; }
.app2 .info-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: var(--body-size); line-height: var(--body-lh); color: var(--ink); }
.app2 .info-list strong { font-weight: 600; }
.app2 .info-group { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.app2 .info-group h3 { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .info-lede { font-size: 20px !important; font-weight: 600; letter-spacing: -0.01em; }
.app2 .info-refs { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.app2 .side-links a.on { color: var(--ink); font-weight: 500; }
/* The page links live in the account menu on a phone only (the footer is hidden there). */
.app2 .acct-item-page { display: none; }
@media (max-width: 760px) { .app2 .acct-item-page { display: flex; } }

/* ── Org dashboard ──────────────────────────────────────────────────────── */
.app2 .dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.app2 .col-4 { grid-column: span 4; } .app2 .col-6 { grid-column: span 6; }
.app2 .col-8 { grid-column: span 8; } .app2 .col-12 { grid-column: span 12; }
@media (max-width: 900px) { .app2 .dash-grid > [class*="col-"] { grid-column: 1 / -1; } }
/* Lock lines: 13px meta, lock in secondary; .is-ok marks the green "protected" lock. */
.app2 .privacy-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 0; }
.app2 .privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-soft); }
.app2 .privacy-note.is-ok svg { color: var(--good); }
.app2 .page-foot { margin-top: 8px; }
/* Filters (B35 §3b): 32px pills; selected = soft fill #EEEBF8, ink 500; unselected hairline. */
.app2 .filter-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.app2 .filter-group { display: flex; align-items: center; gap: 12px; }
.app2 .filter-label { font-size: 13px; color: var(--ink-soft); }
.app2 .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.app2 .chip { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--border-c); background: var(--surface); font: inherit; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.app2 .chip:hover { color: var(--ink); border-color: var(--border-c); }
.app2 .chip.on { background: var(--fill-selected); border-color: transparent; color: var(--ink); font-weight: 500; }
.app2 .kpi { font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.app2 .kpi-sub { font-size: .8125rem; color: var(--ink-soft); margin-top: 8px; }
/* A measure: name 15/500 + description meta on one line, score right as meta, 4px bar. */
.app2 .driver { padding: 8px 0; }
.app2 .driver-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.app2 .driver-h .nm { font-size: 15px; font-weight: 500; color: var(--ink); }
.app2 .driver-note { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.app2 .driver-h .vl { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.app2 .meter { height: 4px; border-radius: var(--r-pill); background: var(--ring-track); overflow: hidden; }
.app2 .meter > div { height: 100%; border-radius: var(--r-pill); }
/* Charts are exempt from the 4px bar rule (B35 §3b): the distribution bar stays 12px. */
.app2 .dist { display: flex; height: 12px; border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--border-c); }
.app2 .dist > span { display: block; height: 100%; }
.app2 .legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.app2 .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
/* Inferred indicators: 3×2 hairline tiles, 12px radius, number 24/600 ink. */
.app2 .ind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app2 .ind { border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 16px 20px; }
.app2 .ind .iv { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.2; }
.app2 .ind .il { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
@media (max-width: 900px) { .app2 .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app2 .tag-measured, .app2 .tag-derived, .app2 .tag-inferred { font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: var(--r-pill); color: var(--ink-soft); background: var(--fill-soft); }

/* Hero band — the three indices, heavier than the detail panels below */
.app2 .dash-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.app2 .hcard { background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container); padding: 24px 24px; }
.app2 .hcard .hl { font-size: .8125rem; font-weight: 500; color: var(--ink-soft); }
.app2 .hcard .hv { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-top: 12px; color: var(--ink); }
.app2 .hcard .hd { margin-top: 12px; }
/* Delta: plain 13/500 text (green ▲ / amber ▼), no pill. */
.app2 .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.app2 .delta.up { color: var(--c-strong-ink); }
.app2 .delta.down { color: var(--c-low-ink); }
.app2 .delta.flat { color: var(--ink-soft); }
@media (max-width: 760px) { .app2 .dash-hero { grid-template-columns: 1fr; } }

/* Trend chart */
.app2 .trend { width: 100%; height: auto; display: block; overflow: visible; }
.app2 .trend .grid { stroke: var(--border-c); stroke-width: 1; }
.app2 .trend .axis { fill: var(--ink-soft); font-size: 12px; }
.app2 .trend .lineW { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.app2 .trend .lineP { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.app2 .trend .dotW { fill: var(--brand); } .app2 .trend .dotP { fill: var(--ink); }
.app2 .trend-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app2 .trend-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-soft); }
.app2 .trend-legend i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; margin-right: 8px; vertical-align: middle; }
.app2 .trend-cap { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
/* Dashboard card titles 17/600 (chart, distribution, inferred). */
.app2 .dash-card .card-h .t { font-size: 17px; font-weight: 600; }
.app2 .dash-card .card-h .d { font-size: 13px; }

/* Privacy-guard state (narrow filter combos) */
.app2 .guard-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: var(--r-container); padding: 24px 28px; color: var(--ink-soft); }
.app2 .guard-card svg { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; }
.app2 .guard-card strong { color: var(--ink); display: block; margin-bottom: 4px; }
.app2 details > summary::-webkit-details-marker { display: none; }
.app2 details[open] .card-h { border-bottom: 1px solid var(--border-c); }
/* "In detail" (B35 §3b): rows on hairlines under a label, not cards. 64px closed
   (16/500 title + description meta, Measured pill, chevron right); 72px open (20/600,
   chevron turned up), the measures below. */
.app2 .dd-group { display: flex; flex-direction: column; }
.app2 .dd-group-h { font-size: 13px; font-weight: 500; color: var(--ink-soft); padding-bottom: 12px; border-bottom: 1px solid var(--border-c); }
.app2 .dd-row { border-bottom: 1px solid var(--border-c); }
.app2 .dd-head { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 8px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.app2 .dd-row.open .dd-head { min-height: 72px; }
.app2 .dd-head:hover .dd-title { color: var(--brand); }
.app2 .dd-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.app2 .dd-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; transition: color .12s; }
.app2 .dd-row.open .dd-title { font-size: 20px; font-weight: 600; }
.app2 .dd-desc { font-size: 13px; color: var(--ink-soft); }
.app2 .dd-chev { display: grid; place-items: center; flex-shrink: 0; color: var(--ink-soft); transition: transform .2s ease; }
.app2 .dd-row.open .dd-chev { transform: rotate(-90deg); }
.app2 .dd-body { padding: 0 0 24px; }
.app2 .dd-drivers-h { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin: 16px 0 12px; }
.app2 .dd-drivers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app2 .dd-driver { border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 16px 20px; }
.app2 .dd-driver-v { font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--c-low-ink); }
.app2 .dd-driver-l { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ── Content library ────────────────────────────────────────────────────── */
.app2 .lib-cat { display: flex; flex-direction: column; gap: 12px; }
/* Categories are page sections: the 32px body gap + 24px = 56px (B35 §1). */
.app2 .lib-cat + .lib-cat { margin-top: 24px; }
.app2 .lib-cat-h { display: flex; align-items: baseline; gap: 8px; }
.app2 .lib-cat-h h2 { font-size: 1.0625rem; font-weight: 600; }
.app2 .lib-cat-h .ct { font-size: .78rem; color: var(--ink-soft); }
.app2 .lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.app2 .lib-card { display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 0; overflow: hidden; cursor: pointer; transition: border-color .12s; font: inherit; color: inherit; }
.app2 .lib-card:hover { border-color: var(--ink-soft); }
/* Card image — structured slot, empty placeholder for now (Figma assets later) */
.app2 .lib-card-img { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--hover); border-bottom: 1px solid var(--border-c); color: color-mix(in srgb, var(--ink) 20%, transparent); }
.app2 .lib-card-img svg { width: 26px; height: 26px; }
.app2 .lib-card-img img { width: 100%; height: 100%; object-fit: cover; }
/* Branded placeholder (until a real image is dropped in) — intentional, not a missing-image icon */
.app2 .lib-card-img-ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--fill-soft); color: var(--ink-soft); }
.app2 .lib-card-img-ph svg { width: 30px; height: 30px; opacity: .85; }
.app2 .lib-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px; }
.app2 .lib-card:hover .lib-card-body { background: var(--hover); }
.app2 .lib-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app2 .ctype { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); }
.app2 .ctype svg { width: 15px; height: 15px; }
.app2 .lib-dur { font-size: .72rem; color: var(--ink-soft); }
.app2 .lib-card h3 { font-size: .95rem; font-weight: 600; line-height: 1.35; }
.app2 .lib-card p { font-size: .8125rem; color: var(--ink-soft); line-height: 1.45; margin: 0; }
.app2 .lib-card .go { margin-top: 4px; font-size: .78rem; font-weight: 500; color: var(--ink); }

/* Library detail */
.app2 .lib-detail { display: flex; flex-direction: column; gap: 20px; max-width: var(--measure); }
/* Video poster: the card image fills the frame (or the placeholder on error), the play
   button sits centred over a subtle scrim. */
.app2 .lib-player { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r-tile); overflow: hidden; border: 1px solid var(--border-c); display: grid; place-items: center; background: var(--fill-soft); }
.app2 .lib-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app2 .lib-player .lib-card-img-ph { position: absolute; inset: 0; }
.app2 .lib-player::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, color-mix(in srgb, var(--ink) 24%, transparent), transparent 60%); }
.app2 .lib-play { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-c); display: grid; place-items: center; box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 16%, transparent); }
.app2 .lib-play svg { width: 26px; height: 26px; color: var(--ink); margin-left: 4px; }
/* Audio cover art above the waveform player. */
.app2 .lib-cover { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r-tile); overflow: hidden; border: 1px solid var(--border-c); margin-bottom: 16px; }
.app2 .lib-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app2 .lib-cover .lib-card-img-ph { position: absolute; inset: 0; }
.app2 .lib-audio { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 16px 16px; }
.app2 .lib-audio .pp { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--cta); color: var(--on-cta); display: grid; place-items: center; }
.app2 .lib-audio .pp svg { width: 18px; height: 18px; margin-left: 4px; }
.app2 .lib-wave { flex: 1; height: 32px; display: flex; align-items: center; gap: 4px; }
.app2 .lib-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink-soft) 40%, var(--border-c)); }
.app2 .lib-body { font-size: var(--body-size); line-height: var(--body-lh); }
.app2 .lib-body h3 { font-size: 1.05rem; font-weight: 600; margin: 24px 0 8px; }
.app2 .lib-body p { margin: 0 0 16px; }
.app2 .lib-try { background: var(--fill-soft); border: 0; border-radius: var(--r-tile); padding: 16px 16px; font-size: var(--body-size); color: var(--ink); }
.app2 .lib-try .h { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.app2 .lib-tool { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-tile); padding: 16px; }
.app2 .lib-tool .step { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; }
.app2 .lib-tool .step i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--fill-soft); color: var(--ink); display: grid; place-items: center; font-size: .75rem; font-weight: 600; font-style: normal; }

/* ── Personal plan ──────────────────────────────────────────────────────── */
.app2 .plan-banner { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container); padding: 20px 24px; }
.app2 .pb-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-control); background: var(--fill-soft); color: var(--ink); display: grid; place-items: center; }
.app2 .pb-icon svg { width: 22px; height: 22px; }
.app2 .pb-h { font-size: 1rem; font-weight: 600; }
.app2 .pb-text p { font-size: var(--body-size); line-height: var(--body-lh); color: var(--ink); margin: 4px 0 12px; max-width: var(--measure); }
.app2 .pb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.app2 .pb-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-pill); padding: 4px 12px; }
.app2 .pb-chip b { font-weight: 600; }

.app2 .plan-sec { padding: 0; overflow: hidden; } /* clips the header's square bottom border inside the 16px corners when collapsed */
.app2 .plan-sec.is-primary { border-color: var(--border-c); }
.app2 .plan-sec-h { align-items: flex-start; cursor: pointer; list-style: none; gap: 16px; }
.app2 .plan-sec-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: 1; flex-wrap: wrap; }
.app2 .plan-sec-titles { min-width: 0; }
.app2 .plan-kind { display: inline-block; font-size: 13px; font-weight: 500; color: var(--ink-soft); background: var(--fill-soft); border-radius: var(--r-pill); padding: 4px 12px; margin-bottom: 8px; }
.app2 .plan-sec-h .t { font-size: 1.0625rem; font-weight: 600; }
.app2 .plan-sec-h .d { font-size: .8125rem; color: var(--ink-soft); margin-top: 4px; max-width: var(--measure); }
.app2 .plan-mix { display: flex; gap: 8px; flex-shrink: 0; }
.app2 .mixchip { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; color: var(--ink-soft); }
.app2 .mixchip svg { width: 15px; height: 15px; }
.app2 .plan-sec-h .chev { color: var(--ink-soft); flex-shrink: 0; transition: transform .15s; margin-top: 4px; }
.app2 details[open] .plan-sec-h .chev { transform: rotate(180deg); }
.app2 .plan-items { display: flex; flex-direction: column; padding: 4px 8px 8px; }
.app2 .plan-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border-c); }
.app2 .plan-items .plan-item:first-child { border-top: 0; }
.app2 .pi-ic { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--r-control); background: var(--hover); color: var(--ink-soft); display: grid; place-items: center; }
.app2 .pi-ic svg { width: 16px; height: 16px; }
.app2 .pi-step { flex: 1; min-width: 0; font-size: .9rem; font-weight: 500; }
.app2 .pi-type { font-size: .75rem; color: var(--ink-soft); flex-shrink: 0; }
.app2 .pi-native { font-size: .75rem; color: var(--ink-soft); font-style: italic; flex-shrink: 0; padding-right: 4px; }
.app2 .plan-foot { font-size: .8125rem; color: var(--ink-soft); margin-top: 4px; }

/* ── My plan — option A: one path (B35 round 2 §5) ─────────────────────────── */
.app2 .plan2 { padding: 32px 40px 64px; max-width: 1080px; display: flex; flex-direction: column; gap: 24px; }
.app2 .plan2-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.app2 .plan2-titles { display: flex; flex-direction: column; gap: 6px; max-width: var(--measure); }
.app2 .plan2-head h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.app2 .plan2-head .sub { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.app2 .plan2-progress { display: flex; flex-direction: column; gap: 8px; width: 280px; max-width: 100%; }
.app2 .plan2-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.app2 .plan2-count { font-size: 15px; font-weight: 600; }
.app2 .plan2-track { height: 4px; border-radius: var(--r-pill); background: var(--ring-track); overflow: hidden; }
.app2 .plan2-fill { height: 100%; width: 100%; border-radius: var(--r-pill); background: var(--ink); transform-origin: left center; }
.app2 .plan2-meta { font-size: 13px; color: var(--ink-soft); }
.app2 .plan2-nowrap { white-space: nowrap; }
.app2 .plan2-lbl { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
/* Up next — the page's one tint */
.app2 .plan2-next { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 16px 28px 16px 16px; border-radius: var(--r-container); background: var(--tint-soft); }
.app2 .plan2-thumb { width: 240px; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--fill-soft); display: grid; place-items: center; color: var(--ink-soft); }
.app2 .plan2-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app2 .plan2-thumb-ph svg { width: 28px; height: 28px; }
.app2 .plan2-next-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.app2 .plan2-next-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.app2 .plan2-next .btn { white-space: nowrap; }
.app2 .plan2-next .btn svg, .app2 .plan2-act svg { width: 16px; height: 16px; }
/* Results line between hairlines */
.app2 .plan2-results { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--border-c); border-bottom: 1px solid var(--border-c); }
.app2 .plan2-results-l { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; font-size: 14px; }
.app2 .plan2-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border-c); font-size: 13px; }
.app2 .plan2-chip b { font-weight: 600; color: var(--ink-soft); }
.app2 .plan2-link, .app2 .plan2-act, .app2 .plan2-revisit { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; color: var(--ink); }
.app2 .plan2-link { font-size: 13px; font-weight: 500; }
.app2 .plan2-link:hover, .app2 .plan2-act:hover, .app2 .plan2-revisit:hover { color: var(--brand); }
.app2 .plan2-act { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; min-height: 44px; }
.app2 .plan2-act:disabled { opacity: .5; cursor: default; }
.app2 .plan2-revisit { font-size: 13px; color: var(--ink-soft); min-height: 44px; }
/* The stepper: a 24px node column with the connector, then the stage */
.app2 .plan2-path { display: flex; flex-direction: column; padding-top: 4px; } /* full width: right edge lines up with the header's progress block */
.app2 .plan2-stage { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 20px; }
.app2 .plan2-rail { display: flex; flex-direction: column; align-items: center; }
.app2 .plan2-node { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); border: 2px solid var(--control-line); color: var(--canvas); }
.app2 .plan2-stage.is-done .plan2-node { background: var(--ink); border-color: var(--ink); }
.app2 .plan2-stage.is-done .plan2-node svg { width: 14px; height: 14px; }
.app2 .plan2-stage.is-current .plan2-node { border-color: var(--ink); }
.app2 .plan2-node-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.app2 .plan2-line { flex: 1 1 auto; width: 2px; margin: 4px 0; background: var(--border-c); }
.app2 .plan2-stage.is-done .plan2-line { background: var(--ink); }
.app2 .plan2-stage-body { display: flex; flex-direction: column; padding-bottom: 28px; min-width: 0; }
.app2 .plan2-stage-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-height: 24px; }
.app2 .plan2-stage-t { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.app2 .plan2-stage-h h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .plan2-stage-d { margin: 4px 0 8px; font-size: 14px; color: var(--ink-soft); max-width: var(--measure); }
.app2 .plan2-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 52px; }
.app2 .plan2-row.is-current { margin: 4px -16px; padding: 10px 16px; border-radius: var(--r-tile); background: var(--fill-soft); }
.app2 .plan2-mark { display: flex; justify-content: center; color: var(--good); }
.app2 .plan2-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.app2 .plan2-ring { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--control-line); }
.app2 .plan2-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.app2 .plan2-row-title { font-size: 15px; color: var(--ink); }
.app2 .plan2-row.is-done .plan2-row-title { color: var(--ink-soft); }
.app2 .plan2-row.is-current .plan2-row-title { font-weight: 600; }
.app2 .plan2-typ { font-size: 13px; color: var(--ink-soft); }
.app2 .plan2-row-act { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.app2 .plan2-holding { align-self: flex-start; }
.app2 .plan2-next .btn, .app2 .lib2-lead-btn { height: 44px; padding: 0 20px; font-size: 15px; }
.app2 .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Library home (B35 round 2 §2) ─────────────────────────────────────────── */
.app2 .lib2 { padding: 32px 40px 64px; max-width: 1260px; display: flex; flex-direction: column; gap: 24px; }
.app2 .lib2-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.app2 .lib2-titles { display: flex; flex-direction: column; gap: 6px; }
.app2 .lib2-head h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.app2 .lib2-head .sub { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.app2 .lib2-search { display: flex; align-items: center; gap: 10px; width: 320px; max-width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--control-line); border-radius: var(--r-control); color: var(--ink-soft); background: var(--surface); }
.app2 .lib2-search:focus-within { border-color: var(--ink); }
.app2 .lib2-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 15px; color: var(--ink); }
.app2 .lib2-lbl { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .lib2-meta { font-size: 13px; color: var(--ink-soft); }
.app2 .lib2-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.app2 .lib2-link:hover { color: var(--brand); }
.app2 .lib2-plan { display: flex; flex-direction: column; gap: 14px; }
.app2 .lib2-plan-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.app2 .lib2-plan-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.app2 .lib2-lead { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 200px; border: 0; padding: 0; border-radius: var(--r-container); overflow: hidden; background: var(--tint-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.app2 .lib2-lead .lib2-im { aspect-ratio: auto; height: 100%; border-radius: 0; }
.app2 .lib2-lead-text { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px 28px; min-width: 0; }
.app2 .lib2-lead-title { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.app2 .lib2-lead-btn { align-self: flex-start; margin-top: 8px; }
.app2 .lib2-lead:hover .lib2-lead-title, .app2 .lib2-card:hover .lib2-tt { color: var(--brand); }
.app2 .lib2-filters { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; border-top: 1px solid var(--border-c); }
.app2 .lib2-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app2 .lib2-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.app2 .lib2-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--control-line); background: var(--surface); font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.app2 .lib2-chip[aria-pressed="true"] { background: var(--fill-selected); border-color: transparent; }
.app2 .lib2-chip:hover:not([aria-pressed="true"]) { border-color: var(--control-line-hover); }
.app2 .lib2-jumps { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.app2 .lib2-jump { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--ink-soft); white-space: nowrap; cursor: pointer; }
.app2 .lib2-jump:hover { color: var(--ink); text-decoration: underline; }
.app2 .lib2-area { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.app2 .lib2-area-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.app2 .lib2-area-h h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .lib2-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.app2 .lib2-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 0; padding: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .lib2-im { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-tile); overflow: hidden; background: var(--fill-soft); color: var(--ink-soft); }
.app2 .lib2-im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app2 .lib2-ph svg { width: 24px; height: 24px; }
.app2 .lib2-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: #FFFFFF; font-size: 12px; font-weight: 500; color: #1A1A22; }
.app2 .lib2-badge svg { color: #2E7D58; }
/* Started video / audio: a 4px progress line along the image bottom (with "N min left"). */
.app2 .lib2-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(26, 26, 34, 0.15); }
.app2 .lib2-prog span { display: block; height: 100%; width: 100%; background: #1A1A22; transform-origin: left center; }
.app2 .lib2-card-text { display: flex; flex-direction: column; gap: 3px; }
.app2 .lib2-tt { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.app2 .lib2-empty { margin: 0; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 1080px) {
  .app2 .lib2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app2 .lib2-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app2 .lib2-lead { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app2 .lib2 { padding: 24px 16px 48px; }
  .app2 .lib2-head h1 { font-size: 26px; }
  .app2 .lib2-search { width: 100%; }
  .app2 .lib2-lead { grid-template-columns: minmax(0, 1fr); }
  .app2 .lib2-lead .lib2-im { aspect-ratio: 16 / 9; height: auto; }
  .app2 .lib2-grid { gap: 16px; }
}
@media (max-width: 480px) {
  .app2 .lib2-grid, .app2 .lib2-plan-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Library item pages (B35 round 2 §3) ─────────────────────────────────────── */
.app2 .li { padding: 24px 40px 64px; max-width: 1100px; display: flex; flex-direction: column; gap: 20px; }
.app2 .li-crumb { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); min-width: 0; }
.app2 .li-crumb-cat { white-space: nowrap; }
.app2 .li-crumb-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .app2 .li-crumb-cat, .app2 .li-crumb-cat + span { display: none; } }
.app2 .li-crumb-back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.app2 .li-crumb-back:hover { color: var(--brand); }
.app2 .li-strip { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 20px; border-radius: var(--r-tile); background: var(--fill-soft); }
/* The text takes what's left and wraps inside itself; the controls (tracker + action)
   keep one row on the right. */
.app2 .li-strip-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.app2 .li-strip-h { font-size: 15px; font-weight: 500; }
.app2 .li-strip-s { font-size: 13px; color: var(--ink-soft); }
.app2 .li-strip-done { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 15px; font-weight: 500; white-space: nowrap; }
.app2 .li-strip-ctl { display: flex; align-items: center; gap: 24px; flex: 0 0 auto; margin-left: auto; flex-wrap: nowrap; }
.app2 .li-track { display: flex; gap: 2px; width: 210px; max-width: 100%; flex-wrap: wrap; }
.app2 .li-track span { flex: 1 1 8px; min-width: 8px; height: 4px; border-radius: var(--r-pill); background: var(--ring-track); }
.app2 .li-track span.d { background: var(--ink); }
.app2 .li-track span.c { background: #9C9CA8; }
.app2 .li-green { color: var(--good); display: inline-flex; }
.app2 .li-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; min-height: 32px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; }
.app2 .li-link:hover { color: var(--brand); }
.app2 .li-btn { height: 44px; padding: 0 20px; font-size: 15px; }
.app2 .li-btn-2 { height: 44px; padding: 0 18px; font-size: 15px; border-color: var(--control-line); }
.app2 .li-grid { display: grid; grid-template-columns: minmax(0, 680px) 304px; gap: 48px; align-items: start; }
.app2 .li-grid.no-rail { grid-template-columns: minmax(0, 680px); }
.app2 .li-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.app2 .li-head { display: flex; flex-direction: column; gap: 10px; }
.app2 .li-head h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.app2 .li-stand { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.app2 .li-meta { font-size: 13px; color: var(--ink-soft); }
.app2 .li-lbl { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .li-byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.app2 .li-byline b { font-weight: 500; }
.app2 .li-ini { width: 28px; height: 28px; border-radius: 50%; background: var(--fill-soft); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.app2 .li-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-soft); }
.app2 .li-ph svg { width: 28px; height: 28px; }
.app2 .li-hero, .app2 .li-banner, .app2 .li-cover, .app2 .li-next-thumb { position: relative; overflow: hidden; background: var(--fill-soft); }
.app2 .li-hero img, .app2 .li-banner img, .app2 .li-cover img, .app2 .li-next-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app2 .li-hero { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-container); }
.app2 .li-banner { width: 100%; aspect-ratio: 680 / 220; border-radius: var(--r-container); }
/* ── Library player (boards R2-03 / R2-04; Player.tsx) ──
   Always rendered for video and audio. The video box is dark in every theme (it is a
   picture); the audio card follows the theme tokens. */
.app2 .pl-video { position: relative; width: 100%; border-radius: var(--r-container); overflow: hidden; background: #24232E; color: #FFFFFF; user-select: none; }
.app2 .pl-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.app2 .pl-video:fullscreen { border-radius: 0; width: 100vw; height: 100vh; }
.app2 .pl-video:fullscreen .pl-stage { aspect-ratio: auto; height: 100%; }
.app2 .pl-media, .app2 .pl-poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.app2 .pl-media { object-fit: contain; background: #000; }
.app2 .pl-poster { overflow: hidden; cursor: pointer; }
.app2 .pl-poster img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 45%; animation: pl-zoom 48s linear infinite alternate; animation-play-state: paused; }
.app2 .pl-video.is-playing .pl-poster img { animation-play-state: running; }
@keyframes pl-zoom { from { transform: scale(1); } to { transform: scale(1.12); } }
/* Centre button: shown with the controls (play when paused, pause while playing). */
.app2 .pl-big { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: 0; background: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.25s ease; }
.app2 .pl-big:focus-visible, .app2 .pl-ctl:focus-visible, .app2 .pl-scrub:focus-visible, .app2 .pl-a-play:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.app2 .pl-caption { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); width: max-content; max-width: min(80%, 620px); margin: 0; padding: 6px 12px; border-radius: 6px; background: rgba(18, 18, 24, 0.82); color: #FFFFFF; font-size: 15px; line-height: 1.45; text-align: center; transition: bottom 0.25s ease; }
/* Compact bar: 64px, 12px padding, on a semi-transparent scrim behind the bar only.
   The 4px chapter-segmented scrubber runs along its top edge (16px hit area, centred
   on the edge); below it one 40px row. */
.app2 .pl-bar { position: absolute; left: 0; right: 0; bottom: 0; box-sizing: border-box; height: 64px; padding: 12px; background: rgba(18, 18, 24, 0.62); container-type: inline-size; transition: opacity 0.25s ease; }
.app2 .pl-bar .pl-scrub { position: absolute; left: 12px; right: 12px; top: -6px; }
.app2 .pl-row { display: flex; align-items: center; gap: 2px; height: 40px; min-width: 0; }
.app2 .pl-time { flex-shrink: 0; padding: 0 4px 0 6px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app2 .pl-chapter { flex: 1 1 0; min-width: 0; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: rgba(255, 255, 255, 0.7); }
/* Icon buttons: 32px visual, 40px hit area. */
.app2 .pl-ctl { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 4px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: 500 13px Inter, system-ui, sans-serif; cursor: pointer; }
.app2 .pl-ctl::before { content: ""; position: absolute; inset: 4px; border-radius: 8px; background: transparent; transition: background 0.15s; }
.app2 .pl-ctl:not(:disabled):hover::before { background: rgba(255, 255, 255, 0.14); }
.app2 .pl-ctl > * { position: relative; }
.app2 .pl-ctl svg { width: 20px; height: 20px; }
.app2 .pl-ctl:disabled { opacity: 0.45; cursor: default; }
.app2 .pl-cc span { border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 4px; font-size: 11px; font-weight: 600; line-height: 1.2; }
.app2 .pl-cc[aria-pressed="true"] span { background: #FFFFFF; color: #1A1A22; border-color: #FFFFFF; }
/* Quiet after 2.5 s of playback (Player.tsx HIDE_CONTROLS_AFTER_MS); back on mouse
   move, tap, key or pause. Keyboard focus inside keeps them showing. */
.app2 .pl-video.is-idle { cursor: none; }
.app2 .pl-video.is-idle .pl-bar, .app2 .pl-video.is-idle .pl-big { opacity: 0; pointer-events: none; }
.app2 .pl-video.is-idle:has(:focus-visible) .pl-bar { opacity: 1; pointer-events: auto; }
.app2 .pl-video.is-idle .pl-caption { bottom: 20px; }
@container (max-width: 460px) { .app2 .pl-chapter { visibility: hidden; padding: 0; } }
.app2 [aria-disabled="true"] { cursor: default; }
/* Scrubber: one segment per chapter */
.app2 .pl-scrub { display: flex; gap: 3px; align-items: center; height: 16px; cursor: pointer; touch-action: none; border-radius: 4px; }
.app2 .pl-seg { flex-grow: 0; flex-shrink: 0; min-width: 4px; height: 4px; border-radius: 2px; overflow: hidden; }
.app2 .pl-seg span { display: block; width: 100%; height: 100%; transform-origin: left center; }
.app2 .pl-scrub.dark .pl-seg { background: rgba(255, 255, 255, 0.35); }
.app2 .pl-scrub.dark .pl-seg span { background: #FFFFFF; }
.app2 .pl-scrub.light .pl-seg { background: var(--ring-track); }
.app2 .pl-scrub.light .pl-seg span { background: var(--ink); }
/* Audio card */
.app2 .pl-audio { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px; border: 1px solid var(--border-c); border-radius: var(--r-container); }
.app2 .li-cover { width: 176px; height: 176px; flex-shrink: 0; border-radius: var(--r-tile); }
.app2 .pl-a-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.app2 .pl-a-head { display: flex; flex-direction: column; gap: 2px; }
.app2 .pl-a-title { font-size: 17px; font-weight: 600; }
.app2 .pl-a-scrub { display: flex; flex-direction: column; gap: 4px; }
.app2 .pl-a-times { display: flex; justify-content: space-between; font-size: 12px; font-variant-numeric: tabular-nums; }
/* Audio controls: the same compact buttons (32px visual / 40px hit), a 48px play. */
.app2 .pl-a-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.app2 .pl-group { display: flex; align-items: center; gap: 4px; }
.app2 .pl-a-row .pl-group { gap: 6px; }
.app2 .pl-a-row .pl-ctl { color: var(--ink); }
.app2 .pl-a-row .pl-ctl:hover::before { background: var(--fill-soft); }
.app2 .pl-a-play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: var(--canvas); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.app2 .pl-a-speed { gap: 10px; }
.app2 .pl-chips { display: inline-flex; border: 1px solid var(--control-line); border-radius: var(--r-control); overflow: hidden; }
.app2 .pl-chips button { height: 32px; min-width: 52px; padding: 0 10px; border: 0; border-left: 1px solid var(--control-line); background: var(--surface); font: 500 13px Inter, system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.app2 .pl-chips button:first-child { border-left: 0; }
.app2 .pl-chips button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }
/* Under the player: the headphones line (audio) and "Read this session". */
.app2 .pl-wrap { display: flex; flex-direction: column; gap: 12px; }
.app2 .pl-under { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.app2 .pl-note { display: flex; align-items: center; gap: 8px; margin: 0; }
.app2 .pl-read-toggle { gap: 6px; font-size: 14px; }
/* Chapters: one row per chapter — number · title · start time. Rail card (video) or
   a flat list under the player (audio). The current chapter is the soft lavender row. */
.app2 .pl-chaps { display: flex; flex-direction: column; gap: 2px; }
.app2 .pl-chaps.li-card { gap: 2px; }
.app2 .pl-chaps-flat { margin-top: 8px; }
.app2 .pl-chaps-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0 6px; }
.app2 .pl-chaps-flat .pl-chaps-h { padding: 0 12px 6px; }
.app2 .pl-chap { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-control); background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .pl-chaps.li-card .pl-chap { margin: 0 -12px; }
.app2 .pl-chap:not(.on):hover { background: var(--fill-quiet); }
.app2 .pl-chap.on { background: var(--fill-selected); color: var(--brand); font-weight: 500; }
.app2 .pl-chap-n, .app2 .pl-chap-at { font-size: 13px; font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.app2 .pl-chap-at { text-align: right; }
.app2 .pl-chap.on .pl-chap-n, .app2 .pl-chap.on .pl-chap-at { color: var(--brand); }
/* Reading view: the transcript as prose under 17/600 chapter headings. */
.app2 .pl-read { gap: 24px; }
.app2 .pl-read-ch { display: flex; flex-direction: column; gap: 10px; }
.app2 .pl-read-ch h3 { margin: 0; }
.app2 .pl-read-h { border: 0; background: none; padding: 0; font: inherit; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .pl-read-h:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.app2 .pl-read-h:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
/* Preview items (transcript, no media yet): the reading view's plain chapter headings at
   the same 17/600; the "coming soon" note inside the player once a control is pressed —
   a pill at the top of the video picture, a soft line under the audio title. */
.app2 .pl-read-t { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }
.app2 .pl-pv p { margin: 0; font-size: 14px; line-height: 1.45; }
.app2 .pl-video .pl-pv { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: max-content; max-width: min(88%, 620px); pointer-events: none; }
.app2 .pl-video .pl-pv p { padding: 8px 14px; border-radius: 8px; background: rgba(18, 18, 24, 0.86); color: #FFFFFF; text-align: center; }
.app2 .pl-audio .pl-pv p { padding: 8px 12px; border-radius: var(--r-control); background: var(--fill-soft); color: var(--ink); }
/* Article points / video takeaways */
.app2 .li-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app2 .li-points.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* An odd-numbered point list: the last tile spans both columns (no lone half-width tile). */
.app2 .li-points:not(.three) > .li-point:last-child:nth-child(odd) { grid-column: 1 / -1; }
.app2 .li-point { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: var(--r-tile); background: var(--fill-quiet); }
.app2 .li-sec .li-point p { font-size: 14px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
  .app2 .pl-poster img { animation: none; }
}
/* Body */
.app2 .li-body { display: flex; flex-direction: column; gap: 32px; }
.app2 .li-sec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.app2 .li-sec h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .li-sec p { margin: 0; font-size: 15px; line-height: 1.6; }
.app2 .li-try, .app2 .li-example { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--r-tile); background: var(--fill-quiet); }
.app2 .li-transcript, .app2 .li-chapters, .app2 .li-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.app2 .li-transcript li, .app2 .li-chapters li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 8px 0; font-size: 15px; line-height: 1.6; }
.app2 .li-t { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; padding-top: 2px; }
.app2 .li-steps-h { display: flex; align-items: center; gap: 16px; }
.app2 .li-steps-h h2 { flex: 1; }
.app2 .li-steps-bar { width: 120px; height: 4px; border-radius: var(--r-pill); background: var(--ring-track); overflow: hidden; }
.app2 .li-steps-bar span, .app2 .li-mini-bar span { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: left center; }
.app2 .li-steps li { border-top: 1px solid var(--border-c); }
.app2 .li-steps li:last-child { border-bottom: 1px solid var(--border-c); }
.app2 .li-steps li.is-open { background: var(--fill-soft); border-radius: var(--r-tile); border-color: transparent; padding-bottom: 16px; }
.app2 .li-chk { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0 20px; cursor: pointer; }
.app2 .li-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app2 .li-box { width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid #9C9CA8; border-radius: 6px; display: grid; place-items: center; color: var(--canvas); }
.app2 .li-box svg { opacity: 0; }
.app2 .li-chk input:checked + .li-box { background: var(--ink); border-color: var(--ink); }
.app2 .li-chk input:checked + .li-box svg { opacity: 1; }
.app2 .li-chk input:focus-visible + .li-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.app2 .li-step-n { font-size: 13px; color: var(--ink-soft); }
.app2 .li-step-t { font-size: 15px; font-weight: 500; }
.app2 .li-chk input:checked ~ .li-step-t { font-weight: 400; color: var(--ink-soft); }
.app2 .li-step-open { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 0 76px; }
.app2 .li-example { background: var(--surface); border: 1px solid var(--border-c); }
/* Completion row + Up next */
.app2 .li-complete { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border-c); font-size: 15px; }
.app2 .li-complete-done { display: inline-flex; align-items: center; gap: 8px; }
.app2 .li-next { display: flex; flex-direction: column; gap: 10px; }
.app2 .li-next-card { display: flex; align-items: center; gap: 20px; padding: 12px 20px 12px 12px; border: 1px solid var(--border-c); border-radius: var(--r-container); background: var(--surface); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .li-next-card:hover .li-next-title, .app2 .li-next-card:hover .li-next-go { color: var(--brand); }
.app2 .li-next-thumb { width: 160px; height: 90px; flex-shrink: 0; border-radius: 10px; }
.app2 .li-next-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.app2 .li-next-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .li-next-go { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; white-space: nowrap; }
/* Rail */
.app2 .li-rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.app2 .li-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; border: 1px solid var(--border-c); border-radius: var(--r-container); }
.app2 .li-card p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.app2 .li-toc, .app2 .li-chap { display: grid; grid-template-columns: auto; gap: 8px; min-height: 44px; align-items: center; padding: 0 12px; border: 0; border-radius: var(--r-control); background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .li-chap { grid-template-columns: 44px minmax(0, 1fr); cursor: default; }
.app2 .li-toc.on, .app2 .li-chap.on { background: var(--fill-selected); color: var(--brand); font-weight: 500; }
.app2 .li-more { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border: 0; border-top: 1px solid var(--border-c); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.app2 .li-more:hover .li-more-t { color: var(--brand); }
.app2 .li-more-t { font-size: 14px; font-weight: 500; }
.app2 .li-mini { gap: 0; padding: 20px 16px; }
.app2 .li-mini-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 8px 10px; }
.app2 .li-mini-bar { display: block; height: 4px; margin: 0 8px 4px; border-radius: var(--r-pill); background: var(--ring-track); overflow: hidden; }
.app2 .li-mini-stage { border-top: 1px solid var(--border-c); padding: 10px 0; }
.app2 .li-mini-stage:first-of-type { border-top: 0; }
.app2 .li-mini-sh { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding: 0 8px; font-size: 14px; }
.app2 .li-mini-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; margin-top: 4px; border-radius: var(--r-control); font-size: 14px; }
.app2 .li-mini-row.here { background: var(--fill-soft); }
.app2 .li-mini-mark { display: flex; justify-content: center; padding-top: 3px; }
.app2 .li-mini-ring, .app2 .li-mini-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--control-line); }
.app2 .li-mini-dot { border-color: var(--ink); box-shadow: inset 0 0 0 2.5px var(--canvas), inset 0 0 0 6px var(--ink); }
.app2 .li-muted { color: var(--ink-soft); }
@media (max-width: 1080px) {
  .app2 .li-grid { grid-template-columns: minmax(0, 1fr); }
  .app2 .li-rail { position: static; }
}
@media (max-width: 760px) {
  .app2 .li { padding: 16px 16px 48px; }
  .app2 .li-head h1 { font-size: 26px; }
  .app2 .li-track { width: 100%; }
  .app2 .li-strip-t { flex-basis: 100%; }
  .app2 .li-strip-ctl { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; gap: 12px 24px; }
  .app2 .pl-audio { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .app2 .li-cover { width: 100%; height: auto; aspect-ratio: 1; max-width: 320px; }
  .app2 .li-points, .app2 .li-points.three { grid-template-columns: minmax(0, 1fr); }
  /* Phone: the bar moves below the picture, so it never covers it. */
  /* The bar sits below the picture, one row, always shown (fading it would leave an
     empty band); the chapter label drops out when it can't fit (container query). */
  .app2 .pl-video:not(:fullscreen) .pl-bar { position: relative; background: #1E1D26; padding: 12px 8px; }
  .app2 .pl-video:not(:fullscreen).is-idle .pl-bar { opacity: 1; pointer-events: auto; }
  .app2 .pl-video:not(:fullscreen) .pl-bar .pl-scrub { left: 8px; right: 8px; }
  .app2 .pl-video:not(:fullscreen) .pl-caption, .app2 .pl-video:not(:fullscreen).is-idle .pl-caption { bottom: 10px; font-size: 13px; }
  /* The preview note clears the centre play button on a phone. */
  .app2 .pl-video .pl-pv { top: 6px; max-width: 94%; }
  .app2 .pl-video .pl-pv p { padding: 4px 10px; font-size: 12px; line-height: 1.3; }
  .app2 .pl-time { font-size: 12px; padding: 0 2px 0 4px; }
  .app2 .li-next-card { flex-wrap: wrap; }
  .app2 .li-next-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .app2 .li-step-open { padding-left: 20px; }
}
@media (max-width: 760px) {
  .app2 .plan2 { padding: 24px 16px 48px; }
  .app2 .plan2-head h1 { font-size: 26px; }
  .app2 .plan2-progress { width: 100%; }
  .app2 .plan2-next { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .app2 .plan2-thumb { width: 100%; }
  .app2 .plan2-next .btn { justify-self: start; }
  .app2 .plan2-row { grid-template-columns: 24px minmax(0, 1fr); row-gap: 4px; padding: 6px 0; }
  .app2 .plan2-row-act { grid-column: 2; justify-content: flex-start; }
  .app2 .plan2-row.is-current { margin: 4px -8px; padding: 10px 8px; }
}

/* ── Theme: LAVENDER (agency scheme) — Tier-1 override only ─────────────────
   Bars use the existing score-band tokens with on-palette values (decision C);
   category colouring (Wellness vs Performance hue) is the post-demo follow-up.
   Neutrals (sidebar/hover/border/ring-track) are working values — PENDING the
   exact agency UI-kit. Everything else (brand-tint, --cta, score-*, aliases)
   derives automatically from these. */
.app2[data-theme="lavender"] {
  --brand:       #5C43DA;
  --brand-light: #7D69E1;
  --brand-cyan:  #9D8EE9;   /* tiny accent only */
  --ink:         #1A1A22;
  --ink-soft:    #5F6368;
  --canvas:      #ffffff;
  --sidebar-bg:  #F6F4FC;   /* pending exact agency UI-kit */
  --surface:     #ffffff;
  --hover:       #F1EEFB;   /* pending exact agency UI-kit */
  --border-c:    #E6E3F0;   /* pending exact agency UI-kit */
  --good: #3D9E6F; --warn: #f59e0b; --bad: #dc2626;
  --ring-track:  #EAE7F5;   /* pending exact agency UI-kit */
  --c-strong-ink: #2E7D58;  /* readable green ink on white */
  --c-low-ink:    #b45309;  /* readable amber ink on white */
}

/* ── Theme: DARK — full Tier-1 set + lifted accents + explicit passes ───────
   Lifted hues (pure brand/green go muddy on dark); distinct CTA #6E57E6;
   full-dark surfaces (no light "paper" report). Bars use the score-band tokens
   (decision C). Targets WCAG AA on text + bars. */
.app2[data-theme="dark"] {
  --brand:       #8B79F0;
  --brand-light: #A99BF5;
  --brand-cyan:  #9D8EE9;
  --ink:         #F7F6FB;   /* soft near-white (B35 §1: 15.3:1 on surface) */
  --ink-soft:    #A099B5;   /* secondary, same 6.0:1 on surface as light's on white */
  --canvas:      #15131E;
  --sidebar-bg:  #1A1726;
  --surface:     #211D2E;
  --hover:       #2C2740;
  --border-c:    rgba(255, 255, 255, .08);
  --good: #4FBF8B; --warn: #F5B043; --bad: #F2685F;
  --on-brand: #ffffff;
  --on-cta: #1A1A22;         /* CTA fill is this theme's ink (#F7F6FB) — ink text on it (B35 §1) */
  --select: #6E57E6;         /* the dark theme's violet: white text 5.2:1 (the lifted brand is too light for it) */
  --fill-soft:   #2C2740;
  --fill-quiet:  #262234;
  --fill-selected: var(--brand-tint);
  --term-hl:     var(--brand-tint);
  --ink-2:       #D9D6E4;
  --slider-track: #4A4462;
  --control-line: #5A5372;
  --control-line-hover: #7A7394; /* 3.46:1 on the box, 3.68:1 on the option */
  --shadow-thumb: 0 1px 3px rgba(0, 0, 0, .5);
  --side-bg:     #1A1726;  /* dark equivalent of #FAFAFB: a step off the canvas */
  --avatar-bg:   #3A3450;
  --brand-tint: color-mix(in srgb, var(--brand) 22%, transparent); /* lift so active/tinted UI reads on dark */
  --ring-track: #2C2740;
  --c-strong-ink: #6FD3A0;   /* lifted green ink */
  --c-low-ink:    #F6BE5E;   /* lifted amber ink */
  --bad-ink:      #FCA5A0;   /* lifted red ink (safety banner) */
}
/* Explicit pass: the radar fill is too faint on dark at 16% — lift it. */
.app2[data-theme="dark"] .radar-area { fill: color-mix(in srgb, var(--brand) 28%, transparent); }

/* ── Dev-only report comparison control (gated; inert in prod) ──────────── */
.app2 .dev-report-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--r-control); padding: 8px 16px; font-size: .8125rem; }
.app2 .drc-tag { font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-low-ink); background: color-mix(in srgb, var(--warn) 16%, transparent); padding: 4px 8px; border-radius: var(--r-pill); }
.app2 .drc-check { display: inline-flex; align-items: center; gap: 8px; }
.app2 .dev-report-controls select { height: 30px; border: 1px solid var(--border-c); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font: inherit; font-size: .8125rem; padding: 0 8px; }
.app2 .dev-report-controls select:disabled { opacity: .5; }
.app2 .drc-now { margin-left: auto; color: var(--ink-soft); font-variant: small-caps; }

/* ════════════════════════════════════════════════════════════════════════
   Home — Study D (B35 §2). Two tiers inside the .app2 sidebar shell:
   tier 1 = hero · one-line quote · latest-report card; tier 2 = New in the
   Library (2/3) · My plan (1/3), groups separated by space, no borders.
   Fixed heights (no vertical-fill scaling); resolves inside 1512×912.
   Tokens only. ═══════════════════════════════════════════════════════════ */
.app2 .home2 {
  display: flex; flex-direction: column; gap: 12px;
  /* 40px top: the brief's Home exception. 40px bottom (was 8): below ~912px tall the
     page scrolls, and with 8px the last row sat flush on the window edge, so the end
     of the page read as clipped rather than reached (demo polish). */
  padding: 40px clamp(24px, 3vw, 48px) 40px;
  max-width: 1560px; width: 100%; margin: 0 auto;
}
.app2 .home2 a { text-decoration: none; } /* colour/weight-only links — hover shifts colour, never underlines */
.app2 .home-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .home-meta { font-size: .78rem; color: var(--ink-soft); }
.app2 .home-link { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.app2 .home-link:hover { color: var(--brand); }
.app2 .home-link svg { width: 16px; height: 16px; }

/* 1 · Hero band */
.app2 .home-hero {
  position: relative; overflow: hidden; border-radius: var(--r-container); border: 1px solid var(--border-c);
  padding: 24px clamp(24px, 2.4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--home-hero-bg);
}
.app2 .home-hero-mark { position: absolute; top: -34%; right: 176px; height: 175%; opacity: .16; pointer-events: none; }
.app2 .home-hero-lede { position: relative; min-width: 0; }
.app2 .home-eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .home-hi { margin: 8px 0 0; font-size: clamp(30px, 3.8vh, 36px); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.app2 .home-sub { margin: 8px 0 0; font-size: clamp(13.5px, 1.8vh, 16px); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
/* CTA column centre-aligned: the check-in chip centres under the button (v2 fix 1). */
.app2 .home-hero-cta { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; flex-shrink: 0; }
/* The hero button: white fill, ink text, a thin ink/10 border, at the standard .btn
   size (36px high, 0 16px, .875rem/500, 16px icon). min-height, not height, so the
   phone layout (white-space: normal) can wrap. Focus: the app-wide :focus-visible ring. */
.app2 .home-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.2;
  white-space: nowrap; cursor: pointer; transition: background .12s, transform .12s;
}
.app2 .home-cta:hover { background: var(--hover); transform: translateY(-1px); }
.app2 .home-cta svg { width: 16px; height: 16px; }
.app2 .home-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--border-c);
  border-radius: var(--r-pill); padding: 4px 12px 4px 8px; white-space: nowrap;
}
.app2 .home-chip svg { width: 13px; height: 13px; color: var(--ink-soft); }
/* Chip only (no CTA button): the chip sits at the top, its vertical centre on the
   date line. The column is one eyebrow line tall (same font size → 1lh = that line
   box) and centres the chip in it, so the alignment holds whatever the line-height. */
.app2 .home-hero.is-chip-only .home-hero-cta { align-self: flex-start; height: 1lh; font-size: 13px; justify-content: center; }
/* Where the chip would crowd the headline (≤1000px — at 960 the gap is down to the
   32px flex gap and the headline starts wrapping), it drops below the subtitle,
   left-aligned. */
@media (max-width: 1000px) {
  .app2 .home-hero.is-chip-only { flex-direction: column; align-items: stretch; gap: 20px; }
  .app2 .home-hero.is-chip-only .home-hero-cta { height: auto; align-items: flex-start; }
  .app2 .home-hero.is-chip-only .home-chip { align-self: flex-start; text-align: left; }
}

.app2 .home-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

/* Tier 1 · latest-report card: head, 22/600 headline, radar (220) left, bars right */
.app2 .home-report {
  background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container);
  padding: 20px 32px; display: flex; flex-direction: column; gap: 12px;
}
.app2 .home-report-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.app2 .home-report-title { margin: 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.app2 .home-report-date { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.app2 .home-report-mid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: center; }
.app2 .home-radar { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.app2 .home-radar .radar { width: 200px; height: 200px; margin: 0; }
/* The caption wraps inside the 220 column — no overflow into the gap. */
.app2 .home-radar .home-meta { font-size: 12px; text-align: center; text-wrap: balance; }
/* Six bars in two groups — Wellness | Performance — each under its 13/500 label. */
.app2 .home-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-content: center; min-width: 0; }
.app2 .home-bar-group { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.app2 .home-group-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .home-bar { min-width: 0; }
.app2 .home-bar-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.app2 .home-bar-name { font-weight: 500; color: var(--ink); }
.app2 .home-bar-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.app2 .home-bar-track { height: 4px; border-radius: var(--r-pill); background: var(--ring-track); margin-top: 8px; overflow: hidden; }
.app2 .home-bar-track > div { height: 100%; border-radius: var(--r-pill); }
.app2 .home-report-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ring-track); padding-top: 12px; }
/* v2 fix 6 — the confidentiality assurance relocated here (left), always visible
   without scrolling. 12px muted with a 13px lock in the pale-brand accent. */
.app2 .home-report-privacy { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); min-width: 0; }
.app2 .home-report-privacy svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--ink-soft); }
.app2 .home-report.is-empty { justify-content: center; align-items: flex-start; }
.app2 .home-report.is-empty .home-report-title { margin-top: 8px; }

/* Tier 2 · two groups, space between, no borders: Library 2/3 · My plan 1/3 */
.app2 .home-tier2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.app2 .home-lib-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 12px; }
/* Home-only tile size (Study D): 150px tall, kind 12/500, title 16/600. The Library
   page keeps the shared card's own size. */
.app2 .home-lib .cc { aspect-ratio: auto; height: 140px; }
.app2 .home-lib .cc-meta { font-size: 12px; font-weight: 500; }
.app2 .home-lib .cc-title { font-size: 16px; font-weight: 600; }

/* ── 3 · Editorial content card — ONE shared component (B13) ──────────────────
   Used by the home strip, the Library grid, and (feature variant) Today's Focus.
   Full-bleed cover + dark scrim + bottom-left meta/title. The scrim and overlaid
   text are THEME-INDEPENDENT by design (fixed rgba over a fixed dark scrim over the
   photo) — legibility is verified against the real covers, light + dark. No hover
   transforms; colour shifts on the link/label only. */
.app2 .cc { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0; border-radius: var(--r-tile); overflow: hidden; cursor: pointer; font: inherit; text-align: left; background: var(--ring-track); }
.app2 .cc-img, .app2 .cc-img img, .app2 .cc-img-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.app2 .cc-img img { object-fit: cover; display: block; }
.app2 .cc-img-ph { display: grid; place-items: center; background: var(--fill-soft); color: var(--ink-soft);}
.app2 .cc-img-ph svg { width: 30px; height: 30px; opacity: .85; }
/* Scrim bottom-stop strengthened 0.62→0.72 (feature 0.68→0.78) after the card-image
   audit: the covers were lit for the old text-below card, so the overlay title needs
   a deeper foot to stay legible over the brighter ones. Same curve/stops, deeper foot. */
.app2 .cc-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34,30,60,0) 35%, rgba(34,30,60,0.72) 100%); }
.app2 .cc-text { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; }
.app2 .cc-meta { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.85); }
.app2 .cc-title { font-size: 15px; font-weight: 700; line-height: 1.25; color: #fff; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(34,30,60,0.35); }
/* Tier 2 · My plan — no card: label + count, progress, done · Today's focus · next */
.app2 .home-plan { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.app2 .home-plan-top { display: flex; flex-direction: column; gap: 8px; }
.app2 .home-plan-count { font-size: 13px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.app2 .home-progress { height: 4px; border-radius: var(--r-pill); background: var(--ring-track); overflow: hidden; }
.app2 .home-progress > div { height: 100%; border-radius: var(--r-pill); background: var(--ink); }
.app2 .home-plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.app2 .home-plan-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-radius: var(--r-tile); min-width: 0; }
.app2 .home-plan-mark { display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; }
.app2 .home-plan-mark svg { width: 16px; height: 16px; }
.app2 .home-plan-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app2 .home-plan-main .home-meta { font-size: 12px; }
/* Last completed — green check, struck-through step */
.app2 .home-plan-row.is-done .home-plan-mark { color: var(--good); }
.app2 .home-plan-step { font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); }
/* Current — "Today's focus": soft-fill row with an 88×60 photo tile (Study D) */
.app2 .home-plan-row.is-current { background: var(--fill-soft); padding: 4px 8px; margin: 0 -8px; }
.app2 .home-thumb { position: relative; width: 88px; height: 60px; flex-shrink: 0; border-radius: var(--r-control); overflow: hidden; background: var(--ring-track); }
.app2 .home-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app2 .home-thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-soft); }
.app2 .home-thumb-ph svg { width: 20px; height: 20px; }
.app2 .home-focus-label { font-size: 13px; color: var(--ink-soft); }
.app2 .home-plan-row.is-current .home-link,
.app2 .home-plan-row.is-next .home-link { font-size: 14px; font-weight: 500; color: var(--ink); white-space: normal; }
.app2 .home-plan-row.is-current .home-link:hover,
.app2 .home-plan-row.is-next .home-link:hover { color: var(--brand); }
/* Next — empty circle */
.app2 .home-plan-row.is-next .home-plan-mark { color: color-mix(in srgb, var(--ink) 28%, transparent); }
.app2 .home-plan-head-r { display: inline-flex; align-items: baseline; gap: 16px; white-space: nowrap; }

/* Tier 1 · quote — ONE line (Study D): the quote in the serif, the author as 13px meta
   beside it, no dots. A fixed one-line slot: quotes are layered absolutely and only the
   active one is opaque, so rotation is a pure cross-fade and never reflows the page. */
.app2 .home-quote { position: relative; height: 28px; }
.app2 .home-quote-body { position: absolute; inset: 0; margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 12px; white-space: nowrap; opacity: 0; transition: opacity 600ms cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
.app2 .home-quote-body.on { opacity: 1; pointer-events: auto; }
.app2 .home-quote-body p { margin: 0; font-family: var(--font-serif); font-size: 18px; line-height: 28px; font-style: italic; font-weight: 400; color: var(--ink); }
.app2 .home-quote-body footer { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .app2 .home-quote-body { transition: none; } }

/* Home at narrower widths (demo polish). Under 1100px the report card's radar + two
   bar columns and the 2/3 · 1/3 tier no longer fit side by side; under 760px (phone)
   the hero stacks (headline clamped, CTA full width), the quote wraps, and My plan
   sits below the Library row, which scrolls sideways. The quote's rotating lines are
   stacked in one grid cell, so the band is as tall as the longest line and the
   cross-fade still never reflows the page. */
@media (max-width: 1100px) {
  .app2 .home-report-mid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .app2 .home-tier2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app2 .home2 { padding: 20px 16px 32px; gap: 16px; }
  .app2 .home-hero { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
  .app2 .home-hero-mark { right: -40px; top: -20%; height: 140%; }
  .app2 .home-hi { font-size: clamp(24px, 7.4vw, 30px); overflow-wrap: anywhere; }
  .app2 .home-sub { font-size: 14px; }
  .app2 .home-hero-cta { align-items: stretch; }
  .app2 .home-cta { justify-content: center; white-space: normal; min-height: 44px; } /* touch target on phones; desktop stays 36px */
  .app2 .home-chip { align-self: center; white-space: normal; text-align: center; }
  .app2 .home-quote { height: auto; display: grid; }
  .app2 .home-quote-body { position: static; grid-area: 1 / 1; flex-direction: column; align-items: center; gap: 4px; white-space: normal; text-align: center; }
  .app2 .home-quote-body p { font-size: 16px; line-height: 24px; }
  .app2 .home-report { padding: 16px; }
  .app2 .home-report-head { flex-direction: column; gap: 4px; }
  .app2 .home-report-title { font-size: 19px; }
  .app2 .home-bars { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .app2 .home-report-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .app2 .home-report-privacy { align-items: flex-start; }
  .app2 .home-lib-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 12px -16px 0; padding: 0 16px 4px; scroll-padding: 0 16px; }
  .app2 .home-lib-grid > * { flex: 0 0 78%; scroll-snap-align: start; }
  .app2 .home-card-top { flex-wrap: wrap; }
  .app2 .home-plan-head-r { gap: 12px; }
}

/* ════════════════════════════════════════════════════════════════════════
   B9 — org-admin shell: persona avatar, Recommended-actions panel, and the two
   static credibility tabs (Reports & Exports, Data & Privacy). Dashboard visual
   language; tokens only. ═══════════════════════════════════════════════════ */

/* Recommended actions (B35 §3b) — the dashboard's one lavender tint: label, 17/600
   line, the priorities as meta, and the ink button as its only action. */
.app2 .ap-teaser { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 32px; background: var(--tint-soft); border-radius: var(--r-container); }
.app2 .ap-teaser-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app2 .ap-teaser-eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .ap-teaser-line { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.app2 .ap-teaser-meta { font-size: 13px; color: var(--ink-soft); }
.app2 .ap-teaser-cta { flex-shrink: 0; height: 44px; padding: 0 24px; font-size: 15px; }
@media (max-width: 720px) { .app2 .ap-teaser { flex-direction: column; align-items: flex-start; gap: 16px; } }

/* ═══ Action Plan page (B11; B35 §3b layout) — priorities as rows (the report's
   .rs-area row pattern); an open priority is facts strip → sub-headed prose at 680 →
   the two approaches side by side → one re-measure meta line. ═══ */
.app2 .ap-body-wrap { display: flex; flex-direction: column; gap: 48px; }
/* Header meta line (addendum: "title 24/600 + meta line") — 13px, one line. */
.app2 .phead .sub.ap-meta { font-size: 13px; max-width: none; }
.app2 .ap-advisory { margin: 0; font-family: var(--font-serif); font-size: 22px; font-weight: 400; line-height: 1.45; color: var(--ink); max-width: var(--measure); }
.app2 .ap-cards { display: flex; flex-direction: column; }
.app2 .ap-group-h { font-size: 13px; font-weight: 500; color: var(--ink-soft); padding-bottom: 12px; border-bottom: 1px solid var(--border-c); }

/* Row header: number · title + metric · priority chip · audience · chevron */
.app2 .ap-head { display: flex; align-items: center; gap: 16px; width: 100%; height: auto; min-height: 64px; padding: 12px 0; }
.app2 .ap-head.open { min-height: 72px; }
.app2 .ap-head-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; text-align: left; }
.app2 .ap-head-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); transition: color .12s; }
.app2 .ap-head.open .ap-head-title { font-size: 20px; font-weight: 600; }
.app2 .ap-head:hover .ap-head-title { color: var(--brand); }
.app2 .ap-head-metric { font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.app2 .ap-head-metric b { color: var(--ink); font-weight: 600; }
.app2 .ap-prio { flex-shrink: 0; font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.app2 .ap-prio.prio-high { color: var(--score-low-ink); background: color-mix(in srgb, var(--score-low) 12%, transparent); }
.app2 .ap-prio.prio-medium { color: var(--ink-soft); background: var(--fill-soft); }
/* Cyan's darker amber tint takes #B45309 to 4.42:1 — a deeper amber clears AA (4.96:1). */
.app2[data-theme="cyan"] .ap-prio.prio-high { color: #A84D08; }
.app2 .ap-head-aud { flex-shrink: 0; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* Open priority (the anti-wall-of-text rule) */
.app2 .ap-body { display: flex; flex-direction: column; }
/* 1 · Facts strip: four cells in one hairline box (max 760) */
.app2 .ap-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; max-width: 760px; margin: 0; padding: 16px 24px; border: 1px solid var(--border-c); border-radius: var(--r-tile); }
.app2 .ap-facts dt { font-size: 13px; color: var(--ink-soft); }
.app2 .ap-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.app2 .ap-facts dd.is-high { color: var(--c-low-ink); }
/* 2 · Sub-headings 15/600 ink; prose 15/1.6 ink at 680 */
.app2 .ap-sub { margin: 24px 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: 0; }
.app2 .ap-prose .markdown { font-size: 15px; line-height: 1.6; color: var(--ink); max-width: var(--measure); }
.app2 .ap-prose .markdown p { margin: 0 0 12px; }
.app2 .ap-prose .markdown p:last-child { margin-bottom: 0; }
/* 3 · Recommended approach: two side-by-side soft-fill blocks */
.app2 .ap-approach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.app2 .ap-approach-block { background: var(--fill-quiet); border-radius: var(--r-tile); padding: 20px 24px; }
.app2 .ap-approach-h { font-size: 14px; font-weight: 600; color: var(--ink); }
.app2 .ap-approach-block p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
/* 4 · Re-measure as one meta line */
.app2 .ap-remeasure { margin: 24px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 900px) { .app2 .ap-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .app2 .ap-approach { grid-template-columns: 1fr; } }

/* "How these recommendations are generated" — a plain group on a hairline */
.app2 .ap-how { border-top: 1px solid var(--border-c); padding-top: 32px; }
.app2 .ap-how-h { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 12px; }
.app2 .ap-how p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.6; max-width: var(--measure); }

@media (max-width: 760px) {
  .app2 .ap-head { flex-wrap: wrap; gap: 8px 12px; }
  .app2 .ap-head-aud { width: 100%; }
}

/* Reports & exports (B35 §3b) — the executive summary takes the page's one tint;
   exports and schedules are 64px rows under labels. */
.app2 .admin-generate { background: var(--tint-soft); border-radius: var(--r-container); padding: 24px 32px; }
.app2 .admin-generate-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.app2 .admin-generate-h { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .admin-generate-d { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); }
.app2 .admin-notice { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r-tile); background: var(--surface); color: var(--ink); font-size: 14px; line-height: 1.5; }
.app2 .admin-group { display: flex; flex-direction: column; }
.app2 .admin-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-c); font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .admin-group-d { font-weight: 400; }
.app2 .admin-row { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--border-c); }
.app2 .admin-row:last-child { border-bottom: 0; }
.app2 .admin-file { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-control); background: var(--fill-soft); color: var(--ink-soft); display: grid; place-items: center; }
.app2 .admin-file svg { width: 16px; height: 16px; }
.app2 .admin-row-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.app2 .admin-row-name { font-size: 15px; font-weight: 500; color: var(--ink); }
.app2 .admin-row-meta { font-size: 13px; color: var(--ink-soft); }
/* Not a control yet (no export engine): secondary, so it doesn't read as an action. B28 → ink. */
.app2 .admin-dl { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink-soft); }
.app2 .admin-dl svg { width: 16px; height: 16px; }
.app2 .admin-next { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* Data & privacy (B35 §3b) — three hairline rows (max 880); the brand value is the
   page's one accent (approved exception). */
.app2 .privacy-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--border-c); border-radius: var(--r-pill); font-size: 13px; color: var(--ink-soft); }
.app2 .privacy-pill svg { width: 14px; height: 14px; }
.app2 .admin-settings { display: flex; flex-direction: column; max-width: 880px; border-top: 1px solid var(--border-c); }
.app2 .admin-setting { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--border-c); }
.app2 .admin-setting:last-child { border-bottom: 0; }
.app2 .admin-setting-text { min-width: 0; }
.app2 .admin-setting-label { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.app2 .admin-setting-value { flex-shrink: 0; font-size: 17px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.app2 .admin-setting-note { margin: 8px 0 0; font-size: 15px; color: var(--ink); line-height: 1.6; max-width: var(--measure); }

/* ════════════════════════════════════════════════════════════════════════
   B4 — Insights Report presentation (report-v3). Scrolling, rhythmic: metrics
   hero → intro → six collapsible area sections (grouped Wellness/Performance) →
   summary → Plan CTA, with a sticky "In this report" scroll-spy TOC. Tokens only
   (dark inherits). The section prose is the engine-generated report (a renderer).
   FUTURE ENGINE ENHANCEMENTS (not render heuristics): per-section highlight-callout
   metadata, and marking the Actions archetype block (e.g. as a blockquote) so it can
   indent (Issue 39) — the blockquote style below is a forward-compatible hook. ══ */

/* Sidebar spans the viewport at all scroll positions (the report scrolls). No-op on
   the one-screen home; pins the rail on long pages (report, dashboard). */
.app2 .side { position: sticky; top: 0; height: 100vh; align-self: flex-start; }

/* Phone shell (B35 r2 acceptance: every screen holds at phone width). Until now the
   208px rail sat beside the content at every width, leaving ~150px for the page on a
   phone. Under 760px the rail becomes a top bar: logo, icon-only nav (labels kept for
   screen readers), and the account button as an avatar whose menu opens below. The
   utility links and the settings row are left out of the bar. */
@media (max-width: 760px) {
  .app2 .shell2 { flex-direction: column; }
  .app2 .side { width: 100%; height: auto; flex-direction: row; align-items: center; align-self: stretch; z-index: 20; border-right: 0; border-bottom: 1px solid var(--border-c); }
  .app2 .side-logo { height: 56px; padding: 0 8px 0 16px; border-bottom: 0; flex-shrink: 0; }
  .app2 .side-nav { flex-direction: row; gap: 2px; padding: 8px 4px; overflow-x: auto; min-width: 0; }
  .app2 .nav { width: 44px; height: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
  .app2 .nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app2 .side-foot { border-top: 0; padding: 0 8px 0 0; flex-shrink: 0; }
  .app2 .side-links, .app2 .side-foot-row, .app2 .acct-text, .app2 .acct-chev { display: none; }
  /* The lockup gives way to its mark (as the assessment header does) so all five nav
     icons fit at 390px without scrolling (demo polish). */
  .app2 .side-logo .wm { display: none; }
  .app2 .side-logo .brand-lockup-img { width: 30px; height: 24px; object-fit: cover; object-position: left center; }
  .app2 .side-nav { justify-content: center; flex: 1; }
  .app2 .acct-btn { width: auto; padding: 6px; }
  .app2 .acct-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 4px); min-width: 160px; }
}

/* ════════════════════════════════════════════════════════════════════════
   Insights Report — Study E (B35 §3). Header in the main column beside the
   224px contents list; profile block; sections as rows on hairlines.
   ═══════════════════════════════════════════════════════════════════════ */
.app2 .report2 { display: flex; flex-direction: column; min-width: 0; }
.app2 .report2-head { display: flex; flex-direction: column; }
.app2 .report2-head-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.app2 .report2-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.app2 .report2-head .sub { color: var(--ink-soft); font-size: 15px; margin-top: 8px; }
.app2 .report2-meta { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.app2 .report2-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.app2 .report2-conf { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); background: none; border: 1px solid var(--border-c); border-radius: var(--r-pill); padding: 4px 12px; }
.app2 .report2-conf svg { width: 13px; height: 13px; }

.app2 .report2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 224px; gap: 64px; align-items: start; max-width: 1150px; width: 100%; margin: 0 auto; padding: 64px clamp(24px, 3vw, 48px) 96px; }
.app2 .report2-main { display: flex; flex-direction: column; min-width: 0; }
/* Page sections 56px apart (B35 §1); the header sits 32px above the profile block. */
.app2 .report2-main > * + * { margin-top: 56px; }
.app2 .report2-main > .report2-head + * { margin-top: 32px; }
@media (max-width: 1080px) { .app2 .report2-grid { grid-template-columns: 1fr; } .app2 .rs-toc { display: none; } }

/* Section scroll offset (so anchored scroll clears the top of the viewport) */
.app2 .report2 [id] { scroll-margin-top: 24px; }
.app2 .rs-eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 8px; }
/* Before you read — one of the two kept lavender surfaces: tint, 16px, no border. */
.app2 .rs-card { border-radius: var(--r-container); padding: 24px 32px; }
.app2 .rs-intro { background: var(--home-tint); }

/* Profile block (Study E): label · serif headline · meta · indices · hairline · radar + bars */
.app2 .prof { background: var(--surface); border: 1px solid var(--border-c); border-radius: var(--r-container); padding: 24px 32px; }
.app2 .prof-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .prof-headline { margin: 8px 0 0; font-family: var(--font-serif); font-size: 30px; font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.app2 .prof-meta { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.app2 .prof-indices { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-top: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-c); }
.app2 .prof-index { display: flex; align-items: center; gap: 16px; }
.app2 .prof-index-v { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.app2 .prof-index-t { display: flex; flex-direction: column; gap: 4px; }
.app2 .prof-index-l { font-size: 14px; font-weight: 500; color: var(--ink); }
.app2 .prof-index-d { font-size: 13px; color: var(--ink-soft); }
.app2 .prof .metrics-b { margin-top: 24px; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.app2 .prof .radar { width: 220px; }
.app2 .prof .metrics-legend { margin-top: 16px; flex-wrap: wrap; }
/* Trend since the earlier report (demo polish): numbers only. One chip per area —
   green rise, amber fall, grey no change ("—" when either report lacks the score). */
.app2 .prof-trend { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.app2 .prof-trend-l { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.app2 .prof-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app2 .prof-chip { display: inline-flex; align-items: baseline; gap: 8px; height: 28px; align-items: center; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; background: var(--fill-soft); color: var(--ink-soft); }
.app2 .prof-chip-n { color: var(--ink); font-weight: 500; }
.app2 .prof-chip-d { font-weight: 600; font-variant-numeric: tabular-nums; }
.app2 .prof-chip.is-up { background: color-mix(in srgb, var(--good) 12%, transparent); }
.app2 .prof-chip.is-up .prof-chip-d { color: var(--c-strong-ink); }
.app2 .prof-chip.is-down { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.app2 .prof-chip.is-down .prof-chip-d { color: var(--c-low-ink); }
/* The earlier shape: a faint dashed outline behind the current one; the earlier score
   on each bar: a tick in the same ink, standing above and below the 4px track. */
.app2 .radar-prior { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
.app2 .abar-wrap { position: relative; }
.app2 .abar-prev { position: absolute; top: -4px; width: 2px; height: 12px; border-radius: 1px; transform: translateX(-50%); background: color-mix(in srgb, var(--ink) 70%, transparent); pointer-events: none; }
.app2 .prof-key { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.app2 .prof-key-now { width: 16px; height: 0; border-top: 2px solid var(--brand); }
.app2 .prof-key-prev { width: 16px; height: 0; margin-left: 8px; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 55%, transparent); }
/* The bar tick, as drawn on the bars (.abar-prev), beside the dashed swatch. */
.app2 .prof-key-tick { width: 2px; height: 12px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 70%, transparent); }

/* Sections as rows on hairlines, grouped Wellness / Performance */
.app2 .rs-group { display: flex; flex-direction: column; }
.app2 .rs-divider { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-c); }
.app2 .rs-divider-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.app2 .rs-divider-sub { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.app2 .rs-area { border-bottom: 1px solid var(--border-c); }
.app2 .rs-area-head { display: flex; align-items: center; gap: 16px; width: 100%; height: 56px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.app2 .rs-area-head.open { height: 64px; }
.app2 .rs-area-head:hover .rs-area-title { color: var(--brand); }
.app2 .rs-num { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.app2 .rs-area-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; flex: 1; min-width: 0; transition: color .12s; }
.app2 .rs-area-head.open .rs-area-title { font-size: 20px; font-weight: 600; }
.app2 .rs-chev { color: var(--ink-soft); flex-shrink: 0; transition: transform .2s cubic-bezier(.4,0,.2,1); }
.app2 .rs-area-head.open .rs-chev { transform: rotate(180deg); }
/* Body indented 44px = the 28px disc + the 16px gap, so prose aligns with the title. */
.app2 .rs-area-body { padding: 4px 0 32px 44px; }
.app2 .rs-empty { color: var(--ink-soft); font-size: .875rem; }

/* Summary — no card: hairline top, label, then the summary's own headings */
.app2 .rs-summary { border-top: 1px solid var(--border-c); padding-top: 32px; }
.app2 .report2 .rs-summary .markdown h2 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; padding-bottom: 0; border-bottom: 0; }
.app2 .report2 .rs-summary .markdown h2:first-child { font-size: 22px; margin-top: 4px; letter-spacing: -0.01em; }

/* Score chips (value + scoreBand label; band-coloured) */
.app2 .rs-chip { display: inline-flex; align-items: center; flex-shrink: 0; height: 24px; padding: 0 12px; border-radius: var(--r-pill); font-size: .75rem; font-weight: 600; }
.app2 .rs-chip.strong { color: var(--c-strong-ink); background: color-mix(in srgb, var(--good) 12%, transparent); }
.app2 .rs-chip.mid { color: var(--ink-soft); background: var(--fill-soft); }
.app2 .rs-chip.low { color: var(--c-low-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* Contents list (sticky, 224px, scroll-spy): only the current item carries brand text
   and the 2px brand rule. */
.app2 .rs-toc { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 0; }
.app2 .rs-toc-eyebrow { font-size: 13px; font-weight: 500; color: var(--ink-soft); padding: 0 12px 8px; }
.app2 .rs-toc-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-left: 2px solid transparent; font-size: 14px; color: var(--ink); text-decoration: none; }
.app2 .rs-toc-item:hover { color: var(--brand); }
.app2 .rs-toc-item.on { color: var(--brand); font-weight: 500; border-left-color: var(--brand); }
.app2 .rs-toc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app2 .rs-toc-score { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Section prose — beta-PDF reading standard. Bold "Label:" sub-heads read as
   emphasised via the strong rule. Inside sections only two things changed in B35 §3:
   bullet dots are secondary (no brand), and the definition blockquotes (Actions'
   coping mechanisms, and anywhere the pattern recurs) are soft-fill blocks. */
.app2 .report2 .markdown { line-height: var(--body-lh); font-size: var(--body-size); color: var(--ink); max-width: var(--measure); }
.app2 .report2 .markdown p { margin: 0 0 13px; }
.app2 .report2 .markdown strong { color: var(--ink); font-weight: 700; }
.app2 .report2 .markdown h2 { font-size: 1.15rem; font-weight: 700; margin: 18px 0 10px; color: var(--ink); }
.app2 .report2 .markdown h3 { font-size: .975rem; font-weight: 700; margin: 16px 0 6px; color: var(--ink); }
.app2 .report2 .markdown ul { list-style: none; padding: 0; margin: 0 0 13px; display: flex; flex-direction: column; gap: 7px; }
.app2 .report2 .markdown li { position: relative; padding-left: 18px; }
.app2 .report2 .markdown li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); }
.app2 .report2 .markdown blockquote { margin: 0 0 12px; padding: 20px 24px; max-width: var(--measure); background: var(--fill-quiet); border: 0; border-radius: var(--r-tile); color: inherit; }
.app2 .report2 .markdown blockquote p:last-child { margin-bottom: 0; }
.app2 .report2 .markdown hr { border: 0; border-top: 1px solid var(--ring-track); margin: 20px 0; }

/* Report section bodies — style 1c (B35 round 2 §6). Typography and layout only; the
   blocks come from reportBlocks.ts, which keeps every word in order. */
.app2 .report2 .rs-area-body { padding: 16px 0 36px 44px; }
.app2 .rb { display: flex; flex-direction: column; gap: 20px; color: var(--ink); }
.app2 .rb p { margin: 0; }
.app2 .rb-lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 640px; letter-spacing: -0.005em; }
.app2 .rb-p { font-size: 16px; line-height: 1.7; max-width: 640px; }
.app2 .rb-h { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; padding-top: 20px; }
.app2 .rb-h:first-child { padding-top: 0; }
/* Key terms: inline bold → soft lavender highlight. */
.app2 .rb strong { font-weight: 600; color: var(--ink); background: var(--term-hl); padding: 0 2px; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* Bold straight into punctuation ("term,"): the right padding is taken back, so the comma sits where it would without the highlight. */
.app2 .rb strong.tight { margin-right: -2px; }
.app2 .rb-h strong, .app2 .rb-term strong { background: none; padding: 0; margin: 0; }
/* Tracy's fixed text — consecutive paragraphs share one panel. */
.app2 .rb-panel { background: var(--fill-quiet); border-radius: 14px; padding: 20px 24px; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.app2 .rb-panel p { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
/* Bold-lead items: two → side-by-side cards; one or three+ → term rows. */
.app2 .rb-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: var(--measure); padding: 8px 0; }
.app2 .rb-card { padding: 22px 24px; border: 1px solid var(--border-c); border-radius: var(--r-container); display: flex; flex-direction: column; gap: 10px; }
.app2 .rb-term { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--ink); }
.app2 .rb-card .rb-term { font-size: 24px; line-height: 1.2; }
.app2 .rb-term-text { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.app2 .rb-rows { display: flex; flex-direction: column; max-width: var(--measure); border-top: 1px solid var(--border-c); }
.app2 .rb-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border-c); }
.app2 .rb-row .rb-term { font-size: 22px; line-height: 1.25; }
/* Quoted belief / rule — centred serif between hairlines. */
.app2 .rb-quote { margin: 16px 0; padding: 32px 0; border-top: 1px solid var(--border-c); border-bottom: 1px solid var(--border-c); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: var(--measure); }
.app2 .rb-quote figcaption { font-size: 13px; font-weight: 500; color: var(--ink-soft); max-width: 560px; }
.app2 .rb-quote figcaption strong { background: none; padding: 0; margin: 0; color: inherit; font-weight: 500; }
/* A panel straight above a pull-quote: the flow gap alone runs the panel into the hairline. */
.app2 .rb-panel + .rb-quote { margin-top: 32px; }
.app2 .rb-quote blockquote { margin: 0; padding: 0; border: 0; background: none; font-family: var(--font-serif); font-style: italic; font-size: 30px; line-height: 1.3; color: var(--ink); max-width: 560px; letter-spacing: -0.01em; }
.app2 .rb-note { font-size: 14px; font-style: italic; color: var(--ink-soft); max-width: 640px; }
/* Summary keeps its round-1 title size for its first heading. */
.app2 .rs-summary .rb > .rb-h:first-child { font-size: 22px; }
/* Phone: the profile block's radar + bars stack (its own 220px/1fr grid out-ranked
   the generic 760px stacking rule, so it overflowed a phone by ~33px). */
@media (max-width: 760px) {
  .app2 .prof { padding: 20px; }
  .app2 .prof .metrics-b { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .app2 .report2 .rs-area-body { padding-left: 0; }
  .app2 .rb-cards { grid-template-columns: minmax(0, 1fr); }
  .app2 .rb-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .app2 .rb-quote blockquote { font-size: 24px; }
  .app2 .rb-lede { font-size: 18px; }
}

/* Consent checkbox (B27) — signup form + consent screen. */
.auth-form .consent-check { flex-direction: row; gap: 8px; align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--ink); margin: 4px 0; }
.auth-form .consent-check input { margin: 4px 0 0; padding: 0; flex: none; width: 16px; height: 16px; accent-color: var(--ink); }
.consent-foot { display: flex; justify-content: center; margin-top: 16px; }

/* ── B35 §5 motion ──────────────────────────────────────────────────────────
   CSS-only apart from the Collapse wrapper's 200ms removal delay. Everything here
   is switched off under prefers-reduced-motion (block at the end). */

/* Tiles (content cards — Library, Home, Plan rail): 200ms hover scale + fade. The
   fade darkens the image a touch, never lightens the scrim (title legibility). */
.app2 .cc-img img, .app2 .cc-img-ph { transition: transform 200ms ease, filter 200ms ease; }
.app2 .cc:hover .cc-img img, .app2 .cc:hover .cc-img-ph { transform: scale(1.03); filter: brightness(.94); }

/* Radar: the profile shape draws on load (stroke-dashoffset over pathLength=1),
   then its fill and dots fade in. Runs when the polygon mounts — once per view. */
.app2 .radar-area { stroke-dasharray: 1; animation: radar-draw 700ms cubic-bezier(.4, 0, .2, 1) both; }
.app2 .radar-dot { animation: radar-dots 700ms ease both; }
@keyframes radar-draw {
  0%   { stroke-dashoffset: 1; fill-opacity: 0; }
  70%  { stroke-dashoffset: 0; fill-opacity: 0; }
  100% { stroke-dashoffset: 0; fill-opacity: 1; }
}
@keyframes radar-dots { 0%, 70% { opacity: 0; } 100% { opacity: 1; } }

/* Progress and score bars: width eases over 300ms when a value changes. */
.app2 .abar-fill, .app2 .meter > div, .app2 .home-progress > div,
.app2 .home-bar-track > div, .app2 .dist > span { transition: width 300ms ease; }

/* Section expand/collapse: height + opacity, 200ms (components/Collapse.tsx). */
.app2 .collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 200ms ease, opacity 200ms ease; }
.app2 .collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.app2 .collapse-inner { min-height: 0; overflow: hidden; }
.app2 .collapse.is-settled .collapse-inner { overflow: visible; }

/* Plan sections are native <details>: the same 200ms height + opacity through
   ::details-content where the browser can animate to auto height (Chrome/Edge);
   elsewhere they open instantly, as before. */
@supports (interpolate-size: allow-keywords) {
  .app2 .plan-sec details { interpolate-size: allow-keywords; }
  .app2 .plan-sec details::details-content { height: 0; opacity: 0; overflow: clip;
    transition: height 200ms ease, opacity 200ms ease, content-visibility 200ms allow-discrete; }
  .app2 .plan-sec details[open]::details-content { height: auto; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .app2 .cc-img img, .app2 .cc-img-ph,
  .app2 .abar-fill, .app2 .meter > div, .app2 .home-progress > div,
  .app2 .home-bar-track > div, .app2 .dist > span,
  .app2 .collapse, .app2 .plan-sec details::details-content { transition: none; }
  .app2 .cc:hover .cc-img img, .app2 .cc:hover .cc-img-ph { transform: none; }
  .app2 .radar-area, .app2 .radar-dot { animation: none; }
}
