.mhr-root {
  --mhr-ink: #16202d;
  --mhr-muted: #5d6d80;
  --mhr-panel: #f3f6f8;
  --mhr-card: #fff;
  --mhr-line: #d7e0e8;
  --mhr-electric: #168f86;
  --mhr-depr: #b85f47;
  --mhr-gold: #bd8b2f;
  --mhr-blue: #315f8d;
  --mhr-shadow: 0 24px 64px rgba(23, 34, 48, 0.14);
  --mhr-electricity-share: 20%;
  --mhr-depreciation-share: 80%;

  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(14px, 2.6vw, 26px);
  border: 1px solid var(--mhr-line);
  border-radius: 8px;
  padding: clamp(14px, 2.7vw, 24px);
  color: var(--mhr-ink);
  background: var(--mhr-card);
  box-shadow: var(--mhr-shadow);
  color-scheme: light;
}

.theme-dark .mhr-root {
  --mhr-ink: #f5f8fb;
  --mhr-muted: #adbac8;
  --mhr-panel: #121a22;
  --mhr-card: #0d1218;
  --mhr-line: #2d3a48;
  --mhr-electric: #65c8bd;
  --mhr-depr: #dd8b72;
  --mhr-gold: #d6ad59;
  --mhr-blue: #8ab2df;
  --mhr-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);

  color-scheme: dark;
}

.mhr-console,
.mhr-inputs {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--mhr-line) 88%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mhr-panel) 93%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.mhr-console,
.mhr-inputs,
.mhr-composition,
.mhr-duration,
.mhr-grid label {
  display: grid;
}

.mhr-console {
  gap: 14px;
  padding: clamp(14px, 2.4vw, 20px);
}

.mhr-ticker {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--mhr-gold) 48%, var(--mhr-line));
  border-radius: 8px;
  padding: clamp(18px, 4vw, 28px);
  background: var(--mhr-card);
}

.mhr-ticker::after {
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--mhr-gold);
  content: "";
}

.mhr-ticker span,
.mhr-kpis span,
.mhr-ledger span,
.mhr-insight span,
.mhr-root label > span:not(.mhr-input-row, .mhr-duration-head),
.mhr-utilization > span {
  display: block;
  color: var(--mhr-muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mhr-ticker strong {
  display: block;
  margin-top: 9px;
  color: var(--mhr-ink);
  font-size: clamp(2.75rem, 8vw, 5.45rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.mhr-ticker small,
.mhr-ledger small {
  display: block;
  margin-top: 10px;
  color: var(--mhr-muted);
  font-weight: 850;
}

.mhr-ticker b,
.mhr-kpis b,
.mhr-ledger b {
  color: var(--mhr-ink);
  font-variant-numeric: tabular-nums;
}

.mhr-kpis,
.mhr-ledger,
.mhr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mhr-kpis article,
.mhr-ledger article,
.mhr-utilization {
  min-width: 0;
  border: 1px solid var(--mhr-line);
  border-radius: 8px;
  padding: 13px;
  background: color-mix(in srgb, var(--mhr-card) 90%, transparent);
}

.mhr-kpis strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(1rem, 2.2vw, 1.24rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.mhr-composition {
  gap: 10px;
}

.mhr-stack {
  display: flex;
  min-height: 62px;
  overflow: hidden;
  border: 1px solid var(--mhr-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mhr-card) 90%, transparent);
}

.mhr-stack i,
.mhr-stack b {
  display: block;
  min-width: 2%;
  transition: width 420ms ease;
}

.mhr-stack i {
  width: var(--mhr-electricity-share);
  background: var(--mhr-electric);
}

.mhr-stack b {
  width: var(--mhr-depreciation-share);
  background: var(--mhr-depr);
}

.mhr-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mhr-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--mhr-muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.mhr-legend i {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mhr-electric);
}

.mhr-legend span:last-child i {
  background: var(--mhr-depr);
}

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

.mhr-ledger strong {
  display: block;
  margin-top: 8px;
  color: var(--mhr-ink);
  font-size: clamp(1.32rem, 3vw, 1.95rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.mhr-insight {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--mhr-gold) 40%, var(--mhr-line));
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--mhr-gold) 9%, var(--mhr-card));
}

.mhr-insight strong {
  display: block;
  margin-top: 6px;
  color: var(--mhr-ink);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  line-height: 1.3;
}

.mhr-inputs {
  align-content: start;
  gap: 16px;
  padding: clamp(14px, 2.4vw, 20px);
}

.mhr-settings {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.mhr-settings h3 {
  margin: 0;
  color: var(--mhr-ink);
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
  line-height: 1.1;
}

.mhr-select-label {
  flex: 0 1 260px;
  display: grid;
  gap: 7px;
}

.mhr-duration {
  gap: 10px;
}

.mhr-duration .mhr-duration-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 24px;
  width: 100%;
}

.mhr-duration em {
  font-style: italic;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mhr-duration strong {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  color: var(--mhr-ink);
  font-size: clamp(1.3rem, 3.3vw, 2rem);
  line-height: 1;
}

.mhr-duration strong b {
  font-size: 0.82em;
  font-weight: 900;
}

.mhr-root input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--mhr-line);
  border-radius: 7px;
  padding: 11px 10px;
  color: var(--mhr-ink);
  background: color-mix(in srgb, var(--mhr-card) 94%, transparent);
  font: inherit;
  font-weight: 850;
}

.mhr-root select {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-weight: 850;
}

.mhr-root input[type="range"] {
  padding: 0;
  accent-color: var(--mhr-gold);
  background: transparent;
}

.mhr-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--mhr-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--mhr-card) 94%, transparent);
}

.mhr-input-row input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mhr-input-row small {
  padding: 0 11px 0 8px;
  white-space: nowrap;
}

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

.mhr-grid label {
  gap: 7px;
  min-width: 0;
}

.mhr-grid small {
  color: var(--mhr-muted);
  font-weight: 850;
}

.mhr-grid small b {
  color: inherit;
}

.mhr-utilization {
  border-color: color-mix(in srgb, var(--mhr-blue) 40%, var(--mhr-line));
  background: color-mix(in srgb, var(--mhr-card) 92%, transparent);
}

.mhr-utilization strong {
  display: block;
  margin-top: 7px;
  color: var(--mhr-ink);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.mhr-utilization p {
  margin: 7px 0 0;
  color: var(--mhr-muted);
  line-height: 1.35;
}

.mhr-ticker strong.is-counting,
.mhr-ledger strong.is-counting,
.mhr-ledger b.is-counting,
.mhr-ticker b.is-counting {
  filter: blur(0.45px);
  transform: translateY(-1px);
}

.mhr-root[data-dominant="electricity"] .mhr-insight {
  border-color: color-mix(in srgb, var(--mhr-electric) 52%, var(--mhr-line));
  background: color-mix(in srgb, var(--mhr-electric) 10%, var(--mhr-card));
}

.mhr-root[data-dominant="depreciation"] .mhr-insight {
  border-color: color-mix(in srgb, var(--mhr-depr) 54%, var(--mhr-line));
  background: color-mix(in srgb, var(--mhr-depr) 10%, var(--mhr-card));
}

@media (max-width: 900px) {
  .mhr-root,
  .mhr-kpis,
  .mhr-ledger,
  .mhr-grid {
    grid-template-columns: 1fr;
  }

  .mhr-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .mhr-select-label {
    flex-basis: auto;
  }
}

@media (max-width: 520px) {
  .mhr-root {
    padding: 12px;
  }

  .mhr-legend {
    grid-template-columns: 1fr;
  }

  .mhr-ticker strong {
    font-size: clamp(2.45rem, 15vw, 4rem);
  }
}
