/* styles.css — Version v199z20 2026-05-18 22:35
*/

/* ==================== DESIGN TOKENS ==================== */
:root {
  /* Typography */
  --font-main: "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;

  /* Modern surfaces */
  --bg: #ededed;
  --surface: #ffffff;
  --surface-2: #f7f7f7;

  /* Text & borders */
  --text: #00233d;
  --muted: #55595c;
  --border: #d8d9da;

  /* Brand */
  --primary: #004070;
  --primary-hover: #00233d;
  --accent: #dc9a04;
  --accent-hover: #b67d03;

  /* Effects */
  --radius: 4px;
  --radius-sm: 3px;
  --shadow-sm: 0 1px 2px rgba(0, 35, 61, 0.08);
  --shadow-md: 0 12px 28px rgba(0, 35, 61, 0.12);
  --ring: 0 0 0 4px rgba(0, 64, 112, 0.18);

  /* Legacy token names used throughout the app (mapped) */
  --color-blue: var(--primary);
  --color-orange: var(--accent);
  --color-hover-blue: var(--primary-hover);
  --color-hover-orange: var(--accent-hover);
  --color-helper-text: var(--muted);
  --color-border: var(--border);
  --color-bg-light: var(--surface-2);

  /* Existing app/layout tokens kept */
  --chart-ph-color: var(--muted);
  --chart-ph-indent: 0px;
  --result-col-max: 34rem;
  /* Minimum width for each results column card (tune if you want) */
  --results-col-min: 420px;

  /* File-button tokens */
  --filebtn-bg: var(--surface);
  --filebtn-fg: var(--text);
  --filebtn-bd: var(--border);
  --filebtn-radius: 4px;
  --filebtn-pad: 8px 12px;

  /* Form layout */
  --label-col: 450px;
  --analysis-btn-width: 560px;
  --field-col: 220px;
}


/* ==================== BASE ==================== */
.simulation-error {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #a12622;
  border-radius: var(--radius);
  background: #fff4f3;
  color: #7a1815;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
@font-face {
  font-family: System;
  src: local("Arial"); /* of laat deze blok weg als je geen custom webfont gebruikt */
  font-display: swap;
}
html {
  font-family: var(--font-main);
  font-size: 112.5%;
}

input,
select,
textarea,
button {
  font-size: 0.8rem;
}

.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(5px);
}

.app-confirm-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.96)),
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.2), transparent 38%);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26);
}

.app-confirm-dialog h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.05rem;
}

.app-confirm-body {
  display: grid;
  gap: 9px;
  color: #475569;
  line-height: 1.45;
}

.app-confirm-body p {
  margin: 0;
}

.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.app-confirm-actions--choices {
  flex-direction: column;
  align-items: stretch;
}

.app-confirm-actions--choices .app-confirm-button {
  width: 100%;
  text-align: left;
}

.app-confirm-button {
  padding: 10px 16px;
  border: 1px solid rgba(148, 163, 184, 0.48);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.app-confirm-button:hover,
.app-confirm-button:focus-visible {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: var(--ring);
  outline: none;
}

.app-confirm-button--primary {
  border-color: rgba(37, 99, 235, 0.72);
  background: #2563eb;
  color: #ffffff;
}

.app-confirm-button--primary:hover,
.app-confirm-button--primary:focus-visible {
  background: var(--primary-hover);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  /* Prevent page-level horizontal scrolling; horizontal scroll should happen inside dedicated containers */
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

h3,
h4,
h5,
label,
p,
.key,
.value {
  font-family: var(--font-main), Arial, sans-serif;
  margin: 0 0 1px;
}

ul {
  padding: 0;
  margin-top: 0;
}

h2 {
  margin-bottom: 0.1em;
}

/* ==================== LAYOUT ==================== */
.econenergetica-body .l-page {
  min-height: 100%;
  background: var(--bg);
}

.econenergetica-body .global-header {
  background: var(--primary);
  border-bottom: 4px solid #067aac;
}

.econenergetica-body .global-header .container,
.econenergetica-body .global-footer .container,
.econenergetica-container {
  max-width: 1600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.econenergetica-body .global-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
}

.econenergetica-body .global-header .logo {
  display: block;
  width: 140px;
  height: auto;
}

.econenergetica-main {
  background: var(--bg);
}

.page{max-width:1600px;margin:0 auto;padding:18px 16px 110px;}
.ku-app-page {
  max-width: none;
  padding: 12px 0 110px;
}

.ku-app-version {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .84rem;
}

#tab-about .ku-app-version {
  margin: 20px 0 0;
}

.about-whats-new {
  margin-top: 8px;
  color: var(--text);
  font-size: .92rem;
}

.about-whats-new summary {
  width: max-content;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.about-whats-new summary:hover,
.about-whats-new summary:focus-visible {
  color: var(--primary-hover);
}

.about-whats-new-list {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.55;
}

.about-whats-new-day + .about-whats-new-day {
  margin-top: 12px;
}

.about-whats-new-commits {
  margin: 4px 0 0;
  padding-left: 18px;
}

.about-whats-new-commits > li + li {
  margin-top: 8px;
}

.about-whats-new-changes {
  margin: 2px 0 0;
  padding-left: 18px;
}

.about-whats-new-changes li + li {
  margin-top: 4px;
}

.about-whats-new-release--unversioned {
  list-style: none;
}

.about-whats-new-version {
  font-weight: 700;
}

.about-whats-new-date {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.about-whats-new-summary {
  display: block;
  margin-top: 2px;
}

.about-whats-new-sources {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
}

.econenergetica-body .global-footer {
  background: var(--primary-hover);
  color: #fff;
}

.econenergetica-body .global-footer .bottom-footer {
  padding: 18px 0;
}

.econenergetica-body .global-footer .legal {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.econenergetica-body .global-footer .logo {
  display: inline-flex;
  align-items: center;
}

.econenergetica-body .global-footer .logo-img {
  display: block;
  width: 107px;
  height: auto;
}

.econenergetica-body .global-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.econenergetica-body .global-footer a {
  color: #fff;
}
.columns {
  display: flex;
}

.column {
  flex: 1;
  padding: 10px;
}

.two-column-wrapper {
  display: flex;
  justify-content: start;
  gap: 10px;
  margin: 10px 0;
}

.column ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.column li {
  margin-bottom: 5px;
}

.buttons-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.pvgis-grid {
  /* Robust two-column layout: form on the left, map on the right.
     Uses CSS grid to avoid any overlap on intermediate widths. */
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(340px, 520px);
  gap: 1rem;
  align-items: start;
}

.pvgis-left {
  min-width: 0; /* allow inner fields to shrink without pushing overlap */
  position: relative;
  z-index: 2;
}

.pvgis-right {
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* PVGIS address row: put buttons on a new line under the address input */
.pvgis-left .form-group:has(#geo_address) {
  flex-wrap: wrap;
  align-items: flex-start;
}

.pvgis-left .form-group:has(#geo_address) > label {
  /* keep the label column behaviour */
  flex: 0 0 var(--label-col);
}

.pvgis-left .form-group:has(#geo_address) > #geo_address {
  flex: 1 1 520px;
  width: min(520px, 100%) !important; /* override inline width:360px */
  max-width: 520px;
}

/* Move buttons to the next line, directly under the input */
.pvgis-left .form-group:has(#geo_address) > #btnGeocode,
.pvgis-left .form-group:has(#geo_address) > #btnGeolocate {
  flex: 0 0 auto;
  margin-left: calc(var(--label-col) + 10px); /* aligns buttons under the input */
}

.pvgis-left .form-group:has(#geo_address) > #btnGeolocate {
  margin-left: 8px; /* spacing between the two buttons */
}

/* Status text goes on a new line below buttons (optional) */
.pvgis-left .form-group:has(#geo_address) > #geo_status {
  flex: 1 1 100%;
  margin-left: calc(var(--label-col) + 10px) !important;
  margin-top: 6px;
}

/* ==================== TABLES ==================== */
.cashflow-table-wrap{
  /* Scroll both directions when expanded (cashflow table can be huge) */
  overflow: auto;
  max-height: 80vh;
  border: 1px solid rgba(229,231,235,.85);
  border-radius: var(--radius);
  background: var(--surface);
}


.cashflow-details{
  margin-top: .25rem;
}

.cashflow-details > summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .25rem 0;
  user-select: none;
}

.cashflow-details > summary::-webkit-details-marker{ display:none; }

.cashflow-details > summary::before{
  content: "▸";
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  transform: translateY(1px);
}

.cashflow-details[open] > summary::before{
  content: "▾";
}

.cashflow-title{
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.cashflow-subtitle{
  color: var(--muted);
  font-size: .9rem;
}


.table{
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}

.table th,
.table td{
  border-bottom: 1px solid rgba(229,231,235,.7);
  padding: 8px 10px;
  vertical-align: top;
}

.table th{
  text-align: left;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table.table-striped td:not(:first-child) {
  text-align: right;
}

/* ==================== FORMS ==================== */
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  gap: 10px;
  flex-wrap: nowrap;
}

.form-group input,
.form-group select {
  width: 80px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.06);
  margin: 0;
}

.form-group option {
  text-align: right;
}

.form-group > label.checkbox-line {
  flex: 0 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.form-group > label.checkbox-line input[type="checkbox"] {
  width: auto;
  box-shadow: none;
}

#battery-dispatch-mode-section select {
  width: min(100%, 360px);
  min-width: 360px;
}

.helper-text {
  font-size: 0.9em;
  color: var(--color-helper-text);
  flex-grow: 1;
}

input[type="text"],
input[type="search"] {
  width: 8em;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.06);
  transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="text"].is-locked-by-battery {
  color: var(--muted);
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.ems-lock-note {
  flex: 1 1 100%;
  margin-left: calc(var(--label-col) + 90px);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #1e40af;
}

.form-group input[name^="pvgis_tilt_"],
.form-group input[name^="pvgis_az_"] {
  width: 70px;
}

#profileset {
  width: 220px;
}

#kwh_year_user {
  width: 125px;
}

#param_preset {
  width: 220px;
}

.filelike-button {
  background: var(--filebtn-bg);
  color: var(--filebtn-fg);
  border: 1px solid var(--filebtn-bd);
  border-radius: var(--filebtn-radius);
  padding: var(--filebtn-pad);
  font: inherit;
  cursor: pointer;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .05s ease;
}

.form-group--mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 8px 0;
}

.form-group--mini select {
  min-width: 160px;
  padding: 6px 8px;
}

.speed-row-left {
  display: block;
  width: 100%;
  text-align: left;
}

.speed-row-left .form-group--mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.speed-row-left .form-group--mini label {
  width: auto;
  min-width: 0;
  max-width: none;
  text-align: left;
  margin-right: 8px;
}

.speed-row-left .form-group--mini select {
  min-width: 160px;
  padding: 6px 8px;
  text-align: left;
}

.action-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-group > label {
  flex: 0 0 var(--label-col);
  width: var(--label-col);
  max-width: var(--label-col);
  min-width: var(--label-col);
  text-align: right;
  font-weight: 650;
  color: var(--muted);
  padding-right: 10px;
}

.form-group .helper-text {
  flex: 1 1 auto;
}

.file-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-input-row .file-name {
  flex: 1 1 320px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  line-height: 1.2;
}

.file-input-row .helper-inline {
  flex-basis: 100%;
  margin-top: 6px;
}

.simple-form .form-group label {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  text-align: right;
  margin-right: 10px;
}

.simple-form .form-group input {
  width: 120px;
  text-align: right;
}

#tab-analysis .form-group input,
#tab-analysis .form-group select {
  width: 100px;
  text-align: right;
}

#tab-analysis .blue-button small,
#tab-analysis .blue-button .subtext,
#tab-analysis .blue-button .helper-text,
#tab-analysis .blue-button .helper-inline {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 2px;
}

#tab-analysis .button-row,
#tab-analysis .form-group .button-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.simulation-type-section .helper-text {
  margin: 0 0 4px 0;
}

.helper-text-small {
  font-size: 0.9em;
  color: var(--color-helper-text);
  flex-grow: 1;
}

#dynamic-tariff-section {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
}

.dyn-coef-formula {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.dyn-coef-formula .formula-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.dyn-coef-formula .formula-label {
  font-weight: 600;
  margin-right: 4px;
}

.dyn-coef-formula .formula-eq {
  white-space: nowrap;
}

.dyn-coef-formula input[type="number"] {
  width: 80px;
  font-size: 0.9em;
  text-align: right;
}

#dynamic-tariff-section input[type="number"]::-webkit-inner-spin-button,
#dynamic-tariff-section input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#dynamic-tariff-section input[type="number"] {
  -moz-appearance: textfield;
}

.helper-text.helper-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: help;

  flex: 0 0 auto;
  position: relative;
  flex-grow: 0;
}

.helper-text.helper-icon::after {
  content: attr(data-help);
  position: absolute;
  top: 120%;
  left: 0;
  min-width: min(500px, 85vw);  /* responsive tooltip width */
  max-width: min(600px, 92vw);
  padding: 8px 10px;
  background: rgba(100, 100, 100,0.8);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.35;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  white-space: normal;
  text-align: left;
  text-indent: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 9999;
}

.helper-text.helper-icon.helper-icon--wide::after {
  min-width: min(560px, 88vw);
  max-width: min(720px, 94vw);
  left: auto;
  right: 0;
}

.helper-text.helper-icon:hover::after,
.helper-text.helper-icon:focus::after {
  opacity: 1;
  transform: translateY(0);
}

/* Bring the icon (and its tooltip) above nearby panels like #pvmap */
.helper-text.helper-icon:hover,
.helper-text.helper-icon:focus{
  z-index: 9998;
}

.helper-inline {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin-top: 0;
}

.recalc-btn-row {
  display: block;
  width: 100%;
  padding-left: calc(var(--label-col) + 10px);
}

#recalc-selected-profile-btn {
  width: var(--field-col);
  min-height: 40px;
  font-size: 0.8em;
}

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 4px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 0;
  box-shadow: none;
}

.tabs-navigation {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.tabs-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-main);
  font-size: 0.8rem;
  line-height: 1.5;
  text-decoration: none;
  padding: 7px 11px;
  border: 1px solid transparent;
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}

.tab-btn:hover,
.tab-btn:focus-visible {
  background: #d4e7f3;
  border-color: #d4e7f3;
  color: var(--primary-hover);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.feedback-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #d69e00;
  border-radius: var(--radius-sm);
  background: #ffd85a;
  color: #00233d;
  cursor: pointer;
  font-weight: 800;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.feedback-menu-button:hover,
.feedback-menu-button:focus-visible {
  background: #ffca20;
  border-color: #b77900;
}

.feedback-menu-button:active {
  transform: translateY(1px);
}

.feedback-menu-icon {
  font-size: .86rem;
}

.feedback-dialog {
  width: min(780px, calc(100vw - 28px));
  max-width: 780px;
  max-height: min(900px, calc(100vh - 28px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .3);
}

.feedback-dialog::backdrop {
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(2px);
}

.feedback-dialog-card {
  max-height: min(900px, calc(100vh - 28px));
  padding: 24px;
  overflow-y: auto;
}

.feedback-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.feedback-dialog-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.feedback-dialog-header h2 {
  margin: 0;
  color: #00233d;
}

.feedback-dialog-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.feedback-dialog-intro {
  margin: 14px 0 20px;
  color: #475569;
}

.feedback-fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.feedback-fieldset legend,
.feedback-field > span:first-child {
  color: #1e293b;
  font-weight: 750;
}

.feedback-help {
  display: block;
  margin: 3px 0 8px;
  color: #64748b;
  font-size: .84rem;
}

.feedback-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feedback-choice-grid label,
.feedback-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.feedback-choice-grid input,
.feedback-toggle input {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  padding: 0;
  margin: 3px 0 0;
}

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

.feedback-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #aebdca;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.feedback-field textarea {
  resize: vertical;
}

.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(0, 64, 112, .14);
}

.feedback-context-panel {
  margin: 10px 0 16px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.feedback-context-panel .feedback-field {
  margin-bottom: 4px;
}

.feedback-consent {
  margin: 10px 0 16px;
  color: #334155;
  font-size: .9rem;
}

.feedback-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.feedback-form-status {
  min-height: 24px;
  margin: 4px 0 10px;
  font-weight: 700;
}

.feedback-form-status.is-error {
  color: #b42318;
}

.feedback-form-status.is-success {
  color: #157347;
}

.feedback-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.feedback-secondary-button,
.feedback-submit-button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
}

.feedback-secondary-button {
  border: 1px solid #aebdca;
  background: #fff;
  color: #334155;
}

.feedback-submit-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.feedback-submit-button:disabled {
  cursor: wait;
  opacity: .7;
}

@media (max-width: 720px) {
  .tabs-actions {
    flex-basis: 100%;
    justify-content: flex-end;
    margin-top: 2px;
  }

  .feedback-dialog-card {
    padding: 18px;
  }

  .feedback-choice-grid,
  .feedback-form-grid {
    grid-template-columns: 1fr;
  }
}

.analysis-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.analysis-subtab-btn {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.analysis-subtab-btn:hover,
.analysis-subtab-btn:focus-visible {
  background: #d4e7f3;
  border-color: #d4e7f3;
  color: var(--primary-hover);
  outline: none;
}

.analysis-subtab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

#tab-analysis > .analysis-subtab-panel,
#tab-analysis-residential > .results-section,
#tab-analysis-fixdyn > .results-section {
  margin-top: 0;
}

#tab-analysis,
#tab-fluvius-profiles,
#tab-entsoe {
  padding-top: 0;
}

#tab-fluvius-profiles > .results-section,
#tab-entsoe > .results-section {
  margin-top: 0;
}

#tab-analysis-plugin[hidden],
#tab-analysis-residential[hidden],
#tab-analysis-fixdyn[hidden] {
  display: none !important;
}

/* ==================== ABOUT ==================== */
#tab-about {
  max-width: 900px;
}

.about-section {
  padding: 18px 0 34px;
}

.about-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.about-section h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.25;
}

.about-copy {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 14px;
}

#tab-analysis #kwh_year_user {
  width: 100px;
}

#tab-analysis .blue-button,
#tab-analysis .blue-button:visited {
  width: var(--analysis-btn-width);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center !important;
  align-items: center;
  text-align: center;
  white-space: normal;
  padding: 10px 12px;
}

#tab-analysis .blue-button > * {
  margin: 0;
  text-align: center;
  align-self: center;
}

/* ==================== BUTTONS ==================== */
.blue-buttons-container,
.orange-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blue-button,
.orange-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.blue-button {
  background-color: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.blue-button:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

#residential-run-simulation.is-running {
  cursor: wait;
  opacity: 0.72;
}

.orange-button {
  background-color: var(--color-orange);
  color: black;
  transition: background-color 0.3s ease;
}

.orange-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== TOOLTIPS ==================== */
.help-tip {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: help;
  opacity: 0.75;
  position: relative;

  flex: 0 0 auto;
  flex-grow: 0;
}

.help-tip::before {
  content: "?";
}

.help-tip:focus,
.help-tip:hover {
  opacity: 1;
}

.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 220px;
  max-width: 360px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 10;
}

.help-tip:focus::after,
.help-tip:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESULTS LAYOUT ==================== */
/* Cards */
.results-section{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
  margin: 8px 0;
  overflow-x: auto;
}

.results-section h2{
  margin: 4px 0 8px;
  font-size: 0.98rem;
  letter-spacing: .01em;
  line-height: 1.2;
}

.results-section h3{
  margin: 8px 0 6px;
  font-size: 0.92rem;
}
.muted{color:var(--muted);}

.results-before-pv,
.results-wp-pv {
  max-width: 500px;
  margin: auto;
}

/* Results: show calculation period above the cards (not inside a card) */
.period-info-banner{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;

  margin: 0 0 12px 0;
  padding: 8px 10px;

  border: 1px solid var(--color-border);
  background: white;
  border-radius: 10px;

  color: var(--color-helper-text);
  font-size: 1rem;
}

/* Period banner: separator + meta text */
.period-info-sep{
  opacity: 0.55;
  padding: 0 2px;
}

.period-info-meta strong{
  font-weight: 600;
}

.period-info-label{
  font-weight: 600;
  color: #111; /* keep label readable */
}

/* Results rows: horizontal scrolling happens INSIDE the row (not on the page) */
.row-grid-2,
.row-grid-3,
.row-grid-4 {
  display: grid;
  gap: .2rem;
  align-items: start;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  overflow-x: auto;
  overflow-y: visible;
  justify-content: start;
  padding-bottom: 2px;

  -webkit-overflow-scrolling: touch;
}

.row-grid-2 {
  grid-template-columns: repeat(2, 460px);
}

.row-grid-3 {
  grid-template-columns: repeat(3, 460px);
}

.row-grid-4 {
  grid-template-columns: repeat(4, 387px);
}

/* Cards should stretch to fill their grid column */
.row-grid-2 > .results-section,
.row-grid-3 > .results-section,
.row-grid-4 > .results-section {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.results-section .kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem .75rem;
}

.results-section .kv-item {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: .2rem .45rem;
  align-items: center;
  padding: .42rem .52rem;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(17,24,39,.03);
  min-width: 0;
  font-size: 0.90rem;
}

.results-section .kv-key {
  text-align: left;
  font-weight: 650;
  color: var(--text);
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.18;
}

.results-section .kv-item > div:last-child {
  text-align: right;
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.90rem;
}

.results-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  margin: 0 0 10px 0;
  padding: 7px 10px;
  box-sizing: border-box;
  background: #f7f7f7;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  line-height: 1.3;
  font-size: 0.96rem;
  text-align: left;
}

.results-summary-bar span {
  white-space: nowrap;
}

/* ==================== CHARTS & LOADING UI ==================== */
.chart-container{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  margin: 14px 0;
}
/* Hide chart cards when hidden attribute is present */
.chart-container[hidden] { display: none !important; }

/* Hide chart controls when hidden */
.chart-controls[hidden] { display: none !important; }

/* Avoid broken image icon when src is empty */
.chart-container img[src=""] { display: none !important; }

.chart{
  width: 100% !important;
  max-width: none;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 2px);
  margin-left: auto;
  margin-right: auto;
}
/* Force full width even if index.html sets inline max-width on charts */
.chart[style],
img.chart[style]{
  width: 100% !important;
  max-width: none !important;
  height: auto;
}
/* Charts shown after orange buttons (these images don't have .chart class) */
#chartNPVper1kwp,
#chartNPVper1kwh,
#tableImage{
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
}

.chart-placeholder{
  color: var(--muted);
  background: linear-gradient(90deg, rgba(17,24,39,.04), rgba(17,24,39,.02), rgba(17,24,39,.04));
  border: 1px dashed rgba(17,24,39,.12);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.loading-message {
  display: none;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin: 14px auto;
  width: min(900px, 95%);
  background-color: var(--surface);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.spinner-overlay[hidden] {
  display: none !important;
}

.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.20);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Allow clicking UI behind the overlay (used for Fluvius cache build) */
.spinner-overlay.nonblocking{
  pointer-events: none;
}

/* Make sure spinner box itself also doesn't capture clicks */
.spinner-overlay.nonblocking .spinner-box{
  pointer-events: none;
}

.spinner-overlay.nonblocking{
  background: rgba(17, 24, 39, 0.12);
  backdrop-filter: none;
}

.spinner-core {
  width: 44px;
  height: 44px;
  border: 4px solid #cbd5e1;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: graphs-spin 1s linear infinite;
}

.spinner-label {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.spinner-box{
  background: rgba(255,255,255,0.98);
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.20);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.spinner-label{
  color: #0f172a; /* donker op witte box = leesbaar */
  text-align: center;
}

.chart-container {
  position: relative;
  min-height: 220px;
}

.chart-container img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 12px 8px var(--chart-ph-indent);
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: left;
  color: var(--chart-ph-color);
}

.chart-container.loading .chart-placeholder {
  display: flex;
}

.chart-container.loading img {
  opacity: 0.25;
  filter: blur(1px);
}

.chart-container:not(.loading) .chart-placeholder {
  display: none;
}

.chart-container.error .chart-placeholder {
  display: flex;
  color: #b00020;
  font-weight: 600;
}

.chart-container.error img {
  display: none !important;
}

#rebuild-graphs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  white-space: nowrap;
  line-height: 1.2;
}

.graphs-hint {
  margin: 0;
  white-space: nowrap;
}

/* ==================== PVGIS / MAP ==================== */
.pvgis-map-row {
  grid-column: 1 / -1;
  display: block;
}

#pvmap,
#res-pvmap {
  height: 260px;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  display: block;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

#pvmap.leaflet-container,
#res-pvmap.leaflet-container {
  cursor: crosshair;
}

.econ-map-marker {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 6px;
  background: linear-gradient(135deg, #166f7a, #64b88d);
  border: 3px solid #ffffff;
  box-shadow: 0 8px 18px rgba(18, 54, 66, 0.32);
  transform: rotate(-45deg);
}

.econ-map-marker span {
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.92;
}

.residential-location-picker {
  display: grid;
  gap: 10px;
}

.residential-location-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.residential-location-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 132px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.residential-location-card--map {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.residential-map-card-button {
  width: 100%;
  min-height: 72px;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.residential-map-card-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
  border-radius: 14px;
}

.residential-pv-map {
  border-radius: 24px;
  border-color: rgba(62, 103, 129, 0.18);
  background: linear-gradient(135deg, rgba(232, 245, 242, 0.8), rgba(255, 255, 255, 0.92));
}

#res-pvmap.residential-pv-map {
  height: 520px;
}

.residential-map-help {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

/* ==================== SIMULATION TYPE / PV CONFIG ==================== */
.simulation-type-section {
  margin: 0 0 12px 0;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
}

.simulation-type-section h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.simulation-type-list {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.simulation-type-list .simtype-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.simulation-type-list .simtype-option input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.pv-config-options {
  display: flex;
  gap: 4px;
  align-items: flex-start;
  flex-direction: column;
}
.simulation-type-list .simtype-option:has(input[type="radio"]:checked){
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.25);
}


.pv-config-option input[type="radio"] {
  margin: 0 4px 0 0;
  width: auto;
  flex: 0 0 auto;
}

.pv-config-option{
  display: inline-flex;      /* keeps bullet and text aligned */
  align-items: center;
  gap: 10px;                 /* space between bullet, text and info icon */
  min-width: 0;
}

.pv-config-option input[type="radio"] {
  margin-top: 4px;      /* aligns bullet with first text line */
}

.pv-config-text {
  white-space: normal;   /* allow wrapping on narrower widths */
  min-width: 0;
}

/* ==================== COLLAPSIBLES ==================== */
.collapsible-legend {
  padding: 0 8px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  cursor: pointer;          /* extra: maakt duidelijk dat het klikbaar is */
  user-select: none;
}

.collapsible-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  max-width: 1300px;
}

/* standaard OPEN */
.collapsible-fieldset .collapsible-body {
  display: block;
  margin-top: 10px;
}

/* enkel dicht als fieldset collapsed is */
.collapsible-fieldset.collapsed .collapsible-body {
  display: none;
}

.collapsible-legend h2 {
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}


/* ==================== ADVANCED / OPTIMIZER ==================== */
.optional-box {
  margin: 10px 0 14px;
}

.optional-box > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

/*!* Optional boxes: add a bordered "card" around the content when expanded *!*/
/*details.optional-box[open] > :not(summary),*/
/*details.collapsible-fieldset[open] > :not(summary) {*/
/*  border: 1px solid var(--border, #e5e7eb);*/
/*  border-radius: 12px;*/
/*  padding: 14px 14px 16px;*/
/*  margin-top: 10px;*/
/*  background: var(--surface, #fff);*/
/*  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);*/
/*}*/

.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}

.adv-item label {
  display: block;
  margin-bottom: 4px;
}

.adv-item input,
.adv-item select {
  width: 100%;
  padding: 6px 8px;
}

.adv-actions {
  margin-top: 10px;
}

.optional-box > summary.adv-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.optional-box .adv-hint {
  font-size: 0.9rem;
  color: #666;
  font-weight: normal;
  white-space: nowrap;
}

.apv-calc {
  font-style: italic;
  color: var(--primary);
}

.apv-calc-result-display {
  display: inline-block;
  width: 100px;
  text-align: right;
  font-weight: normal;
  color: var(--primary);
}

/* ==================== UPLOAD PROFILE ==================== */
#profilenr {
  width: 220px;
  flex: 1 1 auto;
  min-width: 160px;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  background: var(--filebtn-bg);
  color: var(--filebtn-fg);
  border: 1px solid var(--filebtn-bd);
  border-radius: var(--filebtn-radius);
  padding: var(--filebtn-pad);
  font: inherit;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover,
.filelike-button:hover {
  background: #e9e9e9;
  border-color: #666;
}

input[type="file"]::file-selector-button:focus-visible,
input[type="file"]::-webkit-file-upload-button:focus-visible,
.filelike-button:focus-visible {
  outline: 2px solid #4d90fe;
  outline-offset: 2px;
}

#upload-profile-btn.blue-button {
  padding: 3px 10px;
  min-height: 32px;
}

#upload-own-profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

#upload-own-profile > label {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}

#upload-own-profile .file-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#upload-own-profile .file-input-row input[type="file"] {
  flex: 0 0 auto;
  width: auto;
}

#upload-own-profile .file-input-row .file-name {
  flex: 0 1 750px;
  max-width: 750px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  line-height: 1.2;
}

#upload-own-profile .file-input-row .helper-inline {
  flex: 0 0 auto;
  margin-left: 4px;
}

#upload-own-profile .upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

#upload-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 220px;
  min-height: 36px;
  padding: 6px 12px;
  white-space: normal;
  flex-direction: column;
  line-height: 1.2;
}

#upload-own-profile .upload-actions .helper-inline {
  margin-left: 6px;
}

#upload-own-profile #upload-result {
  font-size: 0.85rem;
  color: var(--color-helper-text, #555);
  flex: 1 1 320px;
  min-width: 0;
  white-space: normal;
  display: inline-block;
  max-width: 100%;
}

#upload-own-profile .upload-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
}

#upload-own-profile .upload-mode-row label {
  text-align: left;
  margin-right: 8px;
}

#upload-own-profile .upload-sub-label {
  min-width: 110px;
  font-weight: 600;
}

#upload-own-profile .upload-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#upload-own-profile .upload-mode-row select {
  min-width: 520px;
  width: min(100%, 720px);
  max-width: 100%;
  margin-left: 0;
}

#upload-own-profile .upload-sub-label {
  min-width: 110px;
  font-weight: 600;
}

#upload-own-profile .upload-mode-row,
#upload-own-profile .upload-mode-row * {
  justify-content: flex-start;
  text-align: left;
}

#upload-single-block,
#upload-split-block {
  width: 100%;
}

#upload-split-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#upload-single-block,
#upload-split-block {
  width: 100%;
}

#upload-split-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#upload-profile-btn .button-main {
  display: block;
}

#upload-profile-btn .button-subtext {
  display: block;
  margin-top: 2px;
  font-size: 0.8em;
  font-weight: normal;
  opacity: 0.9;
}

.profilenr-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profilenr-select {
  min-width: 220px;
  height: 35px;
  width: 100%;
  max-width: 100%;
}

/* ==================== MISC ==================== */
#tab-simulations > p:first-of-type{margin:0 0 10px;color:var(--muted);font-size:.9rem;}

.key-value {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 100%;
}

#toggleOverzicht4SeizoenenButton {
  width: 100%;
  max-width: 600px;
  margin: 10px 200px;
}

.xl-block {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.xl-block select {
  padding: 2px 6px;
}

.xl-lab {
  font-size: .9rem;
  opacity: .8;
}

.sep {
  margin: 0 .25rem;
}

.helper-calc-text {
  font-size: 0.9em;
}

/* ==================== ANIMATIONS ==================== */
@keyframes graphs-spin {
  to { transform: rotate(360deg); }
}


/* ==================== RESULTS DOCK ==================== */
/* Disabled: it duplicates the inline results and blocks the UI.
   If you want it back later, remove this rule and restore the HTML block. */
.results-dock{ display:none; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
  .pvgis-grid {
    grid-template-columns: 1fr;
  }

  .pvgis-left,
  .pvgis-right {
    min-width: 0;
  }
}

@media (max-width: 1080px) {
  .residential-tariff-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .residential-pv-map {
    height: 280px;
    border-radius: 18px;
  }
}

/* Allow PVGIS left-column rows to wrap instead of overflowing into the map column */
.pvgis-left .form-group {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Prevent any child from forcing overflow in grid/flex */
.pvgis-left .form-group > * {
  min-width: 0;
}

/* Address input should be responsive, despite inline style="width:360px;" in HTML */
#geo_address {
  flex: 1 1 360px;
  width: min(520px, 100%) !important;   /* overrides the inline width safely */
  max-width: 520px;
}

/* Buttons should stay compact and move to the next line if needed */
#btnGeocode,
#btnGeolocate {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Status text should drop to a new line when it doesn't fit */
#geo_status {
  flex: 1 1 100%;
}

/*@media (max-width: 980px) {*/
/*  .row-grid-3 {*/
/*    grid-template-columns: repeat(2, minmax(360px, 1fr));*/
/*  }*/
/*}*/

@media (max-width: 768px) {
  .buttons-wrapper {
    flex-direction: column;
  }

  .loading-message {
    width: 95%;
    margin: 10px auto;
  }
}

@media (max-width: 760px) {
  /*.row-grid-2 {*/
  /*  grid-template-columns: 1fr;*/
  /*}*/

  /*.row-grid-3 {*/
  /*  grid-template-columns: 1fr;*/
  /*}*/
}

@media (max-width: 720px) {
  .form-group {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .form-group > label {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }

  .form-group input,
.form-group select {
    width: min(260px, 100%);
  }

  #battery-dispatch-mode-section select {
    min-width: 0;
    width: min(100%, 360px);
  }

  .form-group .helper-text {
    flex-basis: 100%;
  }

  #tab-entsoe .entsoe-field-stack {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .optional-box .adv-hint {
    white-space: normal;
    margin-top: 2px;
  }

  #upload-own-profile {
    align-items: stretch;
  }

  #upload-own-profile .file-input-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #upload-own-profile .file-input-row .file-name {
    width: 100%;
    max-width: 100%;
  }

  #upload-own-profile .upload-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  #upload-profile-btn {
    min-width: 0;
    width: 100%;
  }

  #upload-own-profile #upload-result {
    flex: 1 1 auto;
    width: 100%;
  }
}


/* Analysis: controls layout */
#tab-analysis .analysis-controls,
#tab-analysis-residential .analysis-controls{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#tab-analysis .analysis-top-row,
#tab-analysis-residential .analysis-top-row{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-axis-row,
#tab-analysis-residential .analysis-axis-row{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-mini-group,
#tab-analysis-residential .analysis-mini-group{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#tab-analysis .analysis-mini-group > label,
#tab-analysis-residential .analysis-mini-group > label{
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  text-align: left;
  padding-right: 0;
}

#tab-analysis .analysis-select-wide,
#tab-analysis-residential .analysis-select-wide{
  width: 260px;
  min-width: 260px;
  text-align: left;
}

@media (max-width: 900px) {
  #tab-analysis .analysis-select-wide,
  #tab-analysis-residential .analysis-select-wide{
    width: 100%;
    min-width: 0;
  }
}

#tab-analysis .analysis-select-wider,
#tab-analysis-residential .analysis-select-wider{
  width: min(620px, 42vw);
  min-width: 360px;
  text-align: left;
}

@media (max-width: 900px) {
  #tab-analysis .analysis-select-wider,
  #tab-analysis-residential .analysis-select-wider{
    width: 100%;
    min-width: 0;
  }
}

/* Analysis: excel source selector */
#tab-analysis .analysis-source-row,
#tab-analysis-residential .analysis-source-row{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-radio-group,
#tab-analysis-residential .analysis-radio-group{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-radio,
#tab-analysis-residential .analysis-radio{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

#tab-analysis .analysis-existing-inline,
#tab-analysis-residential .analysis-existing-inline{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-existing-inline > label,
#tab-analysis-residential .analysis-existing-inline > label{
  font-weight: 600;
  white-space: nowrap;
}

#tab-analysis .analysis-neutral-btn,
#tab-analysis-residential .analysis-neutral-btn{
  background: #f5f5f5;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}

#tab-analysis .analysis-neutral-btn:hover,
#tab-analysis-residential .analysis-neutral-btn:hover{
  border-color: var(--primary);
}

/* Analysis: parameters sheet panel */
#tab-analysis .analysis-params-panel,
#tab-analysis-residential .analysis-params-panel{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  max-width: 1400px;
}

#tab-analysis .analysis-params-header,
#tab-analysis-residential .analysis-params-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#tab-analysis .analysis-params-filename,
#tab-analysis-residential .analysis-params-filename{
  color: #666;
  font-weight: 400;
  margin-left: 6px;
}

#tab-analysis .analysis-params-body,
#tab-analysis-residential .analysis-params-body{
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

#tab-analysis .analysis-param-group,
#tab-analysis-residential .analysis-param-group{
  margin: 0 0 14px;
}

#tab-analysis .analysis-param-group h4,
#tab-analysis-residential .analysis-param-group h4{
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
}

#tab-analysis table.analysis-params-table,
#tab-analysis-residential table.analysis-params-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#tab-analysis table.analysis-params-table th,
#tab-analysis table.analysis-params-table td,
#tab-analysis-residential table.analysis-params-table th,
#tab-analysis-residential table.analysis-params-table td{
  border: 1px solid #e5e5e5;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

#tab-analysis table.analysis-params-table th,
#tab-analysis-residential table.analysis-params-table th{
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}

/* Analysis: plot container */
#analysis-plot-wrap,
#analysis-res-plot-wrap,
#analysis-fixdyn-plot-wrap{
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

.analysis-plot-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

#analysis-plot-frame,
#analysis-res-plot-frame,
#analysis-fixdyn-plot-frame,
#analysis-scatter-frame,
#analysis-res-scatter-frame,
#analysis-fixdyn-scatter-frame{
  width: 100%;
  display: block;
  border: 1px solid #ddd;
  border-radius: 8px;

  /* responsive height, but not crazy */
  height: clamp(520px, 70vh, 950px);
}

@media (max-width: 1100px) {
  .analysis-plot-grid{
    grid-template-columns: 1fr;
  }
}

.analysis-plot-meta{
  margin: 0 0 8px 10px;
  font-size: 14px;
  line-height: 1.45;
}

.analysis-meta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  align-items: baseline;
}

.analysis-meta-item + .analysis-meta-item::before{
  content: "|";
  margin-right: 12px;
  color: #111;
}

.analysis-excel-source{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.analysis-radio{
  display: flex;
  align-items: center;
  gap: 10px;
}

#analysis-existing-excel-controls{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* label links moet bovenaan uitlijnen tov de 2 radio-rows */
#tab-analysis .analysis-source-row .analysis-mini-group,
#tab-analysis-residential .analysis-source-row .analysis-mini-group{
  align-items: flex-start;
}

/* 1 rij = radio + (optioneel) dropdown */
#tab-analysis .analysis-radio-row,
#tab-analysis-residential .analysis-radio-row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;            /* mobiel: dropdown mag naar volgende lijn */
}

#tab-analysis .analysis-radio,
#tab-analysis-residential .analysis-radio{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

#tab-analysis .analysis-existing-inline,
#tab-analysis-residential .analysis-existing-inline{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Analysis: excel source selector (stacked lines) */
#tab-analysis .analysis-source-row,
#tab-analysis-residential .analysis-source-row{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

#tab-analysis .analysis-source-line,
#tab-analysis-residential .analysis-source-line{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-radio-inline,
#tab-analysis-residential .analysis-radio-inline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

/* Analysis: two-excel compare controls */
#tab-analysis .analysis-controls,
#tab-analysis-residential .analysis-controls,
#tab-analysis-fixdyn .analysis-controls{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#tab-analysis .analysis-source-row,
#tab-analysis-residential .analysis-source-row,
#tab-analysis-fixdyn .analysis-source-row{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

#tab-analysis .analysis-source-line,
#tab-analysis-residential .analysis-source-line,
#tab-analysis-fixdyn .analysis-source-line{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-radio-inline,
#tab-analysis-residential .analysis-radio-inline,
#tab-analysis-fixdyn .analysis-radio-inline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

#tab-analysis .analysis-existing-source-line,
#tab-analysis-residential .analysis-existing-source-line,
#tab-analysis-fixdyn .analysis-existing-source-line{
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 1500px);
}

#tab-analysis .analysis-existing-header,
#tab-analysis-residential .analysis-existing-header,
#tab-analysis-fixdyn .analysis-existing-header{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

#tab-analysis .analysis-existing-inline,
#tab-analysis-residential .analysis-existing-inline,
#tab-analysis-fixdyn .analysis-existing-inline{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 1500px;
}

#tab-analysis .analysis-existing-file-row,
#tab-analysis-residential .analysis-existing-file-row,
#tab-analysis-fixdyn .analysis-existing-file-row{
  display: grid;
  grid-template-columns: 86px minmax(560px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}

#tab-analysis .analysis-existing-file-row > label,
#tab-analysis-residential .analysis-existing-file-row > label,
#tab-analysis-fixdyn .analysis-existing-file-row > label{
  font-weight: 600;
  white-space: nowrap;
}

#tab-analysis .analysis-existing-file-row .analysis-select-wider,
#tab-analysis-residential .analysis-existing-file-row .analysis-select-wider,
#tab-analysis-fixdyn .analysis-existing-file-row .analysis-select-wider{
  width: 100%;
  min-width: 0;
}

#tab-analysis .analysis-existing-actions-row,
#tab-analysis-residential .analysis-existing-actions-row,
#tab-analysis-fixdyn .analysis-existing-actions-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 86px;
}

#tab-analysis .analysis-neutral-btn,
#tab-analysis-residential .analysis-neutral-btn,
#tab-analysis-fixdyn .analysis-neutral-btn{
  background: #f5f5f5;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}

#tab-analysis .analysis-neutral-btn:hover,
#tab-analysis-residential .analysis-neutral-btn:hover,
#tab-analysis-fixdyn .analysis-neutral-btn:hover{
  border-color: var(--primary);
}

#tab-analysis .analysis-filename-help,
#tab-analysis-residential .analysis-filename-help,
#tab-analysis-fixdyn .analysis-filename-help{
  margin-top: 10px;
}

#tab-analysis .analysis-existing-header .analysis-filename-help,
#tab-analysis-residential .analysis-existing-header .analysis-filename-help,
#tab-analysis-fixdyn .analysis-existing-header .analysis-filename-help{
  margin-top: 0;
}

#tab-analysis .analysis-filename-help > summary,
#tab-analysis-residential .analysis-filename-help > summary,
#tab-analysis-fixdyn .analysis-filename-help > summary{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  list-style: none;
}

#tab-analysis .analysis-filename-help > summary::-webkit-details-marker,
#tab-analysis-residential .analysis-filename-help > summary::-webkit-details-marker,
#tab-analysis-fixdyn .analysis-filename-help > summary::-webkit-details-marker{
  display: none;
}

#tab-analysis .analysis-filename-help-body,
#tab-analysis-residential .analysis-filename-help-body,
#tab-analysis-fixdyn .analysis-filename-help-body{
  margin-top: 8px;
  max-width: 1120px;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f2a44;
  line-height: 1.45;
}

#tab-analysis .analysis-params-panel,
#tab-analysis-residential .analysis-params-panel,
#tab-analysis-fixdyn .analysis-params-panel{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  max-width: 1400px;
}

#tab-analysis .analysis-params-header,
#tab-analysis-residential .analysis-params-header,
#tab-analysis-fixdyn .analysis-params-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#tab-analysis .analysis-params-body,
#tab-analysis-residential .analysis-params-body,
#tab-analysis-fixdyn .analysis-params-body{
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

#tab-analysis table.analysis-params-table,
#tab-analysis-residential table.analysis-params-table,
#tab-analysis-fixdyn table.analysis-params-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#tab-analysis table.analysis-params-table th,
#tab-analysis table.analysis-params-table td,
#tab-analysis-residential table.analysis-params-table th,
#tab-analysis-residential table.analysis-params-table td,
#tab-analysis-fixdyn table.analysis-params-table th,
#tab-analysis-fixdyn table.analysis-params-table td{
  border: 1px solid #e5e5e5;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

#tab-analysis .analysis-profileset-inline,
#tab-analysis-residential .analysis-profileset-inline,
#tab-analysis-fixdyn .analysis-profileset-inline{
  align-items: center;
}

#tab-analysis .analysis-axis-row,
#tab-analysis-residential .analysis-axis-row,
#tab-analysis-fixdyn .analysis-axis-row{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

#tab-analysis .analysis-mini-group,
#tab-analysis-residential .analysis-mini-group,
#tab-analysis-fixdyn .analysis-mini-group{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#tab-analysis .analysis-mini-group > label,
#tab-analysis-residential .analysis-mini-group > label,
#tab-analysis-fixdyn .analysis-mini-group > label{
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  text-align: left;
  padding-right: 0;
}

#tab-analysis .analysis-select-wide,
#tab-analysis-residential .analysis-select-wide,
#tab-analysis-fixdyn .analysis-select-wide{
  width: 260px;
  min-width: 260px;
  text-align: left;
}

#tab-analysis .analysis-res-size-row,
#tab-analysis-residential .analysis-res-size-row,
#tab-analysis-fixdyn .analysis-res-size-row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  #tab-analysis .analysis-existing-file-row,
  #tab-analysis-residential .analysis-existing-file-row,
  #tab-analysis-fixdyn .analysis-existing-file-row{
    grid-template-columns: 1fr;
  }

  #tab-analysis .analysis-existing-actions-row,
  #tab-analysis-residential .analysis-existing-actions-row,
  #tab-analysis-fixdyn .analysis-existing-actions-row{
    padding-left: 0;
  }

  #tab-analysis .analysis-select-wide,
  #tab-analysis-residential .analysis-select-wide,
  #tab-analysis-fixdyn .analysis-select-wide{
    width: 100%;
    min-width: 0;
  }
}

/* Analysis: boxplots controls aligned with plots */
#tab-analysis .analysis-boxplot-row,
#tab-analysis-residential .analysis-boxplot-row,
#tab-analysis-fixdyn .analysis-boxplot-row{
  width: 100%;
  max-width: 1800px;
  margin: 6px auto 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}

/* stack label + select nicely, full width of the column */
#tab-analysis .analysis-boxplot-row .analysis-mini-group,
#tab-analysis-residential .analysis-boxplot-row .analysis-mini-group,
#tab-analysis-fixdyn .analysis-boxplot-row .analysis-mini-group{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

#tab-analysis .analysis-boxplot-row .analysis-mini-group > label,
#tab-analysis-residential .analysis-boxplot-row .analysis-mini-group > label,
#tab-analysis-fixdyn .analysis-boxplot-row .analysis-mini-group > label{
  width: auto;
  padding-right: 0;
  text-align: left;
}

/* override fixed 260px select width inside the row so it matches the plot column */
#tab-analysis .analysis-boxplot-row .analysis-select-wide,
#tab-analysis-residential .analysis-boxplot-row .analysis-select-wide,
#tab-analysis-fixdyn .analysis-boxplot-row .analysis-select-wide{
  width: 100%;
  min-width: 0;
  text-align: left;
}

/* keep plots grid */
#tab-analysis .analysis-boxplots-wrap,
#tab-analysis-residential .analysis-boxplots-wrap,
#tab-analysis-fixdyn .analysis-boxplots-wrap{
  width: 100%;
  max-width: 1800px;
  margin: 12px auto 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

/* responsive: stack on smaller screens */
@media (max-width: 900px) {
  #tab-analysis .analysis-boxplot-row,
  #tab-analysis-residential .analysis-boxplot-row,
  #tab-analysis-fixdyn .analysis-boxplot-row{
    grid-template-columns: 1fr;
  }
  #tab-analysis .analysis-boxplots-wrap,
  #tab-analysis-residential .analysis-boxplots-wrap,
  #tab-analysis-fixdyn .analysis-boxplots-wrap{
    grid-template-columns: 1fr;
  }
}

#tab-analysis .analysis-boxplot,
#tab-analysis-residential .analysis-boxplot,
#tab-analysis-fixdyn .analysis-boxplot{
  margin: 0;
  padding: 10px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
}

#tab-analysis .analysis-boxplot img,
#tab-analysis-residential .analysis-boxplot img,
#tab-analysis-fixdyn .analysis-boxplot img{
  width: 100%;
  height: auto;
  max-height: 620px;     /* allow taller boxplot */
  object-fit: contain;   /* keep aspect ratio */
  display: block;
}

#tab-analysis .analysis-boxplot iframe,
#tab-analysis-residential .analysis-boxplot iframe,
#tab-analysis-fixdyn .analysis-boxplot iframe{
  width: 100%;
  height: clamp(320px, 46vh, 560px);
  display: block;
  border: 0;
}

#tab-analysis .analysis-boxplot figcaption,
#tab-analysis-residential .analysis-boxplot figcaption,
#tab-analysis-fixdyn .analysis-boxplot figcaption{
  margin-top: 6px;
  font-size: 1.0rem;     /* bigger caption */
  color: #444;
  word-break: break-word;
}

#tab-analysis .analysis-boxplot img + img,
#tab-analysis-residential .analysis-boxplot img + img,
#tab-analysis-fixdyn .analysis-boxplot img + img{
  margin-top: 10px;
}

/* Analysis: download Excel button */
#analysis-download-excel,
#analysis-res-download-excel {
  margin-left: 8px;
}

.spinner-progress-wrap { margin-top: 10px; width: 260px; }
.spinner-pct { text-align: right; font-size: 13px; opacity: 0.9; margin-bottom: 6px; }

.spinner-bar { width: 100%; height: 8px; background: #dbe5ef; border-radius: 999px; overflow: hidden; }
.spinner-bar-fill { height: 100%; width: 0%; background: #2563eb; border-radius: 999px; transition: width 200ms linear; }
.spinner-cancel { margin-top: 16px; padding: 8px 18px; color: #1e3a5f; background: #fff; border: 1px solid #9cabbc; border-radius: 6px; cursor: pointer; }
.spinner-cancel:disabled { opacity: .65; cursor: wait; }
.spinner-cancel-status { margin: 12px 0 0; max-width: 440px; color: #8a3100; font-size: .9rem; }
.spinner-cancel[hidden], .spinner-cancel-status[hidden] { display: none; }

/* optioneel: als je geen % hebt -> indeterminate */
.spinner-bar.indeterminate .spinner-bar-fill {
  width: 35%;
  animation: indet 1s infinite linear;
}
@keyframes indet {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ==================== Fluvius Profiles tab ==================== */
#tab-fluvius-profiles .fluvius-controls{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 14px 0;
}

#tab-fluvius-profiles .fluvius-refresh-wrap{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#tab-fluvius-profiles .fluvius-refresh-wrap[hidden]{
  display: none !important;
}

#tab-fluvius-profiles .fluvius-refresh-note{
  font-size: 11px;
  color: #666;
  line-height: 1.15;
  max-width: 240px;
}

#tab-fluvius-profiles .fluvius-select{
  min-width: 180px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#tab-fluvius-profiles .fluvius-table{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#tab-fluvius-profiles .fluvius-download-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 14px 0;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f8fafc;
}

#tab-fluvius-profiles .fluvius-download-controls p {
  flex-basis: 100%;
  margin: 0;
}

#tab-fluvius-profiles #fluvius_profile_download {
  max-width: 100%;
}

#tab-fluvius-profiles #fluvius-download-csv {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  background: #00558c;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

#tab-fluvius-profiles #fluvius-download-csv:focus-visible {
  outline: 2px solid #00558c;
  outline-offset: 3px;
}

#tab-fluvius-profiles #fluvius-download-csv[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

#tab-fluvius-profiles .fluvius-select-profile {
  margin-top: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#tab-fluvius-profiles .fluvius-row.is-selected {
  border-color: #006b80;
  box-shadow: inset 0 0 0 1px #006b80;
  background: #f0fafc;
}

#tab-fluvius-profiles .fluvius-row{
  display:grid;
  grid-template-columns: minmax(90px, 140px) 220px 1fr 1fr 1fr 1fr;
  gap:10px;
  align-items:start;
  padding:10px;
  border:1px solid #e0e0e0;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}

@media (max-width: 1200px){
  #tab-fluvius-profiles .fluvius-row{
    grid-template-columns: minmax(90px, 140px) 200px 1fr 1fr;
    grid-auto-rows: auto;
  }
}

@media (max-width: 780px){
  #tab-fluvius-profiles .fluvius-row{
    grid-template-columns: 1fr;
  }
}

#tab-fluvius-profiles .fluvius-cell-title{
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

#tab-fluvius-profiles .fluvius-metrics{
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}

#tab-fluvius-profiles .fluvius-metrics .k{
  color:#333;
}
#tab-fluvius-profiles .fluvius-metrics .v{
  color:#111;
  font-weight: 600;
}

#tab-fluvius-profiles .fluvius-thumb{
  width: 100%;
  height: 150px;
  object-fit: contain;
  border:1px solid #eee;
  border-radius: 8px;
  background:#fafafa;
}

#tab-fluvius-profiles .fluvius-thumbwrap{
  display:flex;
  flex-direction:column;
}

#tab-fluvius-profiles .fluvius-loading{
  padding:10px;
  border:1px dashed #bbb;
  border-radius:10px;
  color:#555;
}


/* Fluvius Profiles: show original profilenr under the current nr */
.fluvius-profile-sub {
  font-size: 11px;
  color: #555;
  margin-top: 2px;
}

#tab-fluvius-profiles .fluvius-profilenr{
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

#tab-fluvius-profiles .fluvius-profilenr-other{
  font-size: 12px;
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#tab-fluvius-profiles #fluvius-cancel-build{
  display: none;
}


/* ==================== ENTSO-e tab ==================== */
#tab-entsoe .entsoe-controls{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 14px 0;
}

#tab-entsoe .entsoe-form-group{
  align-items: flex-start;
}

#tab-entsoe .entsoe-select{
  min-width: 320px;
  width: 420px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
}

#tab-entsoe .entsoe-inline-group input{
  width: 280px;
}

#tab-entsoe .entsoe-actions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

#tab-entsoe .entsoe-plot-wrap{
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 12px;
}

#elia-generation-plot-wrap {
  position: relative;
}

#tab-entsoe .entsoe-plot{
  width: 100%;
  min-height: 520px;
}

#tab-entsoe .entsoe-summary-wrap{
  margin-top: 18px;
}

#tab-entsoe .entsoe-summary-table-wrap{
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 10px;
}

#tab-entsoe .entsoe-summary-table{
  min-width: 760px;
}

.entsoe-summary-table th.num,
.entsoe-summary-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.entsoe-summary-table .entsoe-summary-emphasis {
  font-weight: 700;
}

.entsoe-summary-table th:first-child,
.entsoe-summary-table td:first-child {
  text-align: left;
}

#tab-entsoe .entsoe-empty{
  padding: 14px;
  border: 1px dashed #bbb;
  border-radius: 10px;
  color: #555;
  background: #fafafa;
}

#tab-entsoe .entsoe-date-nav{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 100%;
}

#tab-entsoe .entsoe-date-nav input{
  width: 280px;
}

#tab-entsoe .entsoe-date-nav button{
  min-width: 42px;
  height: 38px;
  padding: 0 10px;
  font-size: 1rem;
  line-height: 1;
}

#tab-entsoe .entsoe-date-nav button:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

#tab-entsoe .entsoe-inline-group{
  flex-wrap: wrap;
}

#tab-entsoe .entsoe-quick-range{
  flex-basis: 100%;
  margin-left: calc(var(--label-col) + 10px);
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#tab-entsoe .entsoe-quick-range button{
  padding:4px 10px;
  font-size:0.85rem;
}

#tab-entsoe .entsoe-select,
#tab-entsoe .entsoe-select option{
  text-align: left;
}

#tab-entsoe .entsoe-panels {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

#tab-entsoe .entsoe-panel {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 14px 16px;
}

#tab-entsoe .entsoe-panel-title {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: #111827;
}

#tab-entsoe .entsoe-panel-intro {
  margin: 0 0 10px 0;
}

#tab-entsoe .entsoe-actions-prices,
#tab-entsoe .entsoe-actions-generation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  justify-content: flex-start;
}

#tab-entsoe .entsoe-actions-generation {
  margin-top: 4px;
}

#tab-entsoe .entsoe-action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

#tab-entsoe .entsoe-action-status {
  display: block;
  width: 100%;
  margin-left: 0;
}

#tab-entsoe .entsoe-graphs-below {
  display: block;
  width: 100%;
  margin: 0;
  color: #1f6b44;
  font-size: 0.9em;
  font-weight: 600;
}

#tab-entsoe .entsoe-action-status.is-missing-observations::after {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 6px;
  border: 1px solid #b07a18;
  border-radius: 999px;
  color: #7a5513;
  background: #fff8e8;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: text-bottom;
  cursor: help;
}

#tab-entsoe .entsoe-aggregation-method {
  width: 100%;
}

#tab-entsoe .entsoe-aggregation-method > label {
  display: block;
  margin-bottom: 4px;
}

#tab-entsoe .entsoe-aggregation-method > select {
  width: 100%;
}

#tab-entsoe .entsoe-info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #bfc6d1;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  color: #4b5563;
  background: #f8fafc;
  cursor: help;
  user-select: none;
}

#tab-entsoe .entsoe-inline-group-with-action {
  align-items: flex-start;
}

#tab-entsoe .entsoe-field-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 420px;
  max-width: 100%;
}

#tab-entsoe .entsoe-field-stack > input,
#tab-entsoe .entsoe-field-stack > select {
  width: 100%;
  max-width: 100%;
}

#tab-entsoe .entsoe-load-note {
  flex: 1 0 100%;
  margin-top: -2px;
}

/* --- df_profilenr: sticky header + sticky first column --- */
.profilenr-table-wrap{
  overflow: auto;
  max-height: 70vh;   /* pas aan naar smaak */
}

/* belangrijk: sticky werkt betrouwbaarder met separate */
.profilenr-table-wrap table{
  border-collapse: separate;
  border-spacing: 0;
}

/* sticky header */
.profilenr-table-wrap thead th{
  position: sticky;
  top: 0;
  z-index: 3;
}

/* sticky index column (pandas zet index meestal als <th> in tbody) */
.profilenr-table-wrap tbody th{
  position: sticky;
  left: 0;
  z-index: 2;
}

/* top-left corner cell moet boven alles */
.profilenr-table-wrap thead th:first-child{
  left: 0;
  z-index: 4;
}

.download-actions{
  margin: 8px 0 10px 0;
}

.download-link{
  font-size: 0.92rem;
  text-decoration: underline;
  opacity: 0.85;
}

.download-link:hover{
  opacity: 1;
}

#generation-plot-title {
  font-weight: normal;
  text-align: center;
}

.generation-legend-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 0;
  font-size: 0.86rem;
  position: absolute;
  top: var(--generation-controls-top, 620px);
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
}

.generation-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.generation-legend-toggle span {
  font-weight: 600;
}

.generation-legend-toggle input {
  margin: 0;
}

/* ==================== RESIDENTIAL GUIDE ==================== */
#tab-guided {
  padding: 8px 0 18px 0;
}

.residential-shell {
  display: grid;
  /* Wide result tables must scroll inside their own wrapper, not size the guide. */
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 18px;
}

.residential-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 26px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86) 48%, rgba(240, 249, 255, 0.98) 100%),
    linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.residential-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.residential-hero-copy h2 {
  margin: 12px 0 10px 0;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2.2rem);
  line-height: 1.1;
}

.residential-hero-copy p {
  color: #475569;
  max-width: none;
}

.residential-progress {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  margin: -4px -10px 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(246, 247, 251, 0.96);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

/* Own both colours in every interaction state: the KU Leuven theme also
   styles button:hover/focus, which must not mix with our step text colours. */
.residential-progress-step,
.residential-progress-step:hover,
.residential-progress-step:focus,
.residential-progress-step:active {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 58px;
  padding: 9px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  font: inherit;
  font-size: 1rem;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.residential-progress-step > span:not(.residential-progress-index) {
  min-width: 0;
  white-space: normal;
  hyphens: auto;
  font-weight: 700;
}

.residential-progress-step:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.residential-progress-step.is-complete {
  color: #14532d;
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.96));
}

.residential-progress-step.is-missing {
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.42);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(255, 255, 255, 0.96));
}

/* Active wins over complete/missing; the numbered badge retains that status. */
.residential-progress-step.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.residential-progress-index {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  flex: 0 0 25px;
}

.residential-progress-step.is-active .residential-progress-index {
  background: #2563eb;
  color: #fff;
}

.residential-progress-step.is-complete .residential-progress-index {
  background: #16a34a;
  color: #fff;
}

.residential-progress-step.is-missing .residential-progress-index {
  background: #dc2626;
  color: #fff;
}

.residential-wizard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 16px;
}

.residential-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.residential-step-header {
  display: grid;
  gap: 6px;
}

.residential-step-header-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.residential-step-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.residential-step-nav .filelike-button {
  min-height: 36px;
  padding: 7px 12px;
}

.residential-step-kicker {
  color: #2563eb;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.residential-step-header p,
.residential-inline-help,
.residential-choice-card span,
.residential-status,
.residential-review-line span:last-child {
  color: #64748b;
}

.residential-hover-help {
  position: relative;
  display: inline-flex;
  color: #1d4ed8;
  font-weight: 700;
  border-bottom: 1px dotted rgba(37, 99, 235, 0.6);
  cursor: help;
}

.residential-hover-help:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 3px;
  border-radius: 6px;
}

.residential-hover-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(560px, 88vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 10000;
}

.residential-hover-tooltip a {
  color: #bfdbfe;
  font-weight: 700;
}

.viewport-help-tooltip {
  position: fixed;
  z-index: 20000;
  width: max-content;
  max-width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.viewport-help-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.viewport-help-tooltip a {
  color: #bfdbfe;
  font-weight: 700;
}

.residential-creg-history {
  display: block;
  margin: 8px 0;
  font-size: 0.8rem;
}

.residential-creg-history-row {
  display: grid;
  grid-template-columns: minmax(66px, 1fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 3px 0;
}

.residential-creg-history-row > :not(:first-child) {
  text-align: right;
}

.residential-creg-history-row [role="columnheader"] {
  font-weight: 700;
}

body.viewport-tooltips-enabled .helper-text.helper-icon::after,
body.viewport-tooltips-enabled .residential-info-icon::after,
body.viewport-tooltips-enabled .residential-npv-term::after {
  content: none;
  display: none;
}

body.viewport-tooltips-enabled .residential-hover-tooltip {
  display: none !important;
}

.residential-hover-help:hover .residential-hover-tooltip,
.residential-hover-help:focus .residential-hover-tooltip,
.residential-hover-help:focus-within .residential-hover-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.residential-hover-help:hover,
.residential-hover-help:focus,
.residential-hover-help:focus-within {
  z-index: 9999;
}

.residential-info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  flex: 0 0 18px;
  vertical-align: middle;
}

.residential-info-icon::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: min(360px, 84vw);
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 10001;
}

.residential-info-icon--wide::after {
  left: auto;
  right: 0;
  width: min(560px, 88vw);
}

.residential-info-icon:hover::after,
.residential-info-icon:focus::after,
.residential-info-icon:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.residential-info-icon:hover,
.residential-info-icon:focus,
.residential-info-icon:focus-within {
  z-index: 10000;
}

.residential-field:has(.residential-info-icon:hover),
.residential-field:has(.residential-info-icon:focus),
.residential-field:has(.residential-info-icon:focus-within),
.residential-location-card:has(.residential-info-icon:hover),
.residential-location-card:has(.residential-info-icon:focus),
.residential-location-card:has(.residential-info-icon:focus-within),
.residential-tariff-help-row:has(.residential-info-icon:hover),
.residential-tariff-help-row:has(.residential-info-icon:focus),
.residential-tariff-help-row:has(.residential-info-icon:focus-within) {
  position: relative;
  z-index: 1000;
}

.residential-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.residential-choice-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.residential-choice-grid--tight {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.residential-choice-grid.residential-choice-grid--pv-size {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.residential-choice-grid--pv-size .residential-choice-card {
  min-height: 126px;
  padding: 14px 12px;
}

.residential-choice-card {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: center;
  min-height: 138px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.98));
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  -webkit-user-select: none;
  user-select: none;
}

.residential-choice-card:hover {
  z-index: 10;
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.48);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.13);
}

.residential-choice-card:has(.residential-info-icon:hover),
.residential-choice-card:has(.residential-info-icon:focus),
.residential-choice-card:focus-within {
  z-index: 1000;
}

.residential-choice-card > input[type="radio"],
.residential-choice-card > input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.residential-choice-card:has(> input[type="radio"]:focus-visible),
.residential-choice-card:has(> input[type="checkbox"]:focus-visible) {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 3px;
}

.residential-choice-card:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.72);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(239, 246, 255, 0.98));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.residential-choice-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.residential-choice-card.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.residential-choice-card strong {
  color: #0f172a;
  font-size: 1rem;
}

.residential-choice-parenthetical {
  display: inline-block;
  font-size: 0.88em;
  font-weight: 600;
}

.residential-choice-card.is-professional-context .residential-choice-title {
  color: #475569;
  font-weight: 500;
}

.residential-choice-card.is-professional-context .residential-choice-title strong {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

#residential-fluvius-data-mode-branch .residential-choice-card,
#res-upload-mode-row .residential-choice-card {
  min-height: 102px;
  padding-inline: 24px 46px;
}

#residential-fluvius-data-mode-branch .residential-choice-title,
#res-upload-mode-row .residential-choice-title {
  max-width: 24ch;
  line-height: 1.28;
}

#res-upload-mode-row .residential-choice-card > strong,
#res-upload-mode-row .residential-choice-title strong {
  max-width: 24ch;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.28;
}

.residential-start-mode-branch {
  padding: 18px 20px;
  border: 2px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.residential-start-mode-branch .residential-choice-card {
  min-height: 82px;
}

.residential-branch.residential-quick-actions {
  gap: 14px;
  padding: 20px 22px;
  scroll-margin-top: 96px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 30%);
  border: 3px solid rgba(37, 99, 235, 0.42);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.10);
}

.residential-branch.residential-quick-actions.is-professional-context {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.58), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(100, 116, 139, 0.05), transparent 30%);
  border-color: rgba(100, 116, 139, 0.24);
  box-shadow: 0 12px 28px rgba(100, 116, 139, 0.08);
}

.residential-branch.residential-quick-actions.is-professional-context .residential-quick-title,
.residential-branch.residential-quick-actions.is-professional-context .residential-quick-title-note {
  color: #475569;
}

.residential-branch.residential-quick-actions.is-professional-context .residential-hover-help,
.residential-branch.residential-quick-actions.is-professional-context .residential-npv-term {
  color: #475569;
  border-bottom-color: rgba(71, 85, 105, 0.55);
}

.residential-branch.residential-quick-actions.is-professional-context .residential-quick-action-section {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(100, 116, 139, 0.2);
}

.residential-branch.residential-quick-actions.is-professional-context .residential-quick-action {
  color: #475569;
  background: rgba(100, 116, 139, 0.13);
  border-color: rgba(100, 116, 139, 0.24);
  box-shadow: none;
}

.residential-branch.residential-quick-actions.is-professional-context .residential-quick-action:hover,
.residential-branch.residential-quick-actions.is-professional-context .residential-quick-action:focus-visible {
  color: #334155;
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.36);
  box-shadow: 0 8px 18px rgba(100, 116, 139, 0.08);
}

.residential-quick-actions > .residential-branch-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  font-size: 1.08rem;
}

.residential-quick-title {
  font-size: 1.16rem;
  font-weight: 800;
}

.residential-quick-title-note {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 500;
}

.residential-quick-actions .residential-branch-title-note {
  color: #334155;
  font-size: 0.94rem;
  font-weight: 500;
}

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

.residential-quick-action-grid--columns {
  align-items: stretch;
  gap: 16px;
}

.residential-quick-action-section {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.residential-quick-action-section-title {
  display: block;
  margin: 0;
  color: #0f172a;
  font-family: var(--font-main), Arial, sans-serif;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.residential-quick-action-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.residential-quick-action {
  position: relative;
  display: block;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 730;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  cursor: pointer;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.residential-quick-action-section--plugin .residential-quick-action {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

#residential-step1-quick-actions:not(.is-step1-quick-context) .residential-quick-action {
  color: #475569;
  background: rgba(100, 116, 139, 0.13);
  border-color: rgba(100, 116, 139, 0.24);
  box-shadow: none;
}

.residential-quick-action:hover,
.residential-quick-action:focus-visible {
  z-index: 1000;
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  outline: none;
}

.residential-quick-action-section--plugin .residential-quick-action:hover,
.residential-quick-action-section--plugin .residential-quick-action:focus-visible {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

#residential-step1-quick-actions:not(.is-step1-quick-context) .residential-quick-action:hover,
#residential-step1-quick-actions:not(.is-step1-quick-context) .residential-quick-action:focus-visible {
  color: #334155;
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.36);
  box-shadow: 0 8px 18px rgba(100, 116, 139, 0.08);
}

.residential-quick-action--neutral {
  grid-column: 1 / -1;
  min-height: 54px;
  border-color: var(--primary);
  background: var(--primary);
  text-align: center;
}

.residential-step1-quick-entry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}

.residential-step1-quick-entry[hidden] {
  display: none;
}

.residential-step1-quick-entry .residential-quick-action {
  min-height: 58px;
}

.residential-npv-term {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted currentColor;
  color: #1d4ed8;
  cursor: help;
}

.residential-npv-term::after {
  content: attr(data-help);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(560px, 84vw);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #0f172a;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 10001;
}

.residential-npv-term:hover::after,
.residential-npv-term:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.residential-branch-title-note {
  color: #334155;
  font-weight: 500;
}

.residential-choice-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

.residential-choice-title strong {
  min-width: 0;
}

.residential-choice-card--mini {
  min-height: 116px;
}

.residential-roof-choice-grid .residential-choice-card {
  min-height: 124px;
}

.residential-custom-direction-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(240px, 1fr);
  gap: 16px;
  align-items: center;
}

.residential-manual-direction-card {
  align-content: center;
  min-height: 220px;
}

.residential-compass {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  grid-template-rows: repeat(3, minmax(72px, 1fr));
  gap: 10px;
  max-width: 540px;
  margin: 2px auto 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98)),
    conic-gradient(from 180deg, rgba(15, 118, 110, 0.12), rgba(245, 158, 11, 0.12), rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.12));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  overflow: visible;
}

.residential-compass--azimuth {
  width: min(420px, 100%);
  aspect-ratio: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(37, 99, 235, 0.14) calc(50% - 1px), rgba(37, 99, 235, 0.14) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(37, 99, 235, 0.14) calc(50% - 1px), rgba(37, 99, 235, 0.14) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at center, rgba(219, 234, 254, 0.92) 0 23%, rgba(255, 255, 255, 0.98) 24% 54%, rgba(240, 253, 250, 0.96) 55% 100%);
}

.residential-compass-option,
.residential-compass-center {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  border-radius: 18px;
  text-align: center;
}

.residential-compass-option {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.residential-compass--azimuth .residential-compass-option,
.residential-compass--azimuth .residential-compass-center {
  z-index: 1;
  border-radius: 999px;
}

.residential-compass-option:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.residential-compass-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.residential-compass-option span {
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.residential-compass-option small,
.residential-compass-center small {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
}

.residential-compass-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.46);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(240, 253, 250, 0.96));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
}

.residential-compass-option.is-opposite {
  border-color: rgba(15, 118, 110, 0.44);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
}

.residential-compass-option:has(input:checked)::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  pointer-events: none;
}

.residential-compass-option.is-opposite::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 118, 110, 0.38);
  pointer-events: none;
}

.residential-compass-center {
  grid-column: 2;
  grid-row: 2;
  border: 1px dashed rgba(100, 116, 139, 0.24);
  background: rgba(248, 250, 252, 0.72);
}

.residential-compass-center strong {
  color: #0f172a;
  font-size: 0.88rem;
}

.residential-compass-option--n {
  grid-column: 2;
  grid-row: 1;
}

.residential-compass-option--ne {
  grid-column: 3;
  grid-row: 1;
}

.residential-compass-option--e {
  grid-column: 3;
  grid-row: 2;
}

.residential-compass-option--se {
  grid-column: 3;
  grid-row: 3;
}

.residential-compass-option--s {
  grid-column: 2;
  grid-row: 3;
}

.residential-compass-option--sw {
  grid-column: 1;
  grid-row: 3;
}

.residential-compass-option--w {
  grid-column: 1;
  grid-row: 2;
}

.residential-compass-option--nw {
  grid-column: 1;
  grid-row: 1;
}

.residential-choice-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.residential-choice-tag--soft {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}

.residential-branch {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.residential-branch-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f172a;
  font-weight: 800;
}

.residential-instructions-details {
  display: grid;
  gap: 12px;
}

.residential-instructions-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08);
  cursor: pointer;
  color: #1d4ed8;
  font-size: 1rem;
  font-weight: 800;
  list-style: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.residential-instructions-summary:hover {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.13);
  transform: translateY(-1px);
}

.residential-instructions-summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.residential-instructions-summary::-webkit-details-marker {
  display: none;
}

.residential-disclosure-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.residential-instructions-details[open] .residential-disclosure-arrow {
  transform: rotate(45deg);
}

.residential-instructions-body {
  display: grid;
  gap: 12px;
}

.residential-list {
  margin-left: 18px;
  color: #475569;
}

.residential-list li + li {
  margin-top: 8px;
}

.residential-fluvius-guide {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fluvius-guide;
}

.residential-fluvius-guide li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #334155;
  counter-increment: fluvius-guide;
}

.residential-fluvius-guide li::before {
  content: counter(fluvius-guide);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.residential-fluvius-step-text {
  min-width: 0;
  line-height: 1.45;
}

.residential-shot-preview {
  position: relative;
  justify-self: end;
}

.residential-shot-trigger {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
  cursor: help;
}

.residential-shot-trigger:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.residential-shot-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(760px, 88vw);
  min-height: 360px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 90;
}

.residential-shot-popover img {
  display: block;
  width: 100%;
  max-height: min(620px, 74vh);
  object-fit: contain;
  border-radius: 12px;
}

.residential-shot-fallback {
  display: none;
  place-items: center;
  min-height: 340px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: #475569;
  font-size: 0.95rem;
  text-align: center;
}

.residential-shot-popover.is-missing .residential-shot-fallback {
  display: grid;
}

.residential-shot-preview:hover .residential-shot-popover,
.residential-shot-preview:focus-within .residential-shot-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.residential-upload-card {
  display: grid;
  gap: 14px;
}

.residential-disclaimer {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #78350f;
}

.residential-disclaimer p {
  margin: 0;
  color: #92400e;
}

.residential-research-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.72), transparent 34%),
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.residential-research-card h4,
.residential-research-card h5 {
  margin: 0;
  color: #0f172a;
}

.residential-research-fields {
  display: grid;
  gap: 14px;
}

.residential-research-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.residential-research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.residential-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.residential-pill-row label,
.residential-checkline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #475569;
  font-weight: 600;
}

.residential-pill-row label {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.86);
}

.residential-field {
  display: grid;
  gap: 8px;
}

.residential-field-nested {
  display: grid;
  gap: 6px;
}

.residential-field--inline {
  min-width: min(210px, 100%);
}

.residential-field--checkbox {
  align-content: center;
}

.residential-field--checkbox .residential-checkline {
  min-height: 46px;
}

.residential-field label {
  font-weight: 600;
  color: #0f172a;
}

.residential-field input[type="text"],
.residential-field input[type="search"],
.residential-field input[type="number"],
.residential-field input[type="file"],
.residential-field select,
.residential-inline-row input[type="text"],
.residential-inline-row input[type="search"],
.residential-inline-row input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  line-height: 1.2;
}

.residential-field input:focus-visible,
.residential-field select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.45);
}

.residential-field input[aria-invalid="true"] {
  border-color: rgba(185, 28, 28, 0.68);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.residential-field input:disabled,
.residential-field select:disabled,
.residential-inline-row input:disabled {
  color: #64748b;
  background: rgba(241, 245, 249, 0.88);
  cursor: not-allowed;
}

.residential-inline-help--notice {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #1e40af;
}

.residential-inline-help--warning {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(254, 243, 199, 0.66);
  border: 1px solid rgba(217, 119, 6, 0.24);
  color: #92400e;
}

.residential-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.residential-inline-row--compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.residential-inline-row--with-help > .residential-inline-help {
  grid-column: 1 / -1;
}

.residential-inline-row--paired {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  align-items: start;
}

.residential-inline-row--paired .residential-field--inline {
  align-content: start;
  min-width: 0;
}

.residential-inline-row--balanced {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.residential-tariff-help-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.residential-tariff-amount-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.residential-tariff-amount-mode legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
}

.residential-tariff-amount-mode label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.residential-tariff-amount-mode .residential-inline-help {
  flex-basis: 100%;
  margin: 0;
}

.residential-tariff-vat-rate-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.residential-tariff-vat-rate-control input {
  width: 90px;
}

.residential-tariff-vat-rate-control input[aria-invalid="true"] {
  border-color: #b91c1c;
}

.residential-tariff-amount-mode .residential-tariff-vat-error {
  color: #b91c1c;
}

.residential-tariff-help-row .residential-inline-help {
  margin: 0;
  flex: 1 1 auto;
}

.residential-tariff-help-row .filelike-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.residential-vnr-forward {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.residential-vnr-forward .residential-field {
  min-width: 0;
}

.residential-vnr-forward select {
  width: 100%;
  min-width: 0;
}

.residential-vnr-forward > .residential-inline-help {
  grid-column: 1 / -1;
  margin: 0;
}

.residential-vnr-source-link {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: 0.82rem;
}

.residential-vnr-injection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  margin: 12px 0 14px;
}

.residential-vnr-injection > .residential-inline-help {
  margin: 0;
}

@media (max-width: 700px) {
  .residential-vnr-forward {
    grid-template-columns: minmax(0, 1fr);
  }

  .residential-vnr-injection {
    grid-template-columns: minmax(0, 1fr);
  }

  .residential-vnr-forward .filelike-button {
    justify-self: start;
  }

  .residential-vnr-injection .filelike-button {
    justify-self: start;
  }
}

.residential-tariff-fields {
  display: grid;
  gap: 16px;
}

.residential-grid-detail-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.residential-grid-area-field {
  min-width: 0;
}

#residential-location-entry:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  align-items: end;
  gap: 12px;
}

.residential-step-location-field {
  position: relative;
}

.residential-location-suggestions {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(360px, 62vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.residential-location-suggestions[hidden] {
  display: none;
}

.residential-location-suggestion {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.residential-location-suggestion:hover,
.residential-location-suggestion.is-active,
.residential-location-suggestion[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.1);
}

.residential-location-suggestion strong {
  font-weight: 750;
}

.residential-location-suggestion span {
  color: #475569;
  font-size: 0.88rem;
}

.residential-grid-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.residential-detail-toggle {
  min-height: 46px;
  align-self: end;
  white-space: nowrap;
}

.residential-pv-advanced-card {
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.78), rgba(255, 255, 255, 0.96));
}

.residential-advanced-card {
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.78), rgba(255, 255, 255, 0.96));
}

.residential-pv-advanced-params,
.residential-advanced-params {
  display: grid;
  gap: 14px;
}

.residential-pv-advanced-toolbar,
.residential-advanced-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.residential-pv-advanced-grid,
.residential-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.residential-advanced-grid--narrow {
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
}

.residential-grid-detail-costs {
  padding-top: 4px;
}

.residential-battery-advanced-card {
  margin-top: 2px;
}

.residential-option-panel {
  margin-top: 12px;
}

.residential-financial-advanced-params {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
}

.residential-pv-advanced-grid .residential-field label,
.residential-advanced-grid .residential-field label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 2.8em;
}

.residential-ems-grid {
  --res-ems-label-height: 4.45em;
  align-items: stretch;
}

.residential-ev-charging-grid {
  --res-ev-label-height: 3.2em;
  align-items: stretch;
}

.residential-ev-charging-grid .residential-field {
  min-width: 0;
  align-content: start;
  grid-template-rows: var(--res-ev-label-height) minmax(46px, auto);
}

.residential-ev-charging-grid .residential-field label {
  display: flex;
  align-items: flex-start;
  min-height: 0;
  line-height: 1.28;
}

.residential-ev-charging-grid .residential-field--checkbox {
  grid-column: 1 / -1;
  grid-template-rows: none;
  justify-items: start;
}

.residential-ev-charging-grid .residential-field--checkbox .residential-checkline {
  align-items: center;
  min-height: 0;
}

.residential-ems-grid .residential-field {
  min-width: 0;
  align-content: start;
  grid-template-rows: var(--res-ems-label-height) minmax(46px, auto);
}

.residential-ems-grid .residential-field label {
  display: flex;
  align-items: flex-start;
  min-height: 0;
  line-height: 1.28;
}

.residential-ems-grid .residential-field--checkbox .residential-checkline {
  grid-row: 2;
  align-self: start;
  align-items: center;
  min-height: 46px;
}

.residential-ems-curtail-option {
  margin-top: 4px;
}

.residential-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.residential-status {
  min-height: 1.4em;
  padding: 2px 0;
}

#residential-submit-status:empty {
  display: none;
}

.residential-status.is-error {
  color: #b91c1c;
}

.residential-status.is-success {
  color: #166534;
}

.residential-status.is-warning {
  color: #9a3412;
}

.residential-profile-period-chart {
  width: 100%;
  margin-top: 8px;
  padding: 10px 10px 6px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: #fff;
}

.residential-profile-period-chart.is-dragging-period {
  cursor: grabbing;
}

.residential-period-nudge {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 4px 0 6px;
}

.residential-icon-button {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-radius: 6px;
  background: #fff;
  color: var(--color-blue, #00558c);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.residential-icon-button:hover:not(:disabled),
.residential-icon-button:focus-visible:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(37, 99, 235, 0.08);
}

.residential-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.residential-profile-period-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
}

.residential-nav {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(0, 2fr) minmax(82px, 1fr);
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.residential-nav button[data-res-step-prev] {
  grid-column: 1;
  justify-self: start;
}

.residential-nav button[data-res-step-next] {
  grid-column: 3;
  justify-self: end;
}

.residential-nav .filelike-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.92rem;
}

.residential-step-status {
  grid-column: 2;
  justify-self: center;
  max-width: min(760px, 100%);
  margin: 0;
  text-align: center;
}

.residential-step-status:empty {
  display: none;
}

.residential-nav .filelike-button[data-res-step-next].is-ready {
  color: #fff;
  background: #16a34a;
  border-color: #15803d;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.18);
}

.residential-nav .filelike-button[data-res-step-next].is-ready:hover,
.residential-nav .filelike-button[data-res-step-next].is-ready:focus-visible {
  color: #fff;
  background: #15803d;
  border-color: #166534;
}

.residential-step.is-active > .residential-nav {
  position: sticky;
  bottom: 0;
  z-index: 25;
  padding: 8px 10px;
  margin: 6px -4px -4px -4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(10px);
}

.residential-run-top {
  display: flex;
  justify-content: center;
  padding: 2px 0 4px;
}

.residential-npv-tools {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
}

.residential-sensitivity-analyses > summary {
  color: #004777;
  font-size: 1.1rem;
}

.residential-sensitivity-options {
  display: grid;
  gap: 10px;
}

.residential-sensitivity-options > .residential-npv-tools {
  margin-top: 0;
  padding: 12px 16px;
  background: #fff;
}

.residential-npv-tools h4,
.residential-npv-tools p,
.residential-npv-curve p {
  margin: 0;
}

.parameter-curve-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.parameter-matrix-axis { margin: 0; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; min-width: 0; }
.parameter-matrix-axis legend { font-weight: 700; padding: 0 6px; }
.parameter-matrix-scroll { max-width: 100%; overflow-x: auto; margin: 16px 0; }
.parameter-matrix-table { border-collapse: separate; border-spacing: 3px; width: 100%; font-variant-numeric: tabular-nums; }
.parameter-matrix-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.parameter-matrix-table th, .parameter-matrix-table td { padding: 10px 12px; white-space: nowrap; text-align: right; border-radius: 4px; color: #0f172a; }
.parameter-matrix-table th { background: #f1f5f9; }
.parameter-matrix-table tbody th[scope="row"] { position: sticky; left: calc(3rem + 3px); z-index: 1; }
.parameter-matrix-table .parameter-matrix-corner,
.parameter-matrix-table .parameter-matrix-x-label {
  background: transparent;
  box-shadow: none;
  border: 0;
  text-align: center;
}
.parameter-matrix-table .parameter-matrix-y-label {
  width: 3rem;
  min-width: 3rem;
  padding: 12px 0;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}
.parameter-matrix-y-label span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.parameter-matrix-table .parameter-matrix-unavailable { color: #475569; }
.parameter-matrix-maximum {
  display: inline-block;
  position: relative;
  font-weight: 700;
}
.parameter-matrix-maximum::after {
  content: "";
  position: absolute;
  inset: -4px -8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
}
.parameter-matrix-color-scale { height: 14px; border-radius: 6px; margin-top: 16px; background: linear-gradient(to right, rgb(252,165,165), rgb(254,243,199), rgb(134,239,172)); }

.parameter-curve-summary::-webkit-details-marker {
  display: none;
}

.residential-npv-tools[open] > .parameter-curve-summary .residential-metric-help-caret {
  transform: rotate(90deg);
}

.residential-npv-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}

.residential-npv-actions button {
  white-space: normal;
}

.residential-npv-chart {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
}

.npv-curve-card {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #fff;
}

.npv-curve-card,
.residential-npv-curve,
.npv-curve-details,
.npv-curve-plot {
  min-width: 0;
}

.npv-curve-card .npv-curve-title,
.residential-npv-curve .npv-curve-title {
  margin: 0;
  max-width: 100%;
  color: #0f172a;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.npv-curve-details,
.npv-curve-hint {
  margin: 0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.npv-curve-details:empty {
  display: none;
}

.npv-curve-plot {
  width: 100%;
  height: 450px;
}

@media (max-width: 720px) {
  .npv-curve-plot {
    height: 380px;
  }
}

#residential-run-simulation {
  padding: 14px 22px;
  border-radius: 12px;
}

#residential-run-simulation[aria-disabled="true"] {
  opacity: 0.72;
}

#residential-run-simulation.is-quick-simulation-muted {
  color: #475569;
  background: rgba(100, 116, 139, 0.13);
  border-color: rgba(100, 116, 139, 0.24);
  box-shadow: none;
  cursor: pointer;
}

#residential-run-simulation.is-quick-simulation-muted:hover,
#residential-run-simulation.is-quick-simulation-muted:focus-visible {
  color: #475569;
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.36);
  box-shadow: 0 8px 18px rgba(100, 116, 139, 0.08);
}

#residential-run-simulation.needs-results-update {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

#residential-run-simulation strong {
  font-size: 1.08rem;
}

#residential-run-simulation small {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

.residential-review-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.residential-review-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.04rem;
}

.residential-review {
  display: grid;
  gap: 10px;
}

.residential-review-line {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.residential-review-line strong {
  color: #0f172a;
}

.residential-results-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 14px;
}

.residential-results-details-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 -4px;
}

.residential-financial-toggle {
  justify-self: end;
}

.residential-stale-warning {
  padding: 14px 16px;
  border-radius: 14px;
  color: #78350f;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.28);
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
}

.residential-stale-warning strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}

.residential-results-graphs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 12px;
}

/* Draw the next graph tab at its real width without displaying it or adding
   page height. Opening it then reuses the prepared SVGs and their geometry. */
.residential-step--graphs.is-preparing-charts[hidden] {
  display: block !important;
  position: fixed;
  left: -100000px;
  top: 0;
  width: var(--chart-preparation-width);
  visibility: hidden;
  pointer-events: none;
}

.residential-graphs-note {
  padding: 14px 16px;
  border-radius: 18px;
  color: #475569;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(240, 253, 250, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.residential-results-graphs:empty {
  display: none;
}

.results-charts {
  display: grid;
  gap: 14px;
}

.residential-results-details {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-results-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}

.residential-results-details .js-download-excel {
  max-width: 100%;
  white-space: normal;
}

.residential-summary-strip {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 244, 0.98));
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.residential-summary-header {
  display: grid;
  gap: 6px;
}

.residential-summary-guidance {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.45;
}

.residential-summary-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.residential-summary-title-row h2 {
  margin: 0;
}

.residential-pdf-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.residential-config-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.residential-config-summary > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  min-height: 108px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.4;
}

.residential-config-summary > span strong {
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.25;
}

.residential-optimization-notice {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 13px 15px;
  border-radius: 16px;
  color: #713f12;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.92));
  border: 1px solid rgba(217, 119, 6, 0.26);
}

.residential-optimization-notice strong {
  color: #92400e;
}

.residential-summary-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 700;
}

.residential-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

#residential-ev-charging-summary .residential-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.residential-summary-section {
  display: grid;
  gap: 10px;
}

.residential-summary-section + .residential-summary-section {
  margin-top: 4px;
}

.residential-summary-section-head {
  display: grid;
  gap: 2px;
}

.residential-summary-section-head strong {
  color: #0f172a;
}

.residential-summary-section-head span {
  color: #64748b;
  font-size: 0.9rem;
}

.residential-summary-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.residential-summary-card--has-help {
  position: relative;
  padding-right: 42px;
}

.residential-summary-card-help.helper-text.helper-icon {
  position: absolute;
  top: 10px;
  right: 10px;
}

.residential-summary-card-help.helper-text.helper-icon::after {
  left: auto;
  right: 0;
}

.residential-summary-card-help--formula.helper-text.helper-icon::after {
  content: none;
  display: none;
}

.residential-lcoe-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(720px, 88vw);
  max-width: min(720px, 94vw);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.96);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.38;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 10000;
}

.residential-summary-card-help--formula:hover .residential-lcoe-tooltip,
.residential-summary-card-help--formula:focus .residential-lcoe-tooltip,
.residential-summary-card-help--formula:focus-within .residential-lcoe-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.residential-lcoe-tooltip-title {
  font-weight: 800;
}

.residential-lcoe-equation {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.residential-lcoe-symbol {
  font-size: 1.08em;
  font-weight: 700;
  white-space: nowrap;
}

.residential-lcoe-sum {
  display: inline-grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-items: center;
  min-width: 2.2em;
  margin: 0 0.12em;
  line-height: 0.92;
  vertical-align: middle;
}

.residential-lcoe-sum-symbol {
  font-size: 1.35em;
  line-height: 0.78;
}

.residential-lcoe-sum-upper,
.residential-lcoe-sum-lower {
  font-size: 0.62em;
  line-height: 1;
  white-space: nowrap;
}

.residential-lcoe-fraction {
  display: inline-grid;
  min-width: min(460px, 100%);
  max-width: 100%;
  text-align: center;
  line-height: 1.22;
}

.residential-lcoe-numerator {
  display: block;
  padding: 0 8px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.82);
}

.residential-lcoe-denominator {
  display: block;
  padding: 5px 8px 0;
}

.residential-lcoe-note,
.residential-lcoe-definitions {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 400;
}

.residential-summary-section--positive .residential-summary-card {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(236, 253, 245, 0.9));
  border-color: rgba(34, 197, 94, 0.32);
}

.residential-summary-section--positive .residential-summary-card-value {
  color: #14532d;
}

.residential-summary-section--positive .residential-summary-card-label,
.residential-summary-section--positive .residential-summary-card-meta {
  color: #3f7052;
}

.residential-summary-section--negative .residential-summary-card {
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(254, 242, 242, 0.9));
  border-color: rgba(239, 68, 68, 0.30);
}

.residential-summary-section--negative .residential-summary-card-value {
  color: #7f1d1d;
}

.residential-summary-section--negative .residential-summary-card-label,
.residential-summary-section--negative .residential-summary-card-meta {
  color: #8b4b4b;
}

.residential-summary-card-label {
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.residential-summary-card-value {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
}

.residential-summary-card-value--message {
  font-size: 0.98rem;
  line-height: 1.35;
}

.residential-summary-card-meta {
  color: #64748b;
  font-size: 0.82rem;
}

.residential-metric-help {
  margin-top: 14px;
  border: 1px solid rgba(49, 104, 134, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(28, 62, 91, 0.08);
  overflow: hidden;
}

.residential-step[data-step="6"] > .residential-metric-help {
  margin-top: 0;
}

.residential-metric-help > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 800;
  color: #123047;
  list-style: none;
}

.residential-metric-help > summary::-webkit-details-marker {
  display: none;
}

.residential-metric-help-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.residential-metric-help-caret {
  display: inline-block;
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #2563eb;
  transition: transform 0.18s ease;
}

.residential-metric-help[open] .residential-metric-help-caret {
  transform: rotate(90deg);
}

.residential-metric-help > summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(68, 133, 163, 0.12);
  color: #23617c;
  font-weight: 900;
}

.residential-metric-help[open] > summary::after {
  content: "-";
}

.residential-metric-help-body {
  display: grid;
  gap: 9px;
  padding: 0 16px 16px;
  color: #42526e;
  line-height: 1.55;
}

.residential-metric-help-body p {
  margin: 0;
}

.residential-battery-methodology {
  background: rgba(255, 255, 255, 0.82);
}

.residential-battery-methodology-body {
  gap: 12px;
}

.residential-battery-methodology-body h4 {
  margin: 6px 0 -2px;
  color: #173f5f;
  font-size: 1rem;
}

.residential-battery-methodology-body ol,
.residential-battery-methodology-body ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 22px;
}

.residential-battery-methodology-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(68, 133, 163, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.residential-battery-methodology-table-wrap:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.residential-battery-methodology-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.residential-battery-methodology-table caption {
  padding: 10px 12px;
  color: #173f5f;
  font-weight: 700;
  text-align: left;
}

.residential-battery-methodology-table th,
.residential-battery-methodology-table td {
  padding: 8px 10px;
  border-top: 1px solid rgba(68, 133, 163, 0.16);
  text-align: left;
  vertical-align: top;
}

.residential-battery-methodology-table th {
  background: rgba(239, 246, 255, 0.76);
  color: #153e5c;
  font-weight: 700;
}

.residential-battery-methodology-table td:first-child,
.residential-battery-methodology-table th:first-child {
  white-space: nowrap;
}

.residential-battery-methodology-example {
  padding: 11px 13px;
  border-left: 4px solid rgba(37, 99, 235, 0.48);
  border-radius: 8px 12px 12px 8px;
  background: rgba(239, 246, 255, 0.66);
  color: #294c66;
}

.residential-battery-equation {
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid rgba(68, 133, 163, 0.2);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.72);
  color: #153e5c;
  font-family: "Cambria Math", Cambria, "Times New Roman", serif;
  line-height: 1.6;
  text-align: center;
}

.residential-custom-roof {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.residential-config-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.residential-config-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: center;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(37, 99, 235, 0.24);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  -webkit-user-select: none;
  user-select: none;
  text-align: center;
}

.residential-config-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.48);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.13);
}

.residential-config-card:has(.residential-info-icon:hover),
.residential-config-card:has(.residential-info-icon:focus),
.residential-config-card:focus-within {
  z-index: 1000;
}

.residential-config-card > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.residential-config-card:has(> input[type="radio"]:focus-visible) {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 3px;
}

.residential-config-card:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.72);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(239, 246, 255, 0.98));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.residential-config-card strong,
.residential-config-card small {
  grid-column: 1;
}

.residential-config-card small {
  color: #64748b;
}

.residential-config-drawing {
  grid-column: 1;
  position: relative;
  display: block;
  width: 88px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.8), rgba(240, 253, 244, 0.75));
  overflow: hidden;
}

.residential-config-drawing::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  height: 2px;
  background: rgba(15, 23, 42, 0.25);
}

.residential-config-drawing span {
  position: absolute;
  display: block;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

.residential-config-drawing--single span {
  left: 22px;
  top: 13px;
  width: 44px;
  height: 12px;
  transform: skewY(-12deg);
  border-radius: 4px;
}

.residential-config-drawing--dual span:first-child {
  left: 23px;
  top: 13px;
  width: 28px;
  height: 11px;
  transform: rotate(-18deg);
  border-radius: 4px 4px 2px 2px;
}

.residential-config-drawing--dual span:last-child {
  left: 42px;
  top: 13px;
  width: 28px;
  height: 11px;
  transform: rotate(18deg);
  border-radius: 4px 4px 2px 2px;
}

.residential-config-drawing--multi span {
  width: 20px;
  height: 9px;
  border-radius: 4px;
}

.residential-config-drawing--multi span:nth-child(1) {
  left: 8px;
  top: 15px;
  transform: skewY(-12deg);
}

.residential-config-drawing--multi span:nth-child(2) {
  left: 33px;
  top: 13px;
  width: 17px;
  transform: rotate(-18deg);
  border-radius: 4px 4px 2px 2px;
}

.residential-config-drawing--multi span:nth-child(3) {
  left: 45px;
  top: 13px;
  width: 17px;
  transform: rotate(18deg);
  border-radius: 4px 4px 2px 2px;
}

.residential-config-drawing--multi span:nth-child(4) {
  right: 4px;
  top: 15px;
  transform: skewY(12deg);
}

.residential-pv-multi-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(248, 250, 252, 0.88);
}

.residential-pv-multi-card[hidden] {
  display: none;
}

.residential-pv-multi-toolbar {
  align-items: end;
}

.residential-pv-multi-grid {
  display: grid;
  gap: 8px;
}

.residential-pv-multi-head,
.residential-pv-multi-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.8fr) repeat(3, minmax(110px, 1fr));
  gap: 8px;
  align-items: center;
}

.residential-pv-multi-head {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 800;
}

.residential-pv-multi-row strong {
  color: #123047;
}

.residential-pv-multi-row input {
  width: 100%;
}

.residential-pv-multi-help {
  margin: 0;
}

@media (max-width: 760px) {
  .residential-config-choice {
    grid-template-columns: 1fr;
  }

  .residential-pv-multi-head {
    display: none;
  }

  .residential-pv-multi-row {
    grid-template-columns: 1fr;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.82);
  }
}

.residential-compare-card,
.residential-profile-overview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.residential-profile-overview:empty {
  display: none;
}

.residential-compare-head,
.residential-profile-overview-head {
  display: grid;
  gap: 4px;
}

.residential-compare-head strong,
.residential-profile-overview-head strong {
  color: #0f172a;
}

.residential-compare-head span,
.residential-profile-overview-head span {
  color: #64748b;
  font-size: 0.9rem;
}

.residential-compare-table {
  display: grid;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-compare-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) repeat(var(--res-compare-result-cols, 2), minmax(112px, 0.8fr));
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  min-width: calc(170px + (var(--res-compare-result-cols, 2) * 120px));
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.residential-compare-row:last-child {
  border-bottom: 0;
}

.residential-compare-row--head {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.residential-compare-row--head [role="columnheader"] {
  overflow-wrap: anywhere;
}

.residential-compare-row--total {
  background: rgba(37, 99, 235, 0.08);
  color: #0f172a;
  font-weight: 700;
}

.residential-compare-row--subtotal {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-weight: 700;
}

.residential-compare-row--grand-total {
  background: rgba(20, 83, 45, 0.1);
}

.residential-compare-row--details {
  display: block;
  padding: 0;
  min-width: calc(170px + (var(--res-compare-result-cols, 2) * 120px));
}

.residential-compare-details-cell {
  display: block;
}

.residential-compare-details {
  background: rgba(248, 250, 252, 0.72);
}

.residential-compare-details > summary {
  cursor: pointer;
  padding: 10px 13px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
}

.residential-compare-summary-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) repeat(var(--res-compare-result-cols, 2), minmax(112px, 0.8fr));
  gap: 10px;
  align-items: center;
  min-width: calc(170px + (var(--res-compare-result-cols, 2) * 120px));
}

.residential-compare-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.residential-compare-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  color: #2563eb;
  font-size: 0.78rem;
  line-height: 1;
}

.residential-compare-arrow::before {
  content: "\25B6";
}

.residential-compare-details[open] .residential-compare-arrow::before {
  content: "\25BC";
}

.residential-detail-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) repeat(var(--res-compare-result-cols, 2), minmax(112px, 0.8fr));
  gap: 8px 10px;
  padding: 0 13px 12px;
  min-width: calc(170px + (var(--res-compare-result-cols, 2) * 120px));
  color: #334155;
  font-size: 0.9rem;
}

.residential-detail-head {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.residential-money-line,
.residential-rate-line {
  display: block;
}

.residential-rate-line {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.residential-profile-overview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  width: min(100%, 1240px);
  margin-right: auto;
  max-height: 720px;
  overflow: auto;
  overflow-x: hidden;
  container-type: inline-size;
}

.residential-library-controls {
  display: grid;
  grid-template-columns:
    minmax(360px, 2fr)
    minmax(120px, 0.55fr)
    minmax(190px, 1fr)
    minmax(150px, 0.8fr);
  gap: 12px;
  align-items: end;
}

.residential-library-controls .residential-field {
  min-width: 0;
}

.residential-library-controls select,
.residential-library-controls input {
  width: 100%;
}

.residential-profile-overview .residential-profile-row {
  display: grid;
  grid-template-columns: minmax(92px, 108px) minmax(140px, 170px) repeat(4, minmax(170px, 1fr));
  gap: 10px;
  align-items: start;
  padding: 10px;
  min-width: 0;
  min-height: 178px;
  grid-auto-rows: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: visible;
  cursor: pointer;
}

.residential-profile-overview .residential-profile-row > div {
  min-width: 0;
}

.residential-dyn-formula {
  display: grid;
  gap: 10px;
}

.residential-dyn-row {
  display: grid;
  grid-template-columns: minmax(74px, 0.7fr) auto minmax(80px, 1fr) auto minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-dyn-label {
  font-weight: 700;
  color: #0f172a;
}

.residential-dyn-row input {
  width: 100%;
  min-width: 0;
}

.residential-tariff-comparison {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(224, 242, 254, 0.98), rgba(239, 246, 255, 0.96)),
    radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.18), transparent 36%);
  border: 1px solid rgba(37, 99, 235, 0.24);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.12);
}

.residential-tariff-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  cursor: pointer;
  color: #0f2f5f;
  font-weight: 900;
  list-style: none;
}

.residential-tariff-toggle::before {
  content: "▸";
  color: #2563eb;
  font-size: 0.92rem;
  line-height: 1.45;
}

.residential-tariff-comparison[open] .residential-tariff-toggle::before {
  content: "▾";
}

.residential-tariff-toggle span,
.residential-tariff-toggle small {
  display: block;
  grid-column: 2;
}

.residential-tariff-toggle small {
  margin-top: 4px;
  color: #335f91;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.residential-tariff-comparison-body {
  display: grid;
  gap: 12px;
}

.residential-tariff-comparison:not([open]) .residential-tariff-comparison-body {
  display: none;
}

.residential-tariff-comparison[open] .residential-tariff-toggle {
  margin-bottom: 4px;
}

.residential-tariff-comparison-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.residential-tariff-comparison-head h4 {
  margin: 0 0 5px;
  color: #0f172a;
}

.residential-tariff-comparison-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.residential-tariff-explainer {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-tariff-explainer summary {
  cursor: pointer;
  padding: 11px 13px;
  color: #123047;
  font-weight: 800;
  list-style-position: inside;
}

.residential-tariff-explainer div {
  display: grid;
  gap: 8px;
  padding: 0 13px 13px;
}

.residential-tariff-explainer p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.residential-tariff-period {
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(224, 242, 254, 0.58);
  color: #31556a;
  font-weight: 700;
}

.residential-tariff-period-note {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.residential-tariff-curtail-option {
  margin: -2px 0 0;
  padding: 2px 0 0;
}

.residential-row-help {
  border-bottom: 1px dotted rgba(49, 85, 106, 0.72);
  cursor: help;
}

.residential-tariff-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.residential-tariff-chart-panel {
  display: grid;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-tariff-chart-panel[hidden] {
  display: none;
}

.residential-tariff-chart-panel h5 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.residential-tariff-monthly-chart,
.residential-tariff-dynamic-price-chart {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 330px;
}

.residential-tariff-dynamic-price-chart {
  min-height: 570px;
}

.residential-tariff-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-tariff-card.is-error {
  background: rgba(255, 247, 237, 0.9);
  border-color: rgba(251, 146, 60, 0.28);
}

.residential-tariff-card h5 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.residential-tariff-card h5 .residential-info-icon {
  margin-left: 6px;
}

.residential-tariff-intro {
  align-self: start;
}

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

.residential-rate-unit-note {
  flex: 1.15 1 300px;
  max-width: 460px;
  margin: 0;
  align-self: center;
}

.residential-tariff-edit-grid .residential-rate-unit-note {
  grid-column: 1 / -1;
  max-width: none;
}

.residential-tariff-edit-grid label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.residential-tariff-edit-grid input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.92);
}

.residential-tariff-edit-grid small {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}

.residential-tariff-edit-grid .residential-tariff-source-note {
  grid-column: 1 / -1;
}

.residential-tariff-vnr-sources {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.residential-tariff-vnr-sources > div {
  display: grid;
  gap: 3px;
}

.residential-tariff-vnr-sources small {
  font-weight: 400;
  line-height: 1.45;
}

.residential-tariff-card-note {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.42;
}

.residential-tariff-card-note span {
  color: inherit;
  font-weight: inherit;
}

.residential-tariff-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.residential-tariff-card dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 2.65rem;
}

.residential-tariff-card dt {
  color: #64748b;
  font-size: 0.9rem;
}

.residential-tariff-card dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
  white-space: normal;
}

.residential-tariff-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.residential-tariff-total dt,
.residential-tariff-total dd {
  color: #123047;
}

.residential-tariff-card small {
  color: #64748b;
  line-height: 1.35;
}

.residential-profile-overview .fluvius-thumbwrap {
  display: flex;
  min-width: 0;
  min-height: 174px;
  flex-direction: column;
}

.residential-profile-overview .fluvius-thumb {
  display: block;
  width: 100%;
  height: 150px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  background: #fafafa;
}

.residential-profile-overview .fluvius-cell-title {
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.residential-profile-overview .fluvius-profilenr,
.residential-profile-overview .fluvius-profilenr-other {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.residential-profile-overview .fluvius-metrics {
  font-size: 0.74rem;
  line-height: 1.28;
}

.residential-profile-overview .fluvius-metrics .v {
  font-weight: 700;
}

.residential-profile-overview .residential-profile-period {
  white-space: nowrap;
}

.residential-profile-overview .fluvius-row.is-selected {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(240, 253, 244, 0.92));
}

@container (max-width: 1120px) {
  .residential-profile-overview .residential-profile-row {
    grid-template-columns: minmax(92px, 108px) minmax(140px, 170px) repeat(2, minmax(145px, 1fr));
    min-width: 0;
    min-height: 356px;
  }
}

@container (max-width: 640px) {
  .residential-profile-overview .residential-profile-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 540px;
  }
}

@container (max-width: 460px) {
  .residential-profile-overview .residential-profile-row {
    grid-template-columns: 1fr;
    min-height: 880px;
  }
}

@media (max-width: 980px) {
  .residential-library-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .residential-library-controls {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 1120px) {
  .residential-choice-grid.residential-choice-grid--pv-size {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .residential-choice-grid,
  .residential-choice-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .residential-location-grid,
  .residential-custom-direction-grid {
    grid-template-columns: 1fr;
  }

  .residential-choice-grid.residential-choice-grid--pv-size {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ems-lock-note {
    margin-left: 0;
  }

  .residential-hero,
  .residential-choice-grid,
  .residential-choice-grid--compact,
  .residential-config-summary,
  .residential-summary-grid,
  .residential-tariff-card-grid,
  .residential-tariff-edit-grid {
    grid-template-columns: 1fr;
  }

  .residential-choice-grid.residential-choice-grid--pv-size {
    grid-template-columns: 1fr;
  }

  .residential-location-card--map {
    grid-template-columns: 1fr auto;
  }

  .residential-compass {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    grid-template-rows: repeat(3, minmax(62px, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .residential-compass--azimuth {
    padding: 14px;
  }

  .residential-compass-option span {
    font-size: 0.98rem;
  }

  .residential-compass-option small,
  .residential-compass-center small {
    font-size: 0.68rem;
  }

  #res-pvmap.residential-pv-map {
    height: 420px;
  }

  .residential-tariff-comparison-head {
    display: grid;
  }

  .residential-progress {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 7px;
    margin-inline: -7px;
  }

  .residential-progress-step {
    min-height: 44px;
    padding: 6px 7px;
    font-size: 0.86rem;
  }

  .residential-progress-index {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 0.76rem;
  }

  .residential-step-header-row {
    display: none;
    justify-items: start;
  }

  .residential-step-nav {
    justify-content: start;
  }

  .residential-inline-row,
  .residential-grid-detail-row,
  .residential-nav,
  .residential-review-line {
    grid-template-columns: 1fr;
    display: grid;
  }

  .residential-summary-title-row {
    display: grid;
  }

  .residential-pdf-button {
    justify-self: start;
  }

  .residential-inline-row--paired,
  .residential-inline-row--balanced {
    grid-template-columns: 1fr;
  }

  .residential-quick-action-grid,
  .residential-step1-quick-entry {
    grid-template-columns: 1fr;
  }

  .helper-text.helper-icon::after,
  .helper-text.helper-icon.helper-icon--wide::after,
  .residential-info-icon::after,
  .residential-info-icon--wide::after,
  .residential-npv-term::after {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    width: auto;
    min-width: 0;
    max-width: none;
    transform: translateY(6px);
  }

  .residential-summary-card-help--formula .residential-lcoe-tooltip {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    width: auto;
    min-width: 0;
    max-width: none;
    transform: translateY(6px);
  }

  .residential-lcoe-equation {
    font-size: 0.92rem;
  }

  .residential-lcoe-fraction {
    min-width: 0;
    width: 100%;
  }

  .helper-text.helper-icon:hover::after,
  .helper-text.helper-icon:focus::after,
  .residential-info-icon:hover::after,
  .residential-info-icon:focus::after,
  .residential-info-icon:focus-within::after,
  .residential-npv-term:hover::after,
  .residential-npv-term:focus::after {
    transform: translateY(0);
  }

  .residential-fluvius-guide li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .residential-shot-preview {
    grid-column: 2;
    justify-self: start;
  }

  .residential-shot-popover {
    position: static;
    width: 100%;
    min-height: 0;
    margin-top: 8px;
    display: none;
    transform: none;
  }

  .residential-shot-preview:hover .residential-shot-popover,
  .residential-shot-preview:focus-within .residential-shot-popover {
    display: block;
  }

  .residential-ems-grid .residential-field label {
    min-height: 0;
  }

  .residential-ev-charging-grid .residential-field,
  .residential-ems-grid .residential-field {
    grid-template-rows: none;
  }

  .residential-ems-grid .residential-field--checkbox .residential-checkline {
    grid-row: auto;
  }

  .residential-nav {
    position: sticky;
    bottom: 0;
    padding: 8px;
    margin: 0 -2px -2px -2px;
    background: rgba(246, 247, 251, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0 0 14px 14px;
  }

  .residential-nav button {
    width: 100%;
  }

  .residential-financial-toggle {
    width: 100%;
  }

  .residential-config-choice,
  .residential-profile-overview .residential-profile-row {
    grid-template-columns: 1fr;
    min-width: 0;
    min-height: 880px;
  }

  .residential-dyn-row {
    grid-template-columns: 1fr;
  }

  .residential-compare-row,
  .residential-compare-row--details,
  .residential-compare-summary-row,
  .residential-detail-grid {
    grid-template-columns: minmax(138px, 1fr) repeat(var(--res-compare-result-cols, 2), minmax(100px, 0.8fr));
    min-width: calc(150px + (var(--res-compare-result-cols, 2) * 108px));
    gap: 6px;
  }

  .residential-tariff-help-row {
    display: grid;
  }

  .residential-tariff-help-row .filelike-button {
    width: 100%;
  }

  .residential-detail-toggle {
    width: 100%;
    white-space: normal;
  }

  .residential-grid-detail-actions .filelike-button {
    width: 100%;
  }

  #tab-entsoe .entsoe-select {
    min-width: 0;
    width: 100%;
  }

  #tab-entsoe .entsoe-inline-group input,
  #tab-entsoe .entsoe-date-nav input,
  #tab-entsoe #entsoe_timezone {
    width: 100%;
    max-width: 100%;
  }

  #tab-entsoe .entsoe-date-nav {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  #tab-entsoe .entsoe-date-nav button {
    flex: 0 0 auto;
  }

  #tab-entsoe .entsoe-date-nav input {
    flex: 1 1 100%;
    min-width: 0;
  }

  #tab-entsoe .entsoe-quick-range {
    width: 100%;
  }

  #tab-entsoe .entsoe-quick-range button {
    flex: 1 1 auto;
  }

  #tab-entsoe .entsoe-actions {
    align-items: stretch;
  }

  #tab-entsoe #entsoe-load {
    width: 100%;
  }

  #tab-entsoe .entsoe-plot {
    min-height: 380px;
  }
}

@media (max-width: 980px) {
  #tab-entsoe .entsoe-form-group,
  #tab-entsoe .entsoe-inline-group{
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #tab-entsoe .entsoe-form-group > label,
  #tab-entsoe .entsoe-inline-group > label{
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }

  #tab-entsoe .entsoe-select{
    min-width: 0;
    width: min(420px, 100%);
  }

  #tab-entsoe .entsoe-date-nav{
    display: flex;
    flex: 1 1 100%;
    width: min(420px, 100%);
    flex-wrap: nowrap;
    gap: 8px;
  }

  #tab-entsoe .entsoe-date-nav input{
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  #tab-entsoe .entsoe-quick-range{
    flex: 1 1 100%;
    margin-left: 0;
  }

  #tab-entsoe #entsoe-day-nav-note{
    flex: 1 1 100%;
  }

  #tab-entsoe .entsoe-field-stack {
    width: min(420px, 100%);
  }
}

#residential-pdf-print-root {
  display: none;
}

.residential-pdf-title {
  display: block;
  padding: 14px 18px;
  border: 1px solid #d7dee8;
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  body.residential-pdf-printing > *:not(#residential-pdf-print-root) {
    display: none !important;
  }

  body.residential-pdf-printing {
    background: #fff;
  }

  body.residential-pdf-printing #residential-pdf-print-root {
    display: block !important;
    width: 1120px;
    max-width: none;
    zoom: 0.65;
    color: #0f172a;
    background: #fff;
  }

  body.residential-pdf-printing .residential-pdf-page {
    display: grid;
    gap: 14px;
    align-content: start;
    break-after: page;
    page-break-after: always;
    min-height: 1570px;
  }

  body.residential-pdf-printing .residential-pdf-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.residential-pdf-printing .residential-pdf-button,
  body.residential-pdf-printing .residential-nav,
  body.residential-pdf-printing .chart-controls,
  body.residential-pdf-printing .residential-results-details,
  body.residential-pdf-printing .residential-status:empty {
    display: none !important;
  }

  body.residential-pdf-printing .residential-card,
  body.residential-pdf-printing .residential-review-card,
  body.residential-pdf-printing .residential-summary-strip,
  body.residential-pdf-printing .residential-compare-card,
  body.residential-pdf-printing .residential-tariff-comparison,
  body.residential-pdf-printing .chart-container,
  body.residential-pdf-printing .residential-summary-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  body.residential-pdf-printing .residential-card,
  body.residential-pdf-printing .residential-review-card,
  body.residential-pdf-printing .residential-summary-strip,
  body.residential-pdf-printing .residential-compare-card,
  body.residential-pdf-printing .residential-tariff-comparison {
    border: 1px solid #d7dee8;
    background: #fff;
  }

  body.residential-pdf-printing .residential-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.residential-pdf-printing .residential-compare-table,
  body.residential-pdf-printing .residential-profile-overview {
    overflow: visible;
  }

  body.residential-pdf-printing .residential-compare-row,
  body.residential-pdf-printing .residential-compare-row--details,
  body.residential-pdf-printing .residential-compare-summary-row,
  body.residential-pdf-printing .residential-detail-grid {
    min-width: 0;
  }

  body.residential-pdf-printing .residential-pdf-page--compare {
    gap: 8px;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-card {
    gap: 8px;
    padding: 10px;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-head {
    gap: 2px;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-head span {
    font-size: 0.76rem;
    line-height: 1.2;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-table {
    border-radius: 10px;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-row,
  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-summary-row,
  body.residential-pdf-printing .residential-pdf-page--compare .residential-detail-grid {
    grid-template-columns: minmax(132px, 1.08fr) repeat(var(--res-compare-result-cols, 2), minmax(104px, 0.84fr));
    gap: 5px;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-row {
    padding: 5px 8px;
    font-size: 0.76rem;
    line-height: 1.15;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-row--head,
  body.residential-pdf-printing .residential-pdf-page--compare .residential-detail-head {
    font-size: 0.66rem;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-compare-details > summary {
    padding: 5px 8px;
    font-size: 0.76rem;
    line-height: 1.15;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-detail-grid {
    padding: 0 8px 6px;
    font-size: 0.72rem;
    line-height: 1.12;
  }

  body.residential-pdf-printing .residential-pdf-page--compare .residential-rate-line {
    margin-top: 0;
    font-size: 0.66rem;
  }

  body.residential-pdf-printing .residential-pdf-page--graphs {
    gap: 18px;
  }

  body.residential-pdf-printing .chart-container {
    width: 100%;
    max-width: none;
    min-height: 0;
    max-height: 650px;
    padding: 12px;
    border: 1px solid #d7dee8;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }

  body.residential-pdf-printing .chart-container img,
  body.residential-pdf-printing .chart {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 600px !important;
    object-fit: contain;
  }

  body.residential-pdf-printing .residential-pdf-page--monthly-euros .chart-container {
    max-height: none;
  }

  body.residential-pdf-printing #chartProfileYearInteractive,
  body.residential-pdf-printing #chartMonthlyPeakInteractive {
    width: 100% !important;
    max-width: 100% !important;
    height: 600px !important;
  }

  body.residential-pdf-printing .residential-pdf-plotly-image {
    display: block;
    height: auto !important;
  }

  body.residential-pdf-printing .residential-tariff-comparison {
    margin: 0;
    padding: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    break-inside: auto;
    page-break-inside: auto;
  }

  body.residential-pdf-printing .residential-tariff-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.residential-pdf-printing .residential-pdf-page--tariff,
  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-comparison-body,
  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-chart-panel,
  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-monthly-chart,
  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-dynamic-price-chart {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-chart-panel {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-monthly-chart,
  body.residential-pdf-printing .residential-pdf-page--tariff .residential-tariff-dynamic-price-chart {
    min-height: 0;
  }

  body.residential-pdf-printing .residential-pdf-page--tariff .js-plotly-plot,
  body.residential-pdf-printing .residential-pdf-page--tariff .plot-container,
  body.residential-pdf-printing .residential-pdf-page--tariff .svg-container,
  body.residential-pdf-printing .residential-pdf-page--tariff .main-svg {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.residential-pdf-printing .residential-pdf-page--tariff .residential-pdf-plotly-image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }
}

/* Brand wrappers must not pick up layout/typography intended for UI spans. */
span.fluvius-brand[translate="no"],
span.fluvius-brand-context[translate="yes"] {
  all: unset;
  display: inline;
}

#tab-entsoe .entsoe-panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }
#tab-entsoe .entsoe-panel-heading .entsoe-panel-title { margin: 0; }
#tab-entsoe .entsoe-panel-heading a { font-size: 0.9rem; }
#tab-entsoe .entsoe-year-shortcuts { align-items: center; }
#tab-entsoe .entsoe-since-control { display: inline-flex; align-items: center; gap: 6px; }
#tab-entsoe .entsoe-since-control .entsoe-select { flex: 0 0 auto; width: auto; min-width: 0; padding: 4px 8px; font-size: 0.85rem; }
#tab-entsoe .entsoe-generation-controls { margin-top: 18px; }
#tab-entsoe .entsoe-generation-loading { display: inline-flex; align-items: center; gap: 0.5rem; color: #004b76; }
#tab-entsoe .entsoe-generation-loading[hidden] { display: none; }
#tab-entsoe .entsoe-generation-wheel { width: 18px; height: 18px; border: 3px solid #c9dce6; border-top-color: #004b76; border-radius: 50%; animation: graphs-spin 0.8s linear infinite; }
#tab-entsoe #entsoe-average-day-wrap { scroll-margin-top: 1.5rem; }
#tab-entsoe .entsoe-average-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0.75rem 0; }
#tab-entsoe .entsoe-average-controls label { white-space: nowrap; }
#tab-entsoe .entsoe-average-months { margin: 1rem 0; border: 1px solid #ddd; border-radius: 6px; padding: 0.75rem; }
#tab-entsoe .entsoe-average-months[hidden] { display: none; }

#tab-entsoe .entsoe-average-plot-frame { position: relative; height: 540px; }
#tab-entsoe .entsoe-average-plot-frame .entsoe-plot { height: 100%; min-height: 0; }
#tab-entsoe #entsoe-average-day-plot { position: relative; }
#tab-entsoe .entsoe-average-surface { position: absolute; inset: 0; width: 100%; height: 100%; }
#tab-entsoe .entsoe-average-selection-note { min-height: 2.8em; margin: 0.5rem 0; font-size: 0.9rem; }
#tab-entsoe .entsoe-average-selection-note[data-state="pending"] { color: #805000; font-weight: 600; }
#tab-entsoe .entsoe-average-selection-note[data-state="error"] { color: #a32121; font-weight: 600; }
#tab-entsoe #entsoe-average-day-plot[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
#tab-entsoe #entsoe-average-day-plot[aria-hidden="true"] { visibility: hidden; }
#tab-entsoe .entsoe-average-placeholder { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; color: #555; pointer-events: none; }
#tab-entsoe .entsoe-average-placeholder[hidden] { display: none; }
#tab-entsoe .entsoe-average-progress { position: absolute; top: 12px; right: 18px; padding: 4px 10px; border-radius: 4px; background: #eef5fb; color: #004b76; pointer-events: none; }
#tab-entsoe #entsoe-average-status { height: 4.5em; overflow-y: auto; }
