:root {
    --ink: #172522;
    --muted: #5f6d69;
    --paper: #f5f2eb;
    --white: #fffefb;
    --line: #d9ddd7;
    --accent: #265f52;
    --accent-dark: #17483d;
    --accent-soft: #dfeae5;
    --warm: #e4b968;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.68; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(228,185,104,.18), transparent 28rem),
        linear-gradient(145deg, #173c34 0%, #102b26 100%);
}
.login-page::before { content: ''; position: fixed; inset: 0; opacity: .12; pointer-events: none; background-image: repeating-linear-gradient(115deg, transparent 0 36px, rgba(255,255,255,.18) 37px 38px); }
.login-shell { min-height: 100vh; display: grid; place-content: center; padding: 2rem 1rem; position: relative; }
.login-card { width: min(100%, 460px); background: var(--white); padding: clamp(2rem, 6vw, 3.5rem); border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--white); background: var(--accent); font: 700 1.45rem/1 var(--serif); margin-bottom: 1.6rem; }
.brand-mark.small { width: 32px; height: 32px; margin: 0; font-size: 1rem; }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 750; }
.login-card h1, .hero h1 { margin: 0; font: 500 clamp(2.6rem, 6vw, 4.8rem)/.98 var(--serif); letter-spacing: -.035em; }
.login-card h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.login-intro { color: var(--muted); margin: 1.4rem 0 2rem; }
.login-form label { display: block; font-size: .86rem; font-weight: 700; margin-bottom: .45rem; }
.password-row { display: flex; border: 1px solid #bfc8c3; border-radius: 4px; background: white; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.password-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(38,95,82,.14); }
.password-row input { min-width: 0; flex: 1; border: 0; padding: .85rem 1rem; outline: 0; background: transparent; }
.reveal-button { border: 0; padding: 0 1rem; color: var(--accent); background: transparent; font-weight: 700; cursor: pointer; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; border: 0; border-radius: 3px; padding: .9rem 1.2rem; background: var(--accent); color: white; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.login-form > .primary-button { width: 100%; margin-top: 1rem; }
.form-error { color: #9e2f2f; font-size: .86rem; margin: .65rem 0 0; }
.site-header { height: 72px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; padding: 0 clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); background: rgba(245,242,235,.94); backdrop-filter: blur(12px); }
.wordmark { display: flex; align-items: center; gap: .7rem; color: var(--ink); font: 600 1.05rem var(--serif); text-decoration: none; }
.site-header nav { display: flex; gap: 1.7rem; margin-left: auto; }
.site-header nav a { color: var(--muted); font-size: .82rem; font-weight: 650; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.logout-button { border: 1px solid #bec6c2; border-radius: 3px; background: transparent; padding: .4rem .7rem; color: var(--muted); font-size: .78rem; cursor: pointer; }

.hero { max-width: 1280px; min-height: 540px; padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3rem); margin: 0 auto; }
.hero-content { max-width: 940px; }
.hero-lead { max-width: 850px; margin: 2rem 0; color: var(--muted); font: 400 clamp(1.15rem, 2vw, 1.4rem)/1.65 var(--sans); }
.hero-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.content-layout { display: grid; grid-template-columns: 200px minmax(0, 920px); gap: clamp(3rem, 6vw, 5rem); max-width: 1280px; padding: 0 clamp(1.25rem, 4vw, 3rem) 7rem; margin: 0 auto; }
.chapter-nav { position: sticky; top: 110px; align-self: start; display: grid; gap: .75rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.chapter-nav p { margin: 0 0 .25rem; color: var(--ink); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.chapter-nav a { position: relative; color: var(--muted); font-size: .78rem; font-weight: 450; text-decoration: none; transition: color .2s, font-weight .2s; }
.chapter-nav a:hover { color: var(--accent); }
.chapter-nav a.is-active { color: var(--ink); font-weight: 800; }
.chapter-nav a.is-active::before { content: ''; position: absolute; top: .2em; bottom: .2em; left: calc(-1rem - 2px); width: 3px; border-radius: 2px; background: var(--accent); }
.chapter { scroll-margin-top: 100px; padding: 5rem 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter-number { margin: 0 0 .5rem; color: var(--accent); font-size: .72rem; letter-spacing: .12em; font-weight: 800; }
.chapter h2 { margin: 0 0 2rem; font: 500 clamp(2.1rem, 5vw, 3.3rem)/1.08 var(--serif); letter-spacing: -.025em; }
.chapter h3 { margin: 2.7rem 0 1rem; font: 600 1.45rem/1.2 var(--serif); }
.chapter p { color: #35433f; }
.chapter strong { color: var(--ink); }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.7rem 0; padding: 1rem 1.2rem; border: 1px solid #c5d4ce; background: var(--accent-soft); text-decoration: none; font-weight: 700; }
.link-card small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.notice, .success-note { margin: 2rem 0; padding: 1.2rem 1.35rem; border-left: 4px solid var(--warm); background: #f0e7d3; }
.success-note { border-color: var(--accent); background: var(--accent-soft); }
details { margin: 2rem 0; border: 1px solid var(--line); background: var(--white); }
summary { padding: 1rem 1.25rem; font-weight: 700; cursor: pointer; }
.details-content { padding: 0 1.25rem 1rem; }
.steps { list-style: none; counter-reset: steps; padding: 0; margin: 1.7rem 0; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 38px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(steps); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: white; font-size: .8rem; font-weight: 800; }
.checklist-card { margin: 2.5rem 0; padding: 1.6rem 2rem; color: white; background: var(--accent-dark); border-radius: 3px; }
.checklist-card h3 { margin: 0 0 1rem; color: white; }
.checklist-card ul { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 2rem; list-style: none; padding: 0; margin: 0; }
.checklist-card li::before { content: '✓'; color: var(--warm); margin-right: .6rem; font-weight: 900; }
.checklist-card code { color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); font-weight: 750; }
code { padding: .12rem .3rem; border-radius: 3px; background: #e6e8e3; font-size: .9em; overflow-wrap: anywhere; }
.code-line { padding: 1rem; background: #e6e8e3; }
.code-line code { padding: 0; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 1.5rem; background: var(--line); border: 1px solid var(--line); }
.feature-grid section { padding: 1.4rem; background: var(--white); }
.feature-grid h4 { margin: 0 0 .4rem; font: 600 1.05rem var(--serif); }
.feature-grid p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.video-chapter { padding-bottom: 2rem; }
.video-frame { margin-top: 2rem; padding: .5rem; background: #0e1715; border-radius: 4px; box-shadow: 0 18px 50px rgba(23,37,34,.18); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: black; }
.video-meta { color: var(--muted) !important; font-size: .78rem; text-align: right; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.25rem, 5vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
footer p { margin: 0; }

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .content-layout { grid-template-columns: 1fr; }
    .chapter-nav { display: none; }
}
@media (max-width: 560px) {
    .hero { padding-top: 4rem; }
    .chapter { padding: 3.5rem 0; }
    .checklist-card ul, .feature-grid { grid-template-columns: 1fr; }
    .login-card { padding: 2rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
