:root {
  /* Highway: asphalt, safety yellow, white. Barlow Condensed for display, Barlow for text. */
  --bg: #f2f2f0;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #55585e;
  --border: #d9d9d5;
  --asphalt: #15171a;
  --asphalt-2: #22252a;
  --yellow: #ffcc00;
  --yellow-ink: #15171a;
  --brand: #15171a;
  --brand-ink: #ffffff;
  --brand-soft: #e9e9e4;
  --accent: #ffcc00;
  --on-dark: #ffffff;
  --on-dark-muted: #c9ccd3;
  --ok: #1e7a46;
  --ok-soft: #e3f3ea;
  --warn: #8a5a00;
  --warn-soft: #fff4cc;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius: 6px;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416; --surface: #1b1e22; --text: #eceef1; --muted: #a3a8b1; --border: #30343a;
    --brand: #ffcc00; --brand-ink: #15171a; --brand-soft: #2a2d33; --asphalt: #0c0d0f; --asphalt-2: #16181b;
    --ok: #5cc28a; --ok-soft: #173025; --warn: #e3b94b; --warn-soft: #33290f; --err: #f07a6f; --err-soft: #3a1c1a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; font-weight: 700; }
h1 { font-size: 2.4rem; margin: 0 0 .5rem; }
h2 { font-size: 1.7rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.25rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
main.auth { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.topbar { background: var(--asphalt); color: var(--on-dark); border-bottom: 4px solid var(--yellow); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand .logo { height: 44px; width: auto; display: block; }
.topbar nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.topbar nav a { text-decoration: none; color: var(--on-dark); font-weight: 600; }
.topbar nav .btn { background: var(--yellow); color: var(--yellow-ink); }
.topbar .linklike { color: var(--on-dark); }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; }
.devbar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 6px 16px; font-size: .9rem; }
.footer { background: var(--asphalt); color: var(--on-dark-muted); font-size: .85rem; padding: 20px 0 36px; margin-top: 24px; }
.footer a { color: var(--on-dark); }

.btn, button[type=submit], input[type=submit] {
  display: inline-block; background: var(--yellow); color: var(--yellow-ink); border: 0; border-radius: var(--radius);
  padding: 10px 20px; font: 700 1.05rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--on-dark); border: 2px solid var(--on-dark); }
.btn:hover, button[type=submit]:hover { filter: brightness(1.08); }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--asphalt); color: var(--on-dark); }
.btn-small { padding: 6px 12px; font-size: .9rem; }

.card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.price { font-size: 1.4rem; font-weight: 700; }
.pill { display: inline-block; font: 700 .8rem/1.4 var(--display); text-transform: uppercase; letter-spacing: .06em; padding: 3px 10px; border-radius: 4px; background: var(--yellow); color: var(--yellow-ink); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-err { background: var(--err-soft); color: var(--err); }
/* Highway hero: full-bleed asphalt band with the photo behind it */
main.home { padding-top: 0; }
.hero-hw { position: relative; background: var(--asphalt); color: var(--on-dark); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background: linear-gradient(180deg, #2a3140 0%, #4a4f5a 55%, #1a1c20 100%); background-size: cover; background-position: center;
  /* Hero photo: add the licensed Adobe Stock shot as static/img/hero-highway.jpg and set it as the
     background here (center/cover). Keep this comment free of url() so WhiteNoise's manifest scan passes. */ }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
@media (max-width: 700px), (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21,23,26,.94) 0%, rgba(21,23,26,.6) 60%, rgba(21,23,26,.25) 100%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; padding-top: 48px; padding-bottom: 40px; min-height: 360px; }
.hero-hw h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: .98; margin: 0 0 14px; color: var(--on-dark); }
.hero-hw .lede { color: var(--on-dark-muted); font-size: 1.1rem; max-width: 56ch; margin: 0 0 20px; }
.eyebrow { font: 700 .8rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin: 0 0 12px; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-sign svg, .hero-sign .hero-inky { width: min(100%, 280px); height: auto; display: block; margin-left: auto; }
@media (max-width: 700px) { .hero-inner { grid-template-columns: 1fr; } .hero-sign svg, .hero-sign .hero-inky { margin: 0 auto; width: 200px; } }

/* Home: one door per audience section */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 8px; }
.door { display: flex; flex-direction: column; background: var(--surface); border-top: 6px solid var(--yellow); padding: 18px 18px 20px; text-decoration: none; color: var(--text); transition: transform .12s ease, box-shadow .12s ease; }
.door:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.door img { width: 150px; height: 150px; object-fit: contain; align-self: center; margin-bottom: 10px; }
.door h2 { margin: 0 0 8px; font-size: 1.5rem; }
.door p { margin: 0 0 14px; color: var(--muted); }
.door-cta { margin-top: auto; font: 700 .95rem var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.door:hover .door-cta { color: var(--warn); }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } }
.home-foot { margin-top: 28px; text-align: center; }
.empty-section { display: flex; gap: 18px; align-items: center; }
.empty-section img { width: 110px; height: auto; flex: none; }
.other-sections { margin-top: 32px; }
.envtag { margin-left: 10px; padding: 2px 8px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); font: 700 .75rem/1.4 var(--display); text-transform: uppercase; letter-spacing: .1em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 8px; }
.step { background: var(--surface); border-top: 6px solid var(--yellow); padding: 14px 16px 16px; }
.step .n { width: 30px; height: 30px; border-radius: 4px; background: var(--asphalt); color: var(--yellow); display: grid; place-items: center; font: 700 .95rem var(--display); }
.step h3 { margin: 10px 0 6px; } .step p { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* Inky, the mascot */
.bubble { position: relative; background: var(--surface); border: 2px solid var(--asphalt); border-radius: 6px; padding: 10px 14px; font-weight: 600; max-width: 260px; text-align: center; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--asphalt); border-bottom: 0; }
.bubble::before { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--surface); border-bottom: 0; z-index: 1; }
.inky-aside { display: flex; gap: 16px; align-items: center; }
.inky-aside img { width: 110px; height: auto; flex: none; }
.inky-greeting { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.inky-greeting img { width: 120px; height: auto; }
.inky-greeting .bubble { margin-bottom: 14px; }
.inky-greeting .bubble::after, .inky-greeting .bubble::before { left: 24px; margin-left: 0; }
.inky-empty { text-align: center; }
.inky-empty img { width: 150px; height: auto; margin-bottom: 8px; }
.celebrate { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.celebrate img { width: 130px; height: auto; }
@media (max-width: 520px) { .celebrate { grid-template-columns: 1fr; justify-items: center; text-align: center; } .inky-aside { flex-direction: column; text-align: center; } }
.art-sign svg { width: 170px; height: auto; display: block; }
.inky-inline { width: 44px; height: 44px; vertical-align: middle; margin-right: 8px; }
.msg .art-sign svg { width: 170px; height: auto; display: block; }
.inky-inline { width: 56px; height: 56px; }
.invite-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.team-cta { margin-top: 16px; color: var(--muted); }
.footer-inky { width: 28px; height: 28px; vertical-align: middle; margin-right: 6px; opacity: .85; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; background: var(--brand-soft); }
.msg-success { background: var(--ok-soft); color: var(--ok); }
.msg-warning { background: var(--warn-soft); color: var(--warn); }
.msg-error { background: var(--err-soft); color: var(--err); }

/* Forms (also styles allauth's plain markup) */
form p, .field { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 140px; }
input[type=checkbox] + label, .check label { display: inline; font-weight: 400; }
.helptext, form p span { display: block; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.errorlist { color: var(--err); margin: 4px 0; padding-left: 18px; font-size: .9rem; }

/* Course player */
.progressbar { height: 10px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progressbar > span { display: block; height: 100%; background: var(--yellow); }
.outline { list-style: none; padding: 0; margin: 0; }
.outline li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.outline li:first-child { border-top: 0; }
.locked { color: var(--muted); }
.lesson-body { font-size: 1.05rem; }
.lesson-body img, .lesson-body video { max-width: 100%; height: auto; border-radius: 8px; }
.timer { font-variant-numeric: tabular-nums; }
.sticky-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.question { padding: 16px 0; border-top: 1px solid var(--border); }
.question:first-of-type { border-top: 0; }
.question .prompt { font-weight: 600; margin-bottom: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.choice input { margin-top: 4px; }
.choice span { font-weight: 400; }
.q-error { color: var(--err); font-size: .9rem; }
.ans-right { color: var(--ok); }
.ans-wrong { color: var(--err); }
.score { font-size: 2.4rem; font-weight: 800; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }

/* Course content */
.draft-banner { padding: 8px 12px; border: 1px dashed var(--err); color: var(--err); border-radius: 8px; }
.lesson-body blockquote { margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--yellow); background: var(--brand-soft); border-radius: 0 6px 6px 0; }
.lesson-body table { margin: 12px 0; }
.sources { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.sources h3 { font-size: .95rem; margin: 0 0 6px; }
.sources ul { margin: 0; padding-left: 18px; }
.preview-q { margin: 10px 0 14px; }
.preview-q .correct { color: var(--ok); font-weight: 600; }
@media print { .topbar, .footer, .devbar { display: none; } .card { break-inside: avoid-page; border: 0; } }

/* Privacy policy and terms */
.legal { max-width: 720px; line-height: 1.6; }
.legal h2 { margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }
