:root {
  --ink: #17231f;
  --ink-soft: #33423c;
  --paper: #f0efe9;
  --paper-deep: #e4e1d8;
  --card: #f9f8f3;
  --line: #c9c8be;
  --yellow: #f2c14e;
  --orange: #e86542;
  --green: #66836c;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.55; margin: 0; text-rendering: optimizeLegibility; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
.skip-link { background: var(--ink); color: white; left: 1rem; padding: .75rem 1rem; position: fixed; top: -5rem; z-index: 100; }
.skip-link:focus { top: 1rem; }
.kicker { font-size: .68rem; font-weight: 800; letter-spacing: .18em; margin: 0 0 .8rem; text-transform: uppercase; }
.site-header { align-items: center; border-bottom: 1px solid rgba(23,35,31,.12); display: flex; justify-content: space-between; min-height: 82px; padding: 1rem clamp(1.2rem, 4vw, 4rem); }
.site-header nav { display: flex; gap: .4rem; }
.site-header nav a { border-radius: 99px; font-size: .78rem; font-weight: 750; padding: .55rem .85rem; text-decoration: none; }
.site-header nav a[aria-current="page"] { background: var(--ink); color: white; }
.wordmark { align-items: center; display: inline-grid; gap: .55rem; grid-template-columns: auto auto; text-decoration: none; }
.wordmark strong { font-size: .86rem; letter-spacing: .12em; }
.wordmark small { border-left: 1px solid var(--line); color: var(--green); font-size: .62rem; font-weight: 900; letter-spacing: .1em; padding-left: .45rem; }
.site-footer { align-items: end; border-top: 1px solid var(--line); display: flex; justify-content: space-between; margin-top: 8rem; padding: 2.5rem clamp(1.2rem, 4vw, 4rem); }
.site-footer p { font-family: var(--serif); margin: 0; text-align: right; }
.site-footer p span { color: var(--ink-soft); font-family: var(--sans); font-size: .68rem; }

.home-hero { display: grid; gap: clamp(3rem, 8vw, 8rem); grid-template-columns: minmax(0, 1.55fr) minmax(260px, .45fr); margin: 0 auto; max-width: 1440px; min-height: min(760px, calc(100vh - 82px)); padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 4vw, 4rem); }
.home-hero h1 { font-family: var(--serif); font-size: clamp(3.3rem, 7.8vw, 8.5rem); font-weight: 400; letter-spacing: -.065em; line-height: .86; margin: 0; }
.home-hero h1 em { color: var(--green); font-weight: 400; }
.home-hero__aside { align-self: end; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.home-hero__aside > p { color: var(--ink-soft); font-family: var(--serif); font-size: 1.25rem; }
.arrow-link { align-items: center; display: inline-flex; font-size: .78rem; font-weight: 850; gap: 1rem; text-decoration: none; }
.arrow-link span { font-size: 1.25rem; }
.method-strip { background: var(--ink); color: white; display: grid; grid-template-columns: repeat(4, 1fr); }
.method-strip article { border-right: 1px solid rgba(255,255,255,.18); min-height: 260px; padding: clamp(1.5rem, 4vw, 3.5rem); }
.method-strip article:last-child { border: 0; }
.method-strip span { color: var(--yellow); font-size: .68rem; font-weight: 850; }
.method-strip h2 { font-family: var(--serif); font-size: clamp(1.5rem, 2.3vw, 2.4rem); font-weight: 400; line-height: 1.05; margin: 4rem 0 .8rem; }
.method-strip p { color: #bfc7c2; font-size: .75rem; margin: 0; }
.release-feature { align-items: center; display: grid; gap: clamp(3rem, 8vw, 8rem); grid-template-columns: minmax(280px, .75fr) minmax(300px, 1.25fr); margin: 0 auto; max-width: 1240px; padding: clamp(6rem, 12vw, 11rem) clamp(1.2rem, 4vw, 4rem); }
.release-feature__cover, .book-cover { aspect-ratio: 2 / 3; background: #14243b; box-shadow: 1.3rem 1.3rem 0 var(--yellow); max-width: 430px; overflow: hidden; }
.release-feature__cover img, .book-cover img { height: 100%; object-fit: cover; width: 100%; }
.release-feature h2 { font-family: var(--serif); font-size: clamp(3rem, 6vw, 6.2rem); font-weight: 400; letter-spacing: -.055em; line-height: .88; margin: 0; }
.release-feature__subtitle { font-family: var(--serif); font-size: 1.4rem; font-style: italic; }
.release-feature > div:last-child > p:last-of-type { color: var(--ink-soft); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { border: 1px solid var(--ink); border-radius: 99px; cursor: pointer; display: inline-block; font-size: .76rem; font-weight: 850; padding: .78rem 1.2rem; text-decoration: none; }
.button--solid { background: var(--ink); color: white; }
.collection-intro { border-top: 1px solid var(--line); display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; margin: 0 auto; max-width: 1360px; padding: 7rem clamp(1.2rem, 4vw, 4rem) 5rem; }
.collection-intro .kicker { grid-column: 1 / -1; }
.collection-intro h2 { font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 5.2rem); font-weight: 400; letter-spacing: -.05em; line-height: .92; margin: 0; }
.collection-intro > p:last-child { align-self: end; color: var(--ink-soft); max-width: 530px; }
.collection { margin: 0 auto; max-width: 1360px; padding: 0 clamp(1.2rem, 4vw, 4rem); }
.shelf { border-top: 5px solid var(--shelf-color, var(--ink)); padding: 2rem 0 6rem; scroll-margin-top: 1rem; }
.shelf__header { display: grid; gap: 1.2rem; grid-template-columns: 3rem minmax(0, 1fr); margin-bottom: 2.5rem; max-width: 700px; }
.shelf__header > span { color: var(--shelf-color, var(--ink)); font-family: var(--serif); font-size: 2rem; }
.shelf__header h3 { font-family: var(--serif); font-size: 2.3rem; font-weight: 400; margin: 0; }
.shelf__header p:last-child { color: var(--ink-soft); margin: .2rem 0 0; }
.catalog-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-card { background: transparent; border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 230px; padding: 1.35rem; text-decoration: none; }
.catalog-card.is-available { background: var(--ink); border-color: var(--ink); color: white; }
.catalog-card__meta { font-size: .62rem !important; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.catalog-card h4 { font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1; margin: 1rem 0 .5rem; }
.catalog-card p { color: var(--ink-soft); font-size: .75rem; margin: 0; }
.catalog-card.is-available p { color: #bec7c1; }
.catalog-card > span { color: var(--green); font-size: .65rem; font-weight: 850; margin-top: auto; padding-top: 1.5rem; text-transform: uppercase; }
.catalog-card.is-available > span { color: var(--yellow); }
.shelf--specialist { --shelf-color: var(--orange); }

.book-hero { align-items: center; display: grid; gap: clamp(3rem, 8vw, 8rem); grid-template-columns: minmax(280px, .7fr) minmax(300px, 1.3fr); margin: 0 auto; max-width: 1180px; padding: clamp(5rem, 10vw, 9rem) clamp(1.2rem, 4vw, 4rem); }
.book-hero h1 { font-family: var(--serif); font-size: clamp(3.5rem, 7vw, 7rem); font-weight: 400; letter-spacing: -.06em; line-height: .86; margin: 0; }
.book-hero__subtitle { font-family: var(--serif); font-size: 1.4rem; font-style: italic; }
.book-hero > div:last-child > p:not(.kicker,.book-hero__subtitle) { color: var(--ink-soft); max-width: 620px; }
.downloads { display: flex; gap: 1.2rem; margin-top: 1.5rem; }
.downloads a { font-size: .7rem; font-weight: 850; }
.book-lab-callout { background: var(--yellow); display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; padding: clamp(4rem, 9vw, 8rem) max(1.2rem, calc((100vw - 1100px) / 2)); }
.book-lab-callout .kicker { grid-column: 1 / -1; }
.book-lab-callout h2 { font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 4.5rem); font-weight: 400; letter-spacing: -.04em; line-height: .95; margin: 0; }
.book-lab-callout p { align-self: end; margin: 0; }
.book-lab-callout .arrow-link { grid-column: 2; }
.contents { margin: 0 auto; max-width: 920px; padding: 8rem 1.2rem 0; }
.contents h2 { font-family: var(--serif); font-size: clamp(3rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.05em; line-height: .92; margin: 0 0 3rem; }
.contents ol { list-style: none; margin: 0; padding: 0; }
.contents li { align-items: baseline; border-top: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: 2rem 1fr; padding: 1.15rem 0; }
.contents li:last-child { border-bottom: 1px solid var(--line); }
.contents li span { color: var(--green); font-size: .68rem; }
.contents li a { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; }

.reading-progress { height: 3px; left: 0; position: fixed; right: 0; top: 0; z-index: 70; }
.reading-progress span { background: var(--orange); display: block; height: 100%; width: 0; }
.reader-header { align-items: center; background: rgba(240,239,233,.94); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; min-height: 72px; padding: 0 1.5rem; position: sticky; top: 0; z-index: 50; }
.reader-header > a:nth-child(2) { font-family: var(--serif); text-decoration: none; }
.reader-header button { background: transparent; border: 1px solid var(--ink); border-radius: 99px; cursor: pointer; display: none; font-size: .7rem; font-weight: 800; justify-self: end; padding: .5rem .75rem; }
.reader-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.reader-toc { border-right: 1px solid var(--line); height: calc(100vh - 72px); overflow: auto; padding: 2.5rem 1.5rem; position: sticky; top: 72px; }
.reader-toc ol { list-style: none; margin: 0; padding: 0; }
.reader-toc li a { border-left: 2px solid transparent; color: var(--ink-soft); display: grid; font-family: var(--serif); font-size: .82rem; gap: .6rem; grid-template-columns: 1.5rem 1fr; padding: .55rem .5rem; text-decoration: none; }
.reader-toc li[aria-current="page"] a { border-left-color: var(--orange); color: var(--ink); font-weight: 700; }
.reader-toc li span { font-family: var(--sans); font-size: .6rem; }
.reader-main article { margin: 0 auto; max-width: 780px; padding: clamp(4rem, 8vw, 8rem) 2rem 5rem; }
.reader-main article > h1 { font-family: var(--serif); font-size: clamp(3rem, 6vw, 6rem); font-weight: 400; letter-spacing: -.055em; line-height: .9; margin: 0 0 4rem; }
.prose { font-family: var(--serif); font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.75; }
.prose h2, .prose h3 { font-family: var(--sans); line-height: 1.2; }
.prose h2 { font-size: 1.65rem; margin: 3.5rem 0 1rem; }
.prose h3 { font-size: 1.2rem; margin-top: 2.5rem; }
.prose p { margin: 0 0 1.45rem; }
.prose blockquote { border-left: 3px solid var(--orange); color: var(--ink-soft); font-style: italic; margin: 2rem 0; padding-left: 1.5rem; }
.prose li { margin-bottom: .55rem; }
.prose table { border-collapse: collapse; display: block; font-family: var(--sans); font-size: .8rem; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); min-width: 150px; padding: .7rem; text-align: left; vertical-align: top; }
.chapter-nav { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; margin: 0 auto; max-width: 920px; }
.chapter-nav a { display: flex; flex-direction: column; font-family: var(--serif); padding: 2rem; text-decoration: none; }
.chapter-nav a + a { border-left: 1px solid var(--line); text-align: right; }
.chapter-nav small { color: var(--green); font-family: var(--sans); font-size: .65rem; font-weight: 850; margin-bottom: .4rem; text-transform: uppercase; }

.labs-hero, .course-hero { margin: 0 auto; max-width: 1080px; padding: clamp(5rem, 10vw, 9rem) 1.2rem 5rem; }
.labs-hero h1, .course-hero h1 { font-family: var(--serif); font-size: clamp(3.5rem, 7vw, 7rem); font-weight: 400; letter-spacing: -.06em; line-height: .88; margin: 0; }
.labs-hero > p:last-child, .course-hero > p { color: var(--ink-soft); max-width: 680px; }
.lab-list { margin: 0 auto; max-width: 1080px; padding: 0 1.2rem; }
.lab-card { align-items: end; background: var(--ink); color: white; display: grid; gap: 3rem; grid-template-columns: 1fr auto; padding: clamp(2rem, 5vw, 4rem); text-decoration: none; }
.lab-card h2 { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 400; line-height: .95; margin: 0; }
.lab-card p:not(.kicker) { color: #c0c9c4; max-width: 650px; }
.lab-card__progress { text-align: right; }
.lab-card__progress span { color: var(--yellow); display: block; font-size: .68rem; margin-bottom: 1rem; }
.course-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; }
.course-meta span { border: 1px solid var(--line); border-radius: 99px; font-size: .68rem; font-weight: 800; padding: .5rem .75rem; }
.weeks { margin: 0 auto; max-width: 1080px; padding: 2rem 1.2rem 0; }
.section-title { align-items: end; display: grid; gap: 1rem; grid-template-columns: 1fr auto; margin-bottom: 2rem; }
.section-title .kicker { grid-column: 1 / -1; }
.section-title h2 { font-family: var(--serif); font-size: clamp(2.3rem, 4vw, 4rem); font-weight: 400; line-height: .95; margin: 0; }
.section-title > span { color: var(--green); font-size: .7rem; font-weight: 850; }
.weeks ol { list-style: none; margin: 0; padding: 0; }
.weeks li { border-top: 1px solid var(--line); }
.weeks li:last-child { border-bottom: 1px solid var(--line); }
.weeks li.is-complete { background: rgba(102,131,108,.08); }
.weeks li a { align-items: center; display: grid; gap: 1.5rem; grid-template-columns: 2rem 1fr auto; padding: 1.3rem .5rem; text-decoration: none; }
.weeks li > a > span { color: var(--green); font-size: .68rem; }
.weeks h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; margin: 0; }
.weeks p { color: var(--ink-soft); font-size: .73rem; margin: .2rem 0 0; }
.weeks strong { color: var(--green); font-size: .68rem; }

.lab-week { margin: 0 auto; max-width: 1320px; padding: 0 clamp(1.2rem, 4vw, 4rem); }
.lab-week__header { border-bottom: 1px solid var(--line); display: flex; font-size: .7rem; font-weight: 800; justify-content: space-between; padding: 1.2rem 0; }
.lab-week__header a { text-decoration: none; }
.lab-week__intro { max-width: 880px; padding: clamp(4rem, 8vw, 7rem) 0 4rem; }
.lab-week__intro h1 { font-family: var(--serif); font-size: clamp(3.2rem, 6vw, 6rem); font-weight: 400; letter-spacing: -.055em; line-height: .9; margin: 0; }
.lab-week__intro > p:last-child { color: var(--ink-soft); font-size: 1.05rem; max-width: 680px; }
.lab-layout { align-items: start; display: grid; gap: clamp(3rem, 7vw, 7rem); grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); }
.lab-lesson { max-width: 680px; }
.lab-artifact { background: var(--card); border-top: 6px solid var(--yellow); box-shadow: 0 1.5rem 4rem rgba(23,35,31,.09); padding: clamp(1.5rem, 4vw, 3rem); }
.lab-artifact h2 { font-family: var(--serif); font-size: 2.5rem; font-weight: 400; line-height: 1; margin: 0; }
.lab-artifact > p:not(.kicker) { color: var(--ink-soft); font-size: .8rem; }
.lab-artifact form { display: grid; gap: 1.5rem; margin-top: 2rem; }
.lab-field { display: grid; gap: .35rem; }
.lab-field > span { font-size: .78rem; font-weight: 850; }
.lab-field small { color: var(--ink-soft); }
.lab-field textarea, .lab-field input { background: white; border: 1px solid var(--line); border-radius: 0; color: var(--ink); padding: .75rem; resize: vertical; width: 100%; }
.lab-field textarea:focus, .lab-field input:focus { border-color: var(--green); outline: 2px solid rgba(102,131,108,.2); }
.completion-check { align-items: center; border-top: 1px solid var(--line); display: flex; font-size: .78rem; font-weight: 800; gap: .65rem; padding-top: 1.4rem; }
.completion-check input { accent-color: var(--green); height: 1rem; width: 1rem; }
.lab-actions { align-items: center; display: flex; gap: 1rem; }
.text-button { background: transparent; border: 0; color: var(--ink-soft); cursor: pointer; font-size: .7rem; text-decoration: underline; }
.save-status { color: var(--green); font-size: .68rem !important; font-weight: 750; margin: 0; }
.lab-next { border-top: 1px solid var(--line); margin-top: 6rem; padding: 2rem 0; text-align: right; }

@media (max-width: 860px) {
  .home-hero, .release-feature, .book-hero, .collection-intro, .book-lab-callout, .lab-layout { grid-template-columns: 1fr; }
  .home-hero { min-height: auto; }
  .home-hero__aside { max-width: 500px; }
  .method-strip { grid-template-columns: repeat(2, 1fr); }
  .method-strip article:nth-child(2) { border-right: 0; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-lab-callout .arrow-link { grid-column: 1; }
  .reader-header { grid-template-columns: 1fr auto; }
  .reader-header > a:nth-child(2) { display: none; }
  .reader-header button { display: block; }
  .reader-shell { display: block; }
  .reader-toc { background: var(--paper); display: none; height: auto; inset: 72px 0 auto; max-height: calc(100vh - 72px); position: fixed; z-index: 45; }
  .reader-toc[data-open] { display: block; }
  .lab-layout { gap: 4rem; }
}

@media (max-width: 560px) {
  .site-header { min-height: 68px; }
  .wordmark small { display: none; }
  .home-hero h1 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .method-strip, .catalog-grid { grid-template-columns: 1fr; }
  .method-strip article { border-bottom: 1px solid rgba(255,255,255,.18); border-right: 0; min-height: 210px; }
  .method-strip h2 { margin-top: 2.5rem; }
  .release-feature__cover, .book-cover { box-shadow: .75rem .75rem 0 var(--yellow); }
  .collection-intro { padding-top: 5rem; }
  .catalog-card { min-height: 190px; }
  .site-footer { align-items: start; flex-direction: column; gap: 1.5rem; }
  .site-footer p { text-align: left; }
  .lab-card, .section-title { align-items: start; grid-template-columns: 1fr; }
  .lab-card__progress { text-align: left; }
  .weeks li a { align-items: start; grid-template-columns: 1.5rem 1fr; }
  .weeks li strong { grid-column: 2; }
  .lab-layout { display: block; }
  .lab-artifact { margin: 4rem -.2rem 0; padding: 1.3rem; }
  .reader-main article { padding-left: 1.2rem; padding-right: 1.2rem; }
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav a + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
