/* BrowseSafe++ site styles: colour, type and spacing tokens, then components. */

@font-face { font-family: "PPLX Sans"; src: url("../fonts/PPLX-Sans-Beta-v2-VF.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "PPLX Serif"; src: url("../fonts/PPLX-Serif-Beta-v2-VF.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "PPLX Mono"; src: url("../fonts/PPLX-Mono-Beta-v0-VF.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "GT Canon"; src: url("../fonts/GT-Canon-VF.woff2") format("woff2"); font-weight: 100 900; font-stretch: 50% 100%; font-display: swap; }

:root {
  color-scheme: light dark;
  --brand-ink: #263c33;

  /* colours, light */
  --bg-base: #fdfbfa;
  --bg-raised: #ffffff;
  --bg-underlay: rgb(243, 240, 236);
  --bg-soft: rgba(39, 26, 0, 0.07);
  --bg-subtle: rgba(39, 26, 0, 0.035);
  --fg: #27251e;
  --fg-secondary: rgba(39, 37, 30, 0.65);
  --fg-tertiary: rgba(39, 37, 30, 0.5);
  --fg-disabled: rgba(39, 37, 30, 0.2);
  --fg-inverse: #fdfbfa;
  --border-heavy: #27251e;
  --border: rgba(39, 26, 0, 0.14);
  --border-soft: rgba(39, 26, 0, 0.07);
  --accent: #016a71;
  --accent-hover: #0c4f54;
  --accent-active: #0f3639;
  --accent-soft: rgba(1, 106, 113, 0.09);
  --accent-subtle: rgba(1, 106, 113, 0.055);
  --positive: rgb(1, 107, 29);
  --negative: rgb(162, 53, 68);
  --caution: rgb(151, 67, 26);

  /* type */
  --font-sans: "PPLX Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "PPLX Serif", ui-serif, Georgia, serif;
  --font-display: "GT Canon", "PPLX Serif", ui-serif, Georgia, serif;
  --font-mono: "PPLX Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --w-regular: 400;
  --w-medium: 480;
  --w-semibold: 560;
  --w-serif-semibold: 635;

  /* dimensions */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-2xl: 16px;
  --page: 1200px;
  --prose: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #e5eadb;
    --bg-base: rgb(23, 22, 21);
    --bg-raised: rgb(30, 29, 28);
    --bg-underlay: rgb(18, 18, 17);
    --bg-soft: rgba(214, 213, 212, 0.07);
    --bg-subtle: rgba(214, 213, 212, 0.035);
    --fg: rgb(214, 213, 212);
    --fg-secondary: rgba(214, 213, 212, 0.65);
    --fg-tertiary: rgba(214, 213, 212, 0.5);
    --fg-disabled: rgba(214, 213, 212, 0.2);
    --fg-inverse: rgb(23, 22, 21);
    --border-heavy: rgb(214, 213, 212);
    --border: rgba(214, 213, 212, 0.14);
    --border-soft: rgba(214, 213, 212, 0.07);
    --accent: rgb(78, 153, 163);
    --accent-hover: rgb(34, 128, 140);
    --accent-active: rgb(26, 99, 108);
    --accent-soft: rgba(78, 153, 163, 0.09);
    --accent-subtle: rgba(78, 153, 163, 0.055);
    --positive: rgb(83, 158, 85);
    --negative: rgb(220, 105, 115);
    --caution: rgb(213, 113, 65);
  }
}

/* Base: body.lg 16/24 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-base); color: var(--fg); font: var(--w-regular) 16px/24px var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { max-width: 100%; }
::selection { background: var(--accent-soft); }

/* Link: accent text, underline on hover */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 1px; }
a:active { color: var(--accent-active); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

/* Headings: hero/display/headline in GT Canon (condensed, regular), title in serif, section in sans */
h1, h2, h3, h4 { margin: 0; color: var(--fg); }
h1 { font-family: var(--font-display); font-weight: 400; font-stretch: 75%; font-variation-settings: "wdth" 75; font-size: 46px; line-height: 56px; letter-spacing: -0.92px; }
h2 { font-family: var(--font-display); font-weight: 400; font-stretch: 75%; font-variation-settings: "wdth" 75; font-size: 28px; line-height: 36px; letter-spacing: -0.56px; }
h3 { font-family: var(--font-sans); font-weight: var(--w-semibold); font-size: 16px; line-height: 24px; }
.hero h1 { font-size: clamp(46px, 7vw, 72px); line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 16px; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
code { font-size: 14px; line-height: 20px; letter-spacing: -0.56px; background: var(--bg-subtle); border-radius: var(--r-xs); padding: 1px 4px; }
pre code { background: none; padding: 0; letter-spacing: -0.24px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--fg); color: var(--fg-inverse); padding: 8px 12px; border-radius: var(--r-md); }
.skip-link:focus { top: 12px; color: var(--fg-inverse); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--prose); }
.muted { color: var(--fg-secondary); }
.caption { font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg-base); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); }
.brand:hover, .brand:active { color: var(--brand-ink); text-decoration: none; }
.brand-mark { width: 35px; height: 35px; display: block; flex: none; }
/* Header lockup: light, tightly set wordmark. */
.brand-wordmark { font-family: var(--font-sans); font-size: 25px; line-height: 1.6; font-weight: 460; font-style: normal; font-variation-settings: "slnt" 0; letter-spacing: -0.045em; white-space: nowrap; }
/* Browser-default smoothing for the wordmark. */
.brand-wordmark { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
.brand-wordmark sup { font-size: 0.61em; font-weight: 400; margin-left: 1px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-md); color: var(--fg-secondary); font-size: 14px; font-weight: var(--w-medium); }
.nav a:hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--fg); background: var(--bg-soft); }
.nav-toggle { display: none; margin-left: auto; height: 32px; padding: 0 12px; background: none; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg); font: var(--w-medium) 14px/20px var(--font-sans); cursor: pointer; }
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-base); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; }
}

/* Sections */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--fg-secondary); max-width: 64ch; }
.page-head { padding: 64px 0 32px; border-bottom: 1px solid var(--border); }
.page-head .lede { font-size: 18px; line-height: 26px; color: var(--fg-secondary); max-width: 64ch; margin: 16px 0 0; }

/* Hero */
.hero { padding: 96px 0 64px; }
.hero .tagline { font-size: 20px; line-height: 28px; max-width: 46ch; margin: 24px 0 0; }
.hero .summary { color: var(--fg-secondary); max-width: 66ch; margin: 16px 0 0; }
.hero .release { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--fg-tertiary); }

/* Homepage: a bright, wide scene, with copy placed in its quiet side.
   Keep the image's material detail; only the perimeter meets the page. */
.hero-scene {
  --hero-paper: #fdfbfa;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  min-height: 610px;
  display: flex;
  align-items: center;
  color: #26362e;
  background: var(--hero-paper);
}
.hero-scene .hero-art {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  right: -8vw;
  width: min(1200px, 80vw);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28%);
  mask-image: linear-gradient(to right, transparent, #000 28%);
}
.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  transform: scaleX(-1);
}
.hero-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--hero-paper), transparent 13%, transparent 78%, var(--hero-paper));
}
.hero-scene .hero-content { padding-top: 100px; padding-bottom: 114px; }
.hero-scene h1 { color: inherit; font-size: clamp(60px, 6.2vw, 88px); line-height: 1.06; letter-spacing: -0.035em; }
.hero-scene h1 sup { font-family: var(--font-sans); font-size: .42em; font-weight: 400; vertical-align: super; letter-spacing: -.07em; margin-left: .07em; }
.hero-scene .tagline { font-size: 26px; line-height: 1.32; letter-spacing: -.025em; margin-top: 28px; max-width: 25ch; }
.hero-scene .hero-deck { font-size: 16px; line-height: 25px; max-width: 40ch; margin: 18px 0 0; color: #62675e; }
.hero-scene .cta-row { gap: 22px; align-items: center; margin-top: 30px; }
.hero-scene .btn-primary { background: #263c33; color: #fdfbfa; height: 42px; border-radius: 6px; font-size: 14px; padding: 0 18px; }
.hero-scene .btn-primary:hover { background: #3e5549; }
.hero-scene .hero-link { display: inline-flex; align-items: center; min-height: 42px; color: #263c33; font-size: 14px; }
.hero-scene a:focus-visible { outline: 2px solid #016a71; outline-offset: 5px; }
.benchmark-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; padding: 48px 0 0; }
.benchmark-intro h2 { font-size: 27px; line-height: 34px; }
.benchmark-intro p { color: var(--fg-secondary); margin: 0; font-size: 15px; line-height: 25px; max-width: 76ch; }
@media (min-width: 1600px) {
  .hero-scene .hero-art { width: 74vw; right: -5vw; }
  .hero-art img { object-position: center 60%; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .hero-scene { min-height: 560px; }
  .hero-scene .hero-art { width: 72vw; right: -12vw; }
  .hero-scene .hero-content { padding-top: 86px; padding-bottom: 96px; }
  .hero-scene .tagline { font-size: 24px; }
}
@media (max-width: 860px) {
  .hero-scene { min-height: auto; align-items: flex-start; }
  .hero-scene .hero-content { padding-top: 52px; padding-bottom: 320px; }
  .hero-scene .hero-art { width: 100%; height: 360px; top: auto; bottom: 0; right: 0; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24%); mask-image: linear-gradient(to bottom, transparent, #000 24%); }
  .hero-art img { object-position: center 59%; }
  .hero-scene::after { background: linear-gradient(to bottom, transparent 87%, var(--hero-paper)); }
  .hero-scene h1 { font-size: clamp(51px, 9.5vw, 70px); }
  .hero-scene .tagline { font-size: 24px; margin-top: 22px; }
  .hero-scene .hero-deck { max-width: 42ch; }
  .benchmark-intro { grid-template-columns: 1fr; gap: 16px; padding-top: 32px; }
  .benchmark-intro h2 br { display: none; }
}
@media (max-width: 480px) {
  .hero-scene .hero-content { padding-top: 40px; padding-bottom: 252px; }
  .hero-scene .hero-art { height: 282px; }
  .hero-scene .tagline { font-size: 23px; }
  .hero-scene .hero-deck { font-size: 15px; line-height: 23px; }
  .hero-scene .cta-row { display: grid; grid-template-columns: repeat(3, max-content); gap: 8px 17px; }
  .hero-scene .hero-link, .hero-scene .btn-primary { font-size: 13px; }
  .hero-scene .btn-primary { grid-column: 1 / -1; justify-self: start; padding: 0 14px; }
}
@media (prefers-color-scheme: dark) {
  /* Preserve the selected bright artwork instead of recoloring it. */
  .hero-scene { border-bottom: 1px solid #d8d9d0; }
}
@media print {
  .hero-scene { min-height: auto; }
  .hero-scene .hero-content { padding: 30px 0; }
  .hero-scene .hero-art, .hero-scene::after { display: none; }
}

/* Button: default h40 16px px16 r8, weight 480 */
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid transparent; font: var(--w-medium) 16px/24px var(--font-sans); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; line-height: 20px; }
.btn-primary { background: var(--fg); color: var(--fg-inverse); }
.btn-primary:hover { background: var(--fg-secondary); color: var(--fg-inverse); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-subtle); color: var(--fg); }

/* Key figures */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: 24px 20px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num { font-family: var(--font-display); font-stretch: 75%; font-variation-settings: "wdth" 75; font-size: 36px; line-height: 48px; letter-spacing: -0.72px; font-variant-numeric: tabular-nums; }
.stat .label { margin-top: 4px; color: var(--fg-secondary); font-size: 14px; line-height: 20px; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--border); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Three-column text */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .cols-3 { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.cols-3 > div { border-top: 1px solid var(--border); padding-top: 16px; }
.cols-3 h3 { margin-bottom: 8px; }
.cols-3 p { color: var(--fg-secondary); margin: 0; font-size: 14px; line-height: 20px; }

/* Diagram */

/* Leaderboard */
.board-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; color: var(--fg-secondary); font-size: 14px; line-height: 20px; margin: 0 0 16px; }
.board-meta strong { color: var(--fg); font-weight: var(--w-medium); }
/* Tabs: 14px, weight 480, 2px indicator */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 32px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 14px 0; font: var(--w-medium) 14px/20px var(--font-sans); color: var(--fg-secondary); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.tab:focus-visible { outline-offset: -2px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { font-family: var(--font-serif); font-stretch: normal; font-variation-settings: normal; font-weight: var(--w-serif-semibold); font-size: 20px; line-height: 28px; letter-spacing: 0; }
.panel-head p { margin: 4px 0 0; color: var(--fg-secondary); max-width: 66ch; font-size: 14px; line-height: 20px; }

/* SegmentedControl: track 3px r10 bg.subtle, item h32 px10 14px r8 */
.segmented { display: inline-flex; gap: 0; margin: 0; padding: 3px; border: 0; border-radius: 10px; background: var(--bg-subtle); flex-wrap: wrap; }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-md); font-size: 14px; line-height: 20px; font-weight: var(--w-medium); color: var(--fg-secondary); }
.segmented input:checked + span { background: var(--bg-raised); border-color: var(--border); color: var(--fg); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented label:hover input:not(:checked) + span { color: var(--fg); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-raised); }
table.lb, table.plain { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
table.lb caption, table.plain caption { text-align: left; caption-side: top; padding: 0; }
table.lb th, table.lb td, table.plain th, table.plain td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.lb tbody tr:last-child td, table.plain tbody tr:last-child td, table.plain tbody tr:last-child th { border-bottom: 0; }
table.lb thead th, table.plain thead th { font-size: 12px; line-height: 16px; font-weight: var(--w-medium); color: var(--fg-tertiary); white-space: nowrap; border-bottom: 1px solid var(--border); }
table.lb tbody tr:hover td { background: var(--bg-subtle); }
table.lb td.rank { width: 48px; color: var(--fg-tertiary); font-variant-numeric: tabular-nums; }
table.lb td.model { min-width: 220px; }
table.lb .model-name { font-weight: var(--w-medium); }
table.lb th.num, table.lb td.num, table.plain .num { text-align: right; }
table.lb td.metric { min-width: 140px; }
.sort-btn { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sort-btn:hover { color: var(--fg); }
.sort-btn .arrow { width: 0.8em; opacity: 0; }
th[aria-sort="ascending"] .sort-btn, th[aria-sort="descending"] .sort-btn { color: var(--fg); }
th[aria-sort="ascending"] .arrow, th[aria-sort="descending"] .arrow { opacity: 1; }
.dir { color: var(--fg-tertiary); margin-left: 2px; }

.cell-metric { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.meter { flex: 1 1 auto; max-width: 88px; min-width: 40px; height: 4px; border-radius: 2px; background: var(--bg-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); }
.meter.low > i { background: var(--fg-tertiary); }
.val { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.val.best { font-weight: var(--w-semibold); }

/* Badge: rounded, px6, 11px, weight 480, soft fill */
.badge { display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: 9999px; font-size: 11px; line-height: 18px; font-weight: var(--w-medium); background: var(--bg-soft); color: var(--fg-secondary); vertical-align: 1px; white-space: nowrap; }
.badge.guard { background: var(--accent-soft); color: var(--accent); }
a.badge { cursor: pointer; }
a.badge:hover { color: var(--accent-hover); background: var(--accent-soft); text-decoration: underline; }

.notes { margin: 16px 0 0; padding-left: 18px; font-size: 12px; line-height: 16px; color: var(--fg-tertiary); max-width: 90ch; }
.notes li { margin: 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; line-height: 16px; color: var(--fg-tertiary); margin: 12px 0 0; align-items: center; }
.legend .badge { margin-left: 0; margin-right: 4px; }
.updated { font-size: 14px; line-height: 20px; color: var(--fg-tertiary); }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.preview-toolbar .updated { margin: 0; }
.preview-finding { margin: 0 0 24px; padding-left: 16px; border-left: 2px solid var(--accent); color: var(--fg-secondary); font-size: 16px; line-height: 24px; }
.preview-finding strong { color: var(--fg); font-weight: var(--w-medium); }
.preview-method { max-width: 100ch; margin: 16px 0 0; font-size: 12px; line-height: 18px; color: var(--fg-tertiary); }
.preview-more { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--fg-secondary); }
#lb-charts[data-preview] { margin-top: 36px; }

/* News: dated editorial rows, without cards or ornamental badges. */
.home-news { display: grid; grid-template-columns: 1fr 3fr; gap: 40px; }
.news-item { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--border); }
.news-item:first-child { padding-top: 0; border-top: 0; }
.news-item:last-child { padding-bottom: 0; }
.news-item time, .news-date { font-size: 14px; line-height: 24px; color: var(--fg-tertiary); }
.news-item h3 { font-size: 16px; line-height: 24px; margin: 0 0 6px; }
.news-item h3 a { color: inherit; }
.news-item p { margin: 0; color: var(--fg-secondary); font-size: 14px; line-height: 22px; }
@media (max-width: 860px) {
  .home-news { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #lb-preview table.lb td.metric { min-width: 88px; }
  .meter { display: none; }
  table.lb td.model { min-width: 150px; }
  table.lb th, table.lb td { padding: 10px 12px; }
}

/* Charts */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.charts.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.chart { margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-raised); padding: 20px 20px 16px; }
.chart h3 { font-size: 14px; line-height: 20px; font-weight: var(--w-semibold); margin: 0; }
.chart .sub { margin: 2px 0 8px; font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart figcaption { margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }
.ch-grid { stroke: var(--border-soft); stroke-width: 1; }
.ch-axis { stroke: var(--border); stroke-width: 1; }
.ch-tick { fill: var(--fg-tertiary); font: 400 12px/16px var(--font-sans); font-variant-numeric: tabular-nums; }
.ch-title { fill: var(--fg-secondary); font: 480 12px/16px var(--font-sans); }
.ch-label { fill: var(--fg); font: 400 12px/16px var(--font-sans); }
.ch-label.dim { fill: var(--fg-secondary); }
.ch-dot { stroke: var(--bg-raised); stroke-width: 1.5; }
.ch-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }
.ch-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* Code blocks */
.code { position: relative; margin: 12px 0 24px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); }
.code .code-label { display: flex; justify-content: space-between; align-items: center; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--border-soft); font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 14px; line-height: 20px; letter-spacing: -0.56px; color: var(--fg); }
.copy-btn { appearance: none; height: 24px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-secondary); font: var(--w-medium) 12px/16px var(--font-sans); cursor: pointer; }
.copy-btn:hover { background: var(--bg-soft); color: var(--fg); }
.copy-btn.copied { color: var(--positive); }
.tok-c { color: var(--fg-tertiary); }

/* Docs layout */
.doc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; padding: 48px 0 96px; }
.doc-toc { position: sticky; top: 96px; align-self: start; font-size: 14px; line-height: 20px; }
.doc-toc p { font-size: 12px; line-height: 16px; color: var(--fg-tertiary); font-weight: var(--w-medium); margin: 0 0 8px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; }
.doc-toc a { display: block; padding: 6px 8px; border-radius: var(--r-sm); color: var(--fg-secondary); }
.doc-toc a:hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
.doc-body { max-width: 760px; }
.doc-body section { margin-bottom: 56px; scroll-margin-top: 96px; }
.doc-body h2 { margin-bottom: 16px; }
.doc-body h3 { margin: 24px 0 8px; }
.doc-body ul, .doc-body ol { padding-left: 1.2em; }
.doc-body li { margin: 6px 0; }
@media (max-width: 860px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; } .doc-toc { position: static; } }
.note { border-radius: var(--r-md); padding: 12px 16px; background: var(--bg-subtle); font-size: 14px; line-height: 20px; margin: 16px 0; }
.note p:last-child { margin-bottom: 0; }
dl.fields { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 12px 0 0; font-size: 14px; line-height: 20px; }
dl.fields dt { font-family: var(--font-mono); letter-spacing: -0.56px; color: var(--fg); }
dl.fields dd { margin: 0; color: var(--fg-secondary); }
@media (max-width: 560px) { dl.fields { grid-template-columns: 1fr; } dl.fields dd { margin-bottom: 8px; } }

.check { color: var(--positive); }
.cross { color: var(--fg-tertiary); }
table.plain tr.ours th, table.plain tr.ours td { background: var(--accent-subtle); }
table.plain tbody th { font-weight: var(--w-medium); text-align: left; white-space: nowrap; }
table.plain td.num, table.plain th.num { font-variant-numeric: tabular-nums; }
table.plain tfoot td, table.plain tfoot th { border-top: 1px solid var(--border); font-weight: var(--w-medium); border-bottom: 0; }

.cite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .cite { grid-template-columns: minmax(0, 1fr); } }

/* Footer: wordmark and links, then a compact attribution row. */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 28px; font-size: 14px; line-height: 20px; color: var(--fg-secondary); }
.site-footer p { margin: 0; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.footer-brand { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-ink); }
.footer-brand:hover, .footer-brand:active { color: var(--brand-ink); text-decoration: none; }
.footer-brand .brand-mark { width: 25px; height: 25px; }
.footer-brand .brand-wordmark { font-size: 19px; }
.site-footer ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer ul a { color: var(--fg-secondary); }
.site-footer ul a:hover { color: var(--fg); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 12px; line-height: 16px; color: var(--fg-tertiary); }
.footer-bottom a { color: var(--fg-secondary); }
.footer-bottom a:hover { color: var(--fg); }

.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding: 96px 0; }
.not-found .code404 { font-size: 14px; color: var(--fg-tertiary); margin-bottom: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 300ms ease-out, border-color 300ms ease-out, color 300ms ease-out, opacity 300ms ease-out; }
  .nav a, .tab, .copy-btn, .segmented span { transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease); }
}
@media print { .site-header, .site-footer, .copy-btn, .tabs { display: none; } }

/* Motion */
:root { --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUpAndFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tabs { position: relative; }
.tabs.has-ind .tab[aria-selected="true"] { border-bottom-color: transparent; }
.tab-ind { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--fg); pointer-events: none; }
.segmented { position: relative; }
.segmented label { z-index: 1; }
.seg-thumb { position: absolute; left: 0; top: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); pointer-events: none; opacity: 0; }
.segmented.has-thumb input:checked + span { background: transparent; border-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .bs-enter { animation: slideUpAndFadeIn 150ms var(--ease-out-expo); }
  .val.bs-enter { animation-name: fadeIn; }
  .tab-ind.animate { transition: transform 300ms ease-in-out, width 300ms ease-in-out; }
  .seg-thumb.animate { transition: transform 150ms ease-out, width 150ms ease-out; }
  table.lb tbody tr { transition: transform 300ms var(--ease-out-expo); }
  .meter > i { transition: width 300ms var(--ease-out-expo); }
}

.footer-bottom .pplx-link { display: inline-flex; color: var(--fg-tertiary); }
.footer-bottom .pplx-link:hover { color: var(--fg-secondary); }
.pplx-logo { height: 16px; width: auto; display: block; }
.ch-leader { stroke: var(--fg-tertiary); stroke-width: 0.75; }
.ch-mode { margin: 8px 0 0; }
