@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-display: swap;
}
@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: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ink: #0d0f0c;
  --ink-2: #141712;
  --panel: #1a1e17;
  --paper: #f2f1e5;
  --paper-dim: #e4e2d2;
  --text: #f2f1e5;
  --muted: #a9ae9d;
  --line: rgba(242, 241, 229, 0.16);
  --line-strong: rgba(242, 241, 229, 0.32);
  --lime: #d8ff4a;
  --lime-deep: #b4da27;
  --light-text: #12140f;
  --light-muted: #5b6053;
  --light-line: rgba(18, 20, 15, 0.18);
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --gutter: clamp(20px, 2.2vw, 32px);
  --width: 1360px;
  --header-h: 68px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }

button, input, select { font: inherit; }

button { color: inherit; }

a { color: inherit; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  background: rgba(13, 15, 12, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  grid-template-columns: 5px 5px;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--lime);
}
.brand-mark span { display: block; width: 5px; height: 18px; background: var(--lime); }
.brand-mark span:last-child { height: 11px; align-self: end; }

.masthead-edition {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.masthead-slash { color: var(--lime); }

.masthead-shortlist {
  margin: 0;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.masthead-shortlist #headerSavedCount {
  color: var(--ink);
  background: var(--lime);
  padding: 1px 6px 2px;
  font-weight: 600;
  min-width: 26px;
  text-align: center;
}
.masthead-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

/* ---------- hero ---------- */

.hero {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(40px, 4.6vw, 70px) var(--gutter) clamp(38px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  border-top: 1px solid transparent;
}

.eyebrow {
  margin: 0 0 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(216, 255, 74, 0.13);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 8.1vw, 124px);
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  max-width: 12ch;
}
.hero-accent {
  color: var(--lime);
  -webkit-text-stroke: 0;
}

.hero-intro {
  margin: 30px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(16px, 1.28vw, 18.5px);
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  gap: 0;
}
.hero-stats > div {
  padding-right: clamp(20px, 3vw, 42px);
  margin-right: clamp(20px, 3vw, 42px);
  border-right: 1px solid var(--line);
}
.hero-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-stats dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 2.7vw, 42px);
  line-height: 1;
}

.hero-art { margin: 0; position: relative; }

.art-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 9px;
  background: var(--ink-2);
}
.art-frame img {
  width: 100%;
  height: clamp(340px, 36vw, 500px);
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(0.82) contrast(1.04);
}
.art-index {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 9px;
}
.art-stamp {
  position: absolute;
  right: -1px;
  bottom: -1px;
  background: var(--ink);
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
}
.hero-art figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: 42ch;
}

/* ---------- programme ---------- */

.programme {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(44px, 5vw, 68px) var(--gutter) clamp(64px, 7vw, 110px);
}

.programme-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}
.programme-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 4.9vw, 74px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.programme-head p {
  margin: 0 0 6px;
  max-width: 48ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  justify-self: end;
}

/* controls */

.controls {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(190px, 0.7fr) auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 0;
}

.control {
  background: var(--ink-2);
  padding: 14px 18px 16px;
  min-width: 0;
}
.control label,
.control-label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg {
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.6;
  pointer-events: none;
}
.input-wrap input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  padding: 5px 8px 8px 30px;
  appearance: none;
}
.input-wrap input::placeholder { color: #7d8274; opacity: 1; }
.input-wrap input::-webkit-search-cancel-button { filter: invert(1); }
.input-wrap input:focus { outline: none; border-bottom-color: var(--lime); }
.input-wrap:focus-within svg { stroke: var(--lime); }

.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  padding: 5px 28px 8px 0;
  appearance: none;
  cursor: pointer;
}
.select-wrap select:focus { outline: none; border-bottom-color: var(--lime); }
.select-wrap svg {
  position: absolute;
  right: 2px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.6;
  pointer-events: none;
}
.select-wrap option { background: var(--ink-2); color: var(--text); }

.control-saved { display: flex; flex-direction: column; justify-content: flex-start; }
.saved-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.saved-filter:hover { border-color: var(--lime); }
.saved-filter-dot {
  width: 9px;
  height: 9px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  transition: background 140ms ease, border-color 140ms ease;
}
.saved-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: rgba(242, 241, 229, 0.08);
  color: var(--text);
  font-size: 10.5px;
}
.saved-filter[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.saved-filter[aria-pressed="true"] .saved-filter-dot {
  background: var(--ink);
  border-color: var(--ink);
}
.saved-filter[aria-pressed="true"] .saved-filter-count {
  background: rgba(13, 15, 12, 0.16);
  color: var(--ink);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.results-bar p {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.reset-link {
  border: 0;
  background: transparent;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.reset-link:hover { border-bottom-color: var(--lime); }

/* list */

.day { margin-top: 14px; }
.day-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.day-head h3 {
  margin: 0;
  font-family: inherit;
  font-weight: 500;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--text);
  white-space: nowrap;
}
.day-head h3 span { color: var(--lime); }
.day-rule { flex: 1; height: 1px; background: var(--line); }
.day-count { white-space: nowrap; }

.item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 92px 120px minmax(0, 1fr) 186px 48px;
  align-items: center;
  gap: clamp(14px, 1.7vw, 26px);
  padding: 18px 12px 18px 2px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.day .item:last-child { border-bottom: 1px solid var(--line); }
.item:hover { background: rgba(242, 241, 229, 0.035); }
.item:hover .item-thumb img { filter: saturate(1) contrast(1.02); transform: scale(1.035); }
.item:hover .open-item { background: var(--lime); border-color: var(--lime); color: var(--ink); }

.item-index {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--lime);
  align-self: start;
  padding-top: 3px;
}
.item-index::before { content: "/"; color: rgba(216, 255, 74, 0.35); margin-right: 2px; }

.item-time {
  align-self: start;
  padding-top: 1px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--text);
}
.item-time span { display: block; }
.item-time .time-end { color: var(--muted); }
.item-time .time-end::before { content: "→ "; color: var(--lime); }

.item-thumb {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  aspect-ratio: 3 / 2;
  width: 100%;
}
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.03) brightness(0.92);
  transition: filter 220ms ease, transform 320ms ease;
}

.item-main { min-width: 0; }
.item-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.cat-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid rgba(216, 255, 74, 0.42);
  padding: 2px 7px 3px;
}
.price-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 0;
}
.price-badge.is-free { color: var(--text); }
.saved-flag {
  display: none;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lime);
  padding: 2px 7px 3px;
}
.item.is-saved .saved-flag { display: inline-flex; }

.item h4 {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.item-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  max-width: 58ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  align-self: start;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.item-meta span { display: block; }
.item-meta .meta-venue { color: var(--text); }
.item-meta .meta-mobile-time { display: none; }

.open-item {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.open-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.open-item:hover { transform: translateX(2px); }

/* empty */

.empty-state {
  margin-top: 22px;
  border: 1px dashed var(--line-strong);
  padding: clamp(30px, 5vw, 64px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.empty-state[hidden] { display: none; }
.empty-index {
  margin: 0;
  grid-row: span 3;
  font-family: var(--display);
  font-size: clamp(86px, 12vw, 168px);
  line-height: 0.8;
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 255, 74, 0.5);
}
.empty-state h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
}
.empty-state p {
  margin: 10px 0 20px;
  color: var(--muted);
  max-width: 48ch;
}
.empty-reset {
  width: fit-content;
  border: 1px solid var(--lime);
  background: var(--lime);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 16px;
  cursor: pointer;
}
.empty-reset:hover { background: var(--paper); border-color: var(--paper); }

/* shortlist strip */

.shortlist {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(36px, 4vw, 58px) var(--gutter) clamp(50px, 6vw, 84px);
  border-top: 1px solid var(--line);
}
.shortlist[hidden] { display: none; }
.shortlist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
  margin-bottom: 20px;
}
.shortlist h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
}
.shortlist-head p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.shortlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.shortlist-chips button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  padding: 9px 13px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.shortlist-chips button:hover { border-color: var(--lime); }
.shortlist-chips .chip-index {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--lime);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  padding: 34px var(--gutter) 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
}
.footer-mark {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--lime);
  color: var(--lime);
  padding: 7px 8px;
  letter-spacing: 0.04em;
}
.footer-note {
  margin: 0;
  max-width: 82ch;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.footer-top {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.footer-top:hover { color: var(--lime); border-color: var(--lime); }

/* ---------- detail ---------- */

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  background: rgba(5, 7, 4, 0.72);
  backdrop-filter: blur(6px);
  animation: fade-in 180ms ease both;
}

.detail-panel {
  position: relative;
  width: min(880px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--light-text);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.4);
  animation: panel-in 280ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.detail-panel :focus-visible { outline-color: #2f4a00; outline-offset: 3px; }

.detail-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 46px);
  background: rgba(242, 241, 229, 0.94);
  border-bottom: 1px solid var(--light-line);
  backdrop-filter: blur(10px);
}
.detail-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-muted);
}
.detail-kicker strong { color: var(--light-text); font-weight: 600; }
.close-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--light-text);
  background: transparent;
  color: var(--light-text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
}
.close-detail svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.close-detail:hover { background: var(--light-text); color: var(--paper); }

.detail-inner { padding: 0 clamp(20px, 4vw, 46px) 54px; }

.detail-heading { padding: clamp(26px, 3vw, 38px) 0 22px; }
.detail-tags { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.detail-tags-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detail-heading-action { flex: 0 0 auto; }
.detail-heading-action .save-item { padding: 10px 14px; font-size: 10.5px; }
.detail-heading-action .save-item svg { width: 14px; height: 14px; }
.detail-tags .cat-badge { color: var(--light-text); border-color: var(--light-text); }
.detail-tags .price-badge { color: var(--light-muted); }
.detail-tags .price-badge.is-free { color: var(--light-text); }
.detail-saved-chip {
  display: none;
  align-items: center;
  gap: 5px;
  background: var(--light-text);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px 3px;
}
.detail-saved-chip.is-visible { display: inline-flex; }

.detail-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  max-width: 18ch;
}

.detail-figure { margin: 0 0 26px; }
.detail-figure img {
  width: 100%;
  height: clamp(220px, 30vw, 330px);
  object-fit: cover;
  filter: saturate(0.85);
  border: 1px solid var(--light-line);
}
.detail-figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--light-muted);
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--light-line);
  border: 1px solid var(--light-line);
  margin: 0 0 28px;
}
.detail-fact { background: var(--paper); padding: 14px 15px 16px; }
.detail-fact dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--light-muted);
  margin-bottom: 5px;
}
.detail-fact dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 500;
}
.detail-fact dd span { display: block; font-weight: 400; color: var(--light-muted); font-size: 12.5px; margin-top: 2px; }

.detail-body {
  border-top: 1px solid var(--light-line);
  padding-top: 24px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
}
.detail-body h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--light-muted);
  padding-top: 6px;
}
.detail-prose p {
  margin: 0 0 16px;
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.62;
  max-width: 62ch;
}
.detail-prose p:last-child { margin-bottom: 0; }

.detail-access {
  margin-top: 24px;
  border-left: 3px solid var(--light-text);
  padding: 2px 0 2px 16px;
}
.detail-access h3 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--light-muted);
}
.detail-access p { margin: 0; font-size: 14.5px; line-height: 1.55; max-width: 62ch; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--light-line);
}
.detail-keep-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light-muted);
}
.save-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--light-text);
  background: var(--light-text);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.save-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.save-item:hover { background: #000; border-color: #000; }
.save-item[aria-pressed="true"] {
  background: transparent;
  color: var(--light-text);
}
.save-item[aria-pressed="true"] svg { fill: var(--light-text); }
.save-item[aria-pressed="true"]:hover { background: rgba(18, 20, 15, 0.06); }
.detail-back {
  border: 0;
  border-bottom: 1px solid var(--light-line);
  background: transparent;
  color: var(--light-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 0;
  cursor: pointer;
}
.detail-back:hover { color: var(--light-text); border-color: var(--light-text); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-in { from { transform: translateX(38px); } to { transform: translateX(0); } }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .item {
    grid-template-columns: 48px 82px 104px minmax(0, 1fr) 48px;
  }
  .item-meta { display: none; }
  .item-meta .meta-mobile-time { display: block; }
  .controls { grid-template-columns: minmax(0, 1.4fr) minmax(170px, 0.7fr) auto; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --header-h: 60px; }

  .masthead { grid-template-columns: 1fr auto; }
  .masthead-edition { display: none; }
  .masthead-shortlist { grid-column: 2; }
  .brand { font-size: 18px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-top: 40px;
  }
  .hero h1 { font-size: clamp(54px, 13.5vw, 100px); max-width: 12ch; }
  .hero-intro { margin-top: 24px; }
  .hero-stats { margin-top: 30px; }
  .hero-art { order: 2; width: 100%; }
  .art-frame img { height: clamp(260px, 56vw, 420px); object-position: center 45%; }

  .programme-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .programme-head p { justify-self: start; }

  .controls {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .control-search { grid-column: 1 / -1; }
  .control-saved { grid-column: 1 / -1; }
  .control-saved { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; padding-top: 12px; padding-bottom: 12px; }
  .control-saved .control-label { margin-bottom: 0; }

  .item {
    grid-template-columns: 34px 76px minmax(0, 1fr) 42px;
    gap: 12px;
    padding: 16px 8px 16px 2px;
  }
  .item-index { grid-column: 1; grid-row: 1; font-size: 13px; padding-top: 2px; }
  .item-thumb { grid-column: 2; grid-row: 1 / span 2; aspect-ratio: 1; align-self: start; }
  .item-time { display: none; }
  .item-main { grid-column: 3; grid-row: 1; }
  .open-item { grid-column: 4; grid-row: 1 / span 2; align-self: center; width: 40px; height: 40px; }
  .item-meta { display: block; grid-column: 3; grid-row: 2; padding-top: 5px; }
  .item h4 { font-size: 18px; }
  .item-summary { font-size: 13.5px; -webkit-line-clamp: 2; }
  .item-meta .meta-mobile-time { display: inline; }

  .detail-panel { width: 100%; }
  .detail-body { grid-template-columns: 1fr; gap: 8px; }
  .detail-body h3 { padding-top: 0; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .site-footer { grid-template-columns: auto 1fr; }
  .footer-top { grid-column: 2; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-stats > div { padding-right: 18px; margin-right: 18px; }
  .hero-stats dt { font-size: 9.5px; }
  .art-stamp { display: none; }

  .controls { grid-template-columns: 1fr; }
  .control-search, .control-saved { grid-column: auto; }
  .control-filter { display: block; }

  .results-bar { align-items: flex-start; flex-direction: column; gap: 6px; padding: 12px 2px; }

  .item {
    grid-template-columns: 28px 64px minmax(0, 1fr) 38px;
    gap: 10px;
    padding: 15px 4px 15px 0;
  }
  .item-thumb { aspect-ratio: 1; }
  .item-main { grid-column: 3; }
  .item-summary { display: none; }
  .item-meta { display: block; font-size: 10.5px; line-height: 1.5; }
  .item-meta .meta-mobile-time { display: block; }
  .open-item { width: 36px; height: 36px; }
  .open-item svg { width: 15px; height: 15px; }

  .empty-state { grid-template-columns: 1fr; }
  .empty-index { grid-row: auto; margin-bottom: 10px; font-size: 88px; }

  .detail-top { padding: 12px 18px; }
  .detail-inner { padding: 0 18px 44px; }
  .detail-heading h2 { font-size: clamp(34px, 10vw, 46px); }
  .detail-tags { flex-wrap: wrap; }
  .detail-heading-action { width: 100%; }
  .detail-heading-action .save-item { width: 100%; justify-content: center; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .detail-actions { flex-direction: column; align-items: stretch; }
  .detail-back { width: 100%; }
  .detail-keep-note { text-align: center; }

  .site-footer { grid-template-columns: 1fr; gap: 18px; }
  .footer-top { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .detail-overlay, .detail-panel { animation: none; }
  .open-item:hover { transform: none; }
}
