/* Light, high-readability theme.
   Color plan (60/30/10): 60% cool paper white, 30% deep navy ink, 10% accents.
   Cobalt = action (buttons, links). Sunflower = highlight/attention. Green = free/success. Rose = warnings.
   Body text on white is ~14:1 contrast; muted text ~7:1; cobalt buttons with white text ~6.5:1 (all pass WCAG AA). */
:root {
  --bg: #f7f8fc;
  --bg-2: #eef0f8;
  --card: #ffffff;
  --card-2: #fbfbfe;
  --ink: #14162b;
  --ink-2: #2a2e4a;
  --muted: #555b7a;
  --line: #e2e5f0;
  --line-2: #cfd4e6;
  --cobalt: #2b44ff;
  --cobalt-dark: #1f33d6;
  --cobalt-soft: #e9ecff;
  --sun: #ffd23f;
  --sun-soft: #fff6d6;
  --green: #0f8a5f;
  --green-soft: #e3f6ee;
  --rose: #d6336c;
  --rose-soft: #fde8ef;
  --sky: #0b8bd9;
  --sky-soft: #e2f3fc;
  --danger: #c22b3a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 22, 43, .05), 0 8px 28px -8px rgba(20, 22, 43, .12);
  --shadow-lg: 0 2px 4px rgba(20, 22, 43, .04), 0 24px 48px -16px rgba(43, 68, 255, .25);
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  /* legacy aliases used by older markup */
  --lime: var(--cobalt); --lime-ink: #fff; --violet: var(--cobalt); --pink: var(--rose); --cyan: var(--sky);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--cobalt); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--cobalt-dark); }
::selection { background: var(--sun); color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-stretch: 112%; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(720px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font: 700 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 14px; padding: 7px 11px; border-radius: 999px; background: var(--cobalt-soft); }
mark, .hl { background: linear-gradient(transparent 58%, var(--sun) 58%); color: inherit; padding: 0 .08em; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(247, 248, 252, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 1.02rem/1 var(--display); font-stretch: 112%; color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--cobalt); color: var(--sun); display: grid; place-items: center; font: 800 .82rem/1 var(--display); box-shadow: 0 4px 12px -2px rgba(43, 68, 255, .45); transform: rotate(-4deg); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--cobalt); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 14px; } }
@media (max-width: 640px) { .nav-links .nav-hide-sm { display: none; } }
.nav-links a[aria-current="page"] { color: var(--cobalt); font-weight: 700; }
@media (max-width: 420px) { .brand { font-size: .9rem; gap: 8px; white-space: normal; line-height: 1.1; max-width: 11em; } .nav .btn-sm { padding: 8px 12px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 12px; font: 700 1rem/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 4px 0 var(--cobalt-dark), 0 10px 22px -8px rgba(43, 68, 255, .55); }
.btn-primary:hover { background: #3a52ff; color: #fff; box-shadow: 0 6px 0 var(--cobalt-dark), 0 14px 28px -8px rgba(43, 68, 255, .6); }
.btn-primary:active { box-shadow: 0 2px 0 var(--cobalt-dark); }
.btn-ghost { background: var(--card); border-color: var(--ink); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--sun); box-shadow: 0 6px 0 var(--ink); }
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }
.nav .btn-sm, .btn-sm { box-shadow: none; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Hero (shared) */
.hero { position: relative; padding: 76px 0 56px; isolation: isolate; overflow: hidden; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: -20% -10% auto -10%; height: 120%;
  background: radial-gradient(40% 50% at 82% 18%, rgba(43, 68, 255, .14), transparent 70%),
              radial-gradient(30% 40% at 12% 30%, rgba(255, 210, 63, .28), transparent 70%); }
.hero h1 em { font-style: normal; color: var(--cobalt); }
.hero .sub { font-size: 1.18rem; color: var(--muted); max-width: 40ch; }
.fine { font-size: .88rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .btn:hover, .card:hover, a.lesson-row:hover { transform: none; } }

/* Sections */
section { padding: 72px 0; position: relative; }
.section-head { max-width: 660px; margin-bottom: 36px; }
.alt { background: var(--bg-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

/* Lesson rows (course home) */
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .lessons { grid-template-columns: 1fr; } }
.lesson-row { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.lesson-row:hover { border-color: var(--cobalt); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.lesson-num { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; font: 800 .9rem/1 var(--display); color: var(--ink); }
.lesson-row h3 { font: 700 1rem/1.35 var(--body); margin: 2px 0 4px; letter-spacing: 0; }
.lesson-row p { font-size: .9rem; color: var(--muted); margin: 0; }
.tag { display: inline-block; font: 800 .62rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; margin-left: 8px; vertical-align: 2px; }
.tag-free { background: var(--green-soft); color: var(--green); }
.tag-lock { background: var(--bg-2); color: var(--muted); }
.lesson-row.locked { background: var(--card-2); }
.lesson-row.locked .lesson-num { opacity: .6; }
.lesson-row.is-done .lesson-num { background: var(--green); color: #fff; opacity: 1; }

/* Classroom: lessons grouped by unit, one column, in reading order */
.unit-group { padding: 0; margin: 0 0 26px; }
.unit-title, .article .unit-title { font: 700 .78rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.unit-title span { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.unit-group .lessons { grid-template-columns: 1fr; }
.complete-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.complete-card p { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .complete-card .btn { width: 100%; white-space: normal; text-align: center; } }

/* Pricing / price */
.price { font: 800 3rem/1 var(--display); font-stretch: 112%; margin: 8px 0 6px; letter-spacing: -.03em; }
.price small { font: 500 1rem var(--body); color: var(--muted); letter-spacing: 0; }

/* Forms */
form.stack { display: grid; gap: 12px; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
input[type=email], input[type=text] { width: 100%; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line-2); background: #fff; font: inherit; color: var(--ink); }
input::placeholder { color: #8a8fab; }
input[type=email]:focus, input[type=text]:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); font-weight: 400; }
.check input { margin-top: 5px; accent-color: var(--cobalt); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: .95rem; margin-bottom: 14px; }
.alert-error { background: #fdecee; color: var(--danger); border: 1px solid #f6c7cd; }
.alert-ok { background: var(--green-soft); color: #0b6a49; border: 1px solid #b9e6d3; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; transition: border-color .15s; }
details[open] { border-color: var(--cobalt); box-shadow: var(--shadow); }
summary { cursor: pointer; padding: 15px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 500 1.5rem/1 var(--body); color: var(--cobalt); }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); }

/* Final CTA band: the one dark section, for rhythm */
.cta-band { background: var(--ink); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band .muted, .cta-band .s2-micro { color: #b7bbd6; }
.cta-band a { color: var(--sun); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 34px 0 48px; font-size: .86rem; color: var(--muted); background: var(--bg); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Course area */
.course { display: grid; grid-template-columns: 280px 1fr; gap: 56px; padding: 36px 0 80px; }
@media (max-width: 920px) { .course { grid-template-columns: 1fr; } .side { position: static !important; order: 2; border-top: 1px solid var(--line); padding-top: 18px; } }
.side { position: sticky; top: 90px; align-self: start; }
.side h4 { font: 700 .7rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.side ol { list-style: none; padding: 0; margin: 0; }
.side a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.side a:hover { background: var(--bg-2); color: var(--ink); }
.side a.current { background: var(--cobalt); color: #fff; font-weight: 700; }
.side a.locked { color: #7b809c; }
.side .n { width: 20px; flex: none; font-weight: 700; opacity: .75; }
.side a.is-done:not(.current) .n { background: var(--green); color: #fff; border-radius: 50%; text-align: center; font-size: .72rem; line-height: 20px; height: 20px; opacity: 1; }
.article { max-width: 700px; }
.article h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.article h2 { font-size: 1.35rem; margin-top: 2em; }
.article .lede { font-size: 1.22rem; color: var(--ink-2); line-height: 1.6; }
.article ul li { margin-bottom: 6px; }
.meta { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.story { background: var(--sun-soft); border-left: 4px solid var(--sun); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 22px; margin: 26px 0; }
.story-label { font: 800 .68rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #8a6400; margin-bottom: 10px; }
.story p:last-child { margin: 0; }
.steps { padding-left: 0; counter-reset: s; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 44px; margin-bottom: 4px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border-radius: 9px; background: var(--cobalt); color: #fff; font: 800 .82rem/30px var(--display); text-align: center; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding: 6px 0 6px 32px; }
.checks li::before { content: ''; position: absolute; left: 0; top: 11px; width: 18px; height: 18px; border: 2px solid var(--green); border-radius: 5px; }
.prompt { background: #151833; border-radius: 14px; margin: 22px 0; overflow: hidden; box-shadow: var(--shadow); }
.prompt-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 10px 18px; background: #1e2244; font: 700 .78rem/1 var(--body); color: var(--sun); }
.prompt pre { margin: 0; padding: 18px; white-space: pre-wrap; font: .88rem/1.7 var(--mono); color: #eef0ff; }
.copy { background: var(--sun); border: 0; color: var(--ink); border-radius: 8px; padding: 7px 12px; font: 800 .74rem/1 var(--body); cursor: pointer; }
.copy:hover { filter: brightness(1.05); }
.callout { border: 2px solid var(--cobalt); border-radius: var(--radius); padding: 18px 22px; margin: 32px 0; background: var(--cobalt-soft); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 700; }
.upsell { background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 28px; margin: 40px 0 0; box-shadow: 6px 6px 0 var(--sun); }
.upsell h3, .upsell h2, .article .upsell h2 { font-size: 1.3rem; margin-top: 0; }
.banner { padding: 14px 18px; border-radius: 14px; margin-bottom: 24px; }
.dash-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 26px; }
.progress { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin: 10px 0 4px; width: 260px; }
.progress > div { height: 100%; background: var(--green); width: 0; transition: width .4s; }
.legal { padding: 48px 0 80px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8em; }
.legal li { margin-bottom: 6px; }

/* Course tools */
.checks li[role=checkbox] { cursor: pointer; border-radius: 8px; user-select: none; }
.checks li[role=checkbox]:hover { background: var(--green-soft); }
.checks li[role=checkbox]:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.checks li.is-checked::before { background: var(--green); }
.checks li.is-checked::after { content: ''; position: absolute; left: 6px; top: 13px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checks li.is-checked { color: var(--muted); }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 16px 20px; margin: 18px 0; box-shadow: 6px 6px 0 var(--sun); }
.next-card .eyebrow { margin: 0; }
.keep-card { background: var(--cobalt-soft); border-radius: 16px; padding: 18px 22px; margin: 0 0 18px; }
.keep-card h3, .keep-card h2, .article .keep-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.keep-card ul { margin: 0; padding-left: 18px; }
.keep-card li { margin: 4px 0; }
.project-form textarea, .project-form select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.tool-table td:first-child { white-space: nowrap; }

/* Lesson diagrams */
.fig { margin: 28px 0; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--body); }
.fig figcaption { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.fig .t-b { font-weight: 700; font-size: 16px; fill: var(--ink); }
.fig .t-sm { font-size: 14.5px; }
.fig .t-s { font-size: 14.5px; fill: var(--ink-2); }
.fig .t-xs { font-size: 13px; fill: var(--ink-2); }
.fig .t-big { font: 800 34px var(--display); fill: var(--ink); }
.fig .t-mono { font: 15px var(--mono); fill: var(--ink); }
.fig .f-muted-text { fill: var(--muted); }
.fig .f-rose-text { fill: #a8204f; }
.fig .f-phone { fill: var(--bg); stroke: var(--ink); stroke-width: 2.5; }
.fig .f-row { fill: #fff; stroke: var(--line-2); }
.fig .f-sheet { fill: var(--rose-soft); stroke: var(--rose); stroke-width: 1.5; }
.fig .f-line { stroke: var(--line-2); }
.fig .f-line-fill { fill: var(--line-2); }
.fig .f-box { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.fig .f-box-warn { fill: var(--rose-soft); stroke: var(--rose); stroke-width: 2; }
.fig .f-box-win { fill: var(--green-soft); stroke: var(--green); stroke-width: 2; }
.fig .f-arrow { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.fig .f-arrow-rose { stroke: var(--rose); stroke-width: 1.8; fill: none; stroke-dasharray: 5 4; }
.fig .f-ink-fill { fill: var(--ink); }
.fig .f-road { stroke: var(--line-2); stroke-width: 10; fill: none; stroke-linecap: round; }
.fig .f-road-thin { stroke: var(--line-2); stroke-width: 4; stroke-linecap: round; }
.fig .f-sun-fill { fill: var(--sun); } .fig .f-cobalt-fill { fill: var(--cobalt); } .fig .f-sky-fill { fill: var(--sky); }
.fig .f-rose-fill { fill: var(--rose); } .fig .f-green-fill { fill: var(--green); }
@media (max-width: 560px) { .fig { padding: 12px; margin: 22px -4px; } }

/* Certificate */
.cert-name-field { max-width: 360px; margin-bottom: 8px; }
.cert { position: relative; margin: 24px 0; padding: 48px 40px 32px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 10px 10px 0 var(--sun); outline: 1px solid var(--line-2); outline-offset: -14px; }
.cert-mark { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 14px; background: var(--cobalt); color: var(--sun); font: 800 1.4rem/54px var(--display); }
.cert-kicker { font: 700 .78rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cert-name { font: 800 clamp(1.8rem, 5vw, 2.8rem)/1.15 var(--display); font-stretch: 112%; margin: 18px 0 10px; color: var(--ink); border-bottom: 2px solid var(--line-2); display: inline-block; padding: 0 12px 8px; }
.cert-body { color: var(--ink-2); margin: 10px auto 18px; max-width: 46ch; }
.cert-units { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.cert-units span { font: 700 .72rem/1 var(--body); padding: 7px 10px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt-dark); }
.cert-foot { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
@media print {
  body * { visibility: hidden; }
  .cert, .cert * { visibility: visible; }
  .cert { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; margin: 0; }
}

/* Header + hero offer badges */
.nav-links .nav-badge { display: inline-flex; align-items: center; gap: 7px; font: 700 .8rem/1 var(--body); color: var(--green); background: var(--green-soft); border: 1px solid #bfe6d3; padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.nav-links .nav-badge:hover { color: var(--green); border-color: var(--green); }
.nav-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.offer-badge { display: inline-flex; align-items: stretch; margin-bottom: 22px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; text-decoration: none; font: 700 .78rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); }
.offer-badge b { background: var(--green); color: #fff; padding: 9px 12px; }
.offer-badge span { background: var(--sun); color: var(--ink); padding: 9px 12px; }
.offer-badge:hover { transform: translateY(-1px); box-shadow: 4px 4px 0 var(--ink); }
@media (max-width: 400px) { .offer-badge { font-size: .68rem; } .offer-badge b, .offer-badge span { padding: 8px 9px; } }
@media (max-width: 640px) { .nav-links .nav-badge { display: none; } }
