/* Stay Fair! project page. Palette follows Figure 1 of the paper (#2563eb / #555d66). */
:root {
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --blue-soft: rgba(37, 99, 235, 0.09);
  --blue-line: rgba(37, 99, 235, 0.35);
  --cfg: #555d66;
  --female: #d64541;
  --male: #2e75b6;
  --bad: #b45345;

  --bg: #f8fafd;
  --bg-glass: rgba(248, 250, 253, 0.82);
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --text: #161a22;
  --muted: #5b6472;
  --line: rgba(22, 26, 34, 0.10);
  --grid: rgba(22, 26, 34, 0.14);
  --btn-bg: #161a22;
  --btn-text: #ffffff;
  --figure-bg: #ffffff;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 18px 50px -30px rgba(15, 30, 70, 0.30);

  --maxw: 1160px;
  --pad-x: clamp(16px, 4vw, 48px);
  --header-h: 60px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #5b8cff; --blue-strong: #7ea4ff; --blue-soft: rgba(91, 140, 255, 0.12); --blue-line: rgba(91, 140, 255, 0.40);
    --cfg: #a3abb6; --female: #f07470; --male: #6aa7e0; --bad: #f08a7a;
    --bg: #0c1018; --bg-glass: rgba(12, 16, 24, 0.82); --surface: #131927; --surface-2: #182033;
    --text: #e8ecf3; --muted: #9aa4b4; --line: rgba(232, 236, 243, 0.10); --grid: rgba(232, 236, 243, 0.16);
    --btn-bg: #e8ecf3; --btn-text: #0c1018; --figure-bg: #ffffff;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 18px 50px -30px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  --blue: #5b8cff; --blue-strong: #7ea4ff; --blue-soft: rgba(91, 140, 255, 0.12); --blue-line: rgba(91, 140, 255, 0.40);
  --cfg: #a3abb6; --female: #f07470; --male: #6aa7e0; --bad: #f08a7a;
  --bg: #0c1018; --bg-glass: rgba(12, 16, 24, 0.82); --surface: #131927; --surface-2: #182033;
  --text: #e8ecf3; --muted: #9aa4b4; --line: rgba(232, 236, 243, 0.10); --grid: rgba(232, 236, 243, 0.16);
  --btn-bg: #e8ecf3; --btn-text: #0c1018; --figure-bg: #ffffff;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 18px 50px -30px rgba(0, 0, 0, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 650; }
em { font-style: italic; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.narrow { max-width: calc(820px + 2 * var(--pad-x)); }
.narrow-inner { max-width: 820px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg-glass); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0;
}
.primary-nav { display: flex; gap: 4px; margin-left: auto; }
.primary-nav a {
  color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 999px;
  transition: color .15s, background .15s;
}
.primary-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.primary-nav a.is-active { color: var(--blue); background: var(--blue-soft); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; display: grid; place-items: center; flex: none;
}
@media (max-width: 860px) {
  .primary-nav { display: none; }
  .icon-btn { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 112px) 0 clamp(32px, 5vw, 56px); text-align: center; }
.hero-title { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.hero-title .mega { display: block; font-size: clamp(56px, 11vw, 128px); color: var(--blue); }
.hero-sub {
  display: block; margin: 18px auto 0; max-width: 860px;
  font-size: clamp(22px, 3.2vw, 36px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: var(--text);
}
.authors { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 18px; font-weight: 500; }
.authors a { color: var(--text); border-bottom: 1px solid var(--blue-line); }
.authors a:hover { color: var(--blue); text-decoration: none; }
.authors sup, .affils sup { color: var(--muted); font-size: 0.65em; margin-left: 1px; }
.affils { margin-top: 6px; display: flex; justify-content: center; gap: 18px; color: var(--muted); }
.affil-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.link-row { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text); font-weight: 600; font-size: 15px;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }
.accepted { margin-top: 18px; font-size: 16px; color: var(--muted); }
.accepted b { color: var(--blue); font-weight: 700; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.band { background: var(--surface-2); }
.band-soft { background: linear-gradient(180deg, var(--bg) 0%, var(--surface-2) 18%, var(--surface-2) 82%, var(--bg) 100%); }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.eyebrow { color: var(--blue); font-weight: 800; font-size: clamp(17px, 1.6vw, 20px); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.headline { margin: 0; font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.headline em, .h2 em { font-style: normal; color: var(--blue); }
.headline-lead { display: block; font-size: 0.5em; font-weight: 600; letter-spacing: -0.015em; color: var(--muted); margin-bottom: 10px; }
.headline-main { display: block; }
.headline-sub { max-width: 720px; margin: 18px auto 0; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.55; color: var(--muted); }
.headline-sub.one-line { max-width: none; }
.headline-sub .w-cfg { color: var(--cfg); font-weight: 750; }
.headline-sub .w-sf { color: var(--blue); font-weight: 750; }
.mega-h { margin: 0; font-size: clamp(44px, 8vw, 88px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.h2 { text-wrap: balance; margin: 0; font-size: clamp(28px, 4vw, 44px); font-weight: 750; letter-spacing: -0.025em; line-height: 1.12; }
.h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 48px 0 14px; }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 900px; }
.prose p { margin: 0 0 16px; }
.key { color: var(--blue); font-weight: 700; }
.caption { color: var(--muted); font-size: 15px; margin: 16px 0 0; max-width: 900px; }
.caption b { color: var(--text); }
.c-f { color: var(--female); font-weight: 650; }
.c-m { color: var(--male); font-weight: 650; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 2px 0; }
.eq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 4px 16px; margin: 18px 0; overflow-x: auto;
}

/* ---------- Overview demo ---------- */
.overview { padding-top: clamp(24px, 4vw, 48px); }
.overview .section-head, .center-head { text-align: center; }
.headline { text-wrap: balance; }
.demo { display: grid; gap: 16px; max-width: 1000px; margin: 0 auto; }
.demo-right { display: grid; gap: 16px; min-width: 0; }

.settings { overflow: hidden; }
.settings-title {
  padding: 12px 20px; font-weight: 700; font-size: 15px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--grid); }
.dots i:first-child { background: var(--blue); }
.settings-body { display: grid; grid-template-columns: auto minmax(200px, 1fr) minmax(320px, 1.5fr); }
.field { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.field + .field { border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .settings-body { grid-template-columns: 1fr; }
  .field + .field { border-left: 0; border-top: 1px solid var(--line); }
}
.settings-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px; transition: all .15s; white-space: nowrap;
}
.seg-btn::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; }
.seg-btn.is-active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.seg-btn.is-active::before { background: var(--blue); border-color: var(--blue); }
.prompt-box {
  font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--muted);
}
.prompt-box b { color: var(--text); }
.field-scale { background: var(--blue-soft); }
.scale-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scale-title { color: var(--blue); font-weight: 750; font-size: 17px; }
.scale-value { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; margin: 6px 0 2px; background: transparent; cursor: pointer; --fill: 0%; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0 var(--fill), var(--grid) var(--fill) 100%);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--grid); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .15s;
}
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--text); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px var(--blue-line); }
.scale-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 13px; }
.scale-ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; cursor: pointer; }
.scale-ticks span.is-on { color: var(--blue); font-weight: 600; }
.play-btn {
  margin-left: auto; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--blue-line); background: var(--surface); color: var(--blue);
}
.play-btn { padding: 5px 12px; font-size: 13px; }
.play-btn:hover { background: var(--blue-soft); }

.chart-card { padding: 20px 20px 12px; display: flex; flex-direction: column; min-width: 0; }
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chart-kicker { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.chart-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 650; }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg i { width: 26px; height: 3px; border-radius: 2px; position: relative; }
.lg i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); background: inherit; }
.lg-cfg { color: var(--cfg); } .lg-cfg i { background: var(--cfg); }
.lg-sf { color: var(--blue); } .lg-sf i { background: var(--blue); }

.chart { width: 100%; margin-top: 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 13px; }
.chart .axis { stroke: var(--cfg); stroke-width: 1.2; }
.chart .grid { stroke: var(--grid); stroke-dasharray: 3 4; }
.chart .parity { stroke: var(--cfg); stroke-dasharray: 5 4; stroke-width: 1.2; opacity: .8; }
.chart .ref { stroke: var(--blue); stroke-dasharray: 5 4; stroke-width: 1.4; opacity: .75; }
.chart .line-cfg { fill: none; stroke: var(--cfg); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-sf { fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot-cfg { fill: var(--cfg); }
.chart .dot-sf { fill: var(--blue); }
.chart .dot { transition: r .25s var(--ease); }
.chart .ref-ring { fill: var(--surface); stroke: var(--cfg); stroke-width: 2.5; }
.chart .cursor { fill: var(--blue-soft); }
.chart .val { font-size: 14px; font-weight: 700; }
.chart .val-cfg { fill: var(--cfg); }
.chart .val-sf { fill: var(--blue); }
.chart .lbl-ref { fill: var(--blue); font-weight: 600; font-size: 12px; }
.chart .lbl-parity { font-size: 12px; }
.chart .axis-title { font-size: 13px; fill: var(--muted); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .pts, .chart .lines { transition: opacity .3s; }

.readouts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 16px 16px; }
.readout .ro-status { line-height: 1.3; }
.readout { border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ro-sf { background: var(--blue-soft); border-color: var(--blue-line); }
.ro-label { font-size: 13px; font-weight: 650; color: var(--muted); }
.ro-sf .ro-label { color: var(--blue); }
.ro-num { font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ro-num small { font-size: 0.5em; font-weight: 700; margin-left: 2px; color: var(--muted); }
.ro-cfg .ro-num { color: var(--cfg); }
.ro-sf .ro-num { color: var(--blue); }
.ro-delta { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); margin-top: 2px; }
.ro-delta.is-bad { color: var(--bad); font-weight: 600; }
.ro-delta.is-good { color: var(--blue); font-weight: 600; }
.ro-status { font-size: 13px; margin-top: 8px; display: flex; gap: 6px; align-items: center; color: var(--muted); }
.ro-status.bad i, .ro-status.bad b { color: var(--bad); }
.ro-status.good i, .ro-status.good b { color: var(--blue); }


@media (max-width: 420px) { .ro-vs { display: none; } }

/* Samples under the chart */
.samples-card { padding: 16px 20px 18px; }
.samples-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.samples-title { font-weight: 700; }
.samples-title span { font-family: var(--mono); font-weight: 500; color: var(--blue); }
.samples-legend { font-size: 13px; color: var(--muted); }
.samples { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; align-items: center; }
.samples .s-lbl { font-size: 13px; font-weight: 700; text-align: right; color: var(--cfg); line-height: 1.2; }
.samples .s-lbl.ours { color: var(--blue); }
.samples .s-lbl small { display: block; font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.s-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.s-row img, .s-slot { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; object-fit: cover; }
.s-row img { border: 3px solid; transition: border-color .2s; background: var(--surface-2); }
.s-row img.f { border-color: var(--female); }
.s-row img.m { border-color: var(--male); }
.s-slot { border: 1.5px dashed var(--grid); background: var(--surface-2); }
.samples-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
@media (max-width: 560px) { .samples { grid-template-columns: 1fr; } .samples .s-lbl { text-align: left; } .s-row { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Problem ---------- */
.pb { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .pb { grid-template-columns: 1fr; } .pb-fig { order: -1; max-width: 460px; width: 100%; margin: 0 auto; } }
.pb-text { display: grid; gap: 14px; min-width: 0; grid-auto-rows: 1fr; }
.pb-block {
  font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.pb-block:hover { border-color: var(--blue-line); }
.pb-block.is-active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.pb-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--surface-2); color: var(--muted); transition: all .2s;
}
.pb-block.is-active .pb-num { background: var(--blue); color: #fff; }
.pb-body { display: block; min-width: 0; }
.pb-title { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 2px 0 4px; }
.pb-desc { display: block; font-size: 15.5px; color: var(--muted); }
.pb-eq { display: block; overflow-x: auto; margin: 6px 0 2px; }
.pb-eq mjx-container { font-size: 108% !important; }
.pb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.t-guid { background: rgba(192, 57, 43, 0.10); color: var(--bad); }
.tag.t-model { background: var(--surface-2); color: var(--text); }
.tag.t-fair { background: var(--blue-soft); color: var(--blue); }
.t-model { color: var(--text); }
.t-guid { color: var(--bad); }
.pb-fig { margin: 0; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pb-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.pb-chart text { font-family: var(--font); font-size: 12.5px; fill: var(--muted); }
.pb-chart .ax { stroke: var(--cfg); stroke-width: 1.2; }
.pb-chart .tline { stroke: var(--text); stroke-width: 2; }
.pb-chart .refline { stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .8; }
.pb-chart .curve { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke .3s; }
.pb-chart .curve.cfg { stroke: var(--cfg); }
.pb-chart .curve.fair { stroke: var(--blue); stroke-width: 4; }
.pb-chart .br-model { stroke: var(--text); stroke-width: 2; }
.pb-chart .br-guid { stroke: var(--bad); stroke-width: 2.5; }
.pb-chart .br-guid.zero { stroke: var(--blue); }
.pb-chart text { font-size: 14px; }
.pb-chart .lbl-fair { fill: var(--blue); font-weight: 700; }
.pb-chart .lbl-cur { fill: var(--cfg); font-weight: 650; }
.pb-chart .lbl-model { fill: var(--text); font-weight: 650; }
.pb-chart .br-total { stroke: var(--muted); stroke-width: 1.6; }
.pb-chart .guide { stroke: var(--grid); stroke-width: 1; stroke-dasharray: 2 3; }
.pb-chart .lbl-total { fill: var(--muted); font-weight: 650; }
.pb-chart .lbl-guid { fill: var(--bad); font-weight: 650; }
.pb-chart .lbl-guid.zero { fill: var(--blue); }
.pb-chart .lbl-ref { fill: var(--blue); }
.pb-chart .lbl-t { fill: var(--text); font-weight: 650; }
.pb-chart .pt { fill: var(--cfg); }
.pb-chart .pt.fair { fill: var(--blue); }
.pb-chart .pt-ref { fill: var(--surface); stroke: var(--cfg); stroke-width: 2.2; }
.pb-handle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.pb-handle input[type="range"] { margin: 0; flex: 1; }
@media (max-width: 560px) {
  .pb-block { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .pb-eq mjx-container { font-size: 82% !important; }
}

/* Problem: one figure with both statements drawn into it */
.pb-one { margin: 0 auto; max-width: 960px; padding: 14px 18px 8px; }
.pb-stage { position: relative; max-width: 960px; margin: 0 auto; }
.pb-stage .pb-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
/* Statements written in the reference-page style: question head, highlighted prose, boxed equation */
.pb-q { max-width: 960px; margin: 0 auto; }
.pb-q + .pb-one, .pb-one + .pb-q { margin-top: 22px; }
.pb-q-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.pb-q-title .pb-num { width: 26px; height: 26px; font-size: 13px; background: var(--text); color: var(--surface); }
.pb-q-title.is-blue { color: var(--blue); }
.pb-q-title.is-blue .pb-num { background: var(--blue); color: #fff; }
.pb-q p { margin: 0 0 12px; color: var(--muted); }
.pb-q .typeset-eq + .pb-lead, .pb-q .pb-where + .pb-lead { margin-top: 26px; }
.pb-q .pb-where { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }
.pb-q .typeset-eq + .pb-lead:last-child { margin-top: 26px; margin-bottom: 0; }
.pb-q .pb-lead { font-size: clamp(18px, 1.8vw, 21px); font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.pb-q mark { color: var(--text); padding: 1px 4px; border-radius: 4px; }
.mk-guid { background: rgba(192, 57, 43, 0.18); font-weight: 700; }
.mk-model { background: rgba(120, 128, 140, 0.20); }
.mk-total { background: rgba(138, 146, 156, 0.22); }
.mk-fair { background: rgba(37, 99, 235, 0.18); }
.mk-null { background: rgba(46, 125, 50, 0.16); }
.m-block { max-width: none; margin-top: 8px; }
.m-block + .m-fig { margin-top: 24px; }
.m-fig { margin: 0; }
.m-fig + .m-block { margin-top: 56px; }
.m-impl { margin-top: 56px !important; margin-bottom: 14px !important; }
.m-head { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 750; letter-spacing: -0.02em; color: var(--text); }
.m-fig .cfg-plot { width: 100%; max-width: 860px; margin: 0 auto; }
.typeset-eq { max-width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 20px; overflow-x: auto; }
.typeset-eq mjx-container { font-size: 112% !important; }
.typeset-eq .eq-note { color: var(--muted); font-size: 82%; }
.typeset-eq .hl-total, .typeset-eq .hl-guid, .typeset-eq .hl-model, .typeset-eq .hl-fair, .typeset-eq .hl-null { padding: 3px 6px; border-radius: 5px; }
.typeset-eq .hl-null { background: rgba(46, 125, 50, 0.16); }
.typeset-eq .hl-total { background: rgba(138, 146, 156, 0.22); }
.typeset-eq .hl-guid { background: rgba(192, 57, 43, 0.18); outline: 1.5px solid rgba(192, 57, 43, 0.55); font-weight: 700; }
.typeset-eq .hl-model { background: rgba(120, 128, 140, 0.20); }
.typeset-eq .hl-fair { background: rgba(37, 99, 235, 0.18); }
@media (max-width: 760px) { .typeset-eq { padding: 6px 8px; } .typeset-eq mjx-container { font-size: 62% !important; } }

/* ---------- Method ---------- */
.method-lead { margin-top: 14px; }
.sub-h { margin: 36px 0 14px; }
.sub-h:first-of-type { margin-top: 8px; }
.mcards { margin-top: 0 !important; }
.fig-card {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(12px, 2.5vw, 24px); box-shadow: var(--shadow);
}
.fig-card img { width: 100%; height: auto; border-radius: var(--r-sm); background: var(--figure-bg); }
.fig-card figcaption { color: var(--muted); font-size: 15px; margin-top: 14px; }
.fig-card figcaption b { color: var(--text); }

.mcards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.mcard.mcard-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: center; }
.mcard-split .mchart { margin-top: 0; }
.mcard-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mcard-side .mcard-title, .mcard-side .mcard-text { margin: 0; }
.cfg-plot { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cfg-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-eq { margin: 4px 0 0; overflow-x: auto; }
.m-eq mjx-container { font-size: 112% !important; margin: 10px 0 !important; }
.cfg-body { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; align-items: stretch; }
.vslider { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 34px; }
.vs-end { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text); }
.vs-track { position: relative; flex: 1; width: 30px; min-height: 140px; }
.vs-track input[type="range"] {
  position: absolute; left: 50%; top: 50%; margin: 0;
  width: var(--len, 200px); transform: translate(-50%, -50%) rotate(-90deg);
}
.m-src { margin: 0; font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .m-eq mjx-container { font-size: 80% !important; } }
@media (max-width: 860px) { .mcard.mcard-split { grid-template-columns: 1fr; } }
.mcard { padding: 20px 22px 18px; min-width: 0; display: flex; flex-direction: column; }
.mcard-kicker { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .04em; }
.mcard-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 4px 0 12px; }
.mcard-text { font-size: 15px; color: var(--muted); margin: 12px 0 0; }
.mcard-text b { color: var(--text); }
.seg-sm .seg-btn { font-size: 13px; padding: 6px 10px; }
.mchart { margin-top: 10px; }
.mchart svg { width: 100%; height: auto; display: block; overflow: visible; }
.mchart text { font-family: var(--font); font-size: 12.5px; fill: var(--muted); }
.mchart .ax { stroke: var(--cfg); stroke-width: 1.2; }
.mchart .dens-f { fill: rgba(214, 69, 65, 0.16); stroke: var(--female); stroke-width: 2.2; }
.mchart .dens-m { fill: rgba(46, 117, 182, 0.16); stroke: var(--male); stroke-width: 2.2; }
.pb-val { font-family: var(--mono); font-size: 12.5px; color: var(--text); min-width: 64px; text-align: right; }
.mchart .refline { stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .8; }
.mchart .ghost { fill: none; stroke: var(--grid); stroke-width: 2; stroke-dasharray: 2 4; }
.mchart .line { fill: none; stroke-width: 3; stroke-linecap: round; }
.mchart .pt-ref { fill: var(--surface); stroke: var(--cfg); stroke-width: 2.2; }
.mchart .lbl-a { font-weight: 650; }
.mchart .grid-h { stroke: var(--grid); stroke-dasharray: 3 4; }
.mchart .a-bg { fill: none; stroke: var(--grid); stroke-width: 1.6; }
.mchart .a-line { fill: none; stroke-width: 3; stroke-linejoin: round; }
.mchart .a-line.a-cfg { stroke: var(--cfg); } .mchart .a-pt.a-cfg { fill: var(--cfg); }
.mchart .a-line.a-star { stroke: var(--blue); } .mchart .a-pt.a-star { fill: var(--blue); }
.mchart .a-line.a-other { stroke: var(--text); }
.mchart .a-lbl { font-size: 13.5px; font-weight: 700; }
.mchart .a-lbl.a-cfg { fill: var(--cfg); } .mchart .a-lbl.a-star { fill: var(--blue); } .mchart .a-lbl.a-other { fill: var(--text); }
.mchart .a-sub { font-size: 12px; font-weight: 500; } .mchart .a-pt.a-other { fill: var(--text); }
.cfg-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.cfg-row .pb-handle { flex: 1; margin: 0; }
.cfg-range { font-size: 13px; color: var(--muted); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.cfg-range b { font-family: var(--mono); font-weight: 600; color: var(--text); }
.cfg-range.a-star { background: var(--blue-soft); } .cfg-range.a-star b { color: var(--blue); }
.cg-head { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mchart .cg-panel { font-weight: 700; fill: var(--text); font-size: 13px; }
.mchart .cg-sub { font-size: 12px; fill: var(--muted); }
.mchart .cg-sep { stroke: var(--line); stroke-width: 1; }
.mchart .v-mean-f { stroke: var(--female); stroke-width: 2.5; }
.mchart .v-mean-m { stroke: var(--male); stroke-width: 2.5; }
.mchart .v-share { font-family: var(--mono); font-size: 12px; font-weight: 600; fill: var(--text); }
.mchart .v-share.off { fill: var(--bad); }
.mchart .vfill-f { fill: rgba(214, 69, 65, 0.22); }
.mchart .vfill-m { fill: rgba(46, 117, 182, 0.22); }
.mchart .vline-f { fill: none; stroke: var(--female); stroke-width: 1.6; stroke-linejoin: round; }
.mchart .vline-m { fill: none; stroke: var(--male); stroke-width: 1.6; stroke-linejoin: round; }
.mchart .v-ref { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 3; opacity: .55; }
.mchart .v-dot-f { fill: var(--female); stroke: var(--surface); stroke-width: 1.5; }
.mchart .v-dot-m { fill: var(--male); stroke: var(--surface); stroke-width: 1.5; }
.mchart .v-trend-f { fill: none; stroke: var(--female); stroke-width: 2; stroke-dasharray: 5 3; }
.mchart .v-trend-m { fill: none; stroke: var(--male); stroke-width: 2; stroke-dasharray: 5 3; }
.mchart .v-share-h { font-size: 11.5px; font-weight: 600; }

/* ---------- Results ---------- */
.panel-labels { display: grid; grid-template-columns: 1fr 1fr 0.35fr; text-align: center; font-weight: 700; margin-bottom: 6px; }
.pl-cfg { color: var(--cfg); } .pl-sf { color: var(--blue); }

.tabs { margin-top: 6px; }
.tab-bar { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 0; padding: 8px 16px; border-radius: 999px;
  background: transparent; color: var(--muted); transition: all .2s;
}
.tab.is-active { background: var(--surface); color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tabs-card { padding: 0; overflow: hidden; }
.tabs-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tabs-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tabs-card .tab-bar { margin: 0; background: var(--surface); }
.tabs-card .tab-panel { padding: 18px 20px 4px; }
.tabs-card .table-wrap { border: 0; padding: 0; background: transparent; }
.tabs-card > .caption { padding: 0 20px 16px; margin: 6px 0 0; max-width: none; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadein .35s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 12px; }
table.results { width: 100%; font-size: 15px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.results th, table.results td { padding: 9px 10px; text-align: center; white-space: nowrap; }
table.results thead th { font-weight: 650; color: var(--muted); font-size: 13.5px; }
table.results thead tr:last-child th { border-bottom: 1.5px solid var(--text); }
table.results td.l, table.results th.l { text-align: left; }
table.results .target { background: var(--blue-soft); }
table.results tr.ours td { font-weight: 700; color: var(--blue); }
table.results tr.ours td.target { color: var(--blue-strong); }
table.results tr.group-start td { border-top: 1px solid var(--line); }
table.results tr:hover td { background: var(--surface-2); }
table.results tr:hover td.target { background: var(--blue-line); }
table.results .sd { color: var(--muted); font-size: 0.8em; font-weight: 400; }

.qual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .qual-grid { grid-template-columns: 1fr; } }
.qual-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.qual-title { font-weight: 700; text-align: center; margin-bottom: 8px; }
.qual { display: grid; grid-template-columns: 64px repeat(5, 1fr); gap: 6px; align-items: center; }
.qual .lbl { font-weight: 700; font-size: 14px; text-align: right; padding-right: 4px; color: var(--cfg); }
.qual .lbl.ours { color: var(--blue); }
.qual .w { text-align: center; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.qual img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 3px solid; border-radius: 6px; transition: transform .25s var(--ease); }
.qual img:hover { transform: scale(1.08); position: relative; z-index: 2; }
.qual img.f { border-color: var(--female); }
.qual img.m { border-color: var(--male); }
@media (max-width: 520px) { .qual { grid-template-columns: 46px repeat(5, 1fr); gap: 3px; } .qual .lbl { font-size: 11.5px; } }

/* How-to-read caption under the Analysis figure */
.howto-cap { color: var(--muted); font-size: 14.5px; margin-top: 14px; line-height: 1.6; }
.howto-cap .cap-note { opacity: .75; }
.howto-cap .hl-amp { background: #f2dfb8; color: #5c4a1e; padding: 0 4px; border-radius: 3px; }
.howto-cap .hl-mit { background: #e6e6e6; color: #444; padding: 0 4px; border-radius: 3px; }

/* Context box above the Analysis figure */
.context-box { margin: 0 0 20px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--r); }
.context-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.context-box p { margin: 0; font-size: 15.5px; color: var(--text); }
.context-box a { color: var(--blue); }

/* Results summary scatter */
.rs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
@media (max-width: 960px) { .rs-row { grid-template-columns: 1fr; } }
.rs-card { margin: 0; padding: 16px 18px 12px; min-width: 0; display: flex; flex-direction: column; }
.rs-card .rs-chart { margin-top: 10px; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.fc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fc-legend i { width: 14px; height: 3px; border-radius: 2px; }
.rs-chart .fc-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; transition: stroke-width .15s; }
.rs-chart .fc-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; pointer-events: stroke; }
.rs-chart svg.is-focus .fc-g { opacity: .2; transition: opacity .15s; }
.rs-chart svg.is-focus .fc-g.is-on { opacity: 1; }
.rs-chart svg .fc-g.is-on .fc-line { stroke-width: 3.4; }
#fc-chart { position: relative; }
.fc-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; line-height: 1.4; color: var(--text); box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); white-space: nowrap; }
.rs-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-title { font-weight: 700; font-size: 16px; }
.rs-chart { margin-top: 8px; }
.rs-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.rs-chart text { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.rs-chart .ax { stroke: var(--cfg); stroke-width: 1.1; }
.rs-chart .diag { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .55; }
.rs-chart .grid-h { stroke: var(--grid); stroke-dasharray: 3 4; }
.rs-chart .pt-cfg { fill: var(--cfg); fill-opacity: .75; }
.rs-chart .pt-sf { fill: var(--blue); fill-opacity: .8; }
.rs-chart circle { transition: r .15s; }
.rs-chart circle:hover { r: 7; }
.rs-chart .p-title { font-size: 13.5px; font-weight: 700; }
.rs-chart .p-title.cfg { fill: var(--cfg); }
.rs-chart .p-title.sf { fill: var(--blue); }
.rs-chart .p-stat { font-family: var(--mono); font-size: 11px; fill: var(--text); }

/* Result messages under the table */
.wins { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.tab-panel > .wins { margin: 0 0 14px; }
.wins-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .wins, .wins-3 { grid-template-columns: 1fr; } }
.win { margin: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r); }
.win b { display: block; font-size: 17px; letter-spacing: -0.01em; color: var(--text); margin-bottom: 4px; }
.win span { display: block; font-size: 15px; color: var(--muted); }
div.win { display: flex; flex-direction: column; }
.wins-stack { grid-template-columns: 1fr; }
.wins-stack div.win { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr); column-gap: 28px; align-items: center; }
.wins-stack div.win > .win-text { grid-column: 1; }
.win-text b { display: block; font-size: 17px; letter-spacing: -0.01em; color: var(--text); margin-bottom: 4px; }
.win-text span { display: block; font-size: 15px; color: var(--muted); }
.wins-stack div.win > .win-stats { grid-column: 2; margin-top: 0; }
.win-stats small { grid-column: 1 / -1; margin-top: 0; }
.wins-stack .win-stats { display: block; }
.ws-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface-2); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.ws-table th, .ws-table td { padding: 7px 12px; text-align: left; white-space: nowrap; }
.ws-table thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
.ws-table tbody th { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: normal; width: 30%; line-height: 1.25; }
.ws-table td { font-size: clamp(17px, 1.6vw, 20px); font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.ws-table td i { font-style: normal; }
.ws-table td .u { display: inline; font-size: 0.62em; font-weight: 600; color: var(--muted); }
.ws-table td .arrow { color: var(--muted); font-weight: 500; }
.wins-stack .win-stats small { margin-top: 8px; }
.wins-stack .win-stats { min-width: 0; max-width: 100%; overflow-x: auto; }
@media (max-width: 560px) {
  .ws-table th, .ws-table td { padding: 6px 8px; }
  .ws-table td { font-size: 15px; white-space: normal; }
  .ws-table tbody th { width: 28%; }
}
.ws-row { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--text); margin: 4px 0 -4px; }
.ws strong small.u { display: inline; font-size: 0.6em; font-weight: 600; color: var(--muted); margin: 0; }
@media (max-width: 760px) { .wins-stack div.win { display: flex; } .wins-stack div.win > .win-stats { margin-top: 14px; } }
.win-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.win-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ws { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; }
.ws em { display: block; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ws strong { display: block; font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.ws strong i { font-style: normal; }
.ws .arrow { color: var(--muted); font-weight: 500; margin: 0 2px; }
.win small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }


/* ---------- Analysis ---------- */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; text-align: center; }
.stat-model { font-weight: 700; color: var(--muted); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.stat-pair { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.stat-pair .vs { font-size: .5em; color: var(--muted); font-weight: 600; margin: 0 10px; }
.stat-desc { color: var(--muted); font-size: 14px; }

/* ---------- BibTeX / footer ---------- */

.bib { position: relative; }
.bib pre {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; padding-right: 110px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.copy-btn:hover { border-color: var(--blue-line); }
.copy-btn.is-done { color: var(--blue); border-color: var(--blue-line); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 18px; }
.footer-inner a { color: var(--muted); }

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tab-panel.is-active { animation: none; }
}
