:root {
  --paper-bg: #f6f0e7;
  --paper-surface: rgba(255, 251, 245, 0.92);
  --paper-panel: rgba(255, 253, 249, 0.96);
  --paper-line: rgba(33, 28, 24, 0.12);
  --paper-line-strong: rgba(33, 28, 24, 0.22);
  --paper-ink: #1f1a17;
  --paper-muted: #6d635c;
  --paper-soft: #998d84;
  --paper-accent: #d85b31;
  --paper-accent-soft: rgba(216, 91, 49, 0.12);
  --paper-accent-strong: #b84720;
  --paper-shadow: 0 30px 60px rgba(53, 35, 20, 0.08);
  --paper-shadow-soft: 0 16px 28px rgba(53, 35, 20, 0.06);
}

:root[data-theme="dark"] {
  --paper-bg: #13110f;
  --paper-surface: rgba(25, 21, 18, 0.88);
  --paper-panel: rgba(31, 27, 24, 0.94);
  --paper-line: rgba(255, 237, 220, 0.12);
  --paper-line-strong: rgba(255, 237, 220, 0.22);
  --paper-ink: #f7efe6;
  --paper-muted: #c5b7ab;
  --paper-soft: #8f8177;
  --paper-accent: #ff8a57;
  --paper-accent-soft: rgba(255, 138, 87, 0.16);
  --paper-accent-strong: #ffb08c;
  --paper-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
  --paper-shadow-soft: 0 16px 28px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(216, 91, 49, 0.12), transparent 24%),
    linear-gradient(180deg, #fbf7f1 0%, var(--paper-bg) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper-ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 18rem),
    linear-gradient(180deg, #fbf7f1 0%, var(--paper-bg) 100%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.front-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--paper-bg) 84%, transparent);
  border-bottom: 1px solid var(--paper-line);
}

.front-header-inner,
.front-shell,
.front-footer-inner {
  width: min(1380px, calc(100vw - 2rem));
  margin: 0 auto;
}

.front-header-inner {
  min-height: 5.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.front-branding,
.front-header-actions,
.front-footer-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.front-brand-mark {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--paper-shadow-soft);
}

.front-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-brand-copy {
  display: flex;
  align-items: center;
}

.edition-kicker,
.rail-label,
.ticker-kicker,
.column-kicker,
.day-label,
.topic-label,
.story-meta,
.front-loading-kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.front-wordmark {
  font-family: "Playfair Display", serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.front-header-actions {
  justify-content: flex-end;
}

.front-header-link,
.front-footer-links a {
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--paper-muted);
}

.front-header-link:hover,
.front-footer-links a:hover,
.story-link:hover .story-title,
.story-promo:hover .story-promo-title,
.day-card:hover .day-story-title,
.ticker-item:hover .ticker-title {
  color: var(--paper-accent);
}

.front-theme-toggle {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  background: var(--paper-panel);
  color: var(--paper-ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.front-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--paper-line-strong);
  color: var(--paper-accent);
}

.front-theme-icon {
  width: 1rem;
  height: 1rem;
}

.front-theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .front-theme-icon--sun {
  display: block;
}

:root[data-theme="dark"] .front-theme-icon--moon {
  display: none;
}

.front-shell {
  padding: 0.95rem 0 3rem;
  display: grid;
  gap: 1.45rem;
}

.front-loading,
.front-error {
  padding: 3.2rem 2rem;
  border: 1px solid var(--paper-line);
  background: var(--paper-panel);
  box-shadow: var(--paper-shadow);
}

.front-loading-title,
.front-error-title {
  margin: 0.35rem 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.front-loading-text,
.front-error-text {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--paper-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.edition-banner {
  display: grid;
  gap: 0.85rem;
}

.edition-banner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.edition-kicker {
  font-size: 0.76rem;
  color: var(--paper-accent);
}

.edition-title {
  margin: 0.28rem 0 0;
  max-width: 16ch;
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.edition-deck,
.edition-updated {
  margin: 0;
}

.edition-deck {
  max-width: 44rem;
  color: var(--paper-muted);
  font-size: 1.04rem;
  line-height: 1.72;
}

.edition-updated {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--paper-soft);
}

.side-rail .edition-updated {
  margin: 0;
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--paper-line);
  background: var(--paper-panel);
  color: var(--paper-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.topic-chip:hover {
  border-color: var(--paper-accent);
  color: var(--paper-accent);
}

.topic-label {
  font-size: 0.63rem;
  color: var(--paper-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(18rem, 0.58fr);
  gap: 1.2rem;
}

.lead-story,
.side-rail,
.ticker-strip,
.column-section,
.week-strip {
  border: 1px solid var(--paper-line);
  background: var(--paper-panel);
  box-shadow: var(--paper-shadow-soft);
}

.lead-story {
  overflow: hidden;
}

.lead-story-link {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  min-height: 34rem;
  text-decoration: none;
}

.lead-story:hover .lead-image img {
  transform: scale(1.03);
}

.lead-image {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.lead-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(16, 10, 6, 0.18));
}

.lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.lead-copy {
  display: grid;
  align-content: center;
  gap: 0.9rem;
  padding: clamp(1.55rem, 3.2vw, 2.8rem);
}

.story-kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-accent);
}

.lead-headline {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.9rem, 5.7vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.lead-deck {
  margin: 0;
  color: var(--paper-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.story-meta {
  font-size: 0.68rem;
  color: var(--paper-soft);
}

.story-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.story-tag {
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: var(--paper-accent-soft);
  color: var(--paper-accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
}

.side-rail {
  display: grid;
  grid-template-rows: auto 1fr;
}

.rail-block {
  padding: 1.2rem;
}

.rail-block + .rail-block {
  border-top: 1px solid var(--paper-line);
}

.rail-label {
  font-size: 0.67rem;
  color: var(--paper-accent);
}

.desk-note {
  margin: 0.55rem 0 0;
  color: var(--paper-muted);
  font-size: 0.96rem;
  line-height: 1.78;
}

.rail-list {
  display: grid;
  gap: 1rem;
}

.story-link {
  display: grid;
  gap: 0.18rem;
  text-decoration: none;
}

.story-title,
.story-promo-title,
.day-story-title,
.ticker-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.story-title {
  font-size: 1.34rem;
}

.story-summary {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.side-rail .story-title {
  font-size: 1.16rem;
  line-height: 1.12;
}

.ticker-strip {
  overflow: hidden;
}

.ticker-strip-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ticker-item {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1rem 1.1rem;
  text-decoration: none;
}

.ticker-item + .ticker-item {
  border-left: 1px solid var(--paper-line);
}

.ticker-kicker {
  font-size: 0.62rem;
  color: var(--paper-soft);
}

.ticker-title {
  font-size: 1.05rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.column-section {
  display: grid;
}

.column-head {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid var(--paper-line);
}

.column-kicker {
  font-size: 0.66rem;
  color: var(--paper-accent);
}

.column-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 0.97;
  letter-spacing: -0.04em;
}

.column-deck {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.column-story-list {
  display: grid;
}

.story-promo {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  text-decoration: none;
}

.story-promo + .story-promo {
  border-top: 1px solid var(--paper-line);
}

.story-promo-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(216, 91, 49, 0.7), rgba(33, 28, 24, 0.9));
}

.story-promo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-promo-copy {
  display: grid;
  gap: 0.32rem;
  align-content: start;
}

.story-promo-title {
  font-size: 1.18rem;
}

.story-promo-summary {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.87rem;
  line-height: 1.58;
}

.week-strip {
  padding: 1.05rem 1rem 1.2rem;
}

.week-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--paper-line);
}

.week-strip-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 0.97;
  letter-spacing: -0.04em;
}

.week-strip-copy {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.92rem;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-card {
  padding: 1rem 0.85rem 0;
  text-decoration: none;
}

.day-card + .day-card {
  border-left: 1px solid var(--paper-line);
}

.day-label {
  font-size: 0.61rem;
  color: var(--paper-soft);
}

.day-title {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.day-story-title {
  margin-top: 0.7rem;
  font-size: 1.04rem;
}

.day-story-meta {
  margin: 0.52rem 0 0;
  color: var(--paper-muted);
  font-size: 0.82rem;
  line-height: 1.52;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.front-footer {
  padding: 0 0 2.5rem;
}

.front-footer-inner {
  padding-top: 1.2rem;
  border-top: 1px solid var(--paper-line);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.front-footer-name,
.front-footer-copy {
  margin: 0;
}

.front-footer-name {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
}

.front-footer-copy {
  max-width: 34rem;
  margin-top: 0.25rem;
  color: var(--paper-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

@media (max-width: 1180px) {
  .front-header-inner {
    grid-template-columns: 1fr auto;
    padding: 0.95rem 0;
  }

  .front-branding {
    min-width: 0;
  }

  .front-header-actions {
    grid-area: auto;
  }

  .hero-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .ticker-strip-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 1rem;
  }

  .day-card:nth-child(5) {
    border-left: none;
  }
}

@media (max-width: 820px) {
  .front-header-inner,
  .front-shell,
  .front-footer-inner {
    width: min(100vw - 1.2rem, 1380px);
  }

  .front-header-actions {
    gap: 0.6rem;
  }

  .front-header-link {
    display: none;
  }

  .lead-story-link {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .lead-image {
    min-height: 18rem;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .day-card + .day-card {
    border-left: none;
    border-top: 1px solid var(--paper-line);
  }

  .story-promo {
    grid-template-columns: 6.8rem minmax(0, 1fr);
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 560px) {
  .front-brand-mark {
    width: 2.8rem;
    height: 2.8rem;
  }

  .front-wordmark {
    font-size: 1.55rem;
  }

  .edition-title {
    max-width: 10ch;
  }

  .lead-headline {
    font-size: 2.35rem;
  }

  .column-title,
  .week-strip-title {
    font-size: 1.65rem;
  }

  .story-promo,
  .ticker-item,
  .rail-block,
  .column-head,
  .week-strip {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}
