
:root {
  --bg: #eef1f4;
  --bg-deep: #e2e7ec;
  --panel: #ffffff;
  --ink: #14181d;
  --muted: #5a646e;
  --line: #c5ced5;
  --line-strong: #9aa3ad;
  --accent: #0a4f6e;
  --accent-hover: #083d56;
  --accent-soft: #d6e8f0;
  --warn: #8a4b12;
  --warn-soft: #f0e2d2;
  --ok: #0d5c45;
  --ok-soft: #d4ebe2;
  --radius: 6px;
  --font: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Source Sans 3", sans-serif;
  --mono: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace;
  --shadow: 0 1px 0 rgba(26, 23, 18, 0.06), 0 8px 24px rgba(26, 23, 18, 0.06);
  --focus: 2px solid var(--accent);
  --header-h: 3.25rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.btn, a.btn:hover, a.btn:focus { color: #ffffff; text-decoration: none; }
a.btn.secondary, a.btn.secondary:hover, a.btn.secondary:focus { color: var(--ink); text-decoration: none; }
a.btn.secondary:hover { color: var(--accent); }
.prose a:not(.btn):hover,
.site-footer a:not(.btn):hover,
.note a:not(.btn):hover,
.breadcrumbs a:hover,
.meta-row a:hover,
.home-actions a:not(.btn):hover,
.lede a:hover { color: #062a3c; }
.wrap { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.wrap-wide { width: min(1320px, calc(100% - 1.5rem)); margin: 0 auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* —— Header —— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; min-height: var(--header-h);
}
.logo {
  font-family: var(--display);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.logo span {
  display: block; margin-top: .15rem;
  font-family: var(--font); font-weight: 400; font-size: .75rem;
  letter-spacing: 0.02em; color: var(--muted);
}
.nav { display: flex; gap: .15rem .95rem; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 550;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-toggle {
  display: none; background: var(--bg-deep); border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius); padding: .4rem .7rem;
  font: inherit; font-weight: 650; cursor: pointer;
}
.nav-toggle:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* —— Home masthead (compact; matrix is the hero) —— */
.home-mast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: end;
  padding: 1.35rem 0 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.home-mast h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 .4rem;
  max-width: 22ch;
  text-wrap: balance;
}
.home-mast .lede {
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
  max-width: 58ch;
  line-height: 1.45;
}
.home-stats {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
  align-items: baseline;
}
.home-stats .stat {
  display: flex; flex-direction: column; gap: .1rem; min-width: 4.5rem;
}
.home-stats .stat b {
  font-family: var(--display);
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--ink);
}
.home-stats .stat span {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 550;
}
.home-actions {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center;
  padding-top: .15rem;
}
.home-actions .muted { font-size: .88rem; }

@media (max-width: 720px) {
  .home-mast { grid-template-columns: 1fr; }
}

/* Legacy .hero for other patterns on home if present */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.15; margin: 0 0 .65rem; letter-spacing: -.03em;
}
.hero p.lede { font-size: 1.02rem; color: var(--muted); max-width: 60ch; margin: 0 0 1rem; }
.badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: .25rem .65rem; font-size: .8rem;
}
.badge strong { color: var(--ink); font-weight: 650; }

/* —— Matrix panel (hero surface) —— */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .85rem;
}
.panel.matrix-hero { padding: .75rem; }

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: .55rem .65rem;
  margin-bottom: .65rem;
  padding: .15rem;
}
@media (max-width: 820px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .35rem; padding-bottom: .4rem; }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .logo span { display: inline; margin-left: .4rem; margin-top: 0; }
}
@media (max-width: 520px) {
  .filters { grid-template-columns: 1fr; }
}

label.field {
  display: flex; flex-direction: column; gap: .28rem;
  font-size: .75rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 650;
}
input[type="search"], select, input[type="email"], input[type="text"], textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: .55rem .7rem;
  font: inherit;
  font-size: .95rem;
}
input:focus, select:focus, textarea:focus {
  outline: var(--focus); outline-offset: 1px; border-color: var(--accent);
}
.meta-row {
  display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  color: var(--muted); font-size: .85rem; margin: .25rem 0 .65rem;
  font-variant-numeric: tabular-nums;
}
.meta-row strong { color: var(--ink); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  padding: 12px;
}
table.matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: .9rem;
}
table.matrix th, table.matrix td {
  text-align: left;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.matrix th {
  font-family: var(--font);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 650; color: var(--muted);
  background: var(--bg-deep);
  position: sticky; top: 0; z-index: 1;
}
table.matrix tbody tr:nth-child(even) td { background: rgba(226, 231, 236, 0.55); }
table.matrix tbody tr:hover td { background: var(--accent-soft); }
table.matrix tr.hidden { display: none; }
table.matrix td:first-child, table.matrix th:first-child { padding-left: .9rem; }
table.matrix td:last-child, table.matrix th:last-child { padding-right: .9rem; }

.tool-name {
  font-weight: 650; color: var(--ink); text-decoration: none;
  font-size: .95rem;
}
.tool-name:hover { color: var(--accent); text-decoration: underline; }
.tool-cat { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

.pill {
  display: inline-block;
  border-radius: 3px;
  padding: .12rem .45rem;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
}
.pill.remote {
  color: var(--ok); border-color: #7ab89a; background: var(--ok-soft);
}
.pill.local {
  color: var(--warn); border-color: #d4a882; background: var(--warn-soft);
}
.pill.other { color: var(--muted); }

code, .mono { font-family: var(--mono); font-size: .84em; font-weight: 450; }
.endpoint {
  word-break: break-all;
  color: var(--accent);
  font-size: .8rem;
}
.muted { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.25rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; font-family: var(--display); letter-spacing: -0.02em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: .55rem .95rem;
  font: inherit; font-weight: 650; font-size: .92rem;
  cursor: pointer; text-decoration: none;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.18);
}
.btn:hover, .btn:focus { color: #ffffff; }
.btn:focus-visible { outline: var(--focus); outline-offset: 2px; }
.btn.secondary {
  background: transparent; border-color: var(--line-strong); color: var(--ink);
}
.btn.secondary:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
  box-shadow: none;
}

.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: .92rem;
  background: var(--bg-deep);
}
.footer-inner p { margin: .35rem 0; }
.footer-inner a { color: var(--accent); }

.prose { max-width: 68ch; padding: 1.25rem 0 2rem; }
.prose h1 {
  font-family: var(--display); font-weight: 800;
  margin-top: 1.25rem; letter-spacing: -.02em; font-size: clamp(1.6rem, 3vw, 2rem);
}
.prose h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.35rem;
  margin-top: 1.75rem; padding-bottom: .35rem;
  border-bottom: 1px solid var(--line); letter-spacing: -.015em;
}
.prose h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1.25rem; letter-spacing: -.01em;
}
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }

/* changelog: no thick side accent (AI tell) */
.changelog-item {
  border-top: 1px solid var(--line);
  padding: 1rem 0 .2rem;
  margin: 0;
}
.changelog-item:first-of-type { border-top: none; }
.changelog-item time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: .5rem .85rem; margin: 1rem 0; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.tag-list li {
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: .2rem .5rem; font-size: .8rem; color: var(--muted);
}
.form-stack { display: grid; gap: .75rem; max-width: 400px; }
.note {
  background: var(--accent-soft);
  border: 1px solid #7aabb8;
  border-radius: var(--radius);
  padding: .85rem 1rem;
  color: var(--ink);
  font-size: .92rem;
}
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }
.breadcrumbs { font-size: .88rem; color: var(--muted); margin: 1.1rem 0 .4rem; }
.breadcrumbs a { color: var(--muted); }
.related { margin-top: 2rem; }
.related ul { padding-left: 1.1rem; }

.subscribe-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow);
}
.subscribe-box.compact { margin: 0 0 1.25rem; }
.subscribe-box h2 {
  margin: 0 0 .3rem;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

main.wrap, main.wrap-wide { padding-bottom: 1rem; }

/* Browser chrome theming */
input, textarea { caret-color: var(--accent); }
:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Scrollbar (webkit) */
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg-deep); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; }

/* Verified column: keep ISO dates on one line */
table.matrix th:last-child,
table.matrix td.verified-date,
td.verified-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 1%;
}

