/* INSINC archive
   Layout: a broadcast "player bar" (the timeline scrubber) sits under the masthead and tracks
   the reader through one long chronological log; eras are chapters on that bar.
   Colour: broadcast navy ink on a cool studio grey, one Canadian on-air red; archival images sit on a white mat. */
:root {
  --bg: #EDF0F4;
  --surface: #F8F9FB;
  --ink: #14203A;
  --muted: #56617A;
  --rule: #CDD4DF;
  --track: #D4DAE4;
  --accent: #C8102E;
  --accent-ink: #FFFFFF;
  --mat: #FFFFFF;
  --mat-edge: #D6DCE5;
  --shade: rgba(20, 32, 58, .14);

  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-ui: "Big Shoulders Text", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;

  --s-0: .875rem; --s-1: 1rem; --s-2: 1.1875rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 2.75rem;
  --measure: 40rem;
  --page: 74rem;
  --head-h: 3.5rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1626; --surface: #131D30; --ink: #E4E8EF; --muted: #98A3B8; --rule: #27334B;
    --track: #2A3651; --accent: #FF4B5D; --accent-ink: #0E1626; --mat: #E9ECF1; --mat-edge: #3A4763;
    --shade: rgba(0, 0, 0, .45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1626; --surface: #131D30; --ink: #E4E8EF; --muted: #98A3B8; --rule: #27334B;
  --track: #2A3651; --accent: #FF4B5D; --accent-ink: #0E1626; --mat: #E9ECF1; --mat-edge: #3A4763;
  --shade: rgba(0, 0, 0, .45); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head-h) + 5.5rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--s-2)/1.6 var(--f-body);
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
  width: 100%; max-width: var(--page); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--ink); color: var(--bg); padding: .5rem .8rem; font-family: var(--f-ui); }
.skip:focus { left: 1rem; top: calc(env(safe-area-inset-top, 0px) + .5rem); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--rule);
}
.masthead-inner { display: flex; align-items: center; gap: 1.25rem; height: calc(var(--head-h) - 1px); }
.wordmark {
  display: inline-block; flex: none; width: 6.3rem; height: 2.6rem; text-decoration: none;
  background: url(logo.png) no-repeat center / contain;
  font-size: 0; color: transparent; overflow: hidden;
}
.wordmark .onair { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark { background-color: #fff; border-radius: 3px; box-shadow: 0 0 0 4px #fff; } }
:root[data-theme="dark"] .wordmark { background-color: #fff; border-radius: 3px; box-shadow: 0 0 0 4px #fff; }
.onair { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.era-nav { display: flex; gap: 1.4rem; margin-left: 1rem; font: 600 1.25rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.nav { display: flex; gap: 1.1rem; margin-left: auto; font: 500 1.0625rem/1 var(--f-ui); }
.nav a, .era-nav a { text-decoration: none; padding-block: .4rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a[aria-current="page"], .era-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.era-nav a[aria-current="page"] { color: var(--accent); }
.search-btn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font: 500 1rem/1 var(--f-ui); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 999px; padding: .45rem .8rem;
}
.search-btn:hover { border-color: var(--ink); }
.search-btn kbd { font: inherit; font-size: .8rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0 .3rem; }
@media (max-width: 1020px) {
  :root { --head-h: 6.25rem; }
  .masthead-inner { flex-wrap: wrap; height: auto; padding-block: .55rem 0; row-gap: .2rem; }
  .era-nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: .5rem; padding-block: .35rem .25rem; border-top: 1px solid var(--rule); }
  .masthead-inner { min-height: var(--head-h); }
}
@media (max-width: 640px) {
  .masthead-inner { gap: .75rem; }
  .era-nav { font-size: 1.125rem; }
  .nav { gap: .7rem; font-size: 1rem; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { padding: .45rem; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(1.25rem, 3vw, 2.1rem) clamp(1rem, 2.2vw, 1.6rem); display: grid; gap: .35rem; justify-items: center; text-align: center; }
.hero-title {
  font: 600 clamp(1.6rem, 3vw, 2.35rem)/1.1 var(--f-body); letter-spacing: -.01em;
  font-variation-settings: "opsz" 72;
}
.hero-lede { max-width: var(--measure); font-size: clamp(1.0625rem, 1.4vw, 1.2rem); line-height: 1.45; }
.hero-sub { max-width: 48rem; color: var(--muted); font-size: var(--s-0); line-height: 1.5; }

/* ---------- era panels (home) ---------- */
.panels { list-style: none; margin-block: 0 clamp(3rem, 7vw, 5rem); display: grid; gap: 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel a { aspect-ratio: 1 / 1; } }
@media (max-width: 560px) { .panels { grid-template-columns: 1fr; } }
.panel a { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; color: #fff; background: var(--ink); }
@media (max-width: 560px) { .panel a { aspect-ratio: 4 / 3; } }
.panel-img, .panel-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel-img img { object-fit: cover; filter: grayscale(.35) contrast(1.02); }
.panel:nth-child(2) .panel-img img { object-position: 50% 18%; }
.panel:nth-child(3) .panel-img img { object-position: 62% 50%; }
.panel:nth-child(4) .panel-img img { object-position: 50% 30%; }
.panel-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,22,38,0) 30%, rgba(14,22,38,.72) 62%, rgba(14,22,38,.94) 100%); }
.panel-text { position: absolute; inset: auto 0 0; display: grid; gap: .35rem; padding: 1.25rem 1.25rem 1.4rem; text-shadow: 0 1px 12px rgba(14,22,38,.6); }
.panel-years { font: 800 clamp(2.2rem, 3.5vw, 3.3rem)/.9 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1020px) { .panel-years { font-size: clamp(2.4rem, 8vw, 3.4rem); } }
.panel-name { font: 500 1.3rem/1.2 var(--f-body); min-height: 2.4em; } /* reserve two lines so the years line up across tiles */
@media (max-width: 560px) { .panel-name { min-height: 0; } }
.panel-count { font: 500 .9375rem/1.2 var(--f-ui); opacity: .85; }
.panel-years::after { content: ""; display: block; width: 2.5rem; height: 3px; margin-top: .55rem; background: #FF4B5D; transition: width .2s ease-out; }
.panel a:hover .panel-years::after, .panel a:focus-visible .panel-years::after { width: 5rem; }
.panel a:hover .panel-img img, .panel a:focus-visible .panel-img img { filter: none; }
.panel a:focus-visible { outline-offset: -4px; outline-color: #fff; }

/* ---------- player bar ---------- */
.player { background: var(--bg); border-block: 1px solid var(--rule); }
.player.is-sticky { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head-h)); z-index: 15; }
.player-inner { display: flex; align-items: center; gap: 1.1rem; padding-block: .85rem 1.85rem; }
.readout {
  flex: none; width: 6.4rem; font: 600 1.6rem/1 var(--f-display);
  font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--accent);
}
.track { position: relative; flex: 1; min-width: 0; height: 1.1rem; touch-action: none; cursor: pointer; }
.chapters { position: absolute; inset: .35rem 0 auto; height: .4rem; }
.chapter {
  position: absolute; top: 0; height: 100%; display: block; text-decoration: none;
  background: var(--track); border-radius: 1px; overflow: visible;
  border-right: 3px solid var(--bg);
}
.chapter .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.chapter-label {
  position: absolute; top: .85rem; left: 0; white-space: nowrap; pointer-events: auto;
  font: 500 .8125rem/1 var(--f-ui); color: var(--muted);
  max-width: calc(100% - 4px); overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px;
}
.chapter-label b { font-weight: 700; color: var(--ink); }
.chapter-label span { display: none; }
@media (min-width: 1100px) { .chapter-label span { display: inline; } }
.chapter:hover .chapter-label, .chapter:hover .chapter-label b { color: var(--accent); }
.ticks .tick { position: absolute; top: .1rem; width: 1px; height: .25rem; background: var(--muted); opacity: .5; }
.ticks .tick.major { height: .3rem; opacity: .9; }
.marks { position: absolute; inset: 0; }
.mark {
  position: absolute; top: .3rem; width: 2px; height: .5rem; margin-left: -1px;
  background: var(--ink); opacity: .55; border-radius: 1px;
}
.mark.has-story { top: .05rem; height: 1rem; opacity: .85; }
.mark::before { content: ""; position: absolute; inset: -.5rem -.45rem; }
.mark:hover, .mark:focus-visible, .mark.is-current { background: var(--accent); opacity: 1; }
.head {
  position: absolute; top: .55rem; left: 0; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent); pointer-events: none;
}
.tip {
  position: absolute; top: calc(100% + .55rem); left: 0; transform: translateX(-50%);
  width: max-content; max-width: min(19rem, 70vw); padding: .45rem .6rem;
  background: var(--ink); color: var(--bg); border-radius: 4px; pointer-events: none;
  font: 400 .875rem/1.3 var(--f-body); box-shadow: 0 6px 18px var(--shade); z-index: 2;
}
.tip b { display: block; font: 700 .8125rem/1.2 var(--f-ui); letter-spacing: .02em; opacity: .8; margin-bottom: .15rem; }
@media (max-width: 640px) {
  .player-inner { gap: .7rem; padding-block: .7rem 1.6rem; }
  .readout { font-size: 1.2rem; width: 4.9rem; }
  .chapter-label { font-size: .75rem; }
  .chapter:nth-child(2) .chapter-label b { letter-spacing: -.02em; }
}

/* ---------- eras & entries ---------- */
.era { padding-block: clamp(3rem, 7vw, 5.5rem) 1rem; }
.era + .era { border-top: 1px solid var(--rule); }
.era-grid { display: grid; gap: 1.25rem 3rem; align-items: start; }
@media (min-width: 900px) { .era-grid { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); } }
.era-years {
  font: 800 clamp(3.2rem, 11vw, 5.4rem)/.86 var(--f-display); letter-spacing: -.005em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.era-years a { text-decoration: none; }
.era-name { margin-top: .6rem; font: 500 var(--s-3)/1.15 var(--f-body); }
.era-tag { margin-top: .35rem; color: var(--muted); font-style: italic; }
.era-intro { max-width: var(--measure); display: grid; gap: 1rem; }
.era-more { font: 700 1.0625rem/1.3 var(--f-ui); }
.era-more a { color: var(--accent); }

.entries { list-style: none; margin-block: clamp(2rem, 5vw, 3.5rem) 0; display: grid; }
.entry {
  position: relative; display: grid; gap: .35rem 1.5rem;
  grid-template-columns: minmax(0, 1fr) 6rem;
  grid-template-areas: "date date" "body thumb";
  padding-block: 1.5rem; border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-date { grid-area: date; font: 600 1.25rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.entry-date .d2 { color: var(--muted); }
.entry-body { grid-area: body; min-width: 0; display: grid; gap: .45rem; align-content: start; }
.entry-title { font: 600 1.3rem/1.22 var(--f-body); }
.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }
.entry-blurb { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); font-size: 1.0625rem; line-height: 1.55; max-width: var(--measure); }
.entry-more { font: 700 1.0625rem/1.3 var(--f-ui); }
.entry-more a { color: var(--accent); }
.entry-thumb { grid-area: thumb; align-self: start; }
@media (min-width: 760px) {
  .entry { grid-template-columns: 8.5rem minmax(0, 1fr) 11rem; grid-template-areas: "date body thumb"; padding-block: 1.9rem; }
  .entry-date { display: grid; gap: .3rem; font-size: 1.6rem; padding-top: .1rem; }
  .entry-date .d1, .entry-date .d2 { display: block; }
  .entry-title { font-size: 1.45rem; }
}
.entry::before {  /* story marker: filled = full story in the archive */
  content: ""; position: absolute; left: -1.15rem; top: 1.85rem; width: .5rem; height: .5rem; border-radius: 50%;
  border: 2px solid var(--muted); background: var(--bg); display: none;
}
.entry.has-story::before { border-color: var(--accent); background: var(--accent); }
@media (min-width: 1240px) { .entry::before { display: block; } }
.entry.is-current .entry-date .d1 { color: var(--accent); }

/* archival mat: every scan and logo sits on the same white board */
.mat {
  margin: 0; background: var(--mat); border: 1px solid var(--mat-edge);
  padding: .55rem; box-shadow: 0 1px 0 var(--mat-edge);
}
.entry-thumb.mat { aspect-ratio: 4 / 3; display: block; padding: .5rem; overflow: hidden; }
.entry-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- prose ---------- */
.prose { display: grid; gap: 1.15rem; max-width: var(--measure); }
.prose > * { margin: 0; }
.prose h2 { font: 600 var(--s-3)/1.2 var(--f-body); margin-top: .75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: .35rem; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; font-style: italic; }
.prose sup { line-height: 0; }
.prose a[href^="#_ftn"] { text-decoration: none; color: var(--accent); font-variant-numeric: tabular-nums; }
.inline-img img { margin-inline: auto; }
@media (min-width: 760px) {
  .inline-img.is-small { float: right; max-width: 15rem; margin: .35rem 0 .6rem 1.5rem; }
  .prose::after { content: ""; display: block; clear: both; }
  .prose { display: block; }
  .prose > * + * { margin-top: 1.15rem; }
}

/* ---------- article ---------- */
.article { padding-block: clamp(2rem, 6vw, 4rem) 2rem; }
.article-head { display: grid; gap: .9rem; max-width: calc(var(--measure) + 64px); margin-inline: auto; }
.article-head .article-hero:not(.is-big) { justify-self: start; max-width: 15rem; }
.article-head .article-hero.is-big { margin-top: .75rem; }
.article-head .article-hero.is-big img { margin-inline: auto; max-height: 34rem; width: auto; }
@media (min-width: 900px) { .era-page .era-head { position: sticky; top: calc(var(--head-h) + 2rem); } }
.crumb { font: 700 1rem/1.3 var(--f-ui); }
.crumb a { color: var(--accent); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.article-title { font: 600 clamp(2rem, 4.6vw, 3.1rem)/1.08 var(--f-body); letter-spacing: -.015em; }
.dateline { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font: 600 1.15rem/1.2 var(--f-display); color: var(--muted); }
.dateline time { color: var(--ink); }
.source::before { content: "Source: "; font-weight: 600; }
.article-body { max-width: calc(var(--measure) + 64px); margin-inline: auto; padding-block: 1.75rem 1rem; font-size: 1.1875rem; line-height: 1.68; }
.article-body.prose { max-width: calc(var(--measure) + 64px); }
.notes { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .95rem; color: var(--muted); }
.notes h2 { font: 700 1.0625rem/1.2 var(--f-ui); margin: 0 0 .6rem; color: var(--ink); }
.notes ol { padding-left: 1.25rem; display: grid; gap: .4rem; }
.notes a { overflow-wrap: anywhere; }
.whereabouts { margin-top: 2rem; }
.whereabouts .player { border-bottom: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-block: 2rem 4rem; }
.pager a {
  display: grid; gap: .25rem; align-content: start; text-decoration: none;
  padding: 1rem 1.1rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface);
  font-size: 1.0625rem; line-height: 1.35;
}
.pager a:hover { border-color: var(--accent); color: var(--ink); }
.pager span { font: 500 .9375rem/1 var(--f-ui); color: var(--muted); }
.pager b { font: 600 1.25rem/1.1 var(--f-display); }
.pager-next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; } }

/* ---------- simple pages ---------- */
.page { padding-block: clamp(2.5rem, 6vw, 4.5rem) 4rem; display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .page:has(figure) { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 4rem; } }
.page-main { display: grid; gap: 1.5rem; min-width: 0; max-width: var(--measure); }
.page-title { font: 800 clamp(3rem, 8vw, 5.5rem)/.9 var(--f-display); }
.about-fig, .team-fig { margin: 0; display: grid; gap: .6rem; }
.team-fig { position: sticky; top: calc(var(--head-h) + 1.5rem); }
.team-fig .mat { max-height: 80vh; overflow: auto; }
figcaption { font: 500 .9375rem/1.35 var(--f-ui); color: var(--muted); }
.facts { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--rule); align-items: baseline; }
.facts b { font: 800 1.75rem/1 var(--f-display); color: var(--accent); }
.roster-h { font: 700 1.5rem/1.1 var(--f-ui); margin-top: 1rem; }
.roster { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.roster div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: .25rem 1.25rem; padding-block: .6rem; border-bottom: 1px solid var(--rule); }
.roster dt { font-weight: 600; }
.roster dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .roster div { grid-template-columns: 1fr; } }
.roster-note { color: var(--muted); font-style: italic; }
.contact-lede { font-size: 1.25rem; line-height: 1.5; }
.nf-code { font: 800 clamp(5rem, 18vw, 10rem)/.8 var(--f-display); color: var(--accent); }

/* ---------- form ---------- */
.form { display: grid; gap: 1.1rem; margin-top: .5rem; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font: 700 1rem/1.2 var(--f-ui); }
.field input, .field textarea {
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 4px; padding: .65rem .75rem; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field [aria-invalid="true"] { border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; border: 1px solid var(--accent);
  font: 700 1.125rem/1 var(--f-ui); background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1.2rem; border-radius: 4px;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { color: var(--ink); border-color: var(--ink); }
.form-status { font-size: 1rem; }
.form-status.is-ok { color: var(--ink); font-weight: 600; }
.form-status.is-err { color: var(--accent); }

/* ---------- search ---------- */
.search {
  position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--ink) 45%, transparent);
  display: grid; justify-items: center; align-items: start;
  padding: calc(env(safe-area-inset-top, 0px) + 8vh) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
}
.search-panel {
  width: min(44rem, 100%); max-height: 80vh; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 20px 60px var(--shade); overflow: hidden;
}
.search-bar { display: flex; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--rule); }
.search-bar input {
  flex: 1; min-width: 0; font: 500 1.25rem/1.2 var(--f-body); color: var(--ink);
  background: transparent; border: 0; padding: .4rem .3rem;
}
.search-bar input:focus { outline: none; }
.search-close { font: 500 1rem/1 var(--f-ui); color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .4rem .7rem; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.search-results a { display: grid; gap: .2rem; padding: .8rem 1rem; text-decoration: none; border-bottom: 1px solid var(--rule); }
.search-results a:hover, .search-results a.is-active { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); }
.sr-meta { font: 500 .875rem/1.2 var(--f-ui); color: var(--muted); }
.sr-title { font: 600 1.0625rem/1.3 var(--f-body); }
.sr-snip { font-size: .9375rem; line-height: 1.45; color: var(--muted); }
.search-results mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; }
.search-hint { padding: .8rem 1rem; color: var(--muted); font-size: .9375rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--surface); }
.foot-inner { padding-block: 2.25rem 2.75rem; display: grid; gap: 1rem; }
@media (min-width: 900px) { .foot-inner { grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 2.5rem; } }
.foot-about { max-width: 34rem; color: var(--muted); font-size: 1rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font: 600 1.125rem/1 var(--f-display); }
.foot-nav a { text-decoration: none; }
.foot-copy { font: 500 .9375rem/1 var(--f-ui); color: var(--muted); }

.ad { padding-block: 1.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .head { transition: left .18s ease-out; }
  .chapter .fill { transition: width .18s ease-out; }
  html { scroll-behavior: smooth; }
}
