/* Public pages (verbs/ and stories/, built by tools/pages.py): same colours and fonts as the app, plain document layout. */
:root {
  --bg: #f6f4fb; --surface: #ffffff; --surface-2: #f0edf7; --ink: #1d1b2e; --ink-soft: #3b3852; --muted: #6f6b85;
  --line: #e7e3f1; --primary: #1d1b2e; --primary-ink: #ffffff; --accent: #7b6cf0;
  --lav: #e5defc; --lav-ink: #5a45b8; --peach: #ffe0d0; --peach-ink: #ae4f25;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; --serif: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13121a; --surface: #1d1c27; --surface-2: #272533; --ink: #f2f0fa; --ink-soft: #d6d2e8; --muted: #9e9ab4;
  --line: #2e2c3c; --primary: #f2f0fa; --primary-ink: #13121a; --accent: #a99ff7;
  --lav: #2b2547; --lav-ink: #c2b6fb; --peach: #3e2a20; --peach-ink: #ffbd9a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--lav-ink); }
main, footer, .top { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

.crumbs { font-size: .85rem; color: var(--muted); margin: 8px 0 4px; }
.crumbs a { color: var(--muted); }
h1 { font: 600 2.2rem/1.15 var(--serif); margin: 8px 0 6px; letter-spacing: -.01em; }
h2 { font: 600 1.5rem/1.2 var(--serif); margin: 36px 0 12px; }
h3 { font-size: 1rem; margin: 0 0 2px; }
.lede { color: var(--ink-soft); margin: 0 0 8px; }
.note { color: var(--muted); font-size: .9rem; margin: 6px 0; }
span.odd { color: var(--peach-ink); background: var(--peach); padding: 0 6px; border-radius: 6px; font-weight: 700; }

.tenses { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tense { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.use { color: var(--muted); font-size: .8rem; line-height: 1.4; margin: 0 0 8px; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem; padding: 3px 10px 3px 0; white-space: nowrap; width: 1%; }
td { font-weight: 700; padding: 3px 0; }
td.odd { color: var(--peach-ink); }

.examples { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.examples li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; }
.examples p { margin: 0; }
.examples p[lang="es"] { font: 1.15rem/1.4 var(--serif); }
.examples b { color: var(--lav-ink); }
.examples .en { color: var(--ink-soft); font-size: .92rem; }
.examples .src { color: var(--muted); font-size: .78rem; margin-top: 4px; }

.cta { display: flex; gap: 16px; align-items: flex-start; background: var(--lav); border-radius: 24px; padding: 20px; margin: 20px 0 8px; }
.cta p { margin: 4px 0 12px; color: var(--ink-soft); font-size: .92rem; }

.verbs { list-style: none; padding: 0; margin: 0; columns: 3 200px; column-gap: 24px; }
.verbs li { break-inside: avoid; padding: 2px 0; }
.verbs a { font-weight: 700; text-decoration: none; }
.verbs span { color: var(--muted); font-size: .85rem; }
.jump { display: flex; flex-wrap: wrap; gap: 6px 10px; font-weight: 700; }
#A, #B, #C { scroll-margin-top: 12px; }
h3[id] { margin-top: 20px; }

/* Story pages: the text, with the translation under each sentence behind one CSS-only switch. */
.tr-toggle { position: absolute; opacity: 0; pointer-events: none; }
.tr-label { cursor: pointer; margin: 16px 0 4px; user-select: none; }
.tr-toggle:focus-visible + .tr-label { outline: 2px solid var(--accent); outline-offset: 2px; }
.tr-toggle:checked + .tr-label { background: var(--lav); border-color: var(--lav); color: var(--lav-ink); }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 8px 22px; margin-top: 10px; }
.story p { font: 1.25rem/1.6 var(--serif); margin: 14px 0; }
.story .who { font: 700 .95rem var(--sans); color: var(--lav-ink); }
.story .en { display: none; font: .92rem/1.45 var(--sans); color: var(--muted); margin: 2px 0 8px; }
.tr-toggle:checked ~ .story .en { display: block; }
.tr-toggle:checked ~ .story .s { display: block; }
.questions { padding-left: 22px; margin: 0; }
.questions > li { margin-bottom: 14px; }
.questions p { margin: 0 0 4px; font: 1.1rem/1.4 var(--serif); }
.questions ol { margin: 0; padding-left: 22px; color: var(--ink-soft); }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--lav-ink); }
.answers p { margin: 6px 0; font-weight: 700; }
.words table { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-top: 10px; display: block; padding: 10px 16px; }
.words th { font-weight: 700; color: var(--ink); font-size: .95rem; padding-right: 16px; }
.words td { font-weight: 400; color: var(--ink-soft); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 24px 0 0; font-weight: 700; }
.story-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.story-list a { font-weight: 700; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.story-list span { color: var(--muted); font-size: .85rem; }
h2[id] { scroll-margin-top: 12px; }

footer { color: var(--muted); font-size: .85rem; padding-top: 24px; padding-bottom: 40px; }
footer p { margin: 4px 0; }

@media (max-width: 520px) {
  h1 { font-size: 1.8rem; }
  .cta { gap: 12px; padding: 16px; }
  .cta img { width: 40px; height: 40px; }
  .cta p { margin: 2px 0 10px; }
  .story { padding: 4px 16px; }
  .story p { font-size: 1.15rem; }
}
