:root {
  color-scheme: light;
  --forest: #124734;
  --forest-2: #0a2e23;
  --leaf: #4c8c58;
  --mint: #e5f2e8;
  --aqua: #0f7785;
  --sun: #efb34f;
  --bg: #f6faf5;
  --panel: #ffffff;
  --ink: #17231d;
  --muted: #65736b;
  --line: #dce6df;
  --input: #fff8d8;
  --danger: #a83535;
  --shadow: 0 18px 46px rgba(18, 71, 52, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 71, 52, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbf6 0%, #eef6f0 100%);
  background-size: 70px 70px, auto;
  line-height: 1.45;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.partner-logo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px clamp(12px, 3vw, 34px);
  background: #ffffff;
  border-top: 4px solid var(--forest);
  border-bottom: 1px solid var(--line);
}

.partner-logo-banner {
  display: block;
  width: min(100%, 1280px);
  max-height: 118px;
  object-fit: contain;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  min-width: 0;
}

.title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 290px;
}

.mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--forest), var(--aqua));
  border-radius: 10px;
  font-weight: 900;
}

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

.title-block h1 {
  margin: 0;
  color: var(--forest-2);
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.08;
}

.title-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-toggle {
  display: flex;
  padding: 4px;
  background: var(--soft, #f5f8f3);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-button {
  min-width: 42px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.lang-button.is-active {
  color: #fff;
  background: var(--forest);
}

.home-button {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft, #f5f8f3);
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-button:hover {
  background: var(--mint, #e6f4ea);
  border-color: var(--aqua, #2abfbf);
  color: var(--aqua, #2abfbf);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--forest);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.icon-button .button-mark {
  display: grid;
  width: 22px;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 6px;
  font-size: 0.75rem;
}

.icon-button .button-label {
  display: inline;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
}

.icon-button.accent {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.icon-button.accent .button-mark {
  color: var(--forest);
  background: var(--sun);
}

.app-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
}

.sidebar {
  position: sticky;
  top: 73px;
  height: calc(100vh - 119px);
  padding: 18px;
  overflow: auto;
  background: #ffffffc9;
  border-right: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 9px 11px;
  color: #405047;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #0f7785;
  background: #eef8f6;
  border-color: #d6ebe7;
  box-shadow: inset 3px 0 0 #0f7785;
}

.nav-divider {
  margin: 18px 8px 9px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tech-dot {
  width: 10px;
  height: 10px;
  margin-right: 10px;
  background: var(--dot);
  border-radius: 999px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 20%, transparent);
}

.content {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  min-height: 28px;
  margin: 0 0 8px;
  padding: 5px 10px;
  align-items: center;
  color: var(--aqua);
  background: rgba(15, 119, 133, 0.1);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-head h2 {
  max-width: 900px;
  margin-bottom: 6px;
  color: var(--forest-2);
  font-size: clamp(1.8rem, 3vw, 3.25rem);
  line-height: 1;
}

.panel-head p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1rem;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--forest-2);
  font-size: 0.8rem;
  font-weight: 900;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.segmented button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.segmented button.active {
  color: #fff;
  background: var(--forest);
}

.grid {
  display: grid;
  gap: 16px;
}

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric,
.card,
.table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--forest-2);
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kpi, var(--forest));
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.result-stack {
  display: grid;
  gap: 16px;
}

.insight-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  padding: 12px;
  background: var(--soft, #f5f8f3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.insight-list strong {
  display: block;
  color: var(--forest-2);
}

.insight-list span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.row-total td {
  color: var(--forest-2);
  background: #eef6f0;
  font-weight: 900;
}

.positive {
  color: #16a34a;
}

.results-heading {
  margin-bottom: 18px;
}

.results-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
}

.results-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.reference-results {
  display: grid;
  gap: 16px;
}

.compact-kpis .metric strong {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.compact-panel {
  box-shadow: none;
}

.card {
  padding: 18px;
}

.card h3,
.table-panel h3 {
  margin-bottom: 8px;
  color: var(--forest-2);
}

.card p {
  color: var(--muted);
}

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

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

.assumption-item {
  min-height: 112px;
  padding: 14px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.assumption-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.assumption-item strong {
  display: block;
  margin-top: 10px;
  color: var(--forest-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem;
}

.assumption-item .note {
  margin: 7px 0 0;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  background: var(--input);
  border: 1px solid #eadc94;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 750;
}

.table-panel {
  margin-top: 18px;
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: #fff;
}

thead th {
  color: var(--forest-2);
  background: #eff6f1;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

tbody td {
  color: #2c3932;
  font-size: 0.9rem;
}

td input {
  width: 92px;
  min-height: 34px;
  padding: 6px 7px;
  text-align: right;
  background: var(--input);
  border: 1px solid #eadc94;
  border-radius: 6px;
  font-weight: 800;
}

.chart-card {
  min-height: 320px;
  padding: 18px;
  background: #f8fafc;
  border-color: #dfe7ef;
  box-shadow: none;
}

.line-chart {
  position: relative;
  min-height: 300px;
  margin-top: 0;
  padding: 10px 10px 4px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
  min-height: 28px;
  color: #334155;
  font-size: 0.86rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.legend-dot.baseline {
  background: #d97706;
}

.legend-dot.project {
  background: #dc2626;
}

.legend-dot.reduction {
  background: #16a34a;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: 300px;
}

.chart-grid {
  stroke: #dce6df;
  stroke-width: 1;
}

.chart-y-label,
.chart-x-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-y-label {
  text-anchor: end;
}

.chart-x-label {
  text-anchor: middle;
}

.chart-area {
  fill: url("#lineArea");
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  fill: #fff;
  stroke-width: 3;
}

.chart-line.baseline,
.chart-point.baseline {
  stroke: #d97706;
}

.chart-line.project,
.chart-point.project {
  stroke: #dc2626;
}

.chart-line.reduction,
.chart-point.reduction {
  stroke: #16a34a;
}

.line-chart-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 8px 0 58px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.chart-wrap {
  position: relative;
}

.axis-title {
  display: inline-flex;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-bar-chart svg {
  display: block;
  width: 100%;
  height: 300px;
}

.overview-bar {
  cursor: pointer;
  fill: #159947;
  rx: 4;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.overview-bar:hover {
  filter: brightness(0.92);
}

.chart-unit {
  display: inline-flex;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reference-table {
  margin-top: 0;
  box-shadow: none;
}

.reference-table table {
  min-width: 860px;
}

.reference-table thead th {
  background: #e8eef5;
  color: #334155;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.reference-table tbody tr:nth-child(even) td {
  background: #f8fbfb;
}

.reference-table tbody tr:hover td {
  background: #eef8f6;
}

.stacked-card {
  padding: 22px 26px;
  background: #fff;
  border-color: #dfe7ef;
}

.stacked-card h3 {
  margin-bottom: 16px;
}

.stacked-chart {
  position: relative;
  min-height: 360px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  display: none;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  color: #eaf4ef;
  background: rgba(10, 46, 35, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(10, 46, 35, 0.24);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.55;
  pointer-events: none;
  white-space: nowrap;
}

.chart-tooltip.is-visible {
  display: block;
}

.stack-segment {
  cursor: pointer;
}

.stack-segment:hover {
  filter: brightness(0.92);
}

.stacked-chart svg {
  display: block;
  width: 100%;
  height: 330px;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 750;
}

.stacked-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stacked-legend i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.stacked-card .reference-table {
  margin: 0;
  border: 0;
}

.note {
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  padding: clamp(36px, 5vw, 66px) clamp(18px, 5vw, 76px);
  color: #dce8e1;
  background: #111a18;
  border-top: 5px solid var(--leaf);
  font-size: 0.95rem;
}

.footer-partner-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(28px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-brand strong {
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
}

.footer-brand span {
  max-width: 320px;
  color: #aebdb5;
}

.footer-partner-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-left: clamp(18px, 3vw, 34px);
  border-left: 3px solid #ef6a3a;
}

.footer-partner-list div {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
}

.footer-partner-list dt {
  color: #f7fbf8;
  font-weight: 900;
  text-align: right;
}

.footer-partner-list dd {
  margin: 0;
  color: #dce8e1;
}

@media (max-width: 1080px) {
  .app-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #navList {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-divider {
    display: none;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
  }

  .panel-head {
    grid-template-columns: 1fr;
  }

  .cards-4,
  .cards-3,
  .result-layout,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .app-header,
  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .title-block {
    min-width: 0;
  }

  .header-actions,
  .cards-4,
  .cards-3,
  .form-grid,
  .assumption-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .icon-button {
    flex: 1;
  }

  .footer-partner-panel,
  .footer-partner-list div {
    grid-template-columns: 1fr;
  }

  .footer-partner-list {
    padding-left: 18px;
  }

  .footer-partner-list dt {
    text-align: left;
  }
}
