/* Astute Tech Academy — academy.astutetech.org
   Navy + gold from the Academy shield. Gold means "earned": progress, credentials, certificates.
   One family (Archivo), width and weight do the work. No images: data-light for prepaid phones. */

:root {
  --navy: #13294b;
  --navy-2: #1e3a66;
  --gold: #e3a92b;
  --gold-soft: #fbf1d8;
  --ink: #1d2433;
  --muted: #5b6577;
  --line: #d9dee7;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #1f7a52;
  --ok-soft: #e3f3ea;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius-s: 6px;
  --radius-m: 10px;
  --wrap: 1080px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.site-head { background: var(--navy); color: #fff; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700;
  font-variation-settings: "wdth" 88; font-size: 1.05rem; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand svg { width: 28px; height: 32px; flex: none; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #dfe6f2; text-decoration: none; padding: 8px 10px; border-radius: var(--radius-s); font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.nav .nav-cta { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav .nav-cta:hover { background: #f0b93e; color: var(--navy); }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; font-variation-settings: "wdth" 78; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 750; font-variation-settings: "wdth" 84; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }

section { padding: 48px 0; }
.page-title { padding: 36px 0 8px; }

/* ---------- hero with the ladder ---------- */
.hero { background: var(--navy); color: #fff; padding: 44px 0 56px; }
.hero h1 { color: #fff; }
.hero .lead { color: #c9d4e6; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.ladder { list-style: none; margin: 0; padding: 0; position: relative; }
/* two rails, rungs between them, labels to the right */
.ladder::before, .ladder::after { content: ""; position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: currentColor; opacity: .45; }
.ladder::before { left: 0; } .ladder::after { left: 30px; }
.ladder li { position: relative; padding: 8px 0 14px 50px; min-height: 52px; }
.ladder li::before { content: ""; position: absolute; left: 0; top: 18px; width: 33px; height: 4px; border-radius: 2px; background: currentColor; opacity: .45; }
.ladder .rung-name { display: block; font-weight: 750; font-size: 1.15rem; font-variation-settings: "wdth" 84; }
.ladder .rung-how { display: block; font-size: .92rem; opacity: .8; }
.ladder li.earned::before { background: var(--gold); opacity: 1; }
.ladder li.earned .rung-name { color: var(--gold); }
.ladder li.earned .rung-name::after { content: " ✓"; }
.ladder-on-light { color: var(--navy); }
.ladder-on-light .rung-how { color: var(--muted); opacity: 1; }
.ladder-on-light li.earned .rung-name { color: #9a6b00; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: var(--radius-s); border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; background: var(--navy); color: #fff; }
.btn:hover { background: var(--navy-2); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #f0b93e; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); outline: none; box-shadow: 0 0 0 3px rgba(227,169,43,.35); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 5px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 200px; }

.notice { padding: 12px 14px; border-radius: var(--radius-s); margin: 14px 0; border-left: 4px solid var(--navy-2); background: #e9eef6; }
.notice.ok { background: var(--ok-soft); border-color: var(--ok); }
.notice.err { background: var(--err-soft); border-color: var(--err); }
.notice.gold { background: var(--gold-soft); border-color: var(--gold); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; }
.panel + .panel { margin-top: 16px; }

/* ---------- price list (catalogue) ---------- */
.tier { margin: 0 0 36px; }
.tier-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-bottom: 3px solid var(--navy); padding-bottom: 8px; margin-bottom: 4px; }
.tier-head h2 { margin: 0; }
.tier-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { border-bottom: 1px solid var(--line); }
.price-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 4px; text-decoration: none; color: inherit; }
.price-row:hover { background: #fff; }
.price-row .title { font-weight: 700; color: var(--navy); }
.price-row .meta { grid-column: 1; font-size: .92rem; color: var(--muted); }
.price-row .price { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-weight: 800;
  font-variation-settings: "wdth" 80; font-size: 1.35rem; color: var(--navy); white-space: nowrap; }
.price-row .price small { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); font-variation-settings: "wdth" 100; }
.free { color: var(--ok) !important; }

/* ---------- course page ---------- */
.course-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .course-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } .sticky { position: sticky; top: 16px; } }
.outcomes { padding-left: 1.2em; } .outcomes li { margin-bottom: 6px; }
.module-list { list-style: none; padding: 0; margin: 0; counter-reset: mod; }
.module-list > li { counter-increment: mod; border-top: 1px solid var(--line); padding: 14px 0; }
.module-list > li > strong::before { content: "Module " counter(mod) ": "; color: var(--muted); font-weight: 600; }
.module-list ol { margin: 8px 0 0; padding-left: 1.3em; color: var(--muted); font-size: .95rem; }
.big-price { font-size: 2.4rem; font-weight: 800; font-variation-settings: "wdth" 78; color: var(--navy); line-height: 1; }
.or { text-align: center; color: var(--muted); margin: 14px 0; font-size: .9rem; }

/* ---------- dashboard ---------- */
.dash-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .dash-grid { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.enrol { padding: 16px 0; border-bottom: 1px solid var(--line); }
.enrol:last-child { border-bottom: 0; }
.enrol-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.bar { height: 8px; background: #e6eaf1; border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar > span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #e9eef6; color: var(--navy-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.gold { background: var(--gold-soft); color: #7a5500; }
.cert-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }

/* ---------- player ---------- */
.player { display: grid; gap: 20px; grid-template-columns: 1fr; padding-top: 20px; padding-bottom: 48px; }
@media (min-width: 900px) { .player { grid-template-columns: 280px 1fr; } }
.outline { font-size: .95rem; }
.outline h3 { font-size: 1rem; margin: 16px 0 6px; }
.outline ol { list-style: none; margin: 0; padding: 0; }
.outline button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; color: var(--ink); }
.outline button:hover { background: #fff; }
.outline button[aria-current="true"] { background: var(--navy); color: #fff; }
.outline button.done::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.outline button[aria-current="true"].done::before { color: var(--gold); }
.outline details summary { cursor: pointer; padding: 10px 0; font-weight: 700; }
.slide { min-height: 320px; }
.slide h2 { margin-top: 0; }
.slide .example { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 12px 14px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 16px 0; }
.slide .example strong { display: block; margin-bottom: 4px; color: #6b4b00; }
.slide-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; } .dots span { width: 9px; height: 9px; border-radius: 50%; background: #cfd6e2; } .dots span.on { background: var(--navy); }
.q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.q legend { font-weight: 700; margin-bottom: 8px; }
.q fieldset { border: 0; padding: 0; margin: 0; }
.q label { font-weight: 400; display: flex; gap: 10px; margin: 6px 0; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.q label input { width: auto; margin-top: 4px; }
.q.right label.picked { border-color: var(--ok); background: var(--ok-soft); }
.q.wrong label.picked { border-color: var(--err); background: var(--err-soft); }
.q .why { font-size: .92rem; color: var(--muted); margin-top: 6px; }

/* ---------- tables (admin / sponsor) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }

/* ---------- certificate (print) ---------- */
.cert { background: #fff; max-width: 900px; margin: 24px auto; padding: 48px 40px; border: 10px solid var(--navy); outline: 2px solid var(--gold); outline-offset: -18px; text-align: center; }
.cert h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.cert .name { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; font-variation-settings: "wdth" 80; color: var(--navy); border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 12px 6px; margin: 12px 0 18px; }
.cert .course { font-size: 1.4rem; font-weight: 700; color: var(--navy-2); }
.cert-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; text-align: left; font-size: .9rem; flex-wrap: wrap; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; } .site-head, .site-foot, .no-print { display: none !important; }
  .cert { margin: 0 auto; box-shadow: none; }
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot p { margin: 0 0 4px; }

.two-col { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.steps { padding-left: 1.3em; } .steps li { margin-bottom: 10px; }
.spinner { color: var(--muted); padding: 24px 0; }

.mobile-only { display: none; }
@media (max-width: 859px) { .mobile-only { display: inline-flex; } }

.codeblock { background: var(--navy); color: #f3f6fb; padding: 14px 16px; border-radius: var(--radius-s); overflow-x: auto;
  font: .88rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; margin: 16px 0; }
