:root{
  --ground:#F6F8F7; --surface:#FFFFFF; --surface-2:#EEF2F0; --sunken:#E7EDEA;
  --ink:#101F1D; --ink-2:#3D524F; --ink-3:#617672;   /* 4.53:1 on the ground, 4.84:1 on a card */
  --line:#D9E2DE; --line-strong:#BECBC6;
  --jade:#00645F; --jade-soft:#DCEBE7; --jade-ink:#004D49; --on-jade:#FFFFFF;
  --amber:#B5622F; --amber-soft:#F6E7DC;
  --gold:#A8813C;
  --shadow:0 1px 2px rgba(16,31,29,.05), 0 8px 24px -12px rgba(16,31,29,.16);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ground:#0C1513; --surface:#131F1D; --surface-2:#1A2725; --sunken:#0F1A18;
    --ink:#E8F0ED; --ink-2:#A6B8B4; --ink-3:#7A8D89;
    --line:#263532; --line-strong:#354744;
    --jade:#4FB3A6; --jade-soft:#132A28; --jade-ink:#7FCCC0; --on-jade:#08201E;
    --amber:#D98A55; --amber-soft:#2A1D14;
    --gold:#C9A25C;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"]{
  --ground:#0C1513; --surface:#131F1D; --surface-2:#1A2725; --sunken:#0F1A18;
  --ink:#E8F0ED; --ink-2:#A6B8B4; --ink-3:#7A8D89;
  --line:#263532; --line-strong:#354744;
  --jade:#4FB3A6; --jade-soft:#132A28; --jade-ink:#7FCCC0; --on-jade:#08201E;
  --amber:#D98A55; --amber-soft:#2A1D14;
  --gold:#C9A25C;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--ground); color:var(--ink);
  font-family:"IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
.mono{font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace}
.num{font-variant-numeric:tabular-nums}
:focus-visible{outline:2px solid var(--jade); outline-offset:2px; border-radius:3px}

.wrap{max-width:1140px; margin:0 auto; padding:0 24px 88px}

/* ---------- masthead ---------- */
.masthead{padding:44px 0 28px; border-bottom:1px solid var(--line)}
.eyebrow{
  font-family:"IBM Plex Mono", monospace; font-size:11px; font-weight:500;
  letter-spacing:.16em; text-transform:uppercase; color:var(--jade); margin:0 0 12px;
}
h1{
  font-size:clamp(30px,4.4vw,44px); line-height:1.08; font-weight:700;
  letter-spacing:-.022em; margin:0 0 14px; text-wrap:balance;
}
.standfirst{margin:0; max-width:60ch; color:var(--ink-2); font-size:16.5px}
.effective{
  display:inline-flex; align-items:center; gap:8px; margin-top:18px;
  padding:6px 11px; border:1px solid var(--line-strong); border-radius:999px;
  background:var(--surface); font-family:"IBM Plex Mono",monospace;
  font-size:11.5px; letter-spacing:.05em; color:var(--ink-2);
}
.effective b{color:var(--ink); font-weight:600}
.dot{width:6px; height:6px; border-radius:50%; background:var(--jade); flex:none}

/* ---------- layout ---------- */
.cols{display:grid; grid-template-columns:minmax(0,1fr) 336px; gap:32px; align-items:start; margin-top:34px}
@media (max-width:940px){ .cols{grid-template-columns:1fr; gap:24px} }

section{margin-top:44px}
.sec-head{display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:16px; flex-wrap:wrap}
h2{font-size:19px; font-weight:600; letter-spacing:-.012em; margin:0}
.sec-note{margin:0; color:var(--ink-3); font-size:13.5px}

/* ---------- segments ---------- */
.segs{display:flex; flex-direction:column; gap:14px}
.seg{
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  box-shadow:var(--shadow); position:relative; z-index:1;
}
/* a segment with an open airport list must paint over the ones below it */
.seg.open{z-index:50}
.seg-top{
  display:flex; align-items:center; gap:12px; padding:11px 14px;
  border-bottom:1px solid var(--line); background:var(--surface-2);
  border-radius:11px 11px 0 0;
}
.seg-n{
  font-family:"IBM Plex Mono",monospace; font-size:11px; font-weight:600;
  letter-spacing:.08em; color:var(--jade); background:var(--jade-soft);
  border-radius:5px; padding:3px 8px; flex:none;
}
.seg-route{font-family:"IBM Plex Mono",monospace; font-size:13px; font-weight:500; color:var(--ink-2); flex:1; min-width:0}
.seg-route b{color:var(--ink); font-weight:600}
.kill{
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink-3);
  border-radius:6px; width:32px; height:32px; line-height:1; cursor:pointer; flex:none;
  font-size:15px; display:grid; place-items:center; transition:.14s;
}
/* Two of these sit side by side; at 32 wide with a 12px gap the pitch is 44,
   so neither eats into the other's target. */
.seg-top .kill + .kill{margin-left:0}
/* The drawn button stays 26px so the row keeps its density, but the target a
   finger has to hit is 44px, centred on it. */
.kill{position:relative}
.kill::after{content:""; position:absolute; left:50%; top:50%; width:44px; height:44px;
  transform:translate(-50%,-50%)}
.chip[aria-pressed]{position:relative}
.chip[aria-pressed]::after{content:""; position:absolute; left:0; top:50%; width:100%; height:44px;
  transform:translateY(-50%)}
.kill:hover{border-color:var(--amber); color:var(--amber)}
/* The duplicate button shares the shape of the remove button but not its
   warning colour: one adds, the other destroys. */
#segs .kill[id^="d-"]:hover{border-color:var(--jade); color:var(--jade)}
.kill:disabled{opacity:.32; cursor:not-allowed}

.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(156px,1fr)); gap:12px; padding:14px}
@media (max-width:400px){ .grid{grid-template-columns:1fr} }
.field{display:flex; flex-direction:column; gap:5px; min-width:0}
label{
  font-family:"IBM Plex Mono",monospace; font-size:11.5px; font-weight:500;
  letter-spacing:.11em; text-transform:uppercase; color:var(--ink-3);
}
select, input[type=number]{
  font-family:inherit; font-size:14px; color:var(--ink); background:var(--surface);
  border:1px solid var(--line-strong); border-radius:7px; padding:8px 9px;
  width:100%; min-width:0; transition:border-color .14s;
}
select:hover, input[type=number]:hover{border-color:var(--jade)}
.combo{position:relative}
.combo-input{
  font-family:"IBM Plex Mono", ui-monospace, monospace; font-size:13.5px; color:var(--ink);
  background:var(--surface); border:1px solid var(--line-strong); border-radius:7px;
  padding:8px 9px; width:100%; min-width:0; transition:border-color .14s;
}
.combo-input:hover{border-color:var(--jade)}
.combo-input::placeholder{color:var(--ink-3); font-style:italic}
.combo-panel{
  position:absolute; top:calc(100% + 5px); left:0; z-index:60;
  width:max(100%, 262px); max-height:274px; overflow-y:auto; overscroll-behavior:contain;
  background:var(--surface); border:1px solid var(--line-strong); border-radius:9px;
  box-shadow:0 4px 8px -4px rgba(16,31,29,.18), 0 20px 40px -16px rgba(16,31,29,.32);
  padding:4px;
}
.combo-opt{
  display:grid; grid-template-columns:44px 1fr; gap:2px 9px; align-items:baseline;
  padding:6px 8px; border-radius:6px; cursor:pointer;
}
.combo-code{
  font-family:"IBM Plex Mono",monospace; font-size:12.5px; font-weight:600;
  letter-spacing:.04em; color:var(--jade);
}
.combo-city{font-size:13.5px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.combo-country{grid-column:2; font-size:11px; color:var(--ink-3); margin-top:-2px}
.combo-opt.active{background:var(--jade-soft)}
.combo-opt.active .combo-city{color:var(--jade-ink)}
.combo-opt.sel .combo-city{font-weight:600}
.combo-empty{padding:12px 10px; font-size:13px; color:var(--ink-3)}
.combo-hint{
  padding:7px 9px 5px; font-family:"IBM Plex Mono",monospace; font-size:9.5px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3);
  border-bottom:1px solid var(--line); margin-bottom:4px;
}
.static{
  font-family:"IBM Plex Mono",monospace; font-size:13.5px; color:var(--ink-2);
  background:var(--sunken); border:1px solid var(--line); border-radius:7px;
  padding:8px 9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.seg-out{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:12px 14px; border-top:1px dashed var(--line); background:var(--sunken);
  border-radius:0 0 11px 11px;
}
.chip{
  font-family:"IBM Plex Mono",monospace; font-size:11.5px; letter-spacing:.03em;
  border:1px solid var(--line-strong); border-radius:999px; padding:3px 10px;
  color:var(--ink-2); background:var(--surface);
}
button.chip{transition:.14s}
button.chip:hover{border-color:var(--jade); color:var(--jade)}
.chip.zone{border-color:var(--jade); color:var(--jade); background:var(--jade-soft)}
.seg-earn{margin-left:auto; display:flex; align-items:baseline; gap:14px}
.seg-earn .sp{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:21px; font-weight:600; letter-spacing:-.01em}
.seg-earn .am{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:12.5px; color:var(--ink-3)}
.seg-earn small{font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); margin-left:6px}
.seg.invalid .seg-out{background:var(--amber-soft)}
.warn{font-size:12.5px; color:var(--amber)}

/* marketing airline badge */
.al{
  font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:600; letter-spacing:.08em;
  border-radius:4px; padding:2px 6px; flex:none; border:1px solid var(--line-strong); color:var(--ink-2);
}
.al.cx{background:var(--jade-soft); border-color:var(--jade); color:var(--jade)}
.al.nosp{background:var(--amber-soft); border-color:var(--amber); color:var(--amber)}

/* partner rate entry */
.rate-in{display:flex; align-items:center; gap:7px}
.rate-in label{font-size:11px}
.rate-in input{
  font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:14px;
  width:74px; padding:5px 7px; border:1px solid var(--line-strong); border-radius:6px;
  background:var(--surface); color:var(--ink); text-align:right;
}
.rate-in input:hover{border-color:var(--jade)}
.seg.pending .seg-out{background:var(--amber-soft)}
.seg.pending .rate-in input{border-color:var(--amber)}
.rate-note{font-size:12px; color:var(--amber); flex-basis:100%}
.rate-reused{font-size:12px; color:var(--ink-3); flex-basis:100%}
.per-leg{
  flex-basis:100%; font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums;
  font-size:12px; color:var(--ink-2); margin-top:-2px;
}
.per-leg b{color:var(--ink); font-weight:600}

/* saved partner rates */
.rates-card{background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); overflow:hidden}
.rates-row{
  display:grid; grid-template-columns:52px 1fr auto auto 30px; gap:12px; align-items:center;
  padding:9px 14px; border-top:1px solid var(--line); font-size:13.5px;
}
.rates-row:first-child{border-top:0}
.rates-row .rk{font-family:"IBM Plex Mono",monospace; font-size:12px; font-weight:600; color:var(--jade)}
.rates-row .rd{color:var(--ink-2); font-size:13px}
.rates-row .rv{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-weight:600}
.rates-row .rm{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; color:var(--ink-3); font-size:12.5px}
.callout{
  border:1px solid var(--line-strong); border-left:3px solid var(--amber);
  background:var(--surface); border-radius:9px; padding:14px 16px; font-size:13.5px; color:var(--ink-2);
}
.callout b{color:var(--ink)}
.callout p{margin:0 0 8px}
.callout p:last-child{margin:0}

.rowbtns{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap}
button.act{
  font-family:inherit; font-size:13.5px; font-weight:500; cursor:pointer;
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink);
  border-radius:8px; padding:9px 15px; transition:.14s;
  min-height:44px;                     /* a finger-sized target, not a mouse-sized one */
}
.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}
button.act:hover{border-color:var(--jade); color:var(--jade)}
button.act.primary{background:var(--jade); border-color:var(--jade); color:var(--on-jade)}
button.act.primary:hover{filter:brightness(1.08)}

/* ---------- summary ---------- */
.summary{position:sticky; top:20px; display:flex; flex-direction:column; gap:14px}
.card{background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:18px}
.card h3{
  font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:500;
  letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3); margin:0 0 12px;
}
.total{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:46px; font-weight:600; line-height:1; letter-spacing:-.03em}
.total-sub{font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); margin-top:7px}
.split{display:flex; justify-content:space-between; align-items:baseline; padding:9px 0; border-top:1px solid var(--line); font-size:13.5px}
.split:first-of-type{border-top:0}
.split span{color:var(--ink-2)}
.split b{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-weight:600}

.tier-now{display:flex; align-items:baseline; gap:9px; margin-bottom:14px}
.tier-name{font-size:22px; font-weight:700; letter-spacing:-.015em}
.tier-name[data-t="Silver"]{color:var(--ink-2)}
.tier-name[data-t="Gold"]{color:var(--gold)}
.tier-name[data-t="Diamond"]{color:var(--jade)}
.tier-gap{font-size:12.5px; color:var(--ink-3)}

.rail{position:relative; height:8px; background:var(--sunken); border-radius:999px; margin:22px 0 8px; border:1px solid var(--line)}
.rail-fill{position:absolute; inset:0 auto 0 0; background:var(--jade); border-radius:999px; transition:width .35s cubic-bezier(.4,0,.2,1)}
.tick{position:absolute; top:-7px; width:1px; height:22px; background:var(--line-strong)}
.tick b{
  position:absolute; top:26px; left:50%; transform:translateX(-50%);
  font-family:"IBM Plex Mono",monospace; font-size:9.5px; letter-spacing:.07em;
  text-transform:uppercase; color:var(--ink-3); font-weight:500; white-space:nowrap;
}
.tick-end b{left:auto; right:0; transform:none}
.rail-legend{height:26px}
@media (prefers-reduced-motion: reduce){ .rail-fill{transition:none} }

/* ---------- reference ---------- */
.tablewrap{overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow)}
table{border-collapse:collapse; width:100%; min-width:660px; font-size:13.5px}
th, td{padding:9px 13px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap}
th:first-child, td:first-child{text-align:left}
thead th{
  font-family:"IBM Plex Mono",monospace; font-size:10px; font-weight:500;
  letter-spacing:.09em; text-transform:uppercase; color:var(--ink-3);
  background:var(--surface-2); position:sticky; top:0;
}
tbody td{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums}
tbody td:first-child{font-family:"IBM Plex Sans",sans-serif}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:var(--sunken)}
.cabin-row td{
  background:var(--jade-soft); color:var(--jade-ink); font-weight:600;
  font-family:"IBM Plex Sans",sans-serif; font-size:12.5px;
  letter-spacing:.03em; text-align:left;
}
.fam{color:var(--ink-3); font-size:12px}

.zones{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px}
.zone-card{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:13px 15px}
.zone-card b{display:block; font-size:14px; font-weight:600; margin-bottom:2px}
.zone-card .rng{font-family:"IBM Plex Mono",monospace; font-size:11.5px; color:var(--jade); letter-spacing:.02em}
.zone-card p{margin:7px 0 0; font-size:12.5px; color:var(--ink-3); line-height:1.45}

.cockpit footer{margin-top:52px; padding-top:22px; border-top:1px solid var(--line); color:var(--ink-3); font-size:12.5px}
.cockpit footer p{margin:0 0 8px; max-width:74ch}
.cockpit footer a{color:var(--jade)}

/* ---------- airline and alliance marks ----------------------------------
 * Each file is a round mark on the carrier's own colour, cut to a circle in
 * the file itself, so it reads on a light page and a dark one and needs no
 * frame. Three sizes cover every place one appears - 16 in chips, tabs and
 * dense tables, 20 in rows, 28 on cards and section heads - so a page of them
 * reads as one set. The mark is always beside the name it belongs to, never
 * instead of it: it is decorative, and the markup keeps it out of the
 * accessibility tree.
 * ----------------------------------------------------------------------- */
.airmark{display:inline-block; vertical-align:middle; object-fit:contain; flex:none}
.hero-cur .airmark, .rank-name .airmark, .navrail-progname .airmark,
.cell-air .airmark, .cell-prog .airmark{margin-right:8px}
.pick-name{display:flex; align-items:center; gap:9px}
.aln .airmark{margin-right:5px; vertical-align:-3px}
.cabin-row .airmark{margin-right:9px}
button.act .airmark{margin-right:8px}
.sec-title{display:flex; align-items:center; gap:11px}

/* ---------- programme comparison ---------- */
.aln{
  display:inline-block; padding:2px 7px; border-radius:999px; font-family:"IBM Plex Mono",monospace;
  font-size:9.5px; letter-spacing:.09em; text-transform:uppercase; font-weight:600;
  border:1px solid var(--line-strong); color:var(--ink-3); white-space:nowrap;
}
.aln[data-a="oneworld"]{border-color:var(--jade); color:var(--jade); background:var(--jade-soft)}
.aln[data-a="Star Alliance"]{border-color:var(--gold); color:var(--gold)}
.aln[data-a="SkyTeam"]{border-color:var(--amber); color:var(--amber); background:var(--amber-soft)}
.progs{display:flex; flex-direction:column; gap:12px}
.prog{
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; box-shadow:var(--shadow);
}
.prog.muted{box-shadow:none; background:var(--surface-2)}
.prog-top{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.prog-name{font-weight:600; font-size:14.5px; letter-spacing:-.01em}
.prog-air{font-size:12px; color:var(--ink-3); margin-top:1px}
.prog-val{
  font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums;
  font-size:27px; font-weight:600; letter-spacing:-.025em; line-height:1.2; margin-top:8px;
}
.prog-val small{
  font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-3); margin-left:6px; font-weight:500;
}
.prog-tier{display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-top:10px; font-size:12.5px}
.prog-tier b{font-weight:600}
.prog-gap{color:var(--ink-3); font-size:12px; text-align:right}
.mini-rail{position:relative; height:6px; background:var(--sunken); border-radius:999px; margin-top:7px; overflow:hidden}
.mini-fill{position:absolute; inset:0 auto 0 0; background:var(--jade); border-radius:999px; transition:width .35s ease}
.prog-note{margin:9px 0 0; font-size:12px; color:var(--ink-3); line-height:1.45}
.prog-bal{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:11px; padding-top:11px; border-top:1px solid var(--line)}
.prog-bal input{width:92px; padding:5px 8px; font-size:12.5px; font-family:"IBM Plex Mono",monospace}
.pickbar{display:flex; align-items:center; gap:16px; padding:14px 16px; margin-bottom:14px;
  border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow)}
.pickbar-text{min-width:0; flex:1}
.pickbar-tag{display:block; font-family:"IBM Plex Mono",monospace; font-size:10.5px; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-3); margin-bottom:3px}
.pickbar-name{display:flex; align-items:center; gap:9px; font-size:16px; color:var(--ink)}
.pickbar-sub{display:block; margin-top:2px; font-size:12.5px; color:var(--ink-2)}
#pickBody{margin-top:4px}
.picker{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px}
.pick{
  display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:left;
  font-family:inherit; cursor:pointer; padding:13px 14px; border-radius:12px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink);
  transition:border-color .14s, background .14s;
}
.pick:hover{border-color:var(--jade)}
.offwrap{margin-top:18px}
.offwrap summary{
  cursor:pointer; font-size:12.5px; color:var(--ink-3); padding:7px 0;
  list-style:none; display:flex; align-items:center; gap:7px;
}
.offwrap summary::-webkit-details-marker{display:none}
/* Drawn rather than typed: the triangle glyphs are not in IBM Plex and fell
   back to a dot. */
.offwrap summary::before{
  content:''; width:0; height:0; flex:none;
  border:4px solid transparent; border-left-color:currentColor;
  transition:transform .15s ease;
}
.offwrap[open] summary::before{transform:rotate(90deg)}
@media (prefers-reduced-motion: reduce){ .offwrap summary::before{transition:none} }
.offwrap summary:hover{color:var(--jade)}
.chips{display:flex; flex-wrap:wrap; gap:6px; padding:6px 0 2px}
.offchip{
  font-size:11.5px; padding:3px 9px; border-radius:999px; color:var(--ink-2);
  border:1px dashed var(--line-strong); background:var(--surface-2); white-space:nowrap;
}
.offchip.part{border-style:solid}
.offchip[data-a="oneworld"]{border-color:var(--jade); color:var(--jade)}
.offchip[data-a="Star Alliance"]{border-color:var(--gold); color:var(--gold)}
.offchip[data-a="SkyTeam"]{border-color:var(--amber); color:var(--amber)}
.tab-n{font-family:"IBM Plex Mono",monospace; font-size:11px; opacity:.7; margin-left:5px}
.pick.sel{border-color:var(--jade); background:var(--jade-soft); box-shadow:var(--shadow)}
.pick .aln{margin-bottom:5px}
.pick-name{font-size:14.5px; font-weight:600; letter-spacing:-.01em}
.pick-sub{font-size:11.5px; color:var(--ink-3)}
.pick.sel .pick-sub{color:var(--jade-ink)}
.ladder{margin-top:14px; border-top:1px solid var(--line)}
.rung{
  display:flex; justify-content:space-between; align-items:baseline; gap:10px;
  padding:6px 0; border-bottom:1px solid var(--line); font-size:12.5px;
}
.rung:last-child{border-bottom:0}
.rung-name{color:var(--ink-3)}
.rung-pts{font-family:"IBM Plex Mono",monospace; font-size:11.5px; color:var(--ink-3)}
.rung.got .rung-name{color:var(--ink-2)}
.rung.cur .rung-name{color:var(--jade); font-weight:600}
.rung.cur .rung-pts{color:var(--jade)}
tr.dim td{color:var(--ink-3); background:var(--surface-2)}
.rownote{margin-top:4px; font-size:11.5px; line-height:1.45; color:var(--ink-3); max-width:62ch; white-space:normal}
/* The programme table lays out to its content otherwise, which pushed the two
   columns that carry the answer - what it reads, and what each tier takes -
   past the right edge, where a silent scroll container hid them. Fixed widths
   that add to 100% keep every column on screen and let the long cells wrap. */
#progTable{table-layout:fixed; min-width:0}
#progTable th, #progTable td{white-space:normal; vertical-align:top; word-break:normal; overflow-wrap:anywhere}
#progTable th:nth-child(1), #progTable td:nth-child(1){width:19%}
#progTable th:nth-child(2), #progTable td:nth-child(2){width:15%}
#progTable th:nth-child(3), #progTable td:nth-child(3){width:15%}
#progTable th:nth-child(4), #progTable td:nth-child(4){width:20%}
#progTable th:nth-child(5), #progTable td:nth-child(5){width:31%}
tr.crossed td{background:var(--jade-soft)}
tr.crossed td b{color:var(--jade-ink)}
.fxrow{display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end}
.fxrow .field{flex:1 1 108px}
/* Empty states carry the shape of what belongs there, not a bare sentence. */
.blank{display:flex; flex-direction:column; align-items:center; text-align:center;
  gap:9px; padding:38px 22px; border:1px dashed var(--line-strong); border-radius:14px}
.blank-badge{width:46px; height:46px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-2); color:var(--ink-3); margin-bottom:3px}
.blank-badge .ic{width:21px; height:21px}
.blank b{font-size:15px; font-weight:600; color:var(--ink); letter-spacing:-.01em}
.blank p{margin:0; max-width:40ch; font-size:12.5px; line-height:1.6; color:var(--ink-3)}
.seg-earn{flex-wrap:wrap}
@media (prefers-reduced-motion: reduce){ .mini-fill{transition:none} }
.prog-share{margin-top:7px; font-size:11.5px; color:var(--ink-3)}

/* ---------- page nav ---------- */
.nav{display:flex; gap:4px; flex-wrap:wrap; margin:0 0 8px; padding:14px 0 0}
.nav a{
  font-family:"IBM Plex Mono",monospace; font-size:11.5px; letter-spacing:.06em;
  text-transform:uppercase; text-decoration:none; color:var(--ink-3);
  padding:7px 13px; border-radius:999px; border:1px solid transparent; transition:.14s;
}
.nav a:hover{color:var(--jade); border-color:var(--line-strong)}
.nav a.sel{color:var(--jade); background:var(--jade-soft); border-color:var(--jade)}
.ext{color:var(--jade); text-decoration:none; border-bottom:1px solid transparent}
.ext:hover{border-bottom-color:var(--jade)}
.ext::after{content:' \2197'; font-size:.85em; opacity:.75}
.chartlink{
  display:block; margin-top:4px; font-size:11px; font-family:"IBM Plex Mono",monospace;
  letter-spacing:.05em; text-transform:uppercase; color:var(--jade); text-decoration:none;
}
.chartlink:hover{text-decoration:underline}

.picklink{
  margin-top:7px; font-size:10.5px; font-family:"IBM Plex Mono",monospace;
  letter-spacing:.06em; text-transform:uppercase; color:var(--ink-3); text-decoration:none;
}
.picklink:hover{color:var(--jade); text-decoration:underline}
.pick.sel .picklink{color:var(--jade-ink)}
.offchip-link{text-decoration:none}
tr:target td{background:var(--jade-soft)}

/* ---------- verdict ---------- */
.verdict{
  margin:26px 0 0; padding:16px 18px; border-radius:12px;
  background:var(--jade-soft); border:1px solid var(--jade);
}
.verdict-tag{
  font-family:"IBM Plex Mono",monospace; font-size:10px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--jade-ink);
}
.verdict-line{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-top:5px}
.verdict-line b{font-size:19px; font-weight:600; letter-spacing:-.015em; color:var(--ink)}
.verdict-line span{font-size:13.5px; color:var(--jade-ink)}
.verdict-rest{margin:7px 0 0; font-size:12.5px; color:var(--ink-2)}
.verdict .act{margin-top:12px; background:var(--surface)}

/* ===========================================================================
 * Calculator, redesigned.
 *
 * The page had grown fifteen bordered, shadowed boxes of equal weight and no
 * entry point. These rules replace that with one surface: hairlines instead of
 * cards, a type scale where the result is the only large thing, and the accent
 * reserved for the answer and the primary action. Everything else recedes.
 * ======================================================================== */

.wrap{max-width:900px}
.masthead{padding-top:56px}
.masthead h1{font-size:30px; letter-spacing:-.022em; margin:0 0 10px}
.masthead .standfirst{font-size:15.5px; max-width:52ch; color:var(--ink-2)}
.nav{margin-top:26px}

/* The programme line ------------------------------------------------------ */
.picksel{margin-top:26px; border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.picksel-btn{
  display:flex; align-items:baseline; gap:12px; width:100%; min-height:56px;
  background:none; border:0; padding:14px 2px; cursor:pointer; font:inherit; text-align:left;
  color:var(--ink);
}
.picksel-btn:hover .picksel-name{color:var(--jade)}
.picksel-tag{font-size:12px; color:var(--ink-3); flex:none}
.picksel-name{font-size:17px; font-weight:600; flex:none}
.picksel-sub{font-size:13px; color:var(--ink-3); flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.picksel-caret{flex:none; width:9px; height:9px; margin-left:auto;
  border-right:1.5px solid var(--ink-3); border-bottom:1.5px solid var(--ink-3);
  transform:rotate(45deg) translate(-2px,-2px); transition:transform .16s}
.picksel-btn[aria-expanded="true"] .picksel-caret{transform:rotate(-135deg) translate(-3px,-3px)}
#pickBody{padding:18px 0 24px; border-bottom:1px solid var(--line)}

/* The answer -------------------------------------------------------------- */
.hero{padding:44px 0 40px; border-bottom:1px solid var(--line)}
.hero-val{font-size:68px; line-height:1; font-weight:600; letter-spacing:-.035em; color:var(--jade)}
.hero-val small{font-size:19px; font-weight:500; letter-spacing:0; margin-left:9px; color:var(--ink-2)}
.hero-cur{margin-top:10px; font-size:14px; color:var(--ink-2)}
.hero-tier{margin-top:22px; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.hero-tier b{font-size:16px}
.hero-tier span{font-size:14px; color:var(--ink-2)}
.hero .rail{margin-top:12px; max-width:420px}
.hero-alt{margin-top:26px; padding-top:20px; border-top:1px solid var(--line); font-size:14px; color:var(--ink-2)}
.hero-alt b{color:var(--ink)}
.hero-empty{font-size:15px; color:var(--ink-3)}

/* Caveats: one line, opened only if the reader wants it. -------------------- */
.caveat{margin-top:18px; font-size:13px}
.caveat summary{cursor:pointer; color:var(--amber); list-style:none}
.caveat summary::-webkit-details-marker{display:none}
.caveat summary::before{content:"⚠︎ "; }
.caveat p{margin:8px 0 0; color:var(--ink-2); max-width:62ch; line-height:1.55}

/* Blocks and their headings ------------------------------------------------ */
.block{padding:34px 0; border-bottom:1px solid var(--line)}
.blockhead{display:flex; align-items:baseline; gap:16px; flex-wrap:wrap; margin-bottom:16px}
.blockhead h2{font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-3); margin:0}
.blockhead .caption{margin:0}
.caption{font-size:13px; color:var(--ink-3); margin:10px 0 0}

/* A flight is a line until you touch it ------------------------------------ */
.segs{display:flex; flex-direction:column}
.seg{background:none; border:0; border-radius:0; box-shadow:none; margin:0;
  border-top:1px solid var(--line)}
.seg:last-child{border-bottom:1px solid var(--line)}
.seg.invalid{background:none}
.seg-line{display:flex; align-items:center; gap:14px; width:100%; min-height:52px;
  padding:8px 2px; background:none; border:0; font:inherit; cursor:pointer; text-align:left; color:var(--ink)}
.seg-line:hover{background:var(--surface-2)}
.seg-n{font-family:"IBM Plex Mono",monospace; font-size:11.5px; color:var(--ink-3); flex:none; width:18px}
.seg-air{font-family:"IBM Plex Mono",monospace; font-size:12.5px; color:var(--ink-2); flex:none;
  display:flex; align-items:center; gap:7px}
.seg-path{font-family:"IBM Plex Mono",monospace; font-size:14px; font-weight:500; flex:none; width:118px}
.seg-fare{font-size:13px; color:var(--ink-2); flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.seg-earn{font-size:15px; font-weight:600; flex:none; text-align:right}
.seg-earn small{font-size:11px; font-weight:500; color:var(--ink-3); margin-left:4px}
.seg-earn.none{color:var(--ink-3); font-weight:500}
.seg-body{padding:4px 2px 20px}
.seg-acts{display:flex; gap:12px; margin-top:14px}

/* Ranked comparison, as rows -------------------------------------------- */
.ranks{display:flex; flex-direction:column}
.rank{display:flex; align-items:center; gap:16px; padding:13px 2px; border-top:1px solid var(--line)}
.rank:last-child{border-bottom:1px solid var(--line)}
.rank-name{font-size:14.5px; flex:none; width:190px}
.rank-name span{display:block; font-size:12px; color:var(--ink-3)}
.rank-bar{flex:1; min-width:60px; height:4px; border-radius:2px; background:var(--sunken); overflow:hidden}
.rank-bar i{display:block; height:100%; background:var(--jade); border-radius:2px}
.rank-pct{font-family:"IBM Plex Mono",monospace; font-size:12.5px; color:var(--ink-2); flex:none; width:44px; text-align:right}
.rank-to{font-size:12.5px; color:var(--ink-3); flex:none; width:170px}
.rank-val{font-family:"IBM Plex Mono",monospace; font-size:12.5px; color:var(--ink-3); flex:none; width:110px; text-align:right}

button.act.quiet{border-color:transparent; color:var(--ink-2)}
button.act.quiet:hover{border-color:var(--line-strong); color:var(--ink)}

.cockpit footer{border-top:0; margin-top:0; padding-top:28px}
.method summary{cursor:pointer; font-size:13px; color:var(--ink-3)}
.method p{font-size:12.5px; color:var(--ink-3); margin-top:10px}

@media (max-width:720px){
  .hero-val{font-size:52px}
  .seg-path{width:96px}
  .seg-fare{display:none}
  .rank{flex-wrap:wrap}
  .rank-name{width:100%}
  .rank-to, .rank-val{width:auto}
}

/* Later than the block above on purpose: these override the older card-era
   rules that still applied to elements the redesign reuses. */
.seg-line .seg-n{background:none; padding:0; letter-spacing:0; font-weight:400;
  color:var(--ink-3); font-size:11.5px}
/* One accent, used on the answer. An alliance is a fact about a carrier, not a
   thing to colour in eleven places. */
.picksel .aln, .rank .aln{background:none; border:0; padding:0; color:var(--ink-3);
  font-weight:400; letter-spacing:.04em}
.picksel-name .aln{margin-left:8px; font-size:11px}
/* The filters sit beside a heading, so they read as text, not as buttons. */
.tabs button.act{min-height:32px; padding:5px 10px; border-color:transparent;
  background:none; color:var(--ink-3); font-size:12.5px}
.tabs button.act:hover{color:var(--ink)}
.tabs button.act.primary{background:none; color:var(--jade); font-weight:600}
.tabs button.act .tab-n{opacity:.6; margin-left:5px}
/* The balance is an aside to the answer, not a row of its own. */
.hero .prog-bal{margin-top:26px; padding-top:18px; justify-content:flex-start; gap:14px}
.hero .prog-bal label{font-size:12.5px; color:var(--ink-3); text-transform:none;
  letter-spacing:0; font-family:inherit; white-space:nowrap}
.hero-alt{display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.hero-alt button.act{min-height:34px; padding:6px 12px; font-size:13px}
button.act.quiet{background:none}
.hero{padding-top:36px}
/* The current page marker in the nav is a leftover pill; a weight change and
   the accent say the same thing more quietly. */
.nav a.sel{background:none; border-color:transparent; color:var(--jade); font-weight:600}

/* ===========================================================================
 * Density pass. The first cut of the redesign read as empty: the padding was
 * doing the work that content should do. Two columns so the answer sits beside
 * the itinerary, a tighter vertical rhythm, and the summary given a surface of
 * its own so it has weight without the page going back to fifteen boxes.
 * ======================================================================== */
.wrap{max-width:1180px}
.masthead{padding-top:40px}
.masthead h1{font-size:27px; margin-bottom:8px}
.nav{margin-top:20px}
.picksel{margin-top:18px}
.picksel-btn{min-height:48px; padding:11px 2px}

.cols{display:grid; grid-template-columns:minmax(0,1fr) 344px; gap:34px;
  align-items:start; margin-top:24px}
.col-side{position:sticky; top:18px}

/* The summary is the one thing on the page with a surface. */
.hero{padding:20px 20px 18px; border:1px solid var(--line); border-radius:14px;
  background:var(--surface); box-shadow:var(--shadow)}
.hero-val{font-size:44px}
.hero-val small{font-size:15px; margin-left:7px}
.hero-cur{margin-top:6px; font-size:12.5px; color:var(--ink-3)}
.hero-tier{margin-top:14px; gap:8px}
.hero-tier b{font-size:15px}
.hero-tier span{font-size:12.5px}
.hero .rail{margin-top:9px; max-width:none}
.hero .ladder{margin-top:12px}
.hero-alt{margin-top:14px; padding-top:12px; font-size:12.5px; gap:8px}
.hero .prog-bal{margin-top:14px; padding-top:12px; justify-content:space-between; gap:8px}
.hero .caveat{margin-top:12px}

.block{padding:0 0 26px; border-bottom:0}
.block + .block{padding-top:26px; border-top:1px solid var(--line)}
.blockhead{margin-bottom:10px}
.seg-line{min-height:44px; padding:5px 2px; gap:12px}
.rank{padding:9px 2px}
.rank-name{width:170px; font-size:13.5px}
.seg-acts{margin-top:10px}
.cockpit footer{padding-top:22px; margin-top:26px; border-top:1px solid var(--line)}

@media (max-width:980px){
  .cols{grid-template-columns:1fr; gap:22px}
  .col-side{position:static; order:-1}      /* the answer first on a phone */
}
.cols{margin-top:16px}
@media (max-width:980px){
  /* A grid track of 1fr has min-width:auto, so the widest thing inside it -
     the accumulation table - stretches the whole page rather than scrolling in
     its own box. minmax(0,1fr) is what stops that. */
  .cols{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:460px){
  /* "Earning charts" pushed the nav onto a second line on a phone. */
  .nav a{font-size:11.5px; padding:6px 9px}
  .picksel-sub{display:none}
  .masthead h1{font-size:24px}
}

/* ===========================================================================
 * Data Cockpit — a dark three-column workspace for the calculator.
 *
 * Scoped to .cockpit so the Programmes and Earning charts pages, which share
 * this stylesheet, keep the light treatment until they get the same pass.
 * Tokens are redefined here rather than at :root for the same reason.
 * ======================================================================== */
.cockpit{
  --page:#071522; --rail:#081827; --panel:#0e2233; --panel-raised:#12283b;
  --border:rgba(255,255,255,.10);
  --text:#f5f8fc; --text-muted:#a8bac9;
  --blue:#49a8ff; --green:#35d783; --amber:#ffc247; --danger:#ff6b6b;
  --radius-sm:8px; --radius-md:12px; --radius-lg:16px;

  /* The shared components below still read the older names. */
  --ground:var(--page); --surface:var(--panel); --surface-2:var(--panel-raised);
  --sunken:#0a1c2b; --ink:var(--text); --ink-2:var(--text-muted); --ink-3:#8fa4b6;
  --line:var(--border); --line-strong:rgba(255,255,255,.18);
  --jade:var(--blue); --jade-soft:rgba(73,168,255,.14); --jade-ink:#9fd0ff; --on-jade:#04121e;
  --amber-soft:rgba(255,194,71,.14);
  --shadow:0 1px 2px rgba(0,0,0,.4);

  display:grid; grid-template-columns:220px minmax(0,1fr) 400px;
  /* min-height with auto rows makes the tracks share the spare height, which
     left a tall empty band above the collapsed menu bar. */
  align-content:start; min-height:100vh; background:var(--page); color:var(--text);
  font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
.cockpit *:focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:3px}
.skip{position:absolute; left:-9999px}
.skip:focus{left:12px; top:12px; z-index:9; background:var(--panel-raised);
  color:var(--text); padding:10px 14px; border-radius:var(--radius-sm)}

/* Rail --------------------------------------------------------------------- */
.navtop{display:none}
.navrail{grid-column:1; position:sticky; top:0; align-self:start; height:100vh;
  background:var(--rail); border-right:1px solid var(--border);
  padding:22px 16px; display:flex; flex-direction:column; gap:26px; overflow:auto}
.navrail-brand b{display:block; font-size:15px; letter-spacing:-.01em}
.navrail-brand span{display:block; margin-top:3px; font-size:12px; color:var(--text-muted)}
.navrail-nav{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px}
.navrail-nav a{display:flex; align-items:center; gap:10px; min-height:44px; padding:0 10px;
  border-radius:var(--radius-sm); color:var(--text-muted); text-decoration:none; font-size:13.5px}
.navrail-nav a i{font-style:normal; width:18px; text-align:center; opacity:.8}
.navrail-nav a:hover{background:var(--panel); color:var(--text)}
.navrail-nav a.sel{background:var(--panel-raised); color:var(--text); font-weight:600}
/* Present but not available: still readable at 3.6:1, plainly recessive
   against the 9:1 of a live item, and immune to the hover treatment. */
.navrail-nav a.off{opacity:.55; cursor:default}
.navrail-nav a.off:hover{background:none; color:var(--text-muted)}
.navrail-prog{margin-top:auto; border-top:1px solid var(--border); padding-top:16px;
  display:flex; flex-direction:column; gap:4px}
.navrail-lab{font-size:10.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--text-muted)}
.navrail-progname{font-size:14px; font-weight:600}
.navrail-progsub{font-size:11.5px; color:var(--text-muted); line-height:1.4}
.navrail-prog .act{margin-top:8px; width:100%}

/* Workspace ---------------------------------------------------------------- */
.work{grid-column:2; min-width:0; padding:26px 28px 40px}
.workhead{display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; flex-wrap:wrap; margin-bottom:16px}
.workhead h1{font-size:22px; margin:0; letter-spacing:-.015em}
.blockhead-h{font-size:15px; margin:0 0 12px}
#pickBody{background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:18px; margin-bottom:22px}

/* Timeline ----------------------------------------------------------------- */
.cockpit .segs{display:flex; flex-direction:column; gap:10px; position:relative}
.cockpit .segs .seg{background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-md); box-shadow:none; margin:0; position:relative;
  padding-left:14px}
.cockpit .segs .seg::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px;
  border-radius:3px 0 0 3px; background:var(--border)}
.cockpit .segs .seg[data-state="confirmed"]::before{background:var(--green)}
.cockpit .segs .seg[data-state="estimated"]::before{background:var(--blue)}
.cockpit .segs .seg[data-state="missing"]::before{background:var(--amber)}
.seg-line{min-height:56px; gap:12px; padding:9px 12px 9px 2px; color:var(--text)}
.seg-line:hover{background:var(--panel-raised)}
.seg-meta{display:flex; gap:8px; align-items:center; flex-wrap:wrap; flex:1; min-width:0}
.seg-body{padding:2px 12px 16px 2px}
.chipstate{display:inline-flex; align-items:center; gap:5px; font-size:11px;
  border-radius:999px; padding:2px 9px; border:1px solid var(--border);
  color:var(--text-muted); white-space:nowrap}
.chipstate::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor}
.chipstate.confirmed{color:var(--green); border-color:rgba(53,215,131,.35); background:rgba(53,215,131,.10)}
.chipstate.estimated{color:var(--blue); border-color:rgba(73,168,255,.35); background:rgba(73,168,255,.10)}
.chipstate.missing{color:var(--amber); border-color:rgba(255,194,71,.35); background:rgba(255,194,71,.10)}
.chipstate.withheld{color:var(--danger); border-color:rgba(255,107,107,.35); background:rgba(255,107,107,.10)}
.addcard{display:flex; align-items:center; justify-content:center; gap:8px; min-height:56px;
  border:1px dashed var(--line-strong); border-radius:var(--radius-md);
  background:none; color:var(--text-muted); font:inherit; font-size:13.5px; cursor:pointer; width:100%}
.addcard:hover{border-color:var(--blue); color:var(--blue)}

/* Status panel ------------------------------------------------------------- */
.side{grid-column:3; min-width:0; padding:26px 26px 40px 0;
  position:sticky; top:0; align-self:start; max-height:100vh; overflow:auto}
.hero{background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:18px; box-shadow:none}
.hero-val{font-size:42px; color:var(--text)}
.hero-val small{color:var(--text-muted)}
.reqs{margin-top:16px; display:flex; flex-direction:column; gap:10px}
.req{background:var(--panel-raised); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:11px 12px}
.req-top{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.req-name{font-size:12.5px; color:var(--text)}
.req-num{font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--text-muted); white-space:nowrap}
.req-bar{margin-top:7px; height:4px; border-radius:2px; background:rgba(255,255,255,.08); overflow:hidden}
.req-bar i{display:block; height:100%; border-radius:2px; background:var(--blue)}
.req.ok .req-bar i{background:var(--green)}
.req.no .req-bar i{background:var(--amber)}
.req-note{margin:7px 0 0; font-size:11.5px; color:var(--text-muted); line-height:1.5}
.req-or{font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--text-muted); text-align:center; margin:2px 0}
.withheld{border-color:rgba(255,107,107,.4); background:rgba(255,107,107,.08)}
.withheld b{display:block; font-size:13px; color:var(--danger); margin-bottom:4px}
.assume{margin-top:12px; font-size:11.5px; color:var(--amber); line-height:1.5}

/* Alternatives ------------------------------------------------------------- */
.alts{margin-top:16px; background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:16px 18px 18px}
.alts h2{font-size:12px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--text-muted); margin:0 0 8px}
.alts .rank{padding:10px 0; gap:10px; flex-wrap:wrap; border-top-color:var(--border)}
.alts .rank-name{width:100%; font-size:13px}
.alts .rank-bar{background:rgba(255,255,255,.08)}
.alts .rank-bar i{background:var(--blue)}
.alts .rank-pct{color:var(--text)}
.alts .rank-to,.alts .rank-val{width:auto; font-size:11.5px}
#altsMore{margin-top:12px; width:100%}
/* A silhouette of the ranking, dimmed to well below any real row. It stands
   in for the layout; it must never look like data that failed to load. */
.ghosts{display:flex; flex-direction:column; gap:14px; margin-top:16px}
.ghost{display:flex; flex-direction:column; gap:8px}
.ghost i{display:block; border-radius:3px; background:currentColor; color:var(--text-muted);
  opacity:.16}
.ghost-name{height:8px; width:var(--w)}
.ghost-bar{height:4px; width:100%; opacity:.1}

/* Audit -------------------------------------------------------------------- */
.audit{margin-top:26px}
.audit summary{cursor:pointer; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.audit summary h2{display:inline; font-size:13px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--text-muted); margin:0}
.audit .tablewrap{margin-top:12px; background:var(--panel); border-color:var(--border)}
.cockpit table{color:var(--text)}
.cockpit thead th{color:var(--text-muted); border-bottom-color:var(--border)}
.cockpit tbody td{border-top-color:var(--border)}

.cockpit footer{margin-top:30px; padding-top:20px; border-top:1px solid var(--border)}
.cockpit footer p, .cockpit .method p, .cockpit .method summary{color:var(--text-muted)}

/* Shared controls, restated for the dark surface ---------------------------- */
.cockpit input, .cockpit select{background:var(--panel-raised); color:var(--text);
  border-color:var(--line-strong)}
.cockpit button.act{background:var(--panel-raised); color:var(--text); border-color:var(--line-strong)}
.cockpit button.act:hover{border-color:var(--blue); color:var(--blue)}
.cockpit button.act.primary{background:var(--blue); border-color:var(--blue); color:#04121e}
.cockpit button.act.quiet{background:none; color:var(--text-muted); border-color:var(--border)}
.cockpit .tabs button.act{background:none; border-color:transparent; color:var(--text-muted)}
.cockpit .tabs button.act.primary{background:none; color:var(--blue)}
.cockpit .pick{background:var(--panel-raised); border-color:var(--border); color:var(--text)}
.cockpit .pick.sel{border-color:var(--blue); background:rgba(73,168,255,.12)}
.cockpit .combo-panel{background:var(--panel-raised); border-color:var(--line-strong)}
.cockpit .navrail-nav a.sel{color:var(--text)}

@media (max-width:1179px){
  .cockpit{grid-template-columns:minmax(0,1fr) 360px}
  .navtop{display:flex; grid-column:1 / -1; align-items:center; gap:12px;
    padding:12px 20px; border-bottom:1px solid var(--border); background:var(--rail)}
  .navtop-name{font-weight:600; font-size:14px}
  .navtoggle{display:flex; align-items:center; gap:8px; min-height:44px; padding:0 12px;
    background:var(--panel-raised); border:1px solid var(--border); border-radius:var(--radius-sm);
    color:var(--text); font:inherit; font-size:13px; cursor:pointer}
  .navtoggle-bars{width:14px; height:2px; background:currentColor; box-shadow:0 5px 0 currentColor,0 -5px 0 currentColor}
  .navrail{grid-column:1 / -1; position:static; height:auto; flex-direction:column;
    border-right:0; border-bottom:1px solid var(--border)}
  .navrail[hidden]{display:none}
  .navrail-prog{margin-top:16px}
  .work{grid-column:1; padding:20px}
  .side{grid-column:2; padding:20px 20px 40px 0}
}
@media (max-width:759px){
  .cockpit{grid-template-columns:minmax(0,1fr); padding:0 14px 30px}
  /* Calculator only: its panels stop being boxes so their contents can be
     ordered individually - status above the itinerary, alternatives and the
     audit below it. The two-column pages have nothing to reorder, and these
     rules reaching them put their table above their own title and pushed the
     menu to the bottom of the page. */
  .cockpit:not(.cockpit-2col) .work,
  .cockpit:not(.cockpit-2col) .side{display:contents}
  .navtop{order:1; margin:0 -14px}
  .navrail{order:1; margin:0 -14px}
  .cockpit-2col .work{order:2; grid-column:1}
  #pickBody{order:2; margin-top:14px}
  .hero{order:3; margin-top:14px}
  .workhead{order:4; margin-top:20px}
  .cockpit-2col .workhead{order:0; margin-top:16px}
  .segs{order:5}
  #segHidden{order:5}
  .cockpit .rowbtns{order:6}
  #fxcard{order:6}
  .alts{order:7}
  .audit{order:8}
  .cockpit:not(.cockpit-2col) footer{order:9}
  .hero-val{font-size:34px}
  /* Route and earning on the first line, everything the calculation read on
     the second, rather than squeezing both into one flex row. */
  .seg-line{flex-wrap:wrap; padding:10px 10px 10px 2px; row-gap:6px}
  .seg-earn{order:2; margin-left:auto}
  .seg-meta{order:3; flex:0 0 100%; min-width:100%}
  /* An earlier breakpoint hid this; on the cockpit it is the audit trail. */
  .seg-fare{display:block; white-space:normal; overflow:visible}
}
/* .rail-fill is absolutely positioned, so its container has to be one; without
   this it stretched to the sticky panel behind it. */
.cockpit .rail-bar{position:relative; height:5px; border-radius:3px;
  background:rgba(255,255,255,.08); margin-top:9px; overflow:hidden}
.cockpit .rail-bar .rail-fill{height:100%; background:var(--blue); border-radius:3px}
.cockpit .hero-tier{margin-top:14px; display:flex; gap:10px; align-items:baseline; flex-wrap:wrap}
.cockpit .hero-tier b{font-size:16px}
.cockpit .hero-tier span{font-size:12.5px; color:var(--text-muted)}
.rank-flags{display:flex; gap:6px; flex-wrap:wrap; width:100%; margin-top:2px}
.cockpit .rownote{color:var(--text-muted); margin-top:5px}
.cockpit .caveat summary{color:var(--amber)}
.cockpit .caveat p{color:var(--text-muted)}
.cockpit #fxcard{margin-top:18px; padding:14px 16px; background:var(--panel);
  border:1px solid var(--border); border-radius:var(--radius-md)}
.cockpit #fxcard .caption{margin-top:10px}
.cockpit .audit{margin-top:26px; padding-top:22px; border-top:1px solid var(--border)}
/* Nine columns laid out to content overflowed the workspace; fixed proportions
   keep the whole audit visible, with the note column doing the wrapping. */
.cockpit #accTable{table-layout:fixed; min-width:0}
.cockpit #accTable th, .cockpit #accTable td{white-space:normal; vertical-align:top;
  padding:9px 10px; overflow-wrap:anywhere}
/* Column headings are short words; breaking them mid-word helps nobody. */
.cockpit #accTable th{overflow-wrap:normal; word-break:keep-all}
.cockpit #accTable th:nth-child(1),.cockpit #accTable td:nth-child(1){width:7%}
.cockpit #accTable th:nth-child(2),.cockpit #accTable td:nth-child(2){width:8%}
.cockpit #accTable th:nth-child(3),.cockpit #accTable td:nth-child(3){width:12%}
.cockpit #accTable th:nth-child(4),.cockpit #accTable td:nth-child(4){width:19%}
.cockpit #accTable th:nth-child(5),.cockpit #accTable td:nth-child(5){width:9%}
.cockpit #accTable th:nth-child(6),.cockpit #accTable td:nth-child(6){width:8%}
.cockpit #accTable th:nth-child(7),.cockpit #accTable td:nth-child(7){width:11%}
.cockpit #accTable th:nth-child(8),.cockpit #accTable td:nth-child(8){width:10%}
.cockpit #accTable th:nth-child(9),.cockpit #accTable td:nth-child(9){width:16%}
@media (max-width:759px){
  /* Rows become cards: each cell carries its own label. */
  .cockpit #accTable, .cockpit #accTable tbody, .cockpit #accTable tr, .cockpit #accTable td{display:block; width:auto}
  .cockpit #accTable thead{position:absolute; left:-9999px}
  .cockpit #accTable tr{border:1px solid var(--border); border-radius:var(--radius-md);
    margin-bottom:10px; padding:6px 4px; background:var(--panel-raised)}
  .cockpit #accTable td{border:0; display:flex; justify-content:space-between; gap:12px}
  .cockpit #accTable td::before{content:attr(data-h); color:var(--text-muted); font-size:11.5px}
  .cockpit #accTable td:nth-child(n){width:auto}
}

/* Programmes and Earning charts: the same shell without a status panel. */
.cockpit-2col{grid-template-columns:220px minmax(0,1fr)}
.cockpit-2col .work{grid-column:2}
.cockpit-2col .workhead{display:block; margin-bottom:20px}
.cockpit-2col .workhead .caption{max-width:70ch}
.cockpit-2col section{margin-bottom:28px}
.cockpit .sec-head h2{font-size:13px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-muted); margin:0 0 4px}
.cockpit .sec-head .sec-note{color:var(--text-muted)}
.cockpit .callout{background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:16px 18px}
.cockpit .callout p{color:var(--text-muted)}
.cockpit .callout b{color:var(--text)}
.cockpit .cabin-row td{background:var(--panel-raised); color:var(--text); font-weight:600}
.cockpit tbody tr.dim td{color:var(--text-muted)}
.cockpit .fam{color:var(--text-muted)}
/* Content links are blue; the rail has its own states and must not inherit
   it, or every nav item reads as though it were the active one. */
.cockpit .work a, .cockpit .ext, .cockpit .chartlink{color:var(--blue)}
.cockpit .offchip{background:var(--panel-raised); border-color:var(--border); color:var(--text-muted)}
.cockpit .zones .card, .cockpit .card{background:var(--panel); border-color:var(--border)}
@media (max-width:1179px){
  .cockpit-2col{grid-template-columns:minmax(0,1fr)}
  .cockpit-2col .work{grid-column:1}
}

/* The two columns that carry sentences read left-to-right; right-aligning them
   made every row start at a different place. */
.cockpit #progTable th, .cockpit #progTable td{text-align:left}
.cockpit #progTable .rownote{max-width:none}
@media (max-width:759px){
  /* Five columns cannot share 390px; each row becomes a card whose cells carry
     their own labels, the same treatment the calculation audit gets. */
  .cockpit #progTable, .cockpit #progTable tbody,
  .cockpit #progTable tr, .cockpit #progTable td{display:block; width:auto}
  .cockpit #progTable thead{position:absolute; left:-9999px}
  .cockpit #progTable tr{border:1px solid var(--border); border-radius:var(--radius-md);
    margin-bottom:10px; padding:8px 10px; background:var(--panel)}
  .cockpit #progTable tr.cabin-row{background:var(--panel-raised); padding:8px 12px}
  /* A cell holds loose text and inline spans; a two-column grid would put each
     of them on its own row, so the label stacks above the value instead. */
  .cockpit #progTable td{border:0; padding:6px 0; display:block}
  .cockpit #progTable td + td{border-top:1px solid var(--border)}
  .cockpit #progTable td::before{content:attr(data-h); display:block; margin-bottom:2px;
    color:var(--text-muted); font-size:11px; letter-spacing:.05em; text-transform:uppercase}
  .cockpit #progTable tr.cabin-row td{display:block}
  .cockpit #progTable tr.cabin-row td::before{content:none}
  .cockpit .tablewrap{border:0; background:none; box-shadow:none}
}

/* Review follow-ups: labels were 10px; the panel took width the flight rows
   needed at laptop sizes. */
.cockpit .field label{font-size:11.5px}
@media (min-width:1180px) and (max-width:1366px){
  .cockpit{grid-template-columns:200px minmax(0,1fr) 352px}
}

/* Tier badges -------------------------------------------------------------
 * Each programme's own name for a rung, in the material that name claims.
 * Every colour clears 4.5:1 against its own tinted pill on both panel shades,
 * so a badge is readable before it is decorative. The metal is one set of
 * colour-only classes; the pill adds its ground on top, so the same tier can
 * appear as a badge or as a coloured mention without a second palette. */
.cockpit .tm-base{color:#9fb0c0}
.cockpit .tm-bronze{color:#d99b66}
.cockpit .tm-silver{color:#c2ccd4}
.cockpit .tm-gold{color:#ebbe5c}
.cockpit .tm-platinum{color:#e3edf8}
.cockpit .tm-diamond{color:#7fdcff}
.cockpit .tm-sapphire{color:#7aabff}
.cockpit .tm-crystal{color:#a9dde9}
.cockpit .tm-titanium{color:#c0b7d6}

.cockpit .tier{display:inline-block; padding:2px 9px; border-radius:999px;
  font-size:11px; font-weight:600; letter-spacing:.015em; line-height:1.55;
  border:1px solid transparent; white-space:nowrap; vertical-align:1px}
.cockpit .tier.tm-base{background:rgba(159,176,192,.12); border-color:rgba(159,176,192,.28)}
.cockpit .tier.tm-bronze{background:rgba(217,155,102,.13); border-color:rgba(217,155,102,.32)}
.cockpit .tier.tm-silver{background:rgba(194,204,212,.12); border-color:rgba(194,204,212,.30)}
.cockpit .tier.tm-gold{background:rgba(235,190,92,.13); border-color:rgba(235,190,92,.32)}
.cockpit .tier.tm-platinum{background:rgba(227,237,248,.12); border-color:rgba(227,237,248,.30)}
.cockpit .tier.tm-diamond{background:rgba(127,220,255,.13); border-color:rgba(127,220,255,.32)}
.cockpit .tier.tm-sapphire{background:rgba(122,171,255,.13); border-color:rgba(122,171,255,.32)}
.cockpit .tier.tm-crystal{background:rgba(169,221,233,.12); border-color:rgba(169,221,233,.30)}
.cockpit .tier.tm-titanium{background:rgba(192,183,214,.13); border-color:rgba(192,183,214,.32)}

/* A mention, not the subject: the metal without the ground. */
.cockpit .tiername{font-weight:600}

/* The headline badge is the panel's subject, so it carries more weight. */
.cockpit .hero-tier b{font-weight:400}
.cockpit .hero-tier .tier{font-size:13px; padding:4px 13px; letter-spacing:.02em}
.cockpit .rank-name .tier{font-size:10.5px; padding:1px 8px}

/* The cockpit's panels are dark, so its empty states get their own surface
   rather than the light base's. */
.cockpit .blank{border-color:var(--border); background:var(--panel)}
.cockpit .blank-badge{background:rgba(73,168,255,.13); color:var(--blue)}
.cockpit .blank b{color:var(--text)}
.cockpit .blank p{color:var(--text-muted)}
.cockpit .alts .blank{border:0; background:none; padding:0}

/* hidden means hidden: a later display rule must not override the attribute. */
[hidden]{display:none !important}

/* Icons: inline SVG drawn in currentColor, so every state colours its own. */
.ic{width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; flex:none; vertical-align:-2px}
.navrail-nav .ic{width:16px; height:16px; opacity:.85}
.cockpit button.act:not([hidden]){display:inline-flex; align-items:center;
  justify-content:center; gap:7px}
.addcard .ic{width:16px; height:16px}
.req-name .ic{width:13px; height:13px; margin-right:5px; color:var(--green)}
.withheld b .ic{width:14px; height:14px; margin-right:6px; vertical-align:-2px}
.caveat summary .ic{width:13px; height:13px; margin-right:5px}
.caveat summary::before{content:none}
