@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;650;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --paper: #fbf9f5;
  --panel: #f0e8dc;
  --ink: #211f19;
  --muted: #514b42;
  --green: #314c3e;
  --green-hover: #233b2f;
  --line: #dbd1c4;
  --white: #fffdfa;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 'DM Sans', system-ui, sans-serif; }
body.driving { --panel: #e8edef; --green: #284956; --green-hover: #1d3440; --line: #ccd8dc; --muted: #48565b; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: var(--green); text-underline-offset: .19em; }
a:hover { color: var(--green-hover); }
:focus-visible { outline: 2px solid var(--green); outline-offset: .3rem; }
h1, h2, h3, p { margin-block: 0; }
h1, h2, .wordmark { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 4.3vw, 3rem); line-height: 1.13; }
h3 { font-size: 1.18rem; line-height: 1.35; }
.wrap { width: min(calc(100% - 3rem), 71rem); margin-inline: auto; }
.skip { position: absolute; top: -5rem; left: 1rem; z-index: 10; padding: .6rem; background: var(--white); }
.skip:focus { top: 1rem; }
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.navline, .foot .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: .75rem; min-height: 4.6rem; }
.navline nav { display: flex; align-items: center; gap: .15rem clamp(.75rem, 2.5vw, 2rem); flex-wrap: wrap; }
.navline nav a { display: inline-flex; min-height: 2.75rem; align-items: center; font-weight: 650; text-decoration: none; }
.navline nav a:is([aria-current],:hover) { text-decoration: underline; }
.wordmark { color: var(--ink); font-size: 2.05rem; line-height: 1; text-decoration: none; white-space: nowrap; }
.button { display: inline-flex; min-height: 2.8rem; width: fit-content; align-items: center; justify-content: center; padding: .6rem 1rem; border-radius: .35rem; background: var(--green); color: var(--white); text-decoration: none; font-weight: 700; }
.button:hover { background: var(--green-hover); color: var(--white); }
.library { margin-block: clamp(2.5rem, 6vw, 4.8rem); }
.library > h2 { margin-bottom: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: .5rem; background: var(--white); overflow: hidden; }
.tile:hover h3 { text-decoration: underline; text-underline-offset: .16em; }
.tile img { width: 100%; aspect-ratio: 4 / 3; }
.tile > div { padding: .9rem 1rem 1.05rem; }
.tile p { color: var(--muted); font-size: .93rem; margin-top: .25rem; }
.guide-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .85rem 1.5rem; }
.guide-list { border-top: 1px solid var(--line); padding-block: .9rem; }
.guide-list ul, .related ul, .jump-links ul { padding-left: 1.2rem; margin-block: .55rem 0; }
.guide-list li + li, .related li + li { margin-top: .45rem; }
.crumb { color: var(--muted); margin-block: 1.35rem 1rem; font-size: .9rem; }
.article-head { max-width: 50rem; margin: 0 auto 1.7rem; }
.article-head h1 { font-size: clamp(2.7rem, 7vw, 5.6rem); }
.lede { margin-top: .7rem; font-size: clamp(1rem, 2vw, 1.24rem); color: var(--muted); max-width: 60ch; }
.article-photo { margin-inline: auto; max-width: 50rem; }
.article-photo img { width: 100%; aspect-ratio: 2 / 1; border-radius: .5rem; }
.prose { max-width: 45rem; margin: 1.8rem auto 2.5rem; overflow-wrap: anywhere; }
.prose h2 { margin: 1.9rem 0 .65rem; font-size: clamp(1.95rem, 4vw, 2.62rem); }
.prose h3 { margin: 1.1rem 0 .35rem; }
.prose p + p { margin-top: .82rem; }
.prose li + li { margin-top: .32rem; }
.prose blockquote { margin-inline: 0; border-left: 3px solid var(--line); padding-left: 1rem; }
.prose .reference { margin-top: 1.2rem; font-size: .85rem; color: var(--muted); }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .45rem .75rem; text-align: left; }
.shelf-preview { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr; align-items: center; gap: 1.1rem; margin-block: 1.9rem; border-radius: .5rem; padding: .9rem; background: var(--panel); }
.shelf-preview img { width: 100%; aspect-ratio: 1; border-radius: .35rem; }
.shelf-preview h2 { margin: 0 0 .3rem; font-size: clamp(1.55rem, 3.5vw, 2.35rem); }
.shelf-preview p { margin-bottom: .65rem; color: var(--muted); }
.related { max-width: 45rem; margin: 0 auto 3.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 2rem; }
.disclosure { font-size: .88rem; color: var(--muted); margin: .75rem 0 1.4rem; }
.jump-links { background: var(--white); border-radius: .4rem; border: 1px solid var(--line); padding: .8rem 1rem; margin-bottom: 1.5rem; }
.jump-links summary { font-weight: 700; cursor: pointer; }
.jump-links ul { columns: 3 12rem; padding-left: 1.35rem; }
.jump-links li { break-inside: avoid; margin-bottom: .35rem; }
.shop-body { margin-bottom: 3rem; }
.shop-shelf { display: grid; grid-template-columns: 12rem 1fr; align-items: start; gap: 1.4rem; padding: 1.2rem; border-radius: .5rem; background: var(--white); border: 1px solid var(--line); margin: 0 0 1rem; }
.shop-shelf:target { outline: 2px solid var(--green); outline-offset: 2px; background: var(--panel); }
.shop-shelf img { width: 100%; aspect-ratio: 1; border-radius: .35rem; }
.shop-shelf h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.picks { display: grid; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.picks li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .15rem 1rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.picks a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .92rem; font-weight: 700; white-space: nowrap; }
.picks small { margin-left: .3em; font-size: .78rem; font-weight: 500; }
.foot { border-top: 1px solid var(--line); }
@media (max-width: 50rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 35rem) {
  .wrap { width: min(calc(100% - 1.5rem), 71rem); }
  .shop-shelf { grid-template-columns: 1fr; }
  .shop-shelf img { aspect-ratio: 2; max-height: 11rem; }
  .shelf-preview { grid-template-columns: 1fr; }
  .shelf-preview img { aspect-ratio: 2; max-height: 9rem; }
}
