/* Obsidian: near-black under grey light, frosted glass panels, monochrome.
   White is the only accent: it marks what is selected (the current page, a pressed option, the
   primary button) and the Pareto line, and nothing else. */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist-mono.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #09090a;
  --ink: #fafafa;
  --ink-2: #b8b8be;
  --muted: #86868e;
  --grid: rgba(255, 255, 255, 0.07);
  --axis: rgba(255, 255, 255, 0.18);
  --hair: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.12);
  --hi: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.09);
  --pill: rgba(255, 255, 255, 0.08);
  --raised: rgba(28, 28, 32, 0.92);
  --glow: 0 0 10px rgba(255, 255, 255, 0.6);
  --frost: blur(36px) saturate(170%);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* a component's own display rule must not reveal it */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;  /* the footer sits at the bottom of a short page */
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* the grey light the glass sits in */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48vmax 38vmax at 4% -8%, rgba(46, 46, 53, 0.95), transparent 70%),
    radial-gradient(42vmax 34vmax at 104% 42%, rgba(34, 36, 40, 0.95), transparent 70%),
    radial-gradient(40vmax 28vmax at 30% 108%, rgba(48, 46, 53, 0.9), transparent 70%);
}

a { color: var(--ink); text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 255, 255, 0.22); }

code { font: 0.86em var(--mono); background: rgba(255, 255, 255, 0.07); color: var(--ink-2); padding: 0.1em 0.4em; border-radius: 5px; }

h1, h2, h3 { line-height: 1.08; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 7vw, 3.4rem); letter-spacing: -0.035em; margin: 0 0 14px; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.6rem); letter-spacing: -0.025em; margin: 0 0 16px; }
h3 { font-size: 1rem; letter-spacing: -0.01em; margin: 0 0 6px; }
p { margin: 0 0 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main { flex: 1 0 auto; }
.mono { font-family: var(--mono); }

/* header: a frosted bar; its links fill its height so the current page's bar sits on its edge */
.site-top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(16, 16, 19, 0.5);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--hair);
}
.site-head { display: flex; align-items: stretch; gap: 0 28px; height: 56px; padding: 0 16px; }
/* a link fills the header's height, and its label text does too, so the label's bar lands on the edge */
.brand, .site-nav a { display: inline-flex; align-items: stretch; text-decoration: none; }
.brand > .brand-mark, .site-nav a > .i { align-self: center; }
.label-text { position: relative; display: flex; align-items: center; }
.brand {
  gap: 10px; white-space: nowrap;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--ink-2);
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--bg);
  font: 600 13px/22px var(--sans); text-align: center;
}
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  gap: 7px; padding: 0 10px; white-space: nowrap;
  color: var(--muted); font-size: 14px; transition: color .15s;
}
.site-nav a .i { width: 15px; height: 15px; }
.brand:hover, .site-nav a:hover { color: var(--ink); }
/* the current page: white text over a lit bar on the header's bottom edge, as wide as the label */
.brand[aria-current="page"], .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 500; }
[aria-current="page"] > .label-text::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--ink); box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}
.ext-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ext-nav a {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  color: var(--muted); transition: color .15s, background .15s;
}
.ext-nav a .i { width: 16px; height: 16px; }
.ext-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
/* phones: one row; the elsewhere links are in the footer, and the page icons go first */
@media (max-width: 600px) {
  .site-head { gap: 0 14px; }
  .ext-nav { display: none; }
  .site-nav { gap: 0; }
}
@media (max-width: 400px) {
  .site-nav a .i { display: none; }
  .brand { gap: 8px; }
}
@media (max-width: 380px) {
  .site-head { gap: 0 8px; }
  .site-nav a { padding: 0 7px; font-size: 13.5px; }
}

.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
/* a link that leaves the site carries the destination's icon */
.xl { display: inline-flex; align-items: center; gap: 6px; }
.xl .i { width: 15px; height: 15px; vertical-align: 0; }

section { padding: 44px 0; }
.hero { padding: 72px 0 32px; }
.label { font: 500 13px var(--mono); color: var(--muted); margin: 0 0 12px; }
.lede { font-size: clamp(1rem, 2.2vw, 1.1rem); line-height: 1.6; color: var(--ink-2); max-width: 620px; }
.muted { color: var(--muted); }

.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px; font-weight: 500; font-size: 14px;
  text-decoration: none; color: var(--ink);
  background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: background .15s, border-color .15s;
}
.btn .i { width: 16px; height: 16px; }
.btn:hover { background: rgba(255, 255, 255, 0.13); }
.btn.primary { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.btn.primary:hover { background: #ffffff; box-shadow: 0 0 22px rgba(255, 255, 255, 0.25); }

/* frosted glass panels */
.glass, .card {
  background: var(--glass); border: 1px solid var(--edge); border-radius: 16px;
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  box-shadow: inset 0 1px 0 var(--hi), 0 16px 40px rgba(0, 0, 0, 0.35);
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { padding: 20px; transition: background .15s, border-color .15s; }
.card p { color: var(--ink-2); font-size: 14px; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { font: 12px var(--mono); padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--ink-2); }

/* segmented control: a sunken track; the pressed option is solid white, like the current page.
   It scrolls sideways rather than wrapping when the screen is too narrow. */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
  background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  display: inline-flex; align-items: baseline; gap: 6px; flex: none; white-space: nowrap;
  font: 13px/30px var(--sans); height: 30px; padding: 0 12px; border: 0; border-radius: 7px;
  background: none; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.seg button[aria-pressed="true"] { color: var(--bg); font-weight: 600; background: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.12); }
.seg button small { font: 11px var(--mono); color: var(--muted); }
.seg button[aria-pressed="true"] small { color: #5a5a62; font-weight: 500; }

.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  padding: 26px 16px 44px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--hair);
  margin-top: 28px;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* data tables */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
.data th, .data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--grid); vertical-align: top; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.data td { color: var(--ink-2); }
.data th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.data td a { color: var(--ink-2); text-decoration: none; }
.data td a:hover { color: var(--ink); }
.data .num { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }

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