:root {
  color-scheme: light;
  --paper: #f8f2e8;
  --shelf: #eee6d7;
  --white: #fffcf5;
  --ink: #282923;
  --subtext: #57574b;
  --brick: #a03d2d;
  --brick-dark: #853022;
  --olive: #344435;
  --line: #d8cdbb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--brick-dark); }
img { display: block; width: 100%; height: auto; }
input, select, button { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brick-dark); outline-offset: 4px; }
main:focus { outline: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; }
h2 { font-size: clamp(2rem,4vw,3.4rem); letter-spacing: -.047em; }
h3 { letter-spacing: -.028em; }
.wrap { width: min(1220px, calc(100% - 5.5rem)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; top: .7rem; left: .7rem; padding: .55rem .85rem; background: var(--white); }

.head { border-bottom: 1px solid var(--line); }
.nav-wrap { display: flex; gap: 2.3rem; min-height: 75px; align-items: center; }
.brand { display: inline-flex; gap: .68rem; align-items: center; font-size: .92rem; font-weight: 680; text-decoration: none; white-space: nowrap; }
.mark { display: grid; place-items: center; background: var(--brick); color: var(--white); width: 36px; height: 36px; border-radius: 8px 8px 8px 2px; font: italic 1.67rem/1 var(--serif); }
.nav-wrap nav { display: flex; gap: clamp(.65rem,2.2vw,1.8rem); align-items: center; margin-inline: auto; }
.nav-wrap nav a { display: inline-block; font-size: .88rem; font-weight: 550; text-decoration: none; padding-block: .4rem; }
.nav-wrap nav a[aria-current], .nav-wrap nav a:hover { text-decoration: underline; }
.locale { position: relative; flex: 0 0 auto; }
.locale summary { display: flex; align-items: center; gap: .35rem; border: 1px solid var(--line); min-height: 43px; padding: .25rem .65rem; border-radius: .4rem; font-weight: 700; font-size: .82rem; }
.locale summary::after { content: '⌄'; }
.locale summary::-webkit-details-marker { display: none; }
.locale ul { position: absolute; z-index: 2; min-width: 132px; top: calc(100% + 6px); right: 0; margin: 0; padding: .25rem; list-style: none; border: 1px solid var(--line); background: var(--white); border-radius: .4rem; box-shadow: 0 8px 20px #35282018; }
.locale a { display: block; padding: .42rem .55rem; text-decoration: none; }
.locale a[aria-current] { font-weight: 700; }

.hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.04fr); gap: clamp(2rem,6vw,5.4rem); align-items: center; padding-block: clamp(2.5rem,6vw,5.4rem); }
.eyebrow { font: 700 .74rem/1.38 var(--sans); color: var(--brick-dark); text-transform: uppercase; letter-spacing: .10em; }
.hero h1 { max-width: 10ch; margin: .9rem 0 .62rem; font-size: clamp(3.2rem,7.1vw,6.7rem); letter-spacing: -.075em; line-height: .91; overflow-wrap: normal; }
.hero-line { font: 400 clamp(1.35rem,2.7vw,2.24rem)/1.13 var(--serif); color: var(--olive); letter-spacing: -.035em; margin-block: 1.1rem; }
.intro { max-width: 51ch; color: var(--subtext); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: 1.55rem; }
.hero-art { background: var(--shelf); border-radius: .8rem; overflow: hidden; }
.hero-img { aspect-ratio: 21/16; object-fit: cover; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .7rem; padding: .63rem .95rem; border: 1px solid transparent; border-radius: .4rem; font-size: .88rem; font-weight: 670; line-height: 1.25; text-decoration: none; }
.button.primary { background: var(--brick); color: var(--white); }
.button.primary:hover { background: var(--brick-dark); }
.button.outline { background: transparent; border-color: #a79a87; }
.button.outline:hover { background: var(--white); border-color: var(--brick-dark); }
.shelf { background: var(--shelf); border-block: 1px solid var(--line); padding-block: 1.65rem; }
.shelf-top { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.shelf h2 { font-size: clamp(1.7rem,3vw,2.6rem); }
.shelf-top p { color: var(--subtext); margin-top: .28rem; font-size: .91rem; }
.category-picker { display: flex; flex-wrap: wrap; gap: .55rem; }
.category-picker select, .compare-top select, input { border: 1px solid #b3a895; border-radius: .36rem; background: var(--white); min-height: 44px; padding: .48rem .62rem; }
.category-picker select { max-width: 100%; }
.category-links { display: flex; gap: .47rem; flex-wrap: wrap; padding: 0; margin: 1.08rem 0 0; list-style: none; }
.pill { display: inline-flex; gap: .42rem; align-items: center; min-height: 40px; padding: .28rem .65rem; border: 1px solid #c5b7a2; border-radius: .4rem; background: var(--paper); text-decoration: none; font-size: .81rem; }
.pill:hover { border-color: var(--brick-dark); }

.section, .compare { margin-block: clamp(3rem,7vw,5.75rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.65rem; }
.section-heading p { margin-top: .55rem; color: var(--subtext); }
.compare { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: clamp(1.35rem,5vw,4rem); align-items: center; }
.compare-explain .eyebrow { margin-bottom: .75rem; }
.compare-explain > p:last-of-type { margin-top: .9rem; color: var(--subtext); max-width: 44ch; }
.compare-form { padding: clamp(.8rem,2.7vw,1.7rem); background: var(--white); border: 1px solid var(--line); border-radius: .7rem; }
.compare-top { display: flex; align-items: end; gap: .75rem; justify-content: space-between; }
.compare-top label { display: grid; gap: .25rem; font-size: .8rem; font-weight: 650; }
.quiet { min-height: 44px; background: none; border: 0; color: var(--brick-dark); font-size: .85rem; font-weight: 650; text-decoration: underline; text-underline-offset: .27em; }
.compare-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; margin-block: .9rem; }
.listing { min-width: 0; width: 100%; padding: .55rem .7rem .7rem; margin: 0; border: 1px solid var(--line); border-radius: .4rem; }
.listing legend { padding-inline: .23rem; color: var(--olive); font-size: .82rem; font-weight: 700; }
.listing label, .working-copy label { display: grid; gap: .2rem; font-size: .81rem; font-weight: 650; margin-bottom: .5rem; }
.listing input { min-width: 0; width: 100%; }
.listing input[aria-invalid=true] { border-color: var(--brick-dark); outline-color: var(--brick-dark); }
.subtotal { margin-top: .85rem; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--subtext); }
.subtotal output { display: block; font-size: clamp(1rem,2.2vw,1.42rem); color: var(--olive); font-weight: 700; overflow-wrap: anywhere; }
.compare-result { font-weight: 650; color: var(--olive); }
.compare-hint { color: var(--subtext); font-size: .8rem; }

.notes-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; }
.notes .notes-grid .note-card:first-child { grid-column: span 2; }
.note-card { min-width: 0; min-height: 100%; }
.note-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--white); border-radius: .6rem; border: 1px solid var(--line); text-decoration: none; }
.note-link:hover { border-color: var(--brick-dark); }
.note-img { aspect-ratio: 1.70; object-fit: cover; background: var(--shelf); }
.notes .note-card:first-child .note-img { aspect-ratio: 3.45; }
.note-info { position: relative; padding: 1.08rem 2.45rem 1.26rem 1.05rem; }
.note-info h3 { margin: .35rem 0 .49rem; font-size: clamp(1.15rem,2.25vw,1.7rem); }
.note-info > p:last-of-type { color: var(--subtext); font-size: .86rem; }
.card-arrow { font-size: 1.15rem; color: var(--brick-dark); }
.note-info .card-arrow { position: absolute; right: .93rem; top: 1.02rem; }

.tool-band { background: var(--shelf); border-block: 1px solid var(--line); display: flow-root; }
.worksheet-list, .topic-list { list-style: none; padding: 0; margin: 0; }
.worksheet-list li { border-bottom: 1px solid var(--line); }
.worksheet-list li:first-child { border-top: 1px solid var(--line); }
.worksheet-list a { display: flex; gap: .8rem; justify-content: space-between; padding: .93rem .32rem; text-decoration: none; }
.worksheet-list a:hover { background: #fff9; }
.worksheet-list a > span span { display: block; }
.worksheet-list strong { display: block; font: 400 clamp(1.2rem,2.4vw,1.75rem)/1.16 var(--serif); letter-spacing: -.025em; margin: .18rem 0 .41rem; }
.worksheet-list strong + span { color: var(--subtext); font-size: .88rem; }
.topic-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(180px,100%),1fr)); gap: .68rem; margin-top: 1.2rem; }
.topic-list a { display: block; height: 100%; padding: .86rem; background: var(--white); border: 1px solid var(--line); border-radius: .42rem; text-decoration: none; }
.topic-list a:hover { border-color: var(--brick-dark); }
.topic-list strong { display: flex; gap: .45rem; justify-content: space-between; margin-bottom: .33rem; }
.topic-list strong + span { display: block; color: var(--subtext); font-size: .84rem; }
.foot-links { display: flex; gap: .6rem 1.35rem; font-size: .88rem; flex-wrap: wrap; }
.footer { border-top: 1px solid var(--line); padding-block: 1.8rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: start; justify-content: space-between; }
.footer p { color: var(--subtext); font-size: .88rem; margin-top: .65rem; }

.page-heading, .entry-head { padding-block: clamp(2.15rem,5vw,4.2rem); }
.crumb { display: flex; flex-wrap: wrap; gap: .4rem .55rem; color: var(--subtext); font-size: .82rem; margin-bottom: 1.12rem; }
.page-heading h1, .entry h1 { max-width: 24ch; font-size: clamp(2.85rem,6.1vw,5.16rem); letter-spacing: -.064em; text-wrap: pretty; }
.page-heading p, .entry-intro { max-width: 65ch; color: var(--subtext); margin-top: .94rem; font-size: clamp(1.04rem,2.2vw,1.26rem); }
.listing-index { margin-bottom: 3.3rem; }
.listing-index h2, .related h2 { margin-bottom: 1.25rem; }
.entry-hero { border-bottom: 1px solid var(--line); padding-bottom: clamp(1.4rem,4vw,3rem); }
.entry-hero.with-photo { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); align-items: center; gap: clamp(1.1rem,3.7vw,3.1rem); }
.entry-hero .eyebrow { display: inline-block; margin-bottom: .55rem; }
.entry-image { aspect-ratio: 1.48; object-fit: cover; border-radius: .65rem; }
.date { color: var(--subtext); font-size: .81rem; margin-top: .7rem; }
.prose { max-width: 74ch; margin-inline: auto; font-size: 1.04rem; }
.prose section { margin-bottom: 2rem; }
.prose h2 { font-size: clamp(1.6rem,3.5vw,2.35rem); margin-bottom: .62rem; }
.prose p + p { margin-top: .67rem; }
.prose ul { padding-left: 1.4rem; }
.prose li + li { margin-top: .47rem; }
.worksheet-box { border: 1px solid var(--line); background: var(--white); border-radius: .55rem; padding: clamp(.9rem,3vw,1.65rem); }
.worksheet-box dl { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); font-size: .92rem; margin: .2rem 0 1.4rem; }
.worksheet-box dt, .worksheet-box dd { padding: .38rem .25rem; margin: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.worksheet-box dt { font-weight: 650; }
.working-copy input { width: 100%; }
.worksheet-box [data-print] { margin-top: .65rem; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 3.4rem); }
  .nav-wrap { gap: 1.35rem; }
  .nav-wrap nav { gap: .9rem; }
  .notes-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2.3rem); }
  .nav-wrap { flex-wrap: wrap; gap: .15rem 1rem; min-height: auto; padding-block: .7rem .38rem; }
  .nav-wrap .locale { margin-left: auto; }
  .nav-wrap nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 0 .85rem; }
  .nav-wrap nav a { font-size: .8rem; min-height: 43px; display: inline-flex; align-items: center; padding-block: 0; }
  .hero, .compare, .entry-hero.with-photo { grid-template-columns: 1fr; }
  .hero { gap: 1.65rem; }
  .hero h1 { font-size: clamp(3.45rem,11.3vw,5.65rem); }
  .hero-img { aspect-ratio: 1.54; }
  .hero-actions { margin-top: 1.19rem; }
  .section-heading { flex-wrap: wrap; }
  .entry-image { max-width: 520px; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 1.6rem); }
  .notes-grid { grid-template-columns: 1fr; }
  .notes .notes-grid .note-card:first-child { grid-column: auto; }
  .notes .note-card:first-child .note-img { aspect-ratio: 1.70; }
  .topic-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.85rem,12.4vw,4rem); }
}
@media print {
  body { color: black; background: white; }
  .head, .footer, .related, .crumb, [data-print], .skip-link { display: none !important; }
  .wrap { width: 100%; }
  .entry h1 { font-size: 26pt; }
  .entry-head { padding-top: 0; }
  .worksheet-box { break-inside: avoid; }
}
