/* ==========================================================================
   Two Days — a city weekend guide
   Paper-and-ink editorial styling. All assets are local.
   ========================================================================== */

@font-face {
  font-family: "Two Serif";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Two Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Two Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe5;
  --card: #fffdf8;
  --card-2: #fbf6ec;
  --ink: #16181b;
  --ink-2: #41474f;
  --ink-3: #646b75;
  --rule: #ded3c1;
  --rule-soft: #eae1d2;
  --accent: #bd3d1c;
  --accent-deep: #8c2b11;
  --accent-wash: #f8e4dc;
  --teal: #1d5a5f;
  --shadow-sm: 0 1px 0 rgba(22, 24, 27, 0.04), 0 2px 10px rgba(53, 38, 20, 0.05);
  --shadow-md: 0 10px 34px rgba(53, 38, 20, 0.12);
  --shadow-lg: -18px 0 60px rgba(31, 22, 12, 0.22);

  --sans: "Two Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Two Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "Two Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --bar-h: 62px;
  --radius: 14px;
  --radius-sm: 9px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--accent);
}

/* --- category colours ----------------------------------------------------- */
[data-cat="Art"] { --cat: #8b3a93; --cat-bg: #f4e6f5; }
[data-cat="Film"] { --cat: #22508c; --cat-bg: #e2eaf6; }
[data-cat="Food"] { --cat: #9d4a10; --cat-bg: #f8e8d8; }
[data-cat="Literature"] { --cat: #1d5a5f; --cat-bg: #ddecec; }
[data-cat="Music"] { --cat: #b9341c; --cat-bg: #f9e3dd; }
[data-cat="Outdoors"] { --cat: #336330; --cat-bg: #e2eedd; }
[data-cat="Walks"] { --cat: #4b5a6e; --cat-bg: #e5e9ef; }

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

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(
      circle at 1px 1px,
      rgba(22, 24, 27, 0.055) 1px,
      transparent 0
    );
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
}

/* Must beat the class-level display rules further down this sheet. */
[hidden] {
  display: none !important;
}

a {
  color: var(--accent-deep);
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -200%;
  z-index: 60;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff8ec;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 0;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

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

.masthead__bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--bar-h);
  padding: 0 clamp(16px, 4vw, 54px);
  background: rgba(244, 239, 229, 0.93);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.wordmark__mark {
  display: grid;
  place-items: center;
  color: var(--accent);
}

.wordmark__text {
  font-family: var(--serif);
  font-size: 1.44rem;
  letter-spacing: -0.015em;
  line-height: 1;
  padding-bottom: 2px;
}

.masthead__dates {
  display: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.masthead__sep {
  margin: 0 8px;
  color: var(--rule);
}
.masthead__city {
  color: var(--ink-2);
}

.planpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fdf7ec;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.planpill:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.planpill__n {
  min-width: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fdf7ec;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-align: center;
  line-height: 21px;
}
.planpill[data-has="yes"] .planpill__n {
  background: var(--accent);
  color: #fff;
}

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

.hero {
  display: grid;
  gap: 26px;
  padding: 30px clamp(16px, 4vw, 54px) 34px;
  max-width: 1500px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 8.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__lede {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 1.03rem;
  color: var(--ink-2);
}
.hero__lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero__figure {
  margin: 0;
  position: relative;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  filter: saturate(0.82) contrast(1.04);
}
.hero__figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin-top: 26px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.stats li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-right: 18px;
  margin-right: 18px;
  border-right: 1px solid var(--rule-soft);
}
.stats li:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.stats__n {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
}
.stats__l {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.layout {
  display: grid;
  gap: 28px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 54px) 60px;
}

/* ==========================================================================
   Rail panels
   ========================================================================== */

#plan,
#schedule {
  scroll-margin-top: calc(var(--bar-h) + 16px);
}

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.panel + .panel {
  margin-top: 16px;
}

.panel__h {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 13px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--rule-soft);
}

.panel__badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--rule-soft);
  color: var(--ink-2);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-align: center;
}
.panel__badge[data-has="yes"] {
  background: var(--accent);
  color: #fff;
}

.field + .field,
.field + .switch,
.field + .chipset {
  margin-top: 15px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

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

.field__icon,
.field__caret {
  position: absolute;
  color: var(--ink-3);
  pointer-events: none;
}
.field__icon {
  left: 11px;
}
.field__caret {
  right: 10px;
}

.field__input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  appearance: none;
}
.field__input {
  padding-left: 36px;
  padding-right: 34px;
}
select {
  padding-right: 32px;
  cursor: pointer;
}
.field__input:hover,
select:hover {
  border-color: #c9bca6;
}
.field__input::placeholder {
  color: #6f7680;
}

.field__clear {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--rule-soft);
  color: var(--ink-2);
  cursor: pointer;
}
.field__clear:hover {
  background: var(--accent);
  color: #fff;
}

.field__hint {
  margin-top: 6px;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--ink-3);
}

.chipset {
  border: 0;
  margin: 0;
  padding: 0;
}
.chipset__row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pick {
  flex: 1 1 auto;
}
.pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pick span {
  display: block;
  padding: 9px 12px;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card-2);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.pick:hover span {
  border-color: #c9bca6;
}
.pick input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fdf7ec;
}
.pick input:focus-visible + span {
  box-shadow: var(--focus);
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 2px 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch__box {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex: none;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  background: var(--card-2);
  color: transparent;
}
.switch input:checked + .switch__box {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.switch input:focus-visible + .switch__box {
  box-shadow: var(--focus);
}
.switch__label {
  font-size: 0.87rem;
  font-weight: 500;
}

/* --- saved toggle -------------------------------------------------------- */

.toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  text-align: left;
  cursor: pointer;
}
.toggle:hover {
  border-color: #c9bca6;
}
.toggle__track {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d8cdba;
  transition: background 0.18s ease;
}
.toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}
.toggle[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: #e4b6a6;
}
.toggle[aria-pressed="true"] .toggle__track {
  background: var(--accent);
}
.toggle[aria-pressed="true"] .toggle__knob {
  transform: translateX(16px);
}
.toggle__text {
  font-size: 0.86rem;
  font-weight: 600;
}

/* --- plan body ----------------------------------------------------------- */

.plan__empty {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.plan__empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-2);
  font-weight: 600;
}

.plan__sums {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.plan__sum {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  background: var(--card-2);
}
.plan__sum b {
  display: block;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.1;
}
.plan__sum span {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.plan__list {
  margin-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.plan__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.plan__open {
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.plan__when {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.plan__name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2px;
}
.plan__open:hover .plan__name {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
.plan__drop {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--ink-2);
  cursor: pointer;
}
.plan__drop:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plan__warn {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #e0c08a;
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: #fbf0d9;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #6b4a12;
}
.plan__warn svg {
  flex: none;
  margin-top: 1px;
}

.plan__clear {
  margin-top: 14px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.plan__clear:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.plan__clear[data-confirm="yes"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   Schedule
   ========================================================================== */

.schedule__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.schedule__h {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 1.95rem);
}

.schedule__count {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.day {
  margin-top: 30px;
}

.day__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.day__head b {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 400;
}
.day__head time {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.day__head i {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.day__n {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}

.day__items {
  display: grid;
  gap: 12px;
}

/* --- event card ---------------------------------------------------------- */

.event {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.event:hover {
  border-color: #c6b89f;
  box-shadow: var(--shadow-md);
}
.event.is-saved {
  border-color: #e0ad99;
  background: linear-gradient(180deg, #fff8f3 0%, var(--card) 70%);
}

.event__rail {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono);
}
.event__dow {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--ink);
  color: #fdf7ec;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.event__t {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.event__t--end {
  color: var(--ink-3);
}
.event__dash {
  width: 10px;
  height: 1px;
  background: var(--ink-3);
  align-self: center;
}
.event__dur {
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.event__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
}

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cat-bg, var(--rule-soft));
  color: var(--cat, var(--ink-2));
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chip {
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chip--price {
  border-color: #cfc3ad;
  font-weight: 400;
}
.chip--free {
  border-color: var(--teal);
  background: #e4efef;
  color: var(--teal);
}

.event__title {
  font-family: var(--serif);
  font-size: clamp(1.22rem, 3.4vw, 1.5rem);
  line-height: 1.14;
}

.event__open {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.event__open:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.event__arrow {
  margin-left: 4px;
  vertical-align: baseline;
  color: var(--accent);
  opacity: 0.5;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.event:hover .event__arrow,
.event__open:focus-visible .event__arrow {
  opacity: 1;
  transform: translateX(2px);
}

.event__sum {
  margin-top: 7px;
  font-size: 0.94rem;
  color: var(--ink-2);
  max-width: 62ch;
}

.event__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 11px;
}
.event__fact {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.event__fact svg {
  flex: none;
  margin-top: 2px;
  color: var(--ink-3);
}
.event__fact--acc {
  flex-basis: 100%;
  color: var(--ink-3);
  font-size: 0.78rem;
}

.event__act {
  display: flex;
  gap: 9px;
  align-items: center;
}

.qs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card-2);
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.qs:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.qs svg {
  flex: none;
}
.qs[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* Beats the inline fill="none" presentation attribute on the path. */
.qs[aria-pressed="true"] svg path {
  fill: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card-2);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover {
  border-color: #c3b49a;
}
.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fdf7ec;
}
.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

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

.empty {
  margin-top: 30px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px dashed #cbbda4;
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}
.empty__kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.empty__h {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
}
.empty__p {
  margin: 10px auto 0;
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 0.93rem;
}
.empty__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.loadfail {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  border-top: 1px solid var(--rule);
  background: #efe8db;
}
.foot__inner {
  display: grid;
  gap: 18px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 54px) 46px;
}
.foot__mark {
  font-family: var(--serif);
  font-size: 1.3rem;
}
.foot__cols {
  display: grid;
  gap: 12px;
}
.foot__cols p {
  max-width: 62ch;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ==========================================================================
   Detail view — dialog
   ========================================================================== */

.sheet {
  position: fixed;
  inset: 0;
  width: min(560px, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sheet:not([open]) {
  display: none;
}
.sheet::backdrop {
  background: rgba(26, 18, 10, 0.44);
}

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

.sheet__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--card-2);
}
.sheet__kicker {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sheet__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.sheet__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fdf7ec;
}

.sheet__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet__scroll:focus {
  outline: none;
}

.sheet__figure {
  margin: 0;
  position: relative;
}
.sheet__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.03);
}
.sheet__figure figcaption {
  padding: 8px clamp(18px, 5vw, 26px) 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.sheet__body {
  padding: 18px clamp(18px, 5vw, 26px) 34px;
}

.sheet__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.sheet__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 6vw, 2.3rem);
  line-height: 1.07;
  text-wrap: balance;
}

.sheet__when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.sheet__when b {
  font-weight: 400;
  color: var(--accent-deep);
}
.sheet__when i {
  font-style: normal;
  color: var(--ink-3);
}

.save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fdf7ec;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.save:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.save svg {
  flex: none;
}
.save[aria-pressed="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-deep);
}
.save[aria-pressed="true"] svg path {
  fill: currentColor;
}
.save[aria-pressed="true"]:hover {
  background: #f3d5ca;
}

.sheet__note {
  display: flex;
  gap: 9px;
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid #e0c08a;
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: #fbf0d9;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6b4a12;
}
.sheet__note svg {
  flex: none;
  margin-top: 2px;
}

.sheet__sub {
  margin: 26px 0 11px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}
.facts > div {
  min-width: 0;
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts dd {
  margin-top: 3px;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.4;
}

.sheet__text {
  white-space: pre-line;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 54ch;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Single column: filters, then the events, then the plan. The sticky
   "My plan" pill in the masthead jumps down to the plan panel. */
@media (max-width: 899px) {
  .layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .rail {
    display: contents;
  }
  #filters {
    order: 1;
  }
  .schedule {
    order: 2;
  }
  #plan {
    order: 3;
  }
  .panel + .panel {
    margin-top: 0;
  }
}

@media (max-width: 639px) {
  .hero {
    padding-top: 24px;
    padding-bottom: 26px;
  }
  .hero__figure img {
    aspect-ratio: 2 / 1;
  }
}

@media (min-width: 640px) {
  .masthead__dates {
    display: block;
  }
  .event {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas:
      "rail body"
      "rail act";
    gap: 0 20px;
    padding: 18px 20px;
  }
  .event__rail {
    grid-area: rail;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding-bottom: 0;
    padding-right: 18px;
    border-bottom: 0;
    border-right: 1px solid var(--rule-soft);
    align-self: stretch;
  }
  .event__dow {
    margin-bottom: 7px;
  }
  .event__t {
    font-size: 1.06rem;
  }
  .event__dash {
    width: 1px;
    height: 7px;
    margin: 2px 0 2px 5px;
    align-self: flex-start;
  }
  .event__dur {
    margin: 9px 0 0;
  }
  .event__body {
    grid-area: body;
  }
  .event__act {
    grid-area: act;
    margin-top: 14px;
  }
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: 44px;
    padding-top: 44px;
    padding-bottom: 48px;
  }
  .hero__figure img {
    aspect-ratio: 4 / 3;
  }
  .layout {
    grid-template-columns: 318px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
  }
  .rail {
    position: sticky;
    top: calc(var(--bar-h) + 18px);
    max-height: calc(100vh - var(--bar-h) - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }
  .foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (min-width: 1180px) {
  .layout {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 48px;
  }
  .event {
    grid-template-columns: 116px minmax(0, 1fr);
  }
  .event__title {
    font-size: 1.55rem;
  }
}

@media (max-width: 760px) {
  .sheet {
    width: 100%;
    height: 94%;
    max-height: 94%;
    margin: auto 0 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
    border-radius: 18px 18px 0 0;
  }
  .sheet__figure img {
    aspect-ratio: 2 / 1;
  }
}

@media (max-width: 400px) {
  .stats li {
    padding-right: 12px;
    margin-right: 12px;
  }
  .event__act .qs {
    flex: 1;
    justify-content: center;
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  .sheet[open] {
    animation: sheet-in 0.26s cubic-bezier(0.22, 0.68, 0.3, 1);
  }
  .sheet[open]::backdrop {
    animation: fade-in 0.26s ease;
  }
  @media (max-width: 760px) {
    .sheet[open] {
      animation-name: sheet-up;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes sheet-in {
  from {
    transform: translateX(26px);
    opacity: 0;
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(32px);
    opacity: 0;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-2: #26292e;
    --ink-3: #4a5057;
    --rule: #b9ab93;
  }
}
