/* 學測英文寫作 in the 英文學習 family's Apple language (2026-11-08, when Lewis
   asked for this page to join /learn/). Linked LAST, after editorial.css and
   house.css, so these tokens win; style.css itself is untouched, the same way
   /reading/ was moved over by retokening.

   White page, grey cards, San Francisco for everything around the English,
   blue for what can be pressed (--navy was the interactive colour), orange
   for labels and the current thing (--gold was the attention colour). The
   seven essays, the sentence bank and the patterns keep the serif: they are
   the English to be read. Dark mode follows the system, with the same tokens
   as the word pages. */

:root {
  --paper: #ffffff;
  --card: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --ink-faint: #6e6e73;

  --navy: #0066cc;
  --navy-soft: #e8f1fb;
  --navy-line: #b9d3f2;

  --gold: #b64400;
  --gold-soft: #fbf0e3;
  --gold-mid: #f6dcc0;
  --gold-line: #e8b98c;

  --good: #1d7a4b;
  --good-soft: #e6f4ec;
  --good-mid: #cbe8d6;
  --good-line: #a6d4b9;

  --warn: #b3261e;
  --warn-soft: #fcecea;
  --warn-line: #efb7b2;
  --bad: #b3261e;
  --bad-soft: #fcecea;

  --line: #e5e5ea;
  --rule: #d2d2d7;

  --font-sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000; --card: #1c1c1e;
    --ink: #f5f5f7; --ink-soft: #c7c7cc; --ink-faint: #a1a1a6;
    --navy: #0a84ff; --navy-soft: #0f2a47; --navy-line: #1f5a99;
    --gold: #ff9f45; --gold-soft: #3a2608; --gold-mid: #4d3210; --gold-line: #8a5a1a;
    --good: #30d158; --good-soft: #10301b; --good-mid: #164526; --good-line: #1f6b37;
    --warn: #ff6961; --warn-soft: #3a1513; --warn-line: #7a2b26; --bad: #ff6961; --bad-soft: #3a1513;
    --line: #38383a; --rule: #48484a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #000000; --card: #1c1c1e;
  --ink: #f5f5f7; --ink-soft: #c7c7cc; --ink-faint: #a1a1a6;
  --navy: #0a84ff; --navy-soft: #0f2a47; --navy-line: #1f5a99;
  --gold: #ff9f45; --gold-soft: #3a2608; --gold-mid: #4d3210; --gold-line: #8a5a1a;
  --good: #30d158; --good-soft: #10301b; --good-mid: #164526; --good-line: #1f6b37;
  --warn: #ff6961; --warn-soft: #3a1513; --warn-line: #7a2b26; --bad: #ff6961; --bad-soft: #3a1513;
  --line: #38383a; --rule: #48484a;
  color-scheme: dark;
}

body { background: var(--paper); font-family: var(--font-sf), var(--font-zh); letter-spacing: -.005em; }

/* Headlines in SF Display, set tight, as on the other family pages. */
.cover h1, .part-head { font-family: var(--font-display), var(--font-zh); }
.cover h1 { font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -.02em; }
.kicker { color: var(--gold); letter-spacing: .08em; }

/* A section opens with a hairline and space, not a coloured rule; its number
   is a small blue badge. */
.part { padding-top: 64px; }
.part-head { border-bottom: 1px solid var(--line); letter-spacing: -.01em; }
.part-head .n { background: var(--navy); border-radius: 9px; }

/* Grey tiles instead of white boxes with borders. house.css draws .goals as a
   rule down the left; here it is a tile like the other pages' plans. */
.goals { background: var(--card); border: 0; border-radius: 18px; padding: 20px 24px; }

/* The two hovers style.css wrote as fixed colours, now from the tokens so
   they hold in dark mode too. */
.es:hover { background: color-mix(in srgb, var(--navy) 5%, transparent); }
.practice:hover { background: color-mix(in srgb, var(--navy) 14%, var(--navy-soft)); }
.ychip:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* The bar is glass over the page in either theme. */
.bar { background: color-mix(in srgb, var(--paper) 78%, transparent); }

@media print {
  body { background: #fff; }
}
