/* app.css: how Sortie looks.

   THEMES. The three themes are the old app's own, with their names and colour values (Bill, 2026-11-26):
     blue  = Aviation Blue (everyday)     dark = Dark Cockpit (dusk and dark)     field = Field Mode (bright sun)
   The theme is the data-theme word on the <html> tag. Every colour in the app comes from the names below,
   so changing a theme never means touching a screen.

   ONE RULE: green, amber and red (--go, --caution, --nogo) belong to the flight verdict and to nothing else. */

:root, :root[data-theme="blue"] {
  --bg: #f2f6fb; --surface: #ffffff; --surface-2: #eaf1f8; --line: #d3deeb; --ink: #12263f; --muted: #5b6f86;
  --accent: #1d5aa6; --btn: #1d5aa6; --btn-ink: #ffffff; --bar: #1d5aa6; --bar-ink: #ffffff; --bar-line: #1d5aa6; --dot: #12263f;
  --go: #1d7a45; --go-bg: #e1f1e6; --caution: #8f5a00; --caution-bg: #fbefd6; --nogo: #b3261e; --nogo-bg: #f8e0dc;
  --display: "Red Hat Display", "Segoe UI", system-ui, sans-serif; --text: "Red Hat Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d141c; --surface: #16212d; --surface-2: #1e2d3d; --line: #2a3c50; --ink: #eef4fa; --muted: #9db0c3;
  --accent: #6fa7ee; --btn: #2a72d4; --btn-ink: #ffffff; --bar: #0d141c; --bar-ink: #eef4fa; --bar-line: #2a3c50; --dot: #6fa7ee;
  --go: #5fcb8d; --go-bg: #13301f; --caution: #f0b54a; --caution-bg: #3a2b10; --nogo: #ff7d70; --nogo-bg: #3f1714;
  color-scheme: dark;
}
:root[data-theme="field"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --line: #000000; --ink: #000000; --muted: #000000;
  --accent: #002a5c; --btn: #002a5c; --btn-ink: #ffffff; --bar: #ffffff; --bar-ink: #000000; --bar-line: #000000; --dot: #002a5c;
  --go: #006400; --go-bg: #ffffff; --caution: #5c3b00; --caution-bg: #ffb000; --nogo: #c00000; --nogo-bg: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.boot { padding: 24px; color: var(--muted); }

/* ---- the frame: bar on top, the screen in the middle, the menu along the bottom (phone) or down the left (tablet) ---- */
.app { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line);
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); min-height: 52px; }
.bar h1 { font: 700 19px/1.1 var(--display); margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bar .back { border: 0; background: transparent; color: inherit; text-decoration: none; font-size: 26px; line-height: 1; padding: 0 8px 4px 0; min-height: 44px; cursor: pointer; }
.emergency { font: 700 13px var(--text); text-decoration: none; display: inline-grid; place-items: center; color: #ffffff; background: #b3261e; border: 0; border-radius: 8px; padding: 8px 12px; min-height: 40px; cursor: pointer; }
.body { overflow-y: auto; padding: 14px max(14px, env(safe-area-inset-right, 0px)) 24px max(14px, env(safe-area-inset-left, 0px)); }
.col { display: grid; gap: 12px; max-width: 720px; margin: 0 auto; align-content: start; }
.col.wide { max-width: 860px; }                /* the survey report: room for a whole letter-size sheet */
.nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav a { color: var(--muted); font: 600 12px var(--text); text-decoration: none; padding: 8px 2px 10px; min-height: 54px; display: grid; gap: 4px; justify-items: center; align-content: center; }
/* Build 51: five places, each a small picture above its word. The pictures are line drawings in the link's own colour. */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar-end { display: flex; align-items: center; gap: 8px; flex: none; }
.gear, .gear:visited { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--bar-ink); text-decoration: none; }
.gear[aria-current="page"] { background: rgba(255, 255, 255, 0.18); }
.nav a[aria-current="page"] { color: var(--accent); }

.split { display: grid; gap: 12px; }             /* two columns on a tablet, one under the other on a phone */
.side { display: none; }
.bar .wide-only { display: none; }
/* Build 44: the menu moves to the side from 700px, so an iPad held upright (744 to 834 wide) has the side menu like an
   iPad on its side. It was 900px, which gave an upright iPad the phone's bottom menu (Bill: "no bottom menu keep the
   side menu unless this is just phone"). Phones, upright, keep the bottom menu. */
@media (min-width: 700px) {                      /* an iPad and wider: the menu moves to the left and stays there */
  .app { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .nav { display: none; }
  .bar .logo { display: none; }
  .bar .wide-only { display: inline; }
  .side { display: grid; align-content: start; gap: 2px; grid-row: 1 / span 2; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 10px; overflow-y: auto; }
  .side .brand { padding: 0 10px 14px; }
  .side .group { font: 600 11px var(--text); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 3px; }
  .side a { color: var(--ink); text-decoration: none; font: 500 15px var(--text); padding: 9px 10px; border-radius: 8px; min-height: 40px; }
  .side a[aria-current="page"] { background: var(--surface-2); color: var(--accent); font-weight: 600; }
}
@media (min-width: 900px) {                      /* wider still (an iPad on its side): room for two columns */
  .col { max-width: 860px; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
}

/* ---- the logo: the word in Red Hat Display, with the dot of the i in the accent colour ---- */
.logo { font: 700 24px/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; display: inline-block; }
.logo .i { position: relative; display: inline-block; }
.logo .i::after { content: ""; position: absolute; left: calc(50% + 0.005em); top: 0.125em; width: 0.146em; height: 0.146em; border-radius: 50%; background: var(--dot); transform: translateX(-50%); }
.side .logo .i::after { background: var(--accent); }

/* ---- pieces the screens are built from ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.card.flush { padding: 0; gap: 0; }
.center { text-align: center; }
.card h2 { font: 700 17px/1.25 var(--display); margin: 0; }
.label { font: 600 12px var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.strong { margin: 0; font-weight: 600; }
.muted { margin: 0; color: var(--muted); font-size: 14px; }
p { margin: 0; }
.btn { font: 600 16px var(--text); border-radius: 10px; min-height: 48px; padding: 10px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-grid; place-items: center; }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); font-weight: 700; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.wide { width: 100%; }
.btn.land { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a, .list .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; color: var(--ink); text-decoration: none; }
.list small { display: block; color: var(--muted); font-size: 13.5px; }
.pill { font: 700 12px var(--text); letter-spacing: 0.04em; text-transform: uppercase; border-radius: 6px; padding: 3px 8px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); flex: none; }
.pill.go { background: var(--go-bg); color: var(--go); border-color: var(--go); }
.pill.caution { background: var(--caution-bg); color: var(--caution); border-color: var(--caution); }
.pill.nogo { background: var(--nogo-bg); color: var(--nogo); border-color: var(--nogo); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font: 700 22px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.verdict { display: grid; gap: 4px; border-radius: 12px; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.verdict b { font: 700 18px var(--display); }
.verdict.go { border-color: var(--go); background: var(--go-bg); }
.verdict.caution { border-color: var(--caution); background: var(--caution-bg); }
.verdict.nogo { border-color: var(--nogo); background: var(--nogo-bg); }
.verdict b.also { font-size: 15px; margin-top: 8px; }
.field { display: grid; gap: 5px; }
.field span { font-weight: 600; font-size: 14px; }
.field input, .field select { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 48px; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 15px var(--text); border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); font-weight: 600; }
.job { display: grid; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; }
.job .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--go); }
.meter.caution i { background: var(--caution); }
.meter.nogo i { background: var(--nogo); }
.timer { font: 700 64px/1 var(--display); text-align: center; padding: 16px 0 6px; font-variant-numeric: tabular-nums; }
.note { font-size: 13.5px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 14px; font-size: 15px; max-width: min(92vw, 480px); z-index: 20; }

/* ---- emergency procedures: big rows, the action in capitals ---- */
.em-list a { min-height: 60px; font-weight: 600; }
.em-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 8px; }
.em-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 52px; position: relative; display: grid; gap: 4px; }
.em-steps li::before { content: counter(step); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 14px var(--display); }
.em-c { font-size: 15px; }
.em-r { font: 700 17px/1.25 var(--display); letter-spacing: 0.01em; }
.em-steps .btn { justify-self: start; margin-top: 4px; }
/* Build 56: where you are, and who to call. The place is large enough to read out at arm's length. Warnings are marked in
   the page's own ink, never in the verdict's green, amber or red: a phone number is not a verdict. */
.em-place { margin: 0; font: 700 20px/1.25 var(--display); overflow-wrap: anywhere; }
.em-pos { margin: 0; font: 600 18px/1.3 var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.em-warn { margin: 4px 0 0; padding: 8px 10px; border-left: 4px solid var(--ink); background: var(--bg); border-radius: 4px; font-size: 15px; }
.em-head { margin-top: 6px; }
.em-places { margin: 0; padding-left: 20px; display: grid; gap: 6px; overflow-wrap: anywhere; }   /* 0.57.1: the places the map data showed, one line each */
.em-calls { display: grid; gap: 4px; }
.em-steps .em-calls .btn.call, .fold-body .btn.call, .card .btn.call { justify-self: stretch; white-space: normal; height: auto; min-height: 48px; }
.fold-body > p { margin: 0; }
/* Build 56: the procedures as pages to print (#emergency/print). On the screen, one box for each procedure. */
.em-print { display: grid; gap: 12px; }
.em-proc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; }
.em-proc h2 { font: 700 18px/1.2 var(--display); margin: 0; }
.em-proc ol, .em-proc ul { margin: 0; padding-left: 22px; display: grid; gap: 5px; }
.em-proc ul { list-style: none; padding-left: 0; }
.em-proc li b { font-family: var(--display); letter-spacing: 0.01em; }
.em-proc li small { display: block; color: var(--muted); font-size: 13px; }
/* On paper: black on white whatever the theme, each procedure whole on its page, with its own margin (the page itself
   has none: css/report.css sets that for the survey report's sheets). */
@media print {
  .no-print { display: none !important; }
  .em-print { display: block; }
  .em-print, .em-print * { color: #000000 !important; background: transparent !important; }
  .em-proc { border: 0; border-radius: 0; padding: 0.4in 0.65in 0; break-inside: avoid; font-size: 11.5pt; line-height: 1.35; }
  .em-proc h2 { font-size: 15pt; border-bottom: 1.5pt solid #000000; padding-bottom: 3pt; }
  .em-proc li small { font-size: 9.5pt; }
  .em-proc .muted, .em-proc .label { font-size: 9.5pt; }
}
details.specs summary { cursor: pointer; list-style: none; min-height: 28px; display: flex; align-items: center; justify-content: space-between; }
details.specs summary::after { content: "Show"; font-size: 13px; color: var(--accent); font-weight: 600; }
details.specs[open] summary::after { content: "Hide"; }
details.specs summary::-webkit-details-marker { display: none; }

/* ---- a teaching picture beside a survey point ---- */
.pic { display: grid; gap: 8px; justify-items: start; }
.pic svg.vz { justify-self: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

/* ---- the survey's point cards: one under another on a phone, two side by side on a wide tablet ---- */
.pts { display: grid; gap: 12px; }
.btn.call { justify-content: start; text-align: left; margin-top: 6px; }
@media (min-width: 1100px) {
  .col.survey { max-width: 1040px; }
  .pts { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ---- links: the theme's accent, not the browser's blue and purple; and Home's two columns fill their space ---- */
a, a:visited { color: var(--accent); }
.btn, .btn:visited, .list a, .list a:visited, .nav a:visited, .side a:visited { color: var(--ink); }
.btn.primary, .btn.primary:visited { color: var(--btn-ink); }
.btn.land, .btn.land:visited { color: var(--bg); }
.nav a, .nav a:visited { color: var(--muted); }
.nav a[aria-current="page"], .side a[aria-current="page"] { color: var(--accent); }
.emergency, .emergency:visited { color: #ffffff; }
.bar .back, .bar .back:visited { color: inherit; }
.split > .col { max-width: none; margin: 0; }

/* ---- six places in the phone's bottom menu: a little tighter so every word fits on a narrow phone ---- */
.nav a { font-size: 13px; padding-left: 0; padding-right: 0; gap: 2px; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---- Home's "Go to" tiles: every area one tap away ---- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile, .tile:visited { display: grid; place-items: center; text-align: center; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 15px var(--text); text-decoration: none; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .side a { min-height: 36px; padding: 7px 10px; } }

/* ---- the Rules screen, and the rule's number beside a survey point ---- */
.rule-group { display: grid; gap: 6px; }
.rule a b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.rule-note .item { min-height: 0; padding: 8px 14px; }
a.ref, a.ref:visited { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--accent); }

/* ---- the Map ---- */
.map { height: 58vh; min-height: 320px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); z-index: 0; }
.map-item { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.key.ring { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px dashed var(--accent); vertical-align: -3px; margin-right: 4px; }
a.chip, a.chip:visited { text-decoration: none; color: var(--ink); display: inline-grid; align-items: center; }
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { font-size: 14px; padding: 8px 6px; }
@media (min-width: 900px) { .map-split { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } .map { height: 70vh; } #map-list { max-height: 70vh; overflow-y: auto; } .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.spot-pin span { display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 3px solid #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.swatch { width: 16px; height: 16px; border-radius: 4px; flex: none; }
/* The map engine's own pieces (MapLibre, since 0.62.1): the app's letters, and a pop-up that reads the same in every theme. */
.map.maplibregl-map { font: inherit; }
.map .maplibregl-popup-content { color: #12263f; font-size: .9rem; line-height: 1.35; padding: 10px 30px 10px 12px; border-radius: 10px; }
.map .maplibregl-popup-close-button { width: 30px; height: 30px; font-size: 1.3rem; color: #12263f; }
.map .maplibregl-ctrl-attrib { font-size: 11px; line-height: 1.4; }
/* The site map (build 71): square on a phone, so there is room to work; wider than tall on a tablet. */
.map.site { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
@media (min-width: 700px) { .map.site { aspect-ratio: 4 / 3; max-height: 72vh; } }
/* A mark on the site map. The map's own taps pass through it, so a tap beside a mark still lands on the map. */
.site-mark { width: 32px; height: 32px; pointer-events: none; }
.site-mark svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.site-mark span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 11.5px/1.2 var(--text); color: #12263f; background: rgba(255,255,255,.88); border-radius: 4px; padding: 1px 5px; }
/* The picture kept of the map, with the marks drawn over it. The drawing gives the box its shape; the picture fills it. */
.mappic { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #eef2f6; }
.mappic img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mappic svg { position: relative; display: block; width: 100%; height: auto; }
.marklist { margin: 0; padding-left: 20px; display: grid; gap: 2px; font-size: .92rem; }

/* ---- Home's tiles are for the phone. A tablet has every area in its side menu, so the tiles are not shown there. ---- */
.tile { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
@media (min-width: 700px) { .tiles, .tiles-label { display: none; } }   /* wherever the side menu shows, it has every area */

/* ---- a survey point's note and source, behind one line ---- */
details.extra { display: grid; gap: 8px; }
details.extra > summary { cursor: pointer; list-style: none; color: var(--accent); font-weight: 600; font-size: 15px; min-height: 44px; display: flex; align-items: center; gap: 6px; }
details.extra > summary::-webkit-details-marker { display: none; }
details.extra > summary::before { content: "+"; font: 700 18px/1 var(--display); width: 18px; text-align: center; }
details.extra[open] > summary::before { content: "–"; }
details.extra[open] > summary { margin-bottom: 4px; }
/* A rule's number inside a label keeps its own letters: "CAR 901.48(1)(a)", not "(1)(A)". */
.label a.ref { text-transform: none; letter-spacing: 0; }

/* ---- the weather check on survey point (f) ---- */
.wx-check, .wx-obs { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface-2); }
/* the aerodrome's own weather (build 37) and the NOTAM box (build 38): amber when there is something to look at or it is out of date; never green, never red */
.wx-obs[data-obs="over"], .wx-obs[data-obs="close"], .wx-obs[data-obs="unknown"], .wx-obs[data-obs="old"] { border-color: var(--caution); }   /* "over" is amber too: a caution only (build 38) */
/* the NOTAM list (build 38) */
.notam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notam-list li { display: grid; gap: 3px; border-top: 1px solid var(--line); padding-top: 8px; overflow-wrap: anywhere; }
.notam-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.wx-check[data-wx="within"] { border-color: var(--go); }
.wx-check[data-wx="close"], .wx-check[data-wx="unknown"], .wx-check[data-wx="past"] { border-color: var(--caution); }   /* "past": the hours checked are over (build 34) */
.wx-check[data-wx="over"] { border-color: var(--nogo); }
.wx-hours { display: flex; flex-wrap: wrap; gap: 6px; }
.wx-hour { font: 600 13px var(--text); border-radius: 6px; padding: 3px 8px; border: 1px solid var(--line); }
.wx-hour.go { background: var(--go-bg); color: var(--go); border-color: var(--go); }
.wx-hour.caution { background: var(--caution-bg); color: var(--caution); border-color: var(--caution); }
.wx-hour.nogo { background: var(--nogo-bg); color: var(--nogo); border-color: var(--nogo); }
.wx-why { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.wx-why li.nogo::marker { color: var(--nogo); }
.wx-why li.caution::marker { color: var(--caution); }

/* ---- Home (build 44): the welcome for a first visit, and "Before you fly" ---- */
.intro .label { color: var(--accent); }
.intro h2 { font: 700 26px/1.12 var(--display); letter-spacing: -0.01em; }
.intro-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.intro-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); counter-increment: step; }
.intro-steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 15px/32px var(--display); text-align: center; }
.intro-steps b { display: block; font-weight: 600; }
.intro-steps span { color: var(--muted); font-size: 14.5px; }
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trust div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.trust b { display: block; font-weight: 600; font-size: 14.5px; }
.trust span { color: var(--muted); font-size: 13.5px; }
/* The answer is the verdict, so it wears the verdict's colours; the lines under it sit on plain paper. */
.byf { gap: 8px; }
.byf .byf-word { font: 700 32px/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.byf.go .byf-word { color: var(--go); }
.byf.caution .byf-word { color: var(--caution); }
.byf.nogo .byf-word { color: var(--nogo); }
.byf-lines { list-style: none; margin: 4px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.byf-lines li { border-top: 1px solid var(--line); }
.byf-lines li:first-child { border-top: 0; }
.byf-lines a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; min-height: 48px; color: var(--ink); text-decoration: none; }
.byf-lines a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.byf-lines .what { display: block; font-weight: 600; }
.byf-lines small { display: block; color: var(--muted); font-size: 13.5px; }

/* ---- Home's weather box (build 44): three figures as the old app's home page had, then Sortie's weather check ---- */
.homewx .head, .gps .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.gps[data-gps="on"] { border-color: var(--accent); }                     /* the switch is on: the accent, never a verdict colour */
.homewx .stat { min-width: 0; }
.homewx .stat b small { font: 600 12px var(--text); color: var(--muted); }
.homewx[data-age="old"] .stat b { color: var(--muted); }   /* fetched a while ago: still shown, no longer bold as "now" */

/* ---- The Weather page (build 45) ---- */
.wx-rows, .wx-ahead { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.wx-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.wx-ahead li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.wx-rows li:first-child, .wx-ahead li:first-child { border-top: 0; }
.wx-ahead li > span { min-width: 0; overflow-wrap: anywhere; }
.wx-ahead small { display: block; color: var(--muted); font-size: 13.5px; }
.wx-ahead li.wx-day { display: block; font-weight: 600; color: var(--muted); background: var(--surface-2); }   /* the day's name, where the hours run past midnight */

/* ---- Folded rows (build 51): one line that opens on a tap. The answer is on the line: a few words and a pill. ---- */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; min-height: 52px; cursor: pointer; border-radius: 12px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px 2px; }
.fold[open] > summary::after { transform: rotate(-135deg); margin: 4px 4px 0 2px; }
.fold > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fold-line { flex: 1; min-width: 0; display: grid; }
.fold-name { font-weight: 600; }
.fold-line small { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.fold-body { display: grid; gap: 10px; padding: 2px 14px 14px; min-width: 0; }
.fold-body > .card, .fold-body > section.card { border: 0; padding: 0; background: transparent; }   /* already inside a box */
.fold-body > .stats { margin: 0; }

/* Short lists to read (build 52): what signing Go confirms, fit to fly, the crew briefing. */
.says { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.says li { overflow-wrap: anywhere; }

/* Build 62: a checklist. Each line is a sentence, any quoted words, and where it comes from in small type. A box to
   tick is as large as a finger; ticking one changes nothing else on the screen. No verdict colour is used. */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { overflow-wrap: anywhere; }
.checks label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.checks input[type=checkbox] { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--accent, #1d5aa6); }
.checks .quote { font-style: italic; }
.src { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Build 58: one authority's page, quoted (the survey's "Parks and local rules" row). A plain box with a rule down its
   left side, so the page's words are seen to be someone else's. No verdict colour: these lines never add green or red. */
.quoted { display: grid; gap: 6px; border-left: 3px solid var(--line); padding: 2px 0 2px 12px; min-width: 0; }
.quoted p { margin: 0; overflow-wrap: anywhere; }
.quoted .at { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

/* ---- The small map on the Fly page (build 52): on top on a phone, beside the rows on an iPad. ---- */
.map.mini { height: 160px; min-height: 0; }
.flymap-card { display: grid; gap: 8px; }
.flymap-card .head { align-items: center; }
@media (min-width: 900px) {
  .col.survey:has(> .flymap-card) { grid-template-columns: minmax(0, 1fr) minmax(280px, 38%); column-gap: 14px; }
  .col.survey:has(> .flymap-card) > * { grid-column: 1; }
  .col.survey > .flymap-card { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 8px; align-self: start; }
  .col.survey:has(> .flymap-card) .pts { grid-template-columns: minmax(0, 1fr); }
  .col.survey > .flymap-card .map.mini { height: 46vh; }
}

/* "Fill it in for me" above the survey's points (build 54). */
.fill-row { align-items: center; }
.fill-row .muted { flex: 1 1 180px; min-width: 0; font-size: 13.5px; }

/* The NAV Drone authorization on the airspace point (build 55). */
.auth { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
