/* Tokens follow docs/brand.md. Base / Ice White / Accent are FLOP's own palette. */
@font-face { font-family: 'Space Mono'; font-weight: 400; font-display: swap; src: url(fonts/space-mono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Space Mono'; font-weight: 700; font-display: swap; src: url(fonts/space-mono-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 600; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); }
:root {
  --base: #0A1128; --ice: #F5F7FA; --accent: #00B4D8;
  --panel: #111A36; --line: #1F2A4A; --muted: #8D97B2;
  --good: #3DDC84; --warn: #FFC857; --bad: #FF6B81;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--base); color: var(--ice); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
header, main, footer { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 28px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 34px; display: block; }
.tag { font: 400 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.sub { color: var(--muted); margin-top: 10px; }
.muted { color: var(--muted); font-size: 12px; font-weight: 400; }
a { color: var(--accent); text-underline-offset: 2px; }
h2 { font: 700 16px var(--mono); letter-spacing: -0.02em; margin: 0; }
section { margin: 28px 0; }
.notice { margin-top: 16px; padding: 10px 14px; border: 1px solid rgb(255 200 87 / 40%); background: rgb(255 200 87 / 8%); border-radius: 8px; color: var(--warn); }
.tabs { display: flex; gap: 4px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.tabs a { font: 700 13px var(--mono); color: var(--muted); text-decoration: none; padding: 8px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ice); }
.tabs a.on { color: var(--ice); border-bottom-color: var(--ice); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font: 700 24px var(--mono); letter-spacing: -0.03em; margin-top: 4px; }
.card .d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card .d:empty { display: none; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
input[type=search] { flex: 1 1 200px; max-width: 300px; margin-left: auto; background: var(--panel); border: 1px solid var(--line); color: var(--ice); border-radius: 8px; padding: 7px 10px; font: inherit; }
input[type=search]::placeholder { color: var(--muted); }
input[type=search]:focus { outline: 1px solid var(--accent); }
input[type=checkbox] { accent-color: var(--accent); }
.chk { color: var(--muted); font-size: 13px; user-select: none; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 9px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child, td.l, th.l { text-align: left; }
thead th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font: 400 11px var(--mono); }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover, th.on { color: var(--ice); }
th.on { font-weight: 700; }
tbody tr:hover { background: rgb(245 247 250 / 3%); }
tbody tr:last-child td { border-bottom: none; }
.addr { white-space: nowrap; font: 400 12px var(--mono); color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pill { font: 400 11px var(--mono); border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); } .dim { color: var(--muted); }
.more { text-align: center; margin-top: 12px; }
button { background: var(--panel); border: 1px solid var(--line); color: var(--ice); border-radius: 8px; padding: 7px 16px; font: inherit; cursor: pointer; }
button:hover { border-color: var(--accent); }
code { font-family: var(--mono); font-size: 12px; }
footer { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; padding-top: 20px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 40px; }

/* Network chart: one series, so no legend; the section title names it. */
.chart { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 8px; }
.chart svg { display: block; overflow: visible; }
.chart .bar-mark { fill: var(--ice); } .chart .bar-mark.partial { fill: var(--muted); }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar-mark.hover { fill-opacity: 0.7; }
.chart .axis { stroke: var(--line); }
.chart .grid { stroke: var(--line); stroke-dasharray: 2 4; }
.chart text { fill: var(--muted); font: 400 11px var(--mono); }
.chart .empty { color: var(--muted); padding: 40px 0; text-align: center; }
.tip { position: absolute; pointer-events: none; background: var(--base); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); }
.tip b { font: 700 13px var(--mono); }
.note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
footer .links { display: flex; align-items: center; gap: 14px; }
.xlink { color: var(--accent); display: inline-flex; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--muted); font: 400 12px var(--mono); padding: 5px 12px; }
.seg button.on { background: var(--panel); color: var(--ice); font-weight: 700; }

/* Phones: two cards per row, full-width controls, and only the columns that carry the comparison. */
@media (max-width: 640px) {
  header, main, footer { padding-left: 14px; padding-right: 14px; }
  header { padding-top: 18px; }
  .brand img { height: 28px; }
  .sub { font-size: 13px; margin-top: 8px; }
  section { margin: 20px 0; }
  .tabs { margin-top: 14px; }
  .tabs a { flex: 1; text-align: center; padding: 11px 4px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
  .card { padding: 11px 12px; }
  .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .card .v { font-size: 20px; }
  .bar { gap: 10px; }
  .seg button { padding: 8px 14px; }
  input[type=search] { flex: 1 1 100%; max-width: none; margin-left: 0; padding: 10px 12px; font-size: 16px; } /* 16px keeps iOS from zooming on focus */
  th, td { padding: 11px 8px; }
  .hm { display: none; }
  thead th, td.l { white-space: normal; }
  td.l { overflow-wrap: anywhere; }
  .chart { padding: 12px 8px 6px; }
  footer { padding-bottom: 28px; margin-top: 28px; }
}
