/* Atkinson Hyperlegible Next (OFL, /fonts/OFL.txt), preloaded by every page. "block" never swaps fonts;
   the fallback is Arial resized to its metrics, so text keeps its place while the font loads. */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-hyperlegible-next.a326a7b8.woff2") format("woff2"); font-weight: 400 800; font-display: block; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"); font-weight: 100 599; size-adjust: 98.79%; ascent-override: 99.61%; descent-override: 31.99%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Hyperlegible Next Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); font-weight: 600 1000; size-adjust: 101.04%; ascent-override: 97.39%; descent-override: 31.27%; line-gap-override: 0%; }

/* Keep the site's existing paper, ink, red and dashed borders. */
:root {
  color-scheme: light;
  --paper: #fbfaf8;
  --ink: #1b0905;
  --red: #ff321b;
  --rule: #493a33;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible Next Fallback", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }

.boxd-shell {
  max-width: 1400px;
  min-height: 100dvh;
  margin: 0 32px;
  border-left: 1px dashed var(--rule);
  border-right: 1px dashed var(--rule);
}

.site-header {
  min-height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px dashed var(--rule);
}

.brand { font-size: 30px; font-weight: 900; letter-spacing: -.075em; line-height: 1; text-decoration: none; }
.brand span { color: var(--red); }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a { font-size: 16px; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (min-width: 1464px) {
  .boxd-shell { margin: 0 auto; }
}

.boxd {
  padding: 36px 32px 64px;
  min-height: 360px;
  scroll-margin-top: 24px;
}

.boxd [hidden] { display: none; }

.boxd-header h1 {
  margin: 0;
  font-size: clamp(40px, 4vw, 58px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: 1;
  text-transform: uppercase;
}

.boxd-source {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.boxd-source a { text-underline-offset: 3px; }
.boxd-source a:hover { text-decoration-thickness: 2px; }
.boxd-source a:focus-visible, .boxd-film:focus-visible, .boxd-more:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 5px;
}

.boxd-status { margin: 24px 0; font-size: 15px; line-height: 1.5; }

.boxd-timeline {
  position: relative;
  max-width: 1120px;
  margin: 36px 0 0 6px;
  padding: 0;
  list-style: none;
}

.boxd-timeline:empty { margin: 0; }

.boxd-timeline:not(:empty)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

.boxd-day { position: relative; padding: 0 0 40px 28px; }
.boxd-day:last-child { padding-bottom: 8px; }

.boxd-day::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

.boxd-date {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.04em;
}

.boxd-films {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px 32px;
  margin-top: 18px;
}

.boxd-film {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}

.boxd-poster {
  position: relative;
  display: block;
  width: 88px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e6e1db;
}

.boxd-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }

.boxd-film-info { padding-top: 3px; min-width: 0; }
.boxd-film-title { display: block; font-size: 18px; font-weight: 800; line-height: 1.22; letter-spacing: -.035em; }
.boxd-film:hover .boxd-film-title { text-decoration: underline; text-underline-offset: 3px; }
.boxd-film-year { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; }
.boxd-film-rating { display: block; margin-top: 12px; font-size: 16px; letter-spacing: 1px; line-height: 1.3; }
.boxd-film-rewatch { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; }
.boxd-film-event { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.boxd-film-event::before { content: '▶'; content: '▶' / ''; margin-right: 6px; color: var(--red); font-size: 10px; }
.boxd-film-event[data-kind="finish"]::before { content: '■'; content: '■' / ''; }

.boxd-more {
  margin: 28px 0 0 34px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 700 15px var(--font);
}

.boxd-more span { margin-left: 12px; }
.boxd-more:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .boxd-shell { margin: 0 12px; }
  .site-header { padding: 0 20px; }
  .brand { font-size: 27px; }
  .site-header nav { gap: 20px; }
  .boxd { padding: 32px 20px 48px; scroll-margin-top: 12px; }
  .boxd-header h1 { font-size: 44px; }
  .boxd-date { font-size: 19px; }
  .boxd-day { padding-left: 22px; padding-bottom: 32px; }
  .boxd-films { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 16px; }
  .boxd-film { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .boxd-poster { width: 72px; }
  .boxd-film-title { font-size: 17px; }
  .boxd-more { margin-left: 28px; }
}
