/* MCP Server Directory. A patch bay: an aluminium panel, engraved labels, jack sockets whose
   ring is the category's cable colour, and a plug in every socket the official registry lists.
   One typeface (Archivo, condensed for engraving and display, normal width for reading). */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin-wdth-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --panel: #dcdfe2;
  --panel-raised: #e9ebed;
  --panel-sunk: #cbcfd3;
  --panel-deep: #b3b9bf;
  --nut: #a4abb2;
  --nut-edge: #8d949c;
  --ink: #121417;
  --ink-2: #3a4047;
  --engrave-hi: rgba(255, 255, 255, 0.7);
  --accent: #b02e1c;
  --accent-ink: #ffffff;
  --focus: #1d58b8;
  --hole: #0b0c0e;
  --led: #2f9e4f;
  --code-bg: #121417;
  --code-ink: #e9ebed;
  --m-pop: #121417;
  --m-act: #47505a;
  --m-mnt: #79838e;
  --m-doc: #a4adb7;
  --m-off: #c4c9ce;
  --m-pen: #b02e1c;

  --c-red: #c8321e;
  --c-blue: #2462c4;
  --c-yellow: #e6b313;
  --c-white: #f3f0e7;
  --c-orange: #e0701c;
  --c-green: #2e8a4e;
  --c-pink: #cf4f8b;
  --c-teal: #178a8a;
  --c-grey: #8a9199;

  --brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='6'%3E%3Crect y='1' width='240' height='1' fill='%23ffffff' opacity='0.18'/%3E%3Crect x='40' y='4' width='150' height='1' fill='%23000000' opacity='0.035'/%3E%3C/svg%3E");

  --font: 'Archivo', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; /* taste-skill-ignore: code blocks only */
  --step-small: 0.8125rem;
  --step-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  --step-hero: clamp(2.75rem, 1.2rem + 6.4vw, 7.25rem);
  --gutter: clamp(16px, 3vw, 40px);
  --gap-section: clamp(72px, 6vw + 40px, 168px);
  --radius: 3px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

:root[data-theme='dark'] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { color-scheme: dark; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --panel: #16181b; --panel-raised: #1d2024; --panel-sunk: #0f1012; --panel-deep: #2b2f34;
    --nut: #3b4046; --nut-edge: #4b5158; --ink: #e8eaec; --ink-2: #a9b0b8; --engrave-hi: rgba(0, 0, 0, 0.55);
    --accent: #ff7d5e; --accent-ink: #16181b; --focus: #7fb0ff; --hole: #000000; --led: #57d27c;
    --code-bg: #0b0c0e; --code-ink: #e8eaec;
    --m-pop: #eef0f2; --m-act: #b4bbc3; --m-mnt: #7d8792; --m-doc: #56606b; --m-off: #2a2e33; --m-pen: #ff7d5e;
    --c-blue: #4c86e6; --c-grey: #8f979f;
    --brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='6'%3E%3Crect y='1' width='240' height='1' fill='%23ffffff' opacity='0.025'/%3E%3Crect x='40' y='4' width='150' height='1' fill='%23000000' opacity='0.2'/%3E%3C/svg%3E");
  }
}
:root[data-theme='dark'] {
  --panel: #16181b; --panel-raised: #1d2024; --panel-sunk: #0f1012; --panel-deep: #2b2f34;
  --nut: #3b4046; --nut-edge: #4b5158; --ink: #e8eaec; --ink-2: #a9b0b8; --engrave-hi: rgba(0, 0, 0, 0.55);
  --accent: #ff7d5e; --accent-ink: #16181b; --focus: #7fb0ff; --hole: #000000; --led: #57d27c;
  --code-bg: #0b0c0e; --code-ink: #e8eaec;
  --m-pop: #eef0f2; --m-act: #b4bbc3; --m-mnt: #7d8792; --m-doc: #56606b; --m-off: #2a2e33; --m-pen: #ff7d5e;
  --c-blue: #4c86e6; --c-grey: #8f979f;
  --brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='6'%3E%3Crect y='1' width='240' height='1' fill='%23ffffff' opacity='0.025'/%3E%3Crect x='40' y='4' width='150' height='1' fill='%23000000' opacity='0.2'/%3E%3C/svg%3E");
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  font-stretch: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
code, pre { font-family: var(--mono); font-size: 0.875em; }
h1, h2, h3 { margin: 0; font-stretch: 75%; font-weight: 720; letter-spacing: -0.02em; line-height: 1; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--ink-2); }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 10; background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* Engraved labels: condensed, sentence case, a light edge under the cut. */
.bay-label, .bay-count, .rank, .bay-title, .snippet-label, .toc-title, .col-title, .legend, .facts, .hero-meta, .colophon-links, .score-num, .wk-range, .wk-stats {
  font-stretch: 70%;
}
/* The cut's light edge only where the labels sit on the panel itself, not on every row. */
.bay-label, .bay-count, .bay-title { text-shadow: 0 1px 0 var(--engrave-hi); } /* taste-skill-ignore: the engraved cut on the panel */

/* Sockets: the one shape. Nut, ring in the cable colour, hole; a plug when patched. */
.socket {
  --s: 30px;
  --cable: var(--c-grey);
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
}
.socket::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nut);
  clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}
.socket-ring { position: relative; display: grid; place-items: center; width: 64%; height: 64%; border-radius: 50%; background: var(--cable); }
.socket-hole { width: 44%; height: 44%; border-radius: 50%; background: var(--hole); }
.plug {
  position: absolute;
  width: 52%;
  height: 52%;
  border-radius: 50%;
  background: var(--cable);
  box-shadow: inset 0 0 0 calc(var(--s) * 0.085) color-mix(in srgb, var(--cable) 62%, #000); /* taste-skill-ignore: an inset ring drawn on a socket, not a shadow */
  opacity: 0;
  transform: scale(1.5);
  transition: opacity 160ms var(--ease), transform 220ms var(--ease);
}
.socket.is-patched .plug { opacity: 1; transform: scale(1); }
.socket-sm { --s: 20px; }
.socket-lg { --s: clamp(44px, 4.2vw, 60px); }
.socket-xl { --s: clamp(44px, 7.4vw, 116px); }
.socket-red, .cat-red { --cable: var(--c-red); }
.socket-blue, .cat-blue { --cable: var(--c-blue); }
.socket-yellow, .cat-yellow { --cable: var(--c-yellow); }
.socket-white, .cat-white { --cable: var(--c-white); }
.socket-orange, .cat-orange { --cable: var(--c-orange); }
.socket-green, .cat-green { --cable: var(--c-green); }
.socket-pink, .cat-pink { --cable: var(--c-pink); }
.socket-teal, .cat-teal { --cable: var(--c-teal); }
.socket-grey, .cat-grey { --cable: var(--c-grey); }

/* Masthead */
.masthead {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding: 18px var(--gutter);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-stretch: 75%; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.wordmark b { font-weight: 760; }
.mark { width: 30px; height: 30px; }
.mk-nut { fill: var(--nut); }
.mk-ring { fill: var(--accent); }
.mk-hole { fill: var(--hole); }
.masthead nav { margin-left: auto; }
.masthead ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.masthead nav a { text-decoration: none; font-weight: 520; padding: 6px 0; display: inline-block; }
.masthead nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.theme-toggle { appearance: none; border: 0; background: none; padding: 6px; cursor: pointer; color: inherit; border-radius: 50%; }
.toggle-mark { width: 28px; height: 28px; display: block; transition: transform 300ms var(--ease); }
.theme-toggle:hover .toggle-mark { transform: rotate(60deg); }
.toggle-mark .mk-ring { fill: var(--ink); }

/* Hero: the headline, and the photograph inside one enormous socket cropped by the page edge. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px;
  padding: clamp(24px, 4vw, 72px) var(--gutter) clamp(40px, 5vw, 96px);
  min-height: min(78svh, 820px);
  overflow: clip;
}
.hero-text { position: relative; z-index: 1; }
.hero h1 { font-size: var(--step-hero); line-height: 0.9; letter-spacing: -0.035em; font-weight: 760; max-width: 16ch; }
.lead { font-size: var(--step-lead); line-height: 1.38; max-width: 34ch; margin-top: 36px; }
.hero-meta { margin-top: 22px; color: var(--ink-2); font-size: 0.9375rem; max-width: 52ch; }
.hero-act { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 640;
  transition: transform 140ms var(--ease), background-color 140ms;
}
.button:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.button:active { transform: translateY(1px) scale(0.99); }
.text-link { font-weight: 560; }
.hero-socket {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(54vw, 760px);
  aspect-ratio: 1;
  margin-right: calc(-1 * var(--gutter) - 9vw);
}
.hero-socket::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nut);
  clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}
.hero-socket img {
  position: absolute;
  inset: 13%;
  width: 74%;
  height: 74%;
  object-fit: cover;
  border-radius: 50%;
  outline: clamp(10px, 1.6vw, 22px) solid var(--c-red);
  outline-offset: 0;
}

/* The patch bay: the category filter. */
.bay {
  margin: 0 var(--gutter);
  padding: 22px clamp(16px, 2.4vw, 36px) 26px;
  background: var(--panel-sunk) var(--brushed);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px 36px;
}
.bay-title { font-size: 1.0625rem; font-weight: 640; letter-spacing: 0; max-width: 9ch; line-height: 1.15; }
.bay-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px 8px; }
.bay-port {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 4px 12px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 140ms;
}
.bay-port:hover { background: color-mix(in srgb, var(--panel-raised) 60%, transparent); color: inherit; }
.bay-port:hover .socket-ring { transform: scale(1.06); }
.bay-port .socket-ring { transition: transform 160ms var(--ease); }
.bay-port[aria-pressed='true'] .socket { --plugged: 1; }
.bay-port[aria-pressed='true'] .plug { opacity: 1; transform: scale(1); }
.bay-count { font-size: 0.875rem; font-weight: 640; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bay-label { font-size: var(--step-small); font-weight: 600; text-align: center; line-height: 1.2; color: var(--ink); }

/* Sections */
.section-title { font-size: var(--step-head); }
.section-note { color: var(--ink-2); font-size: 0.9375rem; margin-top: 10px; max-width: 60ch; }
.col-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
.week-board { padding: var(--gap-section) var(--gutter) 0; }
.week-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(32px, 5vw, 96px); margin-top: 40px; }
.mini-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.mini-list li { background: var(--panel-raised); padding: 12px 14px; border-radius: var(--radius); }
.mini-list a, .mini-row { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mini-name { font-weight: 640; overflow-wrap: anywhere; }
.mini-stat { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); font-stretch: 75%; font-weight: 600; white-space: nowrap; }
.mini-desc { display: block; color: var(--ink-2); font-size: 0.9375rem; margin-top: 4px; padding-left: 20px; overflow-wrap: anywhere; }
.mini-socket { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cable); box-shadow: inset 0 0 0 3px var(--cable), inset 0 0 0 5px var(--hole); align-self: center; } /* taste-skill-ignore: an inset ring drawn on a socket, not a shadow */
.empty { color: var(--ink-2); margin-top: 18px; }

.band { margin: var(--gap-section) 0 0; }
.band img { width: 100%; height: clamp(150px, 21vw, 340px); object-fit: cover; }

/* The catalogue */
.catalogue { padding: clamp(48px, 5vw, 96px) var(--gutter) 0; }
.catalogue-head { display: grid; gap: 4px; margin-bottom: 28px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; color: var(--ink-2); font-size: var(--step-small); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.controls { background: var(--panel); padding: 14px 0 12px; display: grid; gap: 12px; }
/* The controls stay in reach while scrolling only where the screen has room for them. */
@media (min-width: 1100px) and (min-height: 700px) { .controls { position: sticky; top: 0; z-index: 3; } }
.search-row { display: flex; gap: 12px; flex-wrap: wrap; }
.search { flex: 1 1 280px; }
.search input, .sort select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--panel-sunk);
  border: 0;
  border-radius: var(--radius);
  padding: 13px 16px;
  min-height: 48px;
}
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.search input:focus-visible, .sort select:focus-visible { outline-offset: 0; }
.sort { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 560; }
.sort select { width: auto; padding-right: 36px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  appearance: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 560;
  color: var(--ink);
  background: var(--panel-raised);
  border: 0;
  border-radius: var(--radius);
  padding: 9px 14px 9px 30px;
  min-height: 40px;
  position: relative;
  cursor: pointer;
  transition: background-color 120ms, color 120ms, transform 120ms var(--ease);
}
.toggle::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--panel-deep);
  transition: background-color 120ms;
}
.toggle:hover { background: var(--panel-sunk); }
.toggle:active { transform: translateY(1px); }
.toggle[aria-pressed='true'] { background: var(--ink); color: var(--panel); }
.toggle[aria-pressed='true']::before { background: var(--led); }
.toggle-reset { padding-left: 14px; background: none; text-decoration: underline; text-underline-offset: 0.2em; }
.toggle-reset::before { display: none; }
.status { color: var(--ink-2); font-size: 0.9375rem; min-height: 1.5em; }

.rows { display: grid; gap: 3px; background: var(--panel-sunk); padding: 3px; border-radius: var(--radius); }
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 190px;
  gap: 8px 22px;
  background: var(--panel-raised);
  padding: 18px 20px 18px 10px;
  border-radius: 2px;
  scroll-margin-top: 150px;
}
.row:target { background: color-mix(in srgb, var(--panel-raised) 80%, var(--c-yellow)); }
.row-jack { display: grid; justify-items: center; align-content: start; gap: 8px; padding-top: 2px; }
.rank { font-size: 0.875rem; font-weight: 640; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.row-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; }
.row-title a { text-decoration: none; }
.row-title a:hover { text-decoration: underline; }
.owner { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; font-stretch: 85%; }
.desc { margin-top: 8px; max-width: 72ch; overflow-wrap: anywhere; }
.facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9375rem; color: var(--ink-2); align-items: center; }
.facts .is-none { color: var(--accent); font-weight: 600; }
.facts .cat { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; }
.facts .cat::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--cable); box-shadow: inset 0 0 0 3px var(--cable), inset 0 0 0 5px var(--hole); } /* taste-skill-ignore: an inset ring drawn on a socket, not a shadow */
.badge { font-weight: 620; color: var(--ink); background: var(--panel-sunk); padding: 1px 8px; border-radius: 2px; }
.badge-registry { background: var(--ink); color: var(--panel); }
.badge-new { background: var(--c-yellow); color: #121417; }
.badge-warn { background: var(--accent); color: var(--accent-ink); }
.transport { font-weight: 600; color: var(--ink); }
.row.is-archived .row-title, .row.is-archived .desc { color: var(--ink-2); }

.row-score { display: grid; align-content: start; justify-items: end; gap: 8px; }
.score-num { font-size: 2.125rem; font-weight: 760; line-height: 1; font-variant-numeric: tabular-nums; }
.meter { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; width: 100%; max-width: 180px; }
.meter i { height: 12px; background: var(--m-off); border-radius: 1px; }
.m-pop { background: var(--m-pop) !important; }
.m-act { background: var(--m-act) !important; }
.m-mnt { background: var(--m-mnt) !important; }
.m-doc { background: var(--m-doc) !important; }
.m-pen { background: var(--m-pen) !important; }

details > summary { cursor: pointer; font-weight: 600; font-size: 0.9375rem; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--panel-sunk); font-weight: 700; line-height: 1; transition: transform 160ms var(--ease); }
details[open] > summary::before { content: '−'; }
details > summary:hover { color: var(--accent); }
.install { margin-top: 12px; }
.install[open] { padding-bottom: 4px; }
.snippet { margin-top: 12px; }
.snippet-label { font-size: var(--step-small); font-weight: 600; }
.snippet-label code { font-size: 0.8125rem; }
.snippet-note, .caution { font-size: 0.9375rem; color: var(--ink-2); margin-top: 8px; overflow-wrap: anywhere; }
.code { position: relative; margin-top: 6px; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; line-height: 1.6; }
.code.has-copy pre { padding-right: 84px; }
.copy { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 0.8125rem; font-weight: 600; border: 0; border-radius: 2px; padding: 5px 10px; background: var(--panel-deep); color: var(--ink); cursor: pointer; }
.copy:hover { background: var(--panel-raised); }
.copy.is-done { background: var(--led); color: #0b0c0e; }
.why { justify-self: stretch; text-align: left; }
.why > summary { float: right; }
.why[open] > summary { float: none; }
.why-grid { margin: 10px 0 0; display: grid; gap: 10px; font-size: 0.875rem; }
.why-grid dt { font-weight: 640; display: flex; align-items: center; gap: 6px; }
.why-grid dd { margin: 0; color: var(--ink-2); }
.why-grid dd b { color: var(--ink); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 1px; }
.parts { list-style: none; margin: 4px 0 0; padding: 0; }
.parts li { display: flex; justify-content: space-between; gap: 10px; }
.parts .miss span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-2) 50%, transparent); }
.parts .lost b { color: var(--accent); }

.results { list-style: none; margin: 0; padding: 3px; display: grid; gap: 3px; background: var(--panel-sunk); border-radius: var(--radius); }
.result { background: var(--panel-raised); padding: 14px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.result .socket { grid-row: span 3; }
.result-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result-name { font-weight: 700; font-size: 1.125rem; text-decoration: none; overflow-wrap: anywhere; }
.result-name:hover { text-decoration: underline; }
.result-rank { color: var(--ink-2); font-stretch: 70%; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-score { grid-row: 1; grid-column: 3; font-size: 1.5rem; font-weight: 760; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.result-desc { grid-column: 2 / 4; overflow-wrap: anywhere; }
.result-facts { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.875rem; color: var(--ink-2); font-stretch: 75%; }

.pager { margin-top: 28px; }
.pager ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--radius); background: var(--panel-raised); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.pager a:hover { background: var(--panel-sunk); color: inherit; }
.pager [aria-current] { background: var(--ink); color: var(--panel); }
.pager .gap { display: inline-grid; place-items: center; min-width: 24px; color: var(--ink-2); }

/* Inner pages */
.sub { padding: clamp(24px, 4vw, 64px) var(--gutter) 0; }
.page-head { margin-bottom: clamp(32px, 4vw, 64px); }
.page-head h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5.5rem); line-height: 0.92; letter-spacing: -0.035em; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.page-head .lead { margin-top: 26px; max-width: 46ch; }
.week-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-weight: 560; }
.cat-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px clamp(24px, 3vw, 48px); margin-top: var(--gap-section); }
.cat-block h2 { font-size: 1.625rem; display: flex; align-items: center; gap: 10px; }
.cat-block h2 a { text-decoration: none; }
.cat-block h2 a:hover { text-decoration: underline; }
.cat-block .count { margin-left: auto; font-size: 1rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cat-block .mini-list li { padding: 10px 14px; }
.back { margin-top: 32px; font-weight: 560; }
.week-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 900px; }
.week-list a { display: grid; grid-template-columns: 12rem 1fr auto; gap: 8px 24px; padding: 18px 20px; background: var(--panel-raised); border-radius: var(--radius); text-decoration: none; }
.week-list a:hover { background: var(--panel-sunk); color: inherit; }
.wk { font-weight: 700; font-stretch: 75%; font-size: 1.25rem; }
.wk-range, .wk-stats { color: var(--ink-2); }
.week-top { margin-top: var(--gap-section); }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: 10px 12px; vertical-align: top; }
thead th { font-stretch: 75%; font-weight: 650; color: var(--ink-2); }
tbody tr:nth-child(odd) td { background: var(--panel-raised); }
td .mini-socket { display: inline-block; margin-right: 8px; vertical-align: -1px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* How we rank */
.method-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px clamp(32px, 5vw, 96px); }
.toc { position: sticky; top: 24px; align-self: start; }
.toc-title { font-size: 1rem; font-weight: 650; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.toc a { text-decoration: none; font-weight: 520; }
.toc a:hover { text-decoration: underline; }
.method-text { max-width: 76ch; }
.method-text section + section { margin-top: clamp(56px, 6vw, 104px); }
.method-text h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 20px; }
.method-text p + p, .method-text p + div, .method-text div + p, .method-text ul + p { margin-top: 16px; }
.method-text ul { padding-left: 1.2em; display: grid; gap: 8px; }
.formula { background: var(--code-bg); color: var(--code-ink); padding: 20px 22px; border-radius: var(--radius); overflow-x: auto; line-height: 1.6; margin: 0 0 20px; }
.weights { margin: 0 0 24px; }
.weights > svg { display: block; width: 100%; height: 22px; }
.weights .w-pop { fill: var(--m-pop); }
.weights .w-act { fill: var(--m-act); }
.weights .w-mnt { fill: var(--m-mnt); }
.weights .w-doc { fill: var(--m-doc); }
.weights ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9375rem; }
.weights li { display: inline-flex; align-items: center; gap: 8px; }
.weights b { font-variant-numeric: tabular-nums; }
.cat-defs { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin: 20px 0 0; }
.cat-defs dt { font-weight: 650; display: flex; align-items: center; gap: 10px; }
.cat-defs dd { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }

/* Footer: the panel again, large. */
.colophon { margin-top: var(--gap-section); background: var(--panel-sunk); }
.colophon-bay { display: flex; justify-content: space-between; gap: 6px; padding: clamp(28px, 4vw, 56px) var(--gutter); background: var(--panel-deep) var(--brushed); }
.colophon-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); gap: 32px clamp(24px, 4vw, 64px); padding: clamp(40px, 4vw, 64px) var(--gutter) clamp(40px, 4vw, 72px); }
.colophon-name { font-stretch: 75%; font-size: clamp(2rem, 1rem + 3vw, 3.5rem); font-weight: 500; line-height: 0.95; letter-spacing: -0.03em; }
.colophon-name b { font-weight: 780; display: block; }
.colophon-text { display: grid; gap: 14px; font-size: 0.9375rem; }
.credits { color: var(--ink-2); }
.colophon-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; font-weight: 560; }

.not-found .page-head { min-height: 40svh; }

/* Motion: a section's parts rise in once, only when the script is running. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 520ms var(--ease), transform 620ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero h1 { animation: rise 700ms var(--ease) both; }
.js .hero .lead { animation: rise 700ms 90ms var(--ease) both; }
.js .hero-meta, .js .hero-act { animation: rise 700ms 160ms var(--ease) both; }
.js .hero-socket img { animation: turn-in 1200ms 120ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes turn-in { from { opacity: 0; transform: rotate(-14deg) scale(0.94); } }
.row { transition: background-color 160ms; }
.row:hover { background: color-mix(in srgb, var(--panel-raised) 70%, var(--panel)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Narrower screens */
@media (max-width: 1100px) {
  .row { grid-template-columns: 56px minmax(0, 1fr) 150px; }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .colophon-name { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 8px; }
  .hero-socket { grid-row: 1; justify-self: end; width: min(86vw, 520px); margin: 0 calc(-1 * var(--gutter) - 14vw) -8vw 0; }
  .bay { grid-template-columns: 1fr; }
  .bay-title { max-width: none; }
  .week-cols { grid-template-columns: 1fr; }
  .method-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .row { grid-template-columns: 44px minmax(0, 1fr); padding: 16px 14px 16px 6px; gap: 6px 12px; }
  .row-score { grid-column: 2; justify-items: start; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; }
  .row-score .why { grid-column: 1 / -1; }
  .why > summary { float: none; }
  .score-num { font-size: 1.75rem; }
  .row-jack .socket { --s: 26px; }
  .week-list a { grid-template-columns: 1fr; }
  .cat-defs { grid-template-columns: 1fr; gap: 4px 0; }
  .cat-defs dd { margin-bottom: 10px; }
}
@media (max-width: 560px) {
  .masthead { padding-top: 14px; padding-bottom: 6px; }
  .masthead nav { margin-left: 0; order: 3; width: 100%; }
  .masthead ul { gap: 0 18px; }
  .masthead nav a { font-size: 0.9375rem; }
  .hero-socket { width: 58vw; margin-bottom: -10vw; }
  .theme-toggle { margin-left: auto; }
  .bay-strip { grid-template-columns: repeat(3, 1fr); }
  .colophon-grid { grid-template-columns: 1fr; }
  .colophon-bay .socket:nth-child(n + 7) { display: none; }
  .result { grid-template-columns: minmax(0, 1fr) auto; }
  .result .socket { display: none; }
  .result-desc, .result-facts { grid-column: 1 / -1; }
  .result-score { grid-column: 2; }
}
.method-body > *, .method-text > section { min-width: 0; }
.sub .bay { margin: 0; }
