/* standard1: the editorial opening and serif reading layout, consolidated from the
   PaperUpgrade worktree's study. Loads last; every rule is scoped to body.standard1. */
/* Every face here is open source (SIL OFL) and bundled in assets/fonts (the site serves them from /papers/fonts); licences sit beside the files. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('assets/fonts/newsreader-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('assets/fonts/newsreader-italic.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2'); }

body.standard1 {
  --bg: #faf9f6; --fg: #24251f; --fg1: #30312b; --fg2: #44453e; --fg3: #61635b; --fg4: #666960; --rule: #e4e4de;
  --font-display: 'Newsreader', Georgia, serif;
  --font-reading: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-ui: 'Helvetica Neue', Arial, sans-serif;
  --green: #427b58;
  background: var(--bg); color: var(--fg);
}
.standard1 .site-header { background: var(--bg); }
.standard1 #main.post { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* Opening: centred category, title and byline, then the hero in a green card. */
.standard1 .article-hero { display: block; padding: 32px 0 0; border: 0; }
.standard1 .post-heading { max-width: 1068px; margin: 0 auto; text-align: center; padding: 0; }
.standard1 .article-category { display: inline-block; padding: 8px 10px 7px; background: #efeeeb; border: 1px solid #efeeeb; border-radius: 4px; font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; color: #24251f; text-decoration: none; }
.standard1 .post-title { max-width: 1068px; margin: 20px auto 24px; font: 400 72px/1.1 var(--font-display); letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.standard1 .publish-metadata { justify-content: center; gap: 10px 16px; font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; color: #8b8b84; }
.standard1 .publish-metadata .date::before { padding-right: 16px; }
.standard1 .editorial-header .cover { max-width: 980px; width: 100%; margin: 60px auto 0; }
.standard1 .cover-card { position: relative; isolation: isolate; overflow: hidden; padding: 30px 56px; border-radius: 9px; background: var(--card-image, none) center / cover no-repeat, radial-gradient(ellipse at 30% 20%, #0a5038, #03432d 65%, #023c29); color: #f0eed9; }
.standard1 .cover-card[style*='--card-image']::before { display: none; }
.standard1 .cover-card::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.5' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
.standard1 .cover-card > * { width: 100%; max-width: 740px; margin-inline: auto; }
.standard1 .cover-card .lens-art { margin-top: 0; border-radius: 4px; }
.standard1 .cover-card .lens-controls { color: #bacdb6; font: 11px/1.5 var(--font-mono); }
/* The hint sits on artwork, so it carries its own backing. */
.standard1 .cover-card [data-lens-hint] { padding: 3px 8px; border-radius: 3px; background: rgba(2, 40, 27, .72); color: #d9e2cf; }
.standard1 .cover-card .lens-controls button { background: transparent; border-color: #4b7960; color: #d9e9bc; }
.standard1 .cover-card .lens-controls button[aria-pressed=true] { background: #0a5038; }
.standard1 .cover-card .cover-outcome { margin-top: 18px; min-height: 0; color: #f0eed9; font: 14px/1.5 var(--font-sans); }
.standard1 .cover-card .cover-sr-only { max-width: none; margin: -1px; }

/* Summary box. */
.standard1 .article-summary { max-width: 848px; margin: 60px auto 64px; padding: 32px; background: #fff; border: 1px solid var(--rule); border-radius: 3px; }
.standard1 .summary-label { margin: 0 0 18px; font: 700 14px/1.5 var(--font-ui); }
.standard1 .article-summary .epigraph { margin: 0; padding: 0; border: 0; color: var(--fg1); font: 400 18px/1.6 var(--font-ui); }
.standard1 .article-summary .epigraph p { margin: 0; }
.standard1 .article-summary .epigraph p + p { margin-top: 22px; }
.standard1 .article-summary .epigraph strong { display: none; }

/* Reading column: 640px of serif between the rail and the reference gutter. */
.standard1 .post-content-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 640px) minmax(0, 1fr); column-gap: 36px; padding: 0 0 64px; }
.standard1 .post-content-shell > article.content { grid-column: 2; max-width: 640px; font: 400 17px/1.55 var(--font-reading); }
.standard1 article.content p:not([class]) { font: inherit; margin: 0 0 16px; }
.standard1 article.content h2 { margin: 40px 0 20px; font: 600 30px/1.2 var(--font-reading); letter-spacing: -.015em; }
.standard1 article.content h3 { margin: 32px 0 16px; font: 600 24px/1.25 var(--font-reading); letter-spacing: -.01em; }
.standard1 article.content figure { margin: 28px 0; }
.standard1 article.content .figure-box { background: #fff; padding: 18px; border: 1px solid var(--rule); border-radius: 5px; }
.standard1 article.content .figure-box:has(.chart) { padding: 12px 0; border: 0; border-radius: 0; background: transparent; }
.standard1 article.content .chart { background: transparent; }
.standard1 article.content figcaption { font: 12px/1.6 var(--font-sans); margin-top: 12px; }
.standard1 .dialogue p { font-size: 17px; margin: 0; }
.standard1 .sidenote { box-sizing: border-box; width: 220px; margin-right: -252px; margin-left: 32px; padding-left: 22px; font: 400 12px/1.55 var(--font-ui); color: #77796f; }
.standard1 .sidenote::before { position: absolute; top: 1px; left: 0; padding: 0; font: 400 10px/1.7 var(--font-mono); color: #85877e; }

/* Rail: unnumbered, with the article title taking the label's place once the main title scrolls away. */
.standard1 .left-toc { grid-column: 1; max-width: 210px; padding: 0; margin: 0; top: calc(var(--masthead-height) + 32px); }
.standard1 .left-toc .rail-title { display: block; visibility: hidden; max-width: 200px; font: 700 12px/1.4 var(--font-ui); color: #42483e; }
.standard1 .left-toc .rail-title.visible { visibility: visible; margin-bottom: 7px; }
.standard1 .left-toc .rail-title.visible + .rail-label { display: none; }
.standard1 .left-toc .rail-label, .standard1 .mobile-contents summary { font: 400 10px/1.5 var(--font-mono); letter-spacing: .04em; color: #85877e; }
.standard1 .left-toc .rail-label { margin-bottom: 14px; }
.standard1 .left-toc .section-number { display: none; }
.standard1 .left-toc li > a { padding: 7px 0; border: 0; font: 400 12px/1.4 var(--font-ui); color: #85877e; }
.standard1 .left-toc li.sub > a { padding: 4px 0 4px 14px; font-size: 12px; }
.standard1 .left-toc li.sub + li:not(.sub) > a { padding-top: 7px; }
.standard1 .left-toc li.is-active > a, .standard1 .left-toc a:hover { color: #3e493e; font-weight: 400; }
.standard1 .left-toc li.is-active .section-name { transform: none; }
.standard1 .reading-progress { margin-top: 18px; font: 400 10px/1.5 var(--font-mono); }
.standard1 .progress-track { width: 150px; height: 2px; font-size: 0; background: var(--rule); }
.standard1 .progress-fill { font-size: 0; background: var(--green); }
.standard1 .scroll-hint { display: none; }
.standard1 .left-toc .share { margin-top: 18px; gap: 8px; font: 400 11px/1.5 var(--font-ui); }
.standard1 .left-toc .share a, .standard1 .left-toc .share button { color: #85877e; }

.standard1 .paginator { display: flex; justify-content: space-between; gap: 24px; max-width: 640px; padding: 28px 0 64px; margin: 0 auto; border-top: 1px solid var(--rule); font: 11px/1.6 var(--font-mono); }
.standard1 .paginator a:first-child { padding: 0; }
.standard1 .site-footer { padding: 24px 32px; font: 11px/1.5 var(--font-mono); }

@media (max-width: 1439px) {
  .standard1 .sidenote { display: none; float: none; width: 100%; margin: 16px 0 24px; padding: 14px 16px 14px 36px; background: #efeee9; }
  .standard1 .margin-toggle:checked + .sidenote { display: block; }
  .standard1 .sidenote::before { top: 14px; left: 14px; }
}
@media (max-width: 1199px) {
  .standard1 .post-content-shell { display: block; max-width: 640px; margin: 0 auto; }
  .standard1 .left-toc { display: none; }
  .standard1 .mobile-contents { display: block; max-width: none; margin-bottom: 36px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .standard1 .mobile-contents > a { display: flex; gap: 12px; align-items: baseline; padding-top: 12px; font: 400 13px/1.5 var(--font-ui); }
  .standard1 .mobile-contents > a.sub { padding-left: 14px; font-size: 12px; }
  .standard1 .mobile-contents:not([open]) > a { display: none; }
}
@media (max-width: 640px) {
  .standard1 #main.post { padding: 0 20px; }
  .standard1 .article-hero { padding-top: 24px; }
  .standard1 .article-category { font-size: 10px; }
  .standard1 .post-title { font-size: 44px; margin: 20px auto 24px; }
  .standard1 .publish-metadata { gap: 8px 10px; font-size: 10px; }
  .standard1 .publish-metadata .date::before { padding-right: 10px; }
  .standard1 .editorial-header .cover { margin-top: 36px; }
  .standard1 .cover-card { padding: 24px 20px; }
  .standard1 .article-summary { padding: 24px; margin: 36px auto 40px; }
  .standard1 .article-summary .epigraph { font-size: 17px; }
  .standard1 article.content h2 { font-size: 30px; }
  .standard1 article.content .figure-box { padding: 14px 10px; }
  .standard1 article.content .figure-box:has(.chart) { padding: 8px 0; }
  .standard1 .paginator { flex-direction: column; gap: 18px; padding-bottom: 40px; }
}
