:root {
  color-scheme: dark;
  --bg: #152920; --ink: #f2efdf; --sub: #c2c9ba; --accent: #e8be79;
  --line: #496050; --hover: #263e31; --button: #edcd93; --button-ink: #202b21;
  --panel: #1b3026; --sheet: #202f27;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  --serif: "Baskervville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f7ef; --ink: #1c3328; --sub: #506155; --accent: #815625;
  --line: #bdc5b5; --hover: #e5e9de; --button: #294a37; --button-ink: #fffdf2;
  --panel: #f4f4eb; --sheet: #eceee3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: -5rem; left: 1rem; background: var(--ink); color: var(--bg); padding: .7rem; z-index: 5; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - clamp(2.5rem, 9vw, 10rem), 84rem); margin-inline: auto; }
header { display: flex; align-items: center; min-height: 5.5rem; border-bottom: 1px solid var(--line); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 2rem/1 var(--serif); letter-spacing: -.05em; }
.mark { display: inline-grid; place-items: center; width: 1.55rem; height: 2.2rem; position: relative; color: var(--accent); }
.mark i { position: absolute; height: 1.45rem; width: 1.45rem; border: 1px solid; transform: rotate(45deg) skew(8deg,8deg); border-radius: 2px; }
.mark i:nth-child(2) { scale: .65; } .mark i:nth-child(3) { scale: .3; }
.brand-name { padding-left: 1rem; border-left: 1px solid var(--line); font: .8rem/1.2 var(--sans); letter-spacing: .02em; color: var(--sub); }
nav, .utilities, .langs, .actions { display: flex; align-items: center; }
nav { margin-left: auto; gap: clamp(1rem, 3vw, 3rem); }
nav a, .text-link, footer a { font-size: .925rem; }
nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .3rem; }
.utilities { gap: .65rem; margin-left: clamp(0rem, 3vw, 3rem); }
.langs { border: 1px solid var(--line); border-radius: 3rem; padding: 3px; }
.langs button, .theme { background: transparent; color: var(--sub); border: 0; }
.langs button { padding: .35rem .68rem; font: .83rem/1.4 var(--mono); border-radius: 2rem; }
.langs button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }
.theme { position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 100%; }
.theme:hover { background: var(--hover); }
.theme-symbol { width: 1rem; height: 1rem; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg,currentColor 50%,transparent 50%); }
.hero { display: grid; grid-template-columns: 1fr 1.03fr; align-items: center; gap: clamp(2rem, 5vw, 6rem); padding-block: clamp(3rem, 6vw, 6rem); }
.eyebrow, figcaption, .plate-top, .plate-foot { font: .78rem/1.5 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .75rem; color: var(--accent); margin: 0 0 1.5rem; font-weight: 600; }
.short-rule { width: 2rem; height: 1px; background: currentColor; }
h1,h2,h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(3.35rem, 5.8vw, 6.1rem); line-height: 1.02; letter-spacing: -.065em; }
h1 span, h1 em { display: block; }
h1 em { color: var(--accent); font-weight: 400; }
.lead, .section-intro p, .method-intro, .steps p, .example > p:last-child { color: var(--sub); }
.lead { font-size: clamp(1.04rem, 1.35vw, 1.25rem); max-width: 35rem; margin: 1.65rem 0 2rem; }
.actions { flex-wrap: wrap; gap: 1.5rem; }
.button { background: var(--button); color: var(--button-ink); border-radius: .25rem; padding: .78rem 1.35rem; font-weight: 600; }
.button:hover { filter: brightness(1.08); }
.text-link { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.text-link:hover { border-color: var(--ink); }
.atlas { margin: 0; min-width: 0; }
.plate { position: relative; isolation: isolate; aspect-ratio: 1.44; background: #dedec9; color: #263f30; border: 1px solid #a7af96; overflow: hidden; }
.plate::after { content: ""; position: absolute; inset: .85rem; border: 1px solid #3b503a42; pointer-events: none; }
.terrain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.plate-top,.plate-foot { display: flex; justify-content: space-between; align-items: center; position: absolute; left: 1.35rem; right: 1.35rem; font-size: .75rem; }
.plate-top { top: 1.05rem; } .plate-foot { bottom: 1.05rem; }
.north { display: grid; justify-items: center; font-weight: bold; }
.north::after { content: ""; width: .46rem; height: .9rem; background: #344e39; clip-path: polygon(50% 0,100% 100%,50% 72%,0 100%); }
.scale { width: 2.65rem; border: 1px solid; height: .28rem; background: repeating-linear-gradient(90deg,#344e39 0 25%,#e7e5d3 25% 50%); }
.point { position: absolute; line-height: 0; display: flex; align-items: center; }
.p1 { left: 19%; top: 72%; } .p2 { left: 51%; top: 46%; } .p3 { left: 78%; top: 26%; }
.point b { position: absolute; width: .65rem; height: .65rem; border-radius: 100%; background: #ad592e; border: 2px solid #fcf8e6; outline: 1px solid #874c30; transform: translate(-50%,-50%); }
.point span { position: absolute; top: .55rem; left: -.55rem; background: #f2eddbf0; padding: .12rem .35rem; border: 1px solid #878f7966; font: .75rem/1.25 var(--mono); }
.p3 span { left: auto; right: -.65rem; }
figcaption { display: flex; align-items: center; gap: .65rem; margin-top: .65rem; color: var(--sub); font-size: .75rem; }
.route-key { width: 1.75rem; border-top: 2px dashed var(--accent); }
.sheet-section { background: var(--sheet); padding: clamp(3rem,5vw,5rem) 0; border-block: 1px solid var(--line); }
h2 { font-size: clamp(2.4rem, 4vw, 4.25rem); letter-spacing: -.05em; line-height: 1.08; }
.section-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.section-intro p { margin: 0; max-width: 35rem; }
.sample { margin-top: 2.4rem; display: grid; grid-template-columns: minmax(12rem,1fr) 2.3fr; border: 1px solid var(--line); background: var(--panel); }
.sample-tabs { display: grid; align-content: start; border-right: 1px solid var(--line); }
.sample-tabs button { padding: 1.1rem 1.5rem; color: var(--sub); border: 0; background: transparent; text-align: left; border-bottom: 1px solid var(--line); }
.sample-tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 3px 0 var(--accent); background: var(--hover); }
.sample-tabs button:hover { background: var(--hover); }
.example { padding: clamp(1.5rem, 3.5vw, 3.4rem); align-self: center; }
.example .eyebrow { margin-bottom: .65rem; }
h3 { font-size: clamp(1.5rem,2.3vw,2.35rem); line-height: 1.15; letter-spacing: -.035em; }
.example > p:last-child { max-width: 50rem; margin: .85rem 0 0; }
.method-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,8vw,8rem); padding-block: clamp(3.5rem,6vw,6.5rem); }
.method-intro { max-width: 33rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; border-top: 1px solid var(--line); padding: 1.15rem 0 1.2rem 2.7rem; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1.45rem; color: var(--accent); font: .85rem var(--mono); }
.steps h3 { font-size: 1.55rem; } .steps p { margin: .45rem 0 0; }
footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-block: 1.6rem; color: var(--sub); font-size: .875rem; }
.foot-divider { margin: 0 .4rem; color: var(--accent); }
@media (max-width: 760px) {
  .hero, .method-section, .section-intro { grid-template-columns: 1fr; }
  .hero { gap: 2.4rem; } .hero-copy { max-width: 38rem; } .plate { aspect-ratio: 1.65; }
  .section-intro { gap: .9rem; } .method-section { gap: 1.5rem; }
  header { min-height: 4.6rem; gap: .7rem; } .utilities { margin-left: auto; }
  nav { gap: .8rem; } .brand-name { display: none; }
  .sample { grid-template-columns: 1fr; }
  .sample-tabs { grid-template-columns: repeat(3,1fr); border-right: 0; }
  .sample-tabs button { text-align: center; padding: .9rem .3rem; line-height: 1.3; }
  .sample-tabs button[aria-selected="true"] { box-shadow: inset 0 -3px var(--accent); }
}
@media (max-width: 520px) {
  nav { display: none; } .brand-name { display: block; padding-left: .7rem; }
  .hero { padding-block: 2.65rem; } .eyebrow { margin-bottom: 1rem; }
  h1 { font-size: clamp(2.95rem, 11vw, 3.9rem); } .lead { margin: 1.25rem 0 1.6rem; }
  .actions { gap: 1rem; } .plate { aspect-ratio: 1.38; } .sample-tabs button { font-size: .91rem; }
  .brand { font-size: 1.7rem; } .utilities { gap: .35rem; }
}
@media (max-width: 365px) { .brand-name { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
