/* Assessment screens: header progress, welcome, situation, halfway, finished.
   Tokens and base components live in app.css. */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.accent-bright { color: var(--orange-bright); }
.body-large { margin: 0; font-size: 21px; line-height: 1.45; max-width: 680px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* Research-consent checkbox: square, ink, starts unchecked. */
.consent-option { display: flex; align-items: center; gap: 16px; max-width: 680px; padding: 18px 20px; border: var(--rule); background: var(--white); font-size: 19px; font-weight: 500; cursor: pointer; }
.consent-option input { appearance: none; flex: 0 0 auto; width: 28px; height: 28px; margin: 0; border: 4px solid var(--ink); background: var(--white); cursor: pointer; display: grid; place-content: center; }
.consent-option input::after { content: ""; width: 12px; height: 12px; background: var(--ink); transform: scale(0); }
.consent-option input:checked::after { transform: scale(1); }
.consent-option input:focus-visible { outline: 4px solid var(--orange); outline-offset: 2px; }

/* Follow-up: optional, so it sits beside a quiet skip link. */
.follow-up-intro { margin: 0; font-size: 18px; max-width: 620px; }
.button-large { min-height: 64px; padding: 0 32px; font-size: 18px; }
.fine-print-light { border-top-color: var(--cream); }

.link-button {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    min-height: 44px;
}
.link-button:hover { color: var(--orange); }
.link-button:focus-visible { outline: 4px solid var(--orange); outline-offset: 2px; }

/* Brand rule: the accent color never marks an error. Errors read as plain body text. */
.notice-error { background: transparent; color: var(--ink); border-left: 6px solid var(--ink); padding: 4px 0 4px 16px; }
.notice-light { background: var(--cream); color: var(--ink); }
.notice a { color: inherit; }

/* ---------- Header: progress and sync ---------- */

/* Header items never break mid-phrase; when they do not fit, the bar wraps to a second row. */
.shell-topbar { flex-wrap: wrap; row-gap: 12px; }
.brand-name, .progress-label, .sync-chip, .link-button { white-space: nowrap; }

.progress { display: flex; align-items: center; gap: 16px; }
.progress-label { font-weight: 700; font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; }
.progress-blocks { display: flex; gap: 6px; }
.progress-block { width: 16px; height: 16px; border: 2px solid var(--ink); }
.progress-block:nth-child(5) { margin-right: 8px; }
.progress-block.is-saved { background: var(--ink); }
.progress-block.is-current { background: var(--orange); border-color: var(--orange); }

.shell-actions { display: flex; align-items: center; gap: 24px; }

.sync-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.sync-chip-quiet { font-weight: 400; font-size: 16px; letter-spacing: 0; text-transform: none; }
.sync-dot { width: 10px; height: 10px; background: var(--ink); flex: 0 0 auto; }
.sync-dot-waiting { background: transparent; border: 2px solid var(--ink); border-radius: 50%; }

.banner { padding: 14px var(--gutter); background: var(--orange); color: var(--white); }
.banner p { margin: 0; font-size: 17px; line-height: 1.4; }
.banner a, .banner a:hover { color: var(--white); font-weight: 700; }
.banner a:hover { text-decoration-thickness: 3px; }
.notice a:hover { color: inherit; text-decoration-thickness: 3px; }
.split-ink a:not(.button) { color: var(--cream); }
.split-ink a:not(.button):hover { color: var(--orange-bright); }

/* ---------- Two-column pages: welcome, halfway, finished ---------- */

.split {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px 64px;
    padding: 64px clamp(32px, 7vw, 100px);
}
.split-deep { background: var(--cream-deep); }
.split-ink { background: var(--ink); color: var(--cream); }
.split-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.split-side { flex: 0 1 440px; }

.card { border: var(--rule); background: var(--white); display: flex; flex-direction: column; }
.card-shadow { box-shadow: 14px 14px 0 var(--ink); margin: 0 14px 14px 0; }
.card-cell { padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.card-cell + .card-cell { border-top: var(--rule); }
.card-cell p { margin: 0; font-size: 17px; }
.card-number { font-weight: 700; font-size: 44px; line-height: 1; color: var(--orange); }
.card-title { margin: 0; font-weight: 600; font-size: 22px; line-height: 1.2; }

.half-art { flex: 0 0 auto; width: min(400px, 60vw); aspect-ratio: 1 / 1; position: relative; }
.half-top { position: absolute; inset: 0 0 50% 0; background: var(--ink); border-radius: 999px 999px 0 0; }
.half-bottom { position: absolute; inset: 50% 0 0 0; border: var(--rule); border-top: 0; border-radius: 0 0 999px 999px; }
.half-square { position: absolute; left: 35%; top: 35%; width: 30%; height: 30%; background: var(--orange); }

.finish-art { flex: 0 1 320px; min-width: 200px; }
.finish-art svg { width: 100%; display: block; }

/* ---------- Situation ---------- */

.situation { flex: 1 1 auto; display: flex; align-items: stretch; }

.situation-story {
    flex: 0 0 54%;
    background: var(--ink);
    color: var(--cream);
    padding: 48px 56px 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 4px solid var(--cream);
    border-bottom: 1px solid var(--cream);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.situation-number { margin: 0; font-weight: 700; font-size: 96px; line-height: 1; letter-spacing: -0.03em; color: var(--orange-bright); }
.situation-number:focus { outline: none; }
.situation-text { margin: 0; font-size: 22px; line-height: 1.45; }
.situation-prompt { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 700; padding-left: 20px; border-left: 10px solid var(--orange-bright); }

.situation-answer {
    flex: 1 1 0;
    min-width: 0;
    padding: 48px 48px 56px 56px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.answer-input {
    flex: 1 1 auto;
    min-height: 300px;
    padding: 18px;
    border: var(--rule);
    border-radius: 0;
    background: var(--white);
    font-family: inherit;
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink);
    resize: vertical;
}
.answer-input:focus-visible { outline: 4px solid var(--orange); outline-offset: 2px; }

.answer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 16px; min-height: 24px; }
.answer-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.answer-locked { margin: 0; padding: 18px 20px; background: var(--cream-deep); border: var(--rule-thin); font-size: 19px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
    .situation { flex-direction: column; }
    .situation-story { flex: 0 0 auto; }
}

@media (max-width: 760px) {
    .shell-topbar { flex-wrap: wrap; row-gap: 12px; }
    .shell-brand { order: 1; }
    .shell-actions { order: 2; gap: 16px; }
    .progress { order: 3; flex: 1 1 100%; gap: 12px; }
    .progress-label { font-size: 13px; letter-spacing: 0.18em; white-space: nowrap; }
    .progress-blocks { flex: 1 1 auto; gap: 5px; }
    .progress-block { flex: 1 1 0; width: auto; height: 8px; }
    .progress-block:nth-child(5) { margin-right: 0; }
    .sync-chip { font-size: 12px; letter-spacing: 0.1em; }
    .link-button { font-size: 14px; }
    .banner p { font-size: 16px; }

    .body-large { font-size: 18px; }
    .button-large { min-height: 56px; font-size: 16px; }
    .button-row .button { flex: 1 1 100%; }

    .split { padding: 32px var(--gutter); gap: 32px; }
    .split-main { flex-basis: 100%; gap: 20px; }
    .split-side { flex-basis: 100%; }
    .card-shadow { box-shadow: 8px 8px 0 var(--ink); margin: 0 8px 8px 0; }
    .card-cell { padding: 18px 20px; }
    .card-number { font-size: 30px; }
    .card-title { font-size: 19px; }
    .card-cell p { font-size: 16px; }
    .half-art { width: 120px; order: -1; }
    .finish-art { flex-basis: 160px; min-width: 0; max-width: 200px; }

    .situation-story { padding: 28px var(--gutter) 32px; gap: 16px; }
    .strip { font-size: 13px; letter-spacing: 0.18em; padding: 10px 0; }
    .strip span + span { display: none; }   /* the header already shows "Situation n of 10" */
    .situation-number { font-size: 60px; }
    .situation-text { font-size: 18px; }
    .situation-prompt { font-size: 21px; padding-left: 16px; border-left-width: 8px; }
    .situation-answer { padding: 28px var(--gutter); gap: 12px; }
    .answer-input { min-height: 240px; padding: 14px; font-size: 18px; }
    .answer-meta { font-size: 15px; }
    .answer-locked { padding: 14px 16px; font-size: 17px; }
}

/* White on tomato is only readable as large bold text (WCAG large text: 18.66px bold and up),
   so tomato buttons stay at 19px on every screen size, as on the homepage. */
.button.button-orange, .button.button-orange.button-large { font-size: 19px; }
