/*
 * Aspen Show Tix — visual world.
 *
 * The Wheeler site is a BUILDING. This one is a COUNTER.
 *
 * Aspen Show Tix exists for a person with four days in Aspen who wants to know
 * what is on tonight, anywhere in town, and does not know or care which
 * organization owns which room (DESIGN-DNA → People). The form that answers
 * that question is not an arcade of arched cards; it is a counter with a
 * timetable behind it. So the marketplace deliberately does NOT inherit the
 * venue site's arcade rhythm, its fat-face display type, or its warm sandstone
 * ground, and it sets its own motif against the arch on purpose.
 *
 * THE MOTIF IS THE DATUM RULE — a hairline that fills solid in proportion to
 * how much is on. It is drawn at three scales (across the date spine, under a
 * room in the directory, along a run of dates) so a visitor learns to read one
 * mark once and then reads the whole site with it. The Wheeler's motif is the
 * round arch of an 1889 facade; this one's subject is inventory, not
 * architecture, which is why the opposite gesture is the right one. Every
 * number a datum encodes is also printed in text beside it, so the bar is never
 * the only carrier of information.
 *
 * What the two sites DO share, because they are one institution: the signature
 * gaslight amber #C8892E, the ink, Epilogue, and the accessibility bones. The
 * family resemblance is in the ink and the accent; the difference is in
 * temperature, type and rhythm.
 *
 * COLOUR TIERS — the same discipline as the Wheeler theme, RE-VERIFIED against
 * this ground rather than inherited. Two contrast failures on the venue side
 * came from reusing a dark-bay class on light paper, so every ratio below was
 * computed against #F7F8F9 and #EBEEF1 and is written next to its token:
 *
 *   TEXT-SAFE   --ink --ink-soft --ember --alpine   (all ≥ 4.5:1 on paper)
 *   UI-BOUNDARY --rule-strong                       (≥ 3:1, borders and inputs)
 *   FIELD ONLY  --accent --rule                     (fills and hairlines; the
 *                                                    amber is 2.79:1 on paper
 *                                                    and is NEVER type there)
 *
 * Type on --accent is --ink at 5.19:1. On --night the direction flips: --paper
 * at 13.85:1, and the amber becomes usable as type at 4.96:1 — the one place in
 * either theme where that is true, and the rule that makes it true is scoped to
 * .masthead, .bay--night and .colophon rather than left global.
 */

/* ---------------------------------------------------------------- fonts -- */

/*
 * One family, four jobs: the wordmark, dense dated rows, figures, and prose.
 * Bree Serif's open shapes are what keep one face readable in both timetable rows and prose, and
 * it is why this theme ships no second file — a fat display serif here would be
 * the Wheeler's voice coming out of the marketplace's mouth.
 */

@font-face {
  font-family: "Bree Serif";
  src: url("fonts/bree-serif-regular.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bree Serif";
  src: url("fonts/bree-serif-regular.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */

:root {
  /* Surfaces. Alpine near-white: the light off snow, not the light off stone. */
  --paper: #F7F8F9;
  --paper-raised: #FFFFFF;
  --band: #EBEEF1;
  --night: #1B2A33;

  /* TEXT-SAFE — verified against --paper and --band, the tighter of the two */
  --ink: #33201C;        /* 14.48:1 paper · 13.22:1 band — shared with the Wheeler */
  --ink-soft: #59636B;   /*  5.77:1 paper ·  5.27:1 band — cool secondary, meta   */
  --ember: #8A5A12;      /*  5.56:1 paper ·  5.08:1 band — amber at text weight   */
  --alpine: #2F6280;     /*  6.21:1 paper ·  5.67:1 band — rooms, state, on sale  */

  /* UI-BOUNDARY — 3:1 minimum, for any edge a visitor has to be able to see */
  --rule-strong: #7F8991; /* 3.35:1 paper · 3.06:1 band                          */

  /* FIELD ONLY — fills and hairlines. Never type on a light ground. */
  --accent: #B44F62;     /* field accent; type on it is --ink.                  */
  --rule: #D5DBE1;       /* 1.31:1 — decorative hairline, never a control edge   */

  /* Type. One family; the display voice is weight and tracking, not a face. */
  --body: "Bree Serif", Georgia, "Times New Roman", serif;

  /*
   * A narrower ramp than the Wheeler's. A fat face wants to be enormous; a
   * grotesque set at 800 with tight tracking wants to stay in a range where the
   * tracking still reads, so the top of this scale stops well below the venue
   * site's.
   */
  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.80rem + 0.14vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.20vw, 1.12rem);
  --step-1: clamp(1.19rem, 1.12rem + 0.34vw, 1.42rem);
  --step-2: clamp(1.42rem, 1.30rem + 0.58vw, 1.80rem);
  --step-3: clamp(1.69rem, 1.50rem + 0.94vw, 2.28rem);
  --step-4: clamp(2.01rem, 1.72rem + 1.45vw, 2.89rem);
  --step-5: clamp(2.39rem, 1.95rem + 2.19vw, 3.66rem);

  /* Rhythm. Flatter and faster than the Wheeler's bays, on purpose. */
  --measure: 62ch;
  --gutter: clamp(1rem, 0.8rem + 1.2vw, 2rem);
  --stack: clamp(2rem, 1.5rem + 2.4vw, 3.75rem);
  --shell: 82rem;

  --datum-height: 3px;
  --radius: 3px;
}

/* ----------------------------------------------------------------- base -- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

/*
 * The display voice: heavy weight, tight tracking, tight leading. This is the
 * whole reason one family can carry two registers.
 */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.024em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.014em; }

h4, h5, h6 {
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: 0.002em;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p, ul, ol, dl { margin: 0 0 1rem; }
p { max-width: var(--measure); }

a { color: var(--ember); text-underline-offset: 0.18em; text-decoration-thickness: from-font; }
a:hover { color: var(--ink); }

/*
 * One focus treatment everywhere. --ink clears 5:1 against every surface in
 * this palette except --night, where the rules below flip it to --paper, so a
 * focus ring is never the thing that fails an audit.
 */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.masthead :focus-visible,
.colophon :focus-visible,
.bay--night :focus-visible { outline-color: var(--paper); }

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

/*
 * Figures are tabular by default: a timetable whose times do not line up is not
 * a timetable. Epilogue carries real tabular figures, so this costs nothing.
 */
time,
.num,
.spine__count,
.listing__when,
.room__count,
.tally dd { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  font-weight: 600;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ----------------------------------------------------------- the motif -- */

/*
 * The datum, drawn in SVG by showtix_datum(). A track (the busiest bucket), a
 * solid fill (this bucket) and a notch at the halfway mark that turns "some
 * amber" into a reading. Decorative by contract — the number it encodes is
 * always printed next to it — so the element is aria-hidden in markup and every
 * colour below is FIELD tier, never type.
 *
 * The 120x6 viewBox is stretched to the row rather than scaled, so a bar is the
 * same 3px hairline whether it sits in a 10rem spine chip or a full-width rail
 * row. That is why the mark reads as one mark at three scales.
 */
.datum {
  display: block;
  width: 100%;
  height: var(--datum-height);
  overflow: hidden;
}

.datum__track { fill: var(--rule); }
.datum__fill { fill: var(--accent); }

/* The halfway reference, drawn over the fill so it survives a long bar. */
.datum__half { fill: var(--paper); }

/*
 * Zero is a reading, not a gap. An empty bucket still draws the floor tick
 * (SHOWTIX_DATUM_FLOOR), greyed to the UI-boundary tone rather than ambered:
 * amber at any width would state that something is on sale.
 */
.datum[data-empty="true"] .datum__fill { fill: var(--rule-strong); }

/* The rule at full width, closing the masthead. Same mark, page scale. */
.datum-rule {
  height: var(--datum-height);
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, var(--accent) 0 38%, rgb(200 137 46 / 0.28) 38% 100%);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}

/* -------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--band); color: var(--ink); }

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn--quiet { border-color: var(--rule-strong); font-weight: 600; }

.colophon .btn,
.bay--night .btn { border-color: var(--paper); color: var(--paper); }
.colophon .btn:hover,
.bay--night .btn:hover { background: var(--paper); color: var(--ink); }

/* ------------------------------------------------------------- masthead -- */

.proto-banner {
  margin: 0;
  padding: 0.5rem var(--gutter);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  text-align: center;
  max-width: none;
}

.masthead {
  background: var(--night);
  color: var(--paper);
}

.masthead a { color: var(--paper); }
.masthead a:hover { color: var(--accent); }   /* 4.96:1 on --night */

.masthead .shell { padding-block: 0.9rem 1rem; }

/*
 * The omnibox gets its own row (see header.php). On a marketplace, search is
 * the primary act rather than one way in among several, so it is given the full
 * measure instead of a slot between the wordmark and a status chip.
 */
.masthead__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem var(--gutter);
  margin-bottom: 0.85rem;
}

.brand {
  display: block;
  text-decoration: none;
}

.brand__name {
  display: block;
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand__sub {
  display: block;
  font-size: var(--step--2);
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--paper);
  margin-top: 0.3rem;
}

/* ------------------------------------------------------------ box office -- */

.boxoffice {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.45rem;
  margin: 0;
  max-width: none;
  font-size: var(--step--1);
  text-align: right;
  justify-content: flex-end;
}

.boxoffice__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--rule-strong);
  flex: none;
  align-self: center;
}

.boxoffice[data-open="yes"] .boxoffice__dot { background: var(--accent); }

.boxoffice__state { font-weight: 650; }
.boxoffice > a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ------------------------------------------------------------------ nav -- */

.nav-disclosure > summary { display: none; }

.nav-disclosure[data-collapsible="true"] > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--paper);
  border-radius: var(--radius);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.nav-disclosure[data-collapsible="true"] > summary::-webkit-details-marker { display: none; }

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem var(--gutter);
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgb(247 248 249 / 0.22);
}

.primary-nav ul,
.utility-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a,
.utility-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  text-decoration: none;
}

.primary-nav a {
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: -0.008em;
}

.primary-nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--accent); }

.utility-nav a { font-weight: 500; font-size: var(--step--1); }

@media (max-width: 46rem) {
  .masthead__top { flex-direction: column; }
  .boxoffice { text-align: left; justify-content: flex-start; }
  .nav-row { flex-direction: column; align-items: stretch; }
}

/* ----------------------------------------------------------------- lede -- */

/*
 * No photograph, no arch, no hero image. The marketplace's opening statement is
 * the state of its own inventory: a claim, the counts behind it, and then the
 * spine. Deliberately flat — this is the "filter-first" rhythm DESIGN-DNA
 * commits this site to, and a full-bleed image here would be the venue site's
 * gesture wearing the marketplace's name.
 */
.lede {
  padding-block: var(--stack) calc(var(--stack) * 0.55);
}

.lede__inner {
  display: grid;
  gap: 1.5rem var(--gutter);
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: end;
}

.lede h1 { margin-bottom: 0.35rem; }

.lede__claim {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 40ch;
}

@media (max-width: 52rem) {
  .lede__inner { grid-template-columns: 1fr; align-items: start; }
}

/* --------------------------------------------------------------- tally -- */

.tally {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 0;
  padding: 0;
}

.tally > div { min-width: 6.5rem; }

.tally .datum { margin-bottom: 0.6rem; }

.tally dt {
	display: block;
	margin: 0 0 0.25rem;
	font-size: var(--step--1);
	font-weight: 650;
	color: var(--ink-soft);
	letter-spacing: 0.01em;
	line-height: 1.3;
}

.tally dd {
	display: block;
  margin: 0;
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ---------------------------------------------------------------- spine -- */

/*
 * The date spine — the marketplace's one wayfinding control, and its signature
 * interaction. Three horizons over the same catalogue, each carrying the real
 * number of performances inside it, the number of rooms they are spread across,
 * and the real dates it covers. Every one is a server-rendered route that works
 * with JavaScript off.
 *
 * A zero is printed and marked rather than hidden. "Nothing tonight, four
 * things this weekend" is the most useful sentence this site can say to a
 * visitor with four days in Aspen, and a control that dropped its empty buckets
 * could not say it.
 */
.spine {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-block: 1px solid var(--rule-strong);
  padding-block: 0.75rem;
}

.spine__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spine__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 10rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}

a.spine__item:hover { background: var(--band); color: var(--ink); }

.spine__item[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.spine__item[aria-current="page"] .spine__meta { color: var(--band); }

/*
 * On the ink chip the datum's ground flips: the track lifts off the dark field
 * and the halfway notch is cut in the chip's own colour rather than in paper.
 */
.spine__item[aria-current="page"] .datum__track { fill: rgb(247 248 249 / 0.3); }
.spine__item[aria-current="page"] .datum__half { fill: var(--ink); }
.spine__item[aria-current="page"] .datum[data-empty="true"] .datum__fill { fill: var(--band); }

.spine__item[data-empty="true"] { border-style: dashed; }

.spine__label { font-weight: 700; letter-spacing: -0.01em; }

.spine__count { font-weight: 800; }

.spine__meta {
  font-size: var(--step--2);
  color: var(--ink-soft);
  line-height: 1.35;
}

.spine__range {
  margin: 0.75rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: none;
}

/* -------------------------------------------------------------- listing -- */

/*
 * The events index. Dated rows in fixed columns — a timetable, not a card grid.
 * The venue column is a first-class field rather than a caption, because on
 * this site "where" is a question the visitor is genuinely asking and on the
 * venue site it never is.
 */
.listing {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-strong);
}

/*
 * Named areas, not bare columns. The row has FIVE children — when, what, tags,
 * where, go — and a four-column track list silently wrapped the fifth onto an
 * implicit second row, which is why the "Dates and tickets" button landed under
 * the date on some rows and at the right margin on others. Areas make the
 * placement explicit and a new child a visible mistake instead of a silent one.
 */
.listing__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) 13rem 11rem;
  grid-template-areas:
    "when what  where go"
    "when tags  where go";
  gap: 0.15rem var(--gutter);
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.listing__row > .listing__when { grid-area: when; }
.listing__row > .listing__what { grid-area: what; }
.listing__row > .listing__tags { grid-area: tags; }
.listing__row > .listing__where { grid-area: where; }
.listing__row > .listing__go { grid-area: go; align-self: start; }

.listing__row:hover { background: var(--paper-raised); }

.listing__when {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: var(--step--1);
  max-width: none;
}

.listing__date { font-weight: 800; letter-spacing: -0.01em; }
.listing__time { color: var(--ink-soft); }

.listing__what {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.016em;
  line-height: 1.2;
}

.listing__what a { color: var(--ink); text-decoration: none; }
.listing__what a:hover { color: var(--ember); text-decoration: underline; }

.listing__tags {
  margin: 0.3rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 54ch;
}

.listing__where { margin: 0; font-size: var(--step--1); max-width: none; }
.listing__where a { color: var(--alpine); }

.listing__run {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--step--2);
  color: var(--ink-soft);
}

.listing__go { justify-self: end; }

@media (max-width: 62rem) {
  .listing__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "when  when"
      "what  what"
      "tags  tags"
      "where go";
    align-items: end;
    gap: 0.25rem var(--gutter);
  }
  .listing__when { flex-direction: row; gap: 0.5rem; }
  .listing__row > .listing__go { align-self: end; }
}

/* ---------------------------------------------------------------- rooms -- */

/*
 * The directory, grouped by town, up-valley first. A visitor deciding what to
 * see tonight is really deciding how far they are willing to drive, which is
 * the one kind of site where geography beats the alphabet.
 */
.town { margin-bottom: var(--stack); }

.town__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule-strong);
}

.town__head h2 { margin: 0; font-size: var(--step-2); }

.town__count { font-size: var(--step--1); color: var(--ink-soft); font-weight: 650; }

/*
 * Real gaps and per-card borders rather than the 1px-gap-over-a-tinted-parent
 * trick. That trick leaves the last row's unfilled tracks showing the parent
 * colour, so a directory of seventeen rooms in a four-across grid ended with a
 * large grey rectangle that read as a broken card.
 */
.rooms {
  display: grid;
  gap: 1px 1px;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}

.room {
  background: var(--paper-raised);
  outline: 1px solid var(--rule);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.room[data-empty="true"] { background: var(--band); }

.room__name { margin: 0; font-size: var(--step-1); line-height: 1.15; }
.room__name, .room__address, .room__state { min-width: 0; overflow-wrap: anywhere; }
.room__name a { color: var(--ink); text-decoration: none; }
.room__name a:hover { color: var(--ember); text-decoration: underline; }

.room__address {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-style: normal;
  max-width: none;
}

.room__state {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 650;
  max-width: none;
}

.room__state[data-on-sale="yes"] { color: var(--alpine); }
.room__state[data-on-sale="no"] { color: var(--ink-soft); font-weight: 600; }

.room__count { font-weight: 800; }

/* ----------------------------------------------------------------- rail -- */

/*
 * THE VENUE RAIL — the datum at its widest scale, and the one graphic on this
 * site that argues the bid.
 *
 * Three templates draw it (the front page across all seventeen rooms, a room
 * page with one of them marked, the directory one scale up across towns) and
 * all three go through showtix_render_rail()/showtix_render_town_rail(), so the
 * shape can never fork. It lives in theme.css rather than a page-<slug>.css
 * because taxonomy-venue.php has no route slug of its own to load one from.
 *
 * A row is a link with a bar under it, not a bar with a caption: every room on
 * this graphic is a place a visitor can go, so the whole row is one target at
 * least 44px tall. The bar is aria-hidden and the count is printed in the row,
 * which is the contract every drawing of the datum keeps.
 */
.rail {
  margin: 1.5rem 0 0;
}

.rail__caption {
  margin: 0 0 0.9rem;
  max-width: var(--measure);
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.5;
}

.rail__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.rail__row { border-bottom: 1px solid var(--rule); }

.rail__link {
  display: block;
  min-height: 2.75rem;
  padding: 0.6rem 0.5rem 0.65rem;
  color: var(--ink);
  text-decoration: none;
}

a.rail__link:hover { background: var(--paper-raised); color: var(--ink); }
a.rail__link:hover .rail__name { text-decoration: underline; }

.rail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.1rem 0.9rem;
  margin-bottom: 0.45rem;
}

.rail__name {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.rail__count {
  flex: 0 0 auto;
  font-size: var(--step--1);
  color: var(--alpine);
  font-weight: 650;
}

.rail__count .num { font-weight: 800; font-size: var(--step-0); }

/* A quiet room states its zero in the secondary tone, never in the amber. */
.rail__row[data-empty="true"] .rail__count { color: var(--ink-soft); }

/*
 * The room whose own page this is. Marked with a rule and a word, not with
 * colour alone, and rendered as a non-link so the page never offers itself as
 * a way out of itself.
 */
.rail__row[data-here="true"] {
  background: var(--paper-raised);
  box-shadow: inset 0.25rem 0 0 var(--ink);
}

.rail__row[data-here="true"] .rail__link { padding-left: 0.95rem; }

.rail__here {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);          /* 5.56:1 paper · 5.08:1 band — text tier */
}

/* ------------------------------------------------------------- sections -- */

.bay { padding-block: var(--stack); }

.bay--band { background: var(--band); }

.bay--night {
  background: var(--night);
  color: var(--paper);
}

.bay--night h2,
.bay--night h3 { color: var(--paper); }
.bay--night a { color: var(--paper); }
.bay--night a:hover { color: var(--paper); }
.bay--night .eyebrow { color: var(--paper); }

.bay__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.bay__head h2 { margin: 0; }

/* --------------------------------------------------------------- prose -- */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose li { margin-bottom: 0.35rem; }

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--band);
  border-left: var(--datum-height) solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- empty state -- */

.empty {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.empty h2 { font-size: var(--step-2); }
.empty p { color: var(--ink-soft); }

/* -------------------------------------------------------------- omnibox -- */

.omnibox {
  position: relative;
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

.omnibox__input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
}

.omnibox__input::placeholder { color: var(--ink-soft); opacity: 1; }

.omnibox__btn {
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.omnibox__btn:hover { background: var(--paper); border-color: var(--paper); }

.omnibox__results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  max-height: min(62vh, 30rem);
  overflow-y: auto;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgb(27 42 51 / 0.24);
}

.omnibox__results[hidden] { display: none; }

.omnibox__group {
  padding: 0.5rem 0.8rem 0.25rem;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  margin: 0;
}
.omnibox__group:first-child { border-top: 0; }

.omnibox__option {
  display: block;
  padding: 0.5rem 0.8rem;
  min-height: 2.5rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.omnibox__option:hover,
.omnibox__option[aria-selected="true"] { background: var(--band); }

.omnibox__option em { font-style: normal; font-weight: 700; }

.omnibox__meta {
  display: block;
  font-size: var(--step--2);
  color: var(--ink-soft);
}

.omnibox__empty { padding: 0.8rem; color: var(--ink-soft); font-size: var(--step--1); }

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

.colophon {
  margin-top: var(--stack);
  padding-block: var(--stack) 1.5rem;
  background: var(--night);
  color: var(--paper);
  border-top: var(--datum-height) solid var(--accent);
}

.colophon a { color: var(--paper); }
.colophon a:hover { color: var(--paper); }

.colophon__grid {
  display: grid;
  gap: 1.75rem var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.colophon p { max-width: 38ch; }

.colophon__head {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 0.7rem;
  padding-top: 0.6rem;
  border-top: var(--datum-height) solid var(--accent);
}

.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 0.2rem; }
.colophon li a { display: inline-flex; align-items: center; min-height: 2.25rem; }

.colophon__legal {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(247 248 249 / 0.2);
  font-size: var(--step--1);
}

.colophon__legal p { margin: 0 0 0.25rem; max-width: none; }

/* ------------------------------------------------------- reduced motion -- */

@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;
  }
  .spine { position: static; }
}
