@font-face {
    font-family: "OpenDyslexic";
    src: url("../fonts/opendyslexic/opendyslexic-regular.209dda5cb267.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "OpenDyslexic";
    src: url("../fonts/opendyslexic/opendyslexic-bold.df553171a66f.woff2") format("woff2");
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
}

:root {
    --ink: #18211c;
    --muted: #68736c;
    --paper: #f4f3ec;
    --card: #fffefa;
    --reading-paper: #fff3b8;
    --reading-line: #d8c778;
    --line: #d9ddd4;
    --green: #245b45;
    --green-soft: #e1eee7;
    --amber: #a56213;
    --amber-soft: #f7e8cf;
    --red: #9e443b;
    --red-soft: #f8e6e3;
    --shadow: 0 8px 30px rgba(27, 42, 32, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.72 "OpenDyslexic", Verdana, Tahoma, Arial, sans-serif; letter-spacing: 0; }
body.standard-font { font-family: Verdana, Tahoma, Arial, sans-serif; line-height: 1.7; letter-spacing: .012em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
[x-cloak] { display: none !important; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: white; color: var(--green); font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #d18a20; outline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.018em; }
p, li { max-width: 72ch; }

.site-header { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: #173c2d; color: white; position: relative; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #dbe98d; color: #173c2d; font-family: Georgia, serif; }
.header-note { color: #c5d5cc; font-size: .87rem; }
.header-account { display: flex; align-items: center; gap: 12px; color: #c5d5cc; font-size: .82rem; }
.header-account form { margin: 0; }
.header-account button { border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: transparent; color: white; padding: 6px 9px; }
.header-account button:hover { background: rgba(255,255,255,.1); }
.font-toggle { display: inline-flex; align-items: center; gap: 7px; }
.font-toggle-icon { display: grid; place-items: center; min-width: 27px; height: 22px; border-radius: 5px; background: rgba(255,255,255,.14); font: 700 .72rem/1 Verdana, Tahoma, Arial, sans-serif; }
.font-toggle-label { font-size: .7rem; }

.page { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 68px 0; }
.page-narrow { width: min(960px, calc(100% - 40px)); }
.hero { padding: 22px 0 48px; max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.15; margin: 12px 0 22px; letter-spacing: -.018em; }
.hero > p:last-child { font-size: 1.17rem; color: var(--muted); max-width: 650px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 800; color: var(--green); }
.stack { display: grid; gap: 18px; }
.exam-tile { background: var(--card); padding: 30px; border: 1px solid var(--line); border-radius: 18px; display: flex; justify-content: space-between; gap: 32px; align-items: end; box-shadow: var(--shadow); }
.exam-tile h2 { margin: 3px 0 7px; font-size: 1.5rem; }
.exam-tile p { margin-bottom: 0; color: var(--muted); }
.button-row { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.button { border: 1px solid var(--green); border-radius: 10px; background: var(--green); color: white; padding: 10px 15px; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.button:hover { filter: brightness(1.08); }
.button-secondary { background: transparent; color: var(--green); }
.button-small { padding: 7px 11px; font-size: .86rem; }
.button-large { padding: 13px 19px; }
.recent { margin-top: 52px; }
.recent h2 { font-size: 1.2rem; }
.attempt-list { display: grid; border-top: 1px solid var(--line); }
.attempt-list a { padding: 14px 2px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; text-decoration: none; }
.muted { color: var(--muted); font-size: .88rem; }
.empty-state { border: 1px dashed var(--line); padding: 30px; text-align: center; border-radius: 14px; }
.dashboard-section { margin: 30px 0 58px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 17px; }
.dashboard-heading h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.018em; }
.dashboard-heading > p { color: var(--muted); font-size: .82rem; margin: 0; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.chapter-tile { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 20px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.chapter-tile:hover { transform: translateY(-2px); border-color: #9aaca1; }
.chapter-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chapter-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--ink); color: white; font-weight: 800; }
.chapter-tile h3 { margin: 15px 0 5px; font-size: 1.12rem; }
.chapter-tile p { margin: 0 0 17px; min-height: 44px; color: var(--muted); font-size: .9rem; }
.readiness { border-radius: 99px; padding: 4px 8px; font-size: .66rem; font-weight: 750; }
.readiness-insufficient { background: #ecece7; color: #666c67; }
.readiness-foundation { background: var(--red-soft); color: var(--red); }
.readiness-developing { background: var(--amber-soft); color: var(--amber); }
.readiness-secure, .readiness-strong { background: var(--green-soft); color: var(--green); }
.progress-track { height: 7px; border-radius: 99px; background: #e6e8e2; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.chapter-stats { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: .69rem; }
.chapter-hero { display: grid; grid-template-columns: 1fr 260px; gap: 45px; align-items: end; margin: 10px 0 35px; }
.chapter-hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.018em; line-height: 1.15; margin: 10px 0 16px; }
.chapter-hero > div:first-child > p:last-child { color: var(--muted); font-size: 1.06rem; }
.readiness-card { border: 1px solid var(--line); background: var(--card); border-radius: 15px; padding: 20px; }
.readiness-card span, .readiness-card b { display: block; color: var(--muted); font-size: .72rem; }
.readiness-card strong { display: block; font-size: 1.25rem; margin: 5px 0 13px; }
.readiness-card b { font-weight: 600; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 48px; }
.metric-grid div { border-top: 1px solid var(--line); padding-top: 10px; }
.metric-grid span { display: block; min-height: 36px; color: var(--muted); font-size: .7rem; }
.metric-grid strong { font-size: 1.55rem; }
.compact-tile { padding: 23px; }
.auth-page { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 30px 15px; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 5px 0 8px; font-size: 2rem; letter-spacing: -.018em; }
.auth-card > p { color: var(--muted); margin: 0 0 23px; }
.auth-card label { display: grid; gap: 5px; margin: 14px 0; color: var(--muted); font-size: .78rem; font-weight: 700; }
.auth-card input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.auth-card .button { width: 100%; margin-top: 7px; }
.auth-error { background: var(--red-soft); color: var(--red); border-radius: 9px; padding: 10px 12px; font-size: .85rem; }

.workspace { display: grid; grid-template-columns: 290px minmax(0, 840px); gap: 42px; width: min(1210px, calc(100% - 42px)); margin: 0 auto; align-items: start; }
.sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding: 36px 8px 36px 0; }
.sidebar h1 { font-size: 1.42rem; line-height: 1.3; margin: 8px 0 22px; letter-spacing: -.018em; }
.back-link { display: inline-block; color: var(--muted); font-size: .85rem; margin-bottom: 35px; text-decoration: none; }
.progress-block { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 22px; overflow: hidden; background: rgba(255,255,255,.45); }
.progress-block div { padding: 11px 5px; text-align: center; border-right: 1px solid var(--line); }
.progress-block div:last-child { border-right: 0; }
.progress-block strong { display: block; font-size: 1.1rem; }
.progress-block span { display: block; font-size: .65rem; color: var(--muted); }
.sidebar label { display: grid; gap: 5px; margin: 12px 0; color: var(--muted); font-size: .75rem; font-weight: 700; }
select, input[type="number"] { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); }
.question-nav { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 24px; }
.question-nav a { border: 1px solid var(--line); border-radius: 7px; padding: 5px 0; text-align: center; text-decoration: none; font-size: .73rem; background: rgba(255,255,255,.5); }
.question-nav a:hover { border-color: var(--green); background: var(--green-soft); }

.question-stream { padding: 46px 0 90px; min-width: 0; }
.stream-heading { display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 2px 24px; margin-bottom: 34px; gap: 20px; }
.stream-heading h2 { margin: 0; font-size: 2.15rem; letter-spacing: -.018em; }
body.standard-font h1, body.standard-font h2, body.standard-font h3,
body.standard-font .hero h1, body.standard-font .dashboard-heading h2,
body.standard-font .chapter-hero h1, body.standard-font .auth-card h1,
body.standard-font .sidebar h1, body.standard-font .stream-heading h2 { letter-spacing: .005em; }
.stream-heading > p { color: var(--muted); max-width: 290px; text-align: right; margin: 0; }
.exam-section { margin-bottom: 48px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 14px; }
.section-heading h2 { font-size: 1rem; margin: 0; }
.section-heading span { font-size: .78rem; color: var(--muted); }
.question-card { background: var(--reading-paper); border: 1px solid var(--reading-line); border-radius: 16px; margin-bottom: 18px; padding: 24px 27px; box-shadow: var(--shadow); scroll-margin-top: 20px; }
.question-card.review-approved { border-left: 4px solid var(--green); }
.question-card.review-needs_changes { border-left: 4px solid var(--red); }
.question-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.question-header > div { display: flex; align-items: center; gap: 9px; }
.number { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 800; }
.type-label, .meta span { font-size: .73rem; color: var(--muted); }
.meta { justify-content: end; }
.meta span { background: rgba(255,255,255,.55); border-radius: 99px; padding: 4px 8px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prompt { font-size: 1.05rem; line-height: 1.8; }
.stimulus { background: rgba(255,255,255,.48); border-left: 4px solid #a98624; border-radius: 10px; padding: 16px 19px; margin-bottom: 20px; font-size: .95rem; line-height: 1.75; }
.stimulus > strong { display: block; margin-bottom: 5px; }
.stimulus p { margin: 4px 0; }
.options { list-style: none; padding: 0; margin: 19px 0 3px; display: grid; gap: 8px; }
.options li { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--reading-line); border-radius: 9px; background: rgba(255,255,255,.36); font-size: .95rem; }
.options li > span { font-weight: 800; color: var(--green); }
.options em { font-size: .7rem; color: var(--muted); font-style: normal; }
.answer-panel { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 15px; }
.answer-panel summary { color: var(--green); font-weight: 700; cursor: pointer; font-size: .9rem; }
.answer-content { background: var(--green-soft); border-radius: 10px; margin-top: 13px; padding: 16px 18px; font-size: .9rem; }
.answer-content ul { padding-left: 20px; }
.review-form { display: grid; grid-template-columns: 190px 1fr; gap: 13px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 17px; }
.review-form label { display: grid; gap: 5px; color: var(--muted); font-weight: 700; font-size: .74rem; }
.review-form textarea, .response-box { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; resize: vertical; background: white; color: var(--ink); }
.review-form textarea:focus, .response-box:focus { border-color: var(--green); outline: 3px solid rgba(36,91,69,.1); }
.notes-label { grid-column: 2; grid-row: 1 / span 2; }
.review-actions { display: flex; align-items: center; gap: 9px; }
.save-state { color: var(--green); font-size: .73rem; min-height: 1em; }

.timer { background: var(--ink); color: white; border-radius: 12px; padding: 15px; margin: 18px 0; }
.timer span { display: block; color: #b8c2bc; font-size: .72rem; }
.timer strong { display: block; font-variant-numeric: tabular-nums; font-size: 1.6rem; letter-spacing: .05em; }
.answer-options { display: grid; gap: 8px; margin-top: 20px; }
.answer-options label { display: grid; grid-template-columns: 20px 30px 1fr; gap: 8px; align-items: center; border: 1px solid var(--reading-line); padding: 12px; border-radius: 10px; background: rgba(255,255,255,.36); cursor: pointer; }
.answer-options label:hover { border-color: #91a499; }
.answer-options label:has(input:checked) { background: var(--green-soft); border-color: var(--green); }
.option-letter { font-weight: 800; }
.response-box { margin-top: 18px; min-height: 150px; }
.submit-bar { position: sticky; bottom: 15px; z-index: 3; background: rgba(255,254,250,.96); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px 13px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 35px rgba(22,36,27,.15); }
.submit-bar p { margin: 0; color: var(--muted); font-size: .86rem; }
.mobile-quiz-progress, .mobile-question-actions { display: none; }

.score-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); margin-bottom: 9px; }
.score-card span { display: block; color: var(--muted); font-size: .73rem; }
.score-card strong { font-size: 1.7rem; }
.result-options .correct { border-color: var(--green); background: var(--green-soft); }
.result-options .incorrect { border-color: var(--red); background: var(--red-soft); }
.your-answer { border: 1px solid var(--line); border-radius: 10px; padding: 15px; margin: 17px 0; }
.your-answer strong { display: block; font-size: .74rem; color: var(--muted); margin-bottom: 7px; }
.your-answer p { white-space: normal; margin: 0; }
.self-score { display: flex; align-items: end; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.self-score label { font-size: .78rem; font-weight: 700; color: var(--muted); }
.self-score input { width: 80px; display: inline-block; margin-left: 8px; }

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

@media (max-width: 900px) {
    .workspace { display: block; width: min(760px, calc(100% - 28px)); }
    .sidebar { position: relative; top: auto; max-height: none; padding: 28px 0 10px; }
    .sidebar label, .progress-block { display: none; }
    .question-nav { grid-template-columns: repeat(12, 1fr); }
    .question-stream { padding-top: 20px; }
    .exam-tile { display: block; }
    .button-row { margin-top: 22px; }
    .chapter-hero { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 600px) {
    .site-header { padding: 0 16px; }
    .header-note { display: none; }
    .font-toggle-label { display: none; }
    .page { width: calc(100% - 28px); padding-top: 35px; }
    .hero h1 { font-size: 2.6rem; }
    .exam-tile { padding: 22px; }
    .button-row { align-items: stretch; flex-direction: column; }
    .button-row form, .button-row button { width: 100%; }
    .chapter-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .attempt-workspace { width: 100%; min-height: calc(100svh - 64px); background: var(--reading-paper); }
    .attempt-workspace .sidebar, .attempt-workspace .stream-heading, .attempt-workspace .section-heading { display: none; }
    .attempt-workspace .question-stream { padding: 0 0 104px; }
    .attempt-workspace .exam-section { margin: 0; }
    .mobile-quiz-progress { display: block; position: sticky; top: 0; z-index: 5; padding: 13px 16px 11px; background: rgba(244,243,236,.96); backdrop-filter: blur(10px); scroll-margin-top: 0; }
    .mobile-quiz-topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: .76rem; color: var(--muted); }
    .mobile-quiz-topline a { color: var(--green); font-weight: 700; text-decoration: none; }
    .mobile-timer { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
    .mobile-progress-track { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: var(--line); }
    .mobile-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
    .attempt-workspace .question-card { min-height: calc(100svh - 121px); margin: 0; padding: 24px 18px 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
    .attempt-workspace .prompt { font-size: 1.05rem; line-height: 1.78; letter-spacing: 0; }
    .attempt-workspace .stimulus { line-height: 1.78; }
    .attempt-workspace .answer-options { gap: 11px; }
    .attempt-workspace .answer-options label { min-height: 58px; padding: 14px 13px; line-height: 1.55; letter-spacing: 0; background: rgba(255,255,255,.62); }
    .mobile-question-actions { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin: auto -18px 0; padding: 14px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(216,199,120,.72); background: rgba(255,243,184,.96); backdrop-filter: blur(10px); }
    .mobile-question-actions .button { min-height: 48px; }
    .mobile-question-actions button:disabled { opacity: .4; cursor: default; }
    .attempt-workspace .submit-bar { position: fixed; inset: auto 10px 10px; display: none; }
    .attempt-workspace .submit-bar.mobile-visible { display: block; }
    .workspace:not(.attempt-workspace) { width: calc(100% - 20px); }
    .question-nav { grid-template-columns: repeat(8, 1fr); }
    .stream-heading { display: block; }
    .stream-heading h2 { font-size: 1.7rem; }
    .stream-heading > p { text-align: left; margin-top: 8px; }
    .question-card { padding: 19px 17px; border-radius: 12px; }
    .question-header { align-items: start; }
    .question-header .meta { display: none; }
    .review-form { display: block; }
    .review-form label, .review-actions { margin-top: 11px; }
    .submit-bar { display: block; }
    .submit-bar p { margin-bottom: 9px; }
    .submit-bar button { width: 100%; }
}
