/* The Daily Paper — phone-first reading styles (Readwise-inspired) */
@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;0,7..72,700;1,7..72,400&family=Playfair+Display:wght@700;900&display=swap");

:root {
  /* Morning: cool ink / blue-black */
  --ink: #0d1b2a;
  --ink-muted: #3d4f63;
  --paper: #f7f4ef;
  --paper-warm: #f0ebe3;
  --rule: #1a2a3a;
  --accent: #1e3a5f;
  --accent-soft: #d6e0ec;
  --callout-bg: #e8eef5;
  --masthead-rule: #0d1b2a;
  --link: #1a4a7a;
  --fold-bg: #eef2f7;
  --reader-pad-x: 1.15rem;
  --reader-measure: 40rem;
}

body.edition-evening,
.edition-evening {
  --ink: #2a1810;
  --ink-muted: #5c4033;
  --paper: #faf6f0;
  --paper-warm: #f3ebe2;
  --rule: #3d2a1f;
  --accent: #8b4513;
  --accent-soft: #edd9c8;
  --callout-bg: #f5ebe0;
  --masthead-rule: #2a1810;
  --link: #7a3a12;
  --fold-bg: #f7efe6;
}

body.edition-weekend,
.edition-weekend {
  --ink: #2c2438;
  --ink-muted: #5a5268;
  --paper: #f9f6f8;
  --paper-warm: #f2ecef;
  --rule: #4a3f55;
  --accent: #6b5b7a;
  --accent-soft: #e8e0ec;
  --callout-bg: #f0ebf3;
  --masthead-rule: #2c2438;
  --link: #5a4a6e;
  --fold-bg: #f3eef6;
}

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

html {
  /* Mobile-first: match common reading-app body scale (~16px).
     Readwise defaults higher, but Literata + quiet chrome reads smaller optically than Baskerville newspaper UI. */
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Literata", "Georgia", "Times New Roman", Times, serif;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.site-wrap,
.edition-wrap {
  max-width: var(--reader-measure);
  margin: 0 auto;
  padding: 0.85rem var(--reader-pad-x) 2.75rem;
}

/* ——— Masthead (quiet on phones) ——— */
.masthead {
  text-align: left;
  padding: 0.65rem 0 0.85rem;
  border-bottom: 2px solid var(--masthead-rule);
  margin-bottom: 1.1rem;
}

.masthead__name {
  font-family: "Playfair Display", "Georgia", serif;
  font-weight: 900;
  font-size: clamp(1.45rem, 6.5vw, 1.85rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.15;
  color: var(--ink);
}

.masthead__tagline {
  font-family: "Literata", Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0.25rem 0 0.65rem;
  line-height: 1.35;
}

.masthead__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.35rem 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.4rem 0;
  margin-top: 0.35rem;
  color: var(--ink-muted);
}

.masthead__edition {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.masthead__nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0.65rem;
}

.masthead__nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.2rem 0;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ——— Above the fold ——— */
.above-fold {
  background: var(--fold-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 0.35rem;
  padding: 0.95rem 1rem;
  margin-bottom: 1.5rem;
}

.above-fold__label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.above-fold h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.65rem;
  font-weight: 700;
  line-height: 1.25;
}

.above-fold ul {
  margin: 0;
  padding-left: 1.1rem;
}

.above-fold p,
.above-fold li {
  font-size: 0.98rem;
  line-height: 1.5;
}

.above-fold li {
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.above-fold li:last-child {
  margin-bottom: 0;
}

/* ——— Sections ——— */
.section {
  margin-bottom: 1.75rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--rule);
}

.section__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--accent-soft);
}

.articles {
  display: grid;
  gap: 1.5rem;
}

/* Single column on phones — always */
.articles.columns-2,
.articles.columns-3 {
  grid-template-columns: 1fr;
}

/* ——— Articles ——— */
.article {
  break-inside: avoid;
}

.article__kicker {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.2rem;
}

.article__headline {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.article--lead .article__headline {
  font-size: 1.35rem;
}

.article__byline {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0 0 0.65rem;
}

.article__body {
  max-width: none;
}

.article__body p {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.55;
  hyphens: auto;
}

/* No drop caps on mobile — they inflate perceived size */
.article--lead .article__body p:first-of-type::first-letter {
  float: none;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
}

.why-it-matters {
  background: var(--callout-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.25rem 0.25rem 0;
  padding: 0.7rem 0.85rem;
  margin: 0.75rem 0 0.45rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.why-it-matters__label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.2rem;
  font-style: normal;
}

.article__source {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0.45rem 0 0;
  line-height: 1.4;
}

.article__source a {
  font-style: normal;
}

/* ——— Home / archive ——— */
.home-hero {
  text-align: left;
  padding: 1rem 0 1.1rem;
  border-bottom: 2px solid var(--masthead-rule);
  margin-bottom: 1.35rem;
}

.home-hero__name {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
}

.home-hero__tagline {
  font-style: italic;
  color: var(--ink-muted);
  margin: 0.4rem 0 0.75rem;
  font-size: 0.95rem;
}

.home-hero__date {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.edition-cards {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

.edition-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper-warm);
  border: 1px solid var(--accent-soft);
  border-radius: 0.35rem;
  padding: 1rem 1rem 1.15rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.edition-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(13, 27, 42, 0.08);
}

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

.edition-card__cadence {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.edition-card--morning .edition-card__cadence { color: #1e3a5f; }
.edition-card--evening .edition-card__cadence { color: #8b4513; }
.edition-card--weekend .edition-card__cadence { color: #6b5b7a; }

.edition-card__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  line-height: 1.25;
}

.edition-card__blurb {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.edition-card__meta {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.about-block {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-muted);
  max-width: 40rem;
  line-height: 1.5;
}

.about-block h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.45rem;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 2.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: left;
  letter-spacing: 0.03em;
}

.site-footer a {
  color: var(--ink-muted);
}

/* ——— Tablet / desktop: slightly larger reading, optional multi-col ——— */
@media (min-width: 720px) {
  html {
    font-size: 17px;
  }

  body {
    line-height: 1.55;
  }

  .site-wrap,
  .edition-wrap {
    max-width: 42rem;
    padding: 1.35rem 1.5rem 3rem;
  }

  .masthead {
    text-align: center;
    padding: 1.15rem 0 0.85rem;
  }

  .masthead__name {
    font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  }

  .masthead__meta,
  .masthead__nav {
    justify-content: center;
  }

  .home-hero {
    text-align: center;
  }

  .home-hero__name {
    font-size: clamp(2rem, 4vw, 2.75rem);
  }

  .articles.columns-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 2rem;
  }

  .articles.columns-3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.75rem 2rem;
  }

  .article--lead {
    grid-column: 1 / -1;
  }

  .article--lead .article__headline {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  }

  /* Tasteful drop cap only on larger screens */
  .article--lead .article__body p:first-of-type::first-letter {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    float: left;
    font-size: 2.75rem;
    line-height: 0.9;
    padding-right: 0.35rem;
    padding-top: 0.08rem;
    color: var(--accent);
  }

  .edition-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer {
    text-align: center;
  }
}

@media print {
  body {
    background: white;
    font-size: 11pt;
  }

  .masthead__nav,
  .skip-link {
    display: none;
  }

  .above-fold {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}
