/* Site-only additions on top of base.css.
   base.css defines the tokens and the newsprint table; everything here is
   about the things a multi-page site has and a single artifact did not:
   navigation, year switching, loading states, and the API panel. */

/* ---------------------------------------------------------------- nav --- */

nav.rail {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
  padding: 10px 0 0;
  font-family: "Archivo Narrow", "Arial Narrow", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
nav.rail a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
nav.rail a:hover { color: var(--ink); }
nav.rail a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
nav.rail .spacer { flex: 1; }

/* --------------------------------------------------------- year strip --- */

/* The year is the primary axis of this archive, so it gets a dedicated
   control rather than hiding in a dropdown. Each year is a separate fetch. */
.years {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 18px 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.year-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule-soft);
  padding: 9px 16px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 84px;
}
.year-btn:last-child { border-right: none; }
.year-btn:hover { background: var(--ground-soft); color: var(--ink); }
.year-btn .n {
  font-family: "Archivo Narrow", sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.year-btn[aria-pressed="true"] {
  background: var(--ground-alt);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.year-btn[aria-pressed="true"] .n { color: var(--ink-soft); }
.year-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* --------------------------------------------------------------- state --- */

.state {
  padding: 48px 0;
  text-align: center;
  color: var(--ink-muted);
  font-style: italic;
}
.state.err { color: var(--low); font-style: normal; }

/* A quiet progress bar for the "search every year" case, which has to pull
   every shard before it can answer honestly. */
.loadbar {
  height: 2px;
  background: var(--rule-soft);
  overflow: hidden;
  margin: 0 0 -2px;
}
.loadbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .18s ease-out;
}

/* --------------------------------------------------------------- table --- */

tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--ground-soft); }

/* Nine columns is a lot for a 1000px container. The wrapper scrolls, but a
   half-visible confidence column reads as broken rather than scrollable, so
   buy the width back from padding before falling back to the scrollbar. */
td { padding: 6px 9px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th { padding: 9px 9px; }
/* Venue names are short and read as labels, so give them room not to
   wrap; the bill is prose-length and wraps naturally. */
td.venue { min-width: 11em; }
td.pub, td.st, td.conf { white-space: nowrap; }
td.date, td.phone { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
td.town { font-family: "Archivo Narrow", sans-serif; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; white-space: nowrap; }
td.bands .primary { font-weight: 600; }
/* Band and venue names are links to that filter (shareable). They read as
   text until pointed at, so the table does not turn into a page of blue. */
a.flink { color: inherit; text-decoration: none; }
a.flink:hover, a.flink:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
td.phone { color: var(--ink-muted); }
.empty { padding: 40px; text-align: center; color: var(--ink-muted); font-style: italic; }

.notes-row td { background: var(--ground-soft); border-bottom: 1px solid var(--rule); }
.notes-inner { padding: 4px 2px 8px; font-size: 14px; }
.n-lab {
  display: block;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.notes-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-muted);
}
.notes-meta b { color: var(--ink-soft); font-weight: 500; }

/* ----------------------------------------------------------- about/api --- */

.prose { max-width: 66ch; }
.prose h2 {
  font-family: "Archivo Narrow", sans-serif;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 34px 0 10px;
}
.prose p { margin: 0 0 14px; }
.prose a { color: var(--ink); text-decoration-color: var(--rule); }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }

pre.code {
  background: var(--ground-soft);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 12px 14px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 18px;
}
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .9em; }

.field-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.field-table th, .field-table td {
  text-align: left;
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  font-size: 13px;
}
.field-table th {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  width: 1%;
}

footer.colophon {
  margin-top: 56px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: "Archivo Narrow", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
footer.colophon a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Evidence pills. The colour says how much the ARCHIVE can vouch for a
   record, so corroborated (two independent papers) gets the strongest
   reading and a single sighting the quietest — quiet, not alarming: much of
   the long tail is genuinely once-only, and that is the point of the project
   rather than a defect in it. */
.pill.ev-c { color: var(--high); background: var(--high-bg); }
.pill.ev-k { color: var(--high); background: var(--ground-alt); }
.pill.ev-v { color: var(--med);  background: var(--med-bg); }
.pill.ev-s { color: var(--ink-muted); background: var(--ground-alt); }

/* A single sighting is not an error. Most of the long tail is genuinely
   once-only — the Tuesday night in Dudley that no other source recorded is
   exactly what this archive exists for — so its filter chip gets a neutral
   mark rather than the red one that reads as "something went wrong". */
.conf-toggle[data-c="n"] input:checked {
  background: var(--ink-muted);
  border-color: var(--ink-muted);
}

/* The locality — "Camden Lock" behind Dingwalls, "Putney" behind the Half
   Moon. It disambiguates the name and is NOT decoration: strip it and "Red
   Lion", "Greyhound" and "Kings Head" become names nobody can place. But it
   is subordinate to the name, which is the identity, so it reads second: the
   eye takes the venue when scanning the column and finds the locality only
   when it stops.
   Deliberately not a hover. There is no hover on a phone, a tooltip cannot be
   scanned down a column, and it would not be searchable text. */
.vloc {
  color: var(--ink-muted);
  font-size: 0.86em;
  margin-left: 0.45em;
  white-space: nowrap;
}
/* Narrow screens have no room for both on one line, and the locality is the
   half that should wrap. */
@media (max-width: 720px) {
  .vloc { display: block; margin-left: 0; }
}

/* How many gigs the archive holds at this venue. A quiet superscript: it is
   context for the venue name, not a column of its own. */
.vcount {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  color: var(--ink-muted);
  vertical-align: super;
  margin-left: 4px;
}
/* Switched off by the "Venue gig counts" toggle. */
.table-wrap.no-vcount .vcount { display: none; }

/* search tips and the "show more" row (2026-09-28) */
.search-tips { margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-muted); flex-basis: 100%; }
.search-tips code { font-size: 11.5px; padding: 1px 4px; border-radius: 3px; background: var(--rule, rgba(127,127,127,.12)); color: var(--ink-soft); }
tr.more-row td { text-align: center; padding: 14px 8px; }
tr.more-row button { font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--rule, #ccc); background: transparent; color: inherit; cursor: pointer; }
tr.more-row button:hover, tr.more-row button:focus-visible { border-color: currentColor; }
.more-note { margin-left: 10px; color: var(--ink-muted); font-size: 12px; }

/* STOP THE TABLE JUMPING (2026-09-28). With automatic layout every column
   re-sized to fit each new result set, so Town and Bill slid sideways on
   every keystroke. Fixed widths keep the columns still; long names wrap.
   The min-height stops the page collapsing under the reader while a search
   narrows, which pulled the view upward mid-typing. */
table.gigs { table-layout: fixed; min-width: 860px; }
table.gigs td { overflow-wrap: anywhere; }
.c-date { width: 10%; } .c-day { width: 5%; } .c-venue { width: 21%; }
.c-town { width: 12%; } .c-bill { width: 26%; } .c-pub { width: 10%; }
.c-st { width: 7%; } .c-ev { width: 9%; }
.table-wrap { min-height: 70vh; }

/* The page follows the browser's width on big screens, and prose stays at a
   readable measure inside it. */
.page { max-width: min(1680px, 96vw); }

/* Reading pages (About, API): the TEXT sits in a centred column, because at
   full browser width a 66ch column of text left a lopsided empty half-screen.
   The frame does not: masthead, rule and menu are full width as on every
   other page, so nothing jumps when you click along the menu (Steve,
   2026-10-06: the whole page was 820px and "looks odd clicking along"). */
.page-read .prose { max-width: 820px; margin: 0 auto; }

/* GIGS, NOT LISTINGS (2026-09-28): the listing-count badge, the clash and
   venues-differ flags, and the expanded list of listings. */
.lcount { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--rule);
          border-radius: 999px; font-size: 11px; color: var(--ink-soft); white-space: nowrap;
          font-family: "Archivo Narrow", sans-serif; letter-spacing: .02em; cursor: pointer; }
.gflag { margin-left: 6px; font-size: 11px; color: var(--accent); white-space: nowrap;
         font-family: "Archivo Narrow", sans-serif; }
.gflag.soft { color: var(--ink-muted); }
.lsub { color: var(--ink-muted); font-weight: normal; }
ol.listings { margin: 6px 0 0; padding-left: 20px; }
ol.listings li { margin: 0 0 6px; line-height: 1.5; }
ol.listings .l-note { color: var(--ink-muted); font-size: 12.5px; }

/* --- stat boxes that are doorways (Named acts, Named venues) --- */
a.stat-link { color: inherit; text-decoration: none; display: block; }
a.stat-link .stat-detail { color: var(--accent); }
a.stat-link:hover, a.stat-link:focus-visible { background: var(--ground-soft); outline: none; }
a.stat-link:hover .stat-value { text-decoration: underline; text-underline-offset: 3px; }

/* --- Bands and Venues lists --- */
.list-controls { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 8px; }
/* base.css grows .search-wrap to 240px along a ROW; in this column that is a height. */
.list-controls .search-wrap { flex: none; max-width: 520px; }
.letters { display: flex; flex-wrap: wrap; gap: 3px; }
.letters button {
  font-family: "Archivo Narrow", sans-serif; font-weight: 700; font-size: 13px;
  min-width: 28px; padding: 4px 6px; border: 1px solid var(--rule); background: transparent;
  color: var(--ink); border-radius: 3px; cursor: pointer;
}
.letters button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.letters button:disabled { opacity: .3; cursor: default; }
.namelist { list-style: none; margin: 0 0 18px; padding: 0;
            columns: 3 18em; column-gap: 28px; }
.namelist li { break-inside: avoid; padding: 3px 0; border-bottom: 1px solid var(--rule-soft);
               display: flex; align-items: baseline; gap: 8px; }
.namelist a { color: inherit; text-decoration: none; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.namelist a:hover, .namelist a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.namelist .vloc { font-size: 12px; color: var(--ink-muted); }
.nl-n, .nl-y { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px;
               color: var(--ink-muted); white-space: nowrap; }
.nl-y { min-width: 6.5em; text-align: right; }
.nl-town { font-family: "Archivo Narrow", sans-serif; text-transform: uppercase; letter-spacing: .05em;
           font-size: 14px; margin: 20px 0 6px; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.nl-town a { color: inherit; text-decoration: none; }
.nl-town a:hover { text-decoration: underline; }
.list-note { font-size: 13px; color: var(--ink-muted); margin-top: 24px; }
@media (max-width: 700px) { .namelist { columns: 1; } }
/* Venues A-Z: the town rides beside the name as a small, clickable tag. */
.venuelist .nl-name { flex: 1 1 auto; min-width: 0; }
.venuelist .nl-name > a { font-weight: 600; }
.nl-town-tag { margin-left: 7px; font-family: "Archivo Narrow", sans-serif; text-transform: uppercase;
               letter-spacing: .04em; font-size: 11px; }
.nl-town-tag a { font-weight: 400 !important; color: var(--ink-muted) !important; }

/* --- The Papers page: one block per paper, years on a shared axis --- */
.papers { display: flex; flex-direction: column; gap: 26px; margin: 20px 0 8px; }
.paper { border-top: 2px solid var(--ink); padding-top: 10px; }
.paper-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.paper-head h2 { margin: 0; font-size: 26px; }
.paper-only { font-family: "Archivo Narrow", sans-serif; font-size: 14px; color: var(--accent);
              text-decoration: none; white-space: nowrap; }
.paper-only:hover, .paper-only:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.paper-about { margin: 6px 0 8px; color: var(--ink-soft); max-width: 62em; line-height: 1.5; }
.paper-nums { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: "JetBrains Mono", ui-monospace, monospace;
              font-size: 12.5px; color: var(--ink-muted); margin-bottom: 10px; }
.paper-nums b { color: var(--ink); font-weight: 500; }
.pstrip { display: grid; gap: 3px; align-items: end; width: 100%; max-width: 760px; }
.py, .pyb, .pyl { min-width: 0; }
.py { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
      height: 74px; cursor: default; }
.pyb { display: block; background: var(--accent); border-radius: 2px 2px 0 0; }
.py.py-none .pyb { background: transparent; }
.pyl { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; color: var(--ink-muted);
       text-align: center; border-top: 1px solid var(--rule); padding-top: 2px; margin-top: 1px; }
.py.py-none .pyl { opacity: .45; }
@media (max-width: 560px) { .pyl { font-size: 8.5px; } .paper-head h2 { font-size: 22px; } }
