:root {
  --bg: #f6f7f9; --panel: #ffffff; --line: #dde1e7; --text: #1b1f27; --muted: #5d6676;
  --accent: #1f6feb; --accent-text: #ffffff; --ok: #1a7f37; --ok-bg: #e6f4ea; --bad: #c62828; --bad-bg: #fdecea;
  --code: #eef1f5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b1f27; --line: #2d333d; --text: #e7eaf0; --muted: #9aa3b2;
    --accent: #4c8dff; --accent-text: #0b1220; --ok: #4cc26a; --ok-bg: #16301f; --bad: #ff6b6b; --bad-bg: #3a1a1a;
    --code: #252b35;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
code, pre { background: var(--code); border-radius: 4px; font: .9em ui-monospace, Consolas, monospace; }
code { padding: .05em .35em; }
pre.code { padding: .8rem 1rem; overflow-x: auto; white-space: pre; }
table { border-collapse: collapse; width: 100%; margin: .75rem 0; background: var(--panel); }
th, td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--code); }
.hint { color: var(--muted); font-size: .92rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.row.between { justify-content: space-between; }

button, .btn {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem 1rem; min-height: 42px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
}
button:hover, .btn:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.link { background: none; border: none; color: var(--text); padding: .4rem .6rem; min-height: 0; }
.done-btn { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
input, textarea { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .6rem; width: 100%; }
input[type=checkbox] { width: auto; }

/* layout */
.top { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 12px rgba(16, 32, 64, .06); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.brand img { height: 40px; width: auto; flex: none; }
.brand span { font-weight: 400; color: var(--muted); }
.top nav { display: flex; gap: .2rem; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; padding: .4rem .6rem; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: var(--code); }
main { max-width: 980px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.narrow { max-width: 760px; margin: 0 auto; }
.foot { max-width: 980px; margin: 0 auto; padding: 1.5rem 16px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.crumb { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }

/* home */
/* hero: drone photos cross-fade and drift behind the text (pure CSS, 30 s loop; still for reduced motion) */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; padding: 3.5rem 2.5rem 2.5rem; min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: #0b1f45; box-shadow: 0 18px 40px rgba(11, 31, 69, .25); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 18, 42, .88) 0%, rgba(6, 18, 42, .6) 45%, rgba(6, 18, 42, .1) 100%), linear-gradient(0deg, rgba(6, 18, 42, .55), transparent 45%); }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; animation: heroSlide 30s linear infinite backwards; }
.hero-bg .s1 { background-image: url("img/hero-1.jpg"); animation-delay: 0s; }
.hero-bg .s2 { background-image: url("img/hero-2.jpg"); animation-delay: 6s; }
.hero-bg .s3 { background-image: url("img/hero-3.jpg"); animation-delay: 12s; }
.hero-bg .s4 { background-image: url("img/hero-4.jpg"); animation-delay: 18s; }
.hero-bg .s5 { background-image: url("img/hero-5.jpg"); animation-delay: 24s; }
@keyframes heroSlide {
  0% { opacity: 0; transform: scale(1.12) translateX(2.5%); }
  5% { opacity: 1; }
  20% { opacity: 1; }
  26% { opacity: 0; transform: scale(1.02) translateX(-2.5%); }
  100% { opacity: 0; transform: scale(1.02) translateX(-2.5%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg i { animation: none; }
  .hero-bg .s1 { opacity: 1; }
}
.hero .eyebrow { display: inline-block; align-self: flex-start; margin: 0 0 1rem; padding: .25rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); }
.hero h1 { font-size: 2.7rem; max-width: 640px; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.hero p { color: #d9e4f7; max-width: 600px; font-size: 1.08rem; }
.hero .tagline { color: #fff; font-size: 1.45rem; font-weight: 600; margin-top: -.4rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .22); border-color: #fff; }
.hero .progress { max-width: 480px; }
.stats { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.stats li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; color: var(--muted); }
.stats b { display: block; font-size: 1.6rem; color: var(--accent); line-height: 1.2; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 2rem 0 .5rem; }
.photos figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 8px 24px rgba(11, 31, 69, .15); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.photos figure:hover img { transform: scale(1.06); }
.photos figcaption { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem .9rem; color: #e6edf8; font-size: .92rem; background: linear-gradient(transparent, rgba(6, 18, 42, .85)); }
.photos figcaption b { display: block; color: #fff; font-size: 1.15rem; }
.progress { margin-top: 1rem; }
progress { appearance: none; display: block; width: 100%; min-width: 80px; height: 8px; border: 0; border-radius: 4px; background: var(--code); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--code); }
progress::-webkit-progress-value { background: var(--ok); }
progress::-moz-progress-bar { background: var(--ok); }
.modules { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; }
.modules a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; height: 100%; }
.modules a { transition: transform .15s, box-shadow .15s, border-color .15s; }
.modules a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 31, 69, .12); }
.modules .num { width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--code); display: grid; place-items: center; font-weight: 600; font-size: .9rem; }
.modules .done .num { background: var(--ok); color: #fff; }
.modules .title { flex: 1; }
.modules .check { color: var(--ok); font-weight: 700; }
.modules .locked a { color: var(--muted); }
.modules .locked .check { color: var(--muted); font-weight: 400; }
.session { margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.session > :last-child { margin-bottom: 0; }
.session h3 { margin: 0 0 .5rem; }
.session h3 .hint { font-weight: 400; margin-left: .4rem; }
/* the quiz between two class sessions: one centered pill on a dashed line */
.quizgap { display: flex; align-items: center; gap: .7rem; margin: -.35rem 0 .65rem; font-size: .88rem; color: var(--muted); }
.quizgap::before, .quizgap::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }
.quizgap a { padding: .25rem .8rem; border: 1px solid var(--accent); border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.quizgap a:hover { background: var(--accent); color: var(--accent-text); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem; }
.features > div { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 1rem 1.2rem; }
.features h3 { margin-top: 0; }

/* study pages */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2rem 2.5rem; max-width: 820px; margin: 0 auto; line-height: 1.7; }
.doc h1 { font-size: 2rem; }
.doc h2 { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.doc h2, .doc h3 { scroll-margin-top: 72px; }
.doc p { max-width: 70ch; }
.doc .lead { font-size: 1.15rem; color: var(--muted); border-left: 4px solid var(--accent); padding-left: 1rem; }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li { margin: .4rem 0; }
.doc li::marker { color: var(--accent); }
.doc dt { font-weight: 600; margin-top: .8rem; }
.doc dd { margin: 0 0 .3rem 1.2rem; }
.doc table { font-size: .95rem; }
.doc tbody tr:nth-child(even) td { background: var(--bg); }
.doc .tablewrap { overflow-x: auto; margin: .9rem 0; }
.doc pre.code { white-space: pre-wrap; overflow-wrap: anywhere; }
.doc .tablewrap table { margin: 0; }
/* spelled-out acronym names (tools/acronyms.py): a marker-pen highlight that's easy to spot while scrolling */
.doc .full { background: color-mix(in srgb, #ffd23f 45%, transparent); color: var(--text); font-weight: 600; padding: 0 .08em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.doc .key { background: var(--ok-bg); border-left: 4px solid var(--ok); padding: 1rem 1.2rem; border-radius: 8px; margin: 2rem 0; }
.doc .toc { background: var(--code); border-radius: 10px; padding: .7rem 1.1rem; margin: 1.2rem 0 .5rem; }
.doc .toc summary { cursor: pointer; font-weight: 600; }
.doc .toc ol { columns: 2 230px; column-gap: 2rem; margin: .5rem 0 .2rem; font-size: .95rem; line-height: 1.45; }
.doc .toc li { margin: .3rem 0; break-inside: avoid; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
/* figures are drawn on white (tools/figures.py) so they read the same in light and dark mode */
.fig { margin: 1.75rem auto; max-width: 560px; }
.fig svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fig text { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.chartmap { margin: 1.5rem 0; }
.chartmap .zoom { margin-bottom: .5rem; }
.chartwrap { overflow: auto; max-height: 80vh; border: 1px solid var(--line); border-radius: 10px; }
.chartbox { position: relative; min-width: 640px; }
.chartmap.zoomed .chartbox { width: 1925px; }
.chartbox img { display: block; width: 100%; height: auto; }
.spot { position: absolute; width: 30px; height: 30px; min-height: 0; margin: -15px 0 0 -15px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.spotnum { display: grid; place-items: center; width: 22px; height: 22px; margin: 4px; border-radius: 50%; background: #c62828; border: 2px solid #fff; color: #fff; font: 700 12px/1 system-ui, sans-serif; }
.spot:hover, .spot:focus-visible, .spot.open { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c62828; }
.spottip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 230px; padding: .45rem .6rem; border-radius: 8px; background: #16202e; color: #fff; font-size: .85rem; line-height: 1.35; text-align: left; pointer-events: none; z-index: 2; }
.spottip b { display: block; }
.spot.below .spottip { bottom: auto; top: calc(100% + 8px); }
.spot.east .spottip { left: 0; transform: none; }
.spot.west .spottip { left: auto; right: 0; transform: none; }
.spot:hover .spottip, .spot:focus-visible .spottip { display: block; }
.spot.open .spottip { display: none; }
.spotcard { position: absolute; width: min(340px, 80%); max-height: 70%; overflow: auto; padding: .8rem 1rem; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0, 0, 0, .3); font-size: .92rem; line-height: 1.5; z-index: 3; }
.spotcard h3 { margin: 0 1.6rem .4rem 0; font-size: 1rem; }
.spotcard p { margin: .4rem 0; }
.spotcard .x { position: absolute; top: .3rem; right: .3rem; min-height: 0; padding: .1rem .5rem; font-size: 1.2rem; line-height: 1; }
.chartkey li { margin-bottom: .6rem; }
.chartkey .tip { color: var(--muted); }
.chartkey button.link { display: inline; padding: 0 .3rem; color: var(--accent); text-decoration: underline; font-size: .9rem; }
.chartkey p { margin: .25rem 0; }
@media (max-width: 640px) { .spotcard { position: fixed; left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important; z-index: 20; width: auto; max-height: 55vh; } }
@media print { .chartmap .zoom, .chartkey button.link { display: none; } .chartmap { break-inside: avoid; } .chartwrap { overflow: visible; max-height: none; } .chartbox { min-width: 0; } }
.fig.photo img { display: block; width: 100%; height: auto; border-radius: 10px; }
/* state vs federal labels (module 17 and its slides) */
.law { display: inline-block; padding: .05em .55em; border-radius: 999px; font-size: .72em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; vertical-align: .15em; color: #fff; }
.law.fed { background: #1f6feb; }
.law.tx { background: #b31942; }
.fig figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: .5rem; line-height: 1.45; }
.doc .src { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 2rem; }
.doc .cols { columns: 2 260px; }
.doc .lib li { margin: .6rem 0; }
.doc table.phon td { border: none; padding: .2rem .4rem; }
.modnav { max-width: 820px; margin: 1rem auto; display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }

/* no-fly map */
.mapage { max-width: 1200px; margin: 0 auto; }
.mapwrap { display: grid; grid-template-columns: 1fr 290px; gap: 1rem; align-items: start; }
#map { height: 72vh; min-height: 420px; border-radius: 12px; border: 1px solid var(--line); background: #dfe7ef; }
.maplegend { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .5rem 1rem 1rem; }
.maplegend h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1rem 0 .3rem; }
.maplegend .row { margin: .5rem 0 0; }
.maplegend .zone { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .92rem; cursor: pointer; }
.maplegend .zone .hint { margin-left: auto; }
.sw { width: 16px; height: 16px; border-radius: 4px; flex: none; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.z-security { --c: #c62828; }
.z-nps { --c: #c62828; }
.z-nwr { --c: #c62828; }
.z-restricted { --c: #c62828; }
.z-class { --c: #e8590c; }
.z-park { --c: #8e1d4f; }
.z-infra { --c: #5c3d99; }
.z-airport { --c: #1f6feb; }
.z-military-low { --c: #d4a017; }
.z-stadium { --c: #d4a017; }
.z-launch { --c: #d4a017; }
.z-mtr { --c: #7c3aed; }
.z-military-high { --c: #7d8590; }
.leaflet-popup-content { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: #16202e; }
.leaflet-popup-content .law { font-size: 10px; }
@media (max-width: 800px) {
  .mapwrap { grid-template-columns: 1fr; }
  #map { height: 62vh; }
}

/* test */
.runner { max-width: 820px; margin: 0 auto; }
.runbar { display: flex; align-items: center; gap: 1rem; position: sticky; top: 58px; background: var(--bg); padding: .5rem 0; z-index: 4; }
.clock { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.clock.low { color: var(--bad); font-weight: 700; }
.question { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.qtext { font-size: 1.1rem; font-weight: 500; margin-top: 0; }
.qfig img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.qfig + .hint { margin-top: .3rem; }
.choice { display: flex; justify-content: flex-start; text-align: left; width: 100%; margin: .45rem 0; padding: .75rem 1rem; }
.choice b { margin-right: .4rem; }
.choice.sel { border: 2px solid var(--accent); background: var(--code); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .3rem; margin: 1rem 0; }
.grid button { min-height: 36px; padding: 0; font-size: .85rem; }
.grid .ans { background: var(--code); }
.grid .cur { border: 2px solid var(--accent); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--code); }
.badge.pass { background: var(--ok-bg); color: var(--ok); }
.badge.fail { background: var(--bad-bg); color: var(--bad); }
.score { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.score .big { font-size: 2.6rem; font-weight: 700; margin-right: .8rem; }
.score.pass { border-color: var(--ok); }
.score.fail { border-color: var(--bad); }
.codes code { display: inline-block; margin: .15rem; }
.acs-key { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .4rem 0 1.1rem; }
.acs-key div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .6rem .4rem; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--c); }
.acs-key div:nth-child(1) { --c: #8a94a6; }
.acs-key div:nth-child(2) { --c: #1f6feb; }
.acs-key div:nth-child(3) { --c: #b5179e; }
.acs-key div:nth-child(4) { --c: #e3a008; }
.acs-key code { font-size: 1.25rem; font-weight: 700; background: none; color: var(--c); padding: 0; }
.acs-key b { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.acs-key span { font-size: .85rem; color: var(--muted); line-height: 1.3; }
@media (max-width: 640px) { .acs-key { grid-template-columns: 1fr 1fr; } }
.acs { list-style: none; padding: 0; display: grid; gap: .6rem; }
.acs li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 8px; padding: .6rem .9rem; }
.acs .codes { margin: .3rem 0 0; }
.review { padding-left: 1.5rem; }
.review > li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; padding: .8rem 1rem; margin: .8rem 0; }
.review > li.wrong { border-left-color: var(--bad); }
.review.missed-only > li.right { display: none; }
.review ul { list-style: none; padding: 0; }
.review ul li { padding: .3rem .5rem; border-radius: 6px; }
.review li.correct { background: var(--ok-bg); }
.review li.picked { background: var(--bad-bg); }
.review li span { font-size: .85rem; font-weight: 600; }
.review .why { margin-bottom: .2rem; }
.review .ref { color: var(--muted); font-size: .88rem; margin: 0; }
.results td:last-child { width: 1%; white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.card h3 { margin-top: 0; }

/* enroll / auth / admin */
.price { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; overflow: hidden; }
.price ul { list-style: none; padding: 0; }
.price li { position: relative; padding-left: 1.8rem; margin: .45rem 0; }
.price li::before { content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; background: var(--ok); }
.binder { border: 1px solid var(--line); border-radius: 10px; padding: .6rem 1rem .8rem; margin: 1rem 0; }
.binder legend { font-weight: 700; padding: 0 .3rem; }
.binder label { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .2rem; cursor: pointer; }
.binder input { width: auto; }
#binders .shipto { white-space: pre-line; }
.price .banner { display: block; width: calc(100% + 3rem); margin: -1.5rem -1.5rem 1.25rem; height: 200px; object-fit: cover; }
.price .big { font-size: 2.4rem; font-weight: 700; }
.price .was { font-size: 1.3rem; font-weight: 600; color: var(--muted); }
.price .sale { margin: .2rem 0 .4rem; font-weight: 700; color: var(--accent); }
.notice { background: var(--code); padding: .75rem 1rem; border-radius: 6px; }
.auth form { display: grid; gap: .8rem; max-width: 420px; }
.auth label { display: grid; gap: .25rem; }
.auth label.check { display: flex; gap: .5rem; align-items: center; }
.mailform { display: grid; gap: .8rem; max-width: 640px; }
.mailform label { display: grid; gap: .25rem; }
.extras { max-width: 820px; margin: 0 auto 1rem; }
video.lesson { display: block; width: 100%; border-radius: 10px; background: #000; margin-bottom: .75rem; }
.scroll { overflow-x: auto; }
.admin td, .admin th { font-size: .9rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 8px; z-index: 20; max-width: calc(100% - 32px); }

@media (max-width: 640px) {
  /* study pages: full width, and tables with headers become one card per row, each cell labeled (see readable() in app.js) */
  .doc { padding: 1.25rem 1rem; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .doc h1 { font-size: 1.6rem; }
  .doc h2 { font-size: 1.25rem; margin-top: 2rem; }
  .doc .lead { font-size: 1.05rem; }
  .doc table.stack, .doc table.stack tbody, .doc table.stack tr, .doc table.stack td { display: block; width: 100%; }
  .doc table.stack { background: none; }
  .doc table.stack thead { display: none; }
  .doc table.stack tr { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: .6rem 0; overflow: hidden; }
  .doc table.stack td, .doc table.stack tbody tr:nth-child(even) td { border: 0; border-top: 1px solid var(--line); padding: .5rem .8rem; background: none; }
  .doc table.stack td:first-child { border-top: 0; background: var(--code); font-weight: 600; }
  .doc table.stack td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .fig { margin: 1.4rem 0; }
  .photos figure { aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 2rem 1.25rem 1.5rem; min-height: 400px; }
  .hero h1 { font-size: 1.8rem; }
  .runbar { top: 0; flex-wrap: wrap; }
}

/* class slides: projector theme, independent of the site's light/dark mode */
body.deck-mode { background: #0d1117; overflow: hidden; }
body.deck-mode .top, body.deck-mode .foot { display: none; }
body.deck-mode main { max-width: none; padding: 0; }
.deck { height: 100vh; display: grid; place-items: center; }
.stage { width: min(100vw, calc((100vh - 56px) * 16 / 9)); aspect-ratio: 16 / 9; container-type: inline-size; background: #fff; overflow: hidden; }
.stage { position: relative; }
.stage .slide {
  --blue: #1f6feb; --navy: #0b3d91; --ink: #16202e;
  position: relative; width: 100%; height: 100%; padding: 4.2cqw 6cqw 6cqw 7cqw; display: flex; flex-direction: column; justify-content: center;
  color: var(--ink); font-size: 2.3cqw; line-height: 1.45; background: radial-gradient(circle at 100% 0, #e3edff 0, #fff 42%);
}
.stage .slide::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .9cqw; background: linear-gradient(var(--blue), var(--navy)); }
.stage .slide h1 { font-size: 5cqw; margin: 0 0 1.5cqw; line-height: 1.1; }
.stage .slide h2 { font-size: 3.6cqw; margin: 0 0 2.2cqw; padding-bottom: 1cqw; color: var(--navy);
  background: linear-gradient(90deg, var(--blue), #8db8ff) left bottom / 9cqw .5cqw no-repeat; }
.stage .slide h3 { font-size: 2.5cqw; margin: 1.2cqw 0 .8cqw; color: var(--blue); }
.stage .slide p { margin: .8cqw 0; }
.stage .slide ul { list-style: none; margin: 0; padding: 0; }
.stage .slide ul > li { position: relative; margin: .7cqw 0; padding-left: 2.8cqw; }
.stage .slide ul > li::before { content: ""; position: absolute; left: .35cqw; top: .72em; width: 1.05cqw; height: 1.05cqw; border-radius: .25cqw;
  background: var(--blue); transform: translateY(-50%) rotate(45deg); }
.stage .slide:not(.quiz) ol { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.stage .slide:not(.quiz) ol > li { counter-increment: n; position: relative; margin: .8cqw 0; padding-left: 4cqw; }
.stage .slide:not(.quiz) ol > li::before { content: counter(n); position: absolute; left: 0; top: .1em; width: 2.7cqw; height: 2.7cqw; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5cqw; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--blue), var(--navy)); }
.stage .slide table { font-size: 1.9cqw; background: #fff; border-collapse: separate; border-spacing: 0; border: .15cqw solid #c9d6ea; border-radius: 1.2cqw; overflow: hidden;
  box-shadow: 0 .6cqw 1.8cqw rgba(11, 61, 145, .08); }
.stage .slide th, .stage .slide td { border: 0; border-bottom: .12cqw solid #e3e9f2; padding: .7cqw 1.2cqw; }
.stage .slide tr:last-child td { border-bottom: 0; }
.stage .slide th { background: var(--navy); color: #fff; }
.stage .slide tbody tr:nth-child(even) td { background: #f4f7fc; }
.stage .slide code { background: #eef1f5; color: var(--ink); }
.stage .slide a { color: var(--blue); }
.stage .slide .kicker { text-transform: uppercase; letter-spacing: .15em; color: #5d6676; font-size: 1.6cqw; font-weight: 600; }
.stage .slide .big { font-size: 6cqw; font-weight: 800; color: var(--blue); line-height: 1.1; }
.stage .slide td.big { font-size: 3cqw; }
.stage .slide .two { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; align-items: start; }
.stage .slide .two > div { background: rgba(255, 255, 255, .8); border: .15cqw solid #dbe5f4; border-radius: 1.2cqw; padding: 1.4cqw 1.8cqw; }
.stage .slide .two > div > h3:first-child { margin-top: 0; }
.stage .slide .two > svg { border-radius: 1.2cqw; box-shadow: 0 .6cqw 1.8cqw rgba(11, 61, 145, .12); }
.stage .slide .callout { background: #e9f6ed; border-left: .7cqw solid #1a7f37; padding: 1.2cqw 1.8cqw; border-radius: 1cqw; box-shadow: 0 .4cqw 1.2cqw rgba(26, 127, 55, .1); }
.stage .slide .warn { background: #fdeceb; border-left-color: #c62828; box-shadow: 0 .4cqw 1.2cqw rgba(198, 40, 40, .1); }
.stage .slide .muted { color: #5d6676; }
.stage .slide .red { color: #c62828; }
.stage .slide .green { color: #1a7f37; }
.stage .slide svg { width: 100%; height: auto; max-height: 30cqw; }
/* title slides: a drone photo behind the text (class photo-<name>, set by tools/figures.py) */
.stage .slide.title { --shade: linear-gradient(90deg, rgba(6, 18, 42, .92) 0%, rgba(6, 18, 42, .7) 48%, rgba(6, 18, 42, .15) 100%);
  justify-content: flex-end; padding-bottom: 7cqw; color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue)) center / cover; }
.stage .slide.title[class*="photo-"] { background-size: cover; background-position: center; }
.stage .slide.title::before { width: 100%; height: .9cqw; bottom: auto; background: linear-gradient(90deg, var(--blue), #8db8ff); }
.stage .slide.title h1 { color: #fff; font-size: 5.6cqw; max-width: 72%; text-shadow: 0 .3cqw 1.4cqw rgba(0, 0, 0, .45); }
.stage .slide.title p { color: #dbe7ff; font-size: 2.4cqw; max-width: 62%; }
.stage .slide.title .kicker { align-self: flex-start; color: #fff; font-size: 1.5cqw; padding: .5cqw 1.6cqw; border-radius: 99cqw;
  background: rgba(255, 255, 255, .15); border: .15cqw solid rgba(255, 255, 255, .4); }
.stage .slide.title.photo-tx-fishing { background-image: var(--shade), url("img/tx-fishing.jpg"); }
.stage .slide.title.photo-pumpjack { background-image: var(--shade), url("img/pumpjack.jpg"); }
.stage .slide.title.photo-realestate { background-image: var(--shade), url("img/realestate.jpg"); }
.stage .slide.title.photo-pilot { background-image: var(--shade), url("img/pilot.jpg"); }
.stage .slide.title.photo-rancher { background-image: var(--shade), url("img/rancher.jpg"); }
.stage .slide.title.photo-observer { background-image: var(--shade), url("img/observer.jpg"); }
.stage .slide.title.photo-hero-1 { background-image: var(--shade), url("img/hero-1.jpg"); }
.stage .slide.title.photo-hero-2 { background-image: var(--shade), url("img/hero-2.jpg"); }
.stage .slide.title.photo-hero-3 { background-image: var(--shade), url("img/hero-3.jpg"); }
.stage .slide.title.photo-hero-4 { background-image: var(--shade), url("img/hero-4.jpg"); }
.stage .slide.title.photo-hero-5 { background-image: var(--shade), url("img/hero-5.jpg"); }
.stage .slide.title.photo-field { background-image: var(--shade), url("img/field.jpg"); }
.stage .slide.title.photo-aerial { background-image: var(--shade), url("img/aerial.jpg"); }
.stage .slide.title.photo-mountain { background-image: var(--shade), url("img/mountain.jpg"); }
.stage .slide.title.photo-controller { background-image: var(--shade), url("img/controller.jpg"); }
.stage .slide.title.photo-case { background-image: var(--shade), url("img/case.jpg"); }
.stage .slide.title.photo-crew { background-image: var(--shade), url("img/crew.jpg"); }
.stage .slide.title.photo-inspect { background-image: var(--shade), url("img/inspect.jpg"); }
.stage .slide.title.photo-preflight { background-image: var(--shade), url("img/preflight.jpg"); }
/* photo panel on text-only slides (class pic pic-<name>, chosen by topic in tools/figures.py) */
.stage .slide.pic { padding-right: 39cqw; font-size: 2.15cqw; }
.stage .slide.pic::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 35cqw; background: center / cover no-repeat;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.stage .slide.pic-controller::after { background-image: url("img/controller.jpg"); }
.stage .slide.pic-observer::after { background-image: url("img/observer.jpg"); }
.stage .slide.pic-inspect::after { background-image: url("img/inspect.jpg"); }
.stage .slide.pic-preflight::after { background-image: url("img/preflight.jpg"); }
.stage .slide.pic-crew::after { background-image: url("img/crew.jpg"); }
.stage .slide.pic-case::after { background-image: url("img/case.jpg"); }
.stage .slide.pic-pilot::after { background-image: url("img/pilot.jpg"); }
.stage .slide.pic-rancher::after { background-image: url("img/rancher.jpg"); }
.stage .slide.pic-mountain::after { background-image: url("img/mountain.jpg"); }
.stage .slide.pic-aerial::after { background-image: url("img/aerial.jpg"); }
.stage .slide.pic-field::after { background-image: url("img/field.jpg"); }
.stage .slide.pic-hero-1::after { background-image: url("img/hero-1.jpg"); }
.stage .slide.pic-hero-2::after { background-image: url("img/hero-2.jpg"); }
.stage .slide.pic-hero-3::after { background-image: url("img/hero-3.jpg"); }
.stage .slide.pic-hero-4::after { background-image: url("img/hero-4.jpg"); }
.stage .slide.pic-hero-5::after { background-image: url("img/hero-5.jpg"); }
.stage .slide.pic-hands::after { background-image: url("img/hands.jpg"); }
.stage .slide.pic-hover::after { background-image: url("img/hover.jpg"); }
.stage .slide.pic-hover2::after { background-image: url("img/hover2.jpg"); }
.stage .slide.pic-pad::after { background-image: url("img/pad.jpg"); }
.stage .slide.pic-quad-field::after { background-image: url("img/quad-field.jpg"); }
.stage .slide.pic-sun::after { background-image: url("img/sun.jpg"); }
.stage .slide.pic-launch::after { background-image: url("img/launch.jpg"); }
.stage .slide.pic-launch2::after { background-image: url("img/launch2.jpg"); }
.stage .slide.pic-station::after { background-image: url("img/station.jpg"); }
.stage .slide.pic-laptop::after { background-image: url("img/laptop.jpg"); }
.stage .slide.pic-tent::after { background-image: url("img/tent.jpg"); }
.stage .slide.pic-desert::after { background-image: url("img/desert.jpg"); }
.stage .slide.pic-bay::after { background-image: url("img/bay.jpg"); }
.stage .slide.pic-crew2::after { background-image: url("img/crew2.jpg"); }
.stage .slide.pic-aerial2::after { background-image: url("img/aerial2.jpg"); }
.stage .slide.pic-tx-fishing::after { background-image: url("img/tx-fishing.jpg"); }
.stage .slide.pic-surf::after { background-image: url("img/surf.jpg"); }
.stage .slide.pic-hog::after { background-image: url("img/hog.jpg"); }
.stage .slide.pic-heli-hog::after { background-image: url("img/heli-hog.jpg"); }
.stage .slide.pic-night-hog::after { background-image: url("img/night-hog.jpg"); }
.stage .slide.pic-pumpjack::after { background-image: url("img/pumpjack.jpg"); }
.stage .slide.pic-enterprise::after { background-image: url("img/enterprise.jpg"); }
.stage .slide.pic-thermal-hogs::after { background-image: url("img/thermal-hogs.jpg"); }
.stage .slide.pic-realestate::after { background-image: url("img/realestate.jpg"); }
.stage .slide.pic-roof::after { background-image: url("img/roof.jpg"); }
.stage .slide.pic + .sfoot { right: 37cqw; }
/* check-yourself slides: answer choices as cards */
.stage .slide.quiz { background: radial-gradient(circle at 100% 0, #dff3e5 0, #fff 45%); }
.stage .slide.quiz::before { background: linear-gradient(#2ea043, #1a7f37); }
.stage .slide.quiz h2 { color: #1a7f37; background-image: linear-gradient(90deg, #2ea043, #9be3ad); }
.stage .slide.quiz .q { font-size: 2.8cqw; font-weight: 600; }
.stage .slide.quiz ol { list-style: none; margin: .5cqw 0 0; padding: 0; counter-reset: c; display: grid; gap: 1cqw; }
.stage .slide.quiz ol > li { counter-increment: c; position: relative; margin: 0; padding: 1cqw 1.6cqw 1cqw 5.2cqw; background: #fff; border: .15cqw solid #cfe3d5; border-radius: 1.2cqw; }
.stage .slide.quiz ol > li::before { content: counter(c, upper-alpha); position: absolute; left: 1.4cqw; top: 50%; transform: translateY(-50%); width: 2.7cqw; height: 2.7cqw;
  border-radius: 50%; display: grid; place-items: center; font-size: 1.5cqw; font-weight: 700; color: #fff; background: #1a7f37; }
.stage .slide .answer { background: #1a7f37; color: #fff; padding: 1.2cqw 1.8cqw; border-radius: 1.2cqw; margin-top: 1.6cqw; }
.stage .slide .answer strong { color: #fff; }
/* the "Remember" recap at the end of a deck */
.stage .slide.recap { color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue)); }
.stage .slide.recap::before { background: #8db8ff; }
.stage .slide.recap h2 { color: #fff; background-image: linear-gradient(90deg, #fff, #8db8ff); }
.stage .slide.recap ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqw 2.4cqw; }
.stage .slide.recap ul > li { margin: 0; padding: 1.1cqw 1.6cqw 1.1cqw 4cqw; border-radius: 1.2cqw; background: rgba(255, 255, 255, .13); border: .15cqw solid rgba(255, 255, 255, .25); }
.stage .slide.recap ul > li::before { left: 1.6cqw; top: calc(1.1cqw + .72em); background: #8db8ff; }
/* diagram slides (tools/figures.py) */
.stage .slide.figure { align-items: center; }
.stage .slide.figure h2 { align-self: stretch; }
.stage .slide.figure svg { width: auto; max-width: 100%; max-height: 36cqw; border-radius: 1.2cqw; box-shadow: 0 .8cqw 2.4cqw rgba(11, 61, 145, .16); }
.stage .sfoot { position: absolute; left: 7cqw; right: 3cqw; bottom: 1.8cqw; display: flex; justify-content: space-between; font-size: 1.2cqw; color: #8a94a6; pointer-events: none; }
.stage .sfoot b { font-weight: 600; color: var(--muted, #5d6676); }
.stage .slide.title + .sfoot { display: none; }
.stage .slide.recap + .sfoot, .stage .slide.recap + .sfoot b { color: rgba(255, 255, 255, .75); }
.stage .full { font-weight: 600; }
/* speaker notes: the acronyms on the slide, so the presenter never gets caught out */
.open { font-size: 1.05em; }
.open b, .next b, .ans b { color: #8db8ff; }
.tp { margin: .4rem 0 .8rem; padding-left: 1.3rem; }
.tp li { margin: .3rem 0; }
.ans { padding: .5rem .8rem; border-radius: 8px; background: rgba(46, 160, 67, .15); border-left: 3px solid #2ea043; }
.ans b { color: #4cc26a; }
.next { margin-top: .9rem; padding: .5rem .8rem; border-radius: 8px; background: rgba(77, 141, 255, .12); border-left: 3px solid #4c8dff; }
.acr { margin-top: .9rem; padding: .6rem .8rem; border-radius: 8px; background: rgba(255, 210, 63, .12); border-left: 3px solid #ffd23f; font-size: .92em; line-height: 1.6; }
.acr b { color: #ffd23f; }
.stage .reveal { visibility: hidden; }
.stage .reveal.shown { visibility: visible; }
.stage .notes { display: none; }
.deckbar { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: .4rem; align-items: center; background: rgba(13,17,23,.85); padding: .3rem .5rem; border-radius: 10px; color: #e7eaf0; opacity: .25; transition: opacity .2s; z-index: 6; }
.deckbar:hover { opacity: 1; }
.deckbar button, .deckbar .btn { background: #1b1f27; color: #e7eaf0; border-color: #2d333d; min-height: 34px; padding: .2rem .7rem; font-size: .9rem; }
.notes-panel { position: fixed; left: 0; right: 0; bottom: 56px; max-height: 35vh; overflow: auto; background: #1b1f27; color: #e7eaf0; padding: 1rem 1.5rem; font-size: 1.05rem; z-index: 5; }
.presenter { height: 100vh; display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: auto 1fr; gap: 12px; padding: 12px 12px 56px; color: #e7eaf0; }
.presenter .stage { width: 100%; }
.pside .hint { color: #9aa3b2; margin: .6rem 0 .3rem; }
.pclock { display: flex; gap: 1rem; align-items: center; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.pclock button { background: #1b1f27; color: #e7eaf0; border-color: #2d333d; min-height: 32px; font-size: .85rem; }
.pnotes { grid-column: 1 / -1; overflow: auto; background: #1b1f27; border-radius: 8px; padding: 1rem 1.4rem; font-size: 1.25rem; line-height: 1.5; }
@media (max-width: 800px) { .presenter { grid-template-columns: 1fr; } }

/* Everyone but the admin reads online only: no right-click save or drag-out of pictures and diagrams, and nothing to print. */
.nosave .doc img, .nosave .doc svg, .nosave .stage img, .nosave .stage svg { pointer-events: none; -webkit-user-drag: none; user-select: none; }
@media print { .nosave main { display: none; } .nosave::after { content: "The course is read online. Printed copies come in the course binder."; } }

/* release number in the bottom-right corner, filled in at build time */
.app-version { position: fixed; right: 6px; bottom: 4px; z-index: 2147483647; font: 11px/1.4 system-ui, sans-serif; color: #888; opacity: .8; pointer-events: none; user-select: none; }
@media print { .app-version { display: none; } }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.4rem 0 .8rem; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.2rem 1.1rem; }
.plan.ours { border: 2px solid var(--accent); box-shadow: 0 8px 28px rgba(31, 111, 235, .18); }
.plan .tag { position: absolute; top: -.75rem; left: 1rem; background: var(--accent); color: var(--accent-text); font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 1.05rem; }
.plan .sub { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.plan .amount { font-size: 2.1rem; font-weight: 800; margin: .5rem 0 .3rem; }
.plan dl { margin: 0; }
.plan dt { margin-top: .8rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.plan dd { margin: .15rem 0 0; }
.plan.ours dd::before { content: "\2713\00a0 "; color: var(--ok); font-weight: 700; }
.quizcards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
