@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f7f4f0;
  --white: #fffefd;
  --surface: #f1ece7;
  --ink: #252322;
  --muted: #716b66;
  --line: #e6dfd9;
  --accent: #e63a4e;
  --button: #d92e45;
  --accent-strong: #cb243b;
  --tint: #fff0f1;
  --red: #b82036;
  --sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Consolas", monospace;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; border: 0; }
button:disabled { opacity: .4; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; font-weight: 750; letter-spacing: -.035em; overflow-wrap: break-word; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { overflow-wrap: anywhere; }
::selection { background: #f7c6cc; color: var(--ink); }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 4px; }
#main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; }
.skip-link:focus { top: 12px; }

/* A compact app surface: one task and one card at a time. */
.shell, .shell-wide { width: 100%; max-width: 660px; margin: 0 auto; padding: 0 30px; }
.app-header { height: 80px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; flex-shrink: 0; }
.brand-icon { width: 29px; height: 29px; }
.brand-name { font-size: 22px; font-weight: 850; letter-spacing: -.07em; }
.brand-small { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.app-mode { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.app-header > .utility-button { margin-left: auto; }
.utility-button { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; background: transparent; border-radius: 50%; font-size: 23px; line-height: 1; }
.utility-button:hover { background: var(--surface); }
.inline-brand-note { margin: 7px 0 27px; color: var(--muted); font-size: 13px; letter-spacing: .02em; }

.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 14px 22px; border-radius: 18px; font-size: 15px; font-weight: 650; line-height: 1.5; text-align: center; transition: background .16s ease, transform .16s ease, border-color .16s ease; }
.primary { background: var(--button); color: #fff; }
.primary:hover { background: var(--accent-strong); }
.primary:active, .secondary:active { transform: scale(.985); }
.secondary { background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.secondary:hover { background: var(--surface); border-color: #c9beb5; }
.primary .arrow { margin-left: auto; }
.arrow { font-size: 23px; font-weight: 400; line-height: 1; }
.link-button, .back-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 0; background: transparent; font-size: 13px; color: var(--muted); line-height: 1.5; }
.link-button:hover, .back-button:hover { color: var(--ink); }
.link-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.micro, .question-micro { color: var(--muted); font-size: 12px; }
.kicker, .panel-kicker { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }

/* Ability assessment. */
.ability-workspace { display: block; max-width: 600px; margin: 13px auto 32px; }
.ability-sidebar { display: none; }
.ability-main, .question-panel { min-width: 0; }
.quiz-topbar { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 12px; }
.step-label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.step-label > span { margin: 0 4px; color: #b3a79f; }
.question-counter { margin-left: auto; color: var(--ink); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.question-counter small { font-size: 12px; font-weight: 400; color: var(--muted); }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin: 16px 0 10px; }
.progress-top > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-track { height: 3px; background: var(--line); border-radius: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: inherit; transition: width .22s ease; }
.stage-trigger, .stage-button, .quiz-topbar .stage-tab { min-height: 34px; padding: 6px 10px; background: transparent; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.stage-trigger:hover, .stage-button:hover, .quiz-topbar .stage-tab:hover { background: var(--white); border-color: #c9beb5; }
.stage-picker, .stage-switch, .stage-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.stage-picker > .micro { margin-right: 4px; }
.stage-tab, .stage-switch button, .stage-tabs button { min-height: 38px; padding: 8px 15px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 12px; }
.stage-tab[aria-pressed="true"], .stage-switch button[aria-pressed="true"], .stage-tabs button[aria-pressed="true"] { color: var(--accent-strong); background: var(--tint); }
.question-card { position: relative; margin-top: 22px; padding: 0; overflow: hidden; border: 1px solid #eee6e0; border-radius: 28px; background: var(--white); box-shadow: 0 14px 38px #482a2014; }
.card-intro { position: relative; padding: 30px 32px 27px; background: var(--button); color: #fff; }
.card-eyebrow { display: flex; align-items: center; gap: 10px; min-height: 27px; margin-bottom: 24px; padding-right: 48px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.card-eyebrow > span:first-child { padding: 3px 10px; border-radius: 20px; background: var(--tint); color: var(--accent-strong); }
.card-prompt { color: var(--muted); font-size: 10px; font-weight: 400; }
.card-intro .card-eyebrow { margin-bottom: 30px; padding-right: 94px; }
.card-intro .card-eyebrow > span:first-child { background: #00000018; color: #fff; }
.card-intro .card-prompt { color: #fff; }
.spark-mark { position: absolute; right: 27px; top: 17px; width: 84px; height: 84px; color: #ffffff91; pointer-events: none; transform: rotate(9deg); }
.question { min-width: 0; margin: 0 0 30px; padding: 0; border: 0; }
.question:last-child { margin-bottom: 0; }
.question legend { max-width: 100%; padding: 0; margin-bottom: 15px; font-size: 17px; font-weight: 650; line-height: 1.6; }
.question-number { display: block; margin-bottom: 9px; font-size: 11px; font-weight: 400; color: var(--muted); }
.question-title, .ability-main .question legend { display: block; margin: 0 0 22px; font-size: 28px; line-height: 1.42; font-weight: 750; letter-spacing: -.045em; }
.card-intro .question-title { margin: 0 0 17px; font-size: 36px; line-height: 1.35; letter-spacing: -.055em; color: #fff; }
.ability-main .question { margin: 0; }
.ability-main .question-number { display: none; }
.question-hint { margin: 0 0 13px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.question-help { border: 0; padding: 0; margin: -10px 0 20px; }
.question-help summary { display: inline-block; color: var(--muted); font-size: 11px; font-weight: 400; }
.question-help summary::before { content: "+ "; color: var(--accent-strong); }
.question-help[open] summary::before { content: "− "; }
.question-help summary::-webkit-details-marker { display: none; }
.question-help p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.card-intro .question-help { margin: 0; }
.card-intro .question-help summary, .card-intro .question-help summary::before, .card-intro .question-help p { color: #fff; }
.card-intro .question-help summary { font-size: 11px; }
.card-intro .question-help p { max-width: 460px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #ffffff44; }
.card-intro :focus-visible { outline-color: #fff; }
.options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ability-main .options { padding: 24px 28px 28px; gap: 11px; }
.option { position: relative; display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 57px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 17px; background: transparent; font-size: 14px; line-height: 1.6; text-align: left; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.option:hover { background: #faf5f1; border-color: #d7c9bf; }
.ability-main .option { min-height: 58px; font-size: 15px; }
.ability-main .option:hover { background: var(--tint); border-color: var(--accent); }
.option:active { transform: scale(.99); }
.option:has(input:checked), .option[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.option input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; }
.option-code, .option-index, .option-number { display: none; }
.option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.option-check { position: relative; display: inline-flex; justify-content: center; align-items: center; flex: 0 0 21px; width: 21px; height: 21px; margin-left: auto; border: 1.5px solid #d7ccc4; border-radius: 50%; color: #8b7e74; font-size: 12px; line-height: 1; transition: border-color .16s ease, background .16s ease; }
.option:has(input:checked) .option-check, .option[aria-pressed="true"] .option-check { border-color: var(--accent); background: var(--accent); color: #fff; }
.option:has(input:checked) .option-check::after { position: absolute; content: ""; left: 5px; top: 3px; width: 5px; height: 8px; border: solid white; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.skip-option { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 12px; color: var(--muted); font-size: 12px; cursor: pointer; }
.skip-option input { accent-color: var(--accent); }
.ability-main .skip-option { display: none; }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 9px 4px 0; }
.quiz-actions > button { min-height: 44px; }
.quiz-actions .primary { min-width: 160px; }
.quiz-note { margin: 7px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.inline-error { color: var(--red); font-size: 13px; margin: 13px 3px; }
.inline-error:empty { display: none; }

/* Matching preferences and editable personal information. */
.flow, .entry-page, .match-page, .matching-page { max-width: 600px; margin: 18px auto 44px; }
.flow-heading, .match-heading { margin: 24px 0 26px; }
.flow-heading h1, .match-heading h1 { font-size: 28px; margin-bottom: 9px; }
.flow-heading p, .match-heading p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.flow-heading .panel-kicker { margin-bottom: 12px; }
.flow-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.form-panel, .setup-panel { min-width: 0; }
.form-panel > .question { padding: 23px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.form-panel > .question legend { padding-top: 19px; }
.field-label { display: block; margin: 19px 0 9px; color: var(--ink); font-size: 14px; font-weight: 600; }
.input, .select, textarea, .field-block input, .field-block select { width: 100%; min-width: 0; min-height: 52px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); color: var(--ink); font-size: 16px; }
.input:focus, .select:focus, textarea:focus, .field-block input:focus, .field-block select:focus { border-color: var(--accent); }
.input::placeholder, textarea::placeholder, .field-block input::placeholder { color: var(--muted); font-size: 14px; }
.input:disabled, .select:disabled { opacity: .65; cursor: not-allowed; }
.age-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.age-row .field-label { margin: 0; }
.age-input { max-width: 110px; text-align: center; }
.stage-options { display: grid; gap: 10px; margin-top: 18px; }
.stage-choice { display: grid; grid-template-columns: minmax(0, 1fr) 26px; gap: 3px 15px; align-items: center; min-height: 82px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 19px; background: var(--white); text-align: left; }
.stage-choice strong { color: var(--ink); font-size: 16px; font-weight: 650; }
.stage-choice span { grid-column: 1; color: var(--muted); font-size: 12px; }
.stage-choice i { grid-column: 2; grid-row: 1 / 3; font-size: 19px; font-style: normal; color: var(--muted); text-align: right; }
.stage-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.stage-choice[aria-pressed="true"] i { color: var(--accent); }
.stage-option { min-height: 82px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); text-align: center; }
.stage-option strong { display: block; font-size: 15px; font-weight: 650; }
.stage-option span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.stage-option[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); }
.form-note, .resume-note { margin: 13px 0; color: var(--muted); font-size: 12px; }
.entry-action { margin-top: 26px; }
.entry-action.primary, .entry-action .primary { width: 100%; }
.entry-note { margin-top: 17px; text-align: center; color: var(--muted); font-size: 11px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.interest-button, .trait-button { position: relative; min-height: 82px; padding: 15px 7px; border: 1px solid var(--line); border-radius: 19px; background: var(--white); font-size: 13px; line-height: 1.5; transition: border-color .15s ease, background .15s ease; }
.interest-button:hover, .trait-button:hover { border-color: #d2b9b1; }
.interest-button .emoji { display: block; margin-bottom: 7px; font-size: 23px; line-height: 1.2; }
.interest-button[aria-pressed="true"], .trait-button[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); }
.trait-button { min-height: 62px; }
.choice-rank { position: absolute; top: 5px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--button); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.selected-interests { margin-top: 20px; }
.selected-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.selected-row .row-name { flex: 1; min-width: 0; }
.selected-row select { max-width: 140px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); font-size: 12px; color: var(--ink); }
.order-button { flex-shrink: 0; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.count-note { margin-top: 16px; font-size: 12px; color: var(--muted); }
.flow-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 24px; }
.flow-actions .question-micro { margin-right: auto; }
.flow-actions .primary { width: 100%; justify-content: space-between; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: 16px 0 max(16px, env(safe-area-inset-bottom)); background: var(--paper); }
.sticky-actions .flow-actions { margin: 0; }
.form-grid, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .field-label { margin-top: 0; }
.age-range { display: flex; align-items: center; gap: 12px; }
.age-range .input { min-width: 0; }
.field-stack { display: grid; gap: 14px; }
.match-fields { display: grid; gap: 23px; margin: 26px 0; }
.field-block { min-width: 0; }
.field-block > .field-label, .field-block > label { display: block; margin: 0 0 9px; font-size: 14px; font-weight: 600; }
.field-grid > label > .micro { display: block; margin-bottom: 7px; }
.field-block p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.match-fields > .result-main-action, .match-fields > .form-note, .match-fields > .result-disclaimer, .match-fields > .inline-error { margin: 0; }
.match-summary, .match-status { margin-top: 23px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.match-summary h2, .match-status h2 { margin-bottom: 10px; font-size: 20px; }
.match-summary p, .match-status p { color: var(--muted); font-size: 13px; }
.match-summary .tag { margin: 4px 4px 0 0; }

/* Completed ability card. */
.result-page { max-width: 600px; margin: 18px auto 44px; padding: 26px 29px; border: 1px solid #eee6e0; border-radius: 28px; background: var(--white); box-shadow: 0 12px 40px #482a2010; }
.result-topline { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 23px; font-size: 12px; color: var(--muted); }
.result-topline > span:last-child { color: var(--accent-strong); }
.result-summary { text-align: left; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.result-summary h1:not(.score-value) { margin-bottom: 8px; font-size: 27px; }
.score-value { display: flex; align-items: baseline; gap: 9px; margin: 5px 0 7px; font: 750 65px/1.1 var(--sans); letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.score-unit { font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.score-context { margin-top: 8px; color: var(--muted); font-size: 12px; }
.score-context strong { color: var(--ink); }
.score-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; margin-right: 4px; padding: 2px 7px; border-radius: 9px; background: var(--tint); color: var(--accent-strong); font-size: 13px; font-weight: 650; }
.dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 28px; margin: 25px 0; }
.dimension { min-width: 0; }
.dim-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dim-top h3 { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.dim-top strong { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dim-bar { height: 4px; margin-top: 9px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.dim-bar span { display: block; height: 100%; border-radius: inherit; background: #d8a49b; }
.dimension p { margin-top: 7px; color: var(--muted); font-size: 11px; }
.result-disclaimer { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.result-main-action { margin-top: 24px; }
.result-main-action.primary, .result-main-action .primary { width: 100%; justify-content: space-between; }
.result-main-action p { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.result-compact-tools { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 25px; margin-top: 10px; }
.result-compact-tools .link-button { font-size: 12px; }
.result-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.result-details { margin-top: 18px; padding: 18px 0 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 500; }
summary:hover { color: var(--ink); }
.rules-content { padding-top: 16px; color: var(--muted); font-size: 12px; }
.rules-content > p + p { margin-top: 10px; }
.rules-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.rules-row strong { display: block; margin-bottom: 5px; color: var(--ink); font-weight: 600; }

.matching-status { padding: 20px 0; text-align: center; }
.matching-status > .panel-kicker { margin-bottom: 20px; }
.status-orbit { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 24px; background: var(--tint); color: var(--accent); font-size: 30px; }
.matching-status h1 { margin: 21px 0 12px; font-size: 29px; }
.matching-status > p { max-width: 400px; margin-left: auto; margin-right: auto; color: var(--muted); font-size: 13px; line-height: 1.8; }
.profile-summary { margin: 25px 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-align: left; }
.profile-summary > div, .profile-summary dl > div { display: grid; grid-template-columns: 83px minmax(0, 1fr); gap: 14px; padding: 10px 0; font-size: 13px; }
.profile-summary dl, .profile-summary dd { margin: 0; }
.profile-summary dt { color: var(--muted); }
.profile-summary dd { overflow-wrap: anywhere; }
.matching-status > .result-main-action { margin-top: 0; }

/* Optional personality cards. */
.personality-page { max-width: 600px; margin: 18px auto 44px; }
.persona-card { padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: var(--white); text-align: center; }
.persona-card > .kicker { margin-bottom: 16px; }
.persona-image { width: 280px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto 22px; border-radius: 22px; background: #fff; }
.persona-copy { min-width: 0; }
.persona-copy .kicker { margin-bottom: 8px; color: var(--accent-strong); }
.persona-copy h1 { margin-bottom: 12px; font-size: 31px; }
.persona-tagline { margin-bottom: 16px; font-size: 17px; line-height: 1.8; }
.persona-description { color: var(--muted); font-size: 13px; line-height: 1.8; }
.persona-card .primary { width: 100%; margin-top: 23px; }
.persona-notes { display: grid; gap: 20px; margin-top: 20px; }
.persona-note h3, .persona-notes h3 { margin-bottom: 7px; font-size: 14px; letter-spacing: 0; }
.persona-note p, .persona-notes p { color: var(--muted); font-size: 13px; }
.persona-note small { display: none; }
.axis-list { margin: 23px 0; }
.axis-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 12px; align-items: center; margin: 17px 0; font-size: 12px; }
.axis-track { position: relative; height: 4px; border-radius: 8px; background: var(--line); }
.axis-marker { position: absolute; top: -4px; width: 12px; height: 12px; border: 3px solid var(--white); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); transform: translateX(-50%); }
.axis-row .active { font-weight: 600; color: var(--ink); }
.axis-row span:not(.active) { color: var(--muted); }
.axis-row > span:last-child { text-align: right; }
.personality-evidence { margin-top: 23px; font-size: 13px; }
.personality-evidence h3 { margin-bottom: 13px; font-size: 14px; }
.personality-evidence > .micro { margin-top: 15px; }
.evidence-line { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.evidence-line small { width: 100%; color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); font-size: 11px; line-height: 1.6; }
.atlas-page { padding: 14px 0 40px; }
.atlas-intro { margin: 15px 0 22px; }
.atlas-intro h1 { margin: 8px 0; font-size: 28px; }
.atlas-intro p { max-width: 480px; color: var(--muted); font-size: 13px; }
.atlas-intro .primary { min-height: 46px; margin-top: 18px; padding: 11px 18px; font-size: 13px; }
.atlas-filter { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0 13px; }
.filter-button { min-height: 39px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); font-size: 12px; }
.filter-button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.atlas-count { color: var(--muted); font-size: 12px; }
.atlas-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 19px; }
.persona-tile { min-width: 0; padding: 9px 9px 15px; border: 1px solid var(--line); border-radius: 21px; background: var(--white); text-align: left; transition: border-color .16s ease, transform .16s ease; }
.persona-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.persona-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff; }
.tile-meta { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding: 11px 2px 7px; color: var(--muted); font-size: 9px; }
.tile-meta span:last-child { color: var(--accent-strong); font-weight: 650; }
.persona-tile h3 { padding: 0 2px; font-size: 16px; }
.persona-tile p { padding: 7px 2px 0; color: var(--muted); font-size: 11px; }

/* Utility overlays stay quiet and readable. */
#toast { position: fixed; z-index: 100; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; width: max-content; max-width: calc(100vw - 32px); padding: 13px 18px; border-radius: 17px; background: var(--ink); color: #fff; box-shadow: 0 8px 30px #30201b24; font-size: 13px; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(14px); transition: opacity .2s ease, transform .2s ease; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
dialog { width: calc(100% - 32px); max-width: 480px; max-height: 85dvh; padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: var(--white); color: var(--ink); box-shadow: 0 24px 90px #30201b33; }
dialog::backdrop { background: #241b1859; backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 17px; margin-bottom: 19px; }
.dialog-head h2 { font-size: 22px; }
.dialog-close { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); font-size: 23px; }
.dialog-body { color: var(--muted); font-size: 13px; line-height: 1.8; }
.dialog-body p { margin-bottom: 14px; }
.dialog-body h3 { margin: 20px 0 9px; color: var(--ink); font-size: 14px; }
.dialog-body ul { padding-left: 19px; }
.dialog-body li { margin: 9px 0; }
.dialog-body .dialog-art { width: 210px; height: 210px; margin: 0 auto 18px; border-radius: 20px; object-fit: contain; }
.dialog-body > .primary { width: 100%; margin-top: 10px; }
.utility-links { display: grid; }
.utility-links button { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 54px; padding: 14px 3px; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 14px; }
.utility-links button:last-child { border-bottom: 0; }
.utility-links button span { color: var(--muted); }
.utility-links button:hover { color: var(--accent-strong); }

@media (max-width: 600px) {
  .shell, .shell-wide { padding: 0 20px; }
  .app-header { height: 68px; }
  .app-mode { font-size: 10px; }
  .inline-brand-note { margin: 2px 0 20px; font-size: 12px; }
  .ability-workspace { margin-top: 8px; }
  .quiz-topbar { margin-bottom: 10px; }
  .question-card { margin-top: 18px; border-radius: 25px; }
  .card-intro { padding: 24px 24px 23px; }
  .card-eyebrow { margin-bottom: 20px; }
  .card-intro .card-eyebrow { margin-bottom: 27px; padding-right: 68px; }
  .spark-mark { top: 14px; right: 22px; width: 64px; height: 64px; }
  .question-title, .ability-main .question legend { margin-bottom: 20px; font-size: 25px; }
  .card-intro .question-title { font-size: 29px; line-height: 1.38; margin-bottom: 16px; }
  .ability-main .options { padding: 20px 20px 23px; gap: 10px; }
  .ability-main .option { min-height: 56px; font-size: 14px; }
  .option { min-height: 56px; padding: 13px 14px; font-size: 14px; border-radius: 16px; }
  .question-help { margin: -8px 0 17px; }
  .quiz-note { font-size: 10px; }
  .flow, .entry-page, .match-page, .matching-page, .personality-page { margin-top: 12px; }
  .flow-heading h1, .match-heading h1 { font-size: 26px; }
  .choice-grid { gap: 8px; }
  .interest-button, .trait-button { border-radius: 16px; font-size: 12px; }
  .form-panel > .question { padding: 18px; border-radius: 22px; }
  .result-page { margin-top: 12px; padding: 23px 22px; border-radius: 25px; }
  .score-value { font-size: 60px; }
  .dimensions { gap: 20px 23px; }
  .persona-card { padding: 22px; border-radius: 25px; }
  .persona-copy h1 { font-size: 28px; }
  .atlas-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .profile-summary { padding: 15px 18px; }
  .profile-summary > div, .profile-summary dl > div { grid-template-columns: 73px minmax(0, 1fr); gap: 10px; font-size: 12px; }
  dialog { padding: 22px; border-radius: 25px; }
}

@media (max-width: 360px) {
  .shell, .shell-wide { padding: 0 14px; }
  .app-header { height: 59px; gap: 14px; }
  .brand-name { font-size: 20px; }
  .brand-icon { width: 27px; height: 27px; }
  .inline-brand-note { margin-bottom: 13px; font-size: 11px; }
  .quiz-topbar { gap: 7px; margin-bottom: 8px; }
  .step-label, .question-counter { font-size: 12px; }
  .stage-trigger, .stage-button, .quiz-topbar .stage-tab { padding: 5px 8px; font-size: 10px; }
  .question-card { margin-top: 14px; border-radius: 23px; }
  .card-intro { padding: 21px 19px 20px; }
  .card-eyebrow { margin-bottom: 16px; font-size: 10px; }
  .card-intro .card-eyebrow { margin-bottom: 22px; padding-right: 57px; gap: 8px; }
  .spark-mark { top: 13px; right: 17px; width: 57px; height: 57px; }
  .question-title, .ability-main .question legend { font-size: 22px; line-height: 1.45; margin-bottom: 17px; }
  .card-intro .question-title { font-size: 25px; line-height: 1.4; margin-bottom: 13px; }
  .card-intro .question-help summary { font-size: 10px; }
  .question-help { margin: -5px 0 13px; }
  .question-help summary { font-size: 10px; }
  .options { gap: 8px; }
  .ability-main .options { padding: 17px 16px 19px; gap: 8px; }
  .ability-main .option { min-height: 52px; font-size: 13px; }
  .option { min-height: 52px; padding: 11px 12px; font-size: 13px; gap: 10px; border-radius: 15px; }
  .option-check { flex-basis: 17px; width: 17px; height: 17px; }
  .option:has(input:checked) .option-check::after { left: 4px; top: 2px; }
  .quiz-actions { margin-top: 4px; }
  .quiz-actions .back-button, .quiz-actions .link-button { font-size: 12px; }
  .quiz-note { margin-top: 2px; font-size: 9px; }
  .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .selected-row { gap: 7px; font-size: 12px; }
  .selected-row select { max-width: 119px; padding: 8px 5px; font-size: 11px; }
  .order-button { width: 36px; height: 38px; }
  .field-grid, .form-grid { gap: 10px; }
  .result-page { padding: 21px 18px; }
  .dim-top { gap: 8px; }
  .dim-top h3 { font-size: 11px; }
  .persona-tile h3 { font-size: 14px; }
  .persona-copy h1 { font-size: 26px; }
  .axis-row { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 9px; font-size: 11px; }
}

@media (min-width: 601px) and (max-height: 800px) {
  .app-header { height: 65px; }
  .inline-brand-note { margin: 0 0 16px; }
  .ability-workspace { margin-top: 5px; }
  .question-card { margin-top: 16px; }
  .card-intro { padding: 25px 30px 23px; }
  .card-eyebrow { margin-bottom: 18px; }
  .card-intro .card-eyebrow { margin-bottom: 23px; }
  .question-title, .ability-main .question legend { font-size: 26px; margin-bottom: 18px; }
  .card-intro .question-title { font-size: 33px; margin-bottom: 15px; }
  .ability-main .options { padding: 20px 26px 24px; gap: 9px; }
  .ability-main .option { min-height: 53px; }
  .question-help { margin-bottom: 16px; }
  .option { min-height: 53px; padding-top: 12px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .option:has(input:checked), .option[aria-pressed="true"], .interest-button[aria-pressed="true"], .trait-button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .option-check { border-color: ButtonText; }
  .option:has(input:checked) .option-check, .option[aria-pressed="true"] .option-check { background: Highlight; border-color: Highlight; forced-color-adjust: none; }
  .progress-fill, .dim-bar span { background: Highlight; forced-color-adjust: none; }
}
