:root {
  --bg: #edeae4;
  --surface: #f7f5f1;
  --ink: #22252a;
  --muted: #565a62;
  --birch: #d9c7a7;
  --accent: var(--ink);
  --accent-ink: var(--bg);
  --keyline: rgba(34, 37, 42, 0.22);
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 0;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip;
}

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

img,
svg {
  display: block;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  padding-inline: 32px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  padding-block: 12px;
}

.site-dates {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  min-height: 520px;
  padding-block: 96px 72px;
  padding-inline: 32px;
  border-bottom: 1px solid var(--keyline);
  overflow: clip;
}

.hero-copy {
  grid-column: 1 / span 6;
  align-self: start;
  display: grid;
  gap: 24px;
  max-width: 34ch;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 44ch;
}

.hero-figure {
  grid-column: 7 / -1;
  position: relative;
  align-self: end;
  justify-self: end;
  display: grid;
  justify-items: end;
  padding-top: 48px;
  border-top: 1px solid var(--ink);
  animation: rise 700ms var(--ease) both;
}

.numeral {
  font-size: clamp(9rem, 24vw, 21rem);
  font-weight: 200;
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.numeral-caption {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

.vertical-label {
  position: absolute;
  top: 96px;
  right: 16px;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta,
.ghost,
.toggle,
.save-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-block: 12px;
  padding-inline: 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.cta {
  justify-self: start;
  background: var(--accent);
  color: var(--accent-ink);
}

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

.cta:active,
.ghost:active,
.toggle:active,
.save-item:active,
.open-item:active,
.wordmark:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover {
    background: #3a3e45;
    border-color: #3a3e45;
  }

  .ghost:hover,
  .toggle:hover,
  .save-item:hover {
    background: var(--ink);
    color: var(--bg);
  }

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

  .open-item:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .wordmark:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .row:hover {
    background: var(--surface);
  }

  .row:hover .row-time {
    color: var(--ink);
  }
}

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

:where(a, button, input, select):focus:not(:focus-visible) {
  outline: 1px solid var(--muted);
  outline-offset: 2px;
}

.board {
  padding-block: 96px;
  padding-inline: 32px;
}

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.board h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.board-count {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding-block: 24px 32px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding-inline: 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  appearance: auto;
}

.toggle {
  justify-self: start;
  white-space: nowrap;
}

.toggle-mark {
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
}

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

.toggle-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.day {
  border-top: 1px solid var(--keyline);
}

.day-title {
  padding-block: 20px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--keyline);
}

.row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding-block: 20px;
  padding-inline: 16px;
  margin-inline: -16px;
  border-bottom: 1px solid var(--keyline);
  transition: background-color 180ms var(--ease);
}

.row-time {
  font-family: var(--mono);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--muted);
  transition: color 180ms var(--ease);
}

.row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.open-item {
  justify-self: start;
  min-height: 44px;
  padding-block: 10px;
  padding-inline: 0;
  font: inherit;
  font-size: 19px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  transition: transform 180ms var(--ease);
}

.row-meta {
  font-size: 15px;
  color: var(--muted);
}

.row-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-block: 4px;
  padding-inline: 8px;
  border: 1px solid var(--keyline);
  color: var(--muted);
}

.row-price {
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}

.saved-mark {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-block: 4px;
  padding-inline: 8px;
  background: var(--birch);
}

.row:focus-within {
  background: var(--surface);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding-block: 64px;
  border-top: 1px solid var(--keyline);
}

.empty-title {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.empty-hint {
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.detail {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow-y: auto;
}

.detail::backdrop {
  background: rgba(34, 37, 42, 0.42);
}

.detail-head,
.detail-body,
.detail-actions,
.facts {
  padding-inline: 32px;
}

.detail-head {
  display: grid;
  gap: 12px;
  padding-top: 32px;
}

.detail-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-block: 24px;
  padding-block: 20px;
  border-block: 1px solid var(--keyline);
}

.fact {
  display: grid;
  gap: 2px;
}

.fact dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  font-size: 16px;
}

.detail-body {
  display: grid;
  gap: 16px;
  max-width: 60ch;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 32px;
}

.detail-actions .save-item {
  min-width: 220px;
}

.site-footer {
  display: grid;
  gap: 8px;
  padding-block: 40px;
  padding-inline: 32px;
  border-top: 1px solid var(--ink);
  font-size: 14px;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 64px 48px;
  }

  .hero-copy,
  .hero-figure {
    grid-column: 1;
  }

  .hero-figure {
    justify-self: start;
    justify-items: start;
    padding-top: 32px;
  }

  .vertical-label {
    display: none;
  }

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

  .toggle {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-header,
  .hero,
  .board,
  .site-footer {
    padding-inline: 20px;
  }

  .board {
    padding-block: 64px;
  }

  .hero {
    padding-block: 48px 40px;
  }

  .hero-copy {
    max-width: none;
  }

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

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-inline: 0;
    padding-inline: 0;
  }

  .row-time {
    font-size: 18px;
  }

  .row-side {
    justify-content: flex-start;
  }

  .row:hover,
  .row:focus-within {
    background: transparent;
  }

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

  .detail {
    width: calc(100% - 24px);
  }

  .detail-head,
  .detail-body,
  .detail-actions,
  .facts {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .cta:active,
  .ghost:active,
  .toggle:active,
  .save-item:active,
  .open-item:active,
  .wordmark:active {
    transform: none;
  }
}
