/* ============================================================
   TWO DAYS — a weekend listings sheet
   Paper, ink, one vermilion accent. Radius 0 on purpose.
   ============================================================ */

@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  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 700;
  font-display: swap;
}

:root {
  --paper: #f3ecdd;
  --paper-hi: #faf5e9;
  --ink: #1d1912;
  --ink-2: #57503f;
  --line: rgba(29, 25, 18, 0.28);
  --line-strong: #1d1912;
  --accent: #c43d12;
  --accent-deep: #a02f08;
  --on-ink-muted: rgba(243, 236, 221, 0.72);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-serif: "Literata", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint paper grain via repeating gradient */
  background-image: repeating-linear-gradient(
    0deg, rgba(29, 25, 18, 0.014) 0 1px, transparent 1px 3px);
}

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- photos: one warm duotone treatment ---------- */

.photo {
  overflow: hidden;
  background: var(--ink);
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.34) saturate(0.9) contrast(1.02) brightness(1.03);
}

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

.masthead { padding-top: 18px; }

.topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.topline-mid { color: var(--accent-deep); }

.mast-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-block: 22px 18px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(46px, 5.4vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark-dot { color: var(--accent); padding-inline: 0.04em; }
.wordmark-sm { font-size: 34px; }

.mast-note {
  text-align: right;
  color: var(--ink-2);
  flex-shrink: 0;
}

.rule-double {
  border-top: 3px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  height: 6px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
  padding-block: clamp(36px, 5vw, 64px) clamp(30px, 4vw, 52px);
}

.kicker {
  color: var(--accent-deep);
  margin-bottom: 18px;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.01em;
}

.hero-copy h1 {
  font-size: clamp(46px, 6.2vw, 92px);
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero-copy h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.94em;
  color: var(--accent-deep);
}

.standfirst {
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-2);
}

.hero-art { position: relative; padding-bottom: 30px; }
.hero-photo { aspect-ratio: 4 / 3; }
.hero-inset {
  position: absolute;
  left: -14px; bottom: 0;
  width: 44%;
  aspect-ratio: 5 / 4;
  border: 5px solid var(--paper);
  box-shadow: 0 2px 0 var(--line-strong);
}
.hero-art figcaption {
  position: absolute;
  right: 0; bottom: 6px;
  color: var(--ink-2);
  max-width: 30ch;
  text-align: right;
}

/* ---------- index strip ---------- */

.index-strip {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.index-inner {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.index-label {
  display: flex;
  align-items: center;
  padding: 10px 18px 10px 0;
  color: var(--ink-2);
}
.index-btn {
  appearance: none;
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.index-btn sup {
  color: var(--accent-deep);
  font-size: 9px;
  margin-left: 4px;
}
.index-btn:hover, .index-btn[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}
.index-btn:hover sup, .index-btn[aria-current="true"] sup { color: var(--paper); }

/* ---------- toolbar ---------- */

.toolbar-zone {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 3px solid var(--line-strong);
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, auto) auto auto;
  gap: 14px;
  align-items: end;
  padding-block: 14px;
}

.field-label {
  display: block;
  color: var(--ink-2);
  margin-bottom: 5px;
  font-size: 10.5px;
}

.control {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper-hi);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 11px 12px;
  appearance: none;
}
.field-cat { position: relative; }
.field-cat::after {
  content: "";
  position: absolute;
  right: 12px; bottom: 17px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  pointer-events: none;
}
.field-cat .control { padding-right: 34px; }
select.control { cursor: pointer; }
.control::placeholder { color: rgba(29, 25, 18, 0.45); }
.control:focus-visible { outline-offset: 0; }

.btn-saved {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--paper-hi);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  height: 43px;
}
.btn-saved .ic { width: 15px; height: 15px; }
.btn-saved[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-hi);
}
.btn-saved:hover { background: var(--ink); color: var(--paper); }
.btn-saved[aria-pressed="true"]:hover { background: var(--accent-deep); }

.count {
  color: var(--ink-2);
  padding-bottom: 13px;
  white-space: nowrap;
  justify-self: end;
}

/* ---------- listings ---------- */

#main { padding-bottom: 24px; min-height: 40vh; scroll-margin-top: 92px; }

.day-section { margin-top: 44px; }
.day-head {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 3px solid var(--line-strong);
  padding-top: 22px;
  margin-bottom: 6px;
}
.day-stamp {
  flex-shrink: 0;
  width: 68px; height: 68px;
  background: var(--accent);
  color: var(--paper-hi);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.day-stamp .st-dow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.day-stamp .st-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
}
.day-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.day-sub { color: var(--ink-2); margin-left: auto; text-align: right; }

.item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 122px minmax(0, 1fr) 232px 96px 44px;
  gap: 22px;
  align-items: center;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  transition: background 0.14s ease, color 0.14s ease;
}
.day-section .item:first-of-type { border-top: 0; }

.item:hover, .item:focus-within {
  background: var(--ink);
  color: var(--paper);
}
.item:hover .item-no, .item:focus-within .item-no,
.item:hover .item-sum, .item:focus-within .item-sum,
.item:hover .item-meta, .item:focus-within .item-meta {
  color: var(--on-ink-muted);
}
.item:hover .item-no { color: var(--accent); }
.item:hover .chip, .item:focus-within .chip { border-color: rgba(243, 236, 221, 0.5); }
.item:hover .rowlink, .item:focus-within .rowlink { color: var(--paper); }
.item:hover .item-thumb { border-color: rgba(243, 236, 221, 0.35); }
.item:hover .save-row:not(:hover), .item:focus-within .save-row:not(:hover) {
  border-color: rgba(243, 236, 221, 0.5);
  color: var(--paper);
}

.item-no {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  align-self: start;
  padding-top: 5px;
}

.item-thumb {
  width: 122px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  transition: border-color 0.14s ease;
}

.item-main { min-width: 0; }

.rowlink {
  display: inline;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.22;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
/* stretched link: the whole row opens the detail */
.rowlink::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.item-sum {
  margin-top: 7px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
}

.item-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.9;
}
.item-meta strong {
  font-weight: 400;
  color: var(--ink);
  display: block;
}
.item:hover .item-meta strong, .item:focus-within .item-meta strong { color: var(--paper); }

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 4px 9px 3px;
  margin-bottom: 10px;
  transition: border-color 0.14s ease;
}

.item-price {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: right;
  white-space: nowrap;
}
.item-price .free { color: var(--accent-deep); }
.item:hover .item-price .free, .item:focus-within .item-price .free { color: var(--paper); }

.save-row {
  position: relative;
  z-index: 2; /* stays clickable above the stretched link */
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.save-row .ic { width: 17px; height: 17px; }
.save-row:hover { border-color: var(--paper); }
.save-row[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-hi);
}
.save-row[aria-pressed="true"] .ic-bookmark { fill: currentColor; }

.price-in-meta { display: none; }

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

.empty {
  border-top: 3px solid var(--line-strong);
  margin-top: 48px;
  padding: 52px 0 40px;
  display: grid;
  gap: 14px;
  justify-items: start;
}
.empty[hidden] { display: none; }
.empty-kicker { color: var(--accent-deep); }
.empty-title { font-size: clamp(38px, 4.5vw, 64px); }
.empty-copy { max-width: 46ch; color: var(--ink-2); font-size: 17px; }
.btn-clear {
  margin-top: 10px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 13px 22px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.btn-clear:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.noscript {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 20px;
  border: 1px solid var(--ink);
}

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

.detail {
  border: 2px solid var(--line-strong);
  border-radius: 0;
  padding: 0;
  width: min(980px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 64px));
  margin: auto;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.detail::backdrop {
  background: rgba(20, 16, 10, 0.55);
  animation: fade-in 0.2s ease;
}
.detail[open] { animation: sheet-in 0.24s cubic-bezier(0.2, 0.7, 0.2, 1); }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } }

body.sheet-open { overflow: hidden; }

.detail-inner { overflow-y: auto; max-height: inherit; }

.detail-media { position: relative; height: 230px; background: var(--ink); }
.detail-media .photo { position: absolute; inset: 0; }
.detail-media .photo img { height: 100%; }
.media-note {
  position: absolute;
  left: 16px; bottom: 14px;
  background: var(--paper);
  color: var(--ink-2);
  padding: 6px 10px;
  font-size: 10px;
}

.detail-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.detail-close:hover { background: var(--ink); color: var(--paper); }
.detail-close .ic { width: 18px; height: 18px; }

.detail-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  padding: 30px 36px 40px;
}

.detail-side { display: flex; flex-direction: column; gap: 22px; }
.detail-stamp {
  width: 84px; height: 84px;
  background: var(--accent);
  color: var(--paper-hi);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.detail-stamp .st-dow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.detail-stamp .st-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
}

.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.spec th {
  color: var(--ink-2);
  font-weight: 400;
  width: 96px;
  padding-right: 10px;
}
.spec td { color: var(--ink); }
.spec .spec-free { color: var(--accent-deep); }

.detail-main { padding-top: 2px; }
.chip-chip { margin-bottom: 14px; }
.detail-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
  text-wrap: balance;
}
.detail-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 20px;
  max-width: 58ch;
}
.detail-prose p {
  max-width: 62ch;
  font-size: 16.5px;
  line-height: 1.62;
  margin-bottom: 14px;
}
.detail-prose p.is-access {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}
.access-label {
  display: block;
  color: var(--accent-deep);
  margin: 18px 0 8px;
}

.save-detail {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 24px;
  background: var(--paper-hi);
  border: 2px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.save-detail .ic { width: 16px; height: 16px; }
.save-detail:hover { background: var(--ink); color: var(--paper); }
.save-detail[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-hi);
}
.save-detail[aria-pressed="true"]:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.save-detail[aria-pressed="true"] .ic-bookmark { fill: currentColor; }

/* ---------- colophon ---------- */

.colophon {
  margin-top: 64px;
  background: var(--ink);
  color: var(--paper);
}
.colophon-inner {
  padding-block: 44px 52px;
  display: grid;
  gap: 14px;
}
.colophon .wordmark-dot { color: var(--accent); }
.colophon-line { color: var(--on-ink-muted); max-width: 78ch; }
.colophon .rule-double { border-color: rgba(243, 236, 221, 0.4); margin-top: 12px; }

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

@media (max-width: 1080px) {
  .item {
    grid-template-columns: 44px 104px minmax(0, 1fr) 200px 44px;
  }
  .item-price { display: none; }
  .price-in-meta { display: inline; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-art { order: -1; max-width: 560px; }
  .hero-inset { left: auto; right: -10px; }
  .hero-art figcaption { left: 0; right: auto; text-align: left; }
  .mast-note { display: none; }
  .detail-body { grid-template-columns: 1fr; gap: 26px; padding: 24px 22px 34px; }
  .detail-side { flex-direction: row; align-items: flex-start; gap: 22px; }
  .spec { flex: 1; }
  .detail-media { height: 190px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .topline span:nth-child(3) { display: none; }

  .toolbar { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
  .count { grid-column: 1 / -1; padding-bottom: 0; justify-self: start; }

  .item {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas:
      "no main  save"
      "no meta  .";
    row-gap: 10px;
    padding-block: 20px;
    align-items: start;
  }
  .item-no { grid-area: no; padding-top: 3px; }
  .item-main { grid-area: main; }
  .item-meta { grid-area: meta; line-height: 1.8; }
  .save-row { grid-area: save; }
  .item-thumb { display: none; }

  .day-head { flex-wrap: wrap; gap: 14px; }
  .day-sub { margin-left: 0; width: 100%; text-align: left; }

  .detail {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
  }
  .detail-inner { max-height: none; height: 100%; }
  .detail-media { height: 200px; }
  .detail-side { flex-direction: column; }
  .spec th { width: 88px; }
}

@media (max-width: 420px) {
  .wordmark { font-size: 42px; }
  .day-stamp { width: 56px; height: 56px; }
  .day-stamp .st-num { font-size: 24px; }
}

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

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