.ast4-workspace {
    --ast4-ink: #152d2b;
    --ast4-muted: #49615d;
    --ast4-paper: #f7f8f3;
    --ast4-surface: #fff;
    --ast4-wash: #eaf3eb;
    --ast4-rule: #cfdad2;
    --ast4-accent: #21634f;
    --ast4-hero: #133b33;
    --ast4-mint: #caf0ad;
    --ast4-display: "Inter Tight", Inter, system-ui, sans-serif;
    color: var(--ast4-ink);
    background: var(--ast4-paper);
    font-size: 1rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
    padding: 7rem 1.25rem 4rem;
    accent-color: var(--ast4-accent);
}

.ast4-workspace ::selection { background: var(--ast4-mint); color: var(--ast4-ink); }
.ast4-shell { max-width: 74rem; margin-inline: auto; }
.ast4-workspace :where(h1, h2, h3, h4) { font-family: var(--ast4-display); font-weight: 700; line-height: 1.12; text-wrap: balance; }
.ast4-workspace h2 { font-size: clamp(1.5rem, 1.15rem + 1vw, 2.15rem); letter-spacing: -.023em; }
.ast4-workspace h3 { font-size: clamp(1.125rem, 1rem + .5vw, 1.55rem); letter-spacing: -.015em; }
.ast4-workspace h4 { font-size: 1.1rem; }
.ast4-workspace :where(p) { max-width: 69ch; }
.ast4-workspace :where(h2, h3, h4, p) + :where(p, ul, ol, details) { margin-top: .75rem; }
.ast4-workspace :where(a:not([class])) { color: var(--ast4-accent); text-decoration: underline; text-underline-offset: .2em; }
.ast4-workspace :where(a, button, select, textarea, summary):focus-visible { outline: 2px solid var(--ast4-accent); outline-offset: 3px; }
.ast4-workspace :where([id]) { scroll-margin-top: 7rem; }

.ast4-hero {
    background: var(--ast4-hero);
    color: #fff;
    border-radius: 1rem;
    padding: clamp(1.35rem, 4vw, 3rem);
}
.ast4-hero :focus-visible { outline-color: var(--ast4-mint); }
.ast4-hero-main { margin-top: 1.1rem; }
.ast4-hero--overview .ast4-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr);
    gap: clamp(1.5rem, 5vw, 5rem);
    align-items: center;
}
.ast4-hero h1 {
    font-size: clamp(2.55rem, 1.55rem + 3.6vw, 4.5rem);
    letter-spacing: -.036em;
    line-height: .99;
    max-width: 18ch;
}
.ast4-hero p { color: #e0f0e6; font-size: clamp(1rem, .95rem + .25vw, 1.2rem); max-width: 56ch; margin-top: 1.15rem; }
.ast4-back { display: inline-flex; align-items: baseline; gap: .6rem; color: #dceee3; font-size: .875rem; font-weight: 600; }
.ast4-back::before, .ast4-arrow::after {
    content: "";
    display: inline-block;
    border-block-start: 1.5px solid currentColor;
    border-inline-end: 1.5px solid currentColor;
    inline-size: .48em;
    block-size: .48em;
    flex: 0 0 auto;
    rotate: -135deg;
    align-self: center;
}
.ast4-back:hover, .ast4-arrow:hover { text-decoration: underline; text-underline-offset: .23em; }
.ast4-hero-stages { border-block: 1px solid #527569; font-size: .95rem; color: #e0f0e6; }
.ast4-hero-stages div { padding-block: .9rem; }
.ast4-hero-stages div + div { border-top: 1px solid #527569; }
.ast4-hero-stages dt { font-size: .875rem; font-weight: 700; color: var(--ast4-mint); }
.ast4-hero-stages dd { font-size: 1.05rem; margin-top: .2rem; }

.ast4-actions, .ast4-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.15rem; }
.ast4-controls { align-items: end; }
.ast4-actions p { margin: 0; }
.ast4-button {
    background: var(--ast4-accent);
    color: white;
    border: 1px solid transparent;
    border-radius: .6rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 2.75rem;
    padding: .55rem 1rem;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}
.ast4-button:hover { background: #164e3e; }
.ast4-button--outline { color: var(--ast4-accent); background: var(--ast4-surface); border-color: var(--ast4-rule); }
.ast4-button--outline:hover { background: var(--ast4-wash); }
.ast4-hero .ast4-button { color: var(--ast4-hero); background: var(--ast4-mint); }
.ast4-hero .ast4-button:hover { background: #def8c9; }
.ast4-hero .ast4-button--quiet { color: #fff; background: transparent; border-color: #83a393; }
.ast4-hero .ast4-button--quiet:hover { background: #245246; }

.ast4-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem clamp(.65rem, 1.65vw, 1.4rem);
    border-bottom: 1px solid var(--ast4-rule);
    margin-top: .65rem;
}
.ast4-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 2.875rem;
    padding: .38rem .35rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--ast4-muted);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.ast4-tabs a:hover { color: var(--ast4-accent); }
.ast4-tabs a[aria-current="page"] { color: var(--ast4-accent); border-color: var(--ast4-accent); font-weight: 700; }

.ast4-section { margin-top: clamp(1.65rem, 3.7vw, 3rem); }
.ast4-small { color: var(--ast4-muted); font-size: .875rem; }
.ast4-arrow { color: var(--ast4-accent); font-weight: 700; font-size: .9rem; }
.ast4-arrow::after { rotate: 45deg; margin-inline: .45em .15em; vertical-align: .12em; }
.ast4-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.ast4-path article { border-top: 2px solid var(--ast4-accent); display: flex; flex-direction: column; align-items: start; padding-top: .9rem; }
.ast4-path p { flex: 1; color: var(--ast4-muted); }
.ast4-path a { margin-top: .85rem; }
.ast4-topic-index { padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; list-style: none; margin-block: 1rem 0; }
.ast4-topic-index li { min-width: 0; border-top: 1px solid var(--ast4-rule); }
.ast4-topic-index a { display: block; padding: .65rem 0; font-size: .9rem; }
.ast4-topic-index--overview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ast4-topic-index--overview li { padding: .65rem 0; }
.ast4-topic-index--overview a { padding: 0; }
.ast4-topic-index--overview a + a { color: var(--ast4-muted); font-size: .8rem; margin-top: .2rem; }
.ast4-overview-tools, .ast4-knowledge-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ast4-panel { background: var(--ast4-surface); border: 1px solid var(--ast4-rule); padding: clamp(1rem, 2.5vw, 1.6rem); border-radius: .85rem; }
.ast4-panel--wash { background: var(--ast4-wash); }
.ast4-panel > a, .ast4-panel form > a { display: inline-block; margin-top: .85rem; }
.ast4-panel form > p { margin-top: .85rem; }
.ast4-panel + .ast4-panel { margin-top: 1rem; }
.ast4-overview-tools .ast4-panel + .ast4-panel, .ast4-knowledge-start .ast4-panel + .ast4-panel { margin-top: 0; }
.ast4-link-list { margin-top: .85rem; list-style: none; padding: 0; }
.ast4-link-list li + li { margin-top: .33rem; }

.ast4-workspace :where(select, textarea) {
    background: var(--ast4-surface);
    color: var(--ast4-ink);
    border: 1px solid #748a7b;
    border-radius: .55rem;
    font: inherit;
    caret-color: var(--ast4-accent);
}
.ast4-workspace select { display: block; max-width: 100%; min-height: 2.75rem; padding: .4rem .65rem; margin-top: .25rem; }
.ast4-controls > label { min-width: 0; max-width: 100%; }
.ast4-controls select { width: 100%; text-overflow: ellipsis; }
.ast4-controls label, .ast4-review-mark { color: var(--ast4-muted); font-size: .875rem; font-weight: 600; }
.ast4-score { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .9rem 0 .45rem; }
.ast4-score > div { border-top: 1px solid #afc7b7; padding-top: .35rem; }
.ast4-score dt { color: var(--ast4-muted); font-size: .875rem; }
.ast4-score dd { font: 700 1.55rem/1.2 var(--ast4-display); font-variant-numeric: tabular-nums; }

.ast4-lessons { margin-top: 1.65rem; }
.ast4-lesson { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem clamp(1.2rem, 3.5vw, 3rem); border-top: 1px solid var(--ast4-rule); padding-block: 1.75rem; }
.ast4-lesson h4 { margin-top: 1.2rem; }
.ast4-lesson :where(ul, ol) { padding-inline-start: 1.25rem; }
.ast4-lesson :where(ul, ol) li + li { margin-top: .4rem; }
.ast4-lesson-notes ul { list-style: disc; }
.ast4-practice-question { background: var(--ast4-wash); border-radius: .85rem; padding: clamp(1rem, 2.5vw, 1.6rem); }
.ast4-practice-question h4 { margin-top: 0; }
.ast4-practice-question ol { list-style-type: upper-alpha; }
.ast4-practice-question li::marker { color: var(--ast4-accent); font-weight: 700; }
.ast4-disclosure > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    cursor: pointer;
    color: var(--ast4-accent);
    font-weight: 700;
    line-height: 1.4;
    padding-block: .45rem;
}
.ast4-disclosure > summary::after {
    content: "";
    flex: 0 0 auto;
    width: .43rem;
    height: .43rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    rotate: 45deg;
    margin-inline-end: .18rem;
}
.ast4-disclosure[open] > summary::after { rotate: 225deg; }
.ast4-workspace .ast4-disclosure[open] > summary ~ * { animation: none; }
.ast4-disclosure summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.ast4-disclosure[open] summary { margin-bottom: .35rem; }
.ast4-lesson-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.2rem; grid-column: 1 / -1; }
.ast4-lesson-links summary { font-size: .9rem; }
.ast4-lesson .ast4-chapters { display: flex; flex-wrap: wrap; gap: .35rem .8rem; list-style: none; padding: 0; font-size: .875rem; }
.ast4-lesson .ast4-chapters li + li { margin: 0; }

.ast4-workbench { display: grid; grid-template-columns: minmax(13.5rem, 1fr) minmax(0, 2.9fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: start; }
.ast4-exercises { border-top: 2px solid var(--ast4-accent); padding-top: .9rem; }
.ast4-exercises--mobile { display: none; }
.ast4-exercises h2 { font-size: 1.35rem; margin-bottom: .65rem; }
.ast4-exercises h3 { margin-top: 1.1rem; font-size: .9rem; color: var(--ast4-muted); }
.ast4-exercises h3 + details { margin-top: .35rem; }
.ast4-exercises ul { padding: 0; list-style: none; margin: 0; }
.ast4-exercises li a {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .15rem .5rem;
    border-radius: .5rem;
    padding: .5rem .65rem;
    color: var(--ast4-ink);
    font-size: .9rem;
    line-height: 1.4;
    text-decoration: none;
    min-height: 2.5rem;
}
.ast4-exercises li a:hover, .ast4-exercises a[aria-current="page"] { background: var(--ast4-wash); }
.ast4-exercises a[aria-current="page"] { color: var(--ast4-accent); font-weight: 700; }
.ast4-exercises small { color: var(--ast4-muted); font-size: .75rem; }
.ast4-exercises details { border-bottom: 1px solid var(--ast4-rule); }
.ast4-exercises details summary { font-size: .9rem; }
.ast4-exercises details ul { margin: 0 0 .55rem .6rem; }

.ast4-brief { background: var(--ast4-surface); border: 1px solid var(--ast4-rule); border-radius: .85rem; padding: clamp(1rem, 3vw, 1.8rem); }
.ast4-prompts { margin: 1rem 0; padding: .9rem .85rem .9rem 2.25rem; list-style: decimal; background: var(--ast4-wash); border-radius: .6rem; }
.ast4-prompts li { padding-inline-start: .1rem; }
.ast4-prompts li + li { margin-top: .5rem; }
.ast4-prompts li::marker { font-weight: 700; color: var(--ast4-accent); }
.ast4-writing-jumps { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .9rem; }
.ast4-writing-section { padding-top: 1.2rem; margin-top: 1.4rem; border-top: 1px solid var(--ast4-rule); }
.ast4-timer output { background: var(--ast4-wash); border-radius: .5rem; min-width: 4.3rem; min-height: 2.75rem; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.ast4-writing-field { margin-top: 1.3rem; }
.ast4-writing-field label { display: block; font-weight: 700; line-height: 1.35; }
.ast4-writing-field p { margin-top: .28rem; font-size: .9rem; color: var(--ast4-muted); }
.ast4-writing-field textarea { display: block; width: 100%; margin-top: .45rem; padding: .7rem .8rem; resize: vertical; }
.ast4-writing-section form + p, .ast4-writing-section .ast4-actions + p { margin-top: .65rem; }
.ast4-review-model { background: var(--ast4-wash); border-radius: .65rem; padding: .45rem .9rem; margin-top: 1rem; }
.ast4-review-model[open] { padding-bottom: .9rem; }
.ast4-rubric { list-style: none; padding: 0; margin-block: 1.1rem; }
.ast4-rubric li { border-top: 1px solid var(--ast4-rule); padding-block: .8rem; }
.ast4-rubric h3 { font-size: 1.1rem; }
.ast4-review-mark { display: block; margin-top: .65rem; }

.ast4-source-list { list-style: none; padding: 0; margin-top: 1.35rem; }
.ast4-source-list li { border-top: 1px solid var(--ast4-rule); padding-block: .75rem; }
.ast4-footer { margin-top: 2.75rem; border-top: 1px solid var(--ast4-rule); padding-top: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; color: var(--ast4-muted); font-size: .875rem; }
.ast4-footer p + p { margin-top: 0; }

@media (max-width: 52rem) {
    .ast4-hero--overview .ast4-hero-main, .ast4-workbench { grid-template-columns: minmax(0, 1fr); }
    .ast4-hero-stages { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
    .ast4-hero-stages div + div { border-top: 0; }
    .ast4-topic-index--overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ast4-exercises--desktop { display: none; }
    .ast4-exercises--mobile { display: block; padding-top: .35rem; }
    .ast4-exercises--mobile > summary { font-size: 1rem; }
    .ast4-exercises--mobile > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 39rem) {
    .ast4-workspace { padding: 5.4rem .9rem 2.5rem; }
    .ast4-path, .ast4-overview-tools, .ast4-knowledge-start, .ast4-lesson { grid-template-columns: minmax(0, 1fr); }
    .ast4-hero h1 { font-size: clamp(2.1rem, 9vw, 2.55rem); max-width: 16ch; }
    .ast4-hero p { margin-top: .9rem; }
    .ast4-tabs { gap: .1rem .65rem; }
    .ast4-workbench { gap: .65rem; }
    .ast4-tabs a { min-height: 2.55rem; }
}
