/* dvsglobal.ai — lab site. Tokens follow the validated data-viz palette:
   surfaces, inks and the categorical blue are the reference instance values. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hair: #e1e0d9;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --hair: #2c2c2a;
    --accent: #3987e5;
    --accent-ink: #86b6ef;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* header */
header.site {
  border-bottom: 1px solid var(--hair);
  background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; gap: .75rem;
  padding-top: .9rem; padding-bottom: .9rem;
}
.mark { display: flex; align-items: flex-end; gap: 2.5px; height: 20px; }
.mark i { display: block; width: 5px; border-radius: 2px; background: var(--accent); }
.mark i:nth-child(1) { height: 9px; }
.mark i:nth-child(2) { height: 14px; }
.mark i:nth-child(3) { height: 20px; }
.brand { font-weight: 750; letter-spacing: -0.01em; color: var(--ink); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
nav.site { margin-left: auto; display: flex; gap: 1.1rem; font-size: .92rem; }
nav.site a { color: var(--ink-2); }

/* landing hero */
.hero { padding: 4.5rem 0 3rem; }
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem;
}
.hero p.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 38rem; margin: 0; }
.hero .accent { color: var(--accent-ink); }

/* sections */
section { padding: 2.2rem 0; }
h2.sec {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 0 0 1.2rem; font-weight: 650;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .9rem; }
.card {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 12px; padding: 1.1rem 1.2rem;
}
.card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.card p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* post list */
.post-item {
  display: block; background: var(--surface); border: 1px solid var(--hair);
  border-radius: 12px; padding: 1.2rem 1.35rem; color: var(--ink);
}
.post-item:hover { text-decoration: none; border-color: var(--accent); }
.post-item .date { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-item h3 { margin: .25rem 0 .35rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.post-item p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* footer */
footer.site {
  border-top: 1px solid var(--hair);
  margin-top: 3rem; padding: 1.6rem 0 2.4rem;
  font-size: .88rem; color: var(--muted);
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---------- article ---------- */
article { padding: 3rem 0 1rem; }
article .kicker { font-size: .82rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
article h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); line-height: 1.18; letter-spacing: -0.02em; margin: .4rem 0 .6rem; }
article .standfirst { font-size: 1.12rem; color: var(--ink-2); margin: 0 0 .8rem; }
article .byline { font-size: .88rem; color: var(--muted); padding-bottom: 1.6rem; border-bottom: 1px solid var(--hair); margin-bottom: 2rem; }
article h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 2.4rem 0 .7rem; }
article h3 { font-size: 1.05rem; margin: 1.8rem 0 .5rem; }
article p, article li { color: var(--ink); }
article .note { color: var(--ink-2); font-size: .92rem; }
blockquote {
  margin: 1.2rem 0; padding: .6rem 1.1rem;
  border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 10px 10px 0; color: var(--ink-2); font-style: italic;
}
code { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--hair); border-radius: 5px; padding: .08em .35em; }
pre {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 12px;
  padding: 1rem 1.2rem; overflow-x: auto; font-family: var(--mono);
  font-size: .84rem; line-height: 1.55;
}
pre code { background: none; border: none; padding: 0; }

/* figures */
figure { margin: 1.8rem 0; }
figure .fig-box {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 12px; padding: 1.2rem 1.3rem; overflow-x: auto;
}
figcaption { font-size: .85rem; color: var(--muted); margin-top: .55rem; line-height: 1.5; }

/* funnel */
.funnel { display: grid; gap: 6px; }
.funnel .frow { display: flex; align-items: center; gap: .8rem; }
.funnel .fbar {
  height: 30px; border-radius: 4px 6px 6px 4px;
  background: var(--accent); opacity: .92; min-width: 4px; flex: none;
}
.funnel .frow + .frow .fbar { opacity: .8; }
.funnel .flab { font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.funnel .fnum { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }

/* chart */
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 1.2rem; font-size: .82rem; color: var(--ink-2); margin-bottom: .6rem; flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: .4rem; }

/* artifacts */
.artifacts { display: grid; gap: .6rem; margin: 1rem 0; }
.artifact {
  display: flex; gap: .8rem; align-items: baseline;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 10px;
  padding: .7rem 1rem; font-size: .93rem;
}
.artifact .tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-ink); flex: none; width: 4.6rem;
}
.artifact span { color: var(--ink-2); }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--hair); }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
td.num { font-variant-numeric: tabular-nums; }
