:root {
  color-scheme: light;
  --ink: #14261f;
  --ink-soft: #3c5048;
  --muted: #68776f;
  --paper: #f5f2e9;
  --paper-deep: #e9e5d9;
  --white: #fffefa;
  --forest: #123f30;
  --forest-deep: #0a2d23;
  --forest-soft: #286b50;
  --leaf: #b8dc76;
  --leaf-bright: #d2f18d;
  --line: rgba(20, 38, 31, 0.16);
  --water: #74b8c8;
  --amber: #e2aa5c;
  --shadow: 0 22px 70px rgba(18, 41, 31, 0.16);
  --shadow-soft: 0 10px 35px rgba(18, 41, 31, 0.09);
  --radius: 18px;
  --header-height: 76px;
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, serif;
  font-family: var(--font-sans);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(184, 220, 118, 0.75);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-180%);
  border-radius: 999px;
  background: var(--leaf-bright);
  color: var(--forest-deep);
  font-weight: 600;
  padding: 10px 16px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  padding: 10px clamp(18px, 4vw, 68px);
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.site-header.scrolled {
  border-color: rgba(20, 38, 31, 0.1);
  background: rgba(248, 246, 239, 0.92);
  box-shadow: 0 8px 30px rgba(10, 45, 35, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--leaf-bright);
}

.brand-symbol svg {
  width: 28px;
  height: 28px;
}

.brand-symbol .brand-parcels {
  fill: none;
  stroke: rgba(255, 254, 250, 0.74);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.brand-symbol .brand-path {
  fill: none;
  stroke: #d8b56e;
  stroke-dasharray: 1.5 2.4;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.brand-symbol .brand-hedge {
  fill: var(--leaf-bright);
  stroke: rgba(10, 45, 35, 0.28);
  stroke-width: 0.55;
}

.brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.brand strong {
  font-size: 1.07rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand small {
  color: var(--forest-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 3vw, 44px);
}

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--forest-soft);
  content: "";
  transition: transform 180ms ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav-page {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.pro-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(20, 38, 31, 0.22);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 14px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.pro-link:hover {
  background: var(--forest);
  color: var(--white);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  color: var(--forest-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-kicker i {
  width: 20px;
  height: 1px;
  background: currentColor;
}

.section-kicker.light {
  color: var(--leaf);
}

.hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 18%, rgba(184, 220, 118, 0.22), transparent 24rem),
    radial-gradient(circle at 10% 75%, rgba(40, 107, 80, 0.07), transparent 28rem),
    linear-gradient(145deg, #f8f4e9 0%, #eff1e7 72%, #e8ecdf 100%);
  padding: calc(var(--header-height) + 18px) 0 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(950px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.hero-content .section-kicker {
  justify-content: center;
}

.hero h1 {
  margin-bottom: 27px;
  font-family: var(--font-serif);
  font-size: clamp(3.05rem, 6.5vw, 6.7rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-lead {
  width: min(720px, 100%);
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  padding: 13px 21px 13px 25px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--forest);
  box-shadow: 0 14px 32px rgba(18, 63, 48, 0.2);
  color: var(--white);
}

.button-primary span,
.button-light span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.text-link {
  border-bottom: 1px solid rgba(20, 38, 31, 0.28);
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 4px;
  text-decoration: none;
}

.hero-landscape {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(330px, 38vw, 590px);
  margin: clamp(50px, 6vw, 78px) 0 0;
  overflow: hidden;
  background: #71845c;
}

.hero-landscape::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 45, 35, 0.08), transparent 28%, transparent 70%, rgba(10, 45, 35, 0.2));
  content: "";
  pointer-events: none;
}

.hero-landscape img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 56%;
}

.context-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(650px, 1.6fr);
  gap: clamp(50px, 7vw, 120px);
  padding: clamp(50px, calc(11vw - 40px), 130px) clamp(24px, 6vw, 104px);
}

.section-intro {
  align-self: center;
}

.section-intro h2 span {
  display: block;
}

.section-intro h2 span + span {
  margin-top: 0.12em;
}

.section-intro h2,
.explorer-heading h2,
.next-section h2 {
  margin-bottom: 28px;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4.5vw, 5.15rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.018em;
}

.section-intro > p:last-child {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.68;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  border-top: 1px solid var(--line);
}

.context-card {
  --context-card-gutter: clamp(20px, 2.4vw, 36px);
  --context-card-bleed: clamp(-36px, -2.4vw, -20px);
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  padding: 24px var(--context-card-gutter) 30px;
}

.context-card:first-child {
  border-left: 1px solid var(--line);
}

.card-index {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.context-card > strong {
  margin-top: auto;
  margin-bottom: 8px;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 3.5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.national-target {
  display: flex;
  width: fit-content;
  flex-direction: column;
}

.national-target small {
  align-self: flex-end;
  margin-top: 2px;
  color: var(--forest-soft);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.context-photo {
  width: auto;
  height: clamp(150px, 13vw, 195px);
  flex: none;
  align-self: stretch;
  margin: auto var(--context-card-bleed) 26px;
  display: block;
  object-fit: cover;
}

.context-card h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.context-card > p:not(.card-index) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.62;
}

.context-card > a {
  width: fit-content;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--forest-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  padding-bottom: 3px;
  text-decoration: none;
}

.method-section {
  background:
    radial-gradient(circle at 9% 18%, rgba(184, 220, 118, 0.09), transparent 24rem),
    var(--forest-deep);
  color: var(--white);
  padding: clamp(50px, calc(10vw - 40px), 115px) clamp(24px, 6vw, 104px);
}

.method-heading {
  display: grid;
  grid-template-columns: 0.65fr 1.4fr 0.7fr;
  gap: 50px;
  align-items: start;
}

.method-heading .section-kicker {
  margin-top: 10px;
}

.method-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.4vw, 5rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.018em;
}

.method-heading > p:last-child {
  margin-top: 12px;
  color: rgba(255, 254, 250, 0.66);
  font-size: 1rem;
  line-height: 1.65;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(70px, 8vw, 120px) 0 0;
  padding: 0;
  list-style: none;
}

.method-steps li {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 25px clamp(24px, 3.5vw, 58px) 12px;
}

.method-steps li:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.method-number {
  display: block;
  color: var(--leaf);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.method-visual {
  position: relative;
  height: 190px;
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #334d40;
}

.method-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.method-steps h3 {
  margin-bottom: 14px;
  font-size: 1.22rem;
  font-weight: 600;
}

.method-steps p {
  max-width: 340px;
  color: rgba(255, 254, 250, 0.62);
  font-size: 0.9375rem;
  line-height: 1.62;
}

.method-more-link {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-top: 44px;
  border-bottom: 1px solid rgba(210, 241, 141, 0.45);
  color: var(--leaf-bright);
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 5px;
  text-decoration: none;
}

.method-more-link:hover {
  border-color: var(--leaf-bright);
}

.history-section {
  background:
    radial-gradient(circle at 88% 5%, rgba(116, 184, 200, 0.12), transparent 30rem),
    var(--paper-deep);
  padding: clamp(50px, calc(10vw - 40px), 110px) clamp(12px, 4vw, 68px);
}

.history-heading {
  display: grid;
  grid-template-columns: 1.25fr 0.65fr;
  gap: clamp(45px, 8vw, 130px);
  align-items: end;
  width: min(1340px, 100%);
  margin: 0 auto clamp(44px, 5vw, 72px);
  padding: 0 clamp(10px, 2vw, 28px);
}

.history-heading h2 {
  max-width: 900px;
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.7rem, 5vw, 5.7rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.history-introduction {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.68;
}

.history-introduction p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.history-panel {
  width: min(1450px, 100%);
  margin: 0 auto;
}

.history-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid rgba(20, 38, 31, 0.14);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 254, 250, 0.86);
  padding: 17px 20px 16px 26px;
}

.history-controls > p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.history-periods {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.history-periods button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 13px;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.history-periods button:hover {
  border-color: rgba(18, 63, 48, 0.2);
  color: var(--forest);
}

.history-periods button.active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

.history-viewer {
  overflow: hidden;
  border: 1px solid rgba(20, 38, 31, 0.14);
  border-radius: 0 0 26px 26px;
  background: var(--forest-deep);
  box-shadow: var(--shadow);
}

.history-stage {
  position: relative;
  min-height: 430px;
  aspect-ratio: 1200 / 650;
  overflow: hidden;
  background: #b9b8b2;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
}

.history-stage:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: -3px;
}

.history-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 28, 22, 0.28), transparent 20%, transparent 78%, rgba(8, 28, 22, 0.25));
  content: "";
  pointer-events: none;
}

.history-map,
.history-current-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.history-map {
  background: #aaa9a3;
}

.history-map .maplibregl-canvas {
  cursor: grab;
}

.history-map .maplibregl-canvas:active {
  cursor: grabbing;
}

.history-map .maplibregl-control-container {
  display: none;
}

.history-current-layer {
  z-index: 1;
  clip-path: inset(0 0 0 50%);
}

.history-date,
.history-place {
  position: absolute;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(10, 31, 25, 0.7);
  box-shadow: 0 6px 24px rgba(10, 31, 25, 0.16);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 11px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.history-date {
  top: 20px;
}

.history-date-past {
  left: 20px;
}

.history-date-current {
  right: 20px;
}

.history-place {
  top: 47%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
}

.history-place i {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 4px rgba(184, 220, 118, 0.22);
}

.history-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 6;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 12px rgba(10, 31, 25, 0.36);
  pointer-events: none;
}

.history-divider::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: rgba(18, 63, 48, 0.9);
  box-shadow: 0 8px 25px rgba(10, 31, 25, 0.3);
  content: "";
}

.history-divider span {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-53%);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
}

.history-divider span:first-child {
  right: 7px;
}

.history-divider span:last-child {
  left: 7px;
}

.history-reveal {
  position: absolute;
  top: calc(50% - 34px);
  right: 0;
  left: 0;
  z-index: 7;
  width: 100%;
  height: 68px;
  margin: 0;
  opacity: 0.001;
  cursor: ew-resize;
  touch-action: none;
}

.history-stage.zoomed {
  cursor: grab;
  touch-action: none;
}

.history-stage.zoomed .history-reveal {
  cursor: ew-resize;
  touch-action: none;
}

.history-zoom-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(10, 31, 25, 0.82);
  box-shadow: 0 8px 28px rgba(10, 31, 25, 0.26);
  backdrop-filter: blur(10px);
}

.history-zoom-controls button {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.history-zoom-controls button:last-child {
  border-right: 0;
}

.history-zoom-controls button:hover:not(:disabled),
.history-zoom-controls button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.history-zoom-controls button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--leaf);
  outline-offset: -3px;
}

.history-zoom-controls button:disabled {
  cursor: default;
  opacity: 0.42;
}

.history-zoom-controls .history-zoom-reset {
  width: 59px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.history-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.92);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 15px;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.history-loading.hidden {
  opacity: 0;
}

.history-loading span {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(18, 63, 48, 0.2);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.history-loading b {
  font: inherit;
}

.history-loading.error {
  max-width: 300px;
  border-radius: 14px;
  text-align: center;
}

.history-loading.error span {
  display: none;
}

.history-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--white);
  padding: 18px 24px;
}

.history-caption p {
  display: flex;
  gap: 15px;
  align-items: baseline;
  margin: 0;
}

.history-caption strong {
  color: var(--forest);
  font-size: 0.875rem;
  font-weight: 600;
}

.history-caption p span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.history-caption a {
  flex: 0 0 auto;
  color: var(--forest-soft);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.explorer-section {
  padding: clamp(40px, calc(9vw - 40px), 100px) clamp(12px, 3vw, 52px) clamp(50px, calc(10vw - 40px), 110px);
}

.explorer-heading {
  display: grid;
  grid-template-columns: 1.2fr 0.65fr;
  gap: 60px;
  align-items: end;
  width: min(1340px, 100%);
  margin: 0 auto 50px;
  padding: 0 clamp(10px, 2vw, 28px);
}

.explorer-heading h2 {
  margin-bottom: 0;
}

.explorer-heading > p {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.explorer-heading .inventory-summary {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--forest-soft);
  font-size: 0.875rem;
  font-weight: 600;
}

.explorer-app {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  width: min(1450px, 100%);
  min-height: 780px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(20, 38, 31, 0.14);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.scenario-panel {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(20, 38, 31, 0.14);
  background: #fbfaf5;
  padding: 27px;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.territory-select {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 13px;
  background: var(--white);
  cursor: default;
  padding: 11px 12px;
  text-align: left;
}

.territory-select strong,
.territory-select small {
  display: block;
}

.territory-select strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.territory-select small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.territory-pin {
  position: relative;
  width: 18px;
  height: 18px;
  border: 5px solid var(--forest-soft);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.territory-pin::after {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--white);
  content: "";
}

.demo-note {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.inventory-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.inventory-metrics > span {
  display: grid;
  border: 1px solid rgba(20, 38, 31, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  padding: 8px 10px;
}

.inventory-metrics strong {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.15;
}

.inventory-metrics small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.3;
}

.priority-control {
  min-width: 0;
  margin: 26px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 23px 0 0;
}

.priority-control legend,
.control-title {
  width: 100%;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.priority-control legend span,
.control-title > span b {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: 0.75rem;
}

.priority-options {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.priority-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid rgba(20, 38, 31, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  padding: 8px 11px;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.priority-option:hover {
  transform: translateX(2px);
  border-color: rgba(40, 107, 80, 0.42);
}

.priority-option:has(input:checked) {
  border-color: var(--forest-soft);
  background: rgba(184, 220, 118, 0.14);
}

.priority-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid rgba(20, 38, 31, 0.3);
  border-radius: 50%;
}

.priority-option input:checked + .priority-check {
  border: 5px solid var(--forest-soft);
  background: var(--white);
}

.priority-option input:focus-visible + .priority-check {
  outline: 3px solid rgba(184, 220, 118, 0.75);
  outline-offset: 3px;
}

.priority-option strong,
.priority-option small {
  display: block;
}

.priority-explanation {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 2px solid var(--forest-soft);
  color: var(--ink-soft);
  padding: 3px 0 3px 11px;
}

.priority-explanation strong {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.priority-explanation span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.sector-picker {
  display: grid;
  gap: 6px;
  margin-top: 13px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.sector-picker[hidden] {
  display: none;
}

.sector-picker select {
  width: 100%;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 10px;
}

.priority-option strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.priority-option small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.75rem;
}

.length-control {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.control-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.control-title output {
  color: var(--forest-soft);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.length-control input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 22px 0 4px;
  appearance: none;
  border-radius: 999px;
  background:
    linear-gradient(to right, var(--forest-soft) var(--range-progress, 55.5%), rgba(20, 38, 31, 0.13) var(--range-progress, 55.5%));
  cursor: pointer;
}

.length-control input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  appearance: none;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest), 0 3px 10px rgba(18, 63, 48, 0.25);
}

.length-control input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest), 0 3px 10px rgba(18, 63, 48, 0.25);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.scenario-summary {
  margin-top: auto;
  border-radius: 14px;
  background: var(--forest);
  color: var(--white);
  padding: 17px 18px;
}

.scenario-summary > p:first-child {
  margin-bottom: 7px;
  color: var(--leaf);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scenario-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.scenario-total > strong {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.scenario-total > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
}

.scenario-total > span b {
  color: var(--white);
}

.summary-bar {
  height: 3px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.summary-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--leaf-bright);
  transition: width 300ms ease;
}

.scenario-sentence {
  min-height: 32px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  line-height: 1.55;
}

.scenario-delta {
  min-height: 18px;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.scenario-cta {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  background: var(--leaf);
  color: var(--forest-deep);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 14px;
  text-decoration: none;
}

.scenario-cta:hover {
  background: var(--leaf-bright);
}

.map-shell {
  position: relative;
  min-width: 0;
  min-height: 780px;
  overflow: hidden;
  background: #d8dccd;
}

.map-view-switch {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 5px 18px rgba(20, 38, 31, 0.11);
  padding: 4px;
  backdrop-filter: blur(10px);
}

.map-view-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 11px;
}

.map-view-switch button.active {
  background: var(--forest);
  color: var(--white);
}

.map-view-switch > span {
  margin: 0 8px 0 7px;
  color: var(--muted);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #d9ded1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.map-viewport.dragging {
  cursor: grabbing;
}

.map-fallback {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  background:
    linear-gradient(31deg, transparent 49.5%, rgba(53, 92, 70, 0.14) 50%, transparent 50.5%) 0 0 / 180px 130px,
    linear-gradient(-18deg, transparent 49.5%, rgba(53, 92, 70, 0.11) 50%, transparent 50.5%) 0 0 / 230px 170px,
    #dce1d3;
}

.map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.map-canvas .maplibregl-canvas {
  cursor: grab;
}

.map-canvas .maplibregl-canvas:active {
  cursor: grabbing;
}

.map-canvas .maplibregl-control-container {
  display: none;
}

.map-toolbar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.map-toolbar > * {
  pointer-events: auto;
}

.basemap-switch {
  display: flex;
  gap: 3px;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 5px 18px rgba(20, 38, 31, 0.11);
  padding: 4px;
  backdrop-filter: blur(10px);
}

.basemap-switch button,
.map-tool {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
}

.basemap-switch button.active {
  background: var(--forest);
  color: var(--white);
}

.map-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(20, 38, 31, 0.16);
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 5px 18px rgba(20, 38, 31, 0.11);
  backdrop-filter: blur(10px);
}

.map-tool > span:first-child {
  font-size: 1rem;
}

.fullscreen-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.fullscreen-exit-icon {
  display: none;
}

#fullscreenButton[aria-pressed="true"] .fullscreen-enter-icon {
  display: none;
}

#fullscreenButton[aria-pressed="true"] .fullscreen-exit-icon {
  display: inline;
}

.map-zoom {
  position: absolute;
  top: 78px;
  right: 20px;
  z-index: 10;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 5px 18px rgba(20, 38, 31, 0.11);
}

.map-zoom button {
  display: grid;
  width: 36px;
  height: 35px;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
}

.map-zoom button + button {
  border-top: 1px solid var(--line);
}

.map-zoom button:hover {
  background: rgba(184, 220, 118, 0.2);
}

.map-legend {
  position: absolute;
  bottom: 47px;
  left: 20px;
  z-index: 10;
  width: 205px;
  overflow: hidden;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 11px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 6px 22px rgba(20, 38, 31, 0.13);
  font-size: 0.75rem;
  backdrop-filter: blur(10px);
}

.map-legend > button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  padding: 10px 12px;
}

.map-legend > div {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.map-legend.collapsed > div {
  display: none;
}

.map-legend.collapsed > button span:last-child {
  transform: rotate(180deg);
}

.map-legend > div span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.map-legend .legend-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.legend-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--forest);
}

.legend-toggle .legend-line {
  flex: 0 0 auto;
}

.legend-line {
  display: inline-block;
  width: 29px;
  height: 0;
  border-top: 3px solid var(--forest-soft);
}

.legend-line.selected {
  border-top-width: 5px;
  border-color: #2d9b5d;
}

.legend-line.available {
  border-top: 2px dashed rgba(30, 45, 38, 0.66);
}

.legend-line.hedge {
  border-color: #173f2c;
  border-top-width: 3px;
}

.legend-line.parcel {
  border-color: #9ca9a0;
  border-top-width: 1px;
}

.legend-line.water {
  border-color: var(--water);
  border-top-width: 2px;
}

.map-scale {
  position: absolute;
  right: 20px;
  bottom: 38px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--white);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.map-scale span {
  width: 80px;
  height: 6px;
  border: 2px solid var(--white);
  border-top: 0;
}

.map-scale small {
  font-size: 0.6875rem;
  font-weight: 600;
}

.map-attribution {
  position: absolute;
  right: 12px;
  bottom: 9px;
  z-index: 8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  color: #273830;
  font-size: 0.625rem;
  padding: 2px 5px;
}

.map-attribution a {
  font-weight: 600;
}

.map-help {
  position: absolute;
  bottom: 9px;
  left: 20px;
  z-index: 9;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 63, 48, 0.9);
  color: var(--white);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 11px;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.92);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 15px;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.map-loading.hidden {
  opacity: 0;
}

.map-loading span {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(18, 63, 48, 0.2);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.candidate-sheet {
  position: absolute;
  top: 72px;
  right: 20px;
  z-index: 12;
  width: min(330px, calc(100% - 40px));
  max-height: calc(100% - 145px);
  overflow: auto;
  border: 1px solid rgba(20, 38, 31, 0.16);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.97);
  box-shadow: var(--shadow);
  padding: 21px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}

.candidate-sheet.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.candidate-sheet .sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-size: 1.2rem;
}

.sheet-kicker,
.dialog-kicker {
  margin-bottom: 10px;
  color: var(--forest-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-sheet h3 {
  margin-right: 24px;
  margin-bottom: 9px;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.candidate-sheet > p:not(.sheet-kicker) {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.6;
}

.candidate-sheet .sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.sheet-meta span {
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
}

.sheet-meta .in-scenario {
  background: rgba(45, 155, 93, 0.14);
  color: #17643a;
}

.candidate-sheet h4 {
  margin: 17px 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.candidate-reasons {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.candidate-reasons li {
  position: relative;
  border-left: 2px solid var(--leaf);
  background: rgba(184, 220, 118, 0.1);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 8px 9px;
}

.candidate-metrics {
  display: grid;
  gap: 9px;
}

.candidate-metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.candidate-metric b {
  color: var(--ink);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.candidate-metric > span:last-child {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 38, 31, 0.1);
}

.candidate-metric > span:last-child i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-soft);
}

.load-error {
  width: min(700px, 90%);
  margin: 30px auto 0;
  border-left: 4px solid #a94f3f;
  background: #fff7f3;
  padding: 18px 20px;
}

.load-error h3 {
  margin-bottom: 6px;
}

.load-error p {
  color: var(--ink-soft);
}

.load-error button {
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
  padding: 8px 14px;
}

.climae-context-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1fr);
  gap: clamp(48px, 8vw, 132px);
  align-items: start;
  border-top: 1px solid rgba(20, 38, 31, 0.1);
  border-bottom: 1px solid rgba(20, 38, 31, 0.1);
  background: #e9ece2;
  padding: clamp(46px, 6.5vw, 82px) clamp(24px, 8vw, 140px);
}

.climae-context-section h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4vw, 4.65rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.climae-context-copy {
  max-width: 680px;
}

.climae-context-copy p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.climae-context-copy p + p {
  margin-top: 14px;
}

.climae-theme-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  border-bottom: 1px solid rgba(18, 63, 48, 0.32);
  color: var(--forest);
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 5px;
  text-decoration: none;
}

.climae-theme-link:hover {
  border-color: var(--forest);
}

.next-section {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr;
  gap: clamp(60px, 10vw, 180px);
  align-items: end;
  background:
    radial-gradient(circle at 85% 80%, rgba(184, 220, 118, 0.12), transparent 22rem),
    var(--forest-deep);
  color: var(--white);
  padding: clamp(50px, calc(10vw - 40px), 110px) clamp(24px, 8vw, 140px);
}

.next-section h2 {
  margin-bottom: 0;
}

.next-content p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.75;
}

.button-light {
  margin-top: 19px;
  background: var(--leaf);
  color: var(--forest-deep);
}

.button-light span {
  background: rgba(10, 45, 35, 0.1);
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  border-top: 1px solid rgba(20, 38, 31, 0.12);
  background: #0a2d23;
  color: var(--white);
  padding: 20px clamp(24px, 6vw, 105px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-logo {
  display: block;
  width: 76px;
  flex: none;
}

.footer-logo img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 160ms ease;
}

.footer-logo:hover img {
  opacity: 0.78;
}

.footer-brand > span,
.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
}

.footer-brand > span {
  line-height: 1.35;
  white-space: nowrap;
}

.site-footer p {
  max-width: 560px;
  margin-bottom: 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--leaf);
}

.site-footer .footer-owner {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.site-footer .footer-project {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

dialog {
  width: min(570px, calc(100% - 32px));
  border: 0;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 100px rgba(10, 45, 35, 0.3);
  color: var(--ink);
  padding: 0;
}

dialog::backdrop {
  background: rgba(7, 31, 24, 0.68);
  backdrop-filter: blur(5px);
}

dialog form {
  position: relative;
  padding: clamp(27px, 5vw, 48px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-size: 1.35rem;
}

dialog h2 {
  margin-right: 28px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.018em;
}

dialog p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.62;
}

.info-dialog .button {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .context-section {
    grid-template-columns: 1fr;
  }

  .section-intro {
    max-width: 700px;
  }

  .method-heading {
    grid-template-columns: 0.5fr 1.5fr;
  }

  .method-heading > p:last-child {
    grid-column: 2;
  }

  .history-heading {
    grid-template-columns: 1.1fr 0.8fr;
    gap: 55px;
  }

  .history-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-periods {
    width: 100%;
    justify-content: flex-start;
  }

  .explorer-app {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .map-tool > span:last-child {
    display: none;
  }

  .map-view-switch > span {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    grid-template-columns: auto 1fr;
    padding-inline: 18px;
  }

  .site-nav {
    display: none;
  }

  .pro-link {
    justify-self: end;
  }

  .hero {
    min-height: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .hero-content {
    width: calc(100% - 40px);
  }

  .context-grid {
    grid-template-columns: 1fr;
  }

  .context-card {
    min-height: 280px;
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .context-photo {
    height: clamp(190px, 38vw, 290px);
  }

  .method-heading {
    grid-template-columns: 1fr;
  }

  .method-heading > p:last-child {
    grid-column: auto;
    max-width: 650px;
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .method-steps li {
    display: grid;
    grid-template-columns: 36px 210px 1fr;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding: 22px;
  }

  .method-visual {
    height: 120px;
    margin: 0;
  }

  .method-steps h3 {
    align-self: end;
  }

  .method-steps p {
    grid-column: 3;
    align-self: start;
  }

  .history-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .history-introduction {
    max-width: 700px;
  }

  .history-periods {
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .history-stage {
    min-height: 390px;
  }

  .history-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .explorer-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .explorer-app {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .scenario-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .priority-control,
  .length-control {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
  }

  .priority-control {
    grid-row: span 2;
  }

  .scenario-summary {
    margin-top: 0;
  }

  .scenario-cta {
    grid-column: 2;
  }

  .map-shell {
    min-height: 650px;
  }

  .next-section {
    grid-template-columns: 1fr;
  }

  .climae-context-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer {
    grid-template-columns: auto 1fr;
    gap: 14px 28px;
  }

  .site-footer p {
    justify-self: end;
    text-align: right;
  }

  .footer-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .pro-link span:first-child {
    display: none;
  }

  .pro-link {
    width: 38px;
    height: 38px;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
  }

  .brand-symbol {
    width: 38px;
    height: 38px;
  }

  .hero {
    min-height: 0;
    padding-top: 88px;
    padding-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 13.8vw, 4.2rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-landscape {
    height: 280px;
    margin-top: 46px;
  }

  .method-steps li {
    grid-template-columns: 34px 1fr;
    gap: 16px;
  }

  .method-visual {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
  }

  .method-steps h3 {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    margin-bottom: 0;
  }

  .method-steps p {
    grid-row: 3;
    grid-column: 1 / -1;
  }

  .context-section,
  .method-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .history-section {
    padding: 40px 8px 55px;
  }

  .history-heading {
    margin-bottom: 36px;
    padding-inline: 15px;
  }

  .history-heading h2 {
    font-size: clamp(2.55rem, 12vw, 3.65rem);
  }

  .history-controls {
    gap: 13px;
    border-radius: 18px 18px 0 0;
    padding: 16px 15px 13px;
  }

  .history-periods {
    gap: 4px;
    margin-inline: -3px;
  }

  .history-periods button {
    padding: 7px 11px;
  }

  .history-viewer {
    border-radius: 0 0 18px 18px;
  }

  .history-stage {
    min-height: 0;
    height: 365px;
    aspect-ratio: auto;
  }

  .history-date {
    top: 12px;
    font-size: 0.6875rem;
    padding: 6px 9px;
  }

  .history-date-past {
    left: 12px;
  }

  .history-date-current {
    right: 12px;
    max-width: 145px;
    text-align: center;
  }

  .history-place {
    top: auto;
    bottom: 67px;
    font-size: 0.6875rem;
  }

  .history-divider::before {
    width: 46px;
    height: 46px;
  }

  .history-zoom-controls {
    right: 12px;
    bottom: 12px;
  }

  .history-zoom-controls button {
    width: 38px;
    height: 38px;
  }

  .history-zoom-controls .history-zoom-reset {
    width: 56px;
  }

  .history-caption {
    padding: 15px;
  }

  .history-caption p {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .context-card {
    min-height: 250px;
  }

  .method-steps li {
    display: block;
  }

  .method-visual {
    height: 145px;
    margin: 16px 0 25px;
  }

  .method-steps p {
    max-width: none;
  }

  .explorer-section {
    padding-right: 8px;
    padding-left: 8px;
  }

  .explorer-heading {
    padding-inline: 15px;
  }

  .explorer-app {
    border-radius: 18px;
  }

  .scenario-panel {
    display: block;
    padding: 20px;
  }

  .priority-control,
  .length-control,
  .scenario-summary {
    margin-top: 22px;
  }

  .scenario-cta {
    margin-top: 9px;
  }

  .map-shell {
    min-height: 590px;
  }

  .map-toolbar {
    top: 62px;
    right: 12px;
  }

  .map-zoom {
    top: 113px;
    right: 12px;
  }

  .map-view-switch {
    top: 12px;
    left: 12px;
  }

  .map-view-switch button {
    padding-inline: 9px;
  }

  .map-legend {
    bottom: 43px;
    left: 12px;
  }

  .map-help {
    display: none;
  }

  .map-scale {
    right: 12px;
  }

  .candidate-sheet {
    top: auto;
    right: 10px;
    bottom: 38px;
    left: 10px;
    width: auto;
    max-height: 62%;
    transform: translateY(25px);
  }

  .candidate-sheet.open {
    transform: translateY(0);
  }

  .next-section {
    padding-inline: 25px;
  }

  .climae-context-section {
    padding-inline: 25px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-inline: 25px;
  }

  .site-footer p {
    justify-self: start;
    text-align: left;
  }

  .footer-links {
    grid-column: auto;
    flex-wrap: wrap;
    gap: 9px 18px;
  }

  .footer-brand > span {
    white-space: normal;
  }
}

.explorer-app:fullscreen,
.explorer-app.is-fullscreen-fallback {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(300px, 365px) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--white);
  box-shadow: none;
}

.explorer-app:fullscreen .scenario-panel,
.explorer-app.is-fullscreen-fallback .scenario-panel {
  display: flex;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(20, 38, 31, 0.14);
  border-bottom: 0;
}

.explorer-app:fullscreen .map-shell,
.explorer-app.is-fullscreen-fallback .map-shell {
  height: 100vh;
  min-height: 0;
}

html.explorer-fullscreen-fallback {
  overflow: hidden;
}

@media (max-width: 680px) {
  .explorer-app:fullscreen,
  .explorer-app.is-fullscreen-fallback {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 42vh) minmax(0, 58vh);
  }

  .explorer-app:fullscreen .scenario-panel,
  .explorer-app.is-fullscreen-fallback .scenario-panel {
    display: block;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(20, 38, 31, 0.14);
    padding: 18px;
  }

  .explorer-app:fullscreen .map-shell,
  .explorer-app.is-fullscreen-fallback .map-shell {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
