:root {
  --bg: #0a0e13;
  --panel: #131922;
  --panel2: #1b2530;
  --border: #283441;
  --text: #e6edf3;
  --muted: #9da7b4;
  --accent: #f78166;
  --accent2: #58a6ff;
  --good: #3fb950;
  --mid: #d29922;
  --bad: #f85149;

  /* Dojo Five brand: blue + yellow. Approximate hex — swap for exact brand values. */
  --brand-blue: #1f9cd8;
  --brand-yellow: #ffc62e;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --data: ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 10px 30px -18px rgba(0, 0, 0, .8);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 4px; }

/* Header: a scope-screen hero. Fine grid + a soft phosphor glow behind the title. */
header {
  position: relative;
  padding: 40px 0 26px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 88% -10%, rgba(247, 129, 102, .10), transparent 55%),
    linear-gradient(180deg, #10161e, var(--bg));
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139, 149, 163, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 149, 163, .06) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
          mask-image: linear-gradient(180deg, #000, transparent 90%);
  pointer-events: none;
}
/* Full-bleed background, but content sits in the same centered column as .wrap. */
.header-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font: 700 12px/1 var(--mono);
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--accent); margin: 0 0 12px;
}
header h1 {
  margin: 0 0 10px; font: 700 32px/1.05 var(--mono);
  letter-spacing: -1px;
}
header h1 .accent { color: var(--accent); }
header p {
  margin: 0; color: var(--muted); max-width: 720px;
  font-size: 16px; line-height: 1.7;
}
header p strong { color: var(--text); font-weight: 600; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 8px; }
.grid { display: grid; gap: 28px; }
section h2 {
  font: 700 13px/1.3 var(--mono);
  text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted);
  margin: 0 0 12px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
section h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
  background: var(--accent); flex: none; align-self: center;
}
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  color: var(--muted); font: 600 12px/1 var(--mono);
  text-transform: uppercase; letter-spacing: .6px;
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--panel2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--data); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px; border: 1px solid var(--border); color: var(--muted); }
.score-pill {
  display: inline-block; min-width: 46px; text-align: center; padding: 2px 8px;
  border-radius: 6px; font-weight: 700; font-family: var(--data);
  font-variant-numeric: tabular-nums;
}

.matrix { overflow-x: auto; }
.matrix table { border-collapse: separate; border-spacing: 3px; }
.matrix th.rot { height: 150px; vertical-align: bottom; text-align: center; padding: 0 0 6px; font: 500 12px/1 var(--data); text-transform: none; letter-spacing: 0; color: var(--muted); }
.matrix th.rot span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); }
.matrix td { text-align: center; }
.matrix td.rowlabel { text-align: right; }
.matrix a { text-decoration: none; }
.cell {
  display: inline-block; width: 34px; height: 34px; line-height: 34px;
  text-align: center; border-radius: 5px; font: 700 13px/34px var(--data);
  color: #0a0e13; cursor: pointer; transition: box-shadow .1s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.cell:hover {
  position: relative; z-index: 2;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent2);
}
.cell.empty { background: var(--panel2); color: var(--muted); cursor: default; box-shadow: none; }
.cell.empty:hover { box-shadow: none; }
.rowlabel { text-align: right; padding-right: 10px; font-size: 13px; }

.muted { color: var(--muted); }
.cap { max-width: 820px; margin: -2px 0 14px; line-height: 1.6; font-size: 14px; color: var(--muted); }
.cap strong { color: var(--text); font-family: var(--data); }
.clickhint {
  display: inline-block; font: 600 13px/1 var(--mono);
  color: var(--accent2); border: 1px solid rgba(88, 166, 255, .45);
  border-radius: 20px; padding: 3px 9px; margin: 0 2px; vertical-align: 1px;
}

.panel-title {
  font: 700 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 1px;
  color: var(--text); margin: 0 0 12px;
}
/* Second block inside the single About panel, set off by a hairline rule. */
.about-divider { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.limits-list { margin: 0; padding-left: 18px; }
.limits-list li { color: var(--muted); line-height: 1.65; margin-bottom: 11px; max-width: 880px; }
.limits-list li:last-child { margin-bottom: 0; }
.limits-list strong { color: var(--text); }

.kpis { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; min-width: 124px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .14s ease, border-color .14s ease;
}
.kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0; transition: opacity .14s ease;
}
.kpi:hover { transform: translateY(-2px); border-color: #38444f; }
.kpi:hover::before { opacity: 1; }
.kpi .n { font: 700 30px/1.05 var(--mono); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .8px; margin-top: 6px; }

pre { background: #070a0e; border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow: auto; font-size: 13.5px; line-height: 1.5; }
code { font-family: var(--data); }
.check { padding: 7px 11px; border-radius: 6px; margin-bottom: 6px; border: 1px solid var(--border); background: var(--panel); }
.check.pass { border-left: 4px solid var(--good); }
.check.partial { border-left: 4px solid var(--mid); }
.check.fail { border-left: 4px solid var(--bad); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  padding: 6px 13px; border: 1px solid var(--border); border-radius: 7px;
  cursor: pointer; color: var(--muted); font: 500 14px/1.2 var(--mono);
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.tab:hover { color: var(--text); border-color: #38444f; }
.tab.active { background: var(--panel2); color: var(--text); border-color: var(--accent2); }
footer { color: var(--muted); font-size: 13px; padding: 28px 24px; border-top: 1px solid var(--border); text-align: center; }
footer .brand { color: var(--brand-yellow); font-weight: 600; }

/* Matrix tier grouping: the three tiers read as separate blocks via gap columns,
   each with a colour-underlined header band; the Frontier tier is badged. */
.matrix .gap { width: 22px; min-width: 22px; padding: 0; border: none; background: transparent; }
.matrix th.tierhead { vertical-align: bottom; text-align: center; padding: 4px 6px 6px; border-bottom: 3px solid var(--border); text-transform: none; letter-spacing: 0; }
.matrix th.tierhead .tname { font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .8px; }
.matrix th.tierhead.tier1 { border-bottom-color: var(--accent2); }
.matrix th.tierhead.tier1 .tname { color: var(--accent2); }
.matrix th.tierhead.tier2 { border-bottom-color: var(--mid); }
.matrix th.tierhead.tier2 .tname { color: var(--mid); }
.matrix th.tierhead.tier3 { border-bottom-color: var(--accent); }
.matrix th.tierhead.tier3 .tname { color: var(--accent); }
.matrix th.tierhead .fbadge { display: inline-block; margin-left: 7px; font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .5px; color: #0a0e13; background: var(--accent); padding: 3px 7px; border-radius: 10px; vertical-align: 1px; }
.matrix th.rot.tier1 { color: var(--accent2); }
.matrix th.rot.tier2 { color: var(--mid); }
.matrix th.rot.tier3 { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
