:root {
    --ink: #122b36;
    --muted: #61717a;
    --paper: #f6f7f2;
    --white: #fff;
    --line: #dce2dc;
    --mint: #c9eddf;
    --green: #08765f;
    --soft: #eaf3ec;
    --amber: #885923;
    --red: #ad3434;
    --radius: 18px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-size: 16px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px
}

body {
    margin: 0
}

button,
input,
select,
textarea {
    font: inherit
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation
}

button {
    cursor: pointer
}

button:disabled {
    cursor: wait;
    opacity: .55
}

a {
    color: inherit;
    text-decoration: none
}

button {
    color: inherit
}

h1,
h2,
h3,
p {
    margin: 0
}

h1,
h2,
h3 {
    letter-spacing: -.045em
}

p {
    line-height: 1.65;
    color: var(--muted)
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.15
}

h3 {
    font-size: 1.32rem
}

svg {
    display: block
}

.shell {
    max-width: 1200px;
    width: calc(100% - 72px);
    margin: auto
}

.site-header {
    background: rgba(246, 247, 242, .96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5
}

.header-inner {
    height: 98px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.brand {
    font-weight: 850;
    letter-spacing: -.035em;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 1.22rem;
    line-height: 1.05
}

.brand svg {
    width: 40px;
    height: 40px
}

.brand small {
    display: block;
    font-size: .65rem;
    letter-spacing: .38em;
    margin-top: 5px
}

.header-inner nav {
    display: flex;
    gap: 32px;
    font-size: .86rem;
    font-weight: 600
}

.header-inner nav a:hover,
.text-link:hover,
.footer-links button:hover {
    text-decoration: underline;
    text-underline-offset: 5px
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 17px 21px;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.3
}

.button:hover {
    filter: brightness(.95)
}

.primary {
    background: var(--ink);
    color: white
}

.secondary {
    background: transparent;
    border-color: #b9c6bf
}

.small {
    padding: 12px 16px;
    font-size: .8rem
}

.full {
    width: 100%
}

.text-link {
    border: 0;
    background: none;
    padding: 0;
    font-weight: 650;
    font-size: .86rem;
    color: var(--ink)
}

.hero {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 90px;
    align-items: center;
    padding: 75px 0 60px
}

.eyebrow {
    font-size: .67rem;
    letter-spacing: .13em;
    font-weight: 800;
    display: inline-flex;
    gap: 8px;
    align-items: center
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green)
}

h1 {
    font-size: clamp(3rem, 5.6vw, 4.7rem);
    line-height: 1.045;
    margin: 24px 0;
    letter-spacing: -.065em
}

h1 em {
    color: var(--green);
    font-style: normal
}

.hero-copy>p:not(.micro):not(.disclaimer) {
    max-width: 475px;
    font-size: 1rem
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 29px 0 15px
}

.micro {
    font-size: .72rem;
    line-height: 1.6
}

.disclaimer {
    font-size: .68rem;
    line-height: 1.6
}

.hero-copy>.disclaimer {
    max-width: 490px;
    margin-top: 22px
}

.hero-card {
    background: white;
    border: 1px solid #e0e6df;
    border-radius: 24px;
    padding: 29px;
    box-shadow: 0 16px 45px #122b3608;
}

.hero-card h2 {
    font-size: 1.65rem;
    margin-top: 23px;
    line-height: 1.25
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px
}

.pill {
    border-radius: 30px;
    font-size: .59rem;
    font-weight: 750;
    padding: 7px 10px;
    background: var(--mint);
    white-space: nowrap;
    letter-spacing: .025em
}

.outline {
    background: none;
    border: 1px solid var(--line)
}

.score-example {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 28px 0
}

.score-circle {
    flex: none;
    border: 9px solid var(--mint);
    border-right-color: #e9eee8;
    border-radius: 50%;
    width: 145px;
    height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

.score-circle strong {
    font-size: 2.5rem;
    letter-spacing: -.06em
}

.score-circle strong span {
    font-size: 1.2rem
}

.score-circle small {
    font-size: .55rem;
    color: var(--muted);
    margin-top: 5px
}

.score-example h3 {
    font-size: 1.06rem;
    letter-spacing: -.025em;
    margin: 7px 0
}

.score-example p {
    font-size: .76rem;
    line-height: 1.5
}

.mini-label {
    font-size: .62rem;
    letter-spacing: .09em;
    color: var(--muted);
    font-weight: 750
}

.sample-bar {
    margin-top: 17px
}

.sample-bar>span {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    margin-bottom: 8px
}

.sample-bar>div,
.area-track {
    height: 7px;
    background: #eaf0eb;
    border-radius: 5px;
    overflow: hidden
}

.sample-bar i {
    display: block;
    height: 100%;
    background: #7db9a4;
    border-radius: 5px
}

.fill-86 {
    width: 86%
}

.fill-75 {
    width: 75%
}

.fill-50 {
    width: 50%;
    background: #d6a967 !important
}

.priority b {
    color: var(--amber)
}

.report-note {
    background: var(--soft);
    border-radius: 11px;
    padding: 17px;
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 24px 0 13px
}

.report-note>span:first-child {
    font-size: 1.6rem;
    color: var(--green)
}

.report-note p {
    font-size: .77rem;
    line-height: 1.5
}

.report-note strong {
    color: var(--ink)
}

.note-arrow {
    margin-left: auto
}

.hero-card>.micro {
    font-size: .62rem;
    text-align: center
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
    gap: 20px;
    font-size: .83rem;
    font-weight: 600
}

.feature-strip span {
    display: flex;
    gap: 14px;
    align-items: center
}

.feature-strip b {
    font-size: .62rem;
    color: var(--green);
    background: var(--mint);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center
}

.section {
    padding: 65px 0
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px
}

.section-heading h2 {
    margin: 12px 0
}

.section-heading p {
    font-size: .88rem
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.mode-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column
}

.recommended {
    border-color: #95c3ae;
    box-shadow: 0 0 0 1px #95c3ae
}

.mode-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 27px;
    gap: 10px
}

.mode-icon {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--green)
}

.mode-card h3 {
    font-size: 1.45rem;
    margin-bottom: 12px
}

.mode-card>p {
    font-size: .84rem;
    min-height: 85px
}

.mode-meta {
    display: flex;
    gap: 12px;
    font-size: .73rem;
    font-weight: 650;
    margin: 18px 0;
    border-top: 1px solid var(--line);
    padding-top: 18px
}

.mode-meta span+span {
    border-left: 1px solid var(--line);
    padding-left: 12px
}

.mode-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    font-size: .77rem;
    line-height: 2
}

.mode-card li:before {
    content: '✓';
    color: var(--green);
    margin-right: 10px
}

.mode-card .button {
    margin-top: auto
}

.select-label {
    font-size: .7rem;
    display: block;
    margin: 3px 0 8px
}

.mode-card select {
    margin-bottom: 10px
}

.mode-card .micro {
    font-size: .65rem;
    min-height: 0;
    margin-bottom: 24px
}

.topic-section {
    padding-top: 0
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

.topic-button {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    min-height: 145px
}

.topic-button:hover {
    border-color: var(--green);
    background: var(--soft)
}

.topic-button span {
    font-size: .62rem;
    color: var(--green);
    font-weight: 750;
    letter-spacing: .08em
}

.topic-button strong {
    font-size: .9rem;
    line-height: 1.4;
    letter-spacing: -.02em
}

.topic-button small {
    font-size: .64rem;
    color: var(--muted);
    margin-top: auto
}

.method-section {
    background: var(--ink);
    color: white;
    border-radius: 22px;
    padding: 45px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 70px
}

.method-section p {
    color: #b7c6c6
}

.method-section h2 {
    margin: 18px 0
}

.method-section .text-link {
    color: var(--mint);
    margin-top: 22px
}

.method-section>div>p {
    font-size: .88rem
}

.method-list article {
    display: flex;
    gap: 23px;
    padding: 23px 0;
    border-bottom: 1px solid #ffffff25
}

.method-list article:last-child {
    border-bottom: 0
}

.method-list article>span {
    color: #8bd2b9;
    font-size: .7rem;
    margin-top: 6px
}

.method-list h3 {
    margin-bottom: 8px;
    font-size: 1.14rem;
    letter-spacing: -.025em
}

.method-list p {
    font-size: .81rem
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px
}

.resource-grid button {
    background: #edf0e8;
    border: 1px solid var(--line);
    padding: 23px;
    border-radius: 12px;
    text-align: left;
    position: relative;
    min-height: 160px
}

.resource-grid button:hover {
    background: var(--mint)
}

.resource-grid span {
    font-size: .55rem;
    letter-spacing: .06em;
    display: block;
    color: var(--muted);
    margin-bottom: 20px
}

.resource-grid strong {
    font-size: .94rem;
    line-height: 1.4;
    letter-spacing: -.02em
}

.resource-grid b {
    position: absolute;
    right: 18px;
    bottom: 18px
}

.launch-section {
    background: var(--mint);
    padding: 40px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 70px;
    align-items: center;
    margin: 0 0 65px
}

.launch-section h2 {
    margin: 15px 0
}

.launch-section p {
    font-size: .84rem;
    color: #31594a
}

.launch-section .micro {
    font-size: .67rem;
    margin-top: 12px
}

.price {
    font-size: 2.7rem;
    letter-spacing: -.06em;
    font-weight: 800;
    display: block;
    margin-bottom: 22px
}

.price small {
    font-size: .67rem;
    display: block;
    letter-spacing: 0;
    font-weight: 500;
    margin-top: 8px
}

.footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 25px
}

.footer-brand {
    font-size: 1.05rem;
    gap: 8px
}

.footer-brand small {
    margin: 0;
    font-size: .6rem
}

.footer p {
    font-size: .73rem;
    margin-top: 10px
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-end;
    align-content: flex-start
}

.footer-links button {
    border: 0;
    background: none;
    padding: 0;
    font-size: .75rem
}

.footer>.disclaimer {
    grid-column: 1/-1;
    font-size: .66rem;
    max-width: 800px
}

.empty-state {
    border: 1px dashed #bccbc1;
    border-radius: 14px;
    padding: 35px;
    color: var(--muted);
    font-size: .88rem
}

.app-status {
    font-size: .76rem;
    color: var(--muted);
    padding-top: 16px
}

.app-status.ready {
    display: none
}

.notice {
    border: 1px solid #e1c789;
    background: #fff7e4;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: .75rem;
    line-height: 1.5;
    margin-top: 20px
}

.resume-panel {
    background: white;
    border: 1px solid #b4d6c5;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-top: 30px
}

.resume-panel[hidden] {
    display: none
}

.resume-panel h2 {
    font-size: 1.3rem;
    margin: 10px 0
}

.resume-panel p {
    font-size: .79rem
}

dialog {
    border: 1px solid var(--line);
    padding: 0;
    color: var(--ink);
    border-radius: 20px;
    box-shadow: 0 24px 90px #122b3640
}

dialog::backdrop {
    background: #122b3688;
    backdrop-filter: blur(4px)
}

.info-dialog {
    max-width: 740px;
    width: calc(100% - 32px);
    padding: 38px;
    max-height: 85dvh
}

.dialog-close {
    position: absolute;
    right: 17px;
    top: 12px;
    background: none;
    border: 0;
    font-size: 1.8rem
}

.info-dialog h2 {
    margin-bottom: 20px;
    padding-right: 22px
}

.info-dialog h3 {
    margin: 22px 0 9px;
    font-size: 1.1rem
}

.info-dialog p,
.info-dialog li {
    font-size: .88rem;
    line-height: 1.7
}

.info-dialog p+p {
    margin-top: 13px
}

.info-dialog ul {
    padding-left: 20px
}

.info-dialog a {
    color: var(--green);
    text-decoration: underline
}

.info-dialog table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem
}

.info-dialog th,
.info-dialog td {
    text-align: left;
    padding: 10px 5px;
    border-bottom: 1px solid var(--line);
    vertical-align: top
}

.info-dialog form {
    display: grid;
    gap: 16px;
    margin-top: 20px
}

input,
select,
textarea {
    padding: 12px;
    border: 1px solid #b9c6bf;
    border-radius: 8px;
    width: 100%;
    background: white;
    color: var(--ink)
}

textarea {
    min-height: 110px;
    resize: vertical
}

.check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .8rem;
    line-height: 1.5
}

.check-label input {
    width: auto;
    margin-top: 4px
}

.form-status {
    font-size: .8rem;
    color: var(--green);
    line-height: 1.5
}

.form-status.error,
.error-text {
    color: var(--red)
}

.quiz-dialog {
    width: min(1150px, calc(100% - 32px));
    max-height: 92dvh;
    background: var(--paper)
}

.quiz-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 22px 28px;
    position: sticky;
    top: 0;
    z-index: 2
}

.quiz-title {
    font-size: 1.03rem;
    letter-spacing: -.025em;
    margin-top: 4px
}

.quiz-top .timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.06rem;
    font-weight: 750
}

.quiz-top-right {
    display: flex;
    align-items: center;
    gap: 20px
}

.quiz-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 25px;
    padding: 28px
}

.question-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 29px
}

.question-counter {
    font-size: .72rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 21px;
    gap: 15px
}

.flag-button {
    background: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 7px 10px;
    font-size: .68rem
}

.flag-button.active {
    background: #fff0ce;
    border-color: #d5b05c
}

.question-panel h2 {
    font-size: 1.42rem;
    line-height: 1.45;
    letter-spacing: -.025em;
    margin: 12px 0 24px;
    overflow-wrap: anywhere
}

.answers {
    display: grid;
    gap: 11px
}

.answer {
    border: 1px solid #cbd6ce;
    border-radius: 9px;
    background: white;
    padding: 15px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: .88rem;
    line-height: 1.5
}

.answer .letter {
    border: 1px solid #cbd6ce;
    border-radius: 6px;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: none;
    font-weight: 750;
    font-size: .77rem
}

.answer:hover {
    background: #f4f8f3
}

.answer.selected {
    border-color: var(--green);
    background: var(--soft)
}

.answer.correct {
    border-color: var(--green);
    background: #e7f5ec
}

.answer.incorrect {
    border-color: var(--red);
    background: #fff0ee
}

.answer:disabled {
    cursor: default;
    opacity: 1
}

.answer.selected .letter {
    background: var(--green);
    color: white;
    border-color: var(--green)
}

.quiz-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 22px;
    flex-wrap: wrap
}

.explanation {
    background: var(--soft);
    border: 1px solid #cfe2d5;
    border-radius: 12px;
    padding: 20px;
    margin-top: 22px
}

.explanation h3 {
    font-size: 1rem;
    margin-bottom: 13px;
    letter-spacing: -.025em
}

.explanation p {
    font-size: .8rem;
    line-height: 1.6;
    margin: 9px 0
}

.explanation b {
    color: var(--ink)
}

.explanation a {
    color: var(--green);
    font-size: .72rem;
    text-decoration: underline;
    overflow-wrap: anywhere
}

.question-panel .report-button {
    border: 0;
    background: none;
    padding: 0;
    font-size: .71rem;
    color: var(--muted);
    text-decoration: underline;
    margin-top: 22px
}

.quiz-sidebar {
    align-self: start;
    background: #edf1e9;
    padding: 20px;
    border-radius: 12px
}

.quiz-sidebar h3 {
    font-size: 1rem;
    letter-spacing: -.02em
}

.question-map {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 17px 0
}

.question-map button {
    border: 1px solid #c8d2c9;
    border-radius: 6px;
    min-height: 31px;
    font-size: .67rem;
    background: white;
    padding: 4px
}

.question-map button.answered {
    background: var(--mint);
    border-color: #9ecdb5
}

.question-map button.current {
    outline: 2px solid var(--ink);
    outline-offset: 1px
}

.question-map button.flagged {
    box-shadow: inset 0 -4px #d2a14b
}

.map-legend {
    font-size: .67rem;
    line-height: 1.8;
    color: var(--muted)
}

.quiz-sidebar .button {
    margin-top: 22px
}

.save-state {
    font-size: .68rem;
    display: block;
    min-height: 20px;
    margin-top: 10px;
    color: var(--muted)
}

.confirm-dialog {
    padding: 30px;
    max-width: 480px;
    width: calc(100% - 32px)
}

.confirm-dialog h2 {
    font-size: 1.45rem;
    margin-bottom: 15px
}

.confirm-dialog p {
    font-size: .86rem
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    flex-wrap: wrap
}

.result-page {
    padding: 30px
}

.result-hero {
    background: white;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 30px;
    align-items: center
}

.result-hero h2 {
    font-size: 2.1rem;
    margin: 12px 0
}

.result-hero p {
    font-size: .84rem
}

.result-score {
    font-size: 3.6rem;
    letter-spacing: -.07em;
    font-weight: 800;
    color: var(--green)
}

.result-score small {
    display: block;
    font-size: .7rem;
    letter-spacing: 0;
    font-weight: 600;
    color: var(--muted);
    margin-top: 7px
}

.result-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    margin-top: 22px
}

.result-box {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 25px
}

.result-box h3 {
    margin-bottom: 15px;
    font-size: 1.12rem;
    letter-spacing: -.025em
}

.area-row {
    margin: 16px 0
}

.area-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .76rem;
    line-height: 1.4;
    margin-bottom: 8px
}

.area-row p {
    font-size: .64rem;
    margin-top: 6px
}

.area-track progress {
    width: 100%;
    height: 8px;
    display: block;
    border: 0;
    appearance: none
}

.area-track {
    height: auto;
    background: none
}

.area-track progress::-webkit-progress-bar {
    background: #eaf0eb;
    border-radius: 5px
}

.area-track progress::-webkit-progress-value {
    background: #7db9a4;
    border-radius: 5px
}

.area-track progress::-moz-progress-bar {
    background: #7db9a4;
    border-radius: 5px
}

.result-box li {
    font-size: .81rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--muted)
}

.result-box li b {
    color: var(--ink)
}

.result-box ul {
    padding-left: 19px
}

.result-box .button {
    margin-top: 16px
}

.result-tools {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 22px 0
}

.answer-review h3 {
    margin: 25px 0 17px;
    letter-spacing: -.02em
}

.review-item {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 10px 0
}

.review-item summary {
    padding: 16px;
    cursor: pointer;
    font-size: .84rem;
    line-height: 1.5
}

.review-item .review-content {
    padding: 0 20px 20px;
    font-size: .8rem
}

.review-item .review-content p {
    margin: 10px 0;
    overflow-wrap: anywhere
}

.review-item a {
    font-size: .7rem;
    color: var(--green);
    text-decoration: underline;
    overflow-wrap: anywhere
}

.review-correct {
    color: var(--green);
    font-weight: 700
}

.review-wrong {
    color: var(--red);
    font-weight: 700
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: .84rem
}

.history-row small {
    display: block;
    font-size: .71rem;
    color: var(--muted);
    margin-top: 5px
}

.skip {
    position: fixed;
    left: 10px;
    top: -70px;
    background: var(--ink);
    color: white;
    padding: 12px;
    z-index: 100
}

.skip:focus {
    top: 10px
}

:focus-visible {
    outline: 3px solid #159a7a;
    outline-offset: 4px
}

[hidden] {
    display: none !important
}

.error-banner {
    background: #fff0ee;
    border: 1px solid #e4a8a1;
    color: var(--red);
    border-radius: 8px;
    padding: 12px;
    font-size: .8rem;
    margin: 12px 0
}

.admin-shell {
    max-width: 1120px;
    margin: 30px auto;
    padding: 0 22px
}

.admin-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin: 25px 0
}

.admin-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px
}

.admin-box {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px
}

.admin-box label {
    display: block;
    font-size: .75rem;
    margin: 15px 0 7px
}

.admin-list button {
    display: block;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: white;
    padding: 14px 0;
    text-align: left;
    width: 100%;
    font-size: .78rem;
    line-height: 1.5
}

.admin-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .82rem;
    padding: 20px 0
}

.admin-stats span {
    background: var(--mint);
    padding: 10px 16px;
    border-radius: 8px
}

.admin-feedback {
    margin-top: 30px
}

.admin-feedback p {
    font-size: .8rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere
}

@media(max-width:1050px) {
    .hero {
        gap: 38px
    }

    .hero-card {
        padding: 23px
    }

    .score-example {
        gap: 15px
    }

    .score-circle {
        width: 120px;
        height: 120px
    }

    .mode-card {
        padding: 20px
    }

    .mode-card h3 {
        font-size: 1.25rem
    }

    .topic-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .hero-actions {
        gap: 15px
    }

    .hero-actions .text-link {
        font-size: .74rem
    }

    .header-inner nav {
        gap: 20px
    }
}

@media(max-width:760px) {
    .shell {
        width: calc(100% - 36px)
    }

    .header-inner {
        height: 76px;
        gap: 12px
    }

    .header-inner nav {
        gap: 15px;
        font-size: .73rem
    }

    .header-inner>.button {
        display: none
    }

    .brand {
        font-size: 1rem
    }

    .brand svg {
        width: 33px;
        height: 33px
    }

    .brand small {
        font-size: .52rem
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0;
        gap: 32px
    }

    .hero h1 {
        font-size: clamp(3rem, 11vw, 4.4rem)
    }

    .hero-copy>p:not(.micro):not(.disclaimer) {
        max-width: 100%
    }

    .hero-card {
        transform: none;
        max-width: 540px;
        width: 100%
    }

    .feature-strip {
        font-size: .68rem;
        gap: 10px;
        padding: 18px 0
    }

    .feature-strip span {
        gap: 7px;
        align-items: flex-start
    }

    .feature-strip b {
        width: 20px;
        height: 20px;
        flex: none;
        font-size: .5rem
    }

    .section {
        padding: 40px 0
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px
    }

    .mode-grid {
        grid-template-columns: 1fr
    }

    .mode-card {
        padding: 25px
    }

    .mode-card>p {
        min-height: 0
    }

    .mode-top {
        margin-bottom: 20px
    }

    .mode-card h3 {
        font-size: 1.45rem
    }

    .mode-card .button {
        margin-top: 10px
    }

    .method-section {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 20px
    }

    .method-section h2 br {
        display: none
    }

    .launch-section {
        grid-template-columns: 1fr;
        padding: 28px;
        gap: 25px;
        margin-bottom: 40px
    }

    .footer {
        grid-template-columns: 1fr
    }

    .footer-links {
        justify-content: flex-start
    }

    .quiz-top {
        padding: 15px;
        gap: 12px
    }

    .quiz-top-right {
        gap: 12px
    }

    .quiz-title {
        font-size: .88rem
    }

    .quiz-top .eyebrow {
        font-size: .53rem
    }

    .quiz-top .button {
        font-size: .68rem;
        padding: 9px
    }

    .quiz-top .timer {
        font-size: .87rem
    }

    .quiz-layout {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px
    }

    .question-panel {
        padding: 20px
    }

    .question-panel h2 {
        font-size: 1.17rem
    }

    .quiz-sidebar {
        padding: 17px
    }

    .question-map {
        grid-template-columns: repeat(10, 1fr)
    }

    .quiz-sidebar .button {
        width: auto
    }

    .result-page {
        padding: 15px
    }

    .result-hero {
        padding: 23px;
        grid-template-columns: 1fr;
        gap: 15px
    }

    .result-hero h2 {
        font-size: 1.7rem
    }

    .result-score {
        font-size: 2.8rem
    }

    .result-grid {
        grid-template-columns: 1fr
    }

    .result-tools .button {
        font-size: .73rem;
        padding: 12px
    }

    .info-dialog {
        padding: 28px 22px
    }

    .resume-panel {
        flex-direction: column;
        align-items: flex-start
    }

    .admin-grid {
        grid-template-columns: 1fr
    }

    .admin-heading {
        flex-wrap: wrap
    }

    .history-row {
        align-items: flex-start
    }

    .history-row .button {
        white-space: nowrap
    }
}

@media(max-width:420px) {
    .header-inner nav {
        gap: 12px
    }

    .header-inner nav a:last-child {
        display: none
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column
    }

    .hero-card {
        padding: 20px
    }

    .hero-card .card-top>.eyebrow {
        font-size: .58rem
    }

    .score-circle {
        width: 115px;
        height: 115px
    }

    .topic-grid {
        gap: 9px
    }

    .topic-button {
        padding: 15px
    }

    .topic-button strong {
        font-size: .81rem
    }

    .resource-grid {
        gap: 9px
    }

    .resource-grid button {
        padding: 17px;
        min-height: 155px
    }

    .resource-grid strong {
        font-size: .81rem
    }

    .resource-grid span {
        font-size: .48rem
    }

    .quiz-dialog {
        width: calc(100% - 12px);
        border-radius: 12px
    }

    .question-counter {
        font-size: .65rem
    }

    .answer {
        padding: 12px;
        font-size: .8rem;
        gap: 10px
    }

    .question-map {
        grid-template-columns: repeat(8, 1fr)
    }

    .quiz-actions .button {
        font-size: .74rem;
        padding: 12px
    }

    .quiz-top-right {
        gap: 8px
    }

    .quiz-top .timer {
        font-size: .79rem
    }

    .feature-strip {
        grid-template-columns: 1fr;
        gap: 10px
    }

    .feature-strip span {
        font-size: .76rem
    }

    .hero-card h2 {
        font-size: 1.45rem
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    * {
        transition: none !important
    }
}

@media print {

    .site-header,
    .footer,
    .hero,
    .feature-strip,
    .section,
    .launch-section,
    .notice,
    .app-status,
    .resume-panel,
    .quiz-top,
    .result-tools,
    .result-box .button {
        display: none !important
    }

    dialog::backdrop {
        display: none
    }

    dialog[open] {
        position: static;
        display: block;
        width: 100%;
        max-width: none;
        max-height: none;
        border: 0;
        box-shadow: none;
        overflow: visible
    }

    body {
        background: white
    }

    .result-page {
        padding: 0
    }

    .result-grid {
        grid-template-columns: 1fr 1fr
    }

    .result-hero,
    .result-box,
    .review-item {
        break-inside: avoid
    }

    details .review-content {
        display: block
    }

    .info-dialog,
    .confirm-dialog {
        display: none !important
    }

    .quiz-dialog {
        background: white
    }

    .result-hero h2 {
        font-size: 22pt
    }

    .result-score {
        font-size: 32pt
    }
}

/* Practice workspace: keep choices and actions prominent, navigation collapsible. */
.quiz-dialog {
    width: min(1240px, calc(100% - 20px));
    max-height: calc(100dvh - 20px)
}

.quiz-top {
    padding: 12px 20px
}

.quiz-layout {
    padding: 14px;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 210px
}

.question-panel {
    padding: 16px 20px
}

.question-panel h2 {
    font-size: 1.18rem;
    line-height: 1.35;
    margin: 8px 0 10px
}

.question-counter {
    margin-bottom: 8px
}

.answers {
    gap: 7px
}

.answer {
    padding: 10px 12px;
    line-height: 1.35;
    min-height: 46px
}

.quiz-actions {
    margin-top: 12px;
    gap: 8px
}

.quiz-actions .button {
    padding: 11px 14px
}

.question-panel .report-button {
    margin-top: 10px
}

.confidence-picker {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.confidence-picker legend {
    padding: 0 5px;
    font-size: .78rem;
    font-weight: 750
}

.confidence-picker>div {
    display: flex;
    gap: 6px
}

.confidence-picker small {
    font-size: .66rem;
    color: var(--muted)
}

.confidence-choice {
    border: 1px solid #b9c6bf;
    border-radius: 7px;
    background: white;
    padding: 7px 12px;
    font-size: .78rem
}

.confidence-choice.selected {
    background: var(--ink);
    color: white;
    border-color: var(--ink)
}

.confidence-choice:disabled {
    opacity: 1;
    cursor: default
}

.question-map-drawer {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: white
}

.question-map-drawer summary {
    font-weight: 700;
    font-size: .78rem;
    cursor: pointer;
    line-height: 1.5
}

.question-map-drawer[open] summary {
    margin-bottom: 12px
}

.confidence-results {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin: 18px 0
}

.confidence-results h3 {
    margin-bottom: 8px
}

.confidence-score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0
}

.confidence-score-grid b {
    display: block;
    font-size: 1.8rem
}

.confidence-score-grid span {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.5
}

.review-item.confidence-gap {
    border-color: #c99847;
    background: #fffcf5
}

@media(max-width:760px) {
    .quiz-dialog {
        width: 100%;
        max-width: 100%;
        max-height: 100dvh;
        height: 100dvh;
        margin: 0;
        border-radius: 0
    }

    .quiz-top {
        padding: 10px 12px
    }

    .quiz-top .eyebrow {
        font-size: .57rem
    }

    .quiz-top .quiz-title {
        font-size: 1.04rem
    }

    .quiz-top .button {
        padding: 8px
    }

    .quiz-top-right {
        gap: 8px
    }

    .quiz-layout {
        grid-template-columns: 1fr;
        padding: 8px;
        gap: 8px
    }

    .question-panel {
        padding: 12px
    }

    .question-panel h2 {
        font-size: 1.06rem;
        line-height: 1.3
    }

    .answer {
        font-size: .82rem;
        padding: 9px;
        gap: 9px
    }

    .answer .letter {
        width: 25px;
        height: 25px
    }

    .confidence-picker {
        padding: 5px 8px;
        gap: 5px
    }

    .confidence-picker small {
        font-size: .61rem
    }

    .confidence-choice {
        padding: 6px 11px
    }

    .quiz-actions {
        flex-wrap: wrap
    }

    .quiz-actions .button {
        font-size: .76rem;
        padding: 10px;
        gap: 8px
    }

    .question-map-drawer {
        padding: 9px
    }

    .confidence-score-grid {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .confidence-score-grid b {
        font-size: 1.4rem
    }

    .quiz-dialog.report-mode {
        height: 100dvh
    }
}

@media(max-height:760px) and (min-width:761px) {
    .quiz-top {
        padding: 9px 16px
    }

    .quiz-layout {
        padding: 10px
    }

    .question-panel h2 {
        font-size: 1.1rem
    }

    .question-panel {
        padding: 12px 16px
    }

    .answer {
        padding: 8px 10px
    }

    .confidence-picker {
        padding: 5px 8px
    }

    .quiz-actions .button {
        padding: 9px 12px
    }
}

@media print {

    .confidence-picker,
    .question-map-drawer {
        display: none
    }

    .confidence-score-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

/* Answer-first confidence and accessible progress states */
.confidence-picker[hidden] {
    display: none
}

.confidence-picker {
    margin: 10px 0 6px
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.question-navigation {
    display: flex;
    gap: 8px;
    margin-left: auto
}

.question-map button {
    height: auto;
    min-height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px
}

.question-map small {
    font-size: .7rem;
    line-height: 1
}

.question-map .map-unanswered {
    background: #fff;
    color: #344b5a;
    border: 1px solid #8195a1
}

.question-map .map-answered {
    background: #185da5;
    color: #fff;
    border-color: #185da5
}

.question-map .map-correct {
    background: #08765f;
    color: #fff;
    border-color: #08765f
}

.question-map .map-incorrect {
    background: #ad3434;
    color: #fff;
    border-color: #ad3434
}

.priority-gap {
    padding: 20px;
    border: 2px solid #a16b20;
    background: #fff8e9;
    border-radius: 12px;
    margin-top: 18px
}

.priority-gap h3 {
    font-size: 1.15rem;
    line-height: 1.5
}

.priority-gap a {
    display: inline-block;
    margin: 10px 12px 0 0;
    text-decoration: underline
}

.report-map {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 18px
}

.report-map .question-map {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr))
}

.review-item {
    scroll-margin-top: 20px
}

@media(max-width:760px) {
    .question-navigation {
        gap: 5px
    }

    .quiz-actions {
        flex-wrap: nowrap
    }

    .quiz-actions .button {
        font-size: .72rem;
        padding: 9px 7px
    }

    .question-map {
        grid-template-columns: repeat(5, 1fr)
    }
}

/* Wider progress sidebar and proportional number buttons */
@media(min-width:761px) {
    .quiz-layout {
        grid-template-columns: minmax(0, 1fr) 260px
    }

    .quiz-sidebar {
        padding: 12px
    }

    .question-map-drawer {
        padding: 12px
    }
}

.quiz-sidebar .question-map {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px
}

.quiz-sidebar .question-map button {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: .82rem;
    line-height: 1;
    border-radius: 8px
}

.quiz-sidebar .question-map button span {
    line-height: 1
}

.quiz-sidebar .question-map-drawer h3 {
    font-size: 1rem
}

@media(max-width:760px) {
    .quiz-sidebar .question-map {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 8px
    }

    .quiz-sidebar .question-map button {
        max-height: 52px
    }

    .quiz-sidebar {
        padding: 0
    }
}