/* ==========================================================================
   Boris Inc — Design System v2  ("editorial infrastructure")
   Served at https://borisinc.com/brand.css
   Light-default, dense, typographic. Dark mode via prefers-color-scheme
   and an explicit [data-theme] override. No framework, no external fonts.
   --------------------------------------------------------------------------
   v2.0.0 · 2026-07-26 · replaces the v1 dark/mint system
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Neutral ink ramp (light) */
  --bg:            #ffffff;
  --bg-subtle:     #f7f8f9;
  --bg-inset:      #eff1f4;
  --bg-raised:     #ffffff;
  --border:        #e2e5ea;
  --border-strong: #cbd1d9;
  --text:          #12151a;
  --text-2:        #414a55;
  --text-3:        #6c7684;
  --text-4:        #98a1ae;

  /* Brand — deep viridian. Descends from the v1 mark, at institutional weight. */
  --accent:        #0e6e52;
  --accent-hover:  #0a5540;
  --accent-weak:   #e7f3ee;
  --accent-line:   #b9dccd;
  --on-accent:     #ffffff;

  /* Trust tiers — semantic, accessible on both grounds */
  --t-trusted:     #0e6e52;
  --t-trusted-bg:  #e7f3ee;
  --t-verified:    #1c56b8;
  --t-verified-bg: #e8effb;
  --t-provisional: #8a5a00;
  --t-provisional-bg:#fbf1de;
  --t-flagged:     #b3271e;
  --t-flagged-bg:  #fbeae9;

  /* Type */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Mono",
          "Liberation Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.5rem, 1.6rem + 3.4vw, 3.75rem);
  --fs-h1:      clamp(1.95rem, 1.5rem + 1.6vw, 2.6rem);
  --fs-h2:      1.5rem;
  --fs-h3:      1.125rem;
  --fs-body:    1rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-label:   0.6875rem;

  /* Space & shape */
  --max:        1140px;
  --max-wide:   1360px;
  --max-prose:  70ch;
  --r-sm:       5px;
  --r:          8px;
  --r-lg:       12px;
  --shadow-sm:  0 1px 2px rgba(16,22,30,.05);
  --shadow:     0 1px 3px rgba(16,22,30,.07), 0 6px 16px -6px rgba(16,22,30,.10);
  --shadow-lg:  0 2px 6px rgba(16,22,30,.06), 0 18px 40px -14px rgba(16,22,30,.16);

  --header-h:   58px;
  color-scheme: light;
}

/* Dark — opt-in by system preference, overridable by [data-theme] */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0c0e11;
    --bg-subtle:     #131619;
    --bg-inset:      #181c21;
    --bg-raised:     #14171b;
    --border:        #242931;
    --border-strong: #333a44;
    --text:          #e8ebef;
    --text-2:        #b3bcc7;
    --text-3:        #838d99;
    --text-4:        #626c78;

    --accent:        #35c496;
    --accent-hover:  #55d4ab;
    --accent-weak:   #10231d;
    --accent-line:   #1e4d3d;
    --on-accent:     #052018;

    --t-trusted:     #35c496;
    --t-trusted-bg:  #10231d;
    --t-verified:    #6ba5ff;
    --t-verified-bg: #111a2b;
    --t-provisional: #d9a441;
    --t-provisional-bg:#241c0d;
    --t-flagged:     #f0776a;
    --t-flagged-bg:  #2a1512;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 1px 3px rgba(0,0,0,.5), 0 6px 16px -6px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 18px 40px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:            #0c0e11;
  --bg-subtle:     #131619;
  --bg-inset:      #181c21;
  --bg-raised:     #14171b;
  --border:        #242931;
  --border-strong: #333a44;
  --text:          #e8ebef;
  --text-2:        #b3bcc7;
  --text-3:        #838d99;
  --text-4:        #626c78;
  --accent:        #35c496;
  --accent-hover:  #55d4ab;
  --accent-weak:   #10231d;
  --accent-line:   #1e4d3d;
  --on-accent:     #052018;
  --t-trusted:     #35c496;
  --t-trusted-bg:  #10231d;
  --t-verified:    #6ba5ff;
  --t-verified-bg: #111a2b;
  --t-provisional: #d9a441;
  --t-provisional-bg:#241c0d;
  --t-flagged:     #f0776a;
  --t-flagged-bg:  #2a1512;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 1px 3px rgba(0,0,0,.5), 0 6px 16px -6px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 18px 40px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ---------- 2. Reset & base --------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 640; line-height: 1.2; letter-spacing: -0.021em; color: var(--text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); letter-spacing: -0.018em; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.012em; }
h4 { font-size: var(--fs-sm); }

p  { line-height: 1.65; }
b, strong { font-weight: 620; color: var(--text); }
small { font-size: var(--fs-xs); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2.5px; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

img, svg { display: block; max-width: 100%; }
ul, ol { padding-left: 1.15rem; }
li { margin: .3rem 0; }
li::marker { color: var(--text-4); }

/* ---------- 3. Layout ---------------------------------------------------- */

.wrap      { max-width: var(--max);      margin-inline: auto; padding-inline: 24px; }
.wrap-wide { max-width: var(--max-wide); margin-inline: auto; padding-inline: 24px; }
.prose     { max-width: var(--max-prose); }
.prose > * + * { margin-top: 1rem; }
.prose h2  { margin-top: 2.5rem; }
.prose h3  { margin-top: 1.75rem; }

.section      { padding-block: clamp(3rem, 6vw, 5rem); }
.section-tight{ padding-block: clamp(2rem, 4vw, 3rem); }
.section-sep  { border-top: 1px solid var(--border); }
.section-alt  { background: var(--bg-subtle); }

.stack   { display: flex; flex-direction: column; }
.stack-2 { gap: .5rem  } .stack-3 { gap: .75rem } .stack-4 { gap: 1rem }
.stack-6 { gap: 1.5rem } .stack-8 { gap: 2rem   }
.row     { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.spacer  { flex: 1 }

.grid   { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 4. Typographic utilities ------------------------------------ */

.eyebrow {
  font-size: var(--fs-label);
  font-weight: 660;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow-accent { color: var(--accent); }
.lede    { font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); }
.muted   { color: var(--text-3); }
.muted-2 { color: var(--text-4); }
.small   { font-size: var(--fs-sm); }
.xs      { font-size: var(--fs-xs); }
.mono    { font-family: var(--mono); font-size: .92em; }
.nowrap  { white-space: nowrap; }
.center  { text-align: center; }
.right   { text-align: right; }
.balance { text-wrap: balance; }
.pretty  { text-wrap: pretty; }
.tnum    { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 5. Header / nav ---------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap-wide { display: flex; align-items: center; gap: 1.5rem; width: 100%; }

.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 660; font-size: .975rem; letter-spacing: -.015em;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand svg, .brand img { width: 20px; height: 20px; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 500;
  padding: .38rem .6rem; border-radius: var(--r-sm); text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-subtle); text-decoration: none; }
.nav a.here  { color: var(--accent); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav.nav-mobile-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem 24px 1rem; gap: .1rem; box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-flex !important; }
}
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer;
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: transparent; color: var(--text-3); cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle .i-sun  { display: none; }
.theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun  { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* ---------- 6. Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-size: var(--fs-sm); font-weight: 560; line-height: 1;
  padding: .58rem 1rem; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: background .13s ease, border-color .13s ease, color .13s ease, box-shadow .13s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--bg-raised); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--text-4); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }
.btn-sm { font-size: var(--fs-xs); padding: .4rem .7rem; }
.btn-lg { font-size: 1rem; padding: .72rem 1.35rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.link-arrow { font-weight: 560; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: .3rem; }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(2px); }

/* ---------- 7. Cards ----------------------------------------------------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.375rem 1.5rem;
}
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; color: inherit; }
.card-pad-lg { padding: 1.75rem 1.875rem; }
.card-flush  { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: .35rem; }
.card > * + * { margin-top: .6rem; }

.card-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent); flex-shrink: 0;
}
.card-icon svg { width: 18px; height: 18px; }

/* ---------- 8. Metrics --------------------------------------------------- */

.metrics {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg-raised);
}
.metric { padding: 1.1rem 1.35rem; border-right: 1px solid var(--border); }
.metric:last-child { border-right: 0; }
.metric .n {
  font-size: 1.875rem; font-weight: 640; letter-spacing: -.03em;
  line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums;
}
.metric .l { margin-top: .2rem; font-size: var(--fs-label); font-weight: 620;
             letter-spacing: .085em; text-transform: uppercase; color: var(--text-3); }
.metric .sub { margin-top: .25rem; font-size: var(--fs-xs); color: var(--text-4); }
.metric-accent .n { color: var(--accent); }
@media (max-width: 720px) {
  .metric { border-right: 0; border-bottom: 1px solid var(--border); }
  .metric:last-child { border-bottom: 0; }
}

/* ---------- 9. Badges & pills -------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: .32rem;
  font-size: var(--fs-label); font-weight: 620; letter-spacing: .045em;
  text-transform: uppercase; padding: .2rem .5rem;
  border-radius: 999px; white-space: nowrap; line-height: 1.4;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-plain::before { display: none; }
.badge-trusted     { color: var(--t-trusted);     background: var(--t-trusted-bg); }
.badge-verified    { color: var(--t-verified);    background: var(--t-verified-bg); }
.badge-provisional { color: var(--t-provisional); background: var(--t-provisional-bg); }
.badge-flagged,
.badge-unverified  { color: var(--t-flagged);     background: var(--t-flagged-bg); }
.badge-neutral     { color: var(--text-3);        background: var(--bg-inset); }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: var(--fs-xs); color: var(--text-2);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 999px; padding: .18rem .6rem; white-space: nowrap;
}
.pill-accent { color: var(--accent); background: var(--accent-weak); border-color: var(--accent-line); }

.tag {
  display: inline-block; color: var(--text-3);
  background: var(--bg-inset); border-radius: var(--r-sm);
  padding: .1rem .42rem; font-family: var(--mono); font-size: .75rem;
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.up   { background: var(--t-trusted); box-shadow: 0 0 0 3px var(--t-trusted-bg); }
.status-dot.warn { background: var(--t-provisional); box-shadow: 0 0 0 3px var(--t-provisional-bg); }
.status-dot.down { background: var(--t-flagged); box-shadow: 0 0 0 3px var(--t-flagged-bg); }

/* ---------- 10. Code ----------------------------------------------------- */

code, pre, kbd, samp { font-family: var(--mono); }
code {
  font-size: .8375em; background: var(--bg-inset); color: var(--text);
  border-radius: var(--r-sm); padding: .12em .36em;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
a code { color: inherit; }
pre {
  background: var(--bg-inset); border: 1px solid var(--border);
  border-radius: var(--r); padding: .95rem 1.1rem; overflow-x: auto;
  font-size: var(--fs-xs); line-height: 1.65; color: var(--text);
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.codeblock { position: relative; }
.codeblock pre { margin: 0; padding-right: 3.25rem; }
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font: inherit; font-size: var(--fs-label); font-weight: 620; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-3);
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .25rem .5rem; cursor: pointer;
  opacity: 0; transition: opacity .13s ease, color .13s ease, border-color .13s ease;
}
.codeblock:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent-line); }

.tabs { display: flex; gap: .1rem; border-bottom: 1px solid var(--border); margin-bottom: -1px; }
.tab {
  font: inherit; font-size: var(--fs-xs); font-weight: 560;
  color: var(--text-3); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: .5rem .75rem; cursor: pointer; transition: color .12s ease, border-color .12s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel[hidden] { display: none; }

kbd {
  font-size: .78em; background: var(--bg-raised); color: var(--text-2);
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 4px; padding: .08em .38em;
}

/* ---------- 11. Tables --------------------------------------------------- */

.table-wrap {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: auto; background: var(--bg-raised); -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg-subtle); color: var(--text-3);
  font-size: var(--fs-label); font-weight: 660; letter-spacing: .08em;
  text-transform: uppercase; text-align: left; white-space: nowrap;
  padding: .6rem .875rem; border-bottom: 1px solid var(--border);
}
tbody td { padding: .7rem .875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s ease; }
.table-hover tbody tr:hover { background: var(--bg-subtle); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: var(--mono); font-size: var(--fs-xs); }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text); }
th[data-sort]::after { content: "↕"; opacity: .3; margin-left: .3rem; font-size: .9em; }
th[data-sort][aria-sort="ascending"]::after  { content: "↑"; opacity: 1; color: var(--accent); }
th[data-sort][aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--accent); }

/* Definition table — for endpoint/price listings */
.deftable td:first-child { width: 1%; white-space: nowrap; }

/* ---------- 12. Forms / filters ------------------------------------------ */

input, select, textarea, button { font: inherit; color: inherit; }
.input, input[type="text"], input[type="search"], input[type="email"], input[type="url"], select, textarea {
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: .5rem .7rem; font-size: var(--fs-sm); width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input::placeholder, input::placeholder { color: var(--text-4); }
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
select { appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c7684' stroke-width='1.6'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .55rem center; background-size: 14px; }

.filterbar {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
  padding: .875rem 1rem; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.filterbar .input { flex: 1 1 220px; width: auto; background: var(--bg-raised); }
.filterbar select { width: auto; flex: 0 0 auto; min-width: 150px; }

.search-wide { position: relative; }
.search-wide .input { padding-left: 2.35rem; height: 44px; font-size: 1rem; }
.search-wide svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
                   width: 17px; height: 17px; color: var(--text-4); pointer-events: none; }

/* ---------- 13. Callouts ------------------------------------------------- */

.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--text-4);
  border-radius: var(--r); padding: .875rem 1.1rem;
  background: var(--bg-subtle); font-size: var(--fs-sm); color: var(--text-2);
}
.callout strong { color: var(--text); }
.callout-accent  { border-left-color: var(--accent);        background: var(--accent-weak); }
.callout-warn    { border-left-color: var(--t-provisional); background: var(--t-provisional-bg); }
.callout-danger  { border-left-color: var(--t-flagged);     background: var(--t-flagged-bg); }

/* ---------- 14. Hero ----------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero h1 { font-size: var(--fs-display); letter-spacing: -.035em; line-height: 1.03; }
.hero .lede { max-width: 60ch; margin-top: 1.1rem; font-size: 1.25rem; }
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.85rem; }
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 20%, transparent 78%);
  opacity: .55;
}

/* ---------- 15. Feature / list rows -------------------------------------- */

.rows { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-raised); }
.rows > * { border-bottom: 1px solid var(--border); }
.rows > *:last-child { border-bottom: 0; }
.rowitem {
  display: flex; align-items: center; gap: 1rem;
  padding: .875rem 1.1rem; color: inherit; text-decoration: none;
  transition: background .1s ease;
}
a.rowitem:hover { background: var(--bg-subtle); text-decoration: none; color: inherit; }
.rowitem .main { min-width: 0; flex: 1; }
.rowitem .name { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowitem .sub  { font-size: var(--fs-xs); color: var(--text-3); font-family: var(--mono);
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score { text-align: right; flex-shrink: 0; min-width: 62px; }
.score .v { font-size: 1.1rem; font-weight: 640; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.score .t { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .07em; color: var(--text-4); }
.t-trusted     { color: var(--t-trusted); }
.t-verified    { color: var(--t-verified); }
.t-provisional { color: var(--t-provisional); }
.t-flagged, .t-unverified { color: var(--t-flagged); }

.meter { height: 4px; border-radius: 2px; background: var(--bg-inset); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }

/* ---------- 16. Empty / loading ------------------------------------------ */

.empty { padding: 3rem 1rem; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }
.skeleton {
  background: linear-gradient(90deg, var(--bg-inset) 25%, var(--bg-subtle) 37%, var(--bg-inset) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }

/* ---------- 17. Footer --------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); padding-block: 3rem 2.25rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: var(--fs-label); font-weight: 660; letter-spacing: .09em;
                 text-transform: uppercase; color: var(--text-3); margin-bottom: .7rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin: .38rem 0; }
.footer-col a { color: var(--text-2); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--text-4);
}

/* ---------- 18. Misc ----------------------------------------------------- */

.divider-label { display: flex; align-items: center; gap: 1rem; color: var(--text-4);
                 font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .1em; font-weight: 620; }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.chart { width: 100%; display: block; }

.anchor-h { scroll-margin-top: calc(var(--header-h) + 20px); }

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

@media print {
  .site-header, .site-footer, .theme-toggle, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 19. Legacy sub-page compatibility ---------------------------- */
/* Older pages (quickstart, buyer, market, neutrality, spec) ship plain markup
   with .box / .big. Map them onto the v2 system instead of rewriting each one. */
.legacy { max-width: var(--max-prose); }
.legacy > h1 { margin-bottom: .6rem; }
.legacy > h2 { margin: 2.25rem 0 .6rem; }
.legacy > h3 { margin: 1.6rem 0 .5rem; }
.legacy > p, .legacy > ul, .legacy > ol, .legacy > pre, .legacy > table { margin: .9rem 0; }
.legacy table { margin: 1rem 0; }
.legacy td, .legacy th { padding: .5rem .8rem; border-bottom: 1px solid var(--border); }
.legacy table { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.box {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.25rem 1.4rem; margin: 1.1rem 0;
}
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.big { font-size: 2rem; font-weight: 640; letter-spacing: -.03em; color: var(--accent); }
