@font-face { font-family: "Atkinson"; src: url(/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(/fonts/courier-prime-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(/fonts/courier-prime-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --slate: #e6ebec;
  --slate-2: #d3dbde;
  --slate-3: #b9c5c9;
  --ink: #1c2833;
  --ink-2: #485865;
  --manila: #f2e9cf;
  --manila-edge: #dccc9f;
  --teal: #1e5a60;
  --teal-2: #14454a;
  --teal-tint: #d7e6e6;
  --red: #b33a3a;
  --amber: #8a5800;
  --amber-tint: #f6e3bd;
  --paper: #fbfcfc;
  --sans: "Atkinson", "Atkinson Hyperlegible", system-ui, sans-serif;
  --typed: "Courier Prime", "Courier New", monospace;
  --r: 6px;
  font-size: 112.5%; /* 18px base: comfortable for older eyes */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--slate); color: var(--ink);
  font-family: var(--sans); line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--teal-2); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(.9rem, env(safe-area-inset-top)) max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right)) .9rem max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left));
  border-bottom: 1px solid var(--slate-3);
}
.masthead nav { display: flex; align-items: center; gap: 1rem; }
.install-btn {
  border: 1.5px solid var(--teal); background: var(--teal); color: #fff; border-radius: 999px;
  padding: .35rem .9rem; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 36px; white-space: nowrap;
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--ink-2); font-weight: 400; }
.masthead nav a { color: var(--ink-2); font-size: .95rem; }

main { flex: 1; width: 100%; max-width: 76rem; margin: 0 auto;
  padding: 0 max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right)) 4rem max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left)); }

/* ---------- finder ---------- */
.finder { padding: clamp(2rem, 7vw, 4.5rem) 0 1.5rem; max-width: 46rem; }
body.has-results .finder { padding-top: 1.25rem; max-width: none; }
.finder h1 {
  font-family: var(--typed); font-weight: 700; font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.1; margin: 0 0 .5rem; letter-spacing: -.01em;
}
.finder .lede { margin: 0 0 1.6rem; color: var(--ink-2); font-size: 1.05rem; max-width: 36rem; }
body.has-results .finder h1, body.has-results .finder .lede { display: none; }

.qlabel { display: block; font-weight: 700; margin-bottom: .35rem; }
.qrow { display: flex; gap: .5rem; position: relative; max-width: 46rem; }
.qrow input {
  -webkit-appearance: none; appearance: none;
  flex: 1; min-width: 0; font-size: 1.15rem; padding: .8rem 1rem;
  border: 2px solid var(--ink-2); border-radius: var(--r); background: var(--paper);
}
.qrow input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-tint); }
.btn {
  border: 0; border-radius: var(--r); background: var(--teal); color: #fff; font-weight: 700;
  padding: .8rem 1.4rem; cursor: pointer; min-height: 48px;
}
.btn:hover { background: var(--teal-2); }
.btn.quiet { background: transparent; color: var(--teal); border: 2px solid var(--teal); padding: .55rem 1rem; }
.btn.quiet:hover { background: var(--teal-tint); }

.suggest {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 6.5rem; margin: .25rem 0 0; padding: .25rem 0;
  list-style: none; background: var(--paper); border: 1px solid var(--slate-3); border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(28, 40, 51, .18);
}
.suggest li { padding: .5rem 1rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--teal-tint); }
.suggest .n { color: var(--ink-2); font-size: .9rem; }

.opts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin-top: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; padding: 0; margin: 0; }
.chips legend { float: left; margin-right: .5rem; padding-top: .4rem; color: var(--ink-2); font-size: .95rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: .35rem .8rem; border: 1.5px solid var(--slate-3); border-radius: 999px;
  background: var(--paper); font-size: .95rem; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.years { display: flex; align-items: center; gap: .4rem; color: var(--ink-2); font-size: .95rem; }
.years input { width: 4.6rem; padding: .35rem .5rem; border: 1.5px solid var(--slate-3); border-radius: var(--r); background: var(--paper); }
.more summary { cursor: pointer; color: var(--teal); font-size: .95rem; }
.more label { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; font-size: .95rem; max-width: 30rem; }
.more input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--teal); }

/* ---------- home: coverage ---------- */
.home { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.coverage h2, .tips h2, .about h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.coverage p { margin: 0 0 1rem; color: var(--ink-2); max-width: 42rem; }
.timeline { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 1px; height: 4.5rem; align-items: end; }
.timeline i { display: block; background: var(--slate-3); min-height: 6px; border-radius: 1px 1px 0 0; }
.timeline i.index { background: #7f9ea3; }
.timeline i.cert { background: var(--teal); }
.timeline i.some { background: linear-gradient(var(--teal) 0 40%, #7f9ea3 40%); }
.timeline i.sample { background: repeating-linear-gradient(90deg, var(--teal) 0 2px, var(--slate-3) 2px 4px); }
.tl-axis { position: relative; height: 1.4rem; font-size: .85rem; color: var(--ink-2); margin-top: .3rem; }
.tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-axis span:first-child { transform: none; }
.tl-axis span:last-child { transform: translateX(-100%); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .8rem; font-size: .9rem; color: var(--ink-2); padding: 0; list-style: none; }
.legend b { display: inline-block; width: .9rem; height: .9rem; border-radius: 2px; vertical-align: -2px; margin-right: .35rem; }
.tips ul { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; }
.tips li a {
  display: inline-block; font-family: var(--typed); background: var(--manila); border: 1px solid var(--manila-edge);
  padding: .35rem .75rem; border-radius: 3px; text-decoration: none; color: var(--ink);
}
.tips li a:hover { border-color: var(--teal); }
.tips p { color: var(--ink-2); margin: .3rem 0 0; max-width: 42rem; }

/* ---------- results ---------- */
.results { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; margin-top: 1.25rem; }
.rhead { grid-column: 1 / -1; display: grid; gap: .6rem; }
.count { font-size: 1.15rem; margin: 0; }
.count strong { font-size: 1.4rem; }
.interp { margin: 0; color: var(--ink-2); max-width: 54rem; }
.interp b { color: var(--ink); }
.variants { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 0; padding: 0; list-style: none; }
.variant {
  border: 1.5px solid var(--slate-3); background: var(--paper); border-radius: 999px; padding: .3rem .75rem;
  font-size: .95rem; cursor: pointer; display: inline-flex; gap: .45rem; align-items: center;
}
.variant[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-tint); }
.variant[aria-pressed="false"] { color: var(--ink-2); border-style: dashed; }
.variant .n { color: var(--ink-2); font-size: .85rem; }
.variant .tick { width: 1rem; text-align: center; font-weight: 700; color: var(--teal); }
.rtools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.rtools select { padding: .4rem .6rem; border: 1.5px solid var(--slate-3); border-radius: var(--r); background: var(--paper); }
.filter-toggle { display: none; }

.filters { align-self: start; position: sticky; top: 1rem; display: grid; gap: 1.4rem; }
.filters h3 { font-size: 1rem; margin: 0 0 .35rem; }
.facet { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.facet button {
  width: 100%; display: flex; justify-content: space-between; gap: .5rem; text-align: left;
  border: 0; background: transparent; padding: .3rem .5rem; border-radius: 4px; cursor: pointer;
}
.facet button:hover { background: var(--slate-2); }
.facet button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.facet button[aria-pressed="true"] .n { color: #fff; }
.facet .n { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.facet .bar { display: block; height: 4px; background: var(--slate-3); border-radius: 2px; margin-top: 2px; }
.clear-filters { font-size: .95rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; max-width: 44rem; }
.card {
  display: block; position: relative; text-decoration: none; color: var(--ink);
  background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 3px;
  padding: 1rem 1.2rem 1.6rem; box-shadow: 0 1px 0 var(--manila-edge), 0 2px 6px rgba(28, 40, 51, .08);
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 100% 2px; background-position: 0 2.9rem; background-repeat: no-repeat;
}
.card::after { /* the punched hole on the State's index cards */
  content: ""; position: absolute; left: 50%; bottom: .45rem; width: .7rem; height: .7rem; margin-left: -.35rem;
  border-radius: 50%; background: var(--slate); box-shadow: inset 0 1px 2px rgba(28, 40, 51, .25);
}
.card:hover { border-color: var(--teal); }
.card:hover .card-name { text-decoration: underline; text-decoration-thickness: 1px; }
.card-name { display: block; font-family: var(--typed); font-weight: 700; font-size: 1.25rem; line-height: 1.3; min-height: 1.9rem; }
.card-name .sur { letter-spacing: .02em; }
.card-line { display: block; margin-top: .35rem; }
.card-line:first-of-type { margin-top: .9rem; }
.card-sub { color: var(--ink-2); }
.card mark { background: var(--teal-tint); color: var(--ink); padding: 0 .2rem; border-radius: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.tag { font-size: .85rem; padding: .1rem .55rem; border-radius: 3px; background: rgba(255, 255, 255, .55); border: 1px solid var(--manila-edge); }
.tag.full { background: var(--teal); border-color: var(--teal); color: #fff; }
.tag.warn { background: var(--amber-tint); border-color: #e2c27e; color: var(--amber); }

.empty { max-width: 40rem; background: var(--paper); border: 1px solid var(--slate-3); border-radius: var(--r); padding: 1.25rem 1.5rem; }
.empty h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.empty ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.pager { display: flex; gap: .75rem; align-items: center; margin-top: 1.5rem; max-width: 44rem; flex-wrap: wrap; }
.pager span { color: var(--ink-2); }
.loading { color: var(--ink-2); }
.err { color: var(--red); }

/* ---------- record view ---------- */
.record {
  position: fixed; inset: 0; z-index: 30; background: rgba(28, 40, 51, .45);
  display: flex; justify-content: flex-end; height: 100dvh;
}
.sheet {
  background: var(--slate); width: min(78rem, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; box-shadow: -8px 0 32px rgba(0, 0, 0, .2); outline: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(.7rem, env(safe-area-inset-top)) max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right)) .7rem max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-left));
  background: var(--slate); border-bottom: 1px solid var(--slate-3);
}
.sheet-bar .acts { display: flex; gap: .5rem; flex-wrap: wrap; }
.back { border: 0; background: none; color: var(--teal); cursor: pointer; font-weight: 700; padding: .5rem 0; min-height: 44px; }
.rec { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }
.rec-doc { position: sticky; top: 4.5rem; align-self: start; }
.doc-frame {
  display: block; width: 100%; padding: 0; border: 1px solid var(--slate-3); background: #fff; cursor: zoom-in;
  border-radius: 3px; min-height: 10rem; position: relative; overflow: hidden;
}
.doc-frame img { display: block; width: 100%; height: auto; }
.doc-frame .hint {
  position: absolute; right: .6rem; bottom: .6rem; background: rgba(28, 40, 51, .8); color: #fff;
  font-size: .85rem; padding: .25rem .6rem; border-radius: 3px;
}
.doc-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; font-size: .95rem; }
.nodoc { background: var(--paper); border: 1px dashed var(--slate-3); padding: 1.25rem; border-radius: var(--r); color: var(--ink-2); }
.nodoc strong { color: var(--ink); }

.rec-name { font-family: var(--typed); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0; }
.rec-aka { margin: .4rem 0 0; color: var(--ink-2); }
.rec-sum { font-size: 1.1rem; margin: .8rem 0 0; }
.notice { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: var(--r); background: var(--amber-tint); color: #5c3b00; font-size: .95rem; }
.notice.info { background: var(--teal-tint); color: var(--teal-2); }
.group { margin-top: 1.6rem; }
.group h3 { font-size: 1.05rem; margin: 0 0 .4rem; padding-bottom: .3rem; border-bottom: 2px solid var(--red); display: inline-block; }
.group dl { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .45rem 1.25rem; margin: .4rem 0 0; }
.group dt { color: var(--ink-2); }
.group dd { margin: 0; overflow-wrap: anywhere; }
.group dd.unsure { text-decoration: underline dotted var(--amber); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.group dd.unsure::after { content: " (reading uncertain)"; color: var(--amber); font-size: .85rem; }
.namelink { border: 0; background: none; padding: 0; color: var(--teal); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; text-align: left; }
.cite { background: var(--paper); border: 1px solid var(--slate-3); border-radius: var(--r); padding: .8rem 1rem; font-size: .95rem; margin: .5rem 0 .6rem; }
.relatives { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.relatives a { display: block; background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 3px; padding: .55rem .8rem; text-decoration: none; color: var(--ink); }
.relatives a:hover { border-color: var(--teal); }
.relatives .t { display: block; font-size: .85rem; color: var(--ink-2); }
.relatives .nm { font-family: var(--typed); font-weight: 700; }

/* ---------- zoom viewer ---------- */
.zoom { position: fixed; inset: 0; z-index: 40; background: #10181e; color: #fff; display: flex; flex-direction: column; height: 100dvh; }
.zoom-bar { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: max(.6rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .6rem max(1rem, env(safe-area-inset-left)); }
.zoom-tip { text-align: center; font-size: .85rem; color: #b7c4cb; padding: .3rem 1rem calc(.5rem + env(safe-area-inset-bottom)); }
.zoom-bar .grp { display: flex; gap: .4rem; }
.zoom-bar button, .zoom-bar a {
  background: #24323c; color: #fff; border: 0; border-radius: 4px; padding: .5rem .85rem; min-height: 44px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.zoom-stage { flex: 1; overflow: hidden; position: relative; touch-action: none; cursor: grab; }
.zoom-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }

/* ---------- about ---------- */
.about { max-width: 44rem; margin-top: 2rem; }
.about p, .about li { max-width: 42rem; }

footer { border-top: 1px solid var(--slate-3); color: var(--ink-2); font-size: .9rem;
  padding: 1.2rem max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right)) calc(1.2rem + env(safe-area-inset-bottom)) max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left)); }

/* ---------- install ---------- */
.install-card {
  display: flex; gap: 1rem; align-items: center; background: var(--paper); border: 1px solid var(--slate-3);
  border-left: 5px solid var(--teal); border-radius: var(--r); padding: 1rem 1.2rem; max-width: 46rem;
}
.install-card img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.install-card p { margin: 0; }
.install-card .acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.linkish { border: 0; background: none; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: .5rem; }
.install { position: fixed; inset: 0; z-index: 45; background: rgba(28, 40, 51, .5); display: flex; align-items: flex-end; justify-content: center; height: 100dvh; }
.install-sheet {
  background: var(--paper); width: min(32rem, 100%); max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 16px 16px 0 0; padding: 1.4rem 1.4rem calc(1.6rem + env(safe-area-inset-bottom)); outline: none;
}
.install-sheet h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.install-sheet .why { margin: 0 0 1rem; color: var(--ink-2); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .85rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; align-items: start; }
.steps li::before {
  content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.install-sheet .ico { display: inline-flex; vertical-align: -6px; width: 1.6rem; height: 1.6rem; border: 1.5px solid var(--slate-3); border-radius: 6px; align-items: center; justify-content: center; background: #fff; margin: 0 .15rem; }
.install-sheet .ico svg { width: 1.1rem; height: 1.1rem; }
.install-sheet .older { margin-top: 1rem; font-size: .92rem; color: var(--ink-2); }
.install-sheet .done { margin-top: 1.2rem; width: 100%; }
.pointer { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 46; font-size: 2rem; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); animation: bob 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
footer p { margin: 0; max-width: 60rem; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .results { grid-template-columns: 1fr; }
  .filter-toggle {
    position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 20;
    background: var(--teal) !important; color: #fff !important; border-color: var(--teal) !important; border-radius: 999px !important;
    box-shadow: 0 6px 18px rgba(28, 40, 51, .3); padding: .7rem 1.3rem !important; min-height: 48px;
  }
  .brand { font-size: 1rem; line-height: 1.25; }
  .filter-toggle { display: inline-flex; }
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 25; max-height: 75dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper);
    padding: 1.2rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
    transform: translateY(105%); transition: transform .2s ease;
  }
  .filters.open { transform: none; }
  .filters .close-filters { display: inline-flex; }
  .rec { grid-template-columns: 1fr; }
  .rec-doc { position: static; }
  .qrow .btn { padding: .8rem 1rem; }
  body.has-results .opts .chips, body.has-results .opts .years { display: none; } /* county and years live in Filters */
  .masthead nav .long { display: none; }
}
@media (max-width: 600px) {
  .sheet-bar .long, .sheet-bar .print { display: none; }
  .sheet-bar .btn.quiet { padding: .4rem .8rem; min-height: 40px; }
  .tl-axis span:nth-child(5), .tl-axis span:nth-child(3) { display: none; }
  .suggest { right: 0; }
}
@media (min-width: 901px) { .close-filters { display: none !important; } }
@media (pointer: coarse) {
  .facet button { padding: .65rem .6rem; }
  .variant { padding: .5rem .9rem; min-height: 44px; }
  .chip span { padding: .55rem .95rem; }
  .back, .namelink { min-height: 44px; }
  .years input { padding: .55rem .5rem; }
  .card { -webkit-touch-callout: none; }
  .card:active { border-color: var(--teal); background-color: #ede2c2; }
}
@media (display-mode: standalone) { .install-btn, .install-card { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .masthead, .finder, .filters, footer, .sheet-bar, .doc-links { display: none !important; }
  .record { position: static; background: none; }
  .sheet { box-shadow: none; height: auto; }
}

/* Server-filled record / search text for AI agents and readers without JavaScript (src/agents.js).
   Hidden as soon as the app runs; the app shows the same content its own way. */
.js .ssr { display: none; }
.ssr { max-width: 60rem; margin: 0 auto 2rem; padding: 0 1rem; }
.ssr dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.ssr dt { color: var(--ink-2); }
.ssr dd { margin: 0; }
footer .agents { margin-top: .5rem; }
