/* Warm paper, clear ink, and a single olive accent. No shadows. */
:root {
  color-scheme: light;
  --bg: #faf9f6; --text: #292b25; --muted: #717568; --link: #637247;
  --line: #dedfd5; --wash: #f0f0e8; --section-bg: #f0f0e8; --border: #dedfd5;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #20221e; --text: #e9e8df; --muted: #a6ab9c; --link: #bdc999;
  --line: #3e4337; --wash: #292d25; --section-bg: #292d25; --border: #3e4337;
}
/* Reserve the scrollbar space on short pages too, so centered content doesn't shift between pages. */
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; scroll-padding-top: 32px; transition: background-color 450ms var(--ease); }
.editorial main { max-width: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
body.editorial { box-sizing: border-box; max-width: 808px; margin: 0 auto; padding: 0 32px; font: 400 17px/1.7 var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; transition: background-color 450ms var(--ease), color 450ms var(--ease); }
.editorial *, .editorial *::before, .editorial *::after { box-sizing: border-box; }
.editorial ::selection { background: var(--line); color: var(--text); }
.editorial a { color: var(--link); padding: 0; margin: 0; font-weight: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 4px; text-decoration-thickness: 1px; border-radius: 0; transition: color 220ms var(--ease), text-decoration-color 220ms var(--ease); }
.editorial a::after { content: none; }
.editorial a:hover { text-decoration-color: currentColor; }
.editorial :focus-visible { outline: 2px solid var(--link); outline-offset: 5px; border-radius: 3px; }
.editorial button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease); }
.editorial button:active { transform: scale(.96); }
.editorial .site-nav { display: flex; align-items: center; gap: 28px; padding: 29px 0; margin: 0 0 58px; border-bottom: 1px solid var(--line); }
.editorial .site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.4; color: var(--muted); position: relative; text-decoration: none; }
.editorial .site-nav a::after { content: ''; position: absolute; height: 1px; background: var(--link); width: 100%; bottom: 8px; left: 0; transform: scaleX(0); transform-origin: left; transition: transform 350ms var(--ease); opacity: 1; }
.editorial .site-nav a:hover::after, .editorial .site-nav a[aria-current=page]::after { transform: scaleX(1); }
.editorial .site-nav a[aria-current=page] { color: var(--text); }
.editorial .theme-switch { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; padding: 10px; border: 0; border-radius: 50%; background: transparent; transition: background-color 300ms var(--ease); flex: 0 0 auto; }
.editorial .theme-switch:hover { background: var(--wash); }
.theme-switch svg { width: 21px; height: 21px; color: var(--muted); overflow: visible; }
.sun-core, .sun-rays, .moon-cutout { transition: transform 550ms var(--ease), opacity 400ms var(--ease); transform-origin: 12px 12px; }
[data-theme=dark] .sun-core { transform: scale(1.65); }
[data-theme=dark] .sun-rays { transform: rotate(70deg) scale(.4); opacity: 0; }
[data-theme=dark] .moon-cutout { transform: translate(-6px, 1px); }
.editorial .theme-switch:hover .sun-rays { transform: rotate(22deg); }
[data-theme=dark] .editorial .theme-switch:hover .sun-rays { transform: rotate(70deg) scale(.4); }
[data-theme=dark] .editorial .theme-switch:hover .moon-cutout { transform: translate(-7px, 2px); }
.editorial .skip-link { position: absolute; top: -80px; padding: 10px 18px; background: var(--bg); z-index: 5; }
.editorial .skip-link:focus { top: 12px; }
.editorial h1, .editorial h2, .editorial h3 { color: var(--text); }
.editorial h1 { font: 400 clamp(42px, 6.2vw, 64px)/1.09 var(--serif); letter-spacing: -.045em; margin: 0 0 25px; opacity: 1; animation: none; text-wrap: balance; }
.editorial h2 { position: static; padding: 0; font: 400 30px/1.2 var(--serif); letter-spacing: -.025em; margin: 0 0 18px; }
.editorial h2::after { content: none; }
.editorial h3 { font: 400 26px/1.25 var(--serif); letter-spacing: -.02em; margin: 0 0 10px; }
.editorial p { margin: 0 0 18px; }
.editorial strong { font-weight: 600; }
.editorial .hero { position: relative; padding: 0 0 66px; }
.hero-top { display: flex; align-items: center; gap: 16px; margin-bottom: 31px; }
.editorial .portrait { display: block; width: 66px; height: 66px; border-radius: 50%; object-fit: cover; background: #eeeee8; }
.editorial .location { color: var(--muted); font-size: 12px; letter-spacing: .015em; display: flex; align-items: center; gap: 7px; }
.location svg { height: 13px; width: 13px; }
.editorial .thread-mark { position: absolute; top: -12px; right: -10px; width: 170px; height: 100px; padding: 0; color: var(--link); background: none; border: 0; border-radius: 12px; }
.thread-mark svg { width: 100%; height: 100%; overflow: visible; }
.thread-mark path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-thread 1600ms var(--ease) both; }
@keyframes draw-thread { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.editorial .intro { font-size: 21px; line-height: 1.6; letter-spacing: -.022em; max-width: 580px; margin-bottom: 18px; }
.editorial .intro-secondary { font-size: 16px; max-width: 565px; color: var(--muted); line-height: 1.75; margin: 0; }
.hero-title { display: flex; align-items: center; gap: 15px; }
.editorial .pronounce { align-self: center; margin-top: -16px; width: 36px; height: 40px; display: grid; place-items: center; border: none; background: none; color: var(--muted); }
.pronounce svg { width: 21px; height: 21px; }
.pronounce .sound-wave { transform-origin: 8px 12px; transition: opacity 250ms, transform 250ms; }
.pronounce:hover .sound-wave { transform: translateX(1.5px); }
.pronounce.is-playing .sound-wave { animation: sound-wave 700ms ease-in-out infinite alternate; }
@keyframes sound-wave { to { opacity: .35; transform: translateX(2px); } }
.editorial .chapter { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 26px; padding: 39px 0 43px; border-top: 1px solid var(--line); }
.editorial .chapter-label { margin: 5px 0 0; font: 500 12px/1.5 var(--sans); letter-spacing: .025em; color: var(--muted); }
.chapter-content { min-width: 0; }
.editorial .chapter-content > :last-child { margin-bottom: 0; }
.editorial .current-item { margin-bottom: 24px; }
.editorial .current-item p { font-size: 15px; color: var(--muted); line-height: 1.65; margin: 4px 0 0; }
.editorial .project-link { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }
.link-arrow { height: 15px; width: 15px; color: var(--link); flex: 0 0 auto; transition: transform 350ms var(--ease); }
a:hover .link-arrow { transform: translate(2px, -2px); }
.editorial .family-note { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 25px 0 0; }
.editorial .family-note del { opacity: .7; }
.editorial .essay-list { list-style: none; margin: 0; padding: 0; }
.editorial .essay-list > li { padding: 0; margin: 0; }
.editorial .essay-list > li::before { content: none; }
.editorial .essay-link { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 13px 0; color: var(--text); border-bottom: 1px solid var(--line); text-decoration: none; }
.editorial .essay-list li:first-child .essay-link { padding-top: 0; }
.editorial .essay-link .essay-title { font: 400 24px/1.35 var(--serif); letter-spacing: -.025em; transition: color 250ms var(--ease); }
.editorial .essay-link:hover .essay-title { color: var(--link); }
.editorial .essay-link .essay-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.editorial .text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 22px; padding-block: 11px; margin-block: 11px; }
.editorial .beliefs { list-style: none; padding: 0; margin: 0; }
.editorial .beliefs li { padding: 0; margin: 0 0 15px; font: 400 22px/1.5 var(--serif); letter-spacing: -.016em; }
.editorial .beliefs li::before { content: none; }
.editorial .history { list-style: none; margin: 0; padding: 0; }
.editorial .history li { padding: 0 0 23px 22px; margin: 0; border-left: 1px solid var(--line); position: relative; font-size: 15px; color: var(--muted); line-height: 1.8; }
.editorial .history li::before { content: ''; position: absolute; width: 5px; height: 5px; background: var(--bg); border: 1px solid var(--link); border-radius: 50%; left: -3px; top: 11px; }
.editorial .history li:last-child { padding-bottom: 0; border-color: transparent; }
.editorial .site-footer { padding: 30px 0 42px; border-top: 1px solid var(--line); margin-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.site-footer > div { display: flex; gap: 20px; }
/* Inline links keep their place in the line; the vertical padding only grows the tap area. */
.editorial .site-footer a { color: var(--muted); padding-block: 14px; margin-block: -14px; }
.footer-name { display: inline-flex; align-items: center; gap: 9px; }
/* The favicon's upside-down face. It rights itself when you hover the footer. */
.footer-mark { width: 18px; height: 18px; flex: 0 0 auto; color: var(--link); rotate: 180deg; transition: rotate 700ms var(--ease); }
.site-footer:hover .footer-mark { rotate: 0deg; }
.editorial .page-intro { margin-bottom: 54px; }
.editorial .page-intro p { max-width: 500px; color: var(--muted); font-size: 18px; }
.editorial .book-feature { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; margin-bottom: 50px; display: grid; grid-template-columns: 65px 1fr; gap: 26px; }
.book-symbol { width: 55px; height: 70px; color: var(--link); }
.book-symbol .book-page { transform-origin: 27px 35px; transition: transform 500ms var(--ease); }
.book-feature:hover .book-page { transform: skewY(-7deg) translateX(2px); }
.editorial .book-feature p { font-size: 15px; color: var(--muted); margin-bottom: 0; }
.editorial .book-note { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 0 40px; }
.editorial .writing-section { margin-bottom: 48px; }
.editorial .writing-section > p { color: var(--muted); font-size: 15px; margin-top: -8px; margin-bottom: 25px; }
.editorial .writing-section .essay-link { padding: 19px 0; }
.editorial .draft-note { font-size: 13px; color: var(--muted); margin-top: 25px; }
.editorial details { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; font-size: 14px; color: var(--muted); }
.editorial summary { cursor: pointer; min-height: 44px; padding: 8px 0; }
.editorial .drafts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 12px 0 0; }
.editorial .drafts li { padding: 0; }.editorial .drafts li::before { content: none; }
/* Essay bodies retain their original content and custom figures. */
body.editorial.article { max-width: 784px; }
.editorial.article h1 { font-size: clamp(36px, 5.2vw, 52px); margin-bottom: 24px; }
.editorial.article .date { font: 400 13px/1.65 var(--sans); color: var(--muted); opacity: 1; margin: 0 0 38px; }
.editorial.article .letter { margin: 0; font: 400 20px/1.85 var(--serif); opacity: 1; animation: none; }
.editorial.article .letter p { margin: 0 0 25px; }
.editorial.article .letter h2 { font: 400 29px/1.3 var(--serif); opacity: 1; margin: 42px 0 18px; }
.editorial.article .letter ul { list-style: disc; padding-left: 22px; }
.editorial.article .letter li { padding-left: 4px; margin: 10px 0; }
.editorial.article .letter li::before { content: none; }
:root { --highlight-bg: #e8cf8b; --highlight-text: #393323; }
:root[data-theme=dark] { --highlight-bg: #705923; --highlight-text: #fff5d6; }
.editorial.article .letter .highlight { background: var(--highlight-bg); color: var(--highlight-text); padding: .03em .13em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.editorial.article .ps, .editorial.article .signature { opacity: 1; animation: none; }
.editorial.article .ps { font-style: italic; margin-top: 1.5rem; }
.editorial.article .signature { margin-top: 2rem; }
.editorial .back-link { font-size: 13px; display: inline-block; margin: -11px 0 14px; padding-block: 11px; transition: translate 250ms var(--ease), color 220ms var(--ease), text-decoration-color 220ms var(--ease); }
.editorial .back-link:hover { translate: -2px 0; }
.editorial .kids-entry { display: grid; grid-template-columns: 55px 1fr; gap: 27px; padding: 34px 0 40px; border-top: 1px solid var(--line); }
.kids-entry > svg { width: 45px; height: 45px; color: var(--link); overflow: visible; }
/* Number Munchers: the four operators pop one after another. Ellie: the bars speak. Both wait for a hover or focus. */
.munch-op, .voice-bar { transform-box: fill-box; transform-origin: center; }
.kids-entry:is(:hover, :focus-within) .munch-op { animation: munch-pop 520ms var(--ease) both; }
.munch-op:nth-of-type(2) { animation-delay: 90ms; } .munch-op:nth-of-type(3) { animation-delay: 180ms; } .munch-op:nth-of-type(4) { animation-delay: 270ms; }
@keyframes munch-pop { 40% { transform: scale(1.45); } }
.kids-entry:is(:hover, :focus-within) .voice-bar { animation: voice-talk 760ms ease-in-out infinite alternate; }
.voice-bar:nth-child(1), .voice-bar:nth-child(7) { animation-delay: -100ms; } .voice-bar:nth-child(2), .voice-bar:nth-child(6) { animation-delay: -420ms; }
.voice-bar:nth-child(3), .voice-bar:nth-child(5) { animation-delay: -250ms; } .voice-bar:nth-child(4) { animation-delay: -600ms; }
@keyframes voice-talk { from { transform: scaleY(1); } to { transform: scaleY(.4); } }
/* Dino Garden: a drop falls into the dirt and the sprout grows. */
.garden-drop, .garden-sprout { transform-box: fill-box; }
.garden-sprout { transform-origin: 50% 100%; }
.kids-entry:is(:hover, :focus-within) .garden-drop { animation: garden-drop 760ms var(--ease) both; }
.kids-entry:is(:hover, :focus-within) .garden-sprout { animation: garden-grow 620ms var(--ease) 420ms both; }
@keyframes garden-drop { 55% { transform: translateY(11px); opacity: 0; } 56% { transform: none; opacity: 0; } }
@keyframes garden-grow { 45% { transform: scale(1.3); } }
.editorial .kids-entry p { color: var(--muted); font-size: 16px; }
/* Page changes: the nav holds still, the content slides in under it, essay titles travel from list to article. */
@view-transition { navigation: auto; }
.editorial .site-nav { view-transition-name: site-nav; }
.editorial main { view-transition-name: main; }
.editorial .site-footer { view-transition-name: site-footer; }
.editorial.article h1 { view-transition-name: essay-title; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
::view-transition-old(main), ::view-transition-old(site-footer) { animation: 120ms ease-out both page-out; }
::view-transition-new(main), ::view-transition-new(site-footer) { animation: 320ms var(--ease) both page-in; }
.vt-back::view-transition-new(main), .vt-back::view-transition-new(site-footer) { animation-name: page-in-back; }
::view-transition-group(essay-title) { animation-duration: 340ms; animation-timing-function: var(--ease); }
::view-transition-old(essay-title), ::view-transition-new(essay-title) { height: 100%; width: auto; object-fit: none; object-position: left top; animation-duration: 200ms; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes page-in-back { from { opacity: 0; transform: translateY(-8px); } }
/* Theme changes crossfade as one frame instead of each color racing separately. */
.theme-switching, .theme-switching body { transition: none; }
.theme-switching::view-transition-group(*) { animation-duration: 260ms; }
.theme-switching::view-transition-old(*) { animation: 260ms var(--ease) both page-out; }
.theme-switching::view-transition-new(*) { animation: 260ms var(--ease) both theme-fade; }
@keyframes theme-fade { from { opacity: 0; } }
/* Content settles into place on arrival. Pure CSS, so nothing depends on script to become visible. */
[data-reveal], .editorial a[data-reveal] { transition: opacity 560ms var(--ease), translate 560ms var(--ease), color 220ms var(--ease), text-decoration-color 220ms var(--ease); transition-delay: calc(var(--reveal-step, 0) * 70ms), calc(var(--reveal-step, 0) * 70ms), 0s, 0s; }
@starting-style { [data-reveal] { opacity: 0; translate: 0 10px; } }
[data-reveal="2"] { --reveal-step: 1; } [data-reveal="3"] { --reveal-step: 2; } [data-reveal="4"] { --reveal-step: 3; } [data-reveal="5"] { --reveal-step: 4; } [data-reveal="6"] { --reveal-step: 5; }
:active-view-transition [data-reveal] { transition: none; }
@media (max-width: 600px) {
  body.editorial { padding: 0 25px; font-size: 16px; }
  .editorial .site-nav { gap: 23px; padding: 17px 0; margin-bottom: 38px; }
  .editorial .site-nav a { font-size: 12px; }
  .editorial .theme-switch { width: 40px; padding: 9px; }
  .editorial .hero { padding-bottom: 40px; }
  .hero-top { margin-bottom: 27px; }
  .editorial .portrait { width: 55px; height: 55px; }
  .editorial .location { font-size: 11px; max-width: 100px; line-height: 1.6; }
  .editorial .thread-mark { width: 115px; right: -9px; top: -19px; }
  .editorial h1 { font-size: 44px; }
  .hero-title { gap: 4px; }
  .editorial .intro { font-size: 19px; }
  .editorial .intro-secondary { font-size: 15px; }
  .editorial .chapter { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 35px; }
  .editorial .chapter-label { font-size: 12px; }
  .editorial .essay-link .essay-title { font-size: 23px; }
  .editorial .essay-link .essay-meta { font-size: 10px; }
  .editorial .essay-link { gap: 12px; }
  .editorial .beliefs li { font-size: 22px; }
  .editorial .page-intro { margin-bottom: 35px; }
  .editorial .book-feature { gap: 16px; grid-template-columns: 48px 1fr; }
  .book-symbol { width: 42px; }
  .editorial.article .letter { font-size: 19px; line-height: 1.8; }
  .editorial .kids-entry { grid-template-columns: 36px 1fr; gap: 19px; }
  .kids-entry > svg { width: 32px; }
  .editorial .site-footer { gap: 12px; font-size: 11px; }
  .site-footer > div { gap: 14px; }
}
@media (max-width: 360px) {
  body.editorial { padding: 0 20px; }
  .editorial .site-nav { gap: 17px; }
  .editorial h1 { font-size: 39px; }
  .editorial .thread-mark { width: 92px; }
  .editorial .essay-link { flex-wrap: wrap; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { transition: none; }
  .editorial *, .editorial *::before, .editorial *::after, [data-reveal] { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
