@font-face {
  font-family: "DM Serif";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-display: swap;
}

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

:root {
  --paper: #f3efe5;
  --ink: #181816;
  --coral: #ef5b3f;
  --acid: #d8f06b;
  --blue: #c9deee;
  --line: rgba(24, 24, 22, 0.23);
  --serif: "DM Serif", Georgia, serif;
  --sans: "Work Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(239, 91, 63, 0.22);
}

button,
input,
select {
  font: inherit;
  touch-action: manipulation;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1[id],
h2[id],
h3[id] {
  scroll-margin-top: 24px;
}

p {
  text-wrap: pretty;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 3.3vw;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  width: max-content;
  color: var(--ink);
  font-weight: 720;
  font-size: 1.08rem;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.edition {
  font-size: 0.72rem;
  font-weight: 620;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.edition span {
  padding-inline: 0.55em;
}

.header-saved {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 0 0 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.header-saved:hover,
.header-saved[aria-pressed="true"] {
  color: white;
  background: var(--ink);
}

.header-saved svg,
.save-item svg {
  width: 17px;
  fill: transparent;
}

.header-saved[aria-pressed="true"] svg,
.save-item[aria-pressed="true"] svg {
  fill: currentColor;
}

.saved-count {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-right: 5px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--acid);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.hero {
  position: relative;
  min-height: 490px;
  padding: 42px 3.3vw 34px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background:
    radial-gradient(circle at 77% 46%, var(--acid) 0 6px, transparent 7px),
    linear-gradient(122deg, transparent 0 70%, rgba(239, 91, 63, 0.12) 70% 71%, transparent 71%);
}

.hero::before {
  content: "";
  position: absolute;
  width: min(39vw, 520px);
  aspect-ratio: 1;
  top: 43%;
  right: 8%;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transform: translateY(-50%);
}

.hero::after {
  content: "03";
  position: absolute;
  right: 11.4%;
  bottom: -0.12em;
  color: var(--coral);
  font-family: var(--serif);
  font-size: clamp(8rem, 17vw, 16rem);
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.hero-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.issue-date {
  margin-right: 3%;
  font-variant-numeric: tabular-nums;
}

.hero-title-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: end;
  gap: 40px;
  max-width: 1100px;
  margin-top: 63px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(5.5rem, 10.2vw, 9.2rem);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: -0.064em;
}

.hero h1 em {
  color: var(--coral);
  font-weight: 400;
}

.hero-note {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 7px;
  font-size: 0.91rem;
  line-height: 1.55;
}

.sun-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.route-line {
  position: absolute;
  left: 47%;
  right: 5%;
  bottom: 32px;
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--ink);
}

.route-line span {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.explore {
  padding: 84px 3.3vw 110px;
}

.explore-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 390px);
  align-items: end;
  gap: 40px;
}

.section-index,
.detail-label {
  margin-bottom: 13px;
  font-size: 0.69rem;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.explore h2 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 5.2vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.explore-copy {
  max-width: 360px;
  padding-bottom: 4px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 310px;
  margin-top: 54px;
  border-block: 1px solid var(--ink);
}

.search-field,
.select-field {
  position: relative;
  min-width: 0;
  min-height: 83px;
  display: grid;
  align-content: center;
}

.search-field {
  grid-template-columns: 26px 1fr;
  column-gap: 18px;
  padding: 12px 26px;
  border-right: 1px solid var(--ink);
}

.search-field svg {
  grid-row: 1 / 3;
  align-self: center;
  width: 24px;
}

.search-field label,
.select-field label {
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-field input,
.select-field select {
  min-width: 0;
  width: 100%;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.search-field input::placeholder {
  color: rgba(24, 24, 22, 0.55);
  opacity: 1;
}

.search-field input:focus,
.select-field select:focus {
  outline: 0;
}

.search-field:focus-within,
.select-field:focus-within {
  box-shadow: inset 0 0 0 3px var(--coral);
}

.select-field {
  padding: 12px 50px 12px 26px;
}

.select-field select {
  appearance: none;
  cursor: pointer;
}

.select-field svg {
  position: absolute;
  right: 26px;
  bottom: 25px;
  width: 16px;
  pointer-events: none;
}

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

#result-count {
  font-size: 0.75rem;
  font-weight: 640;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.clear-filters {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

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

.event-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.day-group {
  min-width: 0;
}

.day-group + .day-group {
  border-left: 1px solid var(--ink);
}

.day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  min-height: 106px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.day-group:nth-child(2) .day-heading {
  color: var(--ink);
  background: var(--acid);
}

.day-heading h2 {
  font-size: clamp(2rem, 3vw, 3.15rem);
}

.day-heading p {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-card {
  position: relative;
  min-width: 0;
  min-height: 267px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 35px;
  gap: 20px;
  padding: 29px 26px;
  border-bottom: 1px solid var(--ink);
  transition: background-color 170ms ease;
}

.event-card:hover,
.event-card:focus-within {
  background: #fffdf6;
}

.card-index {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.card-content {
  min-width: 0;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-price {
  color: #5e5d55;
}

.event-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.2vw, 2.2rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

.open-item {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.open-item::after {
  content: "";
  position: absolute;
  inset: 0;
}

.open-item:focus-visible {
  outline-offset: 5px;
}

.card-summary {
  display: -webkit-box;
  margin-top: 13px;
  overflow: hidden;
  color: #4f4e48;
  font-size: 0.84rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-practical {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 14px;
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.35;
}

.card-time {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.card-place {
  text-align: right;
}

.card-arrow {
  align-self: center;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.event-card:hover .card-arrow,
.event-card:focus-within .card-arrow {
  color: white;
  background: var(--coral);
  transform: translateX(3px);
}

.card-arrow svg {
  width: 18px;
}

.empty-state {
  min-height: 410px;
  padding: 76px 24px;
  border-block: 1px solid var(--ink);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--coral);
  font-family: var(--serif);
  font-size: 2rem;
}

.empty-state h2 {
  font-size: 3rem;
}

.empty-state p {
  margin-top: 12px;
}

.reset-button {
  min-height: 48px;
  margin-top: 28px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.reset-button:hover {
  color: var(--ink);
  background: var(--acid);
}

.site-footer {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 3.3vw;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.site-footer span {
  font-weight: 760;
}

.detail-dialog {
  width: min(610px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: -16px 0 60px rgba(0, 0, 0, 0.18);
}

.detail-dialog::backdrop {
  background: rgba(24, 24, 22, 0.48);
  backdrop-filter: blur(3px);
}

.detail-dialog[open] {
  animation: slide-in 280ms cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: translateX(0); }
}

.detail-panel {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-topbar {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--ink);
  background: rgba(243, 239, 229, 0.96);
}

.detail-topbar p {
  font-size: 0.7rem;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-detail {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.close-detail:hover {
  color: white;
  background: var(--ink);
  transform: rotate(6deg);
}

.close-detail svg {
  width: 20px;
}

.detail-content {
  padding: 44px 48px calc(54px + env(safe-area-inset-bottom));
}

.detail-number {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 35px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
  font-size: 0.78rem;
}

.detail-category {
  margin-bottom: 15px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-content h2 {
  font-family: var(--serif);
  font-size: clamp(3.3rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.detail-summary {
  margin-top: 25px;
  color: #42413b;
  font-size: 1rem;
  line-height: 1.6;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 38px 0 0;
  border-top: 1px solid var(--ink);
}

.detail-facts div {
  min-width: 0;
  min-height: 88px;
  padding: 17px 16px 15px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.detail-facts div:nth-child(even) {
  padding-left: 20px;
}

.detail-facts dt {
  margin-bottom: 7px;
  font-size: 0.63rem;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-facts dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.detail-when,
.detail-price {
  font-variant-numeric: tabular-nums;
}

.detail-body-wrap {
  margin-top: 37px;
  padding: 28px;
  background: var(--blue);
}

.detail-body p {
  font-size: 0.91rem;
  line-height: 1.6;
}

.detail-body p + p {
  margin-top: 1em;
}

.save-item {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-weight: 680;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.save-item:hover,
.save-item[aria-pressed="true"] {
  color: var(--ink);
  background: var(--acid);
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .edition {
    display: none;
  }

  .header-saved {
    min-height: 40px;
  }

  .header-saved > span:nth-of-type(1) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero {
    min-height: 405px;
    padding: 28px 18px 24px;
  }

  .hero::before {
    width: 250px;
    top: 72%;
    right: -80px;
  }

  .hero::after {
    right: -5px;
    bottom: 0;
    font-size: 8.7rem;
  }

  .issue-date {
    margin-right: 0;
  }

  .hero-title-wrap {
    display: block;
    margin-top: 50px;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 23vw, 6rem);
    line-height: 0.76;
  }

  .hero-note {
    width: 230px;
    grid-template-columns: 33px 1fr;
    gap: 12px;
    margin-top: 44px;
    font-size: 0.78rem;
  }

  .sun-mark {
    width: 33px;
    height: 33px;
  }

  .route-line {
    display: none;
  }

  .explore {
    padding: 62px 18px 74px;
  }

  .explore-heading {
    display: block;
  }

  .explore h2 {
    font-size: 3.15rem;
  }

  .explore-copy {
    margin-top: 22px;
  }

  .filters {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }

  .search-field {
    min-height: 74px;
    padding-inline: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .select-field {
    min-height: 74px;
    padding-left: 18px;
  }

  .results-line {
    min-height: 62px;
  }

  .event-groups {
    grid-template-columns: 1fr;
  }

  .day-group + .day-group {
    border-left: 0;
    margin-top: 44px;
    border-top: 1px solid var(--ink);
  }

  .day-heading {
    min-height: 89px;
    padding: 19px 18px;
  }

  .day-heading h2 {
    font-size: 2.3rem;
  }

  .event-card {
    min-height: 250px;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 15px;
    padding: 25px 18px;
  }

  .card-index {
    width: 32px;
    height: 32px;
  }

  .card-arrow {
    display: none;
  }

  .event-card h3 {
    font-size: 1.8rem;
  }

  .card-summary {
    font-size: 0.8rem;
  }

  .card-practical {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 19px;
  }

  .card-place {
    text-align: left;
  }

  .site-footer {
    min-height: 150px;
    display: block;
    padding: 35px 18px;
    line-height: 1.5;
  }

  .site-footer p + p {
    margin-top: 13px;
  }

  .detail-dialog {
    width: 100%;
    height: 100dvh;
  }

  .detail-topbar {
    min-height: 66px;
    padding: 0 18px;
  }

  .detail-content {
    padding: 30px 20px calc(40px + env(safe-area-inset-bottom));
  }

  .detail-number {
    width: 46px;
    height: 46px;
    margin-bottom: 27px;
  }

  .detail-content h2 {
    font-size: 3.2rem;
  }

  .detail-summary {
    font-size: 0.94rem;
  }

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

  .detail-facts div,
  .detail-facts div:nth-child(even) {
    min-height: 70px;
    padding: 14px 0;
    border-right: 0;
  }

  .detail-body-wrap {
    padding: 23px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
