/* ───────────────────────── Mean — specimen site ───────────────────────── */
@font-face { font-family: "Mean"; src: url("fonts/Mean-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Mono"; src: url("fonts/MeanMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Equal"; src: url("fonts/MeanEqual-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Sans"; src: url("fonts/MeanSans-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Serif"; src: url("fonts/MeanSerif-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Display"; src: url("fonts/MeanDisplay-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Script"; src: url("fonts/MeanScript-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Path"; src: url("fonts/MeanPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Equal Path"; src: url("fonts/MeanEqualPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Sans Path"; src: url("fonts/MeanSansPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Serif Path"; src: url("fonts/MeanSerifPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Display Path"; src: url("fonts/MeanDisplayPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Script Path"; src: url("fonts/MeanScriptPath-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mean Mono Path"; src: url("fonts/MeanMonoPath-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --paper: #f3f0e8;
  --paper-2: #ebe6da;
  --ink: #151410;
  --ink-2: #3b3830;
  --muted: #7b7566;
  --rule: #d6cfbf;
  --accent: #e2431f;
  --accent-soft: #f2b8a4;
  --night: #11110e;
  --night-2: #1b1a16;
  --night-rule: #2e2c26;
  --night-ink: #ece7da;
  --night-muted: #8e887a;

  --sans: "Mean", ui-sans-serif, system-ui, sans-serif;
  --mono: "Mean Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
i, em { font-style: normal; }
p i, h4 i { font-family: "Mean Serif", Georgia, serif; font-size: 1.08em; }
::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; }
img, canvas, svg { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
button { font: inherit; color: inherit; }

/* ───────── masthead ───────── */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.masthead.on-dark { background: color-mix(in srgb, var(--night) 82%, transparent); color: var(--night-ink); border-bottom-color: var(--night-rule); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.mark { font-size: 24px; letter-spacing: -0.02em; text-decoration: none; }
.mark sup { font-family: var(--mono); font-size: 9px; vertical-align: top; position: relative; top: 4px; margin-left: 2px; }
.masthead nav { display: flex; gap: clamp(12px, 2.4vw, 32px); align-items: center; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.masthead nav a { text-decoration: none; opacity: .75; transition: opacity .2s; }
.masthead nav a:hover { opacity: 1; }
.masthead .pill { border: 1px solid currentColor; border-radius: 99px; padding: 6px 14px; opacity: 1; }
.masthead .pill:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
@media (max-width: 720px) { .masthead nav a:not(.pill) { display: none; } }
section[id], main[id] { scroll-margin-top: 112px; }

/* page-wide font switcher */
.switcher-row { border-top: 1px solid var(--rule); transition: border-color .3s; }
.masthead.on-dark .switcher-row { border-top-color: var(--night-rule); }
.switcher { display: flex; align-items: center; gap: 20px; height: 52px; }
.switcher-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); white-space: nowrap; flex: none; }
.masthead.on-dark .switcher-label { color: var(--night-muted); }
.switcher-opts { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.switcher-opts::-webkit-scrollbar { display: none; }
.switcher-opts button {
  flex: none; border: 0; background: transparent; cursor: pointer; padding: 7px 14px 8px; border-radius: 99px;
  font-size: 18px; line-height: 1.1; letter-spacing: -0.01em; color: inherit; opacity: .55;
  transition: opacity .2s, background .2s, color .2s;
}
.switcher-opts button:hover { opacity: 1; }
.switcher-opts button[aria-checked="true"] { opacity: 1; background: var(--ink); color: var(--paper); }
.masthead.on-dark .switcher-opts button[aria-checked="true"] { background: var(--night-ink); color: var(--night); }
.switcher-opts button .n { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; margin-left: 6px; opacity: .6; vertical-align: 2px; }
@media (max-width: 720px) {
  .switcher { gap: 10px; height: 48px; }
  .switcher-label { display: none; }
  .switcher-opts button { font-size: 16px; padding: 6px 11px 7px; }
  .switcher-opts button .n { display: none; }
}

/* ───────── shared ───────── */
.eyebrow { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 10px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.eyebrow.light { color: color-mix(in srgb, var(--paper) 70%, transparent); }

.section-head { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 40px; align-items: baseline; padding: 112px 0 48px; border-top: 1px solid var(--rule); }
.section-head .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.section-head h2 { font-size: clamp(36px, 5vw, 72px); line-height: .98; letter-spacing: -0.03em; font-weight: 400; margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 52ch; font-size: 19px; }
.section-head.dark { border-top-color: var(--night-rule); }
.section-head.dark p { color: var(--night-muted); }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; padding-top: 80px; gap: 16px; }
}

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(127, 120, 100, .12); }
.seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 8px; padding: 8px 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em; white-space: nowrap; opacity: .7;
  transition: background .2s, opacity .2s, color .2s;
}
.seg button:hover { opacity: 1; }
.seg button.on { background: var(--paper); color: var(--ink); opacity: 1; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg.small button { padding: 6px 10px; font-size: 11px; }

/* ───────── hero ───────── */
.hero { padding-top: 56px; padding-bottom: 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; gap: 48px; margin-top: 24px; }
.hero-title {
  font-weight: 400; margin: 0; line-height: .8;
  font-size: clamp(88px, 14.5vw, 232px); letter-spacing: -0.05em;
  padding-bottom: .04em; margin-left: -0.04em;
}
.hero-variant { margin: 28px 0 8px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--ink); padding-top: 14px; max-width: 34ch; }
.hv-name { font-size: 26px; letter-spacing: -0.015em; }
.hv-desc { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); line-height: 1.6; }
.hero-figure { margin: 0; position: relative; width: 100%; max-width: 540px; justify-self: end; }
#hero-canvas { width: 100%; aspect-ratio: 1 / 1; }
.hero-figure figcaption { font-family: var(--mono); font-size: 12px; margin-top: 8px; display: flex; gap: 6px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
#hero-count { color: var(--accent); min-width: 4ch; text-align: right; }
.hero-lede { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; margin-top: 40px; align-items: start; }
.lede { font-size: clamp(24px, 2.6vw, 38px); line-height: 1.18; letter-spacing: -0.015em; margin: 0; max-width: 22ch; }
.lede em { font-style: normal; color: var(--accent); }
.aside { margin: 0; color: var(--ink-2); max-width: 36ch; padding-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 72px 0 0; border-top: 1px solid var(--ink); }
.stats div { padding: 16px 16px 0 0; border-right: 1px solid var(--rule); padding-left: 16px; }
.stats div:first-child { padding-left: 0; }
.stats div:last-child { border-right: 0; }
.stats dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stats dd { margin: 8px 0 0; font-size: clamp(28px, 3.6vw, 52px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .hero-grid, .hero-lede { grid-template-columns: 1fr; }
  .hero-figure { max-width: 520px; width: 100%; justify-self: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(3) { padding-left: 0; }
}

/* ───────── votes ───────── */
.share-bar { display: flex; height: 96px; border-radius: 4px; overflow: hidden; gap: 2px; }
.share-bar .seg-b { position: relative; background: var(--ink); color: var(--paper); min-width: 2px; display: flex; align-items: flex-end; padding: 10px; font-size: 13px; overflow: hidden; white-space: nowrap; transition: filter .2s; cursor: default; }
.share-bar .seg-b:hover { filter: brightness(1.6); }
.share-bar .seg-b.rest { background: repeating-linear-gradient(90deg, var(--ink-2) 0 1px, var(--paper-2) 1px 3px); color: var(--ink); }
.share-bar .seg-b.rest span { background: var(--paper); padding: 2px 6px; border-radius: 3px; }
.share-legend { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 32px; }
.share-legend li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.share-legend .rk { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.share-legend .pc { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.share-legend .nm { font-size: 17px; }

/* ───────── explorer (dark) ───────── */
.explorer { background: var(--night); color: var(--night-ink); margin-top: 120px; padding-bottom: 120px; }
.explorer .section-head { border-top: 0; }
.explorer .seg { background: rgba(255, 255, 255, .06); }
.explorer .seg button.on { background: var(--night-ink); color: var(--night); }
.glyph-picker { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 32px; border-top: 1px solid var(--night-rule); border-bottom: 1px solid var(--night-rule); padding: 10px 0; }
.glyph-picker button {
  width: 36px; height: 40px; border: 0; background: transparent; cursor: pointer; border-radius: 6px;
  font-size: 20px; color: var(--night-muted); transition: color .15s, background .15s;
}
.glyph-picker button:hover { color: var(--night-ink); background: var(--night-2); }
.glyph-picker button.on { color: var(--night); background: var(--accent); }

.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.stage { position: relative; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 45%, #1d1c18 0%, var(--night) 70%); border: 1px solid var(--night-rule); border-radius: 4px; overflow: hidden; }
#stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-guides { position: absolute; inset: 0; pointer-events: none; }
.stage-guides .g { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(236, 231, 218, .12); }
.stage-guides .g span { position: absolute; right: 12px; top: -18px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--night-muted); }
.stage-guides .g.base { border-top-style: solid; border-top-color: rgba(236, 231, 218, .22); }
.stage-hover { position: absolute; left: 16px; bottom: 14px; font-family: var(--mono); font-size: 12px; color: var(--night-ink); opacity: 0; transition: opacity .2s; }
.stage-hover.show { opacity: 1; }
.stage-hover b { color: var(--accent); font-weight: 400; }

.stage-side { display: flex; flex-direction: column; gap: 28px; }
.control .label { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--night-muted); margin-bottom: 10px; }
.control .hint { font-size: 14px; color: var(--night-muted); margin: 10px 0 0; line-height: 1.45; }
.readout { margin-top: auto; border-top: 1px solid var(--night-rule); padding-top: 20px; }
.big-char { font-size: 120px; line-height: 1; color: var(--accent); margin-bottom: 12px; }
.readout dl { margin: 0; }
.readout dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--night-rule); font-size: 14px; }
.readout dt { color: var(--night-muted); }
.readout dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .stage-grid { grid-template-columns: 1fr; }
  .readout { margin-top: 0; }
  .big-char { display: none; }
}

.gallery-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin: 72px 0 20px; }
.gallery-head h3 { font-weight: 400; font-size: 28px; letter-spacing: -0.02em; margin: 0; }
.gal-char { color: var(--accent); }
.gallery-scroll { position: relative; max-height: min(78vh, 760px); overflow-y: auto; border: 1px solid var(--night-rule); scrollbar-width: thin; scrollbar-color: #3a382f transparent; overscroll-behavior: contain; }
.gallery-scroll::-webkit-scrollbar { width: 8px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: #3a382f; border-radius: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 1px; background: var(--night-rule); }
.tile { position: relative; aspect-ratio: 1 / 1.15; background: var(--night); cursor: crosshair; }
.tile svg { width: 100%; height: 100%; }
.tile path { fill: var(--night-ink); }
.tile:hover { background: var(--night-2); }
.tile:hover path { fill: var(--accent); opacity: 1 !important; }
.tile.mean { background: var(--accent); }
.tile.mean path { fill: var(--night); opacity: 1 !important; }
.tile .rk { position: absolute; left: 5px; top: 4px; font-family: var(--mono); font-size: 8px; color: var(--night-muted); }
.tile.mean .rk { color: var(--night); }
.gallery-note { font-size: 13px; color: var(--night-muted); margin: 16px 0 0; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 14px));
  background: var(--paper); color: var(--ink); border-radius: 8px; padding: 10px 12px; min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .12s;
}
.tooltip.show { opacity: 1; }
.tooltip .t-name { font-size: 16px; line-height: 1.2; }
.tooltip .t-meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ───────── method ───────── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.steps figure { margin: 0 0 20px; aspect-ratio: 1 / 1; background: var(--paper-2); border-radius: 4px; overflow: hidden; display: grid; place-items: center; }
.steps figure img { width: 100%; height: 100%; object-fit: contain; }
.steps h4 { font-weight: 400; font-size: 26px; letter-spacing: -0.02em; margin: 0 0 10px; }
.steps h4 span { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-right: 6px; vertical-align: middle; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ───────── family ───────── */
.family { margin-top: 120px; }
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.fam-card { background: var(--paper); padding: 24px 24px 20px; display: flex; flex-direction: column; min-height: 360px; transition: background .25s; }
.fam-card:hover { background: #fbf9f4; }
.fam-card .fc-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fam-card .fc-aa { font-size: 150px; line-height: 1; letter-spacing: -0.03em; margin: auto 0 8px; padding-top: 24px; }
.fam-card .fc-name { font-size: 24px; letter-spacing: -0.01em; }
.fam-card .fc-line { font-size: 22px; line-height: 1.25; color: var(--ink-2); margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 12px; overflow-wrap: anywhere; }
.fam-card.primary { background: var(--ink); color: var(--paper); grid-column: span 2; }
.fam-card.primary .fc-aa { font-size: 230px; }
@media (max-width: 1100px) { .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .family-grid { grid-template-columns: 1fr; } .fam-card.primary { grid-column: auto; } .fam-card.primary .fc-aa { font-size: 150px; } }
.fam-card.primary .fc-top { color: var(--accent-soft); }
.fam-card.primary .fc-line { color: color-mix(in srgb, var(--paper) 75%, transparent); border-top-color: #3a372f; }

/* ───────── specimen ───────── */
.specimen { padding-bottom: 80px; }
.tester { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.tester-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.slider { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.slider output { min-width: 3ch; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 180px; height: 2px; background: var(--ink); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--accent); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 3px solid var(--paper); }
.tester-text { font-size: 88px; line-height: 1.05; letter-spacing: -0.02em; padding: 40px 0 48px; outline: none; min-height: 1.5em; overflow-wrap: anywhere; caret-color: var(--accent); }

.mini-head { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 64px 0 16px; }
.charset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.charset-grid div { aspect-ratio: 1; display: grid; place-items: center; font-size: 40px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: pointer; transition: background .15s, color .15s; }
.charset-grid div:hover { background: var(--ink); color: var(--paper); }

.waterfall { margin-top: 72px; }
.waterfall .row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; border-top: 1px solid var(--rule); padding: 10px 0; }
.waterfall .row span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.waterfall .row div { white-space: nowrap; overflow: hidden; text-overflow: clip; letter-spacing: -0.01em; }

.columns { columns: 2 320px; column-gap: 56px; margin-top: 80px; font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.columns p { margin: 0 0 1em; }
.dropcap::first-letter { float: left; font-size: 5.6em; line-height: .78; padding: .06em .08em 0 0; color: var(--accent); }

/* ───────── download ───────── */
.download { background: var(--accent); color: var(--paper); padding: 120px 0; }
.download-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.download-title { font-weight: 400; font-size: clamp(64px, 10vw, 160px); line-height: .9; letter-spacing: -0.04em; margin: 16px 0 24px; }
.download-copy { max-width: 40ch; font-size: 20px; margin: 0; }
.download-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.4); }
.download-list li a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.4); text-decoration: none; transition: padding .2s; }
.download-list li a:hover { padding-left: 10px; }
.download-list .dl-name { font-size: 28px; letter-spacing: -0.02em; }
.download-list .dl-meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.download-list .dl-arrow { font-family: var(--mono); }
@media (max-width: 900px) { .download-grid { grid-template-columns: 1fr; } }

.footer { padding-top: 48px; padding-bottom: 64px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; font-size: 15px; color: var(--ink-2); }
.footer p { margin: 0; max-width: 60ch; }
@media (max-width: 900px) { .footer { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (max-width: 720px) {
  .share-bar { height: 64px; }
  .share-bar .seg-b:not(.rest) { font-size: 0; }
  .share-bar .seg-b.rest { font-size: 11px; padding: 6px; }
}
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ───────── method switch (field / path) ───────── */
.method-switch { display: inline-flex; flex: none; padding: 3px; border-radius: 99px; border: 1px solid var(--rule); gap: 2px; }
.method-switch[hidden] { display: none; }
.masthead.on-dark .method-switch { border-color: var(--night-rule); }
.method-switch button { border: 0; background: transparent; cursor: pointer; border-radius: 99px; padding: 5px 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: inherit; opacity: .6; transition: background .2s, color .2s, opacity .2s; }
.method-switch button:hover { opacity: 1; }
.method-switch button[aria-checked="true"] { background: var(--accent); color: var(--paper); opacity: 1; }
@media (max-width: 720px) { .method-switch button { padding: 5px 9px; font-size: 10px; } }

/* ───────── morph ───────── */
.stage-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.morph-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-items: center; }
.morph-bar[hidden] { display: none; }
.morph-play { border: 1px solid var(--night-rule); background: transparent; color: var(--night-ink); border-radius: 99px; padding: 6px 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.morph-play:hover { border-color: var(--night-ink); }
.morph-bar input[type=range] { width: 100%; background: var(--night-rule); }
.morph-bar input[type=range]::-webkit-slider-thumb { border-color: var(--night); }
.morph-label { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--night-muted); }
.morph-label b { color: var(--night-ink); font-weight: 400; }
.morph-label b.acc { color: var(--accent); }
.morph-label span { font-variant-numeric: tabular-nums; }
.tile.out { opacity: .22; }
.tile.out:hover { opacity: 1; }
.tile.morphable::after { content: ""; position: absolute; right: 6px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tile.morphable { cursor: pointer; }
.tile.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.gal-sub { margin: 6px 0 0; font-family: var(--mono); font-size: 11px; color: var(--night-muted); letter-spacing: .02em; }
.gal-sub:empty { display: none; }

/* structure vote in the readout */
.ro-structure { margin-top: 20px; }
.ro-structure[hidden] { display: none; }
.ro-structure .label { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--night-muted); margin-bottom: 8px; }
.ro-structure ol { list-style: none; margin: 0; padding: 0; }
.ro-structure li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 44px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; color: var(--night-muted); }
.ro-structure li.win { color: var(--night-ink); }
.ro-structure .sb { height: 4px; background: var(--night-rule); border-radius: 2px; overflow: hidden; }
.ro-structure .sb i { display: block; height: 100%; background: var(--night-muted); }
.ro-structure li.win .sb i { background: var(--accent); }
.ro-structure .sp { text-align: right; font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ───────── path method section ───────── */
.pathm { margin-top: 40px; }
.steps-text figure { display: none; }
.steps-text li { border-top: 1px solid var(--ink); padding-top: 18px; }
.ballot-wrap { margin-top: 72px; }
.ballot-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.ballot-head .mini-head { margin: 0; }
.ballot-picker { display: flex; gap: 4px; }
.ballot-picker button { width: 40px; height: 40px; border: 1px solid var(--rule); background: transparent; border-radius: 8px; font-size: 20px; cursor: pointer; color: var(--ink); transition: background .15s, color .15s; }
.ballot-picker button:hover { border-color: var(--ink); }
.ballot-picker button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ballot { border-top: 1px solid var(--ink); }
.bal-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 32px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.bal-ex { grid-row: 1 / span 2; display: flex; gap: 4px; }
.bal-ex svg { width: 80px; height: 92px; background: var(--paper-2); border-radius: 4px; }
.bal-ex path { fill: var(--ink-2); }
.bal-row.win .bal-ex svg { background: var(--ink); }
.bal-row.win .bal-ex path { fill: var(--paper); }
.bal-meta { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 64px; gap: 20px; align-items: center; }
.bal-desc { font-size: 22px; letter-spacing: -0.01em; }
.bal-bar { height: 10px; background: var(--paper-2); border-radius: 5px; overflow: hidden; }
.bal-bar i { display: block; height: 100%; background: var(--ink-2); border-radius: 5px; }
.bal-row.win .bal-bar i { background: var(--accent); }
.bal-pc { font-family: var(--mono); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.bal-fonts { font-size: 14px; color: var(--muted); }
.bal-fonts b { color: var(--accent); font-weight: 400; }
@media (max-width: 760px) {
  .bal-row { grid-template-columns: 1fr; }
  .bal-ex { grid-row: auto; }
  .bal-ex svg { width: 64px; height: 74px; }
  .bal-meta { grid-template-columns: 1fr 48px; }
  .bal-desc { grid-column: 1 / -1; }
}
.compare-wrap { margin-top: 72px; }
.compare { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--ink); }
.compare > div { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.cmp-h { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-n { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.cmp-n span { color: var(--muted); font-size: 10px; }
.cmp-c { font-size: clamp(40px, 6vw, 88px); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; padding-left: 8px !important; }
@media (max-width: 640px) { .compare { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); } }

.download-list li.dl-group { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; padding: 22px 0 8px; border-bottom: 1px solid rgba(255,255,255,.4); opacity: .85; }
.download-list li.dl-group:first-child { padding-top: 0; }
