:root {
  color-scheme: light;
  --ink: #1d2520;
  --muted: #5e6a62;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #dce2d8;
  --green: #4f9d55;
  --green-deep: #2f6e3e;
  --gold: #d7a43d;
  --clay: #a26045;
  --brown: #8f6947;
  --blue: #bfe0ef;
  --shadow: 0 22px 50px rgba(52, 65, 55, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero-section,
.two-column,
.simulator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 32px;
  align-items: center;
}

.hero-section {
  min-height: 500px;
  padding: 40px 0 24px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.22rem;
}

.definition-block {
  max-width: 680px;
}

.concept-section {
  padding: 34px 0 28px;
}

.concept-intro {
  max-width: 900px;
  margin-bottom: 18px;
}

.concept-intro h2 {
  margin-bottom: 14px;
}

.concept-intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.concept-text {
  max-width: 900px;
  margin-bottom: 22px;
}

.concept-text p {
  color: var(--muted);
  font-size: 1.06rem;
}

.concept-text p:last-child {
  margin-bottom: 0;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.concept-card {
  position: relative;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
}

.concept-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #e5eee1;
  color: var(--green-deep);
  font-weight: 850;
}

.concept-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.content-section {
  padding: 54px 0;
}

.content-section p,
.problem-band p,
.simulator-heading p {
  color: var(--muted);
  font-size: 1.04rem;
}

.scene-card {
  position: relative;
  min-height: 330px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(45, 71, 51, 0.15);
  border-radius: 8px;
  background: var(--blue);
  box-shadow: var(--shadow);
}

.sky,
.field-sky {
  position: absolute;
  inset: 0 0 32%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0)),
    linear-gradient(180deg, #a9d8eb 0%, #d9eef3 100%);
}

.sun {
  position: absolute;
  top: 42px;
  right: 52px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #f2c657;
  box-shadow: 0 0 0 20px rgba(242, 198, 87, 0.16);
}

.cloud {
  position: absolute;
  width: 92px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 16px;
  width: 34px;
  height: 34px;
}

.cloud::after {
  right: 18px;
  width: 42px;
  height: 42px;
}

.cloud-one {
  top: 72px;
  left: 42px;
}

.cloud-two {
  top: 116px;
  right: 62px;
  transform: scale(0.78);
}

.pasture,
.field-grass {
  position: absolute;
  inset: 46% 0 0;
  border-top-left-radius: 48% 16%;
  border-top-right-radius: 52% 14%;
}

.pasture-green {
  background:
    repeating-linear-gradient(105deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 16px),
    linear-gradient(165deg, #83c86a 0%, #4f9d55 62%, #347443 100%);
}

.pasture-brown {
  background:
    repeating-linear-gradient(105deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 16px),
    linear-gradient(165deg, #b89154 0%, #8e6b49 62%, #6a4f38 100%);
}

.grass-line {
  position: absolute;
  width: 170px;
  height: 42px;
  border-top: 5px solid rgba(255,255,255,0.32);
  border-radius: 50%;
}

.grass-line-one {
  left: 10%;
  top: 34%;
}

.grass-line-two {
  right: 12%;
  top: 48%;
}

.grass-line-three {
  left: 36%;
  bottom: 18%;
}

.cow {
  position: absolute;
  width: 76px;
  height: 40px;
  border-radius: 22px 24px 18px 18px;
  background:
    radial-gradient(circle at 24px 16px, #1f2420 0 7px, transparent 8px),
    radial-gradient(circle at 51px 21px, #1f2420 0 8px, transparent 9px),
    #f4f1e7;
  box-shadow: inset 0 -7px rgba(0, 0, 0, 0.08);
}

.cow::before {
  content: "";
  position: absolute;
  right: -20px;
  top: 8px;
  width: 28px;
  height: 24px;
  border-radius: 50% 44% 40% 48%;
  background: #f4f1e7;
}

.cow::after {
  content: "";
  position: absolute;
  left: 11px;
  bottom: -16px;
  width: 8px;
  height: 18px;
  border-radius: 6px;
  background: #312820;
  box-shadow: 37px 0 #312820;
}

.cow span {
  position: absolute;
  right: -10px;
  top: 16px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #201f1c;
}

.cow-one {
  left: 12%;
  top: 34%;
}

.cow-two {
  right: 18%;
  top: 52%;
  transform: scale(0.88);
}

.cow-three {
  left: 42%;
  top: 64%;
  transform: scale(0.7);
}

.bare-patch {
  position: absolute;
  border-radius: 50%;
  background: rgba(84, 58, 35, 0.34);
}

.bare-one {
  width: 130px;
  height: 38px;
  left: 7%;
  bottom: 16%;
}

.bare-two {
  width: 180px;
  height: 48px;
  right: 9%;
  bottom: 22%;
}

.problem-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin: 20px 0 72px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
}

.problem-band h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.problem-copy p:last-child {
  margin-bottom: 0;
}

.solutions-section {
  padding: 8px 0 64px;
}

.solutions-intro {
  max-width: 900px;
  margin-bottom: 18px;
}

.solutions-intro h2 {
  margin-bottom: 14px;
}

.solutions-intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.solution-card {
  min-height: 218px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef9;
}

.solution-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.simulator-section {
  padding-top: 8px;
}

.simulator-heading {
  max-width: 900px;
  margin-bottom: 24px;
}

.simulator-heading h2 {
  margin-bottom: 14px;
}

.simulator-grid {
  align-items: stretch;
}

.control-panel,
.simulation-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mode-button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f3;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.mode-button.active {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #fff;
}

.range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.range-control span {
  grid-column: 1 / -1;
  color: var(--ink);
  font-weight: 700;
}

.range-control input {
  width: 100%;
  accent-color: var(--green-deep);
}

.range-control output {
  justify-self: end;
  min-width: 54px;
  color: var(--green-deep);
  font-weight: 800;
  text-align: right;
}

.toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.toggle-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 32px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #c8d0c5;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--green-deep);
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

.control-panel[data-mode="open"] [data-policy],
.control-panel[data-mode="fee"] [data-policy="cap"],
.control-panel[data-mode="cap"] [data-policy="fee"] {
  display: none;
}

.simulation-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 20px;
}

.pasture-meter {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) 58px;
  gap: 12px;
  align-items: center;
}

.pasture-meter span {
  color: var(--muted);
  font-weight: 750;
}

.meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e6df;
}

.meter-fill {
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--clay), var(--gold), var(--green));
  transition: width 220ms ease;
}

.pasture-meter strong {
  text-align: right;
}

.interactive-field {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(45, 71, 51, 0.15);
  border-radius: 8px;
  background: #c9e5ef;
}

.field-sky {
  inset: 0 0 35%;
}

.field-grass {
  inset: 44% 0 0;
  background:
    repeating-linear-gradient(98deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 15px),
    linear-gradient(150deg, #7bc469 0%, #559c52 62%, #327143 100%);
  transition: background 220ms ease;
}

.cow-layer {
  position: absolute;
  inset: 42% 4% 8%;
}

.tiny-cow {
  position: absolute;
  width: 46px;
  height: 26px;
  border-radius: 14px 16px 12px 12px;
  background:
    radial-gradient(circle at 14px 10px, #202420 0 4px, transparent 5px),
    radial-gradient(circle at 30px 13px, #202420 0 5px, transparent 6px),
    #f7f1e7;
  transform: translate(-50%, -50%) scale(var(--cow-scale, 1));
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.08);
}

.tiny-cow::before {
  content: "";
  position: absolute;
  right: -12px;
  top: 6px;
  width: 17px;
  height: 15px;
  border-radius: 50%;
  background: #f7f1e7;
}

.tiny-cow::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -10px;
  width: 5px;
  height: 11px;
  border-radius: 4px;
  background: #2b231d;
  box-shadow: 23px 0 #2b231d;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric,
.takeaway-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.metric strong {
  font-size: 1.35rem;
}

.takeaway-card {
  padding: 18px;
}

.takeaway-card h3 {
  font-size: 1.35rem;
}

.takeaway-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-section,
  .two-column,
  .simulator-grid,
  .problem-band,
  .concept-intro,
  .solutions-intro,
  .simulator-heading {
    grid-template-columns: 1fr;
  }

  .concept-grid,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: 0;
  }

  .scene-card {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 20px;
  }

  h1 {
    font-size: 3.15rem;
  }

  .mode-buttons,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .pasture-meter {
    grid-template-columns: 1fr 58px;
  }

  .pasture-meter span {
    grid-column: 1 / -1;
  }

  .interactive-field {
    min-height: 300px;
  }
}
