/* Metsuke site. Direction B "Instrument": graphite, teal, amber; Inter Tight + JetBrains Mono. */
:root {
  --graphite: #0F1720;
  --ink: #1d2733;
  --muted: #5b6673;
  --line: #dfe3e7;
  --paper: #f7f8f9;
  --white: #ffffff;
  --teal: #0E6F6E;
  --teal-soft: #e3f0ef;
  --amber: #B45309;
  --amber-soft: #fbeee2;
  --red: #a4262c;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  /* phase colours */
  --p-dns: #9fb3c4;
  --p-connect: #5f7f99;
  --p-tls: #0E6F6E;
  --p-first: #B45309;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 17px; }
a { color: var(--teal); }
a:hover { color: var(--graphite); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.mono, code, .num { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* header */
.top { background: var(--graphite); color: #e8edf1; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: 0.01em; font-size: 20px; }
.brand img { display: block; height: 41px; width: auto; }
.top nav a { color: #c5ced6; text-decoration: none; margin-left: 22px; font-size: 15px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: #fff; }

/* hero */
.hero { background: var(--graphite); color: #fff; padding: 56px 0 64px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 18px; font-weight: 650; letter-spacing: -0.015em; max-width: 22ch; }
.hero p { font-size: 19px; color: #c5ced6; max-width: 60ch; margin: 0; }
.hero .kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #6fc2bf; margin-bottom: 14px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: -32px; position: relative; }
.tile { background: var(--white); padding: 18px 20px; }
.tile .v { font-family: var(--mono); font-size: 28px; color: var(--graphite); font-weight: 600; }
.tile .k { font-size: 14px; color: var(--muted); }
.updated { color: var(--muted); font-size: 14px; margin: 10px 2px 0; }

section { padding: 56px 0 8px; }
section h2 { font-size: 28px; margin: 0 0 8px; color: var(--graphite); letter-spacing: -0.01em; }
section .lede { color: var(--muted); max-width: 70ch; margin: 0 0 22px; }

/* tables */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; background: #fbfcfc; }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr:last-child td { border-bottom: 0; }
td.rank { color: var(--muted); font-family: var(--mono); width: 2.5em; }
.cat { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.p95cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.p95bar { height: 6px; border-radius: 3px; background: var(--teal); min-width: 2px; }
.warn { color: var(--amber); }
.bad { color: var(--red); }
.best { background: var(--teal-soft); color: var(--graphite); font-weight: 600; }

/* phase bars */
.phases { padding: 18px 20px; }
.prow { display: grid; grid-template-columns: minmax(140px, 220px) 1fr 70px; align-items: center; gap: 14px; padding: 5px 0; font-size: 15px; }
.ptrack { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: #eef1f3; }
.ptrack span { display: block; height: 100%; }
.ptotal { text-align: right; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* prose pages */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 40px; }
.prose li { margin: 6px 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; }
.panel h3 { margin-top: 0; color: var(--graphite); }
.panel ul { padding-left: 20px; }

.empty { padding: 22px; color: var(--muted); }
footer { margin-top: 72px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav a { margin-left: 14px; }
  .prow { grid-template-columns: 110px 1fr 56px; gap: 8px; font-size: 13px; }
}
