:root {
  color-scheme: light;
  --paper: #f3efe4;
  --paper-raised: #fbf8f2;
  --sheet: #f7f3ea;
  --ink: #1c1914;
  --ink-soft: #4a453c;
  --rule: #d2c9b8;
  --accent: #c43522;
  --stage: #e3dccb;
  --row-hover: #efe8da;
  --row-focus: #f6f0e4;
  --s1: #c43522;
  --s2: #1d4e89;
  --s3: #2c6840;
  --s4: #8a5a12;
  --s5: #6a3d5c;
  --sheet-mix: 24%;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --check: 46px;
  --label: 11px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141311;
  --paper-raised: #1e1c18;
  --sheet: #564e44;
  --sheet-mix: 42%;
  --ink: #f3efe6;
  --ink-soft: #c9c0b2;
  --rule: #3a352c;
  --accent: #ff7a64;
  --stage: #1a1714;
  --row-hover: #2a261f;
  --row-focus: #332c22;
  --s1: #ff8d78;
  --s2: #9ec2ee;
  --s3: #b7d7a0;
  --s4: #f2c98a;
  --s5: #e7b4cc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141311;
    --paper-raised: #1e1c18;
    --sheet: #564e44;
    --sheet-mix: 42%;
    --ink: #f3efe6;
    --ink-soft: #c9c0b2;
    --rule: #3a352c;
    --accent: #ff7a64;
    --stage: #1a1714;
    --row-hover: #2a261f;
    --row-focus: #332c22;
    --s1: #ff8d78;
    --s2: #9ec2ee;
    --s3: #b7d7a0;
    --s4: #f2c98a;
    --s5: #e7b4cc;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  pointer-events: none;
}
::selection { background: #f0c2b8; color: #1c1914; }
:root[data-theme="dark"] ::selection { background: #6a332c; color: #f3efe6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) ::selection { background: #6a332c; color: #f3efe6; }
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
}
@media (max-width: 420px) {
  .wrap { width: min(1120px, calc(100% - 24px)); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--ink); }
.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 16px 0 14px;
}
@media (max-width: 640px) {
  .brand { flex: 1 1 auto; }
  .theme-toggle { order: 2; }
  nav { order: 3; flex: 1 0 100%; gap: 16px; }
}
.brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand svg { width: 28px; height: 28px; flex: none; }
nav { display: flex; flex-wrap: wrap; gap: 18px; }
nav a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--ink);
  min-height: 36px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.theme-toggle::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M9.6 1.4a6.6 6.6 0 1 0 5 10.8A6.2 6.2 0 0 1 9.6 1.4z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M9.6 1.4a6.6 6.6 0 1 0 5 10.8A6.2 6.2 0 0 1 9.6 1.4z'/></svg>") center / contain no-repeat;
}
:root[data-theme="dark"] .theme-toggle::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='3.1' fill='black'/><path fill='black' d='M8 1.2h1.1v2.2H8zM8 12.6h1.1v2.2H8zM1.2 7.4h2.2V8.6H1.2zM12.6 7.4h2.2V8.6h-2.2zM3.1 3.2l.8-.8 1.6 1.6-.8.8zM10.5 11.6l.8-.8 1.6 1.6-.8.8zM3.9 12.4l-.8-.8 1.6-1.6.8.8zM11.3 4l-.8-.8 1.6-1.6.8.8z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='3.1' fill='black'/><path fill='black' d='M8 1.2h1.1v2.2H8zM8 12.6h1.1v2.2H8zM1.2 7.4h2.2V8.6H1.2zM12.6 7.4h2.2V8.6h-2.2zM3.1 3.2l.8-.8 1.6 1.6-.8.8zM10.5 11.6l.8-.8 1.6 1.6-.8.8zM3.9 12.4l-.8-.8 1.6-1.6.8.8zM11.3 4l-.8-.8 1.6-1.6.8.8z'/></svg>");
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }

.intro {
  display: grid;
  gap: 28px;
  padding: 28px 0 34px;
  align-items: start;
}
@media (min-width: 860px) {
  .intro { grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr); column-gap: 48px; }
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sq { width: 8px; height: 8px; background: var(--accent); flex: none; }
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 7.4vw, 5.4rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.lede {
  margin: 16px 0 0;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.45;
}
.facts {
  border: 1px solid var(--ink);
  background: var(--paper-raised);
  padding: 14px 16px 6px;
}
.facts-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fact-list { display: grid; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  width: 100%;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  padding: 11px 2px;
  text-align: left;
}
.fact:hover { color: var(--accent); }
.fact.is-on { box-shadow: inset 2px 0 0 var(--accent); }
.fact-k { font-family: var(--serif); font-size: 1.12rem; letter-spacing: -0.02em; }
.fact-v {
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.toolbar {
  background: var(--paper-raised);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0 12px;
}
@media (min-width: 960px) {
  .toolbar { position: sticky; top: 4px; z-index: 8; }
  #compare, #sizes, #sources { scroll-margin-top: 176px; }
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: start;
}
.search {
  position: relative;
  display: grid;
  gap: 6px;
  flex: 1 1 100%;
  min-width: 0;
  align-content: start;
}
@media (min-width: 760px) { .search { flex-basis: 280px; } }
@media (max-width: 759px) {
  .search > .ctrl-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.search svg { width: 18px; height: 18px; flex: none; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 0;
}
.search input:focus-visible { outline: none; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search kbd, #clear-search { font-family: var(--mono); font-size: 12px; }
#clear-search {
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  color: var(--ink);
}
.search:has(#clear-search:not([hidden])) kbd { display: none; }
kbd {
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  padding: 1px 5px 0;
  color: var(--ink-soft);
  background: var(--paper-raised);
}
@media (max-width: 700px) { .search kbd { display: none; } }
.control { display: grid; gap: 6px; justify-items: start; align-content: start; }
.ctrl-label,
.control > span,
.control > label {
  font-family: var(--mono);
  font-size: var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1;
}
.seg { display: flex; flex-wrap: wrap; }
.seg button {
  background: var(--paper);
  border: 1px solid var(--rule);
  min-height: 42px;
  padding: 0 12px;
  margin: 0 0 0 -1px;
}
.seg button:first-child { margin-left: 0; }
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  position: relative;
  z-index: 1;
}
@media (max-width: 420px) {
  .seg button { padding: 0 10px; }
}
#dpi-custom, select {
  background: var(--paper);
  border: 1px solid var(--rule);
  min-height: 42px;
  padding: 0 10px;
}
#dpi-custom { width: 6.2rem; }
#dpi-custom[aria-invalid="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.field-error {
  margin: 0;
  max-width: 16rem;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.35;
  color: var(--accent);
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  background: var(--paper);
  border: 1px solid var(--rule);
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.95rem;
}
.chip:hover { border-color: var(--ink); }
.chip .n { font-family: var(--mono); font-size: 11px; margin-left: 6px; color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: inherit; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 36px 0 12px;
}
h2 {
  display: flex;
  align-items: baseline;
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}
.idx {
  margin-right: 0.55em;
  font-family: var(--mono);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.compare-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.text-btn {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  min-height: 40px;
  padding: 0 12px;
}
.text-btn:hover { border-color: var(--ink); }
.scale-note { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.98rem; max-width: 46rem; }
.compare-grid { display: grid; gap: 18px; }
@media (min-width: 980px) {
  .compare-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}
.stage {
  position: relative;
  height: 300px;
  background: var(--stage);
  border: 1px solid var(--rule);
}
@media (min-width: 700px) { .stage { height: 360px; } }
@media (min-width: 1000px) { .stage { height: 420px; } }
.stage::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 14px no-repeat;
}
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
#overlay .sheet-label {
  font-family: var(--mono);
  font-size: 12px;
  fill: var(--ink);
  pointer-events: none;
}
#overlay .sheet { stroke: none; cursor: pointer; }
#overlay .sheet-0 { fill: var(--s1); fill-opacity: 0.22; }
#overlay .sheet-1 { fill: var(--s2); fill-opacity: 0.22; }
#overlay .sheet-2 { fill: var(--s3); fill-opacity: 0.22; }
#overlay .sheet-3 { fill: var(--s4); fill-opacity: 0.22; }
#overlay .sheet-4 { fill: var(--s5); fill-opacity: 0.22; }
#overlay .sheet-0 { fill: color-mix(in srgb, var(--s1) var(--sheet-mix), var(--sheet)); fill-opacity: 1; }
#overlay .sheet-1 { fill: color-mix(in srgb, var(--s2) var(--sheet-mix), var(--sheet)); fill-opacity: 1; }
#overlay .sheet-2 { fill: color-mix(in srgb, var(--s3) var(--sheet-mix), var(--sheet)); fill-opacity: 1; }
#overlay .sheet-3 { fill: color-mix(in srgb, var(--s4) var(--sheet-mix), var(--sheet)); fill-opacity: 1; }
#overlay .sheet-4 { fill: color-mix(in srgb, var(--s5) var(--sheet-mix), var(--sheet)); fill-opacity: 1; }
#overlay .sheet.is-focus { fill-opacity: 1; }
#overlay .sheet-edge { fill: none; stroke-width: 2.25; pointer-events: none; }
#overlay .sheet-edge.sheet-0 { stroke: var(--s1); }
#overlay .sheet-edge.sheet-1 { stroke: var(--s2); }
#overlay .sheet-edge.sheet-2 { stroke: var(--s3); }
#overlay .sheet-edge.sheet-3 { stroke: var(--s4); }
#overlay .sheet-edge.sheet-4 { stroke: var(--s5); }
#overlay .sheet-edge.is-focus { stroke-width: 3.25; }
#overlay .ruler { stroke: var(--ink-soft); fill: none; stroke-width: 1; }
#overlay .ruler-label {
  fill: var(--ink-soft);
  stroke: none;
  font-family: var(--mono);
  font-size: 11px;
  pointer-events: none;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.legend li { display: flex; align-items: stretch; border: 1px solid var(--rule); background: var(--paper-raised); max-width: 100%; }
.legend-name {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  text-align: left;
  min-width: 0;
}
.legend-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.legend-dim { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.swatch { width: 10px; height: 10px; flex: none; }
.swatch[data-swatch="0"] { background: var(--s1); }
.swatch[data-swatch="1"] { background: var(--s2); }
.swatch[data-swatch="2"] { background: var(--s3); }
.swatch[data-swatch="3"] { background: var(--s4); }
.swatch[data-swatch="4"] { background: var(--s5); }
.legend .remove {
  width: 36px;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
}
.legend .remove:hover { background: var(--ink); color: var(--paper); }

.readout {
  border: 1px solid var(--ink);
  background: var(--paper-raised);
  padding: 16px 16px 14px;
  min-width: 0;
}
.readout[data-swatch="0"] { box-shadow: inset 4px 0 0 var(--s1); }
.readout[data-swatch="1"] { box-shadow: inset 4px 0 0 var(--s2); }
.readout[data-swatch="2"] { box-shadow: inset 4px 0 0 var(--s3); }
.readout[data-swatch="3"] { box-shadow: inset 4px 0 0 var(--s4); }
.readout[data-swatch="4"] { box-shadow: inset 4px 0 0 var(--s5); }
.kicker {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.readout-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.std-line {
  margin: 6px 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pixel-figure {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 2px 0 8px;
  text-align: left;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  cursor: copy;
  overflow-wrap: anywhere;
}
.pixel-figure.is-copied, .copy.is-copied, .unit-copy.is-copied { color: var(--accent); }
.px-unit { font-size: 0.62em; letter-spacing: 0; }
.fine { margin: 6px 0 4px; color: var(--ink-soft); font-size: 0.85rem; }
.unit-list, .deltas { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 0; }
.unit-copy, .copy {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: var(--mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  cursor: copy;
}
.unit-copy {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.unit-copy.is-primary, td.is-primary .copy { font-weight: 500; color: var(--ink); }
td:not(.is-primary) .copy { color: var(--ink-soft); }
.pixel-figure:hover, .pixel-figure:focus-visible,
.copy:hover, .copy:focus-visible,
.unit-copy:hover, .unit-copy:focus-visible { color: var(--accent); }
.meta { margin: 4px 0 8px; font-family: var(--mono); font-size: 13px; }
.note { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.98rem; }
.deltas { gap: 8px; margin-top: 4px; }
.deltas li { display: grid; gap: 1px; }
.deltas button {
  background: transparent;
  border: 0;
  padding: 0;
  width: fit-content;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.deltas button:hover { color: var(--accent); }
.delta-bits { color: var(--ink-soft); font-family: var(--mono); font-size: 13px; }
#overlay-toggle { margin-top: 4px; }
#overlay-toggle:disabled { opacity: 0.55; cursor: not-allowed; }

.table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 8px;
}
#result-count { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.sort-label { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.scroll-hint {
  display: none;
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 960px) { .scroll-hint { display: block; } }
.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--ink);
  max-width: 100%;
  min-width: 0;
}
table { width: 100%; border-collapse: collapse; min-width: 860px; }
caption { caption-side: bottom; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
}
thead th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  background: var(--paper);
}
thead th.is-primary { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
td.is-primary { background: color-mix(in srgb, var(--accent) 7%, transparent); }
th.check, td.check {
  position: sticky;
  left: 0;
  width: var(--check);
  min-width: var(--check);
  z-index: 1;
  background: var(--paper);
  padding-left: 0;
  padding-right: 0;
}
th.name, td.name {
  position: sticky;
  left: var(--check);
  z-index: 1;
  background: var(--paper);
  min-width: 148px;
  box-shadow: 1px 0 0 var(--rule);
}
thead th.check, thead th.name { z-index: 2; background: var(--paper); }
tbody th {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}
.name-btn {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}
.name-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
tr.is-focus .name-btn { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.cat-label, .std {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.std { margin-top: 0; margin-bottom: 3px; color: var(--ink); letter-spacing: 0.06em; }
.notes { min-width: 220px; color: var(--ink-soft); font-size: 0.95rem; }
.measure { white-space: nowrap; }
.muted { color: var(--ink-soft); }
.check-hit { display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
tbody tr:hover td.is-primary { background: color-mix(in srgb, var(--accent) 14%, var(--row-hover)); }
tbody tr.is-focus td.is-primary { background: color-mix(in srgb, var(--accent) 12%, var(--row-focus)); }
tbody tr:hover td.check, tbody tr:hover td.name, tbody tr:hover th.name { background: var(--row-hover); }
tbody tr.is-focus td.check, tbody tr.is-focus td.name, tbody tr.is-focus th.name { background: var(--row-focus); }
tbody tr:hover { background: var(--row-hover); }
tbody tr.is-focus { background: var(--row-focus); }
tr[data-swatch="0"] td.check { box-shadow: inset 3px 0 0 var(--s1); }
tr[data-swatch="1"] td.check { box-shadow: inset 3px 0 0 var(--s2); }
tr[data-swatch="2"] td.check { box-shadow: inset 3px 0 0 var(--s3); }
tr[data-swatch="3"] td.check { box-shadow: inset 3px 0 0 var(--s4); }
tr[data-swatch="4"] td.check { box-shadow: inset 3px 0 0 var(--s5); }
.empty { padding: 8px 0 12px; max-width: 28rem; }
.empty-sheet {
  width: 84px;
  height: 118px;
  margin: 8px 0 14px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(var(--accent), var(--accent)) left 7px top 7px / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 7px top 7px / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 7px top 7px / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 7px top 7px / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 7px bottom 7px / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left 7px bottom 7px / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 7px bottom 7px / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 7px bottom 7px / 1px 12px no-repeat,
    var(--paper-raised);
}
.empty h3 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; margin: 0 0 6px; letter-spacing: -0.03em; }
.empty p { margin: 0 0 14px; color: var(--ink-soft); }

.sources { margin-top: 48px; padding-top: 4px; max-width: 68ch; }
.sources h2 { margin-bottom: 14px; }
.sources p, .sources li { color: var(--ink-soft); font-size: 1rem; }
.sources p { margin: 0 0 12px; }
.sources a { color: var(--ink); text-underline-offset: 3px; }
.sources a:hover { text-decoration-color: var(--accent); }
.sources ul { list-style: none; padding: 8px 0 0; margin: 8px 0 0; }
.sources li { border-top: 1px solid var(--rule); padding: 9px 0; }

.site-footer { margin-top: 48px; border-top: 1px solid var(--ink); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 0 28px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.footer-row p { margin: 0; }
.footer-row a { color: var(--ink); text-underline-offset: 3px; }

.manual-copy {
  position: fixed;
  z-index: 25;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 420px;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 14px;
}
.manual-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.manual-head h2 { font-size: 1.35rem; }
.manual-copy p { margin: 6px 0 0; color: var(--ink-soft); }
#close-manual { border: 0; background: transparent; width: 36px; height: 36px; color: inherit; font-size: 1.3rem; }
#manual-copy-value {
  width: 100%;
  min-height: 42px;
  margin: 10px 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0 8px;
  font-family: var(--mono);
}
.toast {
  position: fixed;
  z-index: 26;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100% - 24px);
  background: var(--ink);
  color: var(--paper);
  border-left: 3px solid var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms linear, transform 160ms linear;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.noscript {
  width: min(1120px, calc(100% - 32px));
  margin: 12px auto 24px;
  padding: 12px;
  border: 1px solid var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}
@media print {
  body::before, .toolbar, .skip-link, .theme-toggle, .toast, .manual-copy, .scroll-hint { display: none !important; }
  .stage { break-inside: avoid; }
  a { text-decoration: none; }
  .masthead, .site-footer { border-color: #000; }
}
