:root {
  --ink: #0E2A4E;
  --text: #1B2430;
  --muted: #5B6673;
  --rule: #D9DEE4;
  --ground: #FFFFFF;
  --panel: #F4F6F8;
  --series-en: #1F5FA8;
  --series-tr: #C8741E;
  --wordmark: url("/fabervant-wordmark-navy.svg");
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFFFFF;
    --text: #E6EAEF;
    --muted: #A3ADB8;
    --rule: #2C3946;
    --ground: #0E2A4E;
    --panel: #14335C;
    --series-en: #5A96E0;
    --series-tr: #C8741E;
    --wordmark: url("/fabervant-wordmark-white.svg");
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
/* The wordmark is a 9.62:1 silhouette; the padding around it is its clear space
   (half the cap height on every side, per the brand spec). */
.wordmark {
  display: block;
  aspect-ratio: 1346.37 / 140;
  background: var(--wordmark) no-repeat left center / contain;
}
.site .wordmark { width: 170px; }
.site nav { display: flex; gap: 20px; font-size: 0.95rem; }
.site nav a { text-decoration: none; color: var(--muted); }
.site nav a:hover, .site nav a[aria-current="page"] { color: var(--ink); }
main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 48px;
}
.hero .wordmark { width: min(100%, 420px); margin: 0 0 40px; }
h1 { font-size: 1.9rem; line-height: 1.2; font-weight: 650; color: var(--ink); margin: 0 0 16px; }
.hero h1 { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; margin: 0 0 8px; }
h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 48px 0 12px;
}
article h2 { font-size: 1.25rem; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 44px 0 12px; }
article h3 { font-size: 1.02rem; color: var(--ink); margin: 28px 0 8px; }
p { margin: 0 0 20px; }
.lede { font-size: 1.12rem; color: var(--text); }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list li { padding: 12px 0; border-top: 1px solid var(--rule); }
ul.list li:last-child { border-bottom: 1px solid var(--rule); }
ul.list li span { color: var(--muted); }
.product strong { color: var(--ink); }
.product .tag { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 6px; }
.product p { margin: 2px 0 0; color: var(--muted); }
article ul, article ol { padding-left: 1.2em; margin: 0 0 20px; }
article li { margin: 0 0 8px; }
blockquote { margin: 0 0 20px; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--rule); }
blockquote p { margin: 0 0 6px; }
blockquote p:last-child { margin: 0; }
.label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.scroll { overflow-x: auto; margin: 0 0 24px; }
table { border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; vertical-align: bottom; }
td.best { font-weight: 700; color: var(--ink); }
caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 8px; }
figure { margin: 0 0 28px; }
figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.legend { display: flex; gap: 20px; font-size: 0.88rem; color: var(--muted); margin: 0 0 8px; }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; }
.legend .en::before { background: var(--series-en); border-radius: 50%; }
.legend .tr::before { background: var(--series-tr); border-radius: 2px; }
svg.dots { width: 100%; max-width: 640px; height: auto; display: block; }
svg.dots .grid { stroke: var(--rule); stroke-width: 1; }
svg.dots .tick, svg.dots .name { fill: var(--muted); font-size: 13px; }
svg.dots .control .name { font-style: italic; }
svg.dots .ci { stroke-width: 2; stroke-linecap: round; opacity: 0.6; }
svg.dots .en-ci { stroke: var(--series-en); }
svg.dots .tr-ci { stroke: var(--series-tr); }
.paper h1 { font-size: 1.75rem; margin-bottom: 6px; }
.paper .subtitle { font-size: 1.1rem; color: var(--muted); margin: 0 0 20px; }
.paper .byline { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.paper .byline span { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.paper .abstract { background: var(--panel); padding: 4px 20px 8px; margin: 0 0 8px; }
.paper .abstract h2 { margin-top: 18px; }
.paper .abstract p { font-size: 0.95rem; }
.paper .keywords { color: var(--muted); }
.paper .figtitle { margin: 0 0 8px; }
.paper table { width: 100%; }
.paper caption strong, .paper figcaption strong { color: var(--ink); }
.paper .references li { font-size: 0.9rem; }
.paper .declarations p { font-size: 0.95rem; }
svg.dots .en { fill: var(--series-en); stroke: var(--ground); stroke-width: 2; }
svg.dots .tr { fill: var(--series-tr); stroke: var(--ground); stroke-width: 2; }
details { margin: 0 0 16px; }
summary { cursor: pointer; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
footer {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
footer .company { margin: 0 0 8px; line-height: 1.6; overflow-wrap: anywhere; }

/* Appended from research-tools/prose-trial/figures/styles-additions.css (figures.py). */
/* Additions for the prose-trial figures (figures.py). Append to public/styles.css.
   New token: --series-3, a third categorical hue beside --series-en and --series-tr. Validated with the
   dataviz palette validator, all pairs: light #1F5FA8/#C8741E/#1A8F66 on #FFFFFF passes (CVD 7.7, in the
   6-8 band, so every use carries a second channel: shape and a direct label or legend); dark
   #5A96E0/#C8741E/#22A477 on #0E2A4E passes. */
:root { --series-3: #1A8F66; }

/* Wide figures: break out of the 728px text column up to 1000px, centred; on narrow screens the SVG keeps
   a 640px minimum and scrolls inside its .scroll wrapper instead of shrinking the type. */
.paper figure.wide { width: min(1000px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
svg.dots.lg { max-width: none; min-width: 640px; }
svg.dots.lg .tick, svg.dots.lg .name { font-size: 16px; }
svg.dots.lg .val { fill: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
svg.dots.lg .val.best { font-weight: 700; }
svg.dots.lg .val.on-fill { fill: var(--ground); }
svg.dots.lg .axis-title { fill: var(--muted); font-size: 15px; }
svg.dots.lg .panel-title { fill: var(--ink); font-size: 16px; font-weight: 600; }
svg.dots.lg .axis { stroke: var(--rule); stroke-width: 1; }
svg.dots.lg .ci { stroke-width: 2.5; }

/* Categorical marks under neutral names (identity is also given by shape and legend). */
svg.dots .c0 { fill: var(--muted); stroke: var(--ground); stroke-width: 2; }
svg.dots .c1 { fill: var(--series-en); stroke: var(--ground); stroke-width: 2; }
svg.dots .c2 { fill: var(--series-tr); stroke: var(--ground); stroke-width: 2; }
svg.dots .c3 { fill: var(--series-3); stroke: var(--ground); stroke-width: 2; }
svg.dots .c1-ci { stroke: var(--series-en); }
svg.dots .c3-ci { stroke: var(--series-3); }
svg.dots .c1.bubble { fill-opacity: 0.55; stroke-width: 1.5; }
svg.dots .c0.small { fill-opacity: 0.75; stroke-width: 1.5; }
svg.dots .link { stroke: var(--muted); stroke-width: 1.5; opacity: 0.5; }
svg.dots .leader { stroke: var(--muted); stroke-width: 1; }

/* Heatmap cells: one hue, darker = higher, via fill-opacity set per cell. */
svg.dots .cell { fill: var(--series-en); }
svg.dots .cell.neg { fill: var(--series-tr); }
svg.dots .cell.s3 { fill: var(--series-3); }
svg.dots .cell-frame { fill: none; stroke: var(--ink); stroke-width: 2.5; }
svg.dots .cell-diag { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.dots .flag { fill: var(--ink); }

/* Rank slopes: blue = rank improved, orange = fell, grey = unchanged. */
svg.dots .slope { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.dots .slope.up { stroke: var(--series-en); }
svg.dots .slope.down { stroke: var(--series-tr); }
svg.dots .slope.same { stroke: var(--muted); }

/* Dark theme last, so it wins over the rules above of equal specificity. On dark ground the heaviest
   cells are mid-tone, so their values stay in light text. */
@media (prefers-color-scheme: dark) {
  :root { --series-3: #22A477; }
  svg.dots.lg .val.on-fill { fill: var(--text); }
}
