:root {
  --bg: #f3f1ea;
  --panel: #fffdf8;
  --ink: #161513;
  --muted: #5c5a55;
  --brand: #0b6b50;
  --brand-soft: #d7f3d2;
  --accent: #ce4f0f;
  --line: #d7d2c7;
  --shadow: 0 12px 40px rgba(22, 21, 19, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #f8f6ef 0%, var(--bg) 35%, #ece9dd 100%);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-ornament {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.45;
}

.bg-ornament-a {
  width: 420px;
  height: 420px;
  background: linear-gradient(140deg, #f2cf95, #e6835f);
  top: -120px;
  right: -120px;
}

.bg-ornament-b {
  width: 380px;
  height: 380px;
  background: linear-gradient(140deg, #85cca9, #71b7d6);
  bottom: -140px;
  left: -100px;
}

.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.2rem 2.5rem;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "IBM Plex Serif", Georgia, serif;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  max-width: 900px;
  margin-top: 0.6rem;
}

.subtitle {
  max-width: 760px;
  color: var(--muted);
  margin-top: 1rem;
  font-size: 1.05rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.card,
.panel {
  background: color-mix(in srgb, var(--panel) 92%, white 8%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 1.1rem 1rem;
}

.kpi {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand);
}

.panel {
  padding: 1.4rem;
  margin-top: 1rem;
}

.two-col {
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

ul {
  padding-left: 1rem;
}

.cycle-box {
  background: linear-gradient(135deg, #f8fef8, #ebfaf4);
  border: 1px solid #b9dfc2;
  border-radius: 14px;
  padding: 1rem;
}

.cycle {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.cycle span {
  border: 1px dashed #90c5ac;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  text-align: center;
  font-weight: 500;
  background: white;
}

.steps {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.finance {
  grid-template-columns: 1.1fr 1fr;
  margin-top: 1rem;
}

.card {
  padding: 1.2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.6rem 0.2rem;
  font-size: 0.95rem;
}

.calculator input[type="range"] {
  width: 100%;
  margin: 0.8rem 0 0.6rem;
  accent-color: var(--brand);
}

.assumption-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin: 0.4rem 0 0.9rem;
  padding: 0.8rem;
  background: #fffcf5;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.assumption-grid input[type="number"] {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid #c8c1b3;
  border-radius: 8px;
  font: inherit;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.results p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.45rem 0;
}

.results strong {
  color: var(--brand);
}

.results .results-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.2rem 0;
  padding-left: 0.8rem;
}

.results .results-sub span:last-child {
  color: var(--ink);
  font-weight: 500;
}

.calculator label[for="dryIcePrice"],
.calculator label[for="biocharPrice"] {
  display: block;
  margin-top: 0.4rem;
}

.calculator small.slider-context {
  display: block;
  margin: -0.2rem 0 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  padding-left: 0.15rem;
}

.calculator small.slider-context strong {
  color: var(--ink);
}

small {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.risk-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.mitigation {
  color: #075844;
  font-weight: 500;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.timeline div {
  padding: 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(130deg, #fff, #fff6ee);
}

.target {
  margin: 1rem 0 0;
  font-weight: 600;
  color: #7b2f09;
}

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.6s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.14s; }
.reveal:nth-child(4) { animation-delay: 0.2s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .metrics,
  .two-col,
  .finance,
  .risk-grid,
  .timeline {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .metrics,
  .two-col,
  .finance,
  .risk-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 3rem;
  }

  .panel,
  .card {
    border-radius: 14px;
  }
}
