﻿:root {
  --bg-0: #071415;
  --bg-1: #0c2626;
  --bg-2: #173d39;
  --panel: rgba(7, 24, 23, 0.78);
  --panel-soft: rgba(10, 32, 31, 0.62);
  --panel-border: rgba(178, 237, 210, 0.18);
  --text: #ecf8ef;
  --muted: #b8d5c3;
  --natural: #17be76;
  --plant: #9fdd7c;
  --cover: #f2bc62;
  --danger: #ef755a;
  --grid: rgba(236, 248, 239, 0.14);
}

* {
  box-sizing: border-box;
}

@property --share {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 7%, #2a7f67 0%, transparent 36%),
    radial-gradient(circle at 84% 10%, #895f1f 0%, transparent 24%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 44%, var(--bg-2));
  overflow-x: hidden;
}

.scene-bg {
  position: fixed;
  inset: -24vh -10vw auto;
  height: 52vh;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 20%, rgba(31, 162, 114, 0.24), transparent 45%),
    radial-gradient(circle at 100% 0, rgba(242, 188, 98, 0.18), transparent 34%);
  filter: blur(16px);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 26px 60px;
  display: grid;
  gap: 18px;
}

.hero,
.kpis,
.tabs-shell,
.insight {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(6px);
}

.hero {
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(8, 34, 30, 0.86), rgba(11, 45, 40, 0.56)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 26px);
}

.eyebrow {
  margin: 0;
  color: #a5e0c6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

h1,
h2,
h3,
.tab-btn {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  margin: 8px 0 10px;
  font-size: clamp(32px, 3vw, 50px);
  line-height: 1.08;
  text-align: justify;
  text-justify: inter-word;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
  text-align: justify;
  text-justify: inter-word;
}

.kpis {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 13px 14px;
}

.kpi p {
  margin: 0;
  font-size: 13px;
  color: #99ccb1;
}

.kpi h2 {
  margin: 8px 0 4px;
  font-size: clamp(24px, 1.9vw, 34px);
  line-height: 1;
}

.kpi small {
  color: #8bb19d;
  font-size: 12px;
}

.kpi.negative h2 {
  color: var(--danger);
}

.signal-strip {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(9, 34, 31, 0.82), rgba(9, 26, 26, 0.58)),
    radial-gradient(circle at 100% 0, rgba(242, 188, 98, 0.2), transparent 46%);
}

.signal-card {
  border: 1px solid rgba(178, 237, 210, 0.22);
  border-radius: 12px;
  background: rgba(8, 30, 28, 0.58);
  padding: 12px 14px;
}

.signal-card p {
  margin: 0;
  font-size: 12px;
  color: #9dcbb5;
}

.signal-card h3 {
  margin: 8px 0 4px;
  font-size: clamp(21px, 1.65vw, 30px);
  line-height: 1.04;
}

.signal-card small {
  color: #9fbeae;
  font-size: 11px;
  line-height: 1.35;
  display: block;
}

.signal-card.warning h3 {
  color: #ffd08a;
}

.tabs-shell {
  padding: 14px;
}

.tabs-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  scroll-behavior: smooth;
}

.tab-btn {
  border: 1px solid rgba(220, 246, 232, 0.24);
  background: rgba(6, 24, 22, 0.55);
  color: #b9deca;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.24s ease;
  touch-action: manipulation;
}

.tab-btn:hover {
  border-color: rgba(229, 248, 236, 0.4);
  color: #ebf9ef;
}

.tab-btn.is-active {
  background: linear-gradient(120deg, #1a9a69, #297f60);
  color: white;
  border-color: rgba(169, 242, 206, 0.7);
  box-shadow: 0 8px 20px rgba(31, 157, 112, 0.24);
}

.tab-panel {
  display: none;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.tab-panel.is-active {
  display: grid;
  animation: panelIn 0.34s ease;
}

.panel-copy,
.panel-chart {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-soft);
}

.panel-copy {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.panel-copy h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.panel-copy p {
  margin: 0;
  color: #c6e2d1;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.panel-copy strong {
  color: #f4fdf7;
}

.panel-chart {
  padding: 12px;
  min-height: 380px;
  display: grid;
  align-items: center;
}

.chart-canvas {
  width: 100%;
  height: 350px;
}

.chart-canvas.compact {
  height: 300px;
}

.origin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(280px, 1fr);
  gap: 10px;
}

.donut-stage {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
}

.donut-ring {
  --share: 0;
  --target: 0;
  width: 230px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--natural) calc(var(--share) * 1%), rgba(159, 221, 124, 0.26) 0);
  box-shadow: inset 0 0 0 24px rgba(7, 20, 21, 0.9);
}

.donut-ring.run {
  animation: fillDonut 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.donut-hole {
  position: absolute;
  text-align: center;
}

.donut-hole strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
}

.donut-hole span {
  color: #a8c7b7;
  font-size: 12px;
}

.mini-legend {
  display: grid;
  gap: 5px;
}

.mini-legend div {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d1e9db;
  font-size: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.natural {
  background: var(--natural);
}

.dot.plant {
  background: var(--plant);
}

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #d7ece0;
}

.stack-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.insight {
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(35, 81, 66, 0.56), rgba(20, 32, 20, 0.72)),
    radial-gradient(circle at 100% 0, rgba(242, 188, 98, 0.2), transparent 40%);
}

.insight h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.insight p {
  margin: 7px 0;
  color: #d6e8dd;
  line-height: 1.52;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-line {
  stroke: var(--grid);
  stroke-width: 1;
}

.axis-line {
  stroke: rgba(236, 248, 239, 0.44);
  stroke-width: 1.2;
}

.axis-label {
  fill: #afcebf;
  font-size: 11px;
  font-family: "IBM Plex Sans", sans-serif;
}

.axis-unit-label {
  fill: #d8efe1;
  font-weight: 600;
}

.value-label {
  fill: #e4f5ea;
  font-size: 11px;
  font-family: "IBM Plex Sans", sans-serif;
}

.bar-grow {
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: scaleY(0);
  animation: growY 0.75s ease forwards;
  animation-delay: var(--d, 0s);
}

.bar-grow-neg {
  transform-box: fill-box;
  transform-origin: center top;
  transform: scaleY(0);
  animation: growY 0.75s ease forwards;
  animation-delay: var(--d, 0s);
}

.bar-grow-h {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  animation: growX 0.8s ease forwards;
  animation-delay: var(--d, 0s);
}

.area-fill {
  opacity: 0;
  animation: fadeArea 0.7s ease forwards;
  animation-delay: 0.12s;
}

.line-draw {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: dash 1s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

.point-pop {
  opacity: 0;
  transform: scale(0.2);
  transform-origin: center;
  animation: pop 0.34s ease forwards;
  animation-delay: var(--d, 0s);
}

.radar-ring {
  fill: none;
  stroke: rgba(232, 249, 238, 0.2);
  stroke-width: 1;
}

.radar-spoke {
  stroke: rgba(232, 249, 238, 0.22);
  stroke-width: 1;
}

.radar-shape {
  fill: rgba(73, 216, 147, 0.24);
  stroke: #7ee9b3;
  stroke-width: 2;
  opacity: 0;
  animation: fadeArea 0.8s ease forwards;
  animation-delay: 0.15s;
}

@keyframes growY {
  to {
    transform: scaleY(1);
  }
}

@keyframes growX {
  to {
    transform: scaleX(1);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeArea {
  to {
    opacity: 1;
  }
}

@keyframes fillDonut {
  to {
    --share: var(--target);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .tab-panel,
  .tab-panel.is-active {
    grid-template-columns: 1fr;
  }

  .panel-chart {
    min-height: 340px;
  }

  .origin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 10px;
    gap: 10px;
  }

  .hero,
  .tabs-shell,
  .insight {
    padding: 12px;
  }

  .kpis {
    padding: 10px;
    grid-template-columns: 1fr;
  }

  .tabs-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 10px;
  }

  .tab-btn {
    width: 100%;
    text-align: left;
    font-size: 12px;
    padding: 8px 12px;
    min-height: 42px;
    white-space: normal;
    line-height: 1.25;
  }

  .tab-panel,
  .tab-panel.is-active {
    gap: 10px;
  }

  .panel-copy {
    padding: 12px;
    gap: 8px;
  }

  .panel-copy h3 {
    font-size: 19px;
  }

  .panel-chart {
    min-height: 280px;
    padding: 10px 8px;
  }

  .chart-canvas {
    height: 250px;
  }

  .chart-canvas.compact {
    height: 236px;
  }

  .donut-ring {
    width: 170px;
  }

  .axis-label,
  .value-label {
    font-size: 10px;
  }

  .axis-unit-label {
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .tabs-head {
    grid-template-columns: 1fr;
  }

  .panel-chart {
    min-height: 264px;
  }

  .chart-canvas {
    height: 230px;
  }

  .chart-canvas.compact {
    height: 220px;
  }
}


