/* Adapted from the N57711 dashboard artifact. The palette, type scale and
   chart styling are that design; everything from "flight picker" down is new
   for the site — 94 flights need a real selector, and the artifact had no
   download or upload surface. */
* { box-sizing: border-box; }
html { color-scheme: light; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:root {
    color-scheme: light;
    --plane:      #e9edf1;
    --surface:    #ffffff;
    --surface-2:  #f4f7f9;
    --ink:        #0d1519;
    --ink-2:      #55636c;
    --muted:      #8a959d;
    --grid:       #e4e9ed;
    --axis:       #c2cbd2;
    --hairline:   rgba(13,21,25,0.11);
    --accent:     #4a3aa7;
    --accent-ink: #ffffff;
    --band:       rgba(74,58,167,0.07);

    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
    --s4: #eda100; --s5: #e87ba4; --s6: #008300;

    --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
    --good-ink: #046b04; --critical-ink: #a92727; --serious-ink: #9d4a25;

    --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #5598e7;
    --seq-4: #2a78d6; --seq-5: #1c5cab; --seq-6: #0d366b;

    --shadow: 0 1px 2px rgba(13,21,25,.05), 0 6px 18px -12px rgba(13,21,25,.22);
    --radius: 7px;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --cond: "Saira Condensed", "IBM Plex Sans", system-ui, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --plane:      #080b0e;
      --surface:    #141a20;
      --surface-2:  #1b232a;
      --ink:        #eef3f7;
      --ink-2:      #a3b0b9;
      --muted:      #76828c;
      --grid:       #232c34;
      --axis:       #35404a;
      --hairline:   rgba(255,255,255,0.11);
      --accent:     #9085e9;
      --accent-ink: #0d1519;
      --band:       rgba(144,133,233,0.10);
      --s1: #3987e5; --s2: #d95926; --s3: #199e70;
      --s4: #c98500; --s5: #d55181; --s6: #008300;
      --good-ink: #0ca30c; --critical-ink: #e06a6a; --serious-ink: #ec835a;
      --seq-1: #184f95; --seq-2: #256abf; --seq-3: #2a78d6;
      --seq-4: #5598e7; --seq-5: #9ec5f4; --seq-6: #cde2fb;
      --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 22px -14px rgba(0,0,0,.8);
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --plane:      #080b0e;
    --surface:    #141a20;
    --surface-2:  #1b232a;
    --ink:        #eef3f7;
    --ink-2:      #a3b0b9;
    --muted:      #76828c;
    --grid:       #232c34;
    --axis:       #35404a;
    --hairline:   rgba(255,255,255,0.11);
    --accent:     #9085e9;
    --accent-ink: #0d1519;
    --band:       rgba(144,133,233,0.10);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70;
    --s4: #c98500; --s5: #d55181; --s6: #008300;
    --good-ink: #0ca30c; --critical-ink: #e06a6a; --serious-ink: #ec835a;
    --seq-1: #184f95; --seq-2: #256abf; --seq-3: #2a78d6;
    --seq-4: #5598e7; --seq-5: #9ec5f4; --seq-6: #cde2fb;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 22px -14px rgba(0,0,0,.8);
  }

  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--plane);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  .wrap { max-width: 1320px; margin: 0 auto; padding-inline: 20px; padding-block: 0 56px; }

  /* ---------- masthead ---------- */
  .masthead {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 24px;
    padding-block: 26px 18px;
    border-bottom: 1px solid var(--hairline);
  }
  .reg {
    font-family: var(--cond); font-weight: 700; font-size: 40px; line-height: .95;
    letter-spacing: .01em; margin: 0;
  }
  .reg small { display:block; font-size: 11px; font-weight:600; letter-spacing:.16em;
    text-transform: uppercase; color: var(--muted); font-family: var(--sans); margin-bottom: 5px; }
  .mast-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; align-items: flex-end; }
  .mm { display: flex; flex-direction: column; gap: 1px; }
  .mm b { font-family: var(--mono); font-size: 13px; font-weight: 500; }
  .mm span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

  /* ---------- session rail ---------- */
  .filterbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding-block: 16px; position: sticky; top: 0; z-index: 20;
    background: var(--plane); border-bottom: 1px solid var(--hairline);
  }
  .rail-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
  .sess {
    display: flex; flex-direction: column; gap: 1px; text-align: left;
    padding: 7px 12px; border-radius: var(--radius); cursor: pointer;
    border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
    font-family: inherit; transition: border-color .12s, background .12s;
  }
  .sess:hover { border-color: var(--axis); }
  .sess:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .sess[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .sess[aria-pressed="true"] .s-sub { color: var(--accent-ink); opacity: .78; }
  .sess .s-top { font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .02em; }
  .sess .s-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }
  .ghost {
    margin-left: auto; padding: 7px 13px; border-radius: var(--radius);
    border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
    font-family: var(--sans); font-size: 12px; cursor: pointer;
  }
  .ghost:hover { color: var(--ink); border-color: var(--axis); }
  .ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* ---------- stat tiles ---------- */
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px,1fr)); gap: 1px;
    background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius);
    overflow: hidden; margin-top: 22px; }
  .tile { background: var(--surface); padding: 13px 15px 14px; display:flex; flex-direction:column; gap:2px; }
  .tile .t-lab { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
  .tile .t-val { font-family: var(--cond); font-weight: 600; font-size: 27px; line-height: 1.08; }
  .tile .t-val u { text-decoration: none; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
  .tile .t-sub { font-size: 11.5px; color: var(--ink-2); }
  .pill { display:inline-flex; align-items:center; gap:5px; font-size: 11px; font-weight: 500;
    padding: 1px 7px 1px 5px; border-radius: 99px; border: 1px solid currentColor; width: max-content; }
  .pill.ok { color: var(--good-ink); } .pill.warn { color: var(--serious-ink); } .pill.bad { color: var(--critical-ink); }
  .pill i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; display:block; }

  /* ---------- tabs ---------- */
  .tabs { display: flex; gap: 2px; margin-top: 26px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
  .tab { appearance: none; border: 0; background: none; cursor: pointer; color: var(--ink-2);
    font-family: var(--cond); font-size: 16px; font-weight: 600; letter-spacing: .04em;
    padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .tab:hover { color: var(--ink); }
  .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
  .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .panel[hidden] { display: none; }

  /* ---------- readout ---------- */
  .readout {
    margin-top: 18px; border: 1px solid var(--hairline); border-radius: var(--radius);
    background: var(--surface-2); padding: 11px 14px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(92px,1fr)); gap: 9px 14px;
  }
  .ro { display: flex; flex-direction: column; gap: 0; min-width: 0; }
  .ro span { font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ro b { font-family: var(--mono); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .ro b.dim { color: var(--muted); font-weight: 400; }
  .ro.head { grid-column: span 2; }
  .ro.head b { color: var(--accent); white-space: nowrap; }

  /* ---------- charts ---------- */
  .chart { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
    margin-top: 14px; padding: 12px 14px 10px; box-shadow: var(--shadow); }
  .chart.tight { margin-top: 8px; }
  .ch-head { display: flex; align-items: baseline; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 6px; }
  .ch-title { font-family: var(--cond); font-weight: 600; font-size: 16.5px; letter-spacing: .03em; margin: 0; }
  .ch-unit { font-size: 11px; color: var(--muted); font-family: var(--mono); }
  .ch-note { font-size: 11.5px; color: var(--ink-2); margin-left: auto; }
  .legend { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-left: auto; }
  .lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2);
    font-family: var(--mono); cursor: pointer; user-select: none; border:0; background:none; padding:0; }
  .lg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .lg i { width: 15px; height: 2.5px; border-radius: 2px; background: currentColor; display: block; }
  .lg.off { opacity: .34; }
  .cbox { position: relative; width: 100%; }
  .cbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .cbox canvas.ov { pointer-events: none; }

  .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
  .grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  @media (min-width: 620px) { .grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
  @media (min-width: 940px) { .grid3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
  .grid2 > .chart, .grid3 > .chart { margin-top: 0; }

  /* ---------- notes / findings ---------- */
  .note { margin-top: 18px; border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
    border-radius: var(--radius); background: var(--surface); padding: 13px 16px; }
  .note h3 { font-family: var(--cond); font-size: 16px; letter-spacing: .03em; margin: 0 0 5px; }
  .note p { margin: 0 0 7px; color: var(--ink-2); max-width: 68ch; }
  .note p:last-child { margin-bottom: 0; }
  .note code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2);
    padding: 1px 5px; border-radius: 3px; }

  /* ---------- table ---------- */
  .tablewrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--hairline);
    border-radius: var(--radius); background: var(--surface); }
  table { border-collapse: collapse; width: 100%; min-width: 720px; }
  th, td { text-align: right; padding: 8px 12px; font-variant-numeric: tabular-nums;
    font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
  th { font-family: var(--sans); font-size: 10px; letter-spacing: .11em; text-transform: uppercase;
    color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--hairline); }
  th:first-child, td:first-child { text-align: left; }
  tbody tr + tr td { border-top: 1px solid var(--grid); }
  tbody tr:hover td { background: var(--surface-2); }
  td.hot { color: var(--critical-ink); font-weight: 600; }
  td.dim { color: var(--muted); }

  .footer { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--hairline);
    font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 20px; }

  @media (max-width: 560px) {
    .reg { font-size: 30px; }
    .mast-meta { margin-left: 0; }
    .filterbar { position: static; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- flight picker ---------- */
/* The artifact showed 8 sessions as a row of buttons. There are 94 here and
   the airplane keeps flying, so the rail became one button that opens a
   filterable sheet, with prev/next for stepping through in order. */
.picker {
  display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 232px;
  padding: 7px 13px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.picker:hover { border-color: var(--axis); }
.picker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.picker .p-top { font-family: var(--cond); font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.picker .p-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ghost.nav { padding: 7px 10px; font-size: 11px; line-height: 1; }
.ghost[disabled] { opacity: .38; cursor: default; }

.sheet {
  position: sticky; top: 62px; z-index: 30; margin-top: -1px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.sheet-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--hairline); background: var(--surface-2); flex-wrap: wrap; }
.sheet-head input[type=search] {
  flex: 1 1 190px; min-width: 0; padding: 6px 10px; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  font-family: var(--sans); font-size: 13px;
}
.sheet-head input[type=search]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.sheet-body { max-height: 52vh; overflow-y: auto; }
.mon { position: sticky; top: 0; background: var(--surface-2); color: var(--muted);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-block: 1px solid var(--hairline); }
.row {
  display: grid; grid-template-columns: 82px 52px 1fr auto; gap: 4px 12px; align-items: baseline;
  width: 100%; text-align: left; padding: 7px 12px; border: 0; background: none;
  color: var(--ink); font-family: var(--mono); font-size: 12.5px; cursor: pointer;
}
.row:hover { background: var(--surface-2); }
.row[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.row[aria-selected="true"] .r-dim, .row[aria-selected="true"] .r-file { color: var(--accent-ink); opacity: .8; }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.r-dim { color: var(--muted); }
.r-file { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-hot { color: var(--critical-ink); font-weight: 600; }

/* ---------- download bar ---------- */
.dlbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 14px; padding: 11px 13px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.dl {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--hairline);
  background: var(--surface-2); color: var(--ink); font-size: 12.5px; font-family: var(--sans);
}
.dl:hover { border-color: var(--axis); }
.dl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dl b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--ink-2); }
.dl.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dl.primary b { color: var(--accent-ink); opacity: .8; }
.dlbar .hint { font-size: 11.5px; color: var(--muted); margin-left: auto; }

/* ---------- upload ---------- */
.drop {
  margin-top: 14px; padding: 26px 18px; text-align: center;
  border: 1.5px dashed var(--axis); border-radius: var(--radius);
  background: var(--surface); color: var(--ink-2);
}
.drop.over { border-color: var(--accent); background: var(--band); }
.drop h3 { font-family: var(--cond); font-size: 18px; margin: 0 0 4px; color: var(--ink); }
.drop p { margin: 0 0 10px; font-size: 12.5px; max-width: 62ch; margin-inline: auto; }
.btn {
  padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-family: var(--sans);
  font-size: 13px; cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: default; }
.uplog { margin-top: 12px; font-family: var(--mono); font-size: 12px; }
.uplog div { padding: 3px 0; border-top: 1px solid var(--grid); display: flex; gap: 10px; }
.uplog .v { font-weight: 600; width: 78px; flex: none; }
.uplog .v.added { color: var(--good-ink); }
.uplog .v.duplicate, .uplog .v.undated { color: var(--muted); }
.uplog .v.replaced { color: var(--serious-ink); }
.uplog .v.error { color: var(--critical-ink); }
.bar { height: 4px; border-radius: 99px; background: var(--grid); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.loading { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }
.legmark { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }

/* ---------- narrow screens ---------- */
/* The dashboard gets used on a phone on the ramp as much as at a desk, so the
   breakpoints below are about reach and thumb targets, not just reflow. */
@media (max-width: 760px) {
  .wrap { padding-inline: 12px; padding-block: 0 40px; }
  .masthead { padding-block: 16px 12px; gap: 8px 16px; }
  .mast-meta { margin-left: 0; gap: 6px 16px; }
  /* Peak CHT and the date range are the two that earn their place on a phone;
     the rest is available a scroll away in All flights. */
  .mast-meta .mm:nth-child(3), .mast-meta .mm:nth-child(4) { display: none; }

  .filterbar { position: sticky; top: 0; padding-block: 10px; gap: 8px; }
  .picker { flex: 1 1 auto; min-width: 0; }
  .picker .p-top, .picker .p-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Thumb-sized, and ordered so the two arrows sit at the edges with the
     current flight between them. */
  .ghost.nav { padding: 11px 12px; }
  #pickCount { display: none; }
  #btnReset { flex: 0 0 auto; font-size: 11.5px; padding: 9px 10px; }
  /* Two lines of picker text is what pushes the sticky bar onto a second row;
     one line plus the time range reads the same and costs half the height. */
  .picker { padding: 6px 11px; }
  .picker .p-top { font-size: 15px; }

  .sheet { top: 58px; }
  .sheet-body { max-height: 62vh; }
  .row { grid-template-columns: 76px 50px 1fr auto; padding: 11px 12px; font-size: 13px; }

  .tiles { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); margin-top: 14px; }
  .tile { padding: 11px 12px 12px; }
  .tile .t-val { font-size: 24px; }

  .tabs { margin-top: 18px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 10px 12px; flex: 0 0 auto; }

  .readout { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 8px 10px; padding: 10px 11px; }
  .readout .ro b { font-size: 13px; }

  .chart { padding: 10px 10px 8px; }
  .ch-head { gap: 4px 10px; }
  .ch-title { font-size: 15px; }
  .legend { width: 100%; margin-left: 0; gap: 2px 10px; }
  .grid2, .grid3 { grid-template-columns: 1fr; gap: 10px; }

  .dlbar { gap: 7px; padding: 10px; }
  .dl { padding: 9px 12px; }
  .dlbar .hint { margin-left: 0; flex-basis: 100%; }

  .note { padding: 12px 13px; }
  .footer { gap: 4px 14px; }
  .footer span:nth-child(2) { display: none; }   /* drag-to-zoom hint: mouse wording */
}

@media (max-width: 420px) {
  .reg { font-size: 27px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readout .ro.head { grid-column: span 3; }
  .uplog div { flex-wrap: wrap; }
}

/* ---------- cruise settings ---------- */
.controls {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end;
  margin-top: 14px; padding: 13px 15px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.ctl { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ctl > label { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.ctl output { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 2px; border: 1px solid var(--hairline); border-radius: var(--radius); padding: 2px; }
.seg button {
  appearance: none; border: 0; background: none; cursor: pointer; color: var(--ink-2);
  font-family: var(--sans); font-size: 12px; padding: 5px 10px; border-radius: 5px; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ctl input[type=range] { width: 168px; accent-color: var(--accent); }
.qmeta { margin-left: auto; font-size: 11.5px; color: var(--muted); text-align: right; }

td.best { color: var(--good-ink); font-weight: 600; }
td.mix-LOP { color: var(--s3); } td.mix-ROP { color: var(--critical-ink); } td.mix-peak { color: var(--s4); }
tr.pick td { background: var(--band); }

.verdict { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); margin-top: 14px; }
.vcard { border: 1px solid var(--hairline); border-left: 3px solid var(--accent); border-radius: var(--radius);
  background: var(--surface); padding: 13px 15px; }
.vcard h4 { font-family: var(--cond); font-size: 15px; letter-spacing: .03em; margin: 0 0 3px; }
.vcard .big { font-family: var(--cond); font-weight: 600; font-size: 26px; line-height: 1.1; }
.vcard .big u { text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.vcard p { margin: 5px 0 0; font-size: 12px; color: var(--ink-2); }
.vcard.cool { border-left-color: var(--good); }
.vcard.warn { border-left-color: var(--serious); }
@media (max-width: 760px) {
  .controls { gap: 10px 14px; padding: 11px; }
  .ctl input[type=range] { width: 140px; }
  .qmeta { margin-left: 0; flex-basis: 100%; text-align: left; }
}

/* ---------- POH-style performance chart ---------- */
.poh { margin-top: 14px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--surface); overflow-x: auto; box-shadow: var(--shadow); }
.poh table { border-collapse: collapse; width: 100%; min-width: 660px; }
.poh th, .poh td { padding: 7px 10px; text-align: right; font-family: var(--mono);
  font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poh thead tr:first-child th { font-family: var(--cond); font-size: 14px; letter-spacing: .04em;
  text-align: center; color: var(--ink); border-bottom: 1px solid var(--hairline); padding-block: 9px; }
.poh thead tr:last-child th { font-family: var(--sans); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--hairline); }
.poh th.grp { border-left: 1px solid var(--hairline); }
.poh td.grp { border-left: 1px solid var(--grid); }
.poh td.alt, .poh th.alt { text-align: left; font-family: var(--cond); font-weight: 600; font-size: 14px; }
.poh tbody tr + tr td { border-top: 1px solid var(--grid); }
.poh tbody tr:hover td { background: var(--surface-2); }
.poh td.none { color: var(--muted); font-weight: 400; }
.poh td.thin { color: var(--muted); }
.poh td.hot { color: var(--critical-ink); }
.poh .best { background: var(--band); }
.poh caption { caption-side: bottom; padding: 10px 12px; text-align: left;
  font-family: var(--sans); font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--hairline); }
.cov { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.cov i { display: block; width: 34px; height: 5px; border-radius: 99px; background: var(--grid); overflow: hidden; position: relative; }
.cov i b { position: absolute; inset: 0 auto 0 0; background: var(--accent); display: block; }

/* ---------- ground track map ---------- */
/* Leaflet's own stylesheet loads first; these are the overrides that make it
   sit inside a chart card and follow the page's light/dark palette. */
#map { width: 100%; height: 440px; border-radius: calc(var(--radius) - 1px); background: var(--surface-2); }
@media (max-width: 760px) { #map { height: 340px; } }
.leaflet-container { font-family: var(--sans); background: var(--surface-2); }
.leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 86%, transparent) !important;
  color: var(--muted) !important; font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-bar a, .leaflet-control-layers {
  background: var(--surface) !important; color: var(--ink) !important;
  border-color: var(--hairline) !important;
}
.leaflet-bar a:hover { background: var(--surface-2) !important; }
.leaflet-control-layers-expanded { color: var(--ink) !important; font-size: 12.5px; padding: 8px 10px; }
.leaflet-control-layers-separator { border-color: var(--hairline) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface) !important; color: var(--ink) !important; box-shadow: var(--shadow) !important;
}
.leaflet-popup-content { font-family: var(--mono); font-size: 12px; }
.trk-end {
  display: block; width: 12px; height: 12px; border-radius: 99px;
  border: 2.5px solid var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.trk-end.start { background: var(--good); }
.trk-end.end   { background: var(--critical); }
.maplegend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin-top: 8px; font-size: 11.5px; color: var(--ink-2); }
.maplegend .ramp { display: flex; height: 7px; border-radius: 99px; overflow: hidden; width: 128px; }
.maplegend .ramp i { flex: 1; }
/* The partial-log note is a sentence, not a row of chips — flex layout was
   inserting gaps around the bold ident and stranding the full stop. */
#mappartial { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45; }
