/* Colorado Law Library — publication theme
   Contemporary civic law library: oxblood masthead, cream reading surface,
   serif titles, catalog numbering, primary-source marginalia.
   System fonts only. No external dependencies. No gradients. */

:root {
  --oxblood: #4a1220;
  --oxblood-deep: #380d18;
  --oxblood-line: #6e2233;
  --cream: #f7f2e7;
  --cream-raised: #fdfaf2;
  --cream-sunk: #efe7d6;
  --ink: #1d1a17;
  --ink-soft: #3d3733;
  --ink-mute: #574f48;
  --rule: #c9bda6;
  --rule-strong: #8f7f65;
  --accent-ink: #6b1a2c;
  --focus: #1b4d8c;
  --focus-light: #a8c8f0;
  --measure: 34rem;
  --wrap: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

/* ---------- Shared typographic rules ---------- */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--oxblood-deep);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + 0.55vw, 1.35rem); }
h4 { font-size: 1rem; letter-spacing: 0.01em; }

p { margin: 0 0 1em; max-width: 62ch; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0 0 0.45em; max-width: 58ch; }

strong { color: var(--ink); }

/* Links */
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.16em; }
a:hover { color: var(--oxblood-deep); text-decoration-thickness: 2px; }

/* Focus — always visible, on every surface */
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
  text-decoration: none;
}

.site-header a:focus-visible,
.site-footer a:focus-visible,
.masthead a:focus-visible,
.finder-teaser a:focus-visible {
  outline: 3px solid var(--focus-light);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 50;
  background: var(--cream-raised);
  color: var(--oxblood-deep);
  padding: 0.6rem 1rem;
  border: 2px solid var(--oxblood);
  font-weight: 700;
  text-decoration: none;
  transition: top 120ms ease-in;
}
.skip-link:focus { top: 0.75rem; }

.catalog-number {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 0.9rem;
  max-width: none;
}

.marginalia {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
  max-width: 70ch;
}

/* ---------- Site header ---------- */

.site-header {
  background: var(--oxblood);
  color: var(--cream);
  border-bottom: 4px solid var(--oxblood-deep);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.1rem 1cap 1.1rem;
  padding-left: max(1.25rem, 4vw);
  padding-right: max(1.25rem, 4vw);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 2rem;
}

.brand { min-width: 0; }

.brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--cream);
  text-decoration: none;
  flex-wrap: wrap;
}
.brand-link:hover { color: #ffffff; }

.brand-mark {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  border: 1.5px solid #e7d9c3;
  color: #f4ead9;
  padding: 0.18rem 0.4rem;
  align-self: center;
}

.brand-name {
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.005em;
  color: #ffffff;
}

.brand-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #e6d6bf;
  max-width: 34ch;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li { margin: 0; }

.site-nav a {
  color: #fdf6ea;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 1.5px solid #b98e5e;
  padding-bottom: 0.12rem;
}
.site-nav a:hover { color: #ffffff; border-bottom-color: #ffffff; }

/* ---------- Home layout ---------- */

.page.home main {
  display: block;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(1.25rem, 4vw) 4rem;
}

.page.home > main > section {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.page.home > main > section:last-child { border-bottom: 0; padding-bottom: 1.5rem; }

/* Masthead */

.masthead {
  padding-top: 2.75rem;
}

.masthead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.masthead h1 {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
  line-height: 1.06;
  max-width: 16ch;
  margin-bottom: 1rem;
}

.lede {
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 46ch;
}

.lede-sub {
  font-size: 0.92rem;
  color: var(--ink-mute);
  max-width: 48ch;
  border-left: 3px solid var(--rule-strong);
  padding-left: 0.85rem;
}

.masthead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.9rem;
  margin: 1.4rem 0 0;
  max-width: none;
}

.button-primary,
.button-secondary {
  display: inline-block;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  border: 2px solid var(--oxblood-deep);
  line-height: 1.25;
}

.button-primary {
  background: var(--oxblood);
  color: #ffffff;
}
.button-primary:hover { background: var(--oxblood-deep); color: #ffffff; }

.button-secondary {
  background: transparent;
  color: var(--oxblood-deep);
  border-color: var(--oxblood);
}
.button-secondary:hover { background: var(--cream-sunk); color: var(--oxblood-deep); }

/* Plinth figure */

.plinth {
  margin: 0;
  background: var(--cream-raised);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--oxblood);
  padding: 1rem 1rem 0.85rem;
}

.plinth-art { display: block; width: 100%; height: auto; }

.plinth-contours path {
  fill: none;
  stroke: #b7a583;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.plinth-contours path:nth-child(2) { stroke: #9c8a68; }
.plinth-contours path:nth-child(3) { stroke: #cbb896; }

.plinth-facade path {
  fill: none;
  stroke: var(--oxblood);
  stroke-width: 2.4;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.plinth-facade path:nth-child(2) { stroke-width: 1.8; stroke: var(--oxblood-line); }
.plinth-facade path:nth-child(3) { stroke-width: 2; }
.plinth-facade path:nth-child(4) { stroke-width: 1.6; }

.plinth-tabs rect {
  fill: var(--cream);
  stroke: var(--rule-strong);
  stroke-width: 1.4;
}
.plinth-tabs text {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--oxblood-deep);
}

.plinth figcaption,
.contour-figure figcaption {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-mute);
  margin-top: 0.65rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.55rem;
}

/* Finder teaser */

.finder-teaser {
  background: var(--cream-sunk);
  margin: 0 calc(-1 * max(1.25rem, 4vw));
  padding-left: max(1.25rem, 4vw) !important;
  padding-right: max(1.25rem, 4vw) !important;
  border-bottom: 1px solid var(--rule) !important;
}

.finder-teaser-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1.5rem 3rem;
  align-items: start;
}

.finder-teaser h2 { max-width: 24ch; }

.finder-capabilities {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 1.3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 1.5rem;
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.8rem;
}

.finder-capabilities li {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
  padding: 0.15rem 0;
}

.finder-teaser-scope {
  background: var(--cream-raised);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.4rem 1rem;
}

.finder-teaser-scope h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--oxblood);
  padding-bottom: 0.4rem;
}

.scope-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.scope-pair h4 {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
}

.scope-pair ul { padding-left: 1.05em; margin: 0; }
.scope-pair li { font-size: 0.88rem; line-height: 1.5; margin-bottom: 0.4rem; }

.contour-figure {
  margin: 1.5rem 0 0;
  max-width: 30rem;
  border-left: 3px solid var(--oxblood);
  padding-left: 0.9rem;
}

.contour-art { display: block; max-height: 140px; }

.contour-lines path { fill: none; stroke: #a8967a; stroke-width: 1.8; }
.contour-lines path:nth-child(2) { stroke: #8f7f65; }
.contour-lines path:nth-child(3) { stroke: #c1af90; }
.contour-facade path { fill: none; stroke: var(--oxblood); stroke-width: 2.4; }
.contour-facade path:nth-child(2) { stroke: var(--oxblood-line); stroke-width: 1.8; }

/* Section heads */

.section-head { margin-bottom: 1.6rem; }
.section-head h2 { max-width: 26ch; }
.section-intro { color: var(--ink-soft); max-width: 62ch; margin-bottom: 0; }

/* Guides */

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid var(--oxblood-deep);
}

.guide-entry {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.4rem 1.5rem;
  padding: 1.3rem 0 1.15rem;
  border-bottom: 1px solid var(--rule);
  margin: 0;
  max-width: none;
}

.guide-number {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--oxblood);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.guide-body h3 { margin-bottom: 0.45rem; }
.guide-body h3 a { text-decoration-thickness: 2px; }
.guide-body p { max-width: 68ch; color: var(--ink-soft); }

.guide-source {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-bottom: 0;
  border-top: 1px dotted var(--rule-strong);
  padding-top: 0.45rem;
  display: inline-block;
}

/* Source table */

.source-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule-strong);
  background: var(--cream-raised);
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
  min-width: 46rem;
}

.source-table caption {
  text-align: left;
  caption-side: top;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: var(--cream-sunk);
}

.source-table th,
.source-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.source-table thead th {
  background: var(--oxblood);
  color: #ffffff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 2px solid var(--oxblood-deep);
}

.source-table tbody th[scope="row"] {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--oxblood-deep);
  background: var(--cream-sunk);
  white-space: nowrap;
}

.source-table tbody tr:last-child th,
.source-table tbody tr:last-child td { border-bottom: 0; }

.source-table tbody tr:nth-child(even) td { background: #fbf6eb; }

/* Limits */

.limits {
  background: var(--oxblood-deep);
  color: #f4ead9;
  margin: 0 calc(-1 * max(1.25rem, 4vw));
  padding-left: max(1.25rem, 4vw) !important;
  padding-right: max(1.25rem, 4vw) !important;
}

.limits-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem 3rem;
  align-items: start;
}

.limits .catalog-number { color: #dcc9a8; }
.limits h2 { color: #ffffff; }
.limits p { color: #f0e3cd; }
.limits .limits-list { margin: 0; padding-left: 1.15em; }
.limits .limits-list li { color: #f4ead9; margin-bottom: 0.6rem; }
.limits .limits-list strong { color: #ffffff; }

/* ---------- Article pages ---------- */

.page.article,
article.page.article {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(1.25rem, 4vw) 4rem;
}

.article-header {
  border-bottom: 3px solid var(--oxblood);
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 1.75rem;
}

.article-header h1 { max-width: 28ch; }

.article-body {
  max-width: 46rem;
}

.article-body h2 {
  margin-top: 2.1rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
}

.article-body h3 { margin-top: 1.5rem; }
.article-body p { max-width: var(--measure); color: var(--ink); }
.article-body ul, .article-body ol { max-width: var(--measure); }
.article-body a { text-decoration-thickness: 1.5px; }

.article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--rule-strong);
  color: var(--ink-soft);
}

/* Article source tables */
.article-body .source-table-wrap { margin: 1.4rem 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
  background: var(--cream-raised);
  border: 1px solid var(--rule-strong);
}
.article-body th,
.article-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--rule);
}
.article-body thead th {
  background: var(--oxblood);
  color: #ffffff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.article-body tbody th { background: var(--cream-sunk); color: var(--oxblood-deep); }

/* ---------- Tool page ---------- */

.page.tool.tool-page,
main.tool-page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(1.25rem, 4vw) 4rem;
  display: block;
}

.catalog-head {
  border-bottom: 3px solid var(--oxblood);
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 1.75rem;
}
.catalog-head h1 { max-width: 26ch; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
.catalog-head .lede { color: var(--ink); max-width: 60ch; }

.finder-panel {
  border: 1px solid var(--rule-strong);
  background: var(--cream-raised);
  padding: 1.5rem;
  margin-bottom: 2.25rem;
}
.finder-panel h2 { margin-top: 0; }

fieldset#tool-fields {
  border: 1px solid var(--rule);
  padding: 1.1rem 1.15rem 1.25rem;
  margin: 0 0 1.25rem;
  background: var(--cream);
}
fieldset#tool-fields[disabled] { opacity: 0.9; }

fieldset legend {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 0.35rem;
  color: var(--oxblood-deep);
}

.field-row { margin-bottom: 1.05rem; }
.field-row label {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.field-row select,
.field-row textarea,
.field-row input {
  width: 100%;
  max-width: 34rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid var(--rule-strong);
  padding: 0.5rem 0.6rem;
  border-radius: 0;
}
.field-row select { min-height: 2.75rem; }
.field-row textarea { resize: vertical; min-height: 6rem; }

.field-row select:disabled,
.field-row textarea:disabled,
.field-row input:disabled {
  background: var(--cream-sunk);
  color: var(--ink-soft);
  border-color: var(--rule);
}

.field-help {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
  max-width: 60ch;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.button-row button,
.finder-panel button {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  padding: 0.7rem 1.1rem;
  border: 2px solid var(--oxblood-deep);
  border-radius: 0;
  background: var(--oxblood);
  color: #ffffff;
  cursor: pointer;
}
.button-row button:hover:not(:disabled) { background: var(--oxblood-deep); }

.button-row button#reset,
.button-row button#download {
  background: transparent;
  color: var(--oxblood-deep);
  border-color: var(--oxblood);
}
.button-row button#reset:hover:not(:disabled),
.button-row button#download:hover:not(:disabled) { background: var(--cream-sunk); }

.button-row button:disabled {
  cursor: not-allowed;
  background: var(--cream-sunk);
  color: var(--ink-soft);
  border-color: var(--rule-strong);
}

.results {
  border-top: 2px solid var(--oxblood);
  padding-top: 1rem;
  min-height: 6rem;
}
.results:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.results-placeholder {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.notice {
  border: 1px solid var(--oxblood);
  border-left-width: 5px;
  background: #fbf3e4;
  padding: 0.9rem 1rem 0.6rem;
  margin-bottom: 1.25rem;
}
.notice p { color: var(--ink); }
.notice ul { margin-bottom: 0.8rem; }

/* Tool notes section */
.finder-notes {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  margin-bottom: 1.75rem;
}
.finder-notes h2 { max-width: 26ch; }

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2.5rem;
  margin-bottom: 1rem;
}
.scope-grid h3 {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.35rem;
  font-size: 1.02rem;
}
.scope-grid ul { padding-left: 1.15em; }
.scope-grid li { font-size: 0.93rem; color: var(--ink-soft); max-width: 46ch; }

/* ---------- Site footer ---------- */

.site-footer {
  background: var(--oxblood-deep);
  color: #f4ead9;
  border-top: 5px solid var(--oxblood);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.6rem max(1.25rem, 4vw) 1.8rem;
}

.footer-brand {
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.75rem;
  max-width: none;
}

.footer-nav { margin-bottom: 0.9rem; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li { margin: 0; }
.footer-nav a {
  color: #f3e6d2;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid #8a5f6c;
  padding-bottom: 0.05rem;
}
.footer-nav a:hover { color: #ffffff; border-bottom-color: #ffffff; }

.footer-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #ddcbb1;
  margin: 0;
  max-width: 70ch;
  border-top: 1px solid #5c3440;
  padding-top: 0.75rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 60rem) {
  .masthead-grid,
  .finder-teaser-grid,
  .limits-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }
  .plinth { max-width: 30rem; }
  .masthead h1 { max-width: 22ch; }
}

@media (max-width: 44rem) {
  body { font-size: 1rem; }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }
  .site-nav ul { gap: 0.4rem 1.1rem; }

  .guide-entry { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.3rem 0.85rem; }
  .guide-number { font-size: 1.15rem; }

  .finder-capabilities { grid-template-columns: minmax(0, 1fr); }
  .scope-pair { grid-template-columns: minmax(0, 1fr); }
  .scope-grid { grid-template-columns: minmax(0, 1fr); }

  .finder-panel { padding: 1.1rem 1rem 1.25rem; }
  fieldset#tool-fields { padding: 0.9rem 0.85rem 1rem; }
  .button-row button { flex: 1 1 auto; min-height: 2.75rem; }
  .field-row select { max-width: none; }

  .source-table { min-width: 40rem; }

  /* Stacked source tables on article pages */
  .article-body .source-table-wrap { overflow-x: visible; border: 0; background: transparent; }
  .article-body table { display: block; border: 0; background: transparent; min-width: 0; }
  .article-body thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .article-body tbody { display: block; }
  .article-body tbody tr {
    display: block;
    border: 1px solid var(--rule-strong);
    border-left: 4px solid var(--oxblood);
    background: var(--cream-raised);
    margin-bottom: 0.9rem;
    padding: 0.2rem 0;
  }
  .article-body tbody th,
  .article-body tbody td {
    display: block;
    border-bottom: 1px solid var(--rule);
    padding: 0.55rem 0.8rem;
    background: transparent;
  }
  .article-body tbody tr > *:last-child { border-bottom: 0; }
  .article-body tbody td[data-label]::before,
  .article-body tbody th[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 0.15rem;
  }
}

@media (max-width: 26rem) {
  .brand-link { gap: 0.5rem; }
  .brand-tagline { font-size: 0.78rem; }
  .masthead-actions a { width: 100%; text-align: center; }
  .marginalia { font-size: 0.78rem; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .skip-link { transition: none; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer, .skip-link, .masthead-actions, .finder-panel button { display: none; }
  body { background: #ffffff; color: #000000; }
  a { color: #000000; }
  .page.home main, .page.article, .page.tool.tool-page, main.tool-page { padding: 0; max-width: none; }
}
/* Verified layout corrections */
.site-header a.brand,.site-footer .footer-publisher a{color:#fff6e8}.finder-teaser,.limits{margin-inline:0;max-width:100%}.source-table{min-width:0;width:100%;table-layout:fixed;overflow-wrap:anywhere}

.article-body{overflow-wrap:anywhere;word-break:normal}
