:root {
  --navy: #0a2158; --navy-2: #123580; --gold: #a8780f; --gold-2: #e2c160; --cream: #f9edc7;
  --ink: #1b2430; --muted: #5b6675; --line: #dde3ea; --bg: #f6f8fb; --card: #fff;
  --ok: #1f7a4d; --bad: #b3261e; --radius: 12px;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; font: 16px/1.6 "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg) }
h1, h2, h3 { font-family: "Merriweather", Georgia, serif; line-height: 1.25; color: var(--navy) }
a { color: var(--navy-2) }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px }

/* header */
.top { border-bottom: 3px solid var(--gold-2); background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10 }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: Merriweather, Georgia, serif; font-weight: 700; font-size: 18px }
.brand img { flex: none; width: 48px; height: 48px; display: block }
.brand small { display: block; font: 400 12px "Source Sans 3", sans-serif; color: #c9d3e0 }
.nav { display: flex; gap: 18px; align-items: center }
.nav a { color: #e6ecf3; text-decoration: none; font-weight: 600 }
.nav a:hover { color: var(--gold-2) }
@media (max-width: 720px) { .nav a:not(.btn) { display: none } }

/* buttons & forms */
.btn { display: inline-block; background: var(--gold); color: #fff !important; border: 0; border-radius: 8px; padding: 12px 20px; font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1.3; text-decoration: none; cursor: pointer; transition: background .15s }
.btn:hover { background: #8a6209 }
.btn:disabled { opacity: .55; cursor: not-allowed }
.btn.ghost { background: transparent; border: 2px solid currentColor; color: var(--navy) !important }
.btn.navy { background: var(--navy) } .btn.navy:hover { background: var(--navy-2) }
.btn.sm { padding: 7px 12px; font-size: 14px }
label { display: block; font-weight: 600; margin: 12px 0 4px }
input, select { width: 100%; padding: 12px; border: 1px solid #b9c3cf; border-radius: 8px; font: inherit; background: #fff }
input:focus, select:focus { outline: 3px solid rgba(184,134,43,.35); border-color: var(--gold) }
.err { color: var(--bad); font-weight: 600; margin-top: 10px; min-height: 1em }
.note { color: var(--muted); font-size: 14px }

/* hero */
.hero { background: radial-gradient(circle at 80% 40%, #1a3f94 0%, var(--navy) 60%); color: #fff; padding: 56px 0 64px; border-bottom: 4px solid var(--gold-2) }
.hero .wrap { display: flex; align-items: center; gap: 40px }
.hero .hero-text { flex: 1; min-width: 0 }
.hero .hero-logo { flex: none; width: min(340px, 36vw); filter: drop-shadow(0 12px 30px rgba(0,0,0,.45)) }
.hero .tag { color: var(--gold-2); font-family: Merriweather, Georgia, serif; font-size: 18px; letter-spacing: 1px; margin: 4px 0 8px }
@media (max-width: 760px) { .hero .wrap { flex-direction: column-reverse; text-align: center; gap: 20px } .hero .hero-logo { width: 220px } .hero .ctas { justify-content: center } .hero p { margin-left: auto; margin-right: auto } }
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 48px); margin: 0 0 12px }
.hero p { font-size: 19px; color: #d9e2ee; max-width: 680px }
.hero .eyebrow { color: var(--gold-2); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px }
.hero .btn.ghost { color: #fff !important }

section { padding: 56px 0 }
.section-title { text-align: center; margin: 0 0 8px; font-size: clamp(24px, 3.5vw, 32px) }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 640px }

/* course cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 4px 18px rgba(11,37,69,.06); display: flex; flex-direction: column }
.card .tag { align-self: flex-start; background: var(--cream); color: #6b4a06; font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px }
.card h3 { margin: 12px 0 6px; font-size: 22px }
.price { font: 700 40px Merriweather, Georgia, serif; color: var(--navy); margin: 8px 0 }
.price small { font: 400 15px "Source Sans 3", sans-serif; color: var(--muted) }
.card ul { padding-left: 20px; margin: 8px 0 20px; flex: 1 }
.card li { margin: 6px 0 }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; counter-reset: s }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); border: 2px solid var(--gold-2); color: #fff; font-weight: 700; margin-bottom: 8px }
.step h3 { margin: 4px 0; font-size: 18px }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 10px 0 }
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy) }

footer { border-top: 4px solid var(--gold-2); background: var(--navy); color: #c9d3e0; padding: 32px 0; font-size: 14px }
footer a { color: #fff }

/* panels */
.panel { max-width: 520px; margin: 48px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: 0 6px 24px rgba(11,37,69,.08) }
.codebox { font: 700 28px ui-monospace, Menlo, monospace; letter-spacing: 2px; text-align: center; background: #f3f5f8; border: 2px dashed var(--gold); border-radius: 10px; padding: 16px; margin: 16px 0; word-break: break-all }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(8,20,38,.6); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50 }
.modal.open { display: flex }
.modal .panel { margin: 0; width: 100%; position: relative }
.modal .x { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted) }

/* course player */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 24px 0 48px }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr } }
.side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; position: sticky; top: 80px }
@media (max-width: 860px) { .side { position: static } }
.side h4 { margin: 12px 0 6px; color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase }
.side button { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 8px; font: inherit; cursor: pointer; color: var(--ink) }
.side button:hover { background: var(--bg) }
.side button.active { background: #eef2f7; font-weight: 700 }
.side .chk { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b9c3cf; display: grid; place-items: center; font-size: 12px; color: #fff; margin-top: 2px }
.side .done .chk { background: var(--ok); border-color: var(--ok) }
.main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 36px); min-width: 0 }
.main img { max-width: 100% }
.main table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto }
.main td, .main th { border: 1px solid var(--line); padding: 6px 10px }
.meter { height: 10px; background: #e6ebf1; border-radius: 99px; overflow: hidden; margin: 8px 0 }
.meter > div { height: 100%; background: var(--gold); transition: width .3s }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; margin-bottom: 16px }
.q { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 14px 0 }
.q p { margin: 0 0 8px; font-weight: 600 }
.q label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; margin: 2px 0; cursor: pointer }
.q label:hover { background: var(--bg) }
.q input { width: auto; margin-top: 5px }
.result { text-align: center; padding: 20px }
.result .big { font: 700 56px Merriweather, Georgia, serif }
.pass { color: var(--ok) } .fail { color: var(--bad) }
.video { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }

/* admin */
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top }
.tbl th { background: #eef2f7; position: sticky; top: 64px }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #eef2f7; white-space: nowrap }
.pill.ok { background: #dff3e8; color: var(--ok) } .pill.bad { background: #fbe4e2; color: var(--bad) }
@media (max-width: 480px) {
  .brand { font-size: 15px } .brand small { font-size: 11px } .brand svg { width: 30px; height: 30px }
  .top .btn.sm { white-space: nowrap }
}

/* study guide */
.lesson h3 { margin: 28px 0 8px; font-size: 19px; border-left: 4px solid var(--gold-2); padding-left: 10px }
.law { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 18px }
.law:first-of-type { border-top: 0 }
.law-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px }
blockquote.statute { margin: 0; background: #f5f7fb; border-left: 4px solid var(--navy); padding: 10px 16px; border-radius: 0 8px 8px 0; font-family: Georgia, "Times New Roman", serif; font-size: 15px; color: #222 }
blockquote.statute p { margin: 8px 0 }
.plain { background: #fffaf0; border: 1px solid #f0e2bd; border-radius: 8px; padding: 6px 16px; margin-top: 10px }
.plain ul { padding-left: 20px; margin: 6px 0 }
.plain li { margin: 4px 0 }
.changed { background: #e9f1ff; border-radius: 6px; padding: 8px 10px }
.callout { background: var(--cream); border: 1px solid #e8cf85; border-radius: 10px; padding: 14px 16px; margin: 12px 0 18px }
.lesson .note { color: var(--muted); font-size: 14px; font-style: italic }

/* keep logos square at every screen size */
.hero .hero-logo, .brand img { height: auto; aspect-ratio: 1 / 1; object-fit: contain }
