/* xatc pilot site: the Soft look (the owner's choice, 2026-10-11). Tokens are in tokens.css; this file is the mockup's
   rules with Soft's own applied unconditionally. Phone layout (the mockup's "Phone 390") is the max-width block at the
   foot. No inline style anywhere: the CSP allows only this site's own stylesheets. */

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.site { font: var(--fs-body)/var(--lh-body) var(--font); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.site a { color: var(--accent); }
.site :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.site h1, .site h2, .site h3 { margin: 0; line-height: var(--lh-tight); font-weight: 600; text-wrap: balance; }
.site h1 { font-weight: 700; letter-spacing: var(--tracking-title); }
.site p { margin: 0; }
.site :is(h1, main):focus { outline: none; }
.site .muted { color: var(--muted); }
.site .small { font-size: var(--fs-small); }
.site .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.site .label { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.measure { max-width: 26rem; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-3); top: -4rem; z-index: 10; background: var(--panel); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); box-shadow: var(--shadow); }
.skip:focus { top: var(--s-3); }
.demo-bar { background: var(--warn-bg); color: var(--ink); font-size: var(--fs-small); padding: var(--s-2) var(--gutter); text-align: center; }

/* top bar: the mark, the wordmark, three links, the account */
.top { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--gutter); background: var(--bg); }
.brand { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: .01em; }
/* The wordmark stays in ink on purpose (the designer, 2026-10-11): in Soft the accent marks the current link, the primary
   button and links in text; the brand sits quiet beside the coloured mark. Do not "fix" it to the accent. */
.site .brand { color: var(--ink); }
.mark { width: 24px; height: 24px; border-radius: var(--r-mark); background: linear-gradient(135deg, var(--band-1) 0 33.4%, var(--band-2) 33.4% 66.7%, var(--band-3) 66.7% 100%); flex: none; }
.nav { display: flex; gap: var(--s-1); margin-left: var(--s-4); }
.site .nav a { color: var(--ink); text-decoration: none; padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-small); }
.site .nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.site .nav a:not([aria-current]):hover { background: var(--panel-2); }
.acct { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-small); }
.acct .who { color: var(--muted); }

/* phone: the three links become a bottom bar */
.bottom { display: none; }
.bottom svg { width: 20px; height: 20px; }

/* the one column */
.main { width: 100%; max-width: var(--measure); margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-7); display: flex; flex-direction: column; gap: var(--s-5); flex: 1; }
.page-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-title h1 { font-size: var(--fs-title); }

/* cards, rows, fields, buttons */
.card { background: var(--panel); border: 0; border-radius: var(--r-card); box-shadow: var(--shadow); }
.card > .body, .card > form.body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.card > .body.head { padding-bottom: var(--s-2); }
.card > .body.foot { padding-top: var(--s-3); }
.rows { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .when { color: var(--muted); font-size: var(--fs-small); min-width: 6.5rem; }
.row .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row .what b { font-family: var(--mono); font-weight: 600; overflow-wrap: anywhere; }
.row .how { color: var(--muted); font-size: var(--fs-small); text-align: right; }
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field.grow { flex: 1; min-width: 14rem; }
/* With a QR code the key sits on its own full-width row under it: a real key is long, and one that is cut off cannot be typed by hand. */
.twocol .field.grow { flex: 1 1 100%; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.field .hint { color: var(--muted); font-size: var(--fs-small); }
.input { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: .6rem .75rem .6rem 1rem; width: 100%; max-width: 24rem; }
.input.wide { max-width: 20rem; }
.input[readonly] { background: var(--panel-2); color: var(--muted); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input.code { border-radius: var(--r-field); font-family: var(--mono); letter-spacing: .2em; max-width: 11rem; text-align: center; font-size: 1.25rem; padding-left: .75rem; }
.input.file { border-radius: var(--r-field); max-width: 100%; padding: .5rem .75rem; }   /* the flight plan upload: the browser's own file button sits inside */
.input.mono { font-family: var(--mono); max-width: 100%; font-size: var(--fs-small); }
.actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.btn { font: inherit; font-weight: 600; border-radius: var(--r-pill); padding: .7rem 1.25rem; cursor: pointer; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); transition: background var(--t-fast); text-decoration: none; display: inline-flex; white-space: nowrap; align-items: center; gap: var(--s-2); }
.site a.btn { color: var(--ink); }
.btn:hover { background: var(--panel-2); }
.btn.primary, .site a.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.quiet, .site a.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: .7rem .9rem; }
.btn.quiet:hover { background: var(--panel-2); }
.btn.danger, .site a.btn.danger { color: var(--err); }
.btn[disabled] { opacity: .55; cursor: default; }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s-2) var(--s-4); align-items: baseline; margin: 0; }
.kv dt { color: var(--muted); font-size: var(--fs-small); }
.kv dd { margin: 0; }
.badge { display: inline-block; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 600; padding: .15rem .5rem; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: .4rem; vertical-align: middle; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.notice { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-field); border: 1px solid var(--line); background: var(--panel-2); font-size: var(--fs-small); }
.notice.warn { background: var(--warn-bg); border-color: transparent; }
.notice.err { background: var(--err-bg); border-color: transparent; }
.notice.ok { background: var(--ok-bg); border-color: transparent; }
.notice .t { font-weight: 600; }
.notice > div:first-child { flex: 1 1 14rem; }
.notice .actions { margin-left: auto; }
.skel { background: linear-gradient(90deg, var(--panel-2), var(--line) 50%, var(--panel-2)); background-size: 200% 100%; border-radius: 6px; height: .9rem; animation: sh 1.4s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.w30 { width: 30%; } .w40 { width: 40%; } .w55 { width: 55%; } .w70 { width: 70%; }
.w80 { width: 80%; } .w82 { width: 82%; } .w85 { width: 85%; }
.empty { text-align: center; padding: var(--s-7) var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); align-items: center; }
.empty .glyph { width: 48px; height: 48px; border-radius: var(--r-mark); background: linear-gradient(135deg, var(--band-1) 0 33.4%, var(--band-2) 33.4% 66.7%, var(--band-3) 66.7% 100%); opacity: .35; }

/* the flight in progress: a violet-to-green filled card */
.hero { display: flex; flex-direction: column; gap: var(--s-3); }
.hero .route { font-size: var(--fs-title); font-weight: 600; font-family: var(--mono); overflow-wrap: anywhere; }
.hero .meta { display: flex; gap: var(--s-5); flex-wrap: wrap; color: var(--muted); font-size: var(--fs-small); }
.hero .meta b { color: var(--ink); font-weight: 600; }
.card.live { background: var(--live-card); color: var(--on-accent); }
.card.live .muted, .card.live .hero .meta, .card.live .hero .meta b { color: inherit; }
.card.live .hero .meta { opacity: .85; }
.card.live .badge.live, .card.live .dot { color: inherit; background: rgba(255, 255, 255, .22); border-color: transparent; }
.card.live .dot { background: currentColor; }
.badge.live { color: var(--ok); border-color: transparent; background: var(--ok-bg); }

/* a flight is a link: the row, or the card of the flight in progress, is one big target (the link's box is stretched over it) */
.row, .card.live { position: relative; }
.site .flight-link { color: inherit; text-decoration: none; }
.flight-link::after { content: ""; position: absolute; inset: 0; }
.row:has(.flight-link):hover { background: var(--panel-2); }
.row:has(.flight-link:focus-visible), .card.live:has(.flight-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-field); }
.site .flight-link:focus-visible { outline: none; }

.qr { width: min(256px, 100%); aspect-ratio: 1 / 1; border-radius: var(--r-field); border: 1px solid var(--line); background: #fff; flex: none; overflow: hidden; }
.qr-svg { display: block; width: 100%; height: 100%; }
.twocol .qr { margin-inline: auto; }  /* centred in the card; the key sits full width below it */
.twocol { display: flex; gap: var(--s-5); align-items: flex-start; flex-wrap: wrap; }
.keylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.keylist li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.keylist li:first-child { border-top: 0; }
.keylist .name { font-weight: 600; }
.keylist .meta { color: var(--muted); font-size: var(--fs-small); }
.keylist .rm { margin-left: auto; }
.footer a { color: var(--muted); }
.footer { padding: var(--s-5) var(--gutter); color: var(--muted); font-size: var(--fs-label); letter-spacing: .02em; display: flex; gap: var(--s-4); flex-wrap: wrap; justify-content: center; }

/* the minimal sign-in page (signed out), and "Signing you in" */
.landing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--s-7) var(--gutter); gap: var(--s-5); min-height: 60vh; }
.landing .mark { width: 56px; height: 56px; }
.landing h1 { font-size: var(--fs-display); }
.landing p { max-width: 28rem; color: var(--muted); text-wrap: pretty; }
.landing .notice { text-align: left; max-width: 28rem; width: 100%; }

/* one flight's page (the flight page, 2026-10-14; the mockup's "A flight", summary first): the way back, the start-and-end
   line, and the radio log: time, who and what, and the readback mark */
.crumb { font-size: var(--fs-small); }
.crumb a { text-decoration: none; }
.main > .meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); color: var(--muted); font-size: var(--fs-small); }
.main > .meta b { color: var(--ink); font-weight: 600; }
.page-title h1.route { overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: var(--s-3) var(--s-4); background: var(--panel-2); border-radius: var(--r-field); min-width: 0; }
.stat .v { margin: 0; font-size: var(--fs-h2); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .k { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.chip { font-size: var(--fs-small); padding: .2rem .6rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.xchg { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-1) var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); align-items: start; }
.xchg:first-child { border-top: 0; }
.xchg:focus { outline: none; background: var(--panel-2); }
.xchg .t { color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; min-width: 3.5rem; padding-top: .1rem; }
.xchg .lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.xchg .st { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.xchg .you::before { content: "You "; color: var(--muted); font-weight: 600; }
.xchg .atc::before { content: "ATC "; color: var(--accent); font-weight: 600; }
.xchg .rb { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 600; padding: .15rem .5rem; border-radius: var(--r-pill); white-space: nowrap; }
.xchg .rb.ok { color: var(--ok); background: var(--ok-bg); }
.xchg .rb.fix { color: var(--warn); background: var(--warn-bg); }
.xchg .rb.ask { color: var(--muted); background: var(--panel-2); }

/* the flight map (step 5): the card's frame; MapLibre's own stylesheet (css/vendor/) is loaded with it on this page only */
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-field); overflow: hidden; }
.seg button { font: inherit; font-size: var(--fs-small); font-weight: 600; padding: .4rem .8rem; background: var(--panel); color: var(--muted); border: 0; border-left: 1px solid var(--line); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.seg button[disabled] { opacity: .5; cursor: default; }
.map { position: relative; background: var(--panel-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-slot { height: 22rem; width: 100%; }
.map-canvas { width: 100%; height: 100%; }
.map .nfn { position: absolute; left: var(--s-3); bottom: var(--s-2); z-index: 2; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); background: var(--panel); padding: .1rem .4rem; border-radius: 4px; pointer-events: none; }
.legend { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-small); color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--accent); vertical-align: middle; margin-right: .3rem; }
.legend i.filed { border-top-style: dashed; border-top-color: var(--muted); }
.legend i.mark { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--band-2); }
.map-end { font-size: var(--fs-small); font-weight: 700; color: var(--ink); background: var(--panel); padding: .1rem .4rem; border-radius: 6px; border: 2px solid var(--ink); white-space: nowrap; }
.map-call { width: 16px; height: 16px; padding: 0; border-radius: 50%; background: var(--band-2); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--ink); cursor: pointer; }
.map-call:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* the altitude profile (step 4): plain SVG, drawn twice (a wide and a narrow layout) and one shown, so its text stays readable */
.pf-body { gap: var(--s-3); }
.pf { display: block; width: 100%; height: auto; }
.pf-narrow { display: none; }
.pf-ground { fill: var(--panel-2); }
.pf-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.pf-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.pf-line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pf-call { fill: var(--band-2); stroke: var(--panel); stroke-width: 1.5; }
.pf-cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.pf-pick { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.pf-hit { fill: transparent; cursor: crosshair; }
.pf-slider { width: 100%; accent-color: var(--accent); }
.pf-reading { display: flex; flex-direction: column; gap: var(--s-1); }
.pf-reading .btn { padding: .2rem .5rem; }

/* phone */
@media (max-width: 40rem) {
  .nav, .acct .who { display: none; }
  .bottom { display: flex; position: sticky; bottom: 0; background: var(--bg); padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom, 0px)); gap: var(--s-1); margin-top: auto; }
  .site .bottom a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: var(--fs-label); letter-spacing: .02em; padding: var(--s-2) 0; border-radius: var(--r-field); display: flex; flex-direction: column; gap: 2px; align-items: center; }
  .site .bottom a[aria-current="page"] { color: var(--accent); font-weight: 600; background: var(--panel-2); }
  .main { padding-top: var(--s-5); }
  .card > .body, .card > form.body { padding: var(--s-4); }
  .kv { grid-template-columns: 1fr; gap: var(--s-1); }
  .row { grid-template-columns: 1fr auto; padding: var(--s-3) var(--s-4); }
  .row .when { grid-column: 1 / -1; min-width: 0; order: -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-slot { height: 18rem; }
  .pf-wide { display: none; }
  .pf-narrow { display: block; }
  .xchg { grid-template-columns: 1fr auto; padding: var(--s-3) var(--s-4); }
  .xchg .t { grid-column: 1 / -1; min-width: 0; }
  .landing h1 { font-size: 2rem; }
  .qr { width: min(224px, 100%); }   /* the phone floor; 256 px on a laptop screen (the designer, 2026-10-11) */
  .keylist .rm.actions { margin-left: 0; width: 100%; }
  .keylist .rm.actions .small { flex-basis: 100%; }
}

/* a page of prose (Privacy): one column, no cards; the section headings as the design's h2 */
.prose { display: flex; flex-direction: column; gap: var(--s-4); }
.prose h2 { font-size: var(--fs-h2); margin-top: var(--s-3); }
.prose p, .prose li { text-wrap: pretty; }
.prose ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--s-2); }
.prose .lede { font-size: var(--fs-h2); line-height: 1.4; }

/* the download page's system switch: two big buttons, the one shown is filled; the one the browser is on says so */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.platform { font: inherit; text-align: left; display: flex; flex-direction: column; gap: .2rem; padding: var(--s-3) var(--s-4); background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-card); cursor: pointer; }
.platform[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.platform[disabled] { opacity: .6; cursor: default; }
.platform-name { font-weight: 700; }
.platform-tag { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 600; color: var(--accent); }
@media (max-width: 40rem) { .platforms { grid-template-columns: 1fr; } }
/* the download page: a release's version, its notes (line breaks kept, as text), the checksum, and the plain list */
.release-version { font-size: var(--fs-title); font-weight: 700; letter-spacing: -.01em; }
.release-notes { display: flex; flex-direction: column; gap: var(--s-1); }
.release-notes h3 { font-size: var(--fs-label); }
.notes { white-space: pre-line; overflow-wrap: anywhere; }
.plain { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--s-3); }
.plain li { text-wrap: pretty; }
.mono { font-family: var(--mono); overflow-wrap: anywhere; user-select: all; }
