/* Long Light — a weekend almanac
   Nordic-minimal paper, one burnt-sun accent, a daylight table as the organising instrument. */

@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("assets/literata.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #edeae4;
  --surface: #f8f6f2;
  --ink: #22252a;
  --ink-2: #3a3d42;
  --muted: #595b60;
  --line: #d3cdc2;
  --edge: #8a857c;
  --birch: #d9c7a7;
  --accent: #a63d14;
  --accent-deep: #8a3210;
  --accent-ink: #fff8f2;
  --accent-wash: #f4e3d8;
  --night: #22252a;
  --night-ink: #ece8e0;
  --night-muted: #b4b0a8;
  --night-line: rgba(236, 232, 224, 0.16);
  --accent-on-night: #f0895b;

  --display: "Work Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
  --lane: 48px;
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus,
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.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 {
  position: absolute;
  left: 16px; top: -64px;
  z-index: 50;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

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

/* ---------- masthead ---------- */

.masthead { border-bottom: 1px solid var(--line); }
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark {
  width: 34px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  overflow: visible;
}
.brand__sun {
  stroke: var(--accent);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 900ms var(--ease) 150ms forwards;
}
.brand__ray {
  transform-origin: 20px 20px;
  transition: transform 0.25s var(--ease);
}
.brand__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__link,
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.nav__link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 6px;
}
.nav__link:focus-visible { text-decoration-color: currentColor; }
.nav__cta {
  background: var(--accent);
  color: var(--accent-ink);
  padding-inline: 16px;
}
.nav__count {
  min-width: 24px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  background: var(--accent-ink);
  color: var(--accent-deep);
  border-radius: var(--radius);
}
.nav__link:active,
.nav__cta:active { transform: scale(0.97); }

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

.hero { padding-block: 40px 48px; }
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
}
.hero__lead { grid-column: 1 / span 4; align-self: end; }
.glance { grid-column: 5 / -1; }

.hero__title {
  display: block;
  margin-top: 20px;
  font-weight: 400;
}
.hero__numeral {
  display: block;
  font-size: clamp(9rem, 18.5vw, 17rem);
  font-weight: 200;
  line-height: 0.78;
  letter-spacing: -0.06em;
  margin-left: -0.06em;
  font-variant-numeric: lining-nums;
  animation: settle 900ms var(--ease) both;
}
.hero__phrase {
  display: block;
  max-width: 15ch;
  margin-top: 20px;
  font-size: clamp(1.625rem, 2.3vw, 2.125rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  animation: settle 900ms var(--ease) 90ms both;
}
.hero__text {
  max-width: 42ch;
  margin-top: 20px;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* the daylight table */
.glance {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 24px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.glance__days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.glance__day { padding-top: 10px; border-top: 2px solid var(--ink); }
.glance__dow { font-size: 15px; font-weight: 600; }
.glance__facts { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.glance .ribbon { margin-top: auto; }
.glance__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}
.glance__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.glance__key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.key {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-left: 10px;
  border: 1px solid var(--ink);
}
.key:first-child { margin-left: 0; }
.key--saved { background: var(--accent); border-color: var(--accent); }
.key--out { border-style: dashed; opacity: 0.45; }

.ribbon {
  --label: 56px;
  --lane: 54px;
  position: relative;
  display: grid;
  gap: 20px;
  padding-top: 30px;
}
.ribbon__axis,
.ribbon__light {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--label) + 12px);
  right: 0;
  pointer-events: none;
}
.ribbon__light {
  top: 30px;
  overflow: hidden;
  background: linear-gradient(90deg,
    rgba(217, 199, 167, 0) 0%,
    rgba(217, 199, 167, 0.35) 18%,
    rgba(217, 199, 167, 0.55) 42%,
    rgba(217, 199, 167, 0.4) 70%,
    rgba(217, 199, 167, 0) 86%);
}
.ribbon__light::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 18%;
  background: linear-gradient(90deg, rgba(248, 246, 242, 0), rgba(248, 246, 242, 0.7), rgba(248, 246, 242, 0));
  animation: sweep 14s linear 1.2s infinite;
}
.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--at);
  border-left: 1px solid var(--line);
}
.tick--minor { border-left-style: dashed; opacity: 0.7; }
.tick__label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding-inline: 2px;
}

.ribbon__day {
  position: relative;
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.ribbon__label {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
  line-height: 1.1;
}
.ribbon__dow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ribbon__date {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.03em;
}
.ribbon__track {
  position: relative;
  height: calc(var(--lanes) * var(--lane) - 4px);
}

.bar {
  position: absolute;
  top: calc(var(--lane) * var(--lane-index, 0));
  left: var(--start);
  width: var(--span);
  height: calc(var(--lane) - 4px);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 4px 8px;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.25s var(--ease), border-color 0.2s var(--ease);
  animation: reveal 700ms var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 250ms);
}
.bar__time {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.8;
}
.bar__text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@container (max-width: 72px) {
  .bar__text { display: none; }
}
@container (max-width: 40px) {
  .bar__time { display: none; }
}
.bar.is-saved {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.bar.is-out {
  opacity: 0.35;
  border-style: dashed;
}
.bar.is-lit {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
  opacity: 1;
}
.bar.is-saved.is-lit { background: var(--accent-deep); border-color: var(--accent-deep); }
.bar:focus-visible { outline-offset: 3px; z-index: 2; }
.bar:active { transform: scale(0.97); }

/* ---------- board: listings + shortlist ---------- */

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: start;
  padding-block: 8px 128px;
}

.listings { scroll-margin-top: 16px; min-width: 0; }

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding-block: 16px 12px;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--search { flex: 1 1 220px; }
.field--select { flex: 0 1 200px; }
.field__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.input::placeholder { color: #6a6c70; }
.input:focus,
.input:focus-visible { border-color: var(--ink); outline-offset: 1px; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2322252a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
}
.segmented__btn {
  min-height: 46px;
  min-width: 56px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  border: 0;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.segmented__btn + .segmented__btn { border-left: 1px solid var(--line); }
.segmented__btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.segmented__btn:focus-visible { outline-offset: -4px; outline-color: var(--accent); }
.segmented__btn[aria-pressed="true"]:focus-visible { outline-color: var(--accent-ink); }
.segmented__btn:active { transform: scale(0.97); }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.toggle__box {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.toggle__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s var(--ease);
}
.toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); }
.toggle[aria-pressed="true"] .toggle__box { background: var(--accent); border-color: var(--accent); }
.toggle[aria-pressed="true"] .toggle__box::after { transform: rotate(45deg) scale(1); }
.toggle:active { transform: scale(0.97); }

.toolbar__status {
  flex: 1 1 100%;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* day groups */
.days { display: grid; gap: 40px; margin-top: 32px; }
.day {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
}
.day__head {
  position: sticky;
  top: 150px;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 16px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.day__title { display: flex; align-items: baseline; gap: 12px; font-weight: 400; }
.day__dow {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.day__date,
.day__count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.day__list { border-bottom: 1px solid var(--line); }

.row {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 104px;
  gap: 24px;
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.row:first-child { border-top-color: var(--ink); }
.row.is-saved { box-shadow: inset 3px 0 0 var(--accent); }
.row.is-lit { background: var(--surface); }
.row:has(.row__open:focus-visible) {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.row__time { display: flex; flex-direction: column; }
.row__start {
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  transition: color 0.2s var(--ease);
}
.row.is-lit .row__start { color: var(--accent); }
.row__end {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.row__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.row__title {
  margin-block: 6px 8px;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.row__open {
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s var(--ease);
}
.row__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.row__open:focus,
.row__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.row:active { background: var(--surface); }
.row:active .row__title { transform: translateX(2px); }
.row__summary {
  max-width: 60ch;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}
.row__where {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
.row__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}
.row__price { font-family: var(--mono); font-size: 18px; }
.row__saved {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.row__saved::before { content: "✳ "; }
.row__arrow {
  margin-top: auto;
  font-size: 22px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.row.is-lit .row__arrow { opacity: 1; transform: none; }

/* empty state */
.empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-top: 32px;
  padding: 40px 32px;
  border: 1px dashed var(--edge);
  background: var(--surface);
}
.empty__mark {
  font-size: 128px;
  font-weight: 200;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--birch);
}
.empty__title { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.empty__text {
  max-width: 48ch;
  margin-block: 8px 20px;
  font-family: var(--text);
  font-size: 16px;
  color: var(--ink-2);
}

.noscript {
  margin-top: 32px;
  font-family: var(--text);
  font-size: 17px;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary.is-on {
  background: var(--surface);
  color: var(--accent-deep);
  border-color: var(--accent);
}
.btn--ghost { background: transparent; border-color: var(--ink); }
.btn--close {
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  border-color: var(--edge);
  font-weight: 500;
}
.btn__glyph { font-size: 20px; line-height: 1; }

/* shortlist — the printed plan */
.shortlist {
  position: sticky;
  top: 24px;
  margin-top: 16px;
  scroll-margin-top: 16px;
}
.shortlist__card {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  background: var(--night);
  color: var(--night-ink);
  border-radius: var(--radius);
}
.shortlist__card .eyebrow { color: var(--night-muted); }
.shortlist__title {
  margin-block: 4px 16px;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.shortlist__empty {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--night-muted);
}
.tally { border-top: 1px solid var(--night-line); }
.tally__cell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 8px;
  border-bottom: 1px solid var(--night-line);
}
.tally__key { font-size: 14px; color: var(--night-muted); }
.tally__value { font-family: var(--mono); font-size: 16px; }
.tally__cell.is-warn .tally__value { color: var(--accent-on-night); }

.plan__day {
  margin-block: 24px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night-muted);
}
.slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  padding-block: 8px;
  border-bottom: 1px solid var(--night-line);
}
.slot.is-clash { box-shadow: inset 2px 0 0 var(--accent-on-night); padding-left: 12px; }
.slot__open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 44px;
  padding: 4px 0;
  text-align: left;
  background: none;
  border: 0;
  color: var(--night-ink);
  transition: color 0.2s var(--ease), transform 0.15s var(--ease);
}
.slot__open:focus,
.slot__open:focus-visible { outline-color: var(--accent-on-night); }
.slot__open:active { transform: scale(0.98); }
.slot__time { font-family: var(--mono); font-size: 13px; color: var(--night-muted); }
.slot__title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s var(--ease);
}
.slot__meta {
  grid-column: 1;
  font-size: 14px;
  color: var(--night-muted);
}
.slot__remove {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  background: transparent;
  color: var(--night-ink);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.slot__remove:focus,
.slot__remove:focus-visible { outline-color: var(--accent-on-night); }
.slot__remove:active { transform: scale(0.97); }
.slot__clash {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 14px;
  color: var(--accent-on-night);
  animation: flag 400ms var(--ease) both;
}

/* ---------- footer ---------- */

.footer {
  padding-block: 64px;
  background: var(--night);
  color: var(--night-ink);
}
.footer__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: end;
}
.footer__brand {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.footer__note {
  max-width: 56ch;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--night-muted);
}
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--night-ink);
  text-underline-offset: 5px;
  transition: color 0.2s var(--ease);
}
.footer__link:focus,
.footer__link:focus-visible { outline-color: var(--accent-on-night); }

/* ---------- detail sheet ---------- */

.sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(600px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-left: 1px solid var(--line);
}
.sheet[open] { animation: sheet-in 260ms var(--ease) both; }
.sheet::backdrop {
  background: rgba(34, 37, 42, 0.45);
  animation: fade 200ms var(--ease) both;
}
.sheet__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
  padding: 0 40px;
}
.sheet__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.sheet__title {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.sheet__when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.sheet__time { font-family: var(--mono); font-size: 28px; letter-spacing: -0.03em; }
.sheet__date { font-size: 16px; color: var(--muted); }

.minimap__label {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.minimap__track {
  position: relative;
  height: 24px;
  background: linear-gradient(90deg, rgba(217, 199, 167, 0.2), rgba(217, 199, 167, 0.6) 45%, rgba(217, 199, 167, 0.2));
  border-block: 1px solid var(--line);
}
.minimap__mark {
  position: absolute;
  top: 7px;
  height: 8px;
  left: var(--start);
  width: var(--span);
  background: var(--edge);
  opacity: 0.5;
}
.minimap__mark.is-saved { background: var(--ink); opacity: 1; }
.minimap__mark.is-this {
  top: 2px;
  height: 18px;
  background: var(--accent);
  opacity: 1;
  animation: reveal 600ms var(--ease) 200ms both;
}

.sheet__clash {
  padding: 10px 14px;
  font-size: 15px;
  color: #7a2c0d;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}
.facts__cell { padding-block: 12px; border-top: 1px solid var(--line); }
.facts__key {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts__value { margin-top: 2px; font-size: 17px; font-weight: 500; }

.sheet__label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sheet__text p {
  max-width: 60ch;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}
.sheet__text p + p { margin-top: 12px; }

.sheet__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: auto;
  padding-block: 16px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sheet__hint { font-size: 14px; color: var(--muted); }

/* ---------- hover (fine pointers only) ---------- */

@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand__ray { transform: rotate(8deg); }
  .nav__link:hover { text-decoration-color: currentColor; }
  .nav__cta:hover { background: var(--accent-deep); }
  .bar:hover { cursor: pointer; }
  .input:hover { border-color: var(--ink); }
  .segmented__btn:hover:not([aria-pressed="true"]) { background: var(--bg); }
  .toggle:hover { border-color: var(--ink); }
  .row__open:hover { text-decoration-color: currentColor; }
  .btn--primary:hover { background: var(--accent-deep); }
  .btn--primary.is-on:hover { background: var(--accent-wash); color: var(--accent-deep); }
  .btn--ghost:hover { background: var(--ink); color: var(--surface); }
  .btn--close:hover { border-color: var(--ink); background: var(--bg); }
  .slot__open:hover .slot__title { text-decoration-color: var(--accent-on-night); }
  .slot__remove:hover { border-color: var(--night-ink); }
  .footer__link:hover { color: var(--accent-on-night); }
}

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

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(560%); }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes flag {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__numeral,
  .hero__phrase,
  .slot__clash { animation-name: fade; }
  .sheet[open] { animation-name: fade; }
  .bar,
  .minimap__mark.is-this { animation: none; }
  .brand__sun { animation: none; stroke-dashoffset: 0; }
  .ribbon__light::after { animation: none; display: none; }
  .row__arrow { transform: none; }
  .bar:active,
  .btn:active,
  .toggle:active,
  .segmented__btn:active,
  .nav__link:active,
  .nav__cta:active,
  .slot__open:active,
  .slot__remove:active,
  .row:active .row__title { transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .hero__lead { grid-column: 1 / -1; }
  .hero__title { display: flex; align-items: flex-end; gap: 32px; }
  .hero__phrase { max-width: 20ch; margin-top: 0; padding-bottom: 6px; }
  .glance { grid-column: 1 / -1; }
  .board { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
}

@media (max-width: 960px) {
  .board { grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
  .shortlist { position: static; margin-top: 0; }
  .shortlist__card { max-height: none; overflow: visible; }
  .toolbar { position: static; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .day__head {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 12px;
  }
  .footer__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 640px) {
  .masthead__row { min-height: 64px; }
  .brand__name { font-size: 17px; }
  .nav__link { padding-inline: 10px; }
  .nav__cta { padding-inline: 12px; }

  .hero { padding-block: 28px 40px; }
  .hero__title { gap: 16px; margin-top: 16px; }
  .hero__numeral { font-size: clamp(7rem, 36vw, 9rem); }
  .hero__phrase { font-size: 1.3125rem; padding-bottom: 2px; }
  .hero__text { font-size: 16px; }

  .glance { padding: 18px 16px 20px; }
  .glance__days { gap: 16px; margin-bottom: 18px; }
  .glance__dow { font-size: 14px; }
  .glance__facts { font-size: 12px; }
  .ribbon { --label: 36px; --lane: 48px; gap: 14px; }
  .ribbon__date { font-size: 22px; }
  .ribbon__dow { font-size: 11px; letter-spacing: 0.08em; }
  .bar { padding: 0; }
  .bar__time,
  .bar__text { display: none; }

  .field--search { flex-basis: 100%; }
  .field--select { flex: 1 1 140px; }
  .field--saved { flex: 1 1 100%; }
  .field--saved .field__label { display: none; }
  .toggle { width: 100%; }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "time side" "main main";
    gap: 8px 16px;
    padding: 20px 4px;
  }
  .row__time { grid-area: time; flex-direction: row; align-items: baseline; gap: 4px; }
  .row__start { font-size: 22px; }
  .row__main { grid-area: main; }
  .row__side { grid-area: side; flex-direction: row; align-items: baseline; gap: 12px; }
  .row__arrow { display: none; }
  .row__price { font-size: 16px; }

  .empty { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 28px 20px; }
  .empty__mark { font-size: 80px; }

  .shortlist__card { padding: 24px 20px; }

  .sheet { width: 100vw; border-left: 0; }
  .sheet__inner { padding: 0 20px; gap: 16px; }
  .sheet__time { font-size: 24px; }
  .facts { column-gap: 16px; }
}
