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

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

:root {
  --paper: #efeee8;
  --paper-hi: #f8f8f4;
  --paper-lo: #e2e1d9;
  --ink: #15193a;
  --ink-2: #41456a;
  --rule: rgb(21 25 58 / 0.16);
  --rule-soft: rgb(21 25 58 / 0.07);
  --blue: #2846a8;
  --blue-deep: #1c3282;
  --pink: #ff4fa8;

  --c-art: #ffe45c;
  --c-film: #a88be0;
  --c-food: #ff7a3d;
  --c-literature: #62c6e8;
  --c-music: #ff5db1;
  --c-outdoors: #2db36f;
  --c-walks: #c8e66a;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-text: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --hour: 72px;
  --lane-gap: 6px;
  --radius: 3px;
  --gutter: clamp(1rem, 3.6vw, 3.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --toolbar-h: 5.5rem;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.1 0 0 0 0 0.23 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: light;
  accent-color: var(--blue);
  scrollbar-color: var(--ink-2) var(--paper-lo);
}

[data-cat="Art"] { --cat: var(--c-art); }
[data-cat="Film"] { --cat: var(--c-film); }
[data-cat="Food"] { --cat: var(--c-food); }
[data-cat="Literature"] { --cat: var(--c-literature); }
[data-cat="Music"] { --cat: var(--c-music); }
[data-cat="Outdoors"] { --cat: var(--c-outdoors); }
[data-cat="Walks"] { --cat: var(--c-walks); }

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--toolbar-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

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

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; }

svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

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

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Masthead: the cover of the programme ---------- */

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

.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.35;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.masthead__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.1rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem);
  grid-template-areas:
    ". nav"
    "mark aside";
  column-gap: 3rem;
  row-gap: 1.25rem;
  align-items: end;
}

.masthead :focus-visible { outline-color: var(--paper); }

.masthead__nav {
  grid-area: nav;
  justify-self: end;
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

.masthead__nav a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: rgb(239 238 232 / 0.5);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-block: 0.25rem;
}
.masthead__nav a:hover { text-decoration-color: var(--paper); text-decoration-thickness: 2px; }

.nav-count {
  min-width: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 99px;
  background: var(--pink);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4rem;
  text-align: center;
}

.wordmark {
  grid-area: mark;
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 8.4vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.012em;
  white-space: nowrap;
  justify-self: start;
}

.wordmark__ink { position: relative; display: block; }

/* the second ink, printed slightly off register */
.wordmark__ghost {
  position: absolute;
  inset: 0;
  color: var(--pink);
  transform: translate(0.045em, 0.04em);
  mix-blend-mode: multiply;
}

.masthead__aside { grid-area: aside; display: grid; gap: 0.6rem; padding-bottom: 0.35rem; }

.masthead__dates {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.1;
}

.masthead__lede { max-width: 34rem; font-size: 1rem; line-height: 1.5; }

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.toolbar__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem var(--gutter) 0.95rem;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.field { display: grid; gap: 0.3rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.field--search { flex: 1 1 18rem; max-width: 26rem; }
.field--category { flex: 0 0 13.5rem; }

.control { position: relative; display: flex; align-items: center; }

.control input,
.control select {
  width: 100%;
  height: 2.75rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  font-size: 1rem;
}

.control input { padding: 0 0.75rem 0 2.5rem; }
.control input::placeholder { color: #5f6385; opacity: 1; }
.control input::-webkit-search-cancel-button { cursor: pointer; }

.control select {
  appearance: none;
  padding: 0 2.5rem 0 0.75rem;
  cursor: pointer;
}

.control input:focus-visible,
.control select:focus-visible { outline-offset: 2px; }

.control__icon,
.control__chevron { position: absolute; pointer-events: none; color: var(--ink); }
.control__icon { left: 0.75rem; }
.control__chevron { right: 0.75rem; }

.toggle {
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.85rem 0 0.75rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.toggle:hover { background: var(--paper-lo); }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.toggle[aria-pressed="true"] .toggle__icon { fill: var(--pink); stroke: var(--pink); }

.toggle__count {
  min-width: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 99px;
  background: var(--pink);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.4rem;
  text-align: center;
}

.toolbar__status {
  margin-left: auto;
  padding-bottom: 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  text-align: right;
}

/* ---------- Layout ---------- */

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem var(--gutter) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18.5rem, 22rem);
  gap: 2.75rem;
  align-items: start;
}

.programme:focus,
.plan:focus { outline: none; }

/* ---------- Timetable ---------- */

.timetable {
  --span: 12.5;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
}

.hours {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  height: calc(var(--span) * var(--hour));
}

.hours span {
  position: absolute;
  right: 0;
  top: calc(var(--i) * var(--hour));
  transform: translateY(-0.55em);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-2);
}

.day {
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 0;
}

.day:nth-of-type(1) { grid-column: 2; }
.day:nth-of-type(2) { grid-column: 3; }

.day__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.9rem;
  border-bottom: 3px solid var(--ink);
}

.day__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.005em;
}

.day__date { font-weight: 400; color: var(--ink-2); margin-left: 0.3rem; }
.day__count { font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }

.day__track {
  position: relative;
  height: calc(var(--span) * var(--hour));
  background:
    repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px var(--hour)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), var(--rule-soft) calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour));
}

.day__events { position: absolute; inset: 0; }

.day__none {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  padding: 0.75rem 0.9rem;
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* An event is a block of ink sized by its time on the page */
.event {
  position: absolute;
  top: calc(var(--s) * var(--hour) + 2px);
  height: calc(var(--d) * var(--hour) - 4px);
  left: calc(var(--c) * (100% + var(--lane-gap)) / var(--n));
  width: calc((100% - (var(--n) - 1) * var(--lane-gap)) / var(--n));
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem 0.55rem;
  background: var(--cat);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.event::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.22;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.event:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px -10px rgb(21 25 58 / 0.55);
  z-index: 3;
}

.event:has(.event__open:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  z-index: 4;
}

.event.is-saved { box-shadow: inset 0 0 0 2px var(--ink); }
.event.is-saved:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 10px 18px -10px rgb(21 25 58 / 0.55); }

.event__time {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.event__end { font-weight: 400; }

.event__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }

.event__tags {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.15rem;
}

.event__saved { display: inline-flex; }
.event__saved svg { width: 1.05rem; height: 1.05rem; fill: var(--ink); }

.event__title {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.22;
  text-wrap: pretty;
}

.event__open {
  all: unset;
  cursor: pointer;
}
.event__open::after { content: ""; position: absolute; inset: 0; }
.event__open:focus-visible { outline: none; }

.event__meta {
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event { container-type: inline-size; }

/* In a narrow lane the ink colour carries the category; the word stays for screen readers. */
@container (max-width: 12rem) {
  .event__cat {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.event--short .event__meta { display: none; }

.event.is-stamped .event__saved { animation: stamp 520ms var(--ease-out) both; }

@keyframes stamp {
  0% { transform: scale(2.4) rotate(-14deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* ---------- Empty state ---------- */

.empty {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  padding: 3rem 0 3.5rem;
  border-top: 3px solid var(--ink);
}

.empty__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
}

.empty__text { max-width: 36rem; font-size: 1.05rem; color: var(--ink-2); }
.empty .btn { margin-top: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-weight: 600;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

/* ---------- Shortlist plan: a strip of tickets ---------- */

.plan {
  position: sticky;
  top: calc(var(--toolbar-h) + 1.5rem);
  max-height: calc(100dvh - var(--toolbar-h) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 6px solid var(--ink);
  padding-top: 0.9rem;
}

.plan__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.plan__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.05;
}

.plan__count { font-size: 0.88rem; color: var(--ink-2); white-space: nowrap; }

.plan__empty {
  display: grid;
  gap: 0.6rem;
  padding: 1.1rem 1.1rem 1.25rem;
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.plan__empty strong { color: var(--ink); font-weight: 600; }

.plan__day + .plan__day { margin-top: 1.4rem; }

.plan__dayname {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--ink);
}

.plan__item {
  position: relative;
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  column-gap: 0.7rem;
  padding: 0.75rem 0 0.8rem;
  border-bottom: 1px dashed rgb(21 25 58 / 0.35);
}

.plan__swatch {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.3rem;
  border-radius: 2px;
  background: var(--cat);
  box-shadow: inset 0 0 0 1px rgb(21 25 58 / 0.25);
}

.plan__main { display: grid; gap: 0.1rem; min-width: 0; }

.plan__time { font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; }

.plan__open {
  all: unset;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms var(--ease-out);
}
.plan__open:hover { text-decoration-color: currentColor; }
.plan__open:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.plan__meta { font-size: 0.86rem; color: var(--ink-2); }

.plan__clash,
.detail__clash {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8a1f55;
}
.plan__clash svg,
.detail__clash svg { width: 1.05rem; height: 1.05rem; margin-top: 0.05rem; }

.plan__remove {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  margin: -0.35rem -0.35rem 0 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-2);
}
.plan__remove:hover { background: var(--paper-lo); color: var(--ink); }
.plan__remove svg { width: 1.1rem; height: 1.1rem; }

.plan__total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding-top: 0.7rem;
  border-top: 2px solid var(--ink);
  font-size: 0.92rem;
}
.plan__total strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }

/* ---------- Colophon ---------- */

.colophon { background: var(--ink); color: var(--paper); }
.colophon__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  font-size: 0.9rem;
}
.colophon__inner p:last-child { max-width: 44rem; color: #d3d4dc; }
.colophon__mark { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }

/* ---------- Detail drawer ---------- */

.detail {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  width: min(35rem, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -18px 0 40px -20px rgb(21 25 58 / 0.6);
}

.detail::backdrop { background: rgb(21 25 58 / 0.48); }

.detail[open] { animation: drawer-in 480ms var(--ease-out); }
.detail[open]::backdrop { animation: fade-in 320ms var(--ease-out); }

@keyframes drawer-in {
  from { transform: translateX(3rem); opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
}

.detail__sheet { min-height: 100%; display: flex; flex-direction: column; }

.detail__band {
  position: relative;
  isolation: isolate;
  background: var(--cat, var(--paper-lo));
  padding: 1rem 1.5rem 1.75rem;
}

.detail__band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.detail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail__tags { font-size: 0.9rem; font-weight: 600; }

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  margin-right: -0.5rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.detail .icon-btn:focus-visible { outline-color: var(--ink); }

.detail__when { display: grid; gap: 0.15rem; margin-bottom: 0.9rem; }
.detail__day { font-weight: 600; font-size: 0.98rem; }
.detail__clock {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.detail__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5.5vw, 2.3rem);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.detail__content {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 2.5rem;
}

.detail__save { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }

.save-btn {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1.25rem 0 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.save-btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.save-btn[aria-pressed="true"] { background: transparent; color: var(--ink); border-color: var(--ink); }
.save-btn[aria-pressed="true"]:hover { background: var(--paper-lo); }
.save-btn[aria-pressed="true"] .save-btn__icon { fill: var(--ink); }

.detail__stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem 0.3rem 0.5rem;
  border: 2px solid #b0186b;
  border-radius: var(--radius);
  color: #9c135e;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transform: rotate(-3deg);
}
.detail__stamp svg { width: 1.1rem; height: 1.1rem; stroke-width: 2.4; }
.detail__stamp.is-fresh { animation: stamp-in 520ms var(--ease-out) both; }

@keyframes stamp-in {
  0% { transform: scale(1.9) rotate(-12deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotate(-3deg); opacity: 1; }
}

.detail__clash { margin: 0; font-size: 0.92rem; }

.facts {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  border-top: 2px solid var(--ink);
}
.facts dt,
.facts dd {
  padding: 0.7rem 0;
  border-bottom: 1px dashed rgb(21 25 58 / 0.35);
}
.facts dt { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); padding-top: 0.8rem; }
.facts dd { line-height: 1.4; }
.facts dd small { display: block; font-size: 0.88rem; color: var(--ink-2); }

.detail__text { display: grid; gap: 0.75rem; max-width: 65ch; }
.detail__text p { line-height: 1.6; }
.detail__text .detail__lede { font-size: 1.12rem; line-height: 1.55; }
.detail__text h3 {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

/* ---------- Mobile ---------- */

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .plan { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 760px) {
  .masthead__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "mark" "aside";
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
    row-gap: 1rem;
  }
  .masthead__nav { justify-self: start; font-size: 0.95rem; }
  .wordmark { font-size: clamp(3.4rem, 17vw, 4.5rem); }
  .masthead__lede { font-size: 0.95rem; }

  .toolbar { position: static; }
  .toolbar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
  }
  .field--search { grid-column: 1 / -1; max-width: none; }
  .field--category { min-width: 0; }
  .toolbar__status { grid-column: 1 / -1; margin: 0; padding: 0; text-align: left; font-size: 0.86rem; }

  html { scroll-padding-top: 1rem; }

  .layout { padding-top: 1.5rem; gap: 2.5rem; }

  .timetable { display: block; }
  .hours { display: none; }
  .day { display: block; }
  .day + .day { margin-top: 2.25rem; }
  .day__title { font-size: 1.75rem; }
  .day__track { height: auto; background: none; }
  .day__events { position: static; display: grid; gap: 0.7rem; }
  .day__none { position: static; }

  .event {
    position: relative;
    top: auto; left: auto;
    width: auto; height: auto;
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0;
    background: none;
    overflow: visible;
  }
  .event::before { display: none; }
  .event:hover { transform: none; box-shadow: none; }
  .event.is-saved,
  .event.is-saved:hover { box-shadow: none; }

  .event__time {
    display: flex;
    flex-direction: column;
    padding-top: 0.6rem;
    font-size: 1.2rem;
    line-height: 1.05;
  }
  .event__end { font-size: 0.9rem; color: var(--ink-2); }
  .event__end > [aria-hidden="true"] { display: none; }

  .event__body {
    position: relative;
    isolation: isolate;
    padding: 0.65rem 0.85rem 0.75rem;
    background: var(--cat);
    border-radius: var(--radius);
    gap: 0.25rem;
    transition: transform 200ms var(--ease-out);
  }
  .event__body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grain);
    opacity: 0.22;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
    border-radius: inherit;
  }
  .event.is-saved .event__body { box-shadow: inset 0 0 0 2px var(--ink); }
  .event:active .event__body { transform: scale(0.985); }

  .event__tags { position: static; justify-content: space-between; }
  .event__title { font-size: 1.02rem; }
  .event--short .event__meta { display: block; }

  .plan__title { font-size: 1.6rem; }

  .detail { width: 100vw; }
  .detail[open] { animation-name: sheet-in; }
  .detail__band { padding: 0.75rem 1.1rem 1.4rem; }
  .detail__bar { margin-bottom: 1.1rem; }
  .detail__content { padding: 1.25rem 1.1rem 2.5rem; }
  .facts { grid-template-columns: 5.5rem minmax(0, 1fr); }

  @keyframes sheet-in {
    from { transform: translateY(2.5rem); opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .event:hover { transform: none; }
}
