/*
 * Reading theme.
 *
 * Loaded after the base stylesheet. It warms the palette, removes automatic
 * dark mode, widens the page and increases type size for long-form reading.
 */

:root {
  color-scheme: light;

  --paper: #fdfaf4;
  --paper-raised: #ffffff;
  --surface: #f4eee2;

  --ink: #24211c;
  --ink-soft: #5e574d;
  --line: #e2d9c9;

  --accent: #a3344f;
  --accent-strong: #7f233b;
  --accent-soft: #f6e5e8;
  --focus: #1d5f8a;

  --correct: #2f6b4f;
  --incorrect: #a32a35;

  --wrap: 1280px;
  --measure: 54rem;
}

body {
  font-size: 1.1875rem;
  line-height: 1.72;
  letter-spacing: 0.002em;
}

.wrap {
  width: min(100% - 3rem, var(--wrap));
}

.narrow {
  max-width: 52rem;
}

.lede {
  max-width: 48rem;
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  line-height: 1.7;
}

.hero-inner {
  max-width: 70rem;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 1.02;
}

.hero .lede {
  max-width: 48rem;
}

.section-heading {
  max-width: 48rem;
}

.section-heading p:not(.kicker) {
  font-size: 1.1rem;
  line-height: 1.7;
}

.small-note {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Story page */

.story-header h1 {
  font-size: clamp(3rem, 8vw, 5.2rem);
}

.story-intro {
  max-width: 50rem;
  font-size: 1.2rem;
  line-height: 1.75;
}

.story-text p {
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
}

.story-section {
  font-size: 1.0625rem;
}

.story-section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

.grammar-intro {
  font-size: 1.15rem;
  line-height: 1.75;
}

.question legend {
  font-size: 1.15rem;
  line-height: 1.5;
}

.option-text {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.explanation,
.check-explanation {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.grammar-table {
  font-size: 1rem;
}

.grammar-table td {
  line-height: 1.6;
}

.discussion-list h3 {
  font-size: 1.2rem;
  line-height: 1.5;
}

.discussion-list p,
.discussion-list summary {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.check-sentence {
  font-size: 1.25rem;
  line-height: 1.75;
}

.about-copy p {
  font-size: 1.18rem;
  line-height: 1.8;
}

/* Slightly roomier pages */

.page-head {
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}

.site-header,
.site-footer {
  background: var(--paper);
}

/* Library links need to read as links at a glance. */

.story-main h3 a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.1em;
}

.story-main h3 a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.story-row .status-read {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.story-row .status-read:hover {
  color: var(--accent-strong);
}

/* Give the footer room to breathe after long content. */

.site-footer {
  margin-top: clamp(3rem, 7vw, 5.5rem);
}
