/*
 * The app's design system — the tokens and parts from the design canvas, in plain CSS.
 * Dark, warm neutrals; one gold accent; Newsreader for display, IBM Plex for everything else.
 * No build step: every page links this file directly.
 */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500&display=swap');

:root {
  --bg: #15171a;
  --bg-2: #181a1e;
  --panel: #1b1e22;
  --panel-2: #1f2328;
  --rule: #2b3037;
  --rule-soft: #23272c;
  --border: #3b424b;
  --border-2: #363c44;
  --ink: #e6e3db;
  --ink-bright: #f6f3ec;
  --ink-soft: #c4bfb4;
  --muted: #a29c90;
  --muted-2: #8d877a;
  --gold: #d8a657;
  --gold-lit: #ecc385;
  --gold-dim: #8a7038;
  --gold-bg: #2f2a1d;
  --warn: #e0876a;
  --warn-bg: #2a1d19;
  --warn-edge: #6b4436;
  --good: #7fa87f;
  --good-lit: #b9d4b9;
  --good-bg: #18221a;
  --good-edge: #3d5a3d;
  --blue: #7fa3c8;
  --violet: #b39ddb;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: var(--gold-lit); text-decoration: none; }
a:hover { color: var(--ink-bright); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; color: var(--ink-bright); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- type ---------- */
.serif { font-family: var(--serif); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; color: var(--ink-bright); }
.h1 { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; }
.h2 { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; }
.h3 { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.lede { font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; border-top: 1px solid var(--rule); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.grow { flex-grow: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .section { padding: 48px 0; } .wrap { padding: 0 16px; } }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; }
.card.lit { border-color: var(--gold); }
.card.good { background: var(--good-bg); border-color: var(--good-edge); }
.card.warn { background: var(--warn-bg); border-color: var(--warn-edge); }
.card.dashed { background: var(--bg-2); border: 1px dashed var(--border); }
.note { padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.note.good { background: var(--good-bg); border: 1px solid var(--good-edge); }
.note.warn { background: var(--warn-bg); border: 1px solid var(--warn-edge); }
.note.gold { background: var(--gold-bg); border: 1px solid var(--gold-dim); color: var(--gold-lit); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 6px; border: 0; background: var(--gold); color: #15171a; font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gold-lit); color: #15171a; }
.btn:disabled, .btn[aria-disabled='true'] { background: var(--rule); color: var(--muted-2); cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); font-weight: 500; }
.btn.ghost:hover { border-color: var(--gold); color: var(--ink-bright); }
.btn.light { background: var(--ink-bright); color: #15171a; font-weight: 500; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--border); background: transparent; color: var(--ink-soft); font-size: 14.5px; cursor: pointer; }
.chip:hover { border-color: var(--gold-dim); color: var(--ink-bright); }
.chip[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-bg); color: var(--ink-bright); }
.chip[aria-pressed='true']::before { content: '✓'; color: var(--gold); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { text-align: left; padding: 14px 16px; border: 1px solid var(--border); background: var(--panel); border-radius: 8px; color: var(--ink); cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.choice::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 9px; border: 1.5px solid #6f6a5f; }
.choice[aria-checked='true'] { border: 1.5px solid var(--gold); background: var(--gold-bg); }
.choice[aria-checked='true']::before { border: 5px solid var(--gold); }
.choice b { display: block; font-weight: 500; color: var(--ink-bright); font-size: 14.5px; }
.choice span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field > label, .field > .q { font-size: 16px; font-weight: 500; color: var(--ink-bright); }
.field .hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.input, .textarea, .select { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--ink-bright); font-size: 15px; padding: 12px 14px; }
.input, .select { min-height: 48px; }
.textarea { line-height: 1.6; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--gold); outline: none; }
.tick { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--warn-edge); background: var(--panel); cursor: pointer; text-align: left; color: var(--ink); }
.tick::before { content: ''; flex-shrink: 0; width: 22px; height: 22px; border-radius: 4px; border: 1.5px solid var(--warn-edge); }
.tick[aria-checked='true'] { border-color: var(--good); background: var(--good-bg); }
.tick[aria-checked='true']::before { background: var(--good); border-color: var(--good); box-shadow: inset 0 0 0 4px var(--good); content: '✓'; color: #15171a; font-size: 14px; text-align: center; line-height: 20px; }
.err { color: var(--warn); font-size: 14px; }
.err:empty { display: none; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; border-radius: 3px; padding: 3px 8px; }
.badge.free { color: var(--good); border: 1px solid var(--good-edge); }
.badge.gold { color: #15171a; background: var(--gold); }
.badge.outline { color: var(--gold-lit); border: 1px solid var(--gold-dim); }
.badge.warn { color: #15171a; background: var(--warn); }
.badge.plain { color: var(--muted); border: 1px solid var(--border); }
.today, .after { display: flex; gap: 10px; padding: 11px 13px; border-radius: 7px; font-size: 14px; line-height: 1.5; }
.today { background: var(--warn-bg); } .after { background: var(--good-bg); }
.today::before, .after::before { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; padding-top: 3px; width: 44px; flex-shrink: 0; }
.today::before { content: 'TODAY'; color: var(--warn); } .after::before { content: 'AFTER'; color: var(--good); }

/* ---------- top bars ---------- */
.offer { background: var(--gold); color: #15171a; }
.offer .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.offer .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; padding: 4px 9px; background: #15171a; color: var(--gold-lit); border-radius: 3px; }
.offer s { opacity: .7; }
.offer .cd { display: flex; gap: 5px; }
.offer .cd span { min-width: 40px; text-align: center; background: #15171a; color: var(--ink-bright); border-radius: 4px; padding: 3px 0; font-family: var(--mono); font-size: 15px; line-height: 1.1; }
.offer .cd small { display: block; font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.topbar { border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink-bright); font-family: var(--serif); font-size: 20px; }
.brand svg { flex-shrink: 0; }
.nav { display: flex; gap: 26px; font-size: 14.5px; }
.nav a { color: var(--ink-soft); }
@media (max-width: 860px) { .nav { display: none; } }
.progress-steps { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.progress-steps .done { color: var(--good); } .progress-steps .now { color: var(--ink-bright); font-weight: 600; } .progress-steps .next { color: var(--muted-2); }
.dev-flag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); border: 1px dashed var(--border); border-radius: 3px; padding: 3px 7px; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--gold-bg); color: var(--gold-lit); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu[open] > summary { box-shadow: 0 0 0 2px var(--gold-dim); }
.account-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 240px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.account-panel a, .account-panel button { display: block; text-align: left; padding: 9px 12px; border-radius: 5px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; }
.account-panel a:hover, .account-panel button:hover { background: var(--panel-2); color: var(--ink-bright); }
.account-email { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.account-email b { color: var(--ink-bright); font-weight: 500; }
.account-panel .account-signout { margin-top: 4px; border-top: 1px solid var(--rule); border-radius: 0 0 5px 5px; color: var(--gold-lit); }

/* ---------- app shell (workspace, dashboard, courses) ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-body { flex-grow: 1; display: flex; min-height: 0; }
.rail { width: 250px; flex-shrink: 0; border-right: 1px solid var(--rule); padding: 10px 0 20px; display: flex; flex-direction: column; }
.rail .grp { padding: 16px 20px 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted-2); }
.rail a, .rail button.item { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 20px 0 18px; font-size: 14.5px; color: var(--ink-soft); border-left: 2px solid transparent; background: none; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; cursor: pointer; }
.rail a[aria-current='page'], .rail button.item[aria-current='true'] { color: var(--ink-bright); background: var(--gold-bg); border-left-color: var(--gold); }
.rail .count { font-size: 12px; color: var(--muted-2); margin-left: auto; }
.main { flex-grow: 1; min-width: 0; padding: 32px 44px 60px; }
.honest-strip { display: flex; align-items: center; gap: 10px; padding: 12px 28px; border-top: 1px solid var(--gold-dim); background: var(--gold-bg); color: var(--gold-lit); font-size: 13.5px; }
@media (max-width: 860px) {
  .app-body { flex-direction: column; }
  .rail { width: 100%; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 8px; }
  .rail .grp { display: none; }
  .rail a, .rail button.item { white-space: nowrap; border-left: 0; border-radius: 18px; min-height: 36px; padding: 0 14px; }
  .main { padding: 24px 16px 48px; }
}

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 400; padding: 0 12px 8px 0; }
.table td { vertical-align: top; padding: 12px 12px 12px 0; border-top: 1px solid var(--rule-soft); color: var(--ink-soft); line-height: 1.5; }
.table td:first-child { color: var(--ink-bright); }
@media (max-width: 640px) { .table, .table tbody, .table tr, .table td { display: block; } .table thead { display: none; } .table td { border-top: 0; padding: 4px 0; } .table tr { border-top: 1px solid var(--rule-soft); padding: 10px 0; } }

/* ---------- misc ---------- */
.bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--good); }
.bar.gold > i { background: var(--gold); }
.spinner { width: 22px; height: 22px; border-radius: 11px; border: 2.5px solid var(--gold); border-right-color: transparent; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.flow .node { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--bg); color: var(--ink); }
.flow .node.ai { border-color: var(--gold); background: var(--gold-bg); }
.flow .node.guard { border-color: var(--warn); background: var(--warn-bg); }
.flow .node.human { border: 1px dashed var(--good); background: var(--good-bg); }
.flow .arrow { color: var(--gold-dim); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv > span:first-child { font-size: 12px; color: var(--muted-2); }
.kv > span:last-child { font-size: 14px; line-height: 1.55; color: var(--ink); }
.quote { padding: 14px 16px; background: var(--bg); border-left: 2px solid var(--gold); border-radius: 0 8px 8px 0; }
.quote .ask { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.4; color: var(--ink-bright); }
footer.site { border-top: 1px solid var(--rule); padding: 32px 0; color: var(--muted); font-size: 13.5px; }
.modal-back { position: fixed; inset: 0; background: rgba(8, 9, 11, .78); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { width: 100%; max-width: 1200px; background: var(--bg); border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; }
