:root {
  --bg: #030910;
  --bg-2: #06131b;
  --surface: rgba(13, 22, 36, 0.84);
  --surface-strong: rgba(18, 29, 46, 0.92);
  --surface-soft: rgba(24, 38, 58, 0.78);
  --text: #eef5ff;
  --muted: #99a9bd;
  --line: rgba(91, 128, 169, 0.26);
  --line-strong: rgba(92, 151, 205, 0.42);
  --navy: #e9f2ff;
  --teal: #37d7be;
  --teal-dark: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --amber: #ff8b22;
  --amber-soft: rgba(255, 139, 34, 0.14);
  --blue: #2f7df5;
  --cyan: #18c8f4;
  --danger: #ef6b5b;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --radius: 16px;
  --radius-small: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #030910;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -8%, rgba(28, 130, 120, 0.28), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(26, 84, 164, 0.24), transparent 30rem),
    linear-gradient(180deg, #06141b 0%, #03070d 42%, #02060b 100%);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.15));
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  padding: 0 14px 82px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(270px, 380px) minmax(0, 1fr) auto;
  grid-template-areas: "brand spacer actions";
  align-items: end;
  gap: 16px;
  min-height: 168px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(60, 121, 177, 0.32);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(90deg, rgba(7, 14, 28, 0.98), rgba(8, 34, 58, 0.92)),
    rgba(6, 13, 25, 0.92);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(45, 212, 191, 0.09), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(47, 125, 245, 0.12), transparent 20rem);
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 132px;
  padding: 0;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(87, 147, 201, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 40% 30%, rgba(47, 125, 245, 0.28), transparent 55%),
    rgba(8, 18, 34, 0.92);
}

.brand-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-fallback {
  display: none;
  color: #ffffff;
  font-size: 27px;
  font-weight: 950;
  line-height: 1;
}

.brand-mark.logo-failed img {
  display: none;
}

.brand-mark.logo-failed .brand-fallback {
  display: block;
}

.brand strong {
  display: block;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.header-title {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 100%);
  min-width: 0;
  text-align: center;
  z-index: 1;
}

.header-title h1 {
  max-width: 760px;
  margin: 0 auto;
  color: #ffffff;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.header-title p {
  max-width: 640px;
  margin: 5px auto 0;
  color: #a9b7ca;
  font-size: 12px;
  font-weight: 650;
}

.header-watermark {
  grid-area: watermark;
  display: none;
}

.view-tabs,
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 13, 24, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.view-tabs {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1;
}

.tab-button,
.simulator-nav-button,
.segmented span {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b9c7da;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.tab-button,
.simulator-nav-button {
  padding: 0 18px;
}

.simulator-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.tab-button.is-active,
.simulator-nav-button,
.segmented input:checked + span {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 139, 245, 0.28);
}

.top-actions {
  grid-area: actions;
  display: flex;
  align-self: end;
  justify-content: flex-end;
  gap: 10px;
}

.floating-footer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: calc(100vw - 32px);
  padding: 0 18px;
  border: 1px solid rgba(55, 215, 190, 0.28);
  border-radius: 999px;
  background: rgba(7, 14, 27, 0.88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #dbe8f8;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.brand-mark svg,
.icon-button svg,
.ghost-button svg,
.primary-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button,
.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}

.icon-button {
  width: 44px;
  border: 1px solid var(--line);
  background: rgba(21, 32, 50, 0.82);
  color: #dce8fb;
}

.ghost-button,
.primary-button {
  gap: 9px;
  padding: 0 16px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(27, 39, 58, 0.88), rgba(15, 24, 39, 0.9));
  color: #ecf4ff;
}

.primary-button {
  border: 1px solid rgba(44, 216, 191, 0.42);
  background: linear-gradient(135deg, #2577f4, #16c7da);
  color: #fff;
  box-shadow: 0 14px 30px rgba(18, 151, 219, 0.26);
}

.icon-button:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.full {
  width: 100%;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(278px, 300px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.control-panel,
.data-panel,
.chart-panel,
.scenario-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 27, 43, 0.92), rgba(7, 13, 24, 0.9)),
    rgba(10, 18, 31, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.control-panel {
  align-self: stretch;
  position: sticky;
  top: 12px;
  max-height: none;
  overflow: hidden;
}

.control-panel::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
}

.control-panel::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: rgba(100, 130, 164, 0.42);
  border-radius: 99px;
}

.panel-section {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}

.section-title::before,
.chart-head::before {
  content: attr(data-label);
}

.section-title h2,
.hero-copy h2,
.chart-head h3,
.scenario-card h3 {
  margin: 0;
  color: #eaf2ff;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.section-title h2 {
  font-size: 18px;
}

.section-title p,
.hero-copy p,
.chart-head p,
.scenario-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field > span,
.field.compact > span {
  color: #c7d4e6;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(84, 123, 163, 0.34);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.78);
  color: var(--text);
  padding: 0 13px;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

select {
  color-scheme: dark;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(24, 200, 244, 0.18);
}

input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 64px;
}

.input-suffix em {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.segmented {
  grid-auto-flow: row;
  grid-template-columns: 1fr 1fr;
  background: rgba(6, 14, 27, 0.76);
}

.segmented.three {
  grid-template-columns: repeat(3, 1fr);
}

.segmented label {
  min-width: 0;
}

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

.segmented span {
  display: grid;
  place-items: center;
  padding: 0 8px;
  text-align: center;
}

details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #edf5ff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

details[open] summary svg {
  transform: rotate(180deg);
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
  margin-top: 8px;
}

.field.compact input {
  height: 40px;
  font-size: 13px;
}

.check-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 14, 27, 0.72);
  cursor: pointer;
}

.check-field input {
  position: relative;
  width: 42px;
  height: 24px;
  appearance: none;
  border-radius: 99px;
  padding: 0;
  background: rgba(100, 118, 140, 0.32);
  transition: background 0.18s ease;
}

.check-field input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dce8fb;
  transition: transform 0.18s ease, background 0.18s ease;
}

.check-field input:checked {
  border-color: rgba(24, 200, 244, 0.55);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.check-field input:checked::after {
  transform: translateX(18px);
  background: #ffffff;
}

.check-field strong,
.check-field small {
  display: block;
}

.check-field strong {
  color: #eef5ff;
  font-size: 12px;
  font-weight: 950;
}

.check-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.assumption-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px 16px;
}

.assumption-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(13, 28, 44, 0.74);
}

.assumption-strip span,
.assumption-strip strong {
  display: block;
}

.assumption-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.assumption-strip strong {
  margin-top: 5px;
  color: #ffffff;
  font-size: 15px;
}

.dashboard {
  min-width: 0;
}

.executive-grid,
.technical-grid,
.sensitivity-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.is-hidden {
  display: none;
}

.hero-comparison {
  position: relative;
  order: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(0, 920px);
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 18px 218px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 26, 44, 0.95), rgba(9, 29, 44, 0.78)),
    rgba(10, 19, 33, 0.9);
}

.hero-comparison::after {
  content: "";
  position: absolute;
  right: 34px;
  top: 50%;
  width: 156px;
  height: 86px;
  transform: translateY(-50%);
  background: url("bk_branca.png") center / contain no-repeat;
  opacity: 0.18;
  filter: grayscale(1);
  pointer-events: none;
}

.hero-copy,
.tco-scoreboard {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 104px;
}

.hero-copy h2 {
  max-width: none;
  font-size: clamp(23px, 1.7vw, 31px);
  line-height: 1.02;
  white-space: nowrap;
}

.tco-scoreboard,
.metric-row {
  display: grid;
  gap: 12px;
}

.tco-scoreboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-self: end;
  width: min(920px, 100%);
}

.score,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 13, 26, 0.74);
  padding: 14px;
}

.metric-card {
  min-height: 132px;
}

.score {
  display: grid;
  align-content: space-between;
  min-height: 96px;
  position: relative;
  overflow: hidden;
}

.score::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(45, 246, 239, 0.16), transparent 32%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 44%);
  opacity: 0.9;
}

.score > * {
  position: relative;
  z-index: 1;
}

.score span,
.metric-card span,
.scenario-grid span {
  color: #b4c2d6;
  font-size: 12px;
  font-weight: 900;
}

.score strong {
  margin-top: 12px;
  color: #ffffff;
  font-size: clamp(23px, 1.9vw, 30px);
  line-height: 1;
}

.score.pol strong,
.metric-card.positive strong {
  color: var(--teal);
}

.score.ethernet strong {
  color: var(--amber);
  text-shadow: 0 0 16px rgba(255, 139, 34, 0.28);
}

.score.savings {
  border-color: rgba(45, 246, 239, 0.62);
  background:
    radial-gradient(circle at 22% 48%, rgba(45, 246, 239, 0.18), transparent 24%),
    radial-gradient(circle at 80% 15%, rgba(45, 246, 239, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(15, 67, 73, 0.95), rgba(5, 14, 26, 0.94) 62%, rgba(8, 35, 44, 0.94));
  text-align: center;
}

.score.savings span {
  color: #e6f3ff;
  text-transform: uppercase;
}

.score.savings strong {
  color: var(--teal);
  font-size: clamp(22px, 1.9vw, 31px);
  text-shadow: 0 0 18px rgba(45, 246, 239, 0.42);
}

.score small,
.metric-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.metric-row {
  order: 1;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-card strong {
  display: block;
  margin-top: 9px;
  color: #ffffff;
  font-size: clamp(20px, 1.65vw, 27px);
  line-height: 1.05;
}

.opex-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.opex-values {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.opex-values small {
  margin: 0;
  font-size: 11px;
  font-weight: 950;
}

.opex-values .ethernet-label {
  color: var(--amber);
}

.opex-values .pol-label {
  margin-top: 6px;
  color: var(--teal);
}

.opex-values b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f2f7ff;
  font-size: 14px;
  font-weight: 950;
}

.opex-saving {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--teal);
  text-align: center;
}

.opex-saving svg {
  width: 32px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.opex-saving strong {
  margin-top: 0;
  color: var(--teal);
  font-size: 18px;
}

.opex-saving small {
  margin: 0;
  color: #d0ece8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.18;
}

.icon-metric small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7e5f8;
}

.icon-metric small svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: var(--teal);
  stroke: var(--teal);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-metric small b {
  color: #d7e5f8;
  font-size: 12px;
  font-weight: 850;
}

.idf-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  align-content: center;
  min-height: 116px;
}

.idf-half {
  min-width: 0;
}

.idf-half span,
.idf-half strong,
.idf-half small {
  display: block;
}

.idf-card strong {
  color: var(--teal);
}

.idf-divider {
  width: 1px;
  height: 76px;
  background: var(--line);
}

.metric-card.metric-visual {
  --metric-art: none;
  --metric-title-size: clamp(12px, 0.72vw, 14px);
  --metric-value-size: clamp(36px, 2.7vw, 54px);
  --metric-caption-size: clamp(11px, 0.66vw, 13px);
  --metric-side-value-size: clamp(15px, 0.96vw, 19px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  min-height: 0;
  height: clamp(142px, 9.4vw, 174px);
  aspect-ratio: auto;
  padding: clamp(15px, 1.05vw, 20px);
  border: 1px solid rgba(42, 227, 255, 0.5);
  border-radius: 11px;
  background:
    radial-gradient(circle at 74% 46%, rgba(42, 227, 255, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(5, 22, 37, 0.98), rgba(2, 8, 17, 0.98) 56%, rgba(4, 16, 29, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 24px rgba(34, 184, 255, 0.08);
}

.metric-card.metric-visual::before {
  display: none;
}

.metric-card.metric-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 8, 18, 0.06) 0%, rgba(2, 8, 18, 0.1) 48%, rgba(2, 8, 18, 0.02) 100%);
  pointer-events: none;
}

.metric-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  pointer-events: none;
  user-select: none;
}

.metric-idf .metric-art,
.metric-opex .metric-art {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
}

.metric-card.metric-visual > :not(.metric-art) {
  position: relative;
  z-index: 2;
}

.metric-card.metric-visual > picture {
  display: contents;
}

.metric-economia {
  --metric-art: image-set(url("economia.avif") type("image/avif"), url("economia.png") type("image/png"));
}

.metric-payback {
  --metric-art: image-set(url("payback.avif") type("image/avif"), url("payback.png") type("image/png"));
}

.metric-opex {
  --metric-art: image-set(url("OPEX.avif") type("image/avif"), url("OPEX.png") type("image/png"));
}

.metric-energia {
  --metric-art: image-set(url("energia.avif") type("image/avif"), url("energia.png") type("image/png"));
}

.metric-co2 {
  --metric-art: image-set(url("co2.avif") type("image/avif"), url("co2.png") type("image/png"));
}

.metric-idf {
  --metric-art: image-set(url("idfs.avif") type("image/avif"), url("idfs.png") type("image/png"));
}

.metric-card.metric-visual > span,
.metric-idf .idf-half span {
  position: relative;
  display: inline-block;
  color: rgba(226, 236, 250, 0.88);
  font-size: var(--metric-title-size);
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.metric-card.metric-visual > span::after,
.metric-idf .idf-half span::after {
  content: "";
  display: block;
  width: min(72px, 40%);
  height: 2px;
  margin-top: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2df6ef, rgba(45, 246, 239, 0));
  box-shadow: 0 0 12px rgba(45, 246, 239, 0.68);
}

.metric-card.metric-visual > strong {
  margin-top: clamp(12px, 0.95vw, 16px);
  color: #38f4ec;
  max-width: 56%;
  font-size: var(--metric-value-size);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow:
    0 0 12px rgba(45, 246, 239, 0.65),
    0 0 28px rgba(0, 174, 255, 0.26);
  white-space: nowrap;
}

.metric-card.metric-visual > small,
.metric-card.metric-visual small b {
  color: rgba(226, 236, 250, 0.88);
  font-size: var(--metric-caption-size);
  font-weight: 650;
}

.metric-card.metric-visual > small b {
  color: inherit;
}

.metric-card.metric-visual > small {
  margin-top: 7px;
}

.metric-idf small strong,
.metric-idf small b {
  color: #2df6ef;
}

.metric-energia.metric-visual > strong,
.metric-co2.metric-visual > strong {
  max-width: 57%;
  font-size: var(--metric-value-size);
}

.metric-payback.metric-visual > strong {
  max-width: 58%;
  font-size: var(--metric-value-size);
}

.metric-card.metric-visual svg {
  display: none;
}

.metric-card.metric-visual.icon-metric small {
  display: block;
  max-width: 57%;
}

.metric-opex .opex-detail {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.68fr);
  gap: clamp(10px, 0.9vw, 16px);
  align-items: stretch;
  margin-top: 10px;
}

.metric-opex .opex-values {
  gap: 3px;
}

.metric-opex .opex-values small {
  font-size: clamp(11px, 0.64vw, 13px);
}

.metric-opex .opex-values b {
  color: #ffffff;
  font-size: var(--metric-side-value-size);
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.14);
}

.metric-opex .opex-values .pol-label {
  margin-top: 8px;
}

.metric-opex .opex-saving {
  align-self: center;
  min-height: 68px;
  padding-left: clamp(8px, 0.75vw, 14px);
  border-left-color: rgba(42, 227, 255, 0.24);
}

.metric-opex .opex-saving strong {
  color: #38f4ec;
  font-size: var(--metric-value-size);
  line-height: 0.9;
  text-shadow: 0 0 18px rgba(45, 246, 239, 0.58);
}

.metric-opex .opex-saving small {
  max-width: 98px;
  color: #ffffff;
  font-size: clamp(10px, 0.58vw, 12px);
  font-weight: 850;
}

.metric-idf {
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: clamp(14px, 1vw, 20px);
  align-items: center;
}

.metric-idf .idf-divider {
  height: 64%;
  background: rgba(42, 227, 255, 0.28);
}

.metric-idf .idf-half {
  min-width: 0;
}

.metric-idf .idf-half strong {
  margin-top: 12px;
  color: #38f4ec;
  font-size: var(--metric-value-size);
  font-weight: 950;
  line-height: 0.9;
  white-space: nowrap;
  text-shadow:
    0 0 12px rgba(45, 246, 239, 0.65),
    0 0 28px rgba(0, 174, 255, 0.24);
}

.metric-idf .idf-half small {
  margin-top: 8px;
  color: rgba(226, 236, 250, 0.86);
  font-size: var(--metric-caption-size);
  line-height: 1.15;
}

.metric-card.metric-visual > span:not(.metric-art) {
  position: absolute;
  left: clamp(18px, 1.3vw, 28px);
  top: clamp(17px, 1vw, 24px);
}

.metric-card.metric-visual.metric-opex > span:not(.metric-art) {
  left: clamp(24px, 2vw, 42px);
}

.metric-card.metric-visual > strong:not(.metric-art) {
  position: absolute;
  left: clamp(20px, 1.42vw, 32px);
  top: 48%;
  max-width: 48%;
  margin: 0;
  transform: translateY(-50%);
}

.metric-card.metric-visual > small:not(.metric-art) {
  position: absolute;
  left: clamp(20px, 1.42vw, 32px);
  top: 71%;
  max-width: 48%;
  margin: 0;
}

.metric-payback.metric-visual > strong {
  top: 50%;
  max-width: 50%;
}

.metric-payback.metric-visual > small {
  top: 72%;
}

.metric-energia.metric-visual > strong,
.metric-co2.metric-visual > strong {
  top: 50%;
  max-width: 50%;
}

.metric-energia.metric-visual > small,
.metric-co2.metric-visual > small {
  top: 72%;
  max-width: 50%;
}

.metric-card.metric-visual.metric-opex .opex-detail {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
}

.metric-opex .opex-values {
  position: absolute;
  left: clamp(24px, 2vw, 42px);
  top: 34%;
  display: grid;
  gap: 4px;
  width: 28%;
  transform: none;
}

.metric-card.metric-visual .opex-values .ethernet-label,
.metric-card.metric-visual .opex-values .pol-label {
  font-size: var(--metric-caption-size);
  font-weight: 760;
}

.metric-card.metric-visual .opex-values .ethernet-label {
  color: var(--amber);
}

.metric-card.metric-visual .opex-values .pol-label {
  color: var(--teal);
}

.metric-opex .opex-values .pol-label {
  margin-top: 10px;
}

.metric-card.metric-visual .opex-values b {
  line-height: 0.95;
}

.metric-opex .opex-saving {
  position: absolute;
  right: clamp(132px, 11vw, 220px);
  top: 50%;
  width: clamp(150px, 11vw, 230px);
  min-height: 0;
  padding: 0;
  border-left: 0;
  transform: translateY(-50%);
  text-align: center;
}

.metric-opex .opex-saving strong {
  margin: 0;
  font-size: var(--metric-value-size);
  line-height: 0.9;
}

.metric-opex .opex-saving small {
  max-width: 100%;
  margin-top: 7px;
  font-size: var(--metric-caption-size);
  line-height: 1.12;
}

.metric-idf {
  display: block;
}

.metric-card.metric-visual.metric-idf .idf-divider {
  display: none;
}

.metric-card.metric-visual.metric-idf .idf-half {
  position: absolute;
  top: 0;
  width: 28%;
  height: 100%;
  min-width: 0;
  transform: none;
}

.metric-card.metric-visual.metric-idf .idf-half:first-of-type {
  left: clamp(24px, 2vw, 42px);
}

.metric-card.metric-visual.metric-idf .idf-half:last-of-type {
  left: 53.8%;
  width: 25%;
}

.metric-idf .idf-half strong {
  position: absolute;
  left: 0;
  top: 48%;
  margin: 0;
  transform: translateY(-50%);
  font-size: var(--metric-value-size);
}

.metric-card.metric-visual.metric-idf .idf-half:last-of-type strong {
  font-size: clamp(32px, 2.25vw, 45px);
  letter-spacing: 0;
}

.metric-idf .idf-half small {
  position: absolute;
  left: 0;
  top: 74%;
  max-width: 100%;
  margin: 0;
  font-size: var(--metric-caption-size);
  color: rgba(226, 236, 250, 0.88);
}

.metric-card.metric-visual.metric-idf .idf-half span {
  position: absolute;
  left: 0;
  top: clamp(17px, 1vw, 24px);
  color: rgba(226, 236, 250, 0.88);
}

.chart-panel {
  order: 3;
  grid-column: span 6;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-color: rgba(42, 227, 255, 0.26);
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 246, 239, 0.08), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(47, 126, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(14, 28, 47, 0.96), rgba(4, 12, 23, 0.93)),
    rgba(10, 18, 31, 0.9);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(45, 246, 239, 0.035);
}

.chart-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(45, 246, 239, 0.08), transparent) top / 100% 1px no-repeat,
    radial-gradient(circle at 100% 100%, rgba(45, 246, 239, 0.08), transparent 28%);
  opacity: 0.85;
}

.tco-panel {
  grid-column: span 5;
}

.capex-opex-panel {
  grid-column: span 3;
}

.composition-panel {
  grid-column: span 4;
}

.chart-panel.wide {
  grid-column: span 7;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
  min-height: 52px;
  margin-bottom: 16px;
  padding-left: 64px;
}

.chart-panel .chart-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(42, 140, 255, 0.55);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 18%, rgba(45, 246, 239, 0.24), transparent 46%),
    linear-gradient(180deg, rgba(21, 83, 177, 0.72), rgba(7, 24, 58, 0.88));
  box-shadow:
    0 0 22px rgba(42, 140, 255, 0.32),
    inset 0 0 18px rgba(45, 246, 239, 0.12);
}

.chart-panel .chart-head::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 15px;
  width: 18px;
  height: 18px;
  border-left: 3px solid #38f4ec;
  border-bottom: 3px solid #38f4ec;
  transform: skew(-8deg);
  box-shadow: -5px 5px 0 -2px rgba(45, 246, 239, 0.54);
}

.capex-opex-panel .chart-head::after {
  border: 0;
  width: 22px;
  height: 22px;
  background:
    linear-gradient(#38f4ec 0 0) 0 13px / 4px 9px no-repeat,
    linear-gradient(#38f4ec 0 0) 9px 7px / 4px 15px no-repeat,
    linear-gradient(#38f4ec 0 0) 18px 0 / 4px 22px no-repeat;
  transform: none;
  box-shadow: 0 0 12px rgba(45, 246, 239, 0.38);
}

.composition-panel .chart-head::after {
  border: 0;
  border-radius: 50%;
  background:
    conic-gradient(#38f4ec 0 28%, #2a8cff 28% 58%, #ff8b22 58% 80%, rgba(226, 236, 250, 0.55) 80% 100%);
  box-shadow: 0 0 14px rgba(45, 246, 239, 0.38);
}

.chart-head h3,
.scenario-card h3 {
  font-size: clamp(18px, 1.18vw, 24px);
}

.chart-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 12, 23, 0.72);
  color: #dbe8f9;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
}

.dot.ethernet {
  background: var(--amber);
}

.dot.pol {
  background: var(--teal);
}

.chart {
  min-height: 260px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(130, 164, 208, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 74px 100%,
    radial-gradient(circle at 84% 20%, rgba(45, 246, 239, 0.08), transparent 34%),
    rgba(4, 10, 20, 0.66);
}

.chart svg {
  width: 100%;
  height: 100%;
  min-height: 260px;
}

.composition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
  z-index: 1;
  min-height: 260px;
  padding: 12px 4px 0;
}

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

.composition-block + .composition-block {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.donut-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 128px;
}

.donut {
  position: relative;
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--segments));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  background: #08111f;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-summary {
  display: grid;
  gap: 7px;
}

.donut-summary span {
  color: #d9e6f8;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.donut-summary strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.composition-legend {
  display: grid;
  gap: 9px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.composition-legend li,
.composition-legend span {
  display: flex;
  align-items: center;
}

.composition-legend li {
  justify-content: space-between;
  gap: 10px;
  color: #cbd8ea;
  font-size: 12px;
  font-weight: 800;
}

.composition-legend i {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  margin-right: 8px;
  border-radius: 3px;
}

.composition-legend strong {
  color: #eef5ff;
  font-size: 12px;
  font-weight: 900;
}

.technical-grid .data-panel {
  grid-column: span 6;
  padding: 18px;
}

.technical-grid .data-panel:first-child {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

th {
  background: rgba(18, 34, 55, 0.72);
  color: #b9c8db;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

td {
  color: #eef5ff;
  font-weight: 800;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.variation-down {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--teal);
  font-weight: 950;
}

.variation-down svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sensitivity-grid .chart-panel {
  grid-column: span 8;
}

.scenario-card {
  grid-column: span 4;
  padding: 18px;
}

.executive-message-card {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  min-height: 190px;
  overflow: hidden;
  border-color: rgba(55, 215, 190, 0.42);
  background:
    radial-gradient(circle at 86% 24%, rgba(47, 125, 245, 0.28), transparent 22rem),
    linear-gradient(135deg, rgba(15, 52, 67, 0.96), rgba(7, 14, 27, 0.92));
}

.executive-message-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.message-copy {
  position: relative;
  z-index: 1;
}

.message-copy > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(55, 215, 190, 0.32);
  border-radius: 99px;
  background: rgba(55, 215, 190, 0.13);
  color: #92fff0;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.executive-message-card h3 {
  margin-top: 16px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}

.executive-message-card p {
  max-width: 1120px;
  margin-top: 14px;
  color: #e7f4ff;
  font-size: clamp(18px, 1.45vw, 25px);
  font-weight: 850;
  line-height: 1.34;
}

.executive-message-card .ghost-button {
  position: relative;
  z-index: 1;
  min-width: 176px;
  border-color: rgba(55, 215, 190, 0.36);
}

.scenario-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.scenario-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: rgba(7, 15, 29, 0.72);
}

.scenario-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-size: 21px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  max-width: 340px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(13, 22, 36, 0.96);
  box-shadow: var(--shadow);
  color: #fff;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 6, 13, 0.72);
  backdrop-filter: blur(14px);
}

.modal-backdrop.is-open {
  display: flex;
}

.help-modal {
  width: min(1180px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 8%, rgba(47, 125, 245, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(17, 27, 43, 0.98), rgba(7, 13, 24, 0.98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.help-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.help-modal-head span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(55, 215, 190, 0.32);
  border-radius: 99px;
  background: rgba(55, 215, 190, 0.13);
  color: #92fff0;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.help-modal-head h2 {
  margin: 13px 0 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.03;
}

.help-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-height: calc(min(88vh, 920px) - 116px);
  overflow: auto;
  padding: 24px;
}

.help-feature,
.help-economics,
.glossary-card,
.help-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 12, 23, 0.7);
  padding: 18px;
}

.help-feature h3,
.help-economics h3,
.glossary-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.help-feature p {
  margin: 10px 0 0;
  color: #c9d7e8;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

.help-feature ul {
  display: grid;
  gap: 9px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.help-feature li {
  position: relative;
  padding-left: 20px;
  color: #dce8f8;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.42;
}

.help-feature li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ethernet-help li::before {
  background: var(--amber);
}

.pol-help li::before {
  background: var(--teal);
}

.help-economics {
  grid-column: 1 / -1;
}

.glossary-card {
  grid-column: 1 / -1;
}

.glossary-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.glossary-card div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 24, 41, 0.72);
  padding: 12px;
}

.glossary-card dt {
  color: var(--teal);
  font-size: 13px;
  font-weight: 950;
}

.glossary-card dd {
  margin: 6px 0 0;
  color: #c9d7e8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.help-economics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.help-economics-grid div {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 24, 41, 0.72);
  padding: 14px;
}

.help-economics-grid strong,
.help-economics-grid span,
.help-note strong {
  display: block;
}

.help-economics-grid strong {
  color: var(--teal);
  font-size: 15px;
  font-weight: 950;
}

.help-economics-grid span {
  margin-top: 8px;
  color: #c9d7e8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.help-note {
  grid-column: 1 / -1;
  border-color: rgba(55, 215, 190, 0.36);
  background: linear-gradient(135deg, rgba(11, 61, 70, 0.72), rgba(9, 18, 35, 0.78));
  color: #e9f7ff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.55;
}

.help-note strong {
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 16px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "title"
      "tabs"
      "actions";
    align-items: start;
    min-height: 0;
  }

  .brand {
    min-height: 0;
    padding-bottom: 0;
  }

  .header-watermark {
    position: absolute;
    top: 24px;
    right: 24px;
  }

  .header-title {
    grid-area: title;
    width: 100%;
    text-align: center;
  }

  .view-tabs {
    grid-area: tabs;
  }

  .view-tabs,
  .top-actions {
    justify-self: center;
  }

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

  .control-panel {
    position: static;
    max-height: none;
  }

  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .metric-card.metric-visual {
    height: clamp(146px, 8.2vw, 178px);
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: 100%;
    padding: 12px 10px 32px;
  }

  .topbar {
    min-height: 0;
    padding: 16px;
    border-radius: 20px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-comparison,
  .tco-scoreboard,
  .metric-row,
  .advanced-grid,
  .assumption-strip {
    grid-template-columns: 1fr;
  }

  .chart-panel,
  .chart-panel.wide,
  .tco-panel,
  .capex-opex-panel,
  .composition-panel,
  .technical-grid .data-panel,
  .technical-grid .data-panel:first-child,
  .sensitivity-grid .chart-panel,
  .scenario-card {
    grid-column: 1 / -1;
  }

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

  .composition-block + .composition-block {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .executive-message-card {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
  }

  .hero-copy h2 {
    font-size: 27px;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .brand {
    justify-content: flex-start;
    gap: 12px;
    min-height: 0;
    padding: 0;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-mark img {
    width: 26px;
    height: 26px;
  }

  .header-title h1 {
    font-size: 28px;
  }

  .header-title p {
    display: none;
  }

  .header-watermark {
    display: none;
  }

  .view-tabs {
    width: 100%;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .top-actions > .ghost-button,
  .top-actions > .primary-button {
    grid-column: 1 / -1;
  }

  .top-actions > .ghost-button,
  .top-actions > .primary-button,
  .top-actions > .icon-button {
    width: 100%;
    min-width: 0;
  }

  .top-actions > .ghost-button,
  .top-actions > .primary-button {
    padding: 0 8px;
    font-size: 12px;
  }

  .segmented,
  .segmented.three {
    grid-template-columns: 1fr;
  }

  .dashboard > div,
  .panel-section {
    padding: 14px;
  }

  .score strong {
    font-size: 25px;
  }

  .floating-footer {
    white-space: normal;
    width: calc(100vw - 28px);
    padding: 8px 12px;
    line-height: 1.25;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .help-modal-head,
  .help-modal-body {
    padding: 16px;
  }

  .help-modal-body,
  .help-economics-grid,
  .glossary-card dl {
    grid-template-columns: 1fr;
  }
}

/* Responsive/performance pass - 2026-05-25
   Additive only: keeps the approved visual composition and improves behavior on
   narrower, shorter and projector-style viewports. */
@media (min-width: 1181px) {
  .workspace {
    align-items: start;
  }

  .control-panel {
    max-height: calc(100svh - 24px);
    overflow: auto;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 1440px) and (min-width: 1181px) {
  .app-shell {
    padding-inline: clamp(8px, 0.85vw, 16px);
  }

  .workspace {
    grid-template-columns: minmax(246px, 282px) minmax(0, 1fr);
    gap: 12px;
  }

  .metric-row {
    gap: 8px;
  }

  .metric-card.metric-visual {
    --metric-title-size: clamp(11px, 0.82vw, 13px);
    --metric-value-size: clamp(31px, 2.95vw, 48px);
    --metric-caption-size: clamp(10px, 0.76vw, 12px);
    height: clamp(126px, 8.5vw, 160px);
  }
}

@media (max-width: 1720px) and (min-width: 1181px) {
  .hero-comparison {
    grid-template-columns: minmax(260px, 0.82fr) minmax(620px, 1.18fr);
    padding-right: clamp(112px, 9vw, 172px);
  }

  .hero-comparison::after {
    right: clamp(18px, 2.2vw, 34px);
    width: clamp(104px, 8vw, 142px);
  }

  .hero-copy h2 {
    white-space: normal;
    font-size: clamp(21px, 1.45vw, 27px);
    line-height: 1.08;
  }

  .tco-scoreboard {
    gap: 10px;
  }

  .score {
    min-height: 86px;
    padding: 12px;
  }

  .score strong {
    font-size: clamp(20px, 1.65vw, 27px);
  }

  .score.savings strong {
    font-size: clamp(21px, 1.7vw, 28px);
  }

  .metric-card.metric-visual {
    --metric-value-size: clamp(30px, 2.55vw, 46px);
    --metric-side-value-size: clamp(16px, 1.2vw, 22px);
  }

  .metric-opex .opex-values {
    left: clamp(18px, 1.45vw, 28px);
    top: 31%;
    width: 24%;
  }

  .metric-opex .opex-values .pol-label {
    margin-top: 8px;
  }

  .metric-opex .opex-saving {
    right: clamp(74px, 6vw, 118px);
    width: clamp(128px, 10vw, 176px);
  }

  .metric-opex .opex-saving strong {
    font-size: clamp(31px, 2.85vw, 48px);
  }

  .metric-opex .opex-saving small {
    font-size: clamp(9px, 0.7vw, 11px);
  }

  .metric-card.metric-visual.metric-idf .idf-half:first-of-type {
    left: clamp(18px, 1.5vw, 28px);
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type {
    left: 52%;
    width: 28%;
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type strong {
    font-size: clamp(28px, 2vw, 40px);
  }
}

@media (max-width: 2000px) and (min-width: 1181px) {
  .hero-comparison {
    grid-template-columns: minmax(270px, 0.7fr) minmax(760px, 1.3fr);
    gap: clamp(10px, 0.85vw, 16px);
    padding-right: clamp(118px, 8.4vw, 164px);
  }

  .hero-copy h2 {
    max-width: 18ch;
    white-space: normal;
    font-size: clamp(23px, 1.42vw, 29px);
    line-height: 1.07;
  }

  .hero-copy p {
    max-width: 44ch;
  }

  .hero-comparison::after {
    right: clamp(18px, 2vw, 32px);
    width: clamp(104px, 7.4vw, 150px);
  }

  .tco-scoreboard {
    width: 100%;
    gap: 10px;
  }

  .score {
    min-height: 92px;
    padding: 12px 14px;
  }

  .metric-card.metric-visual {
    --metric-value-size: clamp(34px, 2.35vw, 48px);
    --metric-side-value-size: clamp(16px, 1.05vw, 20px);
  }

  .metric-opex .opex-values {
    left: clamp(20px, 1.45vw, 30px);
    top: 25%;
    width: 30%;
  }

  .metric-opex .opex-values b {
    font-size: clamp(16px, 1.08vw, 21px);
  }

  .metric-opex .opex-values .pol-label {
    margin-top: clamp(4px, 0.42vw, 7px);
  }

  .metric-opex .opex-saving {
    right: clamp(86px, 6.4vw, 128px);
    top: 50%;
    width: clamp(142px, 10vw, 190px);
  }

  .metric-opex .opex-saving strong {
    font-size: clamp(36px, 2.75vw, 54px);
  }

  .metric-opex .opex-saving small {
    font-size: clamp(9px, 0.62vw, 11px);
  }

  .metric-card.metric-visual.metric-idf .idf-half:first-of-type {
    left: clamp(20px, 1.55vw, 30px);
    width: 24%;
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type {
    left: 53%;
    width: 24%;
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type strong {
    font-size: clamp(27px, 1.78vw, 36px);
  }

  .metric-idf .idf-half small {
    max-width: 16ch;
  }
}

@media (max-width: 1320px) and (min-width: 861px) {
  .hero-comparison {
    grid-template-columns: 1fr;
    padding-right: 18px;
  }

  .hero-comparison::after {
    opacity: 0.08;
  }

  .tco-scoreboard {
    justify-self: stretch;
    width: 100%;
  }

  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .app-shell {
    padding-block: 8px 18px;
  }

  .topbar {
    min-height: 0;
    padding-block: 10px;
  }

  .workspace {
    margin-top: 10px;
    gap: 10px;
  }

  .control-panel,
  .data-panel,
  .chart-panel,
  .scenario-card {
    padding-block: 12px;
  }

  .metric-card.metric-visual {
    --metric-value-size: clamp(30px, 3vw, 46px);
    height: clamp(118px, 18vh, 148px);
  }
}

@media (max-width: 680px) {
  .metric-card.metric-visual {
    min-height: 132px;
  }

  .metric-card.metric-visual .metric-art {
    object-fit: cover;
    object-position: center;
  }
}

@container (max-width: 520px) {
  .metric-opex .opex-values {
    left: 5.2cqw;
    top: 24%;
    width: 31cqw;
    gap: 2px;
  }

  .metric-opex .opex-values b {
    font-size: clamp(14px, 4.1cqw, 19px);
    line-height: 0.92;
  }

  .metric-opex .opex-values .pol-label {
    margin-top: 5px;
  }

  .metric-opex .opex-saving {
    right: 20cqw;
    width: 34cqw;
  }

  .metric-opex .opex-saving strong {
    font-size: clamp(31px, 10cqw, 44px);
  }

  .metric-opex .opex-saving small {
    font-size: clamp(9px, 2.25cqw, 11px);
    line-height: 1.06;
  }

  .metric-card.metric-visual.metric-idf .idf-half:first-of-type {
    left: 5.4cqw;
    width: 24cqw;
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type {
    left: 53cqw;
    width: 22cqw;
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type strong {
    font-size: clamp(25px, 7.6cqw, 34px);
  }

  .metric-idf .idf-half small {
    max-width: 16ch;
    line-height: 1.12;
  }
}

@supports (content-visibility: auto) {
  .chart-panel,
  .scenario-card,
  .data-panel,
  .advanced-grid,
  .assumption-strip {
    content-visibility: auto;
    contain-intrinsic-size: 420px;
  }
}

/* Progressive type scaling for presentation screens and smaller desktops. */
@media (max-width: 2000px) and (min-width: 1181px) {
  .hero-copy h2 {
    font-size: clamp(20px, 1.24vw, 25px);
    line-height: 1.08;
  }

  .hero-copy p,
  .score small,
  .metric-card small {
    font-size: clamp(10px, 0.58vw, 12px);
  }

  .score span,
  .metric-card span,
  .scenario-grid span {
    font-size: clamp(10px, 0.6vw, 12px);
  }

  .score strong {
    font-size: clamp(19px, 1.35vw, 25px);
  }

  .score.savings strong {
    font-size: clamp(20px, 1.45vw, 26px);
  }

  .metric-card.metric-visual {
    --metric-title-size: clamp(10px, 0.62vw, 12px);
    --metric-value-size: clamp(29px, 2.08vw, 44px);
    --metric-caption-size: clamp(9px, 0.56vw, 11px);
    --metric-side-value-size: clamp(13px, 0.88vw, 17px);
  }

  .metric-opex .opex-saving strong {
    font-size: clamp(31px, 2.28vw, 44px);
  }

  .metric-card.metric-visual.metric-idf .idf-half:last-of-type strong {
    font-size: clamp(24px, 1.58vw, 32px);
  }
}

@media (max-width: 1440px) and (min-width: 861px) {
  .metric-card.metric-visual {
    --metric-title-size: clamp(9px, 0.74vw, 11px);
    --metric-value-size: clamp(26px, 2.55vw, 39px);
    --metric-caption-size: clamp(8.5px, 0.68vw, 10px);
    --metric-side-value-size: clamp(12px, 1vw, 16px);
  }

  .hero-copy h2 {
    font-size: clamp(19px, 1.7vw, 23px);
  }

  .score strong {
    font-size: clamp(18px, 1.6vw, 23px);
  }

  .score.savings strong {
    font-size: clamp(19px, 1.7vw, 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
