/* Nuvv Research — editorial surface.
   Deliberately lighter than the product site (app.nuvv.app is near-black): this reads as a
   publication, not a SaaS landing page. Long-form legibility first. */

:root {
  --bg: #fbfbfa;
  --panel: #fff;
  --ink: #16161a;
  --muted: #5b616e;
  --line: #e4e4e0;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --measure: 44rem;   /* long-form reading column: ~70 characters a line */
  --wide: 62rem;      /* page shell — header, footer, marketing pages */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d10; --panel: #141419; --ink: #e8e8ea; --muted: #9aa0ac;
    --line: #26262e; --accent: #6b9bff; --accent-soft: #16203a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}
/* padding-inline only: a `padding` shorthand here would win on specificity over any
   vertical padding set on `main.wrap` and silently zero it. */
.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: 1.25rem; }

/* ── header ─────────────────────────────────────────────────────────────── */
header {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  max-width: var(--wide); margin: 0 auto;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 1.05rem; text-decoration: none; color: var(--ink); letter-spacing: -0.01em;
}
.brand b { font-weight: 700; }
.mark { border-radius: 7px; flex-shrink: 0; display: block; }
header nav { display: flex; gap: 1.15rem; margin-left: auto; flex-wrap: wrap; }
header nav a, .cta { font-size: 0.9rem; text-decoration: none; }
header nav a { color: var(--muted); }
header nav a:hover { color: var(--ink); }
.cta {
  background: var(--accent); color: #fff; padding: 0.45rem 0.9rem;
  border-radius: 7px; font-weight: 600;
}
.cta:hover { opacity: 0.9; }
body.bare header { border-bottom: none; }

/* ── mobile nav: native <details> disclosure, no JS ──────────────────────── */
.menu { display: none; margin-left: auto; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; color: var(--ink);
  padding: 0.35rem; border-radius: 7px; display: block;
}
.menu summary::-webkit-details-marker { display: none; }   /* Safari's triangle */
.menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu .ex { display: none; }
.menu[open] .ham { display: none; }
.menu[open] .ex { display: block; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.55rem); z-index: 20;
  display: flex; flex-direction: column; gap: 0.25rem; min-width: 12rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  padding: 0.5rem; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.menu-panel a { padding: 0.55rem 0.7rem; border-radius: 7px; color: var(--ink);
                text-decoration: none; font-size: 0.95rem; }
.menu-panel a:hover { background: var(--accent-soft); }
.menu-panel .cta { text-align: center; margin-top: 0.25rem; color: #fff; }

@media (max-width: 60rem) {
  header { position: relative; }
  header nav, header > .cta { display: none; }
  .menu { display: block; }
}

/* ── type ───────────────────────────────────────────────────────────────── */
main { padding-block: 3rem 4.5rem; }

/* Marketing pages (landing, benchmarks, audit) use the wide shell. Prose inside still
   wraps at the reading measure — a 62rem-wide paragraph is unreadable — but tables,
   cards and the hero can use the full width. */
body.wide main { max-width: var(--wide); }
body.wide main > p,
body.wide main > ul,
body.wide main > ol,
body.wide main > blockquote { max-width: var(--measure); }
body.wide main > h1 { max-width: 22ch; }
body.wide main > .hero { max-width: none; }
.hero p, .hero h1 { max-width: none; }
h1, h2, h3 { font-family: ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.021em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 1.1rem; font-weight: 750; }
h2 { font-size: 1.5rem; margin: 3rem 0 0.9rem; padding-top: 0.4rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }
p, li { color: var(--ink); }
a { color: var(--accent); }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
blockquote {
  margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted);
}
code {
  font: 0.87em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft); padding: 0.12em 0.35em; border-radius: 4px;
}

/* Standfirst directly under an h1 — long-form pages only. On the landing page the hero
   supplies its own intro, and this selector would otherwise grey out the first body
   paragraph further down the page. */
body:not(.wide) main > p:first-of-type { font-size: 1.12rem; color: var(--muted); }

/* ── tables — scroll in their own container, never the page ─────────────── */
.scroll { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: 9px; }
table {
  border-collapse: collapse; width: 100%; min-width: 30rem;
  font: 0.86rem/1.45 ui-sans-serif, system-ui, sans-serif; background: var(--panel);
  font-variant-numeric: tabular-nums;   /* digits line up column-to-column */
}
th, td { padding: 0.5rem 0.8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 650; background: var(--accent-soft); }
tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { white-space: normal; }
tbody tr:hover td { background: var(--accent-soft); }   /* row tracking across 31 rows */

/* On long-form pages the prose sits at 44rem, but the data does not have to. The
   31-category table is the centrepiece of this report and it was overflowing its
   container; let tables bleed out to the wide shell, still centred on the text axis. */
body:not(.wide) .scroll,
body:not(.wide) .figures {
  width: min(var(--wide), calc(100vw - 2.5rem));
  margin-inline: calc(50% - min(var(--wide), calc(100vw - 2.5rem)) / 2);
}

/* ── key figures strip ──────────────────────────────────────────────────── */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem;
           margin: 2rem 0 2.5rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.figures div { background: var(--panel); border: 1px solid var(--line);
               border-radius: 11px; padding: 0.95rem 1rem; }
.figures b { display: block; font-size: 1.5rem; font-weight: 760; letter-spacing: -0.025em;
             color: var(--ink); font-variant-numeric: tabular-nums; }
.figures span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem;
                line-height: 1.35; }
@media (max-width: 44rem) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── footer ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line); padding-block: 2.25rem 3rem; margin-top: 3rem;
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.88rem; color: var(--muted);
}
footer .links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0.7rem 0; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .fine { font-size: 0.8rem; opacity: 0.75; }
footer > .wrap { max-width: var(--wide); }

/* ── the email gate (category briefs) and audit CTA blocks ──────────────── */
.gate, .offer {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.6rem; margin: 2.5rem 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.gate h3, .offer h3 { margin-top: 0; }
.gate form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.gate input[type=email] {
  flex: 1 1 15rem; padding: 0.65rem 0.8rem; font-size: 0.95rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink);
}
.gate button, .buy {
  background: var(--accent); color: #fff; border: 0; border-radius: 7px;
  padding: 0.65rem 1.2rem; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.gate button:hover, .buy:hover { opacity: 0.9; }
.fineprint { font-size: 0.8rem; color: var(--muted); margin-top: 0.7rem; }

/* ── landing hero: copy left, evidence right ────────────────────────────── */
/* minmax(0,…): a bare `fr` floors at the track's min-content, and the bar rows are wide
   enough that the copy column would collapse to a ribbon. */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 3rem; align-items: start; }
.hero > div > h1 { margin-top: 0; }
@media (max-width: 60rem) { .hero { grid-template-columns: 1fr; gap: 2rem; } }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem 1.5rem; font-family: ui-sans-serif, system-ui, sans-serif;
}
.stat { font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 780; letter-spacing: -0.035em;
        font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1; margin: 0; }
.panel-cap { margin: 0.35rem 0 0; font-size: 0.95rem; color: var(--muted); }
.panel-h { font-size: 0.76rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
           color: var(--muted); margin: 1.6rem 0 0.9rem; }
.bars { display: flex; flex-direction: column; gap: 0.55rem; }
/* single-hue sequential: length is the only encoding, and every bar is directly labelled,
   so nothing here depends on colour. */
.bar-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 0.6rem;
           align-items: center; font-size: 0.78rem; color: var(--muted); }
.bar-row span { text-align: right; }
.bar-row i { height: 15px; background: var(--accent); border-radius: 0 4px 4px 0; display: block; }
.bar-row b { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-row.ref span, .bar-row.ref b { color: var(--ink); font-weight: 700; }
.bar-row.ref i { background: var(--ink); }

.kicker { font: 600 0.78rem/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.09em;
          text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
