:root {
    --ink: #172b2d;
    --ink-soft: #40595a;
    --forest: #0d5c59;
    --forest-dark: #073d3d;
    --teal-light: #dcefed;
    --coral: #df624c;
    --coral-dark: #b94433;
    --gold: #edb84e;
    --paper: #f4f7f6;
    --line: #cbd8d6;
    --white: #ffffff;
    --shadow: 0 18px 48px rgba(9, 47, 48, 0.13);
    --shell: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

button,
a,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

svg {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 1.8;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: 0;
    line-height: 1.08;
}

h2 {
    margin-bottom: 20px;
    font-size: 42px;
    font-weight: 700;
}

h3 {
    font-size: 22px;
}

.skip-link {
    position: fixed;
    z-index: 200;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    color: var(--white);
    background: var(--forest-dark);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.section-shell,
.nav-shell,
.hero-inner {
    width: min(calc(100% - 48px), var(--shell));
    margin: 0 auto;
}

.site-header {
    position: absolute;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    color: var(--white);
    transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    position: fixed;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 var(--line);
    backdrop-filter: blur(10px);
}

.nav-shell {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.brand strong {
    font-weight: 700;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--white);
    background: var(--coral);
    border-radius: 6px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.main-nav a:not(.nav-action):hover,
.main-nav a:not(.nav-action):focus-visible {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.main-nav .nav-action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--white);
    background: var(--coral);
    border-radius: 6px;
}

.main-nav .nav-action:hover,
.main-nav .nav-action:focus-visible {
    background: var(--coral-dark);
}

.nav-auth-entry {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    color: inherit;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.nav-auth-entry:hover,
.nav-auth-entry:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

.site-header.is-scrolled .nav-auth-entry {
    border-color: var(--line);
}

.site-header.is-scrolled .nav-auth-entry:hover,
.site-header.is-scrolled .nav-auth-entry:focus-visible {
    color: var(--forest);
    background: var(--paper);
    border-color: var(--forest);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: inherit;
    background: transparent;
    border: 0;
}

.hero {
    display: flex;
    min-height: 710px;
    height: 78svh;
    max-height: 820px;
    align-items: center;
    color: var(--white);
    background-image:
        linear-gradient(90deg, rgba(7, 35, 38, 0.96) 0%, rgba(7, 35, 38, 0.82) 35%, rgba(7, 35, 38, 0.2) 68%, rgba(7, 35, 38, 0.05) 100%),
        url("../images/ecom-study-hero.png");
    background-position: center;
    background-size: cover;
}

.hero-inner {
    padding-top: 84px;
}

.hero-inner > * {
    max-width: 650px;
}

.eyebrow,
.section-kicker {
    margin-bottom: 16px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffc5b9;
}

.hero h1 {
    margin-bottom: 24px;
    font-size: 68px;
    font-weight: 800;
}

.hero h1 span {
    color: var(--white);
}

.hero-copy {
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.55;
}

.hero-actions,
.practice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 18px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:not(:disabled):hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.button-primary {
    color: var(--white);
    background: var(--coral);
    border-color: var(--coral);
}

.button-primary:not(:disabled):hover,
.button-primary:focus-visible {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
}

.button-secondary {
    color: var(--white);
    background: var(--forest);
    border-color: var(--forest);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: var(--forest-dark);
}

.button-ghost {
    color: var(--white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
}

.button-ghost:hover,
.button-ghost:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--white);
}

.button-text {
    min-height: 42px;
    color: var(--ink-soft);
    background: transparent;
}

.button-text:hover,
.button-text:focus-visible {
    color: var(--coral-dark);
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 42px;
    color: rgba(255, 255, 255, 0.83);
    font-size: 14px;
}

.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.purpose-band {
    padding: 72px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.purpose-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: end;
    gap: 80px;
}

.purpose-layout h2 {
    max-width: 720px;
    margin-bottom: 0;
}

.purpose-layout > p {
    margin-bottom: 5px;
    color: var(--ink-soft);
    font-size: 18px;
}

.method-section,
.practice-section,
.exam-section,
.closing-section {
    padding: 108px 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 56px;
}

.section-heading > p:last-child,
.practice-intro > p,
.exam-points p {
    color: var(--ink-soft);
    font-size: 18px;
}

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

.method-item {
    position: relative;
    padding-top: 28px;
    border-top: 3px solid var(--line);
}

.method-item:nth-child(1) {
    border-color: var(--forest);
}

.method-item:nth-child(2) {
    border-color: var(--coral);
}

.method-item:nth-child(3) {
    border-color: var(--gold);
}

.method-item > svg {
    width: 32px;
    height: 32px;
    margin-bottom: 22px;
    color: var(--forest);
}

.method-item h3 {
    margin-bottom: 12px;
}

.method-item p {
    margin-bottom: 0;
    color: var(--ink-soft);
}

.method-number {
    position: absolute;
    top: 24px;
    right: 0;
    color: #8ba09f;
    font-size: 13px;
    font-weight: 800;
}

.practice-section {
    background: var(--teal-light);
}

.practice-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(520px, 1.28fr);
    align-items: start;
    gap: 72px;
}

.practice-intro {
    padding-top: 14px;
}

.practice-facts {
    margin: 44px 0 0;
}

.practice-facts div {
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(13, 92, 89, 0.22);
}

.practice-facts dt {
    color: var(--forest);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.practice-facts dd {
    margin: 0;
}

.practice-tool {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(7, 61, 61, 0.2);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.practice-toolbar {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    color: var(--white);
    background: var(--ink);
}

.tool-label {
    display: block;
    margin-bottom: 2px;
    color: #afc8c7;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffd7ce;
    font-size: 20px;
    font-weight: 800;
}

.tabular {
    min-width: 56px;
    font-variant-numeric: tabular-nums;
}

.practice-body,
.practice-summary {
    padding: 30px;
}

.question-area {
    margin-bottom: 10px;
    color: var(--coral-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.practice-body h3 {
    margin-bottom: 26px;
    font-size: 20px;
    line-height: 1.45;
}

.options-fieldset {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.options-fieldset legend {
    margin-bottom: 10px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.option-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    min-height: 58px;
    align-items: center;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.option-row:hover {
    border-color: var(--forest);
}

.option-row.is-selected {
    background: #eef8f6;
    border-color: var(--forest);
}

.option-row.is-correct {
    background: #e3f4e9;
    border-color: #3c8c5b;
}

.option-row.is-incorrect {
    background: #fff0ed;
    border-color: var(--coral);
}

.option-row input {
    width: 18px;
    height: 18px;
    margin: 0 auto;
    accent-color: var(--forest);
}

.option-copy {
    padding: 14px 16px 14px 4px;
}

.option-copy strong {
    display: inline-block;
    min-width: 24px;
    color: var(--forest);
}

.feedback {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.feedback-heading {
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 800;
}

.feedback-heading.correct {
    color: #287346;
}

.feedback-heading.incorrect {
    color: var(--coral-dark);
}

.explanation-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ink-soft);
    font-size: 14px;
}

.explanation-letter {
    font-weight: 800;
    color: var(--ink);
}

.feedback .button {
    margin-top: 10px;
}

.practice-summary {
    min-height: 430px;
    text-align: center;
}

.practice-summary > svg {
    width: 44px;
    height: 44px;
    margin: 34px 0 18px;
    color: var(--coral);
}

.practice-summary h3 {
    margin-bottom: 34px;
    font-size: 28px;
}

.summary-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 34px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.summary-values div {
    padding: 22px;
}

.summary-values div + div {
    border-left: 1px solid var(--line);
}

.summary-values strong,
.summary-values span {
    display: block;
}

.summary-values strong {
    color: var(--forest);
    font-size: 28px;
}

.summary-values span {
    color: var(--ink-soft);
    font-size: 13px;
}

.exam-section {
    background: var(--white);
}

.exam-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 90px;
}

.exam-points p {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.exam-points svg {
    width: 28px;
    height: 28px;
    color: var(--coral);
}

.exam-points strong {
    color: var(--ink);
}

.closing-section {
    color: var(--white);
    background: var(--forest-dark);
}

.closing-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.closing-layout h2 {
    max-width: 760px;
    margin-bottom: 0;
}

.closing-layout .section-kicker {
    color: #ffb8aa;
}

.site-footer {
    padding: 34px 0;
    color: #abc1c1;
    background: #0a292a;
}

.footer-layout {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 34px;
}

.footer-layout p {
    margin-bottom: 0;
    font-size: 13px;
}

.footer-layout p:nth-child(2) {
    text-align: center;
}

.footer-brand {
    color: var(--white);
}

body.auth-open {
    overflow: hidden;
}

.auth-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 28, 30, 0.74);
    backdrop-filter: blur(5px);
}

.auth-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 590px);
    max-height: calc(100vh - 48px);
    padding: 34px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 28px 76px rgba(5, 28, 30, 0.3);
}

.auth-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 50%;
}

.auth-close:hover,
.auth-close:focus-visible {
    color: var(--white);
    background: var(--forest);
    border-color: var(--forest);
}

.auth-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 48px;
}

.auth-heading-icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    color: var(--white);
    background: var(--coral);
    border-radius: 6px;
}

.auth-heading .section-kicker,
.auth-heading h2 {
    margin-bottom: 0;
}

.auth-heading h2 {
    font-size: 30px;
}

.auth-description {
    margin: 20px 0 24px;
    color: var(--ink-soft);
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
}

.auth-field input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(13, 92, 89, 0.12);
}

.auth-field small {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 400;
}

.auth-passwords {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 14px;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-checkbox {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.auth-checkbox input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--forest);
}

.auth-text-button {
    padding: 2px 0;
    color: var(--forest);
    background: transparent;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
    color: var(--coral-dark);
}

.auth-switch {
    justify-self: center;
}

.auth-message {
    min-height: 20px;
    margin: -4px 0 0;
    color: var(--danger, #b94433);
    font-size: 13px;
    font-weight: 700;
}

.auth-submit {
    width: 100%;
}

.auth-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 0;
    color: var(--ink-soft);
    font-size: 12px;
}

.auth-note svg {
    flex: 0 0 auto;
    color: var(--forest);
}

[hidden] {
    display: none !important;
}

@media (max-width: 960px) {
    h2 {
        font-size: 36px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        top: 76px;
        right: 0;
        left: 0;
        display: none;
        align-items: stretch;
        padding: 22px 24px 28px;
        color: var(--ink);
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
        gap: 10px;
    }

    .main-nav a {
        padding: 10px 4px;
    }

    .main-nav .nav-action {
        justify-content: center;
    }

    .main-nav .nav-auth-entry {
        width: 100%;
        justify-content: flex-start;
        color: var(--ink);
        border-color: var(--line);
    }

    .purpose-layout,
    .practice-layout,
    .exam-layout {
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .practice-layout {
        max-width: 760px;
    }

    .method-grid {
        gap: 24px;
    }

    .closing-layout {
        align-items: flex-start;
        flex-direction: column;
        gap: 30px;
    }

    .footer-layout {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .footer-layout p:nth-child(2) {
        text-align: left;
    }
}

@media (max-width: 700px) {
    .section-shell,
    .nav-shell,
    .hero-inner {
        width: min(calc(100% - 32px), var(--shell));
    }

    h2 {
        font-size: 32px;
    }

    .brand {
        font-size: 13px;
    }

    .hero {
        min-height: 690px;
        height: 82svh;
        max-height: 760px;
        background-image:
            linear-gradient(90deg, rgba(7, 35, 38, 0.96) 0%, rgba(7, 35, 38, 0.86) 60%, rgba(7, 35, 38, 0.55) 100%),
            url("../images/ecom-study-hero.png");
        background-position: 63% center;
    }

    .hero-inner {
        padding-top: 96px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-copy {
        max-width: 540px;
        font-size: 17px;
    }

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

    .hero-actions .button {
        width: 100%;
    }

    .hero-proof {
        display: grid;
        gap: 10px;
        margin-top: 28px;
    }

    .purpose-band,
    .method-section,
    .practice-section,
    .exam-section,
    .closing-section {
        padding: 72px 0;
    }

    .method-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .practice-body,
    .practice-summary {
        padding: 22px 18px;
    }

    .practice-toolbar {
        padding: 14px 18px;
    }

    .practice-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .practice-actions .button {
        width: 100%;
    }

    .practice-facts div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .summary-values strong {
        font-size: 23px;
    }

    .auth-modal {
        padding: 12px;
    }

    .auth-dialog {
        max-height: calc(100vh - 24px);
        padding: 26px 20px;
    }

    .auth-passwords {
        grid-template-columns: 1fr;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
