/* --------------------------------------------------------------------------
   Day Out — weekend programme
   A civic broadcast poster turned into a working timetable.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #101a17;
  --ink-soft: #36443c;
  --ink-muted: #536057;
  --paper: #f3f0e2;
  --paper-raised: #fbf9f0;
  --paper-deep: #e6e2d0;
  --blue: #1e3ad1;
  --blue-deep: #13299f;
  --blue-wash: #e6eaff;
  --tomato: #ff5a36;
  --lime: #d8ff4f;
  --line: rgba(16, 26, 23, 0.24);
  --line-soft: rgba(16, 26, 23, 0.14);
  --focus: #1e3ad1;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Work Sans", "Helvetica Neue", sans-serif;
  --page-max: 1440px;
  --content-max: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  scrollbar-color: var(--ink) var(--paper-deep);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

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

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

.site-header :focus-visible,
.hero :focus-visible,
.detail-topbar :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--lime);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header ------------------------------------------------------------------ */

.site-header {
  background: var(--ink);
  color: var(--paper);
}

.header-inner {
  max-width: var(--page-max);
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand-mark {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  flex: 0 0 auto;
}

.brand-mark-fill {
  fill: var(--lime);
  stroke: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(243, 240, 226, 0.7);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-nav a {
  position: relative;
  padding: 12px 2px;
  color: var(--paper);
  text-decoration: none;
}

.header-nav a::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 7px;
  left: 2px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.header-nav a:hover::after {
  transform: scaleX(1);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-date {
  color: rgba(243, 240, 226, 0.68);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-shortlist {
  min-height: 40px;
  padding: 0 8px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(243, 240, 226, 0.38);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 170ms var(--ease-out),
    border-color 170ms var(--ease-out),
    color 170ms var(--ease-out);
}

.header-shortlist .icon {
  width: 15px;
  height: 15px;
}

.header-shortlist:hover {
  border-color: var(--lime);
}

.header-shortlist[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.header-shortlist-count {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.header-shortlist[aria-pressed="true"] .header-shortlist-count {
  background: var(--ink);
  color: var(--lime);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  color: var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  top: -280px;
  right: -130px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(216, 255, 79, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -140px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: var(--blue-deep);
  opacity: 0.55;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 66px 28px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  align-items: center;
  gap: 34px;
}

.hero-copy {
  max-width: 760px;
}

.hero-title {
  max-width: 9ch;
  font-family: var(--display);
  font-size: clamp(56px, 7.2vw, 96px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.hero-line {
  display: block;
}

.hero-line-accent {
  color: var(--lime);
}

.hero-lede {
  max-width: 49ch;
  margin-top: 28px;
  color: #edf0ff;
  font-size: 17.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-hint {
  max-width: 23ch;
  color: rgba(243, 240, 226, 0.8);
  font-size: 12.5px;
  line-height: 1.4;
}

.button {
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background 180ms var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 18px rgba(16, 26, 23, 0.2);
}

.button-primary {
  background: var(--lime);
  color: var(--ink);
}

.button .icon {
  width: 18px;
  height: 18px;
  transition: transform 180ms var(--ease-out);
}

.button-primary:hover .icon {
  transform: translateY(2px);
}

.hero-art {
  position: relative;
  min-height: 438px;
  isolation: isolate;
}

.hero-route {
  position: absolute;
  inset: -8px -20px 0 -20px;
  width: calc(100% + 40px);
  height: calc(100% + 8px);
  z-index: 0;
}

.postcard {
  position: absolute;
  padding: 9px 9px 34px;
  background: var(--paper);
  border: 1px solid rgba(16, 26, 23, 0.35);
  box-shadow: 0 24px 44px rgba(8, 18, 91, 0.38);
  color: var(--ink);
}

.postcard img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
}

.postcard figcaption {
  position: absolute;
  right: 12px;
  bottom: 9px;
  left: 12px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.postcard-stamp {
  position: absolute;
  top: 16px;
  left: -13px;
  z-index: 1;
  padding: 5px 8px 4px;
  background: var(--lime);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.postcard-stamp-tomato {
  background: var(--tomato);
}

.postcard-one {
  z-index: 1;
  top: 58px;
  left: 0;
  width: 43%;
  height: 232px;
  transform: rotate(-6.5deg);
}

.postcard-two {
  z-index: 3;
  top: 0;
  left: 26%;
  width: 49%;
  height: 274px;
  transform: rotate(2.5deg);
}

.postcard-three {
  z-index: 2;
  top: 254px;
  left: 50%;
  width: 46%;
  height: 180px;
  transform: rotate(-2.5deg);
}

.photo-note {
  position: absolute;
  z-index: 4;
  bottom: 0;
  left: 0;
  padding: 5px 7px;
  background: var(--blue-deep);
  color: rgba(243, 240, 226, 0.8);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Programme --------------------------------------------------------------- */

.programme {
  background: var(--paper);
  padding-bottom: 88px;
}

.programme-head {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 46px 24px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.programme-head h2 {
  font-family: var(--display);
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.programme-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.programme-sub .icon {
  width: 16px;
  height: 16px;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 2px solid var(--ink);
}

.filter-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 15px 24px 16px;
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(190px, 0.65fr) auto;
  align-items: end;
  gap: 14px;
}

.filter-label {
  display: block;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.field-shell,
.select-shell {
  position: relative;
}

.field-shell input,
.select-shell select {
  width: 100%;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  transition:
    background 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.field-shell input {
  padding: 0 15px 0 43px;
  appearance: none;
  caret-color: var(--blue);
}

.field-shell input::placeholder {
  color: #5b645d;
  opacity: 1;
}

.field-shell input:hover,
.select-shell select:hover {
  background: #fffef7;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-shell select {
  padding: 0 43px 0 14px;
  appearance: none;
  cursor: pointer;
}

.select-icon {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.saved-toggle {
  height: 52px;
  padding: 0 12px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    background 170ms var(--ease-out),
    color 170ms var(--ease-out);
}

.saved-toggle:hover {
  background: var(--blue-wash);
}

.saved-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.saved-toggle .icon {
  width: 17px;
  height: 17px;
}

.saved-count {
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.saved-toggle[aria-pressed="true"] .saved-count {
  border-color: var(--lime);
  background: var(--lime);
}

.programme-body {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.results-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.results-summary {
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
}

.clear-filters {
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.clear-filters:hover {
  color: var(--blue);
}

/* Loading, empty and error states ----------------------------------------- */

.loading-state {
  padding: 12px 0 44px;
}

.skeleton {
  height: 82px;
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.55) 50%, transparent 100%),
    var(--paper-deep);
  background-size: 220% 100%;
  animation: skeleton-sweep 1.4s linear infinite;
}

.skeleton-short {
  height: 42px;
  width: 42%;
}

.skeleton-mid {
  height: 82px;
  width: 74%;
}

@keyframes skeleton-sweep {
  from {
    background-position: 140% 0;
  }
  to {
    background-position: -80% 0;
  }
}

.empty-state {
  padding: 6px 0 60px;
}

.empty-inner {
  padding: 44px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  border: 2px solid var(--ink);
  background: var(--blue-wash);
}

.empty-mark {
  width: 128px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--lime);
  font-family: var(--display);
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-2deg);
}

.empty-title {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}

.empty-copy p {
  max-width: 48ch;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}

.empty-action {
  margin-top: 22px;
}

.empty-action:hover .icon {
  transform: translateY(2px);
}

.error-state {
  padding: 38px;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
}

.error-state h3 {
  font-family: var(--display);
  font-size: 34px;
  text-transform: uppercase;
}

.error-state p {
  margin: 8px 0 20px;
  color: var(--ink-soft);
}

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

.days {
  padding-bottom: 4px;
}

.day + .day {
  margin-top: 68px;
}

.day-header {
  padding: 22px 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid var(--ink);
}

.day-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}

.day-date {
  padding: 3px 10px 7px;
  border: 2px solid var(--ink);
  background: var(--lime);
  font-size: 0.69em;
  line-height: 0.9;
  transform: rotate(-1.5deg);
}

.day-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.day-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--tomato);
  vertical-align: 2px;
}

/* Event rows ------------------------------------------------------------- */

.event {
  border-bottom: 1px solid var(--line);
}

.event:first-child {
  border-top: 0;
}

.event-open {
  width: 100%;
  min-height: 120px;
  padding: 17px 10px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 190px 112px 38px;
  align-items: center;
  gap: 22px;
  color: var(--ink);
  text-decoration: none;
  transition: background 170ms var(--ease-out);
}

.event-open:hover {
  background: var(--blue-wash);
}

.event-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

.event-time-main {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}

.event-time-period {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-time-end {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.event-main {
  min-width: 0;
}

.category-chip {
  width: fit-content;
  padding: 4px 7px 3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.category-chip .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.event-title {
  margin-top: 7px;
  font-family: var(--display);
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.008em;
}

.event-summary {
  display: block;
  max-width: 65ch;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.45;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.event-meta strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.event-meta > span {
  display: block;
}

.item-saved {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-saved .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  fill: var(--lime);
}

.event-thumb {
  width: 112px;
  height: 84px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

.event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03);
  transition: transform 320ms var(--ease-out);
}

.event-open:hover .event-thumb img {
  transform: scale(1.045);
}

.event-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition:
    background 170ms var(--ease-out),
    color 170ms var(--ease-out),
    transform 170ms var(--ease-out);
}

.event-arrow .icon {
  width: 17px;
  height: 17px;
}

.event-open:hover .event-arrow {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(2px);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 38px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
}

.footer-brand {
  font-size: 22px;
}

.footer-brand .brand-mark {
  width: 26px;
  height: 26px;
  stroke-width: 2.4;
}

.footer-note {
  max-width: 72ch;
  color: rgba(243, 240, 226, 0.64);
  font-size: 11.5px;
  line-height: 1.55;
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-top .icon {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
  transition: transform 170ms var(--ease-out);
}

.footer-top:hover .icon {
  transform: rotate(-90deg) translateX(3px);
}

.noscript {
  padding: 18px;
  border-top: 2px solid var(--ink);
  background: var(--tomato);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
}

/* Detail sheet ------------------------------------------------------------ */

.detail-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.detail-dialog:not([open]) {
  display: none;
}

.detail-dialog[open] {
  display: block;
}

.detail-dialog::backdrop {
  background: rgba(7, 14, 35, 0.62);
  animation: backdrop-in 220ms ease-out both;
}

.detail-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 2px solid var(--ink);
  background: var(--paper);
  animation: sheet-in 280ms var(--ease-out) both;
}

@keyframes sheet-in {
  from {
    opacity: 0.7;
    transform: translateX(6%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.detail-topbar {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--ink);
  color: var(--paper);
}

.close-detail {
  min-height: 44px;
  padding: 0 10px 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--paper);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.close-detail:hover {
  border-color: rgba(243, 240, 226, 0.4);
}

.close-detail .icon {
  width: 18px;
  height: 18px;
}

.detail-brand {
  padding-right: 6px;
  color: rgba(243, 240, 226, 0.55);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.detail-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--ink) var(--paper-deep);
  scrollbar-width: thin;
}

.detail-scroll::-webkit-scrollbar {
  width: 11px;
}

.detail-scroll::-webkit-scrollbar-track {
  background: var(--paper-deep);
}

.detail-scroll::-webkit-scrollbar-thumb {
  border: 3px solid var(--paper-deep);
  border-radius: 999px;
  background: var(--ink);
}

.detail-image {
  position: relative;
  height: 224px;
  overflow: hidden;
  background: var(--blue);
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.03);
}

.detail-category {
  position: absolute;
  top: 14px;
  left: 14px;
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(16, 26, 23, 0.18);
}

.image-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 6px 14px;
  background: rgba(16, 26, 23, 0.78);
  color: rgba(243, 240, 226, 0.88);
  font-size: 10.5px;
  letter-spacing: 0.035em;
}

.detail-content {
  padding: 28px 32px 36px;
}

.detail-date {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.detail-date .icon {
  width: 15px;
  height: 15px;
}

.detail-title {
  max-width: 15ch;
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(38px, 5.4vw, 54px);
  font-weight: 600;
  line-height: 0.97;
  letter-spacing: -0.012em;
}

.facts {
  margin-top: 24px;
  padding: 6px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.fact {
  padding: 11px 0 13px;
  border-bottom: 1px solid var(--line-soft);
}

.fact:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.fact dt {
  color: var(--ink-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.fact dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.35;
}

.detail-body {
  margin-top: 28px;
}

.detail-body h3 {
  margin-bottom: 9px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.detail-body p {
  max-width: 62ch;
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.62;
}

.detail-body p:first-child {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}

.detail-savebar {
  flex: 0 0 auto;
  padding: 13px 20px max(13px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 2px solid var(--ink);
  background: var(--paper-raised);
}

.save-note {
  max-width: 16ch;
  color: var(--ink-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.save-item {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--tomato);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.05;
  cursor: pointer;
  transition:
    background 170ms var(--ease-out),
    transform 170ms var(--ease-out);
}

.save-item:hover {
  transform: translateY(-2px);
}

.save-item[aria-pressed="true"] {
  background: var(--lime);
}

.save-item .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.save-item[aria-pressed="true"] .icon {
  fill: var(--ink);
  stroke-width: 2.2;
}

/* Breakpoints ------------------------------------------------------------- */

@media (max-width: 1120px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  }

  .event-open {
    grid-template-columns: 90px minmax(0, 1fr) 160px 92px 36px;
    gap: 18px;
  }

  .event-thumb {
    width: 92px;
    height: 76px;
  }

  .event-time-main {
    font-size: 28px;
  }
}

@media (max-width: 960px) {
  .header-nav {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 54px;
    padding-bottom: 48px;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero-art {
    width: min(540px, 100%);
    min-height: 380px;
    margin: 0 auto;
  }

  .postcard-one {
    top: 44px;
    height: 196px;
  }

  .postcard-two {
    height: 238px;
  }

  .postcard-three {
    top: 216px;
    height: 154px;
  }

  .filter-inner {
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) auto;
  }

  .event-open {
    grid-template-columns: 84px minmax(0, 1fr) 150px 36px;
    gap: 18px;
  }

  .event-thumb {
    display: none;
  }

  .footer-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .footer-top {
    grid-column: 1 / -1;
    padding-top: 2px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 24px;
  }

  .header-inner {
    padding: 8px 18px;
    gap: 14px;
  }

  .header-date {
    display: none;
  }

  .hero-inner {
    padding: 44px 20px 42px;
  }

  .hero-title {
    font-size: clamp(50px, 7.4vw, 80px);
  }

  .hero-lede {
    margin-top: 23px;
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 25px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-hint {
    max-width: 32ch;
  }

  .hero-art {
    min-height: 264px;
    margin-top: 0;
  }

  .postcard-one {
    top: 31px;
    width: 44%;
    height: 126px;
  }

  .postcard-two {
    width: 52%;
    height: 152px;
  }

  .postcard-three {
    top: 132px;
    width: 46%;
    height: 104px;
  }

  .postcard figcaption {
    font-size: 10px;
  }

  .postcard-stamp {
    font-size: 8px;
  }

  .photo-note {
    font-size: 8.5px;
  }

  .programme-head {
    padding: 34px 20px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .programme-head h2 {
    font-size: 36px;
  }

  .programme-sub {
    padding-bottom: 0;
    font-size: 11px;
  }

  .filter-bar {
    position: static;
  }

  .filter-inner {
    padding: 14px 20px 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 11px;
  }

  .filter-group:first-child {
    grid-column: 1 / -1;
  }

  .saved-toggle {
    justify-content: center;
  }

  .programme-body {
    padding: 0 20px;
  }

  .results-bar {
    min-height: 48px;
  }

  .results-summary {
    font-size: 11.5px;
  }

  .empty-inner {
    padding: 28px 22px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .empty-mark {
    width: 82px;
    font-size: 48px;
  }

  .empty-title {
    font-size: 38px;
  }

  .day + .day {
    margin-top: 48px;
  }

  .day-header {
    padding: 16px 0 14px;
    align-items: center;
  }

  .day-title {
    font-size: clamp(36px, 5.5vw, 48px);
  }

  .day-date {
    padding: 2px 8px 5px;
  }

  .day-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 10px;
  }

  .day-meta span + span::before {
    display: none;
  }

  .event-open {
    min-height: 0;
    padding: 16px 4px 17px;
    grid-template-columns: 66px minmax(0, 1fr) 34px;
    grid-template-areas:
      "time main arrow"
      "meta meta meta";
    gap: 12px;
    column-gap: 13px;
    row-gap: 12px;
  }

  .event-time {
    grid-area: time;
    padding-top: 0;
  }

  .event-time-main {
    display: block;
    font-size: 24px;
  }

  .event-time-period {
    display: inline;
    margin-left: 2px;
    font-size: 9px;
  }

  .event-time-end {
    margin-top: 3px;
    font-size: 9px;
  }

  .event-main {
    grid-area: main;
  }

  .event-title {
    margin-top: 6px;
    font-size: 24px;
  }

  .event-summary {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .event-meta {
    grid-area: meta;
    padding-left: 79px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 11px;
    line-height: 1.35;
  }

  .event-meta strong {
    display: inline;
  }

  .event-meta > span {
    display: inline;
  }

  .event-meta > span + span::before {
    content: "·";
    margin-right: 9px;
    color: var(--ink-muted);
  }

  .item-saved {
    font-size: 9px;
  }

  .event-arrow {
    grid-area: arrow;
    width: 34px;
    height: 34px;
  }

  .event-arrow .icon {
    width: 15px;
    height: 15px;
  }

  .detail-dialog {
    width: 100vw;
  }

  .detail-panel {
    border-left: 0;
  }

  .detail-image {
    height: 182px;
  }

  .detail-content {
    padding: 24px 20px 30px;
  }

  .detail-title {
    font-size: clamp(36px, 8vw, 46px);
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .fact:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .detail-savebar {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }

  .save-note {
    display: none;
  }

  .save-item {
    width: 100%;
  }

  .footer-inner {
    padding: 30px 20px;
    gap: 20px;
  }

  .footer-note {
    font-size: 10.5px;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 51px;
  }

  .hero-art {
    min-height: 248px;
  }

  .postcard-one {
    height: 116px;
  }

  .postcard-two {
    height: 140px;
  }

  .postcard-three {
    top: 120px;
    height: 96px;
  }

  .filter-inner {
    grid-template-columns: 1fr;
  }

  .filter-group:first-child,
  .saved-toggle {
    grid-column: auto;
  }

  .saved-toggle {
    justify-content: flex-start;
  }

  .event-title {
    font-size: 22px;
  }

  .event-meta {
    padding-left: 0;
  }

  .day-title {
    gap: 9px;
    font-size: 35px;
  }

  .day-meta {
    font-size: 9px;
  }
}

@media (pointer: coarse) {
  .event-open {
    min-height: 124px;
  }

  .header-shortlist {
    min-height: 44px;
  }

  .close-detail {
    min-height: 44px;
  }
}

/* Touch devices keep the readable press feedback, not a stuck hover state. */
@media (hover: none) {
  .event-open:hover {
    background: transparent;
  }

  .event-open:hover .event-arrow {
    background: transparent;
    color: var(--ink);
    transform: none;
  }

  .event-open:hover .event-thumb img {
    transform: none;
  }

  .button:hover,
  .save-item:hover {
    transform: none;
    box-shadow: none;
  }

  .header-nav a:hover::after {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .detail-panel,
  .detail-dialog::backdrop,
  .skeleton,
  .event-open,
  .event-arrow,
  .event-thumb img,
  .saved-toggle,
  .save-item,
  .header-shortlist,
  .button,
  .button .icon,
  .footer-top .icon,
  .skip-link {
    animation: none;
    transition: none;
  }

  .button:hover,
  .save-item:hover {
    transform: none;
    box-shadow: none;
  }
}
