:root { --ground: hsl(134 42% 87%); --accent: hsl(134 65% 29%); --ink: #18212b;
--panel: hsl(134 24% 96%); --soft: hsl(134 20% 79%); --button-ink: #ffffff;
--display: Rockwell, "Roboto Slab", "Bookman Old Style", Georgia, serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: system-ui, sans-serif; }
body { line-height: 1.65; font-size: 1rem; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, summary { min-height: 44px; }
button { border: 2px solid var(--accent); border-radius: 2px; padding: .7rem 1.2rem; }
button { background: var(--accent); color: var(--button-ink); font-weight: 700; }
button:hover { filter: brightness(1.12); transform: translateY(-2px); }
button:active { transform: translateY(1px); }
button, a, summary, input, select { transition: background .18s, color .18s, transform .18s; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, .wordmark { font-family: var(--display); line-height: 1.08; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.6rem, 5.1vw, 5rem); letter-spacing: -.055em; margin-bottom: 1.3rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -.035em; }
h3 { font-size: 1.3rem; }
p { max-width: 70ch; margin-bottom: 1.15rem; }
.skip { position: absolute; left: 1rem; top: -6rem; padding: .8rem; background: var(--ground); z-index: 20; }
.skip:focus { top: 1rem; }
.page { width: min(1180px, calc(100% - 4rem)); margin: auto; }
.mast { padding: 2.1rem 0; border-bottom: 2px solid var(--ink); }
.wordmark { font-size: clamp(1.4rem, 2.1vw, 2rem); font-weight: 800; text-decoration: none; }
.mobile-menu { display: none; }
.mast nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.mast nav a { padding: .35rem 0; font-size: .92rem; font-weight: 650; }
.masthead .mast { text-align: center; }
.masthead .mast nav { justify-content: center; margin-top: .8rem; }
.left-nav .mast { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.split .mast { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; padding: 0; }
.split .wordmark { background: var(--accent); color: var(--button-ink); padding: 2rem 1.5rem; }
.split .mast nav { justify-content: center; align-items: center; padding: 1rem; }
.rail .page { padding-left: 220px; }
.rail .mast { position: fixed; left: max(2rem, calc((100vw - 1180px)/2)); top: 0; bottom: 0; }
.rail .mast { width: 180px; border-bottom: 0; border-right: 2px solid var(--ink); padding-right: 1rem; }
.rail .mast nav { flex-direction: column; margin-top: 2rem; }
.rail .wordmark { display: block; overflow-wrap: anywhere; }
.intro { display: grid; grid-template-columns: 1.04fr 1fr; gap: 3rem; padding: 3.2rem 0 3rem; align-items: start; }
.intro .lead { font-size: 1.12rem; }
.section-label { display: inline-block; border-bottom: 3px solid var(--accent); padding-bottom: .4rem; }
.section-label { font-size: .95rem; margin-bottom: 1rem; font-weight: 750; }
.jump { display: inline-flex; min-height: 44px; align-items: center; font-weight: 750; }
.tool { border: 2px solid var(--accent); padding: 1.4rem; box-shadow: 9px 9px 0 var(--soft); }
.tool { background: var(--panel); scroll-margin-top: 1rem; }
.tool h2 { font-size: 1.65rem; letter-spacing: -.03em; margin-bottom: 1.1rem; }
.fields { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: block; font-size: .84rem; font-weight: 650; }
.field:first-child:last-child { grid-column: 1 / -1; }
.field input, .field select { display: block; width: 100%; margin-top: .35rem; padding: .45rem .6rem; }
.field input, .field select { border: 1px solid var(--ink); border-radius: 0; background: var(--ground); }
.field input, .field select { color: var(--ink); }
.tool button { margin-top: 1rem; width: 100%; }
.result { display: block; margin-top: 1.2rem; padding: 1rem 0; border-top: 2px solid var(--accent); }
.result { font-size: 1.15rem; font-weight: 750; line-height: 1.4; min-height: 4.5rem; }
.tool-note { margin: .4rem 0 0; font-size: .79rem; line-height: 1.5; }
.result.updated { animation: result-arrive .28s ease-out; }
.art { margin: 0 0 2.8rem; position: relative; color: var(--accent); }
.art svg { display: block; width: 100%; max-height: 330px; }
.art figcaption { color: var(--ink); border-top: 1px solid var(--ink); padding-top: .65rem; font-size: .8rem; }
.articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.articles article { border-top: 2px solid var(--ink); padding: 1.6rem 0 1.2rem; }
.articles article h2 { font-size: clamp(1.7rem, 2.5vw, 2.3rem); }
.articles article p { font-size: .98rem; }
.mono .articles { grid-template-columns: 1fr; }
.mono .articles article { display: grid; grid-template-columns: 210px 1fr; gap: 2rem; }
.slab .articles article:nth-child(even) { padding-left: 1.5rem; border-left: 2px solid var(--accent); }
.serif .articles article:first-child { border-top-width: 5px; }
.practice { margin: 1.5rem 0 3rem; padding: 1.6rem; background: var(--soft); border-left: 6px solid var(--accent); }
.practice h2 { font-size: 1.6rem; }
.practice p { margin-bottom: 0; }
.reference { border-top: 1px solid var(--ink); padding: 1.5rem 0 2.5rem; }
.reference h2 { font-size: 1.5rem; }
.reference dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.reference dt { font-weight: 750; margin-bottom: .3rem; }
.reference dd { margin: 0; font-size: .9rem; }
footer { border-top: 2px solid var(--ink); padding: 1.4rem 0 2.5rem; display: flex; }
footer { justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.tool-visual { margin-top: 1rem; overflow: hidden; }
.tool-visual svg { display: block; width: 100%; height: 170px; background: var(--soft); }
.tool-visual #sail { transform-origin: 150px 105px; transition: transform .45s ease; }
.chessboard { display: grid; grid-template-columns: repeat(8, 1fr); max-width: 300px; margin: auto; }
.chessboard span { aspect-ratio: 1; display: grid; place-items: center; font-size: 1.35rem; }
.chessboard span { background: #eef1e4; color: #171d15; }
.chessboard span.dark-square { background: #6e8b68; }
.wash { height: 150px; background: #fff; position: relative; border: 1px solid var(--ink); }
.wash span { position: absolute; inset: 18% 10%; border-radius: 47% 38% 45% 29%; }
.wash span { transition: background .4s, opacity .4s; mix-blend-mode: multiply; }
.glass { display: grid; grid-template-columns: 1fr 1fr; height: 180px; gap: 5px; background: #202127; }
.glass span { background: #244cad; transition: background .35s ease; }
.fold { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); height: 150px; }
.fold { margin: 1rem auto; width: 150px; background: var(--accent); transition: clip-path .4s; }
@keyframes result-arrive { from { opacity: .4; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1050px) {
  .rail .page { padding-left: 170px; }
  .rail .mast { width: 140px; }
  .intro { gap: 1.5rem; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .page { width: min(680px, calc(100% - 2rem)); }
  .intro { grid-template-columns: 1fr; gap: 1.4rem; padding-top: 2rem; }
  .intro h1 { max-width: 18ch; }
  .intro .lead { max-width: 58ch; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail .page { padding-left: 0; }
  .rail .mast { position: static; width: auto; border-right: 0; border-bottom: 2px solid var(--ink); }
  .rail .mast { padding: 1.2rem 0; }
  .rail .mast nav { flex-direction: row; margin-top: .8rem; }
  .mono .articles article { display: block; }
  .reference dl { grid-template-columns: 1fr; gap: .8rem; }
  .left-nav .mast { display: block; padding: 1.3rem 0; }
  .left-nav .mast > nav { display: none; }
  .left-nav .mobile-menu { display: block; margin-top: .6rem; }
  .mobile-menu summary { cursor: pointer; padding: .5rem 0; font-weight: 700; }
  .mobile-menu nav { padding-bottom: .5rem; }
}
@media (max-width: 520px) {
  h1 { font-size: 2.6rem; }
  .articles { grid-template-columns: 1fr; }
  .split .mast { grid-template-columns: 1fr; }
  .split .wordmark { padding: 1rem; }
  .split .mast nav { padding: .65rem 0; justify-content: flex-start; }
  .masthead .mast { padding: 1.2rem 0; }
  .fields { grid-template-columns: 1fr; }
  .tool { padding: 1rem; box-shadow: 5px 5px 0 var(--soft); }
  .slab .articles article:nth-child(even) { border-left: 0; padding-left: 0; }
  .practice { padding: 1.2rem; }
  .art svg { max-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .tool, .practice, .art { border: 1px solid CanvasText; }
  .tool button { color: ButtonText; }
  .result { color: CanvasText; }
}
@media print {
  body { color: #000; background: #fff; }
  .rail .mast { position: static; width: auto; }
  .rail .page { padding-left: 0; }
  .mast nav, .skip, .jump, button, footer a { display: none; }
  .page { width: 100%; }
  .intro, .articles, .mono .articles article { display: block; }
  article, .tool { break-inside: avoid; }
  .tool { box-shadow: none; }
}
