/* Kept Hours — a two-day almanac. Bento ledger: drawn 2px rules, squared corners, one river-green accent. */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f2f0e9;
  --surface: #fbfaf6;
  --sunk: #e8e5db;
  --ink: #16201c;
  --muted: #545b55;
  --accent: #0a6b52;
  --accent-ink: #f7f5ee;
  --night: #14201b;
  --night-2: #1d2b25;
  --night-ink: #e9e6dc;
  --night-muted: #a9b0a8;
  --bright: #5ed3ae;
  --rule: 2px solid var(--ink);
  --hair: 1px solid rgba(22, 32, 28, 0.22);
  --hair-night: 1px solid rgba(233, 230, 220, 0.18);

  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 200ms;
  --controls-h: 104px;
  --hours: 13; /* replaced at runtime from the fixture's first start and last finish */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { padding-inline: var(--gutter); }
[id] { scroll-margin-top: 16px; }
#listings { scroll-margin-top: 0; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  padding: 12px 20px; background: var(--ink); color: var(--accent-ink);
  font-family: var(--f-mono); font-size: 13px; text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- Shared type ---------- */
.kicker, .hero-kicker, .field label, .field-label, .sheet-kicker, .row-cat, .eph-legend, .figs dt, .result-count {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  border: 2px solid var(--ink); border-radius: 0;
  font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ink { background: var(--ink); color: var(--accent-ink); }
.btn-bright { background: var(--bright); color: var(--night); border-color: var(--bright); }
.btn:active { transform: scale(0.97); }
.btn-bright:focus-visible { outline-color: var(--bright); }

.text-link {
  display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px;
  font-family: var(--f-display); font-weight: 500; font-size: 17px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-thickness var(--t) var(--ease), color var(--t) var(--ease);
}
.text-link:focus-visible { outline-offset: 4px; text-decoration-thickness: 3px; }
.text-link:active { transform: translateY(1px); }
.text-link-dark { color: var(--night-ink); }
.text-link-dark:focus-visible { outline-color: var(--bright); }

.count-chip {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 22px; padding-inline: 6px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: 0;
  background: var(--ink); color: var(--accent-ink);
}
.bump { animation: bump 260ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }

/* ---------- Header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--gutter); padding-block: 10px;
  border-bottom: var(--rule);
  background: var(--bg);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; color: var(--ink); transition: color var(--t) var(--ease); }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.brand:focus-visible { outline-offset: 4px; }
.brand:active .brand-mark { transform: scale(0.94); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  font-family: var(--f-display); font-weight: 500; font-size: 16px; text-decoration: none;
  border: 2px solid transparent;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav a:focus-visible { outline-offset: 0; }
.nav a:active { transform: scale(0.97); }
.nav .nav-short { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border-bottom: var(--rule);
}
.hero-a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding-block: 44px 40px;
  padding-inline: var(--gutter) 48px;
  border-right: var(--rule);
}
.hero-title { display: flex; flex-direction: column; font-weight: 400; }
.hero-kicker { color: var(--muted); margin-bottom: 12px; }
.hero-num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(132px, 16.5vw, 248px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  margin-left: -0.04em;
  animation: settle 700ms var(--ease) both;
}
.hero-month {
  margin-top: 14px;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(28px, 2.9vw, 42px); line-height: 1.05; letter-spacing: -0.03em;
  animation: settle 700ms var(--ease) 90ms both;
}
.hero-lede { max-width: 46ch; font-size: 18px; line-height: 1.6; color: var(--ink); animation: settle 700ms var(--ease) 160ms both; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } }

.hero-b {
  background: var(--night); color: var(--night-ink);
  padding-block: 36px 32px;
  padding-inline: 40px var(--gutter);
  display: flex; flex-direction: column; gap: 20px;
  min-width: 0;
}
.hero-b :focus-visible { outline-color: var(--bright); }
.eph-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.eph-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.025em; line-height: 1.1; }
.eph-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--night-muted); font-size: 11px; }
.eph-legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 10px; display: inline-block; }
.sw-on { background: var(--bright); }
.sw-out { background: var(--night-ink); opacity: 0.25; }

/* Ephemeris chart */
.eph { --lane-h: 48px; --label-w: 64px; }
.eph-axis {
  position: relative; height: 22px;
  margin-left: var(--label-w);
  font-family: var(--f-mono); font-size: 11px; color: var(--night-muted);
}
.tick { position: absolute; left: calc(var(--x) * 100%); transform: translateX(-50%); bottom: 4px; }
.tick:first-child { transform: none; }
.tick:last-child { transform: translateX(-100%); }
.eph-day { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); border-top: var(--hair-night); }
.eph-day:last-child { border-bottom: var(--hair-night); }
.eph-day-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  justify-self: start; align-self: center;
  font-family: var(--f-display); font-weight: 600; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--night-ink);
}
.eph-day-label span { color: var(--bright); }
.eph-lanes {
  position: relative;
  height: calc(var(--lanes) * var(--lane-h) + 12px);
  background-image: linear-gradient(to right, rgba(233, 230, 220, 0.13) 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%;
  border-right: 1px solid rgba(233, 230, 220, 0.13);
}
.bar {
  position: absolute;
  left: calc(var(--s) * 100%);
  width: calc(var(--w) * 100% - 3px);
  top: calc(var(--lane) * var(--lane-h) + 6px);
  height: 44px;
  display: flex; align-items: center;
  padding: 0 8px;
  border: 0; border-radius: 0;
  background: var(--night-ink); color: var(--night);
  font-family: var(--f-mono); font-size: 11px; line-height: 1.2; text-align: left;
  overflow: hidden;
  transform-origin: left center;
  animation: draw 640ms var(--ease) both;
  animation-delay: calc(240ms + var(--i) * 70ms);
  transition: opacity var(--t) var(--ease), background-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.bar-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.is-saved { background: var(--bright); }
.bar.is-saved::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--night);
}
.bar.is-out { opacity: 0.3; }
.bar.is-lit, .bar:focus-visible { transform: translateY(-3px); box-shadow: 0 3px 0 var(--bright); opacity: 1; z-index: 2; }
.bar:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.bar:active { transform: scale(0.97); }
@keyframes draw { from { transform: scaleX(0); } }

.eph-readout {
  min-height: 48px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
  font-size: 16px; line-height: 1.45; color: var(--night-muted);
  border-left: 2px solid var(--bright); padding-left: 14px;
}
.ro-time { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bright); }
.ro-title { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--night-ink); letter-spacing: -0.01em; }
.ro-hint-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .ro-hint-fine { display: none; }
  .ro-hint-touch { display: inline; }
}

.figs {
  display: grid; grid-template-columns: 1fr 1.15fr 1.5fr;
  border-top: 2px solid var(--night-ink);
  margin-top: auto;
}
.fig { padding: 16px 16px 4px 0; }
.fig + .fig { padding-left: 16px; border-left: var(--hair-night); }
.figs dt { color: var(--night-muted); font-size: 11px; }
.figs dd { font-family: var(--f-mono); font-size: 13px; color: var(--night-muted); margin-top: 4px; }
.fig-n { display: inline-block; font-family: var(--f-display); font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -0.03em; color: var(--night-ink); margin-right: 4px; }
.fig-wide .fig-n { color: var(--bright); }

/* ---------- Listings ---------- */
.listings { padding-block: 96px 112px; }
.list-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; gap: 16px 48px;
  margin-bottom: 40px;
}
.list-intro { color: var(--muted); max-width: 44ch; font-size: 17px; }

.controls {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-block: var(--rule);
  margin-bottom: 32px;
}
.controls-in {
  display: grid;
  grid-template-columns: minmax(240px, 2.2fr) minmax(180px, 1fr) auto minmax(150px, 1fr);
  align-items: end; gap: 16px 24px;
  padding-block: 14px 16px;
}
.field { display: grid; gap: 6px; position: relative; min-width: 0; }
.field label, .field-label { color: var(--muted); }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  font-family: var(--f-display); font-size: 17px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 0;
  transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field input { padding-right: 44px; }
.field input::placeholder { color: #6b716b; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 7 6-7' fill='none' stroke='%2316201c' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--ink); background-color: #fff; }
.field select:active { background-color: var(--sunk); }
.kbd {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center; width: 24px; height: 24px;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--muted);
}
.field-search:focus-within .kbd,
.field-search input:not(:placeholder-shown) ~ .kbd { opacity: 0; }

.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 0;
  font-family: var(--f-display); font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.toggle-box { width: 16px; height: 16px; border: 2px solid currentColor; position: relative; }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); }
.toggle[aria-pressed="true"] .toggle-box { background: var(--bright); border-color: var(--bright); }
.toggle[aria-pressed="true"] .count-chip { background: var(--bright); color: var(--night); }
.toggle:active { transform: scale(0.97); }
.result-count { color: var(--ink); justify-self: end; align-self: center; padding-top: 18px; text-align: right; }

.days { border: var(--rule); background: var(--ink); display: grid; gap: 2px; }
.days:not(:has(.day:not([hidden]))) { border: 0; }
.loading { background: var(--bg); padding: 32px 24px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.day {
  display: grid; grid-template-columns: 88px minmax(0, 1fr);
  background: var(--bg);
}
.day-label {
  position: sticky; top: calc(var(--controls-h) + 24px); align-self: start;
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; gap: 14px;
  padding: 24px 20px;
  font-weight: 400;
}
.day-name { font-family: var(--f-display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.day-date { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.rows { border-left: var(--rule); background: var(--surface); }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 190px 64px 44px;
  grid-template-areas: "time main where price save";
  gap: 4px 24px;
  align-items: start;
  padding-block: 22px 24px; padding-inline: 24px 20px;
  transition: background-color var(--t) var(--ease);
}
.row + .row { border-top: var(--hair); }
.row-time { grid-area: time; font-family: var(--f-mono); font-size: 15px; line-height: 1.5; padding-top: 22px; display: flex; flex-direction: column; }
.t-start { font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.t-end { color: var(--muted); }
.row-main { grid-area: main; min-width: 0; }
.row-cat { color: var(--accent); margin-bottom: 4px; }
.row-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(21px, 1.8vw, 25px); line-height: 1.15; letter-spacing: -0.02em; }
.open {
  padding: 4px 0; min-height: 44px; border: 0; background: none; text-align: left;
  font: inherit; letter-spacing: inherit; color: inherit;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 5px;
  transition: text-decoration-color var(--t) var(--ease);
}
.open::after { content: ""; position: absolute; inset: 0; }
.open:focus-visible { outline: none; text-decoration-color: var(--accent); }
.row:has(.open:focus-visible) { outline: 2px solid var(--accent); outline-offset: -4px; }
.row:has(.open:active) { background: var(--sunk); }
.row-sum { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.row-where { grid-area: where; padding-top: 22px; display: flex; flex-direction: column; font-size: 15px; line-height: 1.45; }
.row-where .venue { font-family: var(--f-display); font-weight: 500; }
.row-where .hood { color: var(--muted); }
.row-price { grid-area: price; padding-top: 22px; font-family: var(--f-mono); font-size: 15px; text-align: right; }
.row-save {
  grid-area: save; position: relative; z-index: 1;
  width: 44px; height: 44px; margin-top: 14px;
  display: grid; place-items: center;
  background: transparent; border: 2px solid var(--ink); border-radius: 0; color: var(--ink);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.row-save svg { width: 18px; height: 18px; }
.row-save[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row-save:active { transform: scale(0.94); }
.row.is-saved .row-time::after {
  content: "Saved"; margin-top: 8px; align-self: start;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 6px; background: var(--accent); color: var(--accent-ink);
}
.row.is-lit { background: #fff; }

/* Per-row hour track: the almanac's small instrument */
.row-track {
  position: relative; margin-top: 16px; height: 8px; max-width: 420px;
  background-image: linear-gradient(to right, rgba(22, 32, 28, 0.28) 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%;
  border-bottom: 1px solid rgba(22, 32, 28, 0.35);
}
.trk-seg, .trk-seg::after {
  position: absolute; top: 0; bottom: 0;
}
.trk-seg { left: calc(var(--s) * 100%); width: calc(var(--w) * 100%); background: var(--ink); }
.trk-seg::after {
  content: ""; left: 0; right: 0; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 260ms var(--ease);
}
.row.is-saved .trk-seg::after, .row:focus-within .trk-seg::after { transform: scaleX(1); }

/* Empty state */
.empty {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px 48px;
  border: var(--rule); background: var(--surface);
  padding: 40px 48px;
}
.empty-n { font-family: var(--f-display); font-weight: 700; font-size: clamp(96px, 12vw, 180px); line-height: 0.8; letter-spacing: -0.06em; color: var(--accent); }
.empty-title { font-family: var(--f-display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.empty-why { margin-block: 8px 20px; color: var(--muted); max-width: 52ch; }

/* ---------- Shortlist band ---------- */
.short { background: var(--night); color: var(--night-ink); padding-block: 128px 112px; }
.short :focus-visible { outline-color: var(--bright); }
.short-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 64px; align-items: start; }
.short-head { display: grid; gap: 16px; justify-items: start; }
.short-head .kicker { color: var(--bright); }
.short-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(48px, 7vw, 104px); line-height: 0.92; letter-spacing: -0.045em; }
.short-title:focus { outline: none; }
.short-title:focus-visible { outline: 2px solid var(--bright); outline-offset: 6px; }
.short-summary { color: var(--night-muted); font-size: 18px; max-width: 36ch; }
.short-summary strong { color: var(--night-ink); font-weight: 600; }
.short-body { border-top: 2px solid var(--night-ink); }
.s-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 4px 24px; align-items: start;
  padding-block: 20px; padding-inline: 4px;
  border-bottom: var(--hair-night);
  transition: background-color var(--t) var(--ease);
  animation: settle 300ms var(--ease) both;
}
.s-when { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bright); padding-top: 12px; line-height: 1.5; }
.s-title { font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.s-open {
  min-height: 44px; padding: 6px 0; border: 0; background: none; text-align: left;
  font: inherit; letter-spacing: inherit; color: inherit;
  text-decoration: underline; text-decoration-color: rgba(233, 230, 220, 0.35); text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color var(--t) var(--ease);
}
.s-open:focus-visible { text-decoration-color: var(--bright); }
.s-open:active { color: var(--bright); }
.s-where { color: var(--night-muted); font-size: 15px; }
.s-clash {
  margin-top: 8px; display: inline-block;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; line-height: 1.5;
  color: var(--night); background: var(--bright); padding: 3px 8px;
}
.s-remove {
  min-height: 44px; padding: 8px 14px;
  background: transparent; color: var(--night-ink);
  border: 1px solid rgba(233, 230, 220, 0.5); border-radius: 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.s-remove:active { transform: scale(0.97); }
.s-empty { padding-top: 24px; display: grid; gap: 12px; justify-items: start; max-width: 54ch; }
.s-empty p { color: var(--night-muted); font-size: 18px; }
.s-empty strong { color: var(--night-ink); font-weight: 600; }

/* ---------- Footer ---------- */
.foot { border-top: var(--rule); padding-block: 48px 40px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 24px 48px; align-items: start; }
.foot-brand { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.foot-note { color: var(--muted); font-size: 15px; max-width: 60ch; }
.foot-links { display: grid; }
.foot-links a {
  display: flex; align-items: center; min-height: 44px;
  font-family: var(--f-mono); font-size: 13px;
  text-decoration: underline; text-decoration-color: rgba(22, 32, 28, 0.35); text-underline-offset: 4px;
  transition: text-decoration-color var(--t) var(--ease);
}
.foot-links a:focus-visible { text-decoration-color: var(--accent); }
.foot-links a:active { color: var(--accent); }

/* ---------- Detail sheet ---------- */
.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(620px, 100%); max-width: 100%;
  height: 100%; max-height: 100%;
  padding: 0; border: 0; border-left: var(--rule); border-radius: 0;
  background: var(--surface); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-in 240ms var(--ease); }
.sheet::backdrop { background: rgba(20, 32, 27, 0.6); }
@keyframes sheet-in { from { opacity: 0; transform: translateX(40px); } }
.sheet-in { min-height: 100%; display: flex; flex-direction: column; }
.sheet-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 12px; padding-inline: 40px 16px;
  border-bottom: var(--rule); background: var(--bg);
}
.sheet-kicker { color: var(--accent); }
.close {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px;
  background: transparent; border: 2px solid var(--ink); border-radius: 0;
  font-family: var(--f-display); font-weight: 500; font-size: 16px;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.close span { font-size: 22px; line-height: 1; }
.close:active { transform: scale(0.97); }
.sheet-body { padding-block: 32px 40px; padding-inline: 40px; flex: 1; }
.d-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; }
.d-track {
  position: relative; height: 14px; margin-block: 28px 30px;
  background-image: linear-gradient(to right, rgba(22, 32, 28, 0.3) 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%;
  border-bottom: 2px solid var(--ink); border-right: 1px solid rgba(22, 32, 28, 0.3);
}
.d-seg {
  position: absolute; top: 0; bottom: 0; left: calc(var(--s) * 100%); width: calc(var(--w) * 100%);
  background: var(--accent); transform-origin: left center;
  animation: draw 520ms var(--ease) 120ms both;
}
.d-lbl { position: absolute; top: 20px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.d-lbl-a { left: 0; }
.d-lbl-b { right: 0; }
.d-facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); border-top: var(--rule); }
.d-facts dt, .d-facts dd { padding-block: 12px; border-bottom: var(--hair); }
.d-facts dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 15px; }
.d-facts dd { font-family: var(--f-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.d-facts dd small { font-family: var(--f-mono); font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.d-body { margin-top: 28px; display: grid; gap: 16px; max-width: 60ch; }
.d-body p { font-size: 18px; line-height: 1.65; }
.d-body p:first-child { font-size: 20px; line-height: 1.55; }
.d-body p + p { padding-left: 16px; border-left: 2px solid var(--accent); color: var(--ink); font-size: 17px; }
.d-clash { margin-top: 24px; padding: 12px 16px; background: var(--sunk); font-size: 15px; border-left: 4px solid var(--ink); }
.sheet-actions {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 16px; padding-inline: 40px;
  border-top: var(--rule); background: var(--bg);
}
.save { min-width: 236px; }
.save[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.save[aria-pressed="true"]::before { content: "✓"; color: var(--bright); }
.stepper { display: flex; gap: 8px; }
.step {
  min-height: 44px; padding: 8px 14px;
  background: transparent; border: 2px solid var(--ink); border-radius: 0;
  font-family: var(--f-display); font-weight: 500; font-size: 15px;
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.step:active { transform: scale(0.97); }
.step:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Hover (fine pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #08583f; border-color: #08583f; transform: translateY(-2px); }
  .btn-ink:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
  .btn-bright:hover { background: var(--night-ink); border-color: var(--night-ink); transform: translateY(-2px); }
  .text-link:hover { text-decoration-thickness: 3px; }
  .brand:hover .brand-mark { color: var(--accent); }
  .nav a:hover { border-color: var(--ink); background: var(--surface); }
  .nav .nav-short:hover { background: var(--ink); color: var(--accent-ink); }
  .nav .nav-short:hover .count-chip { background: var(--bright); color: var(--night); }
  .bar:hover { transform: translateY(-3px); box-shadow: 0 3px 0 var(--bright); opacity: 1; z-index: 2; }
  .field input:hover, .field select:hover { background-color: #fff; }
  .toggle:hover { background: var(--sunk); }
  .toggle[aria-pressed="true"]:hover { background: var(--night-2); }
  .row:hover { background: #fff; }
  .row:hover .open { text-decoration-color: var(--accent); }
  .row:hover .trk-seg::after { transform: scaleX(1); }
  .row-save:hover { background: var(--ink); color: var(--accent-ink); }
  .row-save[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); }
  .s-row:hover { background: var(--night-2); }
  .s-open:hover { text-decoration-color: var(--bright); }
  .s-remove:hover { background: var(--night-ink); color: var(--night); }
  .foot-links a:hover { text-decoration-color: var(--accent); }
  .close:hover, .step:not(:disabled):hover { background: var(--ink); color: var(--accent-ink); }
  .save[aria-pressed="true"]:hover { background: var(--night-2); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .row { grid-template-columns: 104px minmax(0, 1fr) 64px 44px; grid-template-areas: "time main price save" "time where price save"; }
  .row-where { padding-top: 6px; flex-direction: row; flex-wrap: wrap; gap: 0 8px; }
  .row-where .hood::before { content: "· "; }
}

@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; }
  .hero-a { border-right: 0; border-bottom: var(--rule); padding-inline: var(--gutter); }
  .hero-b { padding-inline: var(--gutter); }
  .controls { position: static; }
  .controls-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .field-search { grid-column: 1 / -1; }
  .result-count { grid-column: 1 / -1; justify-self: start; text-align: left; padding-top: 0; }
  .day-label { top: 24px; }
  .short-in { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .list-head { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { flex-direction: column; align-items: stretch; gap: 4px; padding-block: 8px 4px; }
  .nav {
    overflow-x: auto; scrollbar-width: none; gap: 4px;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter) 24px;
    padding-bottom: 6px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding-inline: 12px; }
  .nav a:first-child { padding-left: 0; }
  .hero-a { padding-block: 32px 36px; gap: 24px; }
  .hero-lede { font-size: 17px; }
  .hero-b { padding-block: 28px; }
  .eph { --label-w: 40px; }
  .eph-day-label { font-size: 12px; }
  .tick-minor { display: none; }
  .bar { padding: 0; }
  .bar-txt { display: none; }
  .figs { grid-template-columns: 1fr 1fr; }
  .fig-wide { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; border-top: var(--hair-night); }
  .fig-n { font-size: 28px; }
  .listings { padding-block: 64px 72px; }
  .list-head { margin-bottom: 28px; }
  .controls-in { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 12px; }
  .kbd { display: none; }
  .field input { padding-right: 14px; }
  .toggle { padding-inline: 12px; }
  .day { grid-template-columns: 1fr; }
  .day-label {
    position: static; writing-mode: horizontal-tb; transform: none;
    justify-content: space-between; align-items: baseline;
    padding: 14px 16px; border-bottom: var(--rule);
  }
  .day-name { font-size: 30px; }
  .rows { border-left: 0; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    grid-template-areas: "time price save" "main main main" "where where where";
    gap: 6px 12px;
    padding-block: 18px 20px; padding-inline: 16px;
  }
  .row-time { padding-top: 0; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 2px; align-self: center; }
  .t-start { font-size: 20px; }
  .row.is-saved .row-time::after { margin: 0 0 0 10px; align-self: center; }
  .row-price { padding-top: 0; align-self: center; }
  .row-save { margin-top: 0; }
  .row-where { padding-top: 2px; }
  .row-track { max-width: none; }
  .empty { grid-template-columns: 1fr; padding: 28px 20px; }
  .short { padding-block: 72px 80px; }
  .s-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when remove" "main main"; padding-inline: 0; }
  .s-when { grid-area: when; padding-top: 0; align-self: center; }
  .s-main { grid-area: main; }
  .s-remove { grid-area: remove; }
  .sheet { border-left: 0; width: 100%; }
  .sheet-top { padding-inline: 20px 12px; }
  .sheet-body { padding-block: 24px 32px; padding-inline: 20px; }
  .sheet-actions { padding-inline: 20px; padding-block: 12px; }
  .save { flex: 1 1 100%; min-width: 0; }
  .stepper { flex: 1 1 100%; }
  .step { flex: 1; }
  .d-facts { grid-template-columns: 92px minmax(0, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .bar.is-lit, .bar:focus-visible, .btn:active, .toggle:active, .row-save:active, .step:active, .close:active, .s-remove:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .bar:hover, .btn-primary:hover, .btn-ink:hover, .btn-bright:hover { transform: none; }
}
