/*
 * Audit site stylesheet.
 *
 * Source Serif 4 for prose, IBM Plex Mono for every technical label,
 * identifier, jack name, switch label, numeric value. White surface,
 * ink/muted greys, single link-blue accent, borders only (no shadows).
 */

:root {
  --bg:       #ffffff;
  --ink:      #1a1a1a;
  --ink-2:    #3a3a3a;
  --muted:    #6a6a6a;
  --line:     #d8d8d8;
  --line-2:   #ebebeb;
  --rule:     #1a1a1a;
  --link:     #0b4f9e;
  --hi:       #fff7c2;
  --ok:       #1d6b3a;
  --warn-bg:  #fbf3e3;
  --warn-ink: #6b4a07;
  --max-w:    1080px;
  --serif:    'Source Serif 4', Charter, Georgia, serif;
  --mono:     'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums tabular-nums;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: normal;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.005em; }

/* ─────────── topbar ─────────── */
.topbar {
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar a { color: var(--ink-2); }
.topbar .brand { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

/* J1 patch-jack brand mark — shared by the homepage + reference topbars and
   the homepage footer lockup. Sized in em so it tracks the adjacent wordmark;
   collar inherits currentColor, tip is brand blue (set on the <svg> markup). */
.brand-mark { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.topbar .sep { color: var(--line); }
.topbar .right { margin-left: auto; color: var(--muted); }

/* ─────────── main content frame ─────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 28px 80px;
}

/* ─────────── footer ─────────── */
footer.foot {
  border-top: 1px solid var(--line);
  padding: 18px 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
footer.foot .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.foot a { color: var(--ink-2); border-bottom: 1px dotted var(--line); }

/* ─────────── module page: 2-col article ─────────── */
.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .article { grid-template-columns: 1fr; }
}

/* ─────────── module header ─────────── */
.head { margin-bottom: 22px; }
.head .id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.head h1 {
  margin: 0 0 4px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
}
.head .maker {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0;
}
.head .maker a { color: var(--ink-2); border-bottom: 1px dotted var(--line); }
.head .maker a:hover { text-decoration: none; border-bottom-color: var(--ink-2); }

/* ─────────── lede ─────────── */
.lede {
  font-size: 16.5px;
  line-height: 1.55;
  margin: 16px 0 0;
}

/* ─────────── sections ─────────── */
.sec { margin-top: 36px; }
.sec > h2 {
  margin: 0 0 12px;
  font-size: 20px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  font-weight: 600;
}
.sec > h2 .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
.sec > h2 a { color: inherit; text-decoration: none; }
.sec > h2 a:hover { color: var(--link); }
.sec > p { margin: 0 0 12px; }
.sec > p.muted-note { color: var(--muted); }

/* ─────────── citations ─────────── */
a.cite {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--link);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  padding: 0 1px;
  white-space: nowrap;
}
a.cite::before { content: "["; color: var(--link); }
a.cite::after  { content: "]"; color: var(--link); }
a.cite:hover { background: var(--hi); border-radius: 1px; text-decoration: none; }

/* ─────────── reference tables (jacks + parameters) ─────────── */
table.ref {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  margin: 0;
}
table.ref th, table.ref td {
  text-align: left;
  vertical-align: top;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--line-2);
}
table.ref th {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  font-family: var(--mono);
}
table.ref td.k {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  width: 13%;
}
table.ref td.t {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  width: 9%;
  white-space: nowrap;
}
table.ref td.v {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
  width: 11%;
  white-space: nowrap;
}
table.ref tr:last-child td { border-bottom: 0; }
table.ref tr.section-rule td {
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  padding-top: 14px;
  padding-bottom: 4px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ─────────── capabilities (dl) ─────────── */
dl.caps { margin: 0; }
dl.caps > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  align-items: start;
}
dl.caps > div:last-child { border-bottom: 0; }
dl.caps dt {
  font-weight: 600;
  font-size: 15px;
}
dl.caps dt .id {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
dl.caps dd { margin: 0; color: var(--ink); font-size: 14.5px; }

/* ─────────── infobox (right rail) ─────────── */
aside.infobox {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fafafa;
  position: sticky;
  top: 20px;
  align-self: start;
}
aside.infobox h2 {
  margin: 0;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  border: 0;
}
aside.infobox dl { margin: 0; padding: 0; }
aside.infobox dl > div {
  display: flex;
  justify-content: space-between;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-2);
  gap: 12px;
}
aside.infobox dl > div:last-child { border-bottom: 0; }
aside.infobox dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
aside.infobox dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}
aside.infobox dd .u {
  color: var(--muted);
  font-weight: 400;
  margin-left: 2px;
}
aside.infobox .footrow {
  padding: 8px 14px;
  background: #f3f3f3;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
aside.infobox .ok { color: var(--ok); }
aside.infobox .footrow a {
  color: inherit;
  border-bottom: 1px dotted var(--line);
}
aside.infobox .footrow a:hover { text-decoration: none; border-bottom-color: var(--muted); }

/* ─────────── migration-005: zones + assignments (inline under jacks/params) ─────────── */
/* The zones block visualizes parameter_zones (labeled regions along a knob's
 * travel) as a thin bar with positional segments + a legend. The chips block
 * visualizes parameter_assignments / jack_assignments (the destination menu
 * a knob or jack can address). Both nest inside the Description cell of the
 * containing parameters/jacks table row. */
.zones, .assignments {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted var(--line-2);
}
.zones:first-child, .assignments:first-child { margin-top: 6px; }

.assign-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.assign-mirror {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
  margin-left: 8px;
  font-size: 11px;
}
.assign-mirror .mono { color: var(--ink); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 1px 7px 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafa;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.4;
}
.chip-default { background: #f1faf3; border-color: #c8e6c9; color: var(--ok); }
.chip-label { color: var(--ink); }
.chip-default .chip-label { color: inherit; }
.chip-note {
  color: var(--muted);
  font-size: 10.5px;
}

.zone-strip {
  margin-top: 6px;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 10px;
  align-items: start;
}
.zone-strip:first-of-type { margin-top: 0; }
.zone-mode {
  font-size: 10.5px;
  color: var(--muted);
  padding-top: 2px;
}
.zone-bar {
  position: relative;
  height: 16px;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 2px;
  grid-column: 2;
}
.zone-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(11, 79, 158, 0.12);
  border-right: 1px solid rgba(11, 79, 158, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 4px;
}
.zone-seg:first-child { border-left: 0; }
.zone-seg:last-child { border-right: 0; }
.zone-seg-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zone-mid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--rule);
  z-index: 1;
}
.zone-legend {
  grid-column: 2;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.zone-legend li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  align-items: baseline;
}
.zone-leg-label { font-weight: 500; }
.zone-leg-range {
  font-size: 11px;
  color: var(--muted);
}
.zone-behavior {
  color: var(--ink-2);
  flex: 1 1 16rem;
}

/* ─────────── visualization mount ─────────── */
/* The renderer scopes its own CSS via .erv-root, so .viz-mount only needs
 * a border + padding to match the surrounding article. */
.viz-mount {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  padding: 8px;
  min-height: 200px;
}

/* ─────────── references list ─────────── */
ol.refs {
  list-style: none;
  padding: 0;
  margin: 0;
}
ol.refs li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: baseline;
}
ol.refs li:last-child { border-bottom: 0; }
ol.refs li .no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--link);
}
ol.refs .title { font-weight: 600; }
ol.refs .kind {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
ol.refs .links {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
ol.refs .status {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
ol.refs .status .ok { color: var(--ok); }
ol.refs .status.stale { color: var(--warn-ink); }

/* ─────────── index page ─────────── */
.hero { padding: 0 0 12px; }
.hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.lede.intro {
  max-width: 44rem;
  font-size: 16.5px;
  margin: 0;
}
.stats dl {
  display: flex;
  gap: 2rem;
  margin: 18px 0 0;
  flex-wrap: wrap;
}
.stats dt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}
.stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.module-list li {
  border-bottom: 1px solid var(--line-2);
  padding: 12px 0;
}
.module-list li:last-child { border-bottom: 0; }
.module-list a { text-decoration: none; }
.module-list a:hover strong { text-decoration: underline; }
.module-list strong { font-size: 16.5px; }
.module-list .hp {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 7px;
  background: #f3f3f3;
  border: 1px solid var(--line-2);
  font-size: 11px;
  color: var(--muted);
  border-radius: 3px;
  font-family: var(--mono);
}
.module-list .desc {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}
.module-list .muted {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 6px;
}

/* ─────────── manufacturer lineup ─────────── */
.module-list.lineup li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: baseline;
}
.module-list.lineup li > a,
.module-list.lineup li > .meta {
  grid-row: 1;
}
.module-list.lineup li > .desc {
  grid-row: 2;
  grid-column: 1 / -1;
}
.module-list.lineup li.not-ingested strong { color: var(--ink-2); }
.module-list.lineup li.not-ingested a { color: var(--ink-2); }
.module-list.lineup li.not-ingested a:hover strong { color: var(--ink); }

.module-list.lineup .meta {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}
.module-list.lineup .catalog-code {
  color: var(--ink-2);
}
.module-list.lineup .status {
  padding: 1px 7px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  background: #fafafa;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.module-list.lineup .status-current   { color: #1f6f3a; border-color: #c8e6c9; background: #f1faf3; }
.module-list.lineup .status-sold_out   { color: #8a6300; border-color: #ead7a7; background: #fbf6ea; }
.module-list.lineup .status-discontinued { color: #7a3030; border-color: #e5c1c1; background: #fbf0f0; }
.module-list.lineup .role {
  font-style: italic;
  color: var(--muted);
}

.catalog-source {
  margin: -4px 0 12px;
  font-size: 12px;
}

/* ─────────── catalog tag chips ─────────── */
/* Subtle pill that's clearly tappable; rendered after status/role in lineup
 * entries and on the /tags/ pages. Visual weight kept below status chips so
 * the citation-anchored facts (status/role) dominate. */
.module-list.lineup .tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 8px;
  vertical-align: middle;
}
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #f6f8fb;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.tag:hover {
  border-color: var(--link);
  color: var(--link);
  text-decoration: none;
}

/* /tags/ index — the tag list reuses .module-list.tags-list shape. */
.module-list.tags-list li {
  padding: 8px 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.module-list.tags-list .meta {
  font-size: 12px;
  color: var(--muted);
}

/* ─────────── source page bits ─────────── */
.breadcrumb {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 12px;
  font-family: var(--mono);
}
.breadcrumb a { color: var(--ink-2); border-bottom: 1px dotted var(--line); }
.source-header h1 {
  font-size: 28px;
  margin: 0 0 4px;
  line-height: 1.15;
}
.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 6px 10px;
  border-left: 3px solid var(--warn-ink);
  display: inline-block;
  margin: 6px 0 0;
  font-size: 13.5px;
}
dl.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 24px;
  margin: 0;
  font-size: 14px;
}
dl.specs dt {
  color: var(--muted);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
dl.specs dd { margin: 0; }
.hash {
  font-family: var(--mono);
  font-size: 12px;
  background: #f3f3f3;
  padding: 1px 5px;
  border-radius: 3px;
  word-break: break-all;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
}
.pdf-frame {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-top: 8px;
}
.muted { color: var(--muted); }

/* ─────────── small screens ─────────── */
@media (max-width: 900px) {
  main { padding: 24px 18px 64px; }
  .topbar-inner { padding: 10px 18px; }
  footer.foot { padding: 18px 18px; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .head h1 { font-size: 32px; }
  .lede { font-size: 16px; }
  .sec > h2 { font-size: 18px; }
  table.ref { font-size: 13.5px; }
  table.ref td.k, table.ref td.t, table.ref td.v { width: auto; white-space: normal; }
  dl.caps > div { grid-template-columns: 1fr; gap: 6px; }
}

/*
 * ─────────── agent-first homepage (/) ───────────
 *
 * Scoped entirely under `.home-page` so the reference pages keep their
 * existing palette and chrome. The homepage establishes its own design
 * tokens (warm-grey surfaces, darker ink, single accent) per
 * audit-site/mockups/homepage-agent-first-spec.md §1.
 */

.home-page {
  /* Tokens — override the site palette for the homepage only. */
  --bg:         #ffffff;
  --bg-2:       #f7f5ef;
  --bg-dark:    #181612;
  --bg-dark-2:  #25221c;
  --ink:        #14110d;
  --ink-2:      #2e2a23;
  --muted:      #5d5650;
  --muted-2:    #807870;
  --rule:       #d4cebe;
  --rule-2:     #e7e2d4;
  --rule-3:     #efeae0;
  --link:       #0b4f9e;
  --link-hover: #6e1a0c;
  --focus:      #ffce1a;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
}

.home-page main {
  /* Wider gutter + max-width than the reference pages, per spec §1. */
  max-width: 1180px;
  padding: 0 clamp(20px, 4vw, 56px) 0;
}

.home-page main:focus { outline: none; }

.home-page :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.home-page html { scroll-behavior: smooth; }

/* Skip links — hidden until focused. */
.home-page .skip-links a {
  position: absolute;
  top: -200px;
  left: 12px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 13px;
  border-radius: 3px;
  text-decoration: none;
}
.home-page .skip-links a:focus,
.home-page .skip-links a:focus-visible { top: 12px; }

/* ─── topbar ─── */
.home-page .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.home-page .topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.home-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-page .brand:hover { text-decoration: none; color: var(--ink); }
.home-page .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}
.home-page .top-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
  justify-content: flex-start;
  font-family: var(--mono);
  font-size: 13px;
}
.home-page .top-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 3px;
}
.home-page .top-nav a:hover {
  background: var(--rule-3);
  color: var(--ink);
  text-decoration: none;
}
.home-page .top-nav a[aria-current="page"] {
  color: var(--ink);
}
.home-page .top-nav a[aria-current="page"]::before {
  content: "· ";
  color: var(--link);
  font-weight: 700;
}
.home-page .connect-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-page .connect-chip:hover {
  background: var(--link);
  color: #fff;
  text-decoration: none;
}
@media (max-width: 720px) {
  .home-page .top-nav { order: 3; flex-basis: 100%; }
}

/* ─── sections ─── */
.home-page main > .block {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--rule);
}
.home-page main > .block:first-child { border-top: 0; }

.home-page .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 14px;
}
.home-page .section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 26ch;
  text-wrap: balance;
}
.home-page .section-sub {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 56ch;
  text-wrap: pretty;
}

.home-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── hero ─── */
.home-page .hero { padding-top: clamp(48px, 7vw, 80px); }

.home-page .hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 28px;
}
.home-page .hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--link);
}

.home-page #hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 16ch;
  text-wrap: balance;
}
.home-page #hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}

.home-page .lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
  margin: 0 0 40px;
}
.home-page .lede strong {
  color: var(--ink);
  font-weight: 600;
}

.home-page .install-row-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ─── install cards ─── */
.home-page .install-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 56px;
}
@media (max-width: 1080px) {
  .home-page .install-cards {
    grid-template-columns: 1fr;
    max-width: 580px;
  }
}

.home-page .host-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px;
  min-width: 0;
}
.home-page .host-head { margin: 0; }
.home-page .host-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.home-page .host-sub {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.home-page .host-sub code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink-2);
}

.home-page .host-code {
  position: relative;
  min-width: 0;
}
.home-page .host-code pre {
  margin: 0;
  background: var(--bg-dark);
  color: #e8e2d2;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 4px;
  white-space: pre;
  overflow-x: auto;
}
.home-page .host-code code {
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  padding: 0;
  color: inherit;
}
.home-page .copy {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--bg-dark-2);
  color: #c8c1b1;
  border: 1px solid #3a352e;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
}
.home-page .copy:hover { color: #fff; border-color: #5a554c; }

.home-page .host-cta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
}
.home-page .host-cta:hover { text-decoration: underline; }

/* ─── prompts block ─── */
.home-page .prompts-block { margin: 0; }
.home-page .prompts-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 14px;
}
.home-page .prompts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-page .prompts-list li {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 8px 14px;
  line-height: 1.4;
}
.home-page .prompts-list li::before {
  content: "\201C";
  font-style: normal;
  color: var(--muted-2);
  margin-right: 1px;
}
.home-page .prompts-list li::after {
  content: "\201D";
  font-style: normal;
  color: var(--muted-2);
  margin-left: 1px;
}

/* ─── transcript ─── */
.home-page .transcript {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  max-width: 820px;
  background: var(--bg);
}
.home-page .transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.home-page .tag-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--rule-2);
  padding: 3px 9px;
  border-radius: 999px;
}
.home-page .turn {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
  border-top: 1px solid var(--rule-2);
}
.home-page .turn:first-of-type { border-top: 0; }
.home-page .turn-role {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-page .turn-role::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  display: inline-block;
}
.home-page .turn-user .turn-role::before { background: var(--link); }
.home-page .turn-assistant .turn-role::before { background: var(--ink); }
.home-page .tool-call-row .turn-role::before { background: #275d3a; }

.home-page .turn-text {
  grid-column: 2;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.home-page .turn-user .turn-text {
  font-size: 17px;
  color: var(--ink);
}
.home-page .turn-text + .turn-text { margin-top: 12px; }
.home-page .turn-text strong { color: var(--ink); font-weight: 600; }

.home-page .tool-call-row {
  padding: 0 24px 18px;
  border-top: 0;
}
.home-page .tool-call {
  grid-column: 1 / -1;
  padding: 10px 16px;
  background: var(--bg-dark);
  color: #cfc8b6;
  font-family: var(--mono);
  font-size: 12.5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.home-page .tool-call .arrow { color: var(--muted-2); }
.home-page .tool-call .tool-name { color: #ffd47a; }
.home-page .tool-call .tool-args { color: #b8d8ff; }

@media (max-width: 600px) {
  .home-page .turn { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
  .home-page .turn-text { grid-column: 1; }
  .home-page .tool-call-row { padding: 0 18px 14px; }
}

.home-page .manual-quote {
  grid-column: 2;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--link);
  background: var(--bg-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}
@media (max-width: 600px) {
  .home-page .manual-quote { grid-column: 1; }
}

.home-page .transcript-foot {
  background: var(--bg-2);
  border-top: 1px solid var(--rule-2);
  padding: 16px 24px 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ─── tool list ─── */
.home-page .tools {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  counter-reset: tools;
}
.home-page .tools li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 200px minmax(0, 1.4fr);
  gap: 32px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.home-page .tool-capability {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
.home-page .tool-id {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.home-page .tool-id code {
  font-family: var(--mono);
  background: var(--bg-2);
  color: var(--ink);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 13px;
}
.home-page .tool-example {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.home-page .tool-example::before { content: "\201C"; font-style: normal; }
.home-page .tool-example::after { content: "\201D"; font-style: normal; }

@media (max-width: 860px) {
  .home-page .tools li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.home-page .dev-row {
  margin: 28px 0 0;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 16px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.home-page .dev-row strong {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-right: 10px;
}
.home-page .dev-row a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.home-page .dev-row a:hover { color: var(--link); text-decoration-color: var(--link); }

/* ─── stats ─── */
.home-page .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.home-page .stats > div {
  padding: 22px 22px 26px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.home-page .stats dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 8px;
}
.home-page .stats dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.home-page .stats dd.date {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: 0;
  line-height: 1.1;
}
@media (max-width: 760px) {
  .home-page .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ─── browse fallback ─── */
.home-page .browse-line {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
  max-width: 640px;
  margin: 0;
  line-height: 1.55;
}
.home-page .browse-line a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.home-page .browse-line a:hover {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* ─── footer ─── */
.home-page .site-foot {
  border-top: 1px solid var(--rule);
  padding: 32px 0 56px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.home-page .site-foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.home-page .site-foot p { margin: 0; max-width: 56ch; line-height: 1.55; }
.home-page .foot-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.home-page .site-foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.home-page .site-foot a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

/* ─── reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .home-page,
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/*
 * ─────────── unified site chrome (reference pages) ───────────
 *
 * The homepage carries its own topbar/footer under `.home-page`; these rules
 * give every *reference* page (the /modules index + the layout()-wrapped
 * module/manufacturer/source/tag pages) the same warm topbar + footer so the
 * site reads as one surface. Colors are written as literals rather than tokens
 * because the deep reference pages keep their cooler body palette (var(--ink)
 * etc. resolve differently there) — the chrome must look identical regardless.
 * Width tracks the host page via var(--max-w); the /modules index widens it to
 * match the homepage (see .ref-page below).
 */
.site-chrome .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid #d4cebe;
  font-family: var(--serif);
  font-size: 17px;
  color: #14110d;
}
.site-chrome .topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--chrome-gutter, 28px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.site-chrome .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: #14110d;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-chrome .brand:hover { text-decoration: none; color: #14110d; }
.site-chrome .top-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
}
.site-chrome .top-nav a {
  color: #5d5650;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 3px;
}
.site-chrome .top-nav a:hover {
  background: #efeae0;
  color: #14110d;
  text-decoration: none;
}
.site-chrome .top-nav a[aria-current="page"] { color: #14110d; }
.site-chrome .top-nav a[aria-current="page"]::before {
  content: "· ";
  color: #0b4f9e;
  font-weight: 700;
}
.site-chrome .connect-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #14110d;
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-chrome .connect-chip:hover { background: #0b4f9e; color: #fff; text-decoration: none; }
@media (max-width: 720px) {
  .site-chrome .top-nav { order: 3; flex-basis: 100%; }
}

.site-chrome .site-foot {
  border-top: 1px solid #d4cebe;
  padding: 32px 0 56px;
  font-family: var(--mono);
  font-size: 13px;
  color: #5d5650;
}
.site-chrome .site-foot-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--chrome-gutter, 28px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.site-chrome .site-foot p { margin: 0; max-width: 56ch; line-height: 1.55; }
.site-chrome .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #14110d;
}
.site-chrome .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-chrome .site-foot a {
  color: #5d5650;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-chrome .site-foot a:hover { color: #14110d; border-bottom-color: #d4cebe; }

/*
 * ─────────── reference index (/modules) ───────────
 *
 * Self-contained page (templates/index.ts) rendered under `.ref-page`, which
 * adopts the homepage's warm palette + 1180px frame so it sits cohesively next
 * to `/`. Layers a sticky filter / A–Z utility bar under the shared topbar,
 * then giant letter dividers, manufacturer sections, and dense module rows.
 * Spec: the design bundle's Reference.html.
 */
.ref-page {
  --bg:         #ffffff;
  --bg-2:       #f7f5ef;
  --ink:        #14110d;
  --ink-2:      #2e2a23;
  --muted:      #5d5650;
  --muted-2:    #807870;
  --rule:       #d4cebe;
  --rule-2:     #e7e2d4;
  --rule-3:     #efeae0;
  --link:       #0b4f9e;
  --link-hover: #6e1a0c;
  --focus:      #ffce1a;

  --max-w:        1180px;
  --chrome-gutter: clamp(20px, 4vw, 56px);
  --gutter:       clamp(20px, 4vw, 56px);
  --topbar-h:     57px;
  --utilbar-h:    54px;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
}
html.ref-html {
  scroll-behavior: smooth;
  /* Clear both sticky bars (topbar 57 + util-bar 54) when jumping to anchors. */
  scroll-padding-top: calc(57px + 54px + 16px);
}
.ref-page a { color: var(--link); text-underline-offset: 3px; }
.ref-page a:hover { color: var(--link-hover); }
.ref-page :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Override the global single-column <main> frame: the util-bar is full-bleed. */
.ref-page main {
  max-width: none;
  margin: 0;
  padding: 0;
}
.ref-page main:focus { outline: none; }

.ref-page .skip-links a {
  position: absolute;
  top: -200px;
  left: 12px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 13px;
  border-radius: 3px;
  text-decoration: none;
}
.ref-page .skip-links a:focus,
.ref-page .skip-links a:focus-visible { top: 12px; }

.ref-page .page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── compact page head ─── */
.ref-page .ref-head {
  padding: 24px 0 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}
.ref-page .ref-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.018em;
  line-height: 1.1;
  margin: 0;
}
.ref-page .ref-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin: 0;
  font-variant-numeric: tabular-nums;
  align-items: baseline;
}
.ref-page .ref-meta .sep { color: var(--muted-2); opacity: 0.55; }

/* ─── sticky utility bar (filter + A–Z) ─── */
.ref-page .util-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.ref-page .util-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--utilbar-h);
}
.ref-page .filter { position: relative; flex: 0 1 360px; min-width: 220px; }
.ref-page .filter::before {
  content: "/";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted-2);
  pointer-events: none;
}
.ref-page .filter input {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  padding: 8px 12px 8px 26px;
  outline: none;
}
.ref-page .filter input::placeholder { color: var(--muted-2); }
.ref-page .filter input:focus-visible {
  border-color: var(--link);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.ref-page .filter-count {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ref-page .atoz {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-left: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ref-page .atoz::-webkit-scrollbar { display: none; }
.ref-page .atoz a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-align: center;
  min-width: 22px;
}
.ref-page .atoz a:hover { color: var(--ink); background: var(--rule-3); }
.ref-page .atoz a.is-empty { color: var(--muted-2); opacity: 0.35; pointer-events: none; }
@media (max-width: 860px) {
  .ref-page .util-bar-inner { flex-wrap: wrap; gap: 12px; }
  .ref-page .filter { flex: 1 1 100%; }
  .ref-page .filter-count { order: 3; }
  .ref-page .atoz { flex-basis: 100%; margin-left: 0; }
}

/* ─── reference list ─── */
.ref-page .ref-list { padding: clamp(16px, 2vw, 28px) 0 clamp(72px, 8vw, 120px); }
.ref-page .letter-group { margin: 0 0 56px; }
.ref-page .letter-group:first-child { margin-top: 0; }
.ref-page .letter-mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--rule);
  margin: 0 0 -4px;
  user-select: none;
}

.ref-page .mfg { padding: 26px 0 32px; border-top: 1px solid var(--rule); }
.ref-page .mfg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.ref-page .mfg-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
.ref-page .mfg-head h2 a { color: var(--ink); text-decoration: none; }
.ref-page .mfg-head h2 a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }
.ref-page .mfg-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.ref-page .modules { list-style: none; margin: 0; padding: 0; }
.ref-page .module {
  display: grid;
  grid-template-columns: minmax(0, 260px) 64px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 6px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-2);
  align-items: baseline;
}
.ref-page .module:first-child { border-top: 0; padding-top: 4px; }
@media (max-width: 760px) {
  .ref-page .module { grid-template-columns: 1fr auto; column-gap: 16px; }
}
.ref-page .module-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--link);
  text-decoration: none;
  line-height: 1.35;
  text-wrap: balance;
}
.ref-page .module-name:hover { color: var(--link-hover); text-decoration: underline; text-decoration-thickness: 1px; }
.ref-page .hp {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  justify-self: start;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.ref-page .hp abbr { text-decoration: none; border-bottom: 1px dotted var(--rule); cursor: help; }
.ref-page .module-desc {
  grid-column: 3 / -1;
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 760px) {
  .ref-page .module-desc { grid-column: 1 / -1; }
}
.ref-page .module-desc.module-desc-empty { color: var(--muted-2); font-style: italic; }
.ref-page .stub-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: 2px;
  margin-right: 6px;
}
.ref-page .module-desc .muted { color: var(--muted-2); font-family: var(--serif); font-size: inherit; margin: 0; }

/* ─── filter hide / no-results ─── */
.ref-page .mfg.is-hidden,
.ref-page .letter-group.is-hidden,
.ref-page .module.is-hidden { display: none; }
.ref-page .no-results {
  padding: 64px 0;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--muted);
  max-width: 56ch;
}
.ref-page .no-results.is-hidden { display: none; }
.ref-page .no-results .mono {
  font-family: var(--mono);
  color: var(--ink);
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  html.ref-html { scroll-behavior: auto; }
  .ref-page,
  .ref-page *,
  .ref-page *::before,
  .ref-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
