:root {
  color-scheme: light;
  --bg: #faf8f2;
  --bg-alt: #eeeee3;
  --ink: #29382d;
  --muted: #596453;
  --line: #dcded0;
  --card: #fffef9;
  --brand: #426346;
  --brand-2: #71613f;
  --accent: #a96a38;
  --button-ink: #ffffff;
  --shadow: 0 6px 22px rgba(48, 57, 37, .04);
  --radius: 6px;
  --max: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #19211b;
  --bg-alt: #222c23;
  --ink: #f0eee3;
  --muted: #b7bfad;
  --line: #3b4638;
  --card: #263027;
  --brand: #afc59b;
  --brand-2: #d0bd95;
  --accent: #d6a576;
  --button-ink: #19211b;
  --shadow: 0 6px 22px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff;
  padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav { width: min(100% - 40px, var(--max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }
.brand svg { color: var(--brand); }
.brand b { color: var(--brand); }
.brand-tag { font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
@media (max-width: 480px) { .brand-tag { display: none; } }
.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links > li > a, .menu-btn, .theme-toggle { display: inline-flex; align-items: center; line-height: 1.5; height: 38px; box-sizing: border-box; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 14px; border-radius: 4px; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg-alt); }
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--bg-alt); }
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--bg-alt); }
.has-menu { position: relative; }
.menu-btn, .theme-toggle { font: inherit; font-weight: 500; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
.menu-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.menu-btn:hover, .menu-btn.current, .menu-btn[aria-expanded="true"], .theme-toggle:hover, .theme-toggle[aria-checked="true"] { color: var(--ink); background: var(--bg-alt); }
.theme-track { display: inline-flex; align-items: center; flex: none; direction: ltr; width: 30px; height: 18px; padding: 3px; border-radius: 999px; background: var(--line); }
.theme-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.theme-toggle[aria-checked="true"] .theme-track { background: var(--brand); }
.theme-toggle[aria-checked="true"] .theme-thumb { background: var(--bg); transform: translateX(12px); }
.menu-btn[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px; max-height: calc(100dvh - 92px); overflow-y: auto; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: none; z-index: 60; }
.dropdown.open { display: block; }
.dropdown a { display: block; border-radius: 10px; }
.topic-group > a { font-weight: 700; }
.subtopics { list-style: none; border-inline-start: 1px solid var(--line); margin: 4px 10px 8px; padding-inline-start: 10px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px auto; transition: .25s; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 70px 0 30px; }
.hero-bg { display: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.o1 { width: 420px; height: 420px; background: #b5be94; top: -120px; left: -100px; opacity: .16; }
.o2 { width: 360px; height: 360px; background: #c7b28c; right: -80px; top: 40px; opacity: .18; }
.o3 { width: 280px; height: 280px; background: #d6c99f; bottom: -100px; left: 40%; opacity: .12; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { letter-spacing: .02em; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.16; letter-spacing: -.02em; margin-bottom: 20px; }
html[lang="en"] h1, html[lang="en"] .section-head h2, html[lang="en"] .closing h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.grad { color: var(--brand); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin-bottom: 28px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: transform .2s, box-shadow .2s, background .2s; }
.btn.primary { background: var(--brand); color: var(--button-ink); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { color: var(--brand); background: transparent; text-decoration: underline; text-underline-offset: 5px; }
.btn.ghost:hover { color: var(--ink); background: var(--bg-alt); }
.btn.small { padding: 8px 18px; font-size: .9rem; margin-top: 18px; }

.hero-art { display: grid; place-items: center; padding: 24px; border-block: 1px solid var(--line); }
.globe { width: min(100%, 310px); filter: saturate(.35); }
.nature-art { width: min(100%, 460px); height: auto; border-radius: 48% 48% 12px 12px; }
.brand-logo { display: block; width: 38px; height: 38px; object-fit: contain; }
.globe .net circle { transform-origin: center; transform-box: fill-box; }
.globe .net circle:nth-child(even) { animation-delay: 1.2s; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }

.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 50px; }
.stat { border-inline-start: 1px solid var(--line); padding: 12px 22px; }
.stat b { display: block; font-size: 2.2rem; line-height: 1.1; color: var(--brand); margin-bottom: 6px; }
.stat span { font-size: .9rem; color: var(--muted); display: block; line-height: 1.45; }
.fine { font-size: .8rem; color: var(--muted); margin-top: 14px; }
.hero .fine { position: relative; z-index: 1; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.015em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.page-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block: 18px; border-block: 1px solid var(--line); }
.page-links a { text-underline-offset: 4px; }

/* Timeline */
.timeline { background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tl-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.tl-tab { flex: 1 0 auto; border: 0; background: none; padding: 16px 22px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left; position: relative; transition: .2s; }
.tl-tab span { display: block; font-size: .75rem; letter-spacing: .1em; }
.tl-tab:hover { color: var(--ink); }
.tl-tab[aria-selected="true"] { color: var(--brand); background: var(--card); }
.tl-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); }
.tl-panel { display: grid; grid-template-columns: 1fr; padding: 36px; }
.tl-panel[hidden] { display: none; }
.tl-icon { display: block; font-size: 2rem; line-height: 1; margin-bottom: 18px; }
.tl-panel h3 { font-size: 1.5rem; margin-bottom: 10px; }
.tl-panel p { color: var(--muted); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chips li { border-inline-start: 2px solid var(--line); padding: 2px 12px; font-size: .85rem; color: var(--muted); }
.impact { background: color-mix(in srgb, var(--brand) 10%, transparent); border-left: 4px solid var(--brand); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--ink) !important; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* Cards */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter { background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 8px 18px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: .2s; }
.filter:hover { border-color: var(--brand); color: var(--brand); }
.filter.active { background: var(--brand); border-color: var(--brand); color: var(--button-ink); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.card { border-top: 1px solid var(--line); padding: 24px 0 12px; display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.ico { display: block; font-size: 1.6rem; line-height: 1; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.tag { align-self: flex-start; margin-top: 18px; font-size: .8rem; font-weight: 500; color: var(--brand); }

/* Readiness checklist */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.calc-form, .calc-out { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 28px; min-width: 0; }
.calc-form label { display: block; margin-bottom: 22px; font-weight: 600; }
.calc-form label span { display: flex; justify-content: space-between; margin-bottom: 8px; }
.calc-form output { color: var(--brand); font-variant-numeric: tabular-nums; }
fieldset { border: 1px dashed var(--line); border-radius: 14px; padding: 16px 18px 6px; }
legend { padding: 0 8px; font-weight: 700; color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; margin-bottom: 12px !important; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.meter { height: 14px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; margin-bottom: 26px; }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s ease; border-radius: 999px; }
.calc-out dl { display: grid; gap: 14px; }
.calc-out dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.calc-out dt { color: var(--muted); }
.calc-out dd { font-size: 1.5rem; font-weight: 700; color: var(--brand); text-align: right; font-variant-numeric: tabular-nums; }
#r-trees { font-size: 1.05rem; }

/* Cost */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bars, .myths { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 28px; min-width: 0; }
.bars h3, .myths h3 { margin-bottom: 20px; }
.bar { margin-bottom: 18px; }
.bar > span { display: block; font-size: .92rem; font-weight: 600; margin-bottom: 6px; }
.bar > div { height: 12px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }
.bars.in .bar i { width: var(--w); }
details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; background: var(--bg); }
summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 18px 16px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.dtable { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.dtable th, .dtable td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th { background: var(--bg-alt); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable td:first-child { font-weight: 600; }
.dtable td { color: var(--muted); }
.dtable td:first-child { color: var(--ink); }
.prose { max-width: 760px; color: var(--muted); display: grid; gap: 14px; }
.prose h3 { color: var(--ink); margin-top: 10px; }
.prose a { color: var(--brand); }
.card.topic { text-decoration: none; color: inherit; }
.card.topic:hover { border-color: var(--brand); }
.sources { margin-top: 28px; }

/* Actions */
.progress { height: 12px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
#prog { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .4s ease; }
.prog-label { margin: 8px 0 22px; font-weight: 600; color: var(--muted); }
.actions { list-style: none; display: grid; gap: 12px; }
.actions label { display: flex; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 18px 0; cursor: pointer; }
.actions label:hover { border-color: var(--brand); }
.actions input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.actions input:checked + span { opacity: .6; text-decoration: line-through; text-decoration-color: var(--brand); }
.actions span b { color: var(--ink); }
.actions span { color: var(--muted); }

/* Closing */
.closing { background: var(--bg-alt); color: var(--ink); text-align: center; padding: 70px 0; }
.closing .wrap { position: relative; }
.closing h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); max-width: 22ch; margin: 0 auto 14px; line-height: 1.2; }
.closing p { max-width: 56ch; margin: 0 auto 28px; opacity: .9; }
.closing .btn.primary { background: var(--brand); color: var(--button-ink); }

/* Footer */
.site-footer { background: var(--bg-alt); padding: 44px 0 30px; border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 40px; }
.foot p { color: var(--muted); margin-top: 8px; font-size: .92rem; }
.foot ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.foot ul a { text-decoration: none; color: var(--muted); }
.foot ul a:hover { color: var(--brand); }
.foot .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; }

/* Reveal */
.reveal { opacity: 1; transform: none; }
.reveal.in { opacity: 1; transform: none; }

/* Home */
.home-page .hero { padding: 76px 0 68px; }
.home-page .hero-grid { grid-template-columns: 1.3fr .7fr; gap: 72px; align-items: start; }
.home-page h1 { font-size: clamp(2.5rem, 4.7vw, 4.2rem); }
.project-note { border-top: 2px solid var(--ink); padding-top: 20px; }
.project-note h2 { font-size: 1.25rem; line-height: 1.4; margin-bottom: 24px; }
.project-note dl { display: grid; gap: 18px; margin-bottom: 24px; }
.project-note dl div { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.project-note dt { font-weight: 600; margin-bottom: 4px; }
.project-note dd { font-size: .93rem; color: var(--muted); }
.text-link { text-underline-offset: 5px; font-weight: 600; }
.work-heading { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.work-index { list-style: none; border-top: 1px solid var(--line); }
.work-index > li { border-bottom: 1px solid var(--line); }
.work-index a { display: grid; grid-template-columns: 48px 1fr auto; gap: 24px; align-items: baseline; padding: 30px 0; color: var(--ink); text-decoration: none; }
.work-index a:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.work-number { color: var(--muted); font: .85rem ui-monospace, Consolas, monospace; }
.work-index h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 6px; }
.work-index p { color: var(--muted); max-width: 65ch; }
.work-link { font-size: .85rem; color: var(--brand); white-space: nowrap; }
.principle-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 64px; }
.principle-notes h3 { font-size: 1.05rem; margin-bottom: 10px; }
.principle-notes p { color: var(--muted); max-width: 55ch; }
.icon-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.icon-heading .ico { margin-bottom: 0; flex: none; }
.icon-heading h3 { margin-bottom: 0; }

/* Responsive */
@media (max-width: 900px) {
  .home-page .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .work-heading { grid-template-columns: 1fr; gap: 12px; }
  .hero-grid, .calc, .split { grid-template-columns: 1fr; }
  .hero-art { order: initial; }
  .globe { width: 220px; }
  .nature-art { width: 280px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .tl-panel { grid-template-columns: 1fr; padding: 26px; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cards, .principle-notes { grid-template-columns: 1fr; }
  .work-index a { grid-template-columns: 30px 1fr; gap: 16px; }
  .work-link { grid-column: 2; }
  .home-page .hero { padding: 48px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; background: var(--bg);
    flex-direction: column; padding: 12px 20px 20px; border-bottom: 1px solid var(--line);
    display: none; max-height: calc(100dvh - 68px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .dropdown { position: static; box-shadow: none; margin-top: 6px; max-height: none; overflow-y: visible; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .bars .bar i { width: var(--w); }
}
