@font-face {
  font-family: "Source Serif";
  src: url("/source-serif.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #222c25;
  --muted: #505e52;
  --paper: #f9f6ed;
  --surface: #fffdf7;
  --line: #d9d5c5;
  --forest: #142a23;
  --green: #244b3d;
  --sand: #ecce93;
  --brass: #f1cb7a;
  --text: #fff2d6;
  font: 100%/1.55 "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #a5640f; outline-offset: 4px; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: "Source Serif", Georgia, serif; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.55rem, 2.5vw, 2.1rem); }
.wrap { width: min(calc(100% - 3rem), 74rem); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: .5rem; left: 1rem; padding: .5rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }
.eyebrow { margin: 0 0 .85rem; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { margin: 1.2rem 0 0; font-size: clamp(1.06rem, 1.8vw, 1.29rem); max-width: 38rem; }

.site-header { background: var(--forest); color: var(--text); border-bottom: 1px solid #ffffff24; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: 76px; }
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; }
.brand { display: inline-flex; gap: .65rem; align-items: center; line-height: 1.16; }
.brand img, .promo img { border-radius: 21%; flex: none; }
.brand strong { display: block; }
.brand small { color: var(--sand); font-size: .65rem; font-weight: 700; letter-spacing: .16em; }
.site-header nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2rem); font-size: .9rem; font-weight: 700; }
.site-header .header-play { color: var(--sand); }
.site-footer { padding-block: 1.6rem; background: var(--forest); color: var(--text); font-size: .87rem; }

.hero { background: radial-gradient(ellipse at 80% 25%, #2e4a3a, var(--forest) 68%); color: var(--text); padding-block: clamp(2.8rem, 7vw, 6rem); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: center; gap: clamp(1.6rem, 5vw, 5rem); }
.hero-copy { container-type: inline-size; }
.hero h1 { font-size: clamp(2.45rem, 15cqi, 5.2rem); }
.hero .eyebrow, .hero h1 span { color: var(--sand); }
.hero .lede { max-width: 26rem; color: #e1e7dd; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; margin-top: 1.65rem; }
.hero-links > a:not(.button) { color: var(--text); font-weight: 700; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .8rem; padding: .72rem 1rem; border-radius: .35rem; font-weight: 800; text-decoration: none; line-height: 1.35; }
.button.gold { background: var(--sand); color: #262118; }
.button.gold:hover { background: #ffe3ac; }
.hero-board .position { background: transparent; border: 0; padding: 0; margin: 0; color: #e1e7dd; }
.hero-board .position figcaption { padding: .85rem .2rem 0; color: inherit; }
.hero-board .position-heading strong { color: var(--text); }

.index-promo .promo { margin-top: clamp(1.3rem, 3vw, 2.4rem); }
.index-promo + .contents { padding-top: clamp(2rem, 4vw, 3rem); }
.contents { padding-block: clamp(2.5rem, 6vw, 5rem); }
.contents-top { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.group-jump { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.group-jump a { font-size: .88rem; font-weight: 700; }
.chapter-group { display: grid; grid-template-columns: minmax(10rem, .75fr) minmax(0, 2fr); gap: 1rem 2rem; padding-block: 1.8rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1.4rem; }
.chapter-group h3 { padding-block: .65rem; color: var(--green); }
.chapter-group ol { margin: 0; padding: 0; list-style: none; }
.chapter-group li + li { border-top: 1px solid var(--line); }
.chapter-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .68rem .5rem; color: var(--ink); text-decoration: none; }
.chapter-row:hover { background: var(--surface); }
.chapter-row:hover strong { text-decoration: underline; }
.chapter-row strong { display: block; font-size: 1.12rem; line-height: 1.35; }
.chapter-number { color: var(--green); font: 700 .92rem/1.3 ui-monospace, monospace; }
.row-description { display: block; color: var(--muted); margin-top: .18rem; font-size: .92rem; }

.chapter-hero { background: #e9ede1; border-bottom: 1px solid #d2d9ca; padding-block: 1.9rem clamp(2.2rem, 5vw, 3.8rem); }
.breadcrumb { margin-bottom: 1.5rem; font-size: .88rem; font-weight: 700; }
.breadcrumb span { color: var(--muted); margin: 0 .45rem; }
.chapter-hero .eyebrow { color: var(--green); }
.chapter-hero h1 { font-size: clamp(2.55rem, 6vw, 4.75rem); max-width: 58rem; }
.chapter-hero .lede { color: var(--muted); max-width: 44rem; }
.reading { display: grid; grid-template-columns: 13rem minmax(0, 47rem); justify-content: space-between; gap: clamp(2rem, 5vw, 6rem); padding-block: clamp(2rem, 5vw, 4rem); }
.on-page { align-self: start; display: grid; gap: .75rem; position: sticky; top: 1.5rem; border-top: 2px solid var(--green); padding-top: .9rem; }
.on-page .eyebrow { margin-bottom: .15rem; }
.on-page a { line-height: 1.35; font-size: .93rem; }
.lesson, .exercise { scroll-margin-top: 1.4rem; }
.lesson + .lesson { border-top: 1px solid var(--line); margin-top: 2.7rem; padding-top: 2.4rem; }
.lesson h2 { margin-bottom: 1rem; font-size: clamp(1.7rem, 3vw, 2.45rem); }
.lesson > p, .exercise > p { font-size: 1.04rem; line-height: 1.75; }
.position { margin: 1.4rem 0 0; padding: .75rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
.position + .position { margin-top: 1rem; }
.position .felt-board { box-shadow: none; border-radius: .35rem; }
.position figcaption { padding: .8rem .2rem .12rem; font-size: .91rem; color: var(--muted); }
.position figcaption p { margin: .28rem 0 0; }
.position-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; flex-wrap: wrap; }
.position-heading strong { color: var(--ink); font-size: 1rem; }
.position-heading > span, .off-count { font-size: .83rem; font-weight: 700; }

.exercise { margin-top: 2.5rem; background: #e9ede1; border: 1px solid #ccd8c8; border-radius: .55rem; padding: clamp(1rem, 3vw, 1.6rem); }
.exercise h2, .sources h2 { font-size: 1.52rem; margin-bottom: .65rem; }
.exercise details { border-top: 1px solid #bfcfc0; padding-top: .65rem; }
.exercise summary { color: var(--green); font-weight: 800; cursor: pointer; }
.exercise details p { margin: .65rem 0 0; }
.sources { margin-top: 1.8rem; }
.sources ul { margin: 0; padding-left: 1.2rem; font-size: .92rem; }

.promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem 1rem; align-items: center; margin-top: 2.3rem; padding: 1.2rem; border-radius: .55rem; background: var(--forest); color: var(--text); }
.promo .eyebrow { color: var(--sand); margin: 0; font-size: .65rem; }
.promo strong { font-family: "Source Serif", Georgia, serif; font-size: 1.28rem; line-height: 1.3; display: block; }
.promo p { margin: .18rem 0 0; color: #dbe2d8; font-size: .9rem; }
.promo .button { font-size: .91rem; }
.chapter-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.chapter-nav a { border: 1px solid var(--line); border-radius: .45rem; padding: .85rem; background: var(--surface); text-decoration: none; }
.chapter-nav a:hover strong { text-decoration: underline; }
.chapter-nav small, .chapter-nav strong { display: block; }
.chapter-nav a:last-child { text-align: right; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .hero-inner, .reading { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { max-width: 34rem; }
  .hero-board { margin-top: .5rem; }
  .chapter-group { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .chapter-group h3 { padding-block: .3rem .65rem; }
  .on-page { position: static; background: var(--surface); border-radius: .3rem; padding: .85rem 1rem; }
}

@media (max-width: 480px) {
  .header-inner { min-height: 64px; gap: .55rem; }
  .brand { gap: .4rem; }
  .brand img { width: 32px; height: 32px; }
  .brand strong { max-width: 7rem; font-size: .83rem; }
  .brand small { font-size: .55rem; }
  .site-header nav { gap: .75rem; font-size: .78rem; }
  .chapter-row { grid-template-columns: 1.55rem minmax(0, 1fr) auto; gap: .5rem; padding-inline: .15rem; }
  .promo { grid-template-columns: auto minmax(0, 1fr); padding: .95rem; }
  .promo .button { grid-column: 1 / -1; }
  .position { padding: .4rem; }
  .position .point-number { font-size: 45px; }
  .position figcaption { padding: .65rem .3rem .3rem; }
  .footer-inner { align-items: start; flex-direction: column; gap: .65rem; }
}
