/* Build an app with AI: free course. Start Build Launch design system v2 (Renderpeek neutrals, SBL green). */
@font-face { font-family: 'Space Grotesk'; src: url('fonts/space-grotesk-latin-var.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin-var.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --accent: #15803D; --accent-hover: #166534; --ink: #050505; --strong: #111111; --text: #545454; --muted: #6B6B6B;
  --hairline: #ECEAE6; --bg: #F6F5F2; --surface: #FFFFFF; --soft: #ECEAE6; --soft-border: #D9D7D2; --control: #8A8A8A;
  --grid: rgba(5, 5, 5, .08); --mark: #FEF3C7; --mark-text: #713F12;
  --ok-bg: #F0FDF4; --ok-line: #15803D; --no-bg: #FEF2F2; --no-line: #B91C1C;
  --navy: #0F172A; --navy-text: #CBD5E1; --navy-line: rgba(255, 255, 255, .07);
  --display: 'Space Grotesk', system-ui, sans-serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r-xs: 4px; --r-ctl: 8px; --r-card: 10px; --r-panel: 14px;
  --wrap: 1200px; --narrow: 760px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --accent: #22C55E; --accent-hover: #4ADE80; --ink: #F4F4F5; --strong: #E4E4E7; --text: #B7BBC4; --muted: #8B909A;
  --hairline: #1E222B; --bg: #080A0E; --surface: #111318; --soft: #161A22; --soft-border: #2A2F3A; --control: #6B7280;
  --grid: rgba(255, 255, 255, .06); --mark: #3B2F0B; --mark-text: #FDE68A;
  --ok-bg: #0B2516; --ok-line: #22C55E; --no-bg: #2A1214; --no-line: #F87171;
  --navy: #0B1120; --navy-line: rgba(255, 255, 255, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r-xs); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 600; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
b, strong { color: var(--strong); font-weight: 600; }
code { font: 13px var(--mono); background: var(--soft); padding: 2px 6px; border-radius: var(--r-xs); color: var(--strong); word-break: break-all; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.small { font-size: 14px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-ctl); z-index: 20; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: var(--narrow); }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }

/* Copy guard: lesson prose is not selectable; prompts and fields are. */
.protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protect pre, .protect code, .protect input, .protect textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-ctl); font: 600 15px var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .16s, color .16s, border-color .16s; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--strong); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--soft-border); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-green { background: #15803D; color: #fff; }
.btn-green:hover { background: #166534; color: #fff; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { color: #fff; border-color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; }
.logo { height: 44px; width: auto; display: block; }
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }
.course-name { display: flex; flex-direction: column; text-decoration: none; padding-left: 20px; border-left: 1px solid var(--hairline); line-height: 1.25; }
.course-name .mono { color: var(--accent); font-size: 11px; }
.course-name span:last-child { font: 600 16px var(--display); color: var(--ink); }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 44px; height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--soft-border); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (max-width: 640px) { .hide-sm { display: none; } .course-name { padding-left: 14px; } .logo { height: 38px; } }

/* Grid background (fades out, Renderpeek style) */
.grid-bg { position: relative; isolation: isolate; border-bottom: 1px solid var(--hairline); }
.grid-bg::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 80%); mask-image: linear-gradient(to bottom, #000 20%, transparent 80%); }

/* Course home */
.hero { padding: 88px 0 72px; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 19px; max-width: 58ch; color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); }
.facts li::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 28px; }
.tag { color: var(--accent); margin: 0 0 12px; }
.big { font: 500 20px/1.45 var(--display); color: var(--ink); margin: 0; }
.dots { margin: 0; padding-left: 18px; }
.dots li { margin: 4px 0; }
.sec-head { margin: 88px 0 28px; }
.progress { max-width: 420px; margin-top: 20px; }
.progress-bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.progress-label { color: var(--muted); margin: 8px 0 0; }
.stage { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--hairline); }
.stage-head .mono { color: var(--accent); margin: 0 0 6px; }
.stage-head h3 { font-size: 26px; margin-bottom: 6px; }
.stage-head p:last-child { font-size: 15px; }
@media (max-width: 860px) { .stage { grid-template-columns: 1fr; gap: 12px; } }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rows a { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); text-decoration: none; color: var(--text); transition: border-color .16s, transform .16s; }
.rows a:hover { border-color: var(--ink); color: var(--text); }
.row-n { font-size: 14px; color: var(--accent); }
.row-t { display: flex; flex-direction: column; }
.row-t b { font: 600 17px var(--display); color: var(--ink); }
.row-t span { font-size: 14px; }
.row-m { color: var(--muted); }
.status { color: var(--muted); border: 1px solid var(--soft-border); border-radius: 99px; padding: 3px 10px; font-size: 11px; }
.status.done { color: var(--accent); border-color: var(--accent); }
@media (max-width: 640px) { .rows a { grid-template-columns: 34px 1fr; } .row-m, .status { grid-column: 2; justify-self: start; } .row-m { margin-top: -8px; } }
.hidden-rows { display: none; }
.tools { list-style: none; margin: 0 0 96px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } }
.tool { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 22px; }
.tool .tag { font-size: 11px; }
.tool h3 a { color: var(--ink); }
.tool p:last-child { font-size: 15px; margin: 0; }

/* Help / services (dark navy with grid in both themes) */
.help { background: var(--navy); color: var(--navy-text); padding: 88px 0; position: relative; isolation: isolate; }
.help::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--navy-line) 1px, transparent 1px); background-size: 48px 48px; }
.help h2, .help b { color: #fff; }
.help .eyebrow { color: #4ADE80; }
.help-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .help-in { grid-template-columns: 1fr; } }
.svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.svc a { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 20px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-card); text-decoration: none; color: var(--navy-text); background: rgba(255, 255, 255, .03); }
.svc a:hover { border-color: #4ADE80; }
.svc-n { color: #4ADE80; padding-top: 3px; }
.svc a > span:last-child { display: flex; flex-direction: column; }
.svc b { font: 600 17px var(--display); }
.svc span span { font-size: 15px; }

/* Lesson */
.lesson-hero { padding: 56px 0 44px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.stage-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--accent); color: var(--accent); margin-right: 8px; }
.lesson-hero h1 { font-size: clamp(32px, 4.6vw, 48px); }
.meta { margin: 0; }
.lesson { padding-top: 16px; padding-bottom: 24px; }
.sec { padding: 36px 0; border-bottom: 1px solid var(--hairline); }
.sec h2 { font-size: 24px; display: flex; align-items: baseline; gap: 12px; }
.num { color: var(--accent); font-size: 13px; }
.lead { font-size: 19px; color: var(--strong); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } }
.box { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 20px 22px; border-top: 3px solid var(--accent); }
.box.later { border-top-color: var(--muted); }
.box h3 { font-size: 16px; }
.box ul { margin: 0; padding-left: 18px; font-size: 15px; }
.note { background: var(--soft); border-left: 3px solid var(--accent); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; padding: 14px 18px; margin: 20px 0; font-size: 15px; }
.steps { display: grid; gap: 12px; margin: 20px 0; }
.step { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 20px 22px; }
.step-n { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.step h3 { margin: 6px 0 6px; }
.step p { margin: 0; font-size: 15px; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 540px; }
.compare th, .compare td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.compare thead th { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text); background: var(--soft); }
.compare tr:last-child td { border-bottom: 0; }
.prompt { border: 1px solid var(--soft-border); border-radius: var(--r-card); overflow: hidden; background: var(--surface); margin: 16px 0; }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; background: var(--soft); border-bottom: 1px solid var(--soft-border); color: var(--text); }
pre { margin: 0; padding: 18px; white-space: pre-wrap; word-wrap: break-word; font: 14px/1.6 var(--mono); color: var(--strong); }
mark { background: var(--mark); color: var(--mark-text); border-radius: 3px; padding: 0 2px; }
.copy { min-height: 40px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--soft-border); background: var(--surface); color: var(--ink); font: 600 13px var(--body); cursor: pointer; }
.copy:hover { border-color: var(--ink); }
.breaks { display: grid; gap: 14px; }
.break { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 20px 22px; }
.break p { font-size: 15px; margin-bottom: 10px; }
.paste { display: flex; align-items: flex-start; gap: 8px; background: var(--soft); border-radius: var(--r-ctl); }
.paste pre { padding: 12px 14px; font-size: 13px; flex: 1; }
.paste .copy { margin: 6px; }
.ex { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 24px; }
.sort-item { border: 0; border-top: 1px solid var(--hairline); margin: 0; padding: 16px 0; }
.sort-item legend { float: left; width: 100%; color: var(--strong); font-weight: 500; margin-bottom: 10px; }
.pills { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--control); border-radius: 99px; font-size: 14px; cursor: pointer; color: var(--strong); }
.pill input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sort-fb { margin: 10px 0 0; font-size: 14px; }
.sort-fb:empty { display: none; }
.sort-fb.ok { background: var(--ok-bg); border-left: 3px solid var(--ok-line); padding: 8px 12px; color: var(--strong); }
.sort-fb.no { background: var(--no-bg); border-left: 3px solid var(--no-line); padding: 8px 12px; color: var(--strong); }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { border-top: 1px solid var(--hairline); }
.ticks label { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; color: var(--strong); }
.ticks input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ex-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.check-sum { margin: 0; font-weight: 500; color: var(--strong); }
.complete { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 36px 0 12px; }
.complete p { margin: 0; }
[data-complete][aria-pressed="true"] { background: transparent; color: var(--accent); border-color: var(--accent); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 64px; }
.pg { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); text-decoration: none; }
.pg:hover { border-color: var(--ink); }
.pg .mono { color: var(--muted); font-size: 11px; }
.pg b { font: 600 16px var(--display); color: var(--ink); }
.pg.next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pg.next { grid-column: 1; } }
.strip { border-top: 1px solid var(--hairline); background: var(--surface); }
.strip-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.strip p { margin: 0; }

/* Finish */
.next-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.next-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 20px; }
.next-list .num { padding-top: 3px; }
.next-list p { margin: 0; font-size: 15px; }
main > section.narrow { padding-top: 56px; padding-bottom: 56px; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0; font-size: 14px; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.foot nav a { color: var(--strong); }

@media print { .site-header, .strip, .help, .pager, .complete, .copy { display: none; } body::after { content: 'Build an app with AI, a free course by Start Build Launch. www.startbuildlaunch.com/build-an-app-with-ai/'; display: block; margin-top: 24px; font-size: 12px; } }

/* Referral tag */
.ref-tag { display: inline-block; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text); border: 1px solid var(--soft-border); border-radius: 99px; padding: 3px 6px; vertical-align: 2px; }

/* Example brand kit (lesson 4). Fixed colours on purpose: it shows a brand, not the site theme. */
.kit { margin: 24px 0; }
.kit-board { background: #F8FAFC; color: #0F172A; border: 1px solid var(--soft-border); border-radius: var(--r-panel); padding: 24px; display: grid; gap: 20px; -webkit-user-select: none; user-select: none; }
.kit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid #E2E8F0; padding-bottom: 14px; }
.kit-word { font: 700 24px var(--display); letter-spacing: -.02em; color: #1D4ED8; }
.kit-feel { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #475569; }
.kit-sw { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 560px) { .kit-sw { grid-template-columns: 1fr 1fr; } }
.kit-sw li { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #0F172A; }
.kit-sw b { color: #0F172A; }
.kit-sw code { background: none; padding: 0; color: #475569; font-size: 12px; }
.sw { height: 56px; border-radius: var(--r-ctl); border: 1px solid rgba(15, 23, 42, .12); }
.kit-h { font: 700 26px/1.2 var(--display); letter-spacing: -.02em; color: #0F172A; margin: 0 0 6px; }
.kit-p { font: 16px/1.6 var(--body); color: #475569; margin: 0 0 14px; }
.kit-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.kit-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); font: 600 15px var(--body); }
.kit-btn-main { background: #1D4ED8; color: #fff; }
.kit-btn-acc { background: #FACC15; color: #0F172A; }
.kit-cr { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: #0F172A; }
.kit-cr li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kit-cr b { color: #0F172A; font-family: var(--mono); font-size: 13px; }
.kit-cr span { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; }
.kit-cr .pass span { background: #DCFCE7; color: #14532D; }
.kit-cr .fail span { background: #FEE2E2; color: #7F1D1D; }
.kit figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Resources (lesson 4) */
.res-group { margin: 20px 0; }
.res-group h3 { font-size: 16px; }
.res { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .res { grid-template-columns: 1fr; } }
.res li { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.res a { font: 600 16px var(--display); }
.res span { font-size: 14px; }
