/* Redesign #BB — warstwa wizualna; logika i dane pozostają w index.html */
:root {
  --bb-red: #df0c12;
  --bb-red-dark: #b8080d;
  --bb-ink: #121212;
  --bb-paper: #f7f6f3;
  --bb-line: #d9d6d0;
  --bb-muted: #66615b;
  --bb-panel: #ffffff;
}

html { scroll-behavior: smooth; }
body, .content-wrapper { background: var(--bb-paper) !important; color: var(--bb-ink) !important; font-family: Inter, Arial, sans-serif !important; }
.wrapper { min-height: 100vh; }
.main-header {
  position: sticky !important; top: 0; height: 68px; padding: 0 clamp(16px, 4vw, 58px) !important;
  background: rgba(255,255,255,.96) !important; border-bottom: 1px solid var(--bb-line) !important;
  box-shadow: none !important; backdrop-filter: blur(10px);
}
.main-header .navbar-nav { align-items: center; }
.main-header .navbar-nav.ml-auto { gap: 14px; }
.main-header .nav-link { color: var(--bb-ink) !important; font-family: "Barlow Condensed", Arial Narrow, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .07em; }
.main-header .nav-link:hover { color: var(--bb-red) !important; }
.site-brand { display: flex !important; align-items: center; gap: 10px; padding: 0 !important; text-decoration: none; }
.site-logo { display:block; width:42px; height:42px; object-fit:contain; }
.brand-name { color: var(--bb-red); font-size: 13px; letter-spacing: .14em; }
.site-nav-shortcuts { display:flex !important; align-items:center; justify-content:center; gap:clamp(10px, 2vw, 30px); margin:0 auto; }
.main-header .site-nav-shortcuts a { color:var(--bb-ink) !important; font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:15px; font-weight:800; letter-spacing:.07em; text-decoration:none; white-space:nowrap; }
.main-header .site-nav-shortcuts a:hover { color:var(--bb-red) !important; }
.main-header .data-refresh { color: var(--bb-red); cursor: pointer; }
.main-header #lastUpdate { color: var(--bb-muted); font-family: Inter, Arial, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.theme-switch-wrapper { padding:0 4px; }
.theme-switch { position:relative; display:grid; place-items:center; width:34px; height:34px; }
.theme-switch input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.meteo-theme-toggle { display:grid; place-items:center; width:34px; height:34px; margin:0; border:1px solid var(--bb-line); border-radius:50%; background:transparent; color:#f2a20b; cursor:pointer; transition:border-color .2s ease, color .2s ease, background .2s ease; }
.meteo-theme-toggle:hover { border-color:var(--bb-ink); }
.meteo-theme-toggle i { font-size:15px; line-height:1; }
.theme-icon-moon { display:none; }
#theme-checkbox:checked + .meteo-theme-toggle { color:#f5f2ec; border-color:#77716a; background:#2a2926; }
#theme-checkbox:checked + .meteo-theme-toggle .theme-icon-sun { display:none; }
#theme-checkbox:checked + .meteo-theme-toggle .theme-icon-moon { display:block; }

body { overflow-x:hidden; }
.content { padding: 0 !important; }
.container-fluid { width: 100%; max-width: 1380px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 58px) 56px !important; }
.logo-container {
  position: relative; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); min-height: 350px;
  width:100vw; overflow: hidden; margin: 0 calc(50% - 50vw) 45px !important; padding: 58px clamp(28px, 13vw, 240px) 45px !important;
  background:#f7f6f3; border-bottom: 1px solid var(--bb-line); box-shadow: none !important;
}
.logo-container::after { content:""; position:absolute; inset:0; pointer-events:none; background:url("../images/hero-heat-pump-clean.png") center 52% / cover no-repeat; z-index:0; }
.logo-container::before { content:""; position:absolute; inset:0; z-index:1; pointer-events:none; background:rgba(10,16,17,.46); }
.logo-placeholder { display: none !important; }
.logo-text { position: relative; z-index: 3; align-self:center; max-width:590px; padding:0 !important; border:0; background:transparent; box-shadow:none; }
.logo-text h1 { margin: 0; color:#fff; font-family: "Barlow Condensed", Impact, Arial Narrow, sans-serif; font-size: clamp(54px, 6vw, 86px); font-weight: 800; line-height: .87; letter-spacing: -.045em; text-transform: uppercase; text-shadow:0 3px 9px rgba(0,0,0,.72); }
.logo-text h1 span { color: var(--bb-red); }
.logo-text > p:not(.hero-kicker):not(.hero-caption) { max-width: 560px; margin: 20px 0 0; color:#fff; font-size: 15px; line-height: 1.55; text-shadow:0 2px 7px rgba(0,0,0,.74); }
.hero-kicker { margin: 0 0 14px !important; color:#fff !important; font-family: Inter,Arial,sans-serif !important; font-size: 10px !important; font-weight: 900 !important; letter-spacing: .24em; text-shadow:0 2px 7px rgba(0,0,0,.74); }
.hero-button { display: inline-flex; align-items: center; gap: 12px; margin-top: 23px; padding: 14px 18px; background: var(--bb-red); color: #fff !important; font-family: "Barlow Condensed", Arial Narrow, sans-serif; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-decoration: none !important; transition: background .2s ease, transform .2s ease; }
.hero-button:hover { background: var(--bb-red-dark); transform: translateY(-2px); }
.hero-caption { margin: 19px 0 0 !important; color:rgba(255,255,255,.88) !important; font-size: 11px !important; line-height: 1.5 !important; text-shadow:0 2px 7px rgba(0,0,0,.74); }
.hero-project-link { color:#fff !important; text-shadow:0 2px 7px rgba(0,0,0,.74); }
.hero-project-link:hover { color:#fff !important; }
.hero-roof { position:absolute; inset:0 0 0 auto; z-index:2; width:min(66vw,1120px); height:100%; overflow:visible; opacity:1; pointer-events:none; }
.hero-roof path { fill:none; stroke:var(--bb-red); stroke-width:18; stroke-linecap:square; stroke-linejoin:miter; vector-effect:non-scaling-stroke; filter:drop-shadow(0 2px 5px rgba(0,0,0,.18)); }

.error-alert { border-radius: 0 !important; border: 1px solid var(--bb-red) !important; }
.loading-spinner { color: var(--bb-muted); }
.live-summary { display:grid; grid-template-columns:242px minmax(0,1fr); align-items:stretch; margin:0 8px 34px; background:#eef0ee; border:1px solid var(--bb-line); }
.live-summary-title { display:flex; flex-direction:column; justify-content:center; min-height:94px; padding:18px 20px; border-right:1px solid #d4d1cb; }
.live-summary-metrics { display:grid; grid-template-columns:repeat(5,minmax(118px,1fr)); }
.live-summary-item, .live-summary-status { display:flex; flex-direction:column; justify-content:center; min-height:94px; padding:14px 18px; border-right:1px solid #d4d1cb; border-bottom:1px solid #d4d1cb; }
.live-summary-metrics > :nth-child(5n) { border-right:0; }
.live-summary-metrics > :nth-last-child(-n + 5) { border-bottom:0; }
.live-summary-title span { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:24px; font-weight:800; letter-spacing:.02em; line-height:1; }
.live-summary-title span::before { content:""; display:inline-block; width:29px; height:3px; margin:0 9px 6px 0; background:var(--bb-red); }
.live-summary-title small { margin-top:6px; color:var(--bb-muted); font-size:11px; }
.live-summary-item > span { color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.live-summary-item strong { margin-top:4px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:31px; font-weight:800; letter-spacing:-.035em; line-height:.9; white-space:nowrap; }
.live-summary-item strong b { font:inherit; }
.live-summary-item strong { font-size:20px; }
.live-summary-item strong b { font-size:34px; }
.live-summary-status { align-items:flex-start; gap:4px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:16px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.live-summary-status-label { color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.live-summary-status-value { display:flex; align-items:center; gap:8px; }
.live-summary-status i { width:8px; height:8px; border-radius:50%; background:#6e7b86; }
.live-summary-status.is-active i { background:#15976f; box-shadow:0 0 0 4px rgba(21,151,111,.13); }
.live-summary-status.is-warning i { background:#e89b13; box-shadow:0 0 0 4px rgba(232,155,19,.13); }
.live-summary-status.is-standby i { background:#6e7b86; }
.live-summary-status.is-muted i { background:#9c978f; }
#dataCards { margin-top: 0 !important; }
.section-intro { display:flex; align-items:end; justify-content:space-between; gap:20px; margin:0 8px 17px; padding-top:20px; border-top:3px solid var(--bb-red); }
.section-intro p { margin:0 0 6px; color:var(--bb-red); font-size:10px; font-weight:900; letter-spacing:.19em; }
.section-intro h2 { margin:0; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:35px; font-weight:800; letter-spacing:-.02em; line-height:.9; text-transform:uppercase; }
.section-intro > span { color:var(--bb-muted); font-size:11px; font-weight:600; }
#dataCards > [class*="col-"] { padding: 0 8px 16px !important; }
.dashboard-group::before { content:attr(data-dashboard-group); display:block; margin:0 0 8px; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:800; letter-spacing:.11em; }
.data-card { height: auto !important; margin-bottom: 16px !important; border: 1px solid var(--bb-line) !important; border-radius: 0 !important; background: var(--bb-panel) !important; box-shadow: none !important; color: var(--bb-ink) !important; }
.data-card:hover { transform: none !important; box-shadow: 0 9px 22px rgba(0,0,0,.06) !important; }
.data-card .card-header { min-height: 67px; display: flex; align-items: center; padding: 17px 20px !important; border: 0 !important; border-top: 4px solid var(--bb-red) !important; border-radius: 0 !important; background: transparent !important; color: var(--bb-ink) !important; }
.data-card .card-title, .data-card .card-header h3 { margin: 0 !important; color: var(--bb-ink) !important; font-family: "Barlow Condensed", Arial Narrow, sans-serif !important; font-size: 23px !important; font-weight: 800 !important; letter-spacing: .015em; text-transform: uppercase; }
.data-card .card-title i { color: var(--bb-red); }
.data-card .card-body { padding: 19px 20px 22px !important; }
.main-value, .heat-power-value, .cop-value { color: var(--bb-ink) !important; font-family: "Barlow Condensed", Arial Narrow, sans-serif !important; font-weight: 800 !important; letter-spacing: -.045em; }
.main-value { font-size: clamp(40px, 3vw, 58px) !important; line-height: .86 !important; }
.main-value .unit, .heat-power-value .unit { font-family: Inter,Arial,sans-serif; font-size: 17px !important; font-weight: 700; letter-spacing: 0; }
.text-muted, .parameter-label, .temperature-item p, .temperature-outside-item p { color: var(--bb-muted) !important; font-family: Inter,Arial,sans-serif; font-size: 11px !important; font-weight: 600; }
.temperature-row, .temperature-outside-row { gap: 0 !important; }
.temperature-item, .temperature-outside-item { min-height: 111px; padding: 0 15px 0 0 !important; border: 0 !important; border-right: 1px solid var(--bb-line) !important; text-align: left !important; }
.temperature-item + .temperature-item, .temperature-outside-item + .temperature-outside-item { padding-left: 15px !important; border-right: 0 !important; }
.parameter-row { min-height: 40px; border-bottom: 1px solid #e4e1dc; }
.parameter-value { color: var(--bb-ink) !important; font-family: "Barlow Condensed",Arial Narrow,sans-serif; font-size: 20px; font-weight: 800; }
.network-header, .power-breakdown h6, .usage-breakdown h6 { margin: 20px 0 10px !important; color: var(--bb-red) !important; font-family: "Barlow Condensed",Arial Narrow,sans-serif; font-size: 16px !important; font-weight: 800 !important; letter-spacing: .08em; }
.voltage-mini, .power-breakdown, .usage-breakdown, .usage-summary { border-color: var(--bb-line) !important; }
.voltage-mini-item { background: #f4f2ee !important; border-radius: 0 !important; }
.voltage-mini-value, .co-box-value, .cwu-box-value { color: var(--bb-ink) !important; font-family: "Barlow Condensed",Arial Narrow,sans-serif; font-weight: 800; }
.progress { border-radius: 0 !important; background: #ebe8e2 !important; }
.progress-bar { background: var(--bb-red) !important; }
.heat-power-section { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; border-radius:0 !important; border-left:4px solid var(--bb-red); background:#f4f2ee !important; }
.heat-power-label { margin:0; color:var(--bb-muted) !important; font-family:Inter,Arial,sans-serif; font-size:11px !important; font-weight:700; text-transform:uppercase; }
.heat-power-value { display:flex; align-items:baseline; justify-content:center; gap:6px; margin:7px 0 16px !important; font-size:45px !important; letter-spacing:-.015em !important; line-height:.9; white-space:nowrap; }
.heat-power-value .unit { margin:0 !important; }
.cop-value { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; width:100%; margin:7px 0 0 !important; font-size:33px !important; letter-spacing:-.01em !important; line-height:.9; }
.efficiency-badge { border-radius: 0 !important; }
.efficiency-badge.efficiency-neutral { background:#6e7b86 !important; color:#fff !important; }
.heat-pump-status { border-radius: 0 !important; background: #f4f2ee !important; border-left: 4px solid var(--bb-red) !important; }
.heat-pump-status-icon { color: var(--bb-red) !important; }
.heat-pump-status.heat-pump-status-standby { border-left-color:#6e7b86 !important; background:#f0f2f3 !important; }
.heat-pump-status.heat-pump-status-standby .heat-pump-status-icon { color:#6e7b86 !important; }
.heat-pump-status.heat-pump-status-co, .heat-pump-status.heat-pump-status-cwu { border-left-color:#15976f !important; background:#eef8f4 !important; }
.heat-pump-status.heat-pump-status-co .heat-pump-status-icon, .heat-pump-status.heat-pump-status-cwu .heat-pump-status-icon { color:#15976f !important; }
.heat-pump-status.heat-pump-status-defrost { border-left-color:#e89b13 !important; background:#fff7e8 !important; }
.heat-pump-status.heat-pump-status-defrost .heat-pump-status-icon { color:#e89b13 !important; }
.heat-pump-status.heat-pump-status-off { border-left-color:#9c978f !important; background:#f0efed !important; }
.heat-pump-status.heat-pump-status-off .heat-pump-status-icon { color:#77716a !important; }
.heat-pump-status-text { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:21px; font-weight:800; letter-spacing:.01em; text-transform:uppercase; }
.heat-pump-status-description { color:var(--bb-muted) !important; font-size:12px; }
.co-box, .cwu-box { border-radius: 0 !important; box-shadow: none !important; }
.co-box { background: #f4f2ee !important; border: 1px solid var(--bb-line) !important; }
.cwu-box { background: #fce9e9 !important; border: 1px solid #edc1c1 !important; }

.row.mt-4 { margin-top: 18px !important; }
.row.mt-4 > .col-12 { padding: 0 8px !important; }
.efficiency-chart-card .card-header, .correlation-chart-card .card-header, .simplified-energy-table .card-header, .cost-table .card-header { border-top-width: 4px !important; }
.chart-container { height: 360px !important; padding: 8px 0 !important; border-radius: 0 !important; background: #fff !important; }
.table-info { border-radius: 0 !important; border-left: 4px solid var(--bb-red) !important; background: #f4f2ee !important; color: #514c46 !important; }
.table-info i { color: var(--bb-red) !important; }
.card table { margin-bottom: 0 !important; font-size: 13px; }
.card .table th { border-color: #d8d4ce !important; background: #1b1a18 !important; color: #fff !important; font-family: "Barlow Condensed",Arial Narrow,sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.card .table td { border-color: #dfdcd6 !important; color: #2c2925; vertical-align: middle; }
.card .table tbody tr:nth-child(even) { background: #f7f6f3; }
.tariff-config, .tariff-details, .tariff-info { border-radius: 0 !important; }
.tariff-config-input { border-radius: 0 !important; border-color: var(--bb-line) !important; }
.update-costs-btn { border-radius: 0 !important; background: var(--bb-red) !important; }
.reset-defaults-btn { border-radius: 0 !important; }
.main-footer { margin: 0 !important; padding: 25px clamp(16px,4vw,58px) !important; border-top: 1px solid var(--bb-line) !important; background: #fff !important; color: var(--bb-muted) !important; font-size: 12px; }
.main-footer strong { color: var(--bb-ink); font-family: "Barlow Condensed",Arial Narrow,sans-serif; font-size: 17px; letter-spacing: .04em; }

[data-theme="dark"] body, [data-theme="dark"] .content-wrapper { background: #181817 !important; color: #f5f2ec !important; }
[data-theme="dark"] .main-header, [data-theme="dark"] .main-footer { background: #22211f !important; border-color: #4d4944 !important; }
[data-theme="dark"] .main-header .nav-link, [data-theme="dark"] .main-footer strong, [data-theme="dark"] .hero-roof strong, [data-theme="dark"] .section-intro h2 { color: #f5f2ec !important; }
[data-theme="dark"] .main-header .site-nav-shortcuts a { color:#f5f2ec !important; }
[data-theme="dark"] .logo-container { background:#242321; border-color:#4d4944; }
[data-theme="dark"] .logo-text { background:transparent; box-shadow:none; }
[data-theme="dark"] .logo-text h1, [data-theme="dark"] .data-card .card-header, [data-theme="dark"] .data-card .card-title, [data-theme="dark"] .main-value, [data-theme="dark"] .heat-power-value, [data-theme="dark"] .cop-value, [data-theme="dark"] .parameter-value, [data-theme="dark"] .co-box-value, [data-theme="dark"] .cwu-box-value, [data-theme="dark"] .voltage-mini-value { color:#f5f2ec !important; }
[data-theme="dark"] .logo-text > p:not(.hero-kicker):not(.hero-caption), [data-theme="dark"] .hero-caption { color:#fff !important; }
[data-theme="dark"] .text-muted, [data-theme="dark"] .parameter-label { color:#c6c1b8 !important; }
[data-theme="dark"] .data-card, [data-theme="dark"] .chart-container { background:#252421 !important; border-color:#514d47 !important; }
[data-theme="dark"] .live-summary { background:#252421; border-color:#514d47; }
[data-theme="dark"] .live-summary > * { border-color:#514d47; }
[data-theme="dark"] .live-summary-title span, [data-theme="dark"] .live-summary-item strong, [data-theme="dark"] .live-summary-status, [data-theme="dark"] .heat-pump-status-text { color:#f5f2ec; }
[data-theme="dark"] .live-summary-title small, [data-theme="dark"] .live-summary-item > span, [data-theme="dark"] .heat-pump-status-description { color:#c6c1b8 !important; }
[data-theme="dark"] .hero-roof { background:transparent; border-color:transparent; }
[data-theme="dark"] .section-intro > span { color:#c6c1b8; }
[data-theme="dark"] .heat-power-section, [data-theme="dark"] .heat-pump-status, [data-theme="dark"] .voltage-mini-item, [data-theme="dark"] .table-info, [data-theme="dark"] .co-box { background:#302e2a !important; border-color:#514d47 !important; }
[data-theme="dark"] .card .table td { color:#eeeae4 !important; border-color:#514d47 !important; }
[data-theme="dark"] .card .table tbody tr:nth-child(even) { background:#2b2926; }

@media (max-width: 991px) {
  .main-header { height: 61px; }
  .main-header #lastUpdate { display: none; }
  .site-nav-shortcuts { display:none !important; }
  .logo-container { grid-template-columns: 1fr; min-height: 350px; padding: 48px clamp(24px,7vw,66px) 42px !important; }
  .hero-roof { width:79vw; }
  .live-summary { grid-template-columns:1fr; }
  .live-summary-title { min-height:auto; border-right:0; border-bottom:1px solid var(--bb-line); }
  .live-summary-metrics { grid-template-columns:repeat(3,1fr); }
  .live-summary-metrics > :nth-child(5n) { border-right:1px solid #d4d1cb; }
  .live-summary-metrics > :nth-last-child(-n + 5) { border-bottom:1px solid #d4d1cb; }
  .live-summary-metrics > :nth-child(3n) { border-right:0; }
  .live-summary-metrics > :nth-last-child(-n + 3) { border-bottom:0; }
}
@media (max-width: 767px) {
  .brand-name { display:none; }
  .hero-roof { display:block !important; width:112vw; right:-36vw; opacity:.74; }
  .hero-roof path { stroke-width:12; }
  .main-header .navbar-nav.ml-auto { gap:4px; }
  .main-header .nav-link { padding-left:.4rem !important; padding-right:.4rem !important; }
  .logo-container { min-height: 390px; margin-bottom: 27px !important; }
  .logo-text h1 { font-size: clamp(48px, 15vw, 67px); }
  .section-intro { align-items:flex-start; flex-direction:column; margin:0 0 15px; }
  .live-summary { margin:0 0 24px; }
  .live-summary-title { min-height:63px; padding:14px 16px; }
  .live-summary-metrics { grid-template-columns:1fr 1fr; }
  .live-summary-item, .live-summary-status { min-height:72px; padding:13px 14px; border-bottom:1px solid var(--bb-line); }
  .live-summary-metrics > :nth-child(3n) { border-right:1px solid #d4d1cb; }
  .live-summary-metrics > :nth-last-child(-n + 3) { border-bottom:1px solid var(--bb-line); }
  .live-summary-metrics > :nth-child(2n) { border-right:0; }
  .live-summary-metrics > :nth-last-child(-n + 2) { border-bottom:0; }
  .live-summary-item strong b { font-size:30px; }
  .live-summary-item > span { font-size:13px; }
  .dashboard-group::before { margin:0 0 7px; }
  #dataCards > [class*="col-"] { padding: 0 0 14px !important; }
  .row.mt-4 > .col-12 { padding: 0 !important; }
  .data-card .card-body { padding:17px 16px 20px !important; }
  .chart-container { height: 250px !important; }
  .main-footer .float-right { float:none !important; display:block; margin-top:6px; }
}

/* Czytelność i kontekst danych */
.mobile-menu-toggle { display:none; width:38px; height:38px; margin-left:auto; align-items:center; justify-content:center; border:1px solid var(--bb-line); background:#fff; color:var(--bb-ink); font-size:16px; cursor:pointer; }
.mobile-nav { display:none; }
.how-to-read { margin:2px 0 30px; border-top:1px solid var(--bb-line); border-bottom:1px solid var(--bb-line); background:#f4f2ee; }
.how-to-read details { padding:0 22px; }
.how-to-read summary { display:flex; align-items:center; justify-content:space-between; padding:17px 0; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:22px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; cursor:pointer; list-style:none; }
.how-to-read summary::-webkit-details-marker { display:none; }
.how-to-read summary i { color:var(--bb-red); font-size:14px; transition:transform .2s ease; }
.how-to-read details[open] summary i { transform:rotate(45deg); }
.how-to-read-content { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; padding:0 0 20px; }
.how-to-read-content p { margin:0; color:var(--bb-muted); font-size:13px; line-height:1.5; }
.how-to-read-content strong { color:var(--bb-ink); }

[data-theme="dark"] .mobile-menu-toggle, [data-theme="dark"] .mobile-nav { background:#252421; border-color:#514d47; color:#f5f2ec; }
[data-theme="dark"] .how-to-read summary, [data-theme="dark"] .how-to-read-content strong { color:#f5f2ec; }
[data-theme="dark"] .how-to-read-content p { color:#c6c1b8; }
[data-theme="dark"] .how-to-read { background:#302e2a; border-color:#514d47; }

@media (max-width: 991px) {
  .mobile-menu-toggle { display:flex; }
  .mobile-nav:not([hidden]) { display:flex; position:sticky; top:61px; z-index:1029; flex-wrap:wrap; gap:0; padding:8px clamp(16px,4vw,36px); border-bottom:1px solid var(--bb-line); background:#fff; box-shadow:0 8px 14px rgba(20,19,17,.08); }
  .mobile-nav a { padding:8px 11px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:15px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
  .mobile-nav a:hover { color:var(--bb-red); }
  [data-theme="dark"] .mobile-nav:not([hidden]) { background:#252421; border-color:#514d47; }
  [data-theme="dark"] .mobile-nav a { color:#f5f2ec; }
}
@media (max-width: 767px) {
  .mobile-menu-toggle { margin-left:6px; }
  .mobile-nav:not([hidden]) { top:61px; padding:7px 10px; }
  .mobile-nav a { padding:7px 8px; font-size:14px; }
  .how-to-read { margin-bottom:24px; }
  .how-to-read details { padding:0 16px; }
  .how-to-read summary { font-size:19px; }
  .how-to-read-content { grid-template-columns:1fr; gap:11px; }
}

/* Układ szczegółów: mniej pustej przestrzeni, wyraźniejsza hierarchia */
.conditions-card .card-body { padding-top:14px !important; }
.conditions-grid { display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid var(--bb-line); }
.condition-block { min-width:0; padding:8px 13px 16px 0; }
.condition-block + .condition-block { padding-right:0; padding-left:13px; border-left:1px solid var(--bb-line); }
.condition-label { margin:0 0 7px; color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.condition-block .main-value { font-size:clamp(38px,3.5vw,53px) !important; }
.condition-block .text-muted { margin:5px 0 0; }
.conditions-meta { display:grid; grid-template-columns:1fr 1fr; gap:0; padding:13px 0 1px; }
.conditions-meta > div { display:flex; flex-direction:column; gap:3px; }
.conditions-meta > div + div { padding-left:13px; border-left:1px solid var(--bb-line); }
.conditions-meta span { color:var(--bb-muted); font-size:11px; font-weight:600; }
.conditions-meta strong { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:19px; font-weight:800; white-space:nowrap; }
.conditions-card .network-header { margin-top:15px !important; }
.conditions-card .voltage-mini { margin-top:0 !important; }

/* Parametry pompy: zwarty panel w kolumnie warunków */
.pump-parameters-card .card-body { padding:0 !important; }
.pump-parameters-grid { display:grid; grid-template-columns:1fr 1fr; }
.pump-parameter { min-width:0; padding:12px 13px; border-right:1px solid var(--bb-line); border-bottom:1px solid var(--bb-line); }
.pump-parameter:nth-child(2n) { border-right:0; }
.pump-parameter:nth-last-child(-n + 2) { border-bottom:0; }
.pump-parameter > span { display:block; min-height:27px; color:var(--bb-muted); font-size:11px; font-weight:600; line-height:1.22; }
.pump-parameter strong { display:block; margin-top:5px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:25px; font-weight:800; line-height:1; letter-spacing:-.03em; white-space:nowrap; }
.pump-parameter strong small { color:var(--bb-muted); font-family:Inter,Arial,sans-serif; font-size:11px; font-weight:700; letter-spacing:0; }
.pump-parameter-note { display:block; min-height:13px; margin-top:4px; color:var(--bb-muted); font-size:10px; font-weight:600; line-height:1.2; }
.pump-parameter-flow { border-top:2px solid #3498db; }
.pump-parameter-average-run { border-top:2px solid #3498db; }
.pump-parameter .parameter-info { margin-left:2px; vertical-align:top; }
.pump-parameter .parameter-info-bubble { left:auto; right:-11px; bottom:calc(100% + 8px); width:300px; }
@media (max-width: 767px) { .pump-parameter .parameter-info-bubble { right:-18px; width:min(300px,calc(100vw - 42px)); } }

.heat-pump-status { display:grid; grid-template-columns:28px auto; justify-content:center; column-gap:10px; align-items:center; padding:13px 16px !important; }
.heat-pump-status-icon { margin:0 !important; }
.heat-pump-status-copy { width:132px; text-align:center; }
.heat-pump-status-label { margin-bottom:2px; color:var(--bb-muted); font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.heat-pump-status-text { text-align:center; font-family:Inter,Arial,sans-serif !important; font-size:19px !important; font-weight:800 !important; letter-spacing:0 !important; text-transform:none !important; }
.heat-pump-status-description { margin-top:2px; font-size:10px !important; line-height:1.2; }
.efficiency-badge { display:inline-block; max-width:150px; padding:5px 8px !important; font-family:Inter,Arial,sans-serif; font-size:11px !important; line-height:1.15; white-space:normal; }

.usage-card .waiting-season { display:grid; grid-template-columns:42px minmax(0,1fr); column-gap:15px; align-items:center; padding:18px !important; text-align:left !important; }
.usage-card .waiting-season-icon { grid-row:1 / span 2; margin:0 !important; font-size:34px !important; }
.usage-card .waiting-season-text { font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:23px !important; font-weight:800; line-height:1.02; text-align:left !important; }
.usage-card .waiting-season-info { margin-top:5px; font-size:12px !important; line-height:1.4; text-align:left !important; }

[data-theme="dark"] .conditions-meta > div + div, [data-theme="dark"] .conditions-grid, [data-theme="dark"] .condition-block + .condition-block { border-color:#514d47; }
[data-theme="dark"] .conditions-meta strong { color:#f5f2ec; }
[data-theme="dark"] .pump-parameter { border-color:#514d47; }
[data-theme="dark"] .pump-parameter strong { color:#f5f2ec; }

@media (min-width: 992px) {
  .power-card .card-body { display:grid; grid-template-columns:minmax(0,.9fr) minmax(250px,1.1fr); column-gap:20px; align-items:start; }
  .power-card .power-summary-column { grid-column:1; grid-row:1; min-width:0; }
  .power-card .text-center.mb-3 { margin:4px 0 14px !important; }
  .power-card .heat-power-section { grid-column:2; grid-row:1; min-height:186px; margin:0 !important; padding:18px !important; }
  .power-card .heat-power-value { font-size:42px !important; }
  .power-card .cop-value { font-size:31px !important; }
  .power-card .power-summary-column .heat-pump-status { margin:0 !important; }
  .power-card .power-breakdown { grid-column:1 / -1; grid-row:2; margin-top:15px !important; }
}
@media (max-width: 991px) {
  .conditions-card { margin-bottom:0 !important; }
}
@media (max-width: 767px) {
  .conditions-meta { grid-template-columns:1fr; gap:8px; }
  .conditions-meta > div + div { padding:8px 0 0; border-left:0; border-top:1px solid var(--bb-line); }
  .usage-card .waiting-season { grid-template-columns:35px minmax(0,1fr); padding:16px !important; }
  .usage-card .waiting-season-text { font-size:20px !important; }
}

/* Drobne dopracowanie czytelności */
.conditions-card .network-header { color:#fff !important; }
.conditions-card .network-header i { color:#fff !important; }
.feel-label { display:inline-flex; align-items:center; gap:4px; }
.feel-info { position:relative; display:inline-grid; place-items:center; width:16px; height:16px; padding:0; border:0; background:transparent; color:var(--bb-red); font-size:14px; cursor:help; }
.feel-info-bubble { position:absolute; z-index:20; left:-10px; bottom:calc(100% + 10px); display:block; width:250px; padding:11px 12px; border:1px solid var(--bb-line); background:#fff; box-shadow:0 8px 20px rgba(20,19,17,.13); color:var(--bb-ink); font-family:Inter,Arial,sans-serif; font-size:12px; font-weight:500; line-height:1.45; opacity:0; pointer-events:none; transform:translateY(4px); transition:opacity .18s ease,transform .18s ease; }
.feel-info:hover .feel-info-bubble, .feel-info:focus .feel-info-bubble { opacity:1; pointer-events:auto; transform:translateY(0); }
[data-theme="dark"] .feel-info-bubble { background:#302e2a; border-color:#514d47; color:#f5f2ec; }
@media (max-width: 767px) {
  .feel-info-bubble { left:-95px; width:min(250px,calc(100vw - 44px)); }
}

/* Więcej oddechu bez zmiany charakteru kroju */
.efficiency-badge { min-width:136px; padding:6px 11px !important; font-family:Inter,Arial,sans-serif !important; font-size:11px !important; font-weight:700 !important; letter-spacing:.015em !important; line-height:1.15 !important; text-align:center; white-space:nowrap; }
#cwuCoUsageOLD { font-family:"Barlow Condensed",Arial Narrow,sans-serif !important; letter-spacing:.018em !important; }
#cwuCoUsageOLD + .unit { margin-left:8px !important; }
@media (max-width: 767px) {
  .efficiency-badge { min-width:126px; font-size:11px !important; }
}

/* Wykres wydajności: temperatura jest tłem, noc ma własne oznaczenie */
.efficiency-chart-card .chart-container { background:linear-gradient(180deg,#fff 0%,#fdfcfb 100%) !important; }
.chart-legend .legend-night { cursor:default; }
.chart-legend .legend-night:hover { background:transparent; }
.chart-legend .legend-night .legend-color { background:rgba(21,32,52,.14); border:1px solid rgba(21,32,52,.16); }
[data-theme="dark"] .efficiency-chart-card .chart-container { background:#252421 !important; }
[data-theme="dark"] .chart-legend .legend-night .legend-color { background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.18); }

/* Zużycie energii: wartości mają pierwszeństwo przed siatką tabel */
.energy-overview-panel, .energy-detail-panel { overflow:hidden; }
.energy-panel-lead { max-width:760px; margin:0 0 20px; color:var(--bb-muted); font-size:13px; line-height:1.5; }
.energy-period-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.energy-period-card { min-width:0; min-height:164px; padding:17px 16px 15px; border:1px solid var(--bb-line); border-top:4px solid var(--bb-red); background:#fff; }
.energy-period-card > span { display:block; margin-bottom:8px; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:16px; font-weight:800; letter-spacing:.065em; line-height:1; text-transform:uppercase; }
.energy-period-card > strong, .energy-period-stat > strong { display:flex; align-items:baseline; gap:5px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:37px; font-weight:800; letter-spacing:-.025em; line-height:.95; white-space:nowrap; }
.energy-period-card > strong small, .energy-period-stat > strong small { color:#82909a; font-family:Inter,Arial,sans-serif; font-size:13px; font-weight:700; letter-spacing:0; }
.energy-period-daily { border-top-color:#e24a3b; }
.energy-period-weekly { border-top-color:#f09a12; }
.energy-period-monthly { border-top-color:#2d92cf; }
.energy-period-seasonal { border-top-color:#9256c6; }
.energy-period-yearly { border-top-color:#2bbf70; }
.tariff-split { margin-top:17px; }
.tariff-split-track { display:flex; width:100%; height:8px; overflow:hidden; background:#e9e7e2; }
.tariff-split-day { display:block; min-width:0; background:#f5a316; }
.tariff-split-night { display:block; min-width:0; background:#506f97; }
.tariff-split-values { display:flex; justify-content:space-between; gap:7px; margin-top:7px; color:var(--bb-muted); font-size:10px; font-weight:700; line-height:1.15; white-space:nowrap; }
.tariff-split-values span { display:flex; align-items:center; gap:4px; }
.tariff-split-values i { font-size:10px; }
.tariff-split-values .tariff-share { color:var(--bb-ink); font-weight:800; }
.tariff-split-values .tariff-split-side { align-items:flex-start; }
.tariff-split-values .tariff-split-copy { flex-direction:column; align-items:flex-start; gap:2px; line-height:1; }
.tariff-split-values .tariff-split-side:last-child .tariff-split-copy { align-items:flex-end; }
.tariff-split-values .tariff-split-kwh { display:block; }
.tariff-split-values .tariff-share { display:block; font-size:9px; }
.tariff-split-values span:first-child i { color:#e79510; }
.tariff-split-values span:last-child i { color:#506f97; }
.energy-detail-sections { display:grid; gap:14px; }
.energy-details { border:1px solid var(--bb-line); background:#fff; }
.energy-details summary { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:15px; padding:16px 18px; cursor:pointer; list-style:none; }
.energy-details summary::-webkit-details-marker { display:none; }
.energy-details summary > span { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:21px; font-weight:800; letter-spacing:.025em; line-height:1; text-transform:uppercase; }
.energy-details summary > span > i { margin-right:8px; color:var(--bb-red); font-size:15px; }
.energy-details summary > small { color:var(--bb-muted); font-size:12px; font-weight:600; }
.energy-details-icon { color:var(--bb-red); font-size:13px; transition:transform .18s ease; }
.energy-details[open] .energy-details-icon { transform:rotate(45deg); }
.energy-component-list { display:grid; gap:0; border-top:1px solid var(--bb-line); }
.energy-component-card { display:grid; grid-template-columns:205px minmax(0,1fr); min-width:0; border-bottom:1px solid var(--bb-line); }
.energy-component-card:last-child { border-bottom:0; }
.energy-component-heading { display:flex; align-items:center; gap:8px; padding:17px 16px; border-right:1px solid var(--bb-line); background:#faf9f7; }
.energy-component-heading strong { color:var(--bb-ink); font-size:14px; line-height:1.2; }
.energy-component-heading small { margin-left:auto; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:13px; font-weight:800; letter-spacing:.06em; }
.energy-component-dot { flex:0 0 10px; width:10px; height:10px; background:#3198d6; }
.energy-component-heater .energy-component-dot { background:#ec4b3e; }
.energy-component-circulation .energy-component-dot { background:#28bf70; }
.energy-component-total .energy-component-dot { background:var(--bb-red); }
.energy-component-total .energy-component-heading, .energy-component-total .energy-period-stat { background:#f4f2ee; }
.energy-component-periods { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.energy-component-card:has(.energy-period-stat:nth-child(2):last-child) .energy-component-periods { grid-template-columns:repeat(2,minmax(0,1fr)); }
.energy-period-stat { min-width:0; padding:13px 15px 12px; border-right:1px solid var(--bb-line); }
.energy-period-stat.energy-period-weekly, .energy-period-stat.energy-period-seasonal { background:#edf4fa; }
.energy-period-stat:last-child { border-right:0; }
.energy-period-stat-label { display:block; margin-bottom:6px; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:13px; font-weight:800; letter-spacing:.06em; line-height:1; text-transform:uppercase; }
.energy-period-stat > strong { font-size:27px; }
.energy-period-stat > strong small { font-size:11px; }
.energy-period-stat .tariff-split { margin-top:9px; }
.energy-period-stat .tariff-split-track { height:6px; }
.energy-period-stat .tariff-split-values { margin-top:5px; font-size:9px; }

[data-theme="dark"] .energy-period-card, [data-theme="dark"] .energy-details { background:#252421; border-color:#514d47; }
[data-theme="dark"] .energy-period-card > strong, [data-theme="dark"] .energy-details summary > span, [data-theme="dark"] .energy-component-heading strong, [data-theme="dark"] .energy-period-stat > strong { color:#f5f2ec; }
[data-theme="dark"] .energy-period-card > span, [data-theme="dark"] .energy-panel-lead, [data-theme="dark"] .energy-details summary > small, [data-theme="dark"] .energy-component-heading small, [data-theme="dark"] .energy-period-stat-label, [data-theme="dark"] .tariff-split-values { color:#c6c1b8; }
[data-theme="dark"] .energy-component-list, [data-theme="dark"] .energy-component-card, [data-theme="dark"] .energy-component-heading, [data-theme="dark"] .energy-period-stat { border-color:#514d47; }
[data-theme="dark"] .energy-component-heading { background:#302e2a; }
[data-theme="dark"] .energy-component-total .energy-component-heading, [data-theme="dark"] .energy-component-total .energy-period-stat { background:#37342f; }
[data-theme="dark"] .energy-period-stat.energy-period-weekly, [data-theme="dark"] .energy-period-stat.energy-period-seasonal { background:#29333c; }
[data-theme="dark"] .tariff-split-track { background:#4b4842; }
[data-theme="dark"] .tariff-split-values .tariff-share { color:#f5f2ec; }

@media (max-width:1199px) {
  .energy-period-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .energy-period-card { min-height:150px; }
}
@media (max-width:767px) {
  .energy-panel-lead { margin-bottom:16px; font-size:12px; }
  .energy-period-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .energy-period-card { min-height:142px; padding:14px 13px 12px; }
  .energy-period-card > strong { font-size:32px; }
  .energy-period-card:last-child { grid-column:1 / -1; }
  .energy-details summary { grid-template-columns:minmax(0,1fr) auto; gap:9px; padding:14px; }
  .energy-details summary > span { font-size:18px; }
  .energy-details summary > small { display:none; }
  .energy-component-card { grid-template-columns:1fr; }
  .energy-component-heading { padding:13px 14px; border-right:0; border-bottom:1px solid var(--bb-line); }
  .energy-component-periods, .energy-component-card:has(.energy-period-stat:nth-child(2):last-child) .energy-component-periods { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .energy-period-stat { padding:12px; }
  .energy-period-stat:nth-child(3) { grid-column:1 / -1; border-top:1px solid var(--bb-line); border-right:0; }
  .energy-period-stat > strong { font-size:25px; }
}

/* Miesiące: szybkie porównanie roku bez rezygnacji z dokładnej tabeli */
.monthly-year-summary { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:12px; margin:18px 0; }
.monthly-summary-card { min-width:0; padding:14px 16px; border:1px solid var(--bb-line); background:#faf9f7; }
.monthly-summary-card > span { display:block; margin-bottom:6px; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:800; letter-spacing:.06em; line-height:1; text-transform:uppercase; }
.monthly-summary-card > strong { display:block; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:31px; font-weight:800; letter-spacing:-.02em; line-height:.95; }
.monthly-summary-card > strong small { color:#82909a; font-family:Inter,Arial,sans-serif; font-size:12px; font-weight:700; letter-spacing:0; }
.monthly-summary-card > small { display:block; margin-top:7px; color:var(--bb-muted); font-size:11px; font-weight:600; }
.monthly-summary-current { border-top:4px solid var(--bb-red); background:#fff; }
.monthly-summary-comparison { border-top:4px solid #82909a; }
.monthly-summary-comparison.is-lower { border-top-color:#2bbf70; }
.monthly-summary-comparison.is-lower strong { color:#168650; }
.monthly-summary-comparison.is-higher { border-top-color:#e78822; }
.monthly-summary-comparison.is-higher strong { color:#c66e12; }
.monthly-table-wrap { overflow-x:auto; }
.monthly-table .month-header.current-year-column { background:#314b63 !important; box-shadow:inset 0 4px 0 #8fc5e7; }
.monthly-table td.current-year-column { background:#f1f7fb !important; }
.monthly-table tr.current-month td { background:#e5f2fb !important; border-top:2px solid #77bce7 !important; border-bottom:2px solid #77bce7 !important; }
.monthly-table tr.current-month td:first-child { border-left:3px solid #3d9ad3 !important; }
.monthly-table .current-value { color:var(--bb-red); font-weight:800; }
.current-live-badge { display:inline-block; margin-left:5px; padding:2px 5px; background:var(--bb-red); color:#fff; font-family:Inter,Arial,sans-serif; font-size:9px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; vertical-align:middle; }
.monthly-current-cell { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.monthly-change { position:relative; display:inline-grid; place-items:center; width:17px; height:17px; border-radius:50%; font-size:11px; line-height:1; cursor:help; }
.monthly-change-up { background:#fce8e6; color:#d93025; }
.monthly-change-down { background:#e1f5e9; color:#168650; }
.monthly-change::after { position:absolute; z-index:30; right:0; bottom:calc(100% + 8px); width:220px; padding:9px 10px; border:1px solid var(--bb-line); background:#22211f; box-shadow:0 7px 18px rgba(20,19,17,.18); color:#fff; content:attr(data-tooltip); font-family:Inter,Arial,sans-serif; font-size:11px; font-weight:600; line-height:1.35; opacity:0; pointer-events:none; text-align:left; transform:translateY(4px); transition:opacity .16s ease,transform .16s ease; }
.monthly-change:hover::after, .monthly-change:focus::after { opacity:1; transform:translateY(0); }
[data-theme="dark"] .monthly-summary-card { background:#302e2a; border-color:#514d47; }
[data-theme="dark"] .monthly-summary-current { background:#252421; }
[data-theme="dark"] .monthly-summary-card > strong { color:#f5f2ec; }
[data-theme="dark"] .monthly-summary-card > span, [data-theme="dark"] .monthly-summary-card > small { color:#c6c1b8; }
[data-theme="dark"] .monthly-table td.current-year-column { background:#29333c !important; }
[data-theme="dark"] .monthly-table tr.current-month td { background:#243844 !important; border-color:#4b9ac7 !important; }

@media (max-width:767px) {
  .monthly-year-summary { grid-template-columns:1fr; gap:9px; }
  .monthly-summary-card { padding:13px 14px; }
  .monthly-summary-card > strong { font-size:29px; }
  .monthly-table { min-width:620px; }
}

/* Taryfy: wynik jest najważniejszy, składniki pozostają pod ręką */
.tariff-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.tariff-rate-card, .tariff-savings-card { min-width:0; padding:16px; border:1px solid var(--bb-line); border-top:4px solid var(--bb-ink); background:#fff; }
.tariff-rate-card > span, .tariff-savings-card > span { display:block; margin-bottom:8px; color:var(--bb-muted); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:15px; font-weight:800; letter-spacing:.06em; line-height:1; text-transform:uppercase; }
.tariff-rate-card > strong, .tariff-savings-card > strong { display:block; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:33px; font-weight:800; letter-spacing:-.025em; line-height:.95; white-space:nowrap; }
.tariff-rate-card > small, .tariff-savings-card > small { display:block; margin-top:7px; color:var(--bb-muted); font-size:11px; font-weight:600; line-height:1.3; }
.tariff-rate-day { border-top-color:#ec9a16; }
.tariff-rate-night { border-top-color:#506f97; }
.tariff-savings-card { border-top-color:#82909a; background:#f8f7f4; }
.tariff-savings-card.is-saving { border-top-color:#29b96d; }
.tariff-savings-card.is-saving > strong { color:#168650; }
.tariff-savings-card.is-costlier { border-top-color:#dd4b39; }
.tariff-savings-card.is-costlier > strong { color:#c93627; }
.tariff-config { margin:0 0 14px !important; padding:18px !important; border:1px solid var(--bb-line) !important; background:#f5f3ef !important; }
.tariff-config-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:0 0 16px; }
.tariff-config-heading span { display:block; margin-bottom:4px; color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:13px; font-weight:800; letter-spacing:.08em; line-height:1; text-transform:uppercase; }
.tariff-config-heading h4 { margin:0; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:24px; font-weight:800; line-height:1; text-transform:uppercase; }
.tariff-config-heading p { margin:0; color:var(--bb-muted); font-size:12px; }
.tariff-config-heading p i { color:var(--bb-red); }
.tariff-config-item label { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:17px; font-weight:800; letter-spacing:.025em; text-transform:uppercase; }
.tariff-config-item label span { color:var(--bb-muted); font-family:Inter,Arial,sans-serif; font-size:10px; font-weight:700; letter-spacing:0; }
.tariff-config-input { min-height:43px; background:#fff; color:var(--bb-ink); font-size:17px; font-weight:700; text-align:right; }
.tariff-buttons { display:flex; align-items:center; gap:10px; }
.update-costs-btn, .reset-defaults-btn { margin:0 !important; min-height:40px; font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:17px; font-weight:800; letter-spacing:.035em; text-transform:uppercase; }
.reset-defaults-btn { border:1px solid var(--bb-line) !important; background:transparent !important; color:var(--bb-muted) !important; }
.reset-defaults-btn:hover { background:#e9e6e0 !important; color:var(--bb-ink) !important; }
.tariff-details { margin:0 !important; padding:0 !important; border:1px solid var(--bb-line) !important; background:#fff !important; }
.tariff-details summary { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:15px; padding:15px 17px; cursor:pointer; list-style:none; }
.tariff-details summary::-webkit-details-marker { display:none; }
.tariff-details summary > span { color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:20px; font-weight:800; letter-spacing:.025em; line-height:1; text-transform:uppercase; }
.tariff-details summary > span i, .tariff-details-icon { color:var(--bb-red); }
.tariff-details summary > small { color:var(--bb-muted); font-size:12px; font-weight:600; }
.tariff-details-icon { font-size:13px; transition:transform .18s ease; }
.tariff-details[open] .tariff-details-icon { transform:rotate(45deg); }
.tariff-details-content { padding:0 17px 15px; border-top:1px solid var(--bb-line); }
.tariff-details .tariff-table { margin:14px 0 10px; }
.tariff-details .tariff-source { margin:0; color:var(--bb-muted); font-size:11px; font-style:italic; }
[data-theme="dark"] .tariff-rate-card, [data-theme="dark"] .tariff-savings-card, [data-theme="dark"] .tariff-details { background:#252421 !important; border-color:#514d47 !important; }
[data-theme="dark"] .tariff-rate-card > strong, [data-theme="dark"] .tariff-savings-card > strong, [data-theme="dark"] .tariff-config-heading h4, [data-theme="dark"] .tariff-config-item label, [data-theme="dark"] .tariff-details summary > span { color:#f5f2ec; }
[data-theme="dark"] .tariff-rate-card > span, [data-theme="dark"] .tariff-rate-card > small, [data-theme="dark"] .tariff-savings-card > span, [data-theme="dark"] .tariff-savings-card > small, [data-theme="dark"] .tariff-config-heading p, [data-theme="dark"] .tariff-details summary > small, [data-theme="dark"] .tariff-details .tariff-source { color:#c6c1b8; }
[data-theme="dark"] .tariff-config { background:#302e2a !important; border-color:#514d47 !important; }
[data-theme="dark"] .tariff-config-input { background:#252421; border-color:#514d47 !important; color:#f5f2ec; }
[data-theme="dark"] .reset-defaults-btn { border-color:#514d47 !important; color:#c6c1b8 !important; }
[data-theme="dark"] .tariff-details-content { border-color:#514d47; }

@media (max-width:991px) {
  .tariff-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .tariff-overview { grid-template-columns:1fr; gap:9px; }
  .tariff-config { padding:15px !important; }
  .tariff-config-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .tariff-buttons { align-items:stretch; flex-direction:column; }
  .tariff-details summary { grid-template-columns:minmax(0,1fr) auto; gap:9px; padding:14px; }
  .tariff-details summary > small { display:none; }
  .tariff-details summary > span { font-size:18px; }
  .tariff-details-content { overflow-x:auto; padding:0 12px 12px; }
  .tariff-details .tariff-table { min-width:600px; }
}

/* Taryfy: szczegóły na żądanie i jeden wspólny panel z wynikiem */
.tariff-details-toggle { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-width:155px; padding:8px 10px; border:1px solid var(--bb-red); color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:800; letter-spacing:.035em; line-height:1; text-transform:uppercase; white-space:nowrap; }
.tariff-collapse-text::after { content:"Rozwiń szczegóły"; }
.tariff-details[open] .tariff-collapse-text::after { content:"Zwiń szczegóły"; }
.tariff-details-icon { color:currentColor !important; transform:none !important; }
.tariff-details[open] .tariff-details-icon { transform:rotate(180deg) !important; }
.tariff-details summary:hover .tariff-details-toggle { background:var(--bb-red); color:#fff; }
.tariff-cost-summary { margin:0 0 18px; padding:0 0 18px; border-bottom:2px solid var(--bb-line); }
.tariff-cost-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:12px; }
.tariff-cost-heading > div > span { display:block; margin-bottom:4px; color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:13px; font-weight:800; letter-spacing:.08em; line-height:1; text-transform:uppercase; }
.tariff-cost-heading h4 { margin:0; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:24px; font-weight:800; letter-spacing:.01em; line-height:1; text-transform:uppercase; }
.tariff-cost-heading h4 i { color:var(--bb-red); margin-right:7px; }
.tariff-cost-heading p { max-width:410px; margin:0; color:var(--bb-muted); font-size:12px; line-height:1.35; text-align:right; }
.tariff-cost-heading p i { color:var(--bb-red); }
.tariff-cost-table-wrap { overflow-x:auto; border:1px solid var(--bb-line); }
.tariff-cost-summary .enhanced-table { min-width:650px; margin:0; }
.tariff-cost-summary .enhanced-table th, .tariff-cost-summary .enhanced-table td { vertical-align:middle; }
.tariff-cost-summary .tariff-cost-g11 { color:var(--bb-ink); font-weight:700; }
.tariff-cost-summary .tariff-cost-g12.is-cheaper { background:transparent !important; color:#167d4b !important; font-weight:800; }
.tariff-cost-summary .tariff-cost-g12.is-costlier { background:transparent !important; color:#bf3325 !important; font-weight:800; }
.tariff-cost-summary .tariff-balance.is-cheaper { background:#e7f6ed !important; color:#167d4b !important; font-weight:800; }
.tariff-cost-summary .tariff-balance.is-costlier { background:#fbe8e5 !important; color:#bf3325 !important; font-weight:800; }
.tariff-cost-summary .tariff-cost-g12.is-neutral { background:transparent !important; color:var(--bb-muted) !important; font-weight:700; }
.tariff-cost-summary .tariff-balance.is-neutral { background:#f4f2ed !important; color:var(--bb-muted) !important; font-weight:700; }
.tariff-cost-summary .tariff-balance i { margin-right:6px; font-size:11px; }
[data-theme="dark"] .tariff-cost-summary { border-color:#514d47; }
[data-theme="dark"] .tariff-cost-heading h4 { color:#f5f2ec; }
[data-theme="dark"] .tariff-cost-heading p { color:#c6c1b8; }
[data-theme="dark"] .tariff-cost-summary .tariff-cost-g11 { color:#f5f2ec; }
[data-theme="dark"] .tariff-cost-summary .tariff-cost-g12.is-cheaper { background:transparent !important; color:#84e2ac !important; }
[data-theme="dark"] .tariff-cost-summary .tariff-cost-g12.is-costlier { background:transparent !important; color:#ffaaa0 !important; }
[data-theme="dark"] .tariff-cost-summary .tariff-balance.is-cheaper { background:#1f3c2c !important; color:#84e2ac !important; }
[data-theme="dark"] .tariff-cost-summary .tariff-balance.is-costlier { background:#482826 !important; color:#ffaaa0 !important; }
@media (max-width:767px) {
  .tariff-details-toggle { min-width:0; padding:8px; font-size:12px; }
  .tariff-cost-summary { margin:0 0 14px; padding:0 0 14px; }
  .tariff-cost-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .tariff-cost-heading h4 { font-size:21px; }
  .tariff-cost-heading p { max-width:none; text-align:left; }
}

/* Stopka: kontekst danych zamiast technicznego numeru wersji */
.main-footer { padding-top:20px !important; padding-bottom:20px !important; }
.footer-content { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.footer-brand > span { display:block; margin-bottom:5px; color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:12px; font-weight:800; letter-spacing:.12em; line-height:1; text-transform:uppercase; }
.footer-brand > strong { display:block; font-size:18px; line-height:1.1; }
.footer-meta { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px 16px; color:var(--bb-muted); font-size:11px; font-weight:600; }
.footer-meta span { white-space:nowrap; }
.footer-meta i { color:var(--bb-red); }
.footer-meta a { color:var(--bb-ink); text-decoration:none; }
.footer-meta a:hover { color:var(--bb-red); text-decoration:underline; }
[data-theme="dark"] .footer-meta { color:#c6c1b8; }
[data-theme="dark"] .footer-meta a { color:#f5f2ec; }
@media (max-width:767px) {
  .footer-content { align-items:flex-start; flex-direction:column; gap:13px; }
  .footer-brand > strong { font-size:16px; }
  .footer-meta { justify-content:flex-start; gap:7px 13px; }
}

/* Wspólny, dyskretnie animowany przycisk dla rozwijanych szczegółów */
.details-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:154px; padding:8px 10px; border:1px solid var(--bb-red); color:var(--bb-red); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:14px; font-weight:800; letter-spacing:.035em; line-height:1; text-transform:uppercase; white-space:nowrap; }
.details-action-label::after { content:"Rozwiń szczegóły"; }
details[open] .details-action-label::after { content:"Zwiń szczegóły"; }
.details-action i { color:currentColor !important; font-size:11px !important; transform:none !important; transition:transform .2s ease; }
details[open] .details-action i { transform:rotate(180deg) !important; }
details:not([open]) .details-action { animation:details-action-hint 2.8s ease-in-out infinite; }
details[open] .details-action, details summary:hover .details-action { animation:none; }
details summary:hover .details-action { background:var(--bb-red); color:#fff; }
@keyframes details-action-hint { 0%,62%,100% { transform:translateY(0); box-shadow:0 0 0 0 rgba(218,20,27,0); } 72% { transform:translateY(-2px); box-shadow:0 5px 11px rgba(218,20,27,.16); } 84% { transform:translateY(0); box-shadow:0 0 0 4px rgba(218,20,27,.08); } }
.how-to-read summary .details-action { margin-left:16px; }
.energy-details summary .details-action, .tariff-details summary .details-action { justify-self:end; }
[data-theme="dark"] .details-action { border-color:#f04a4e; color:#ff7779; }
[data-theme="dark"] details summary:hover .details-action { background:#dd272c; color:#fff; }
@media (prefers-reduced-motion:reduce) { details:not([open]) .details-action { animation:none; } }
@media (max-width:767px) { .details-action { min-width:0; padding:8px 9px; font-size:12px; } .how-to-read summary .details-action { margin-left:8px; } }

/* Ekran ładowania: prosty motyw domu i obiegu pompy zamiast domyślnego spinnera */
.loading-spinner { min-height:150px; padding:32px 20px !important; color:var(--bb-muted); }
.pump-loader { position:relative; width:68px; height:58px; margin:0 auto 13px; }
.pump-loader::before { content:""; position:absolute; left:10px; top:11px; width:46px; height:37px; border:3px solid var(--bb-ink); border-top:0; background:#fff; }
.pump-loader::after { content:""; position:absolute; left:10px; top:1px; width:40px; height:40px; border-top:3px solid var(--bb-red); border-left:3px solid var(--bb-red); transform:rotate(45deg); }
.pump-loader span { position:absolute; z-index:1; left:25px; top:23px; width:21px; height:21px; border:3px solid #d8d5cf; border-right-color:var(--bb-red); border-bottom-color:var(--bb-red); border-radius:50%; animation:pump-loader-spin 1s linear infinite; }
.loading-spinner p { margin:0; }
.loading-spinner p strong { display:block; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:20px; font-weight:800; letter-spacing:.035em; line-height:1; text-transform:uppercase; }
.loading-spinner p small { display:block; margin-top:5px; color:var(--bb-muted); font-size:12px; }
@keyframes pump-loader-spin { to { transform:rotate(360deg); } }
[data-theme="dark"] .pump-loader::before { background:#252421; border-color:#f5f2ec; }
[data-theme="dark"] .loading-spinner p strong { color:#f5f2ec; }

/* Krótka droga do pełnego opisu instalacji */
.hero-project-link { display:inline-flex; align-items:center; gap:8px; margin-top:13px; color:var(--bb-ink); font-family:"Barlow Condensed",Arial Narrow,sans-serif; font-size:15px; font-weight:800; letter-spacing:.04em; text-decoration:none; text-transform:uppercase; }
.hero-project-link i { color:var(--bb-red); transition:transform .18s ease; }
.hero-project-link:hover { color:var(--bb-red); }
.hero-project-link:hover i { transform:translateX(4px); }
[data-theme="dark"] .hero-project-link { color:#f5f2ec; }

/* Pasek nawigacji i kolory rzeczywistych trybów pompy */
.site-logo { width:66px; height:52px; object-fit:contain; object-position:left center; }
[data-theme="dark"] .site-logo { filter:brightness(0) invert(1); opacity:.96; }
.site-brand { gap:5px; }
.main-header .site-nav-shortcuts a { position:relative; padding:7px 0; transition:color .18s ease; }
.main-header .site-nav-shortcuts a.is-active { color:var(--bb-red) !important; }
.main-header .site-nav-shortcuts a.is-active::after { content:""; position:absolute; right:0; bottom:0; left:0; height:2px; background:var(--bb-red); }
.mobile-nav a.is-active { color:var(--bb-red) !important; background:#fff1f0; }
.live-summary-status.is-standby i { background:#3498db; box-shadow:0 0 0 4px rgba(52,152,219,.13); }
.live-summary-status.is-co i { background:#f39c12; box-shadow:0 0 0 4px rgba(243,156,18,.13); }
.live-summary-status.is-cwu i { background:#e74c3c; box-shadow:0 0 0 4px rgba(231,76,60,.13); }
.live-summary-status.is-defrost i { background:#9b59b6; box-shadow:0 0 0 4px rgba(155,89,182,.13); }
.live-summary-status.is-off i, .live-summary-status.is-muted i { background:#95a5a6; }
.live-summary-status.is-standby .live-summary-status-value { color:#3498db; }
.live-summary-status.is-co .live-summary-status-value { color:#d88308; }
.live-summary-status.is-cwu .live-summary-status-value { color:#dc4c41; }
.live-summary-status.is-defrost .live-summary-status-value { color:#8d55b2; }
.live-summary-status.is-off .live-summary-status-value, .live-summary-status.is-muted .live-summary-status-value { color:#7b858a; }
.heat-pump-status.heat-pump-status-standby { border-left-color:#3498db !important; background:#edf6fd !important; }
.heat-pump-status.heat-pump-status-standby .heat-pump-status-icon { color:#3498db !important; }
.heat-pump-status.heat-pump-status-co { border-left-color:#f39c12 !important; background:#fff7e8 !important; }
.heat-pump-status.heat-pump-status-co .heat-pump-status-icon { color:#f39c12 !important; }
.heat-pump-status.heat-pump-status-cwu { border-left-color:#e74c3c !important; background:#fcebea !important; }
.heat-pump-status.heat-pump-status-cwu .heat-pump-status-icon { color:#e74c3c !important; }
.heat-pump-status.heat-pump-status-defrost { border-left-color:#9b59b6 !important; background:#f5edfb !important; }
.heat-pump-status.heat-pump-status-defrost .heat-pump-status-icon { color:#9b59b6 !important; }
[data-theme="dark"] .mobile-nav a.is-active { color:#ff7779 !important; background:#452725; }
[data-theme="dark"] .heat-pump-status.heat-pump-status-standby { background:#203644 !important; }
[data-theme="dark"] .heat-pump-status.heat-pump-status-co { background:#45351d !important; }
[data-theme="dark"] .heat-pump-status.heat-pump-status-cwu { background:#492927 !important; }
[data-theme="dark"] .heat-pump-status.heat-pump-status-defrost { background:#392c45 !important; }

/* Miniony i bieżący sezon są osobnymi, proporcjonalnymi panelami */
.previous-season-card { margin-top:12px !important; }
.previous-season-card .card-header { min-height:44px; padding:8px 16px !important; }
.previous-season-card .card-title { font-size:19px !important; }
.previous-season-card .card-body { padding:8px 16px 9px !important; }
.previous-season-card .season-date-display { margin-bottom:4px; padding:5px 9px !important; border-left-width:3px; font-size:11px !important; line-height:1.2; }
.previous-season-card .season-date-value { font-size:11px !important; }
.previous-season-total { margin:0 0 5px; text-align:center; }
.previous-season-total .main-value { font-size:44px !important; line-height:.88; }
.previous-season-total .text-muted { margin:2px 0 0; font-size:10px; line-height:1.15; }
.previous-season-card .co-cwu-breakdown { gap:8px; margin-top:0 !important; }
.previous-season-card .co-box, .previous-season-card .cwu-box { min-height:64px; padding:7px 7px !important; }
.previous-season-card .co-box-title, .previous-season-card .cwu-box-title { margin-bottom:2px; font-size:13px !important; }
.previous-season-card .co-box-subtitle, .previous-season-card .cwu-box-subtitle { min-height:15px; margin-bottom:3px; font-size:9px !important; line-height:1.1; }
.previous-season-card .co-box-value, .previous-season-card .cwu-box-value { font-size:16px !important; }
.previous-season-pending-slot .previous-season-card { margin:0 0 16px !important; }
.status-info { position:relative; display:inline-grid; place-items:center; width:16px; height:16px; margin-left:4px; padding:0; border:0; background:transparent; color:#3498db; font-size:14px; vertical-align:middle; cursor:help; }
.status-info-bubble { position:absolute; z-index:30; left:-12px; bottom:calc(100% + 10px); display:grid; gap:7px; width:310px; padding:12px 13px; border:1px solid var(--bb-line); background:#fff; box-shadow:0 8px 20px rgba(20,19,17,.13); color:var(--bb-ink); font-family:Inter,Arial,sans-serif; font-size:12px; font-weight:500; line-height:1.4; letter-spacing:0; text-align:left; text-transform:none; opacity:0; pointer-events:none; transform:translateY(4px); transition:opacity .18s ease,transform .18s ease; }
.status-info-bubble strong { color:var(--bb-ink); font-size:13px; font-weight:800; }
.status-info-bubble b { color:#3498db; font-weight:800; }
.status-info:hover .status-info-bubble, .status-info:focus .status-info-bubble { opacity:1; pointer-events:auto; transform:translateY(0); }
[data-theme="dark"] .status-info-bubble { background:#302e2a; border-color:#514d47; color:#f5f2ec; }
[data-theme="dark"] .status-info-bubble strong { color:#f5f2ec; }
.energy-unit, .tariff-config-item label span .energy-unit { text-transform:none !important; }
.season-info { position:relative; display:inline-grid; place-items:center; width:17px; height:17px; margin-left:4px; padding:0; border:0; background:transparent; color:#3498db; font-size:14px; vertical-align:middle; cursor:help; }
.season-info-bubble { position:absolute; z-index:30; top:calc(100% + 10px); right:-10px; display:block; width:280px; padding:11px 12px; border:1px solid var(--bb-line); background:#fff; box-shadow:0 8px 20px rgba(20,19,17,.13); color:var(--bb-ink); font-family:Inter,Arial,sans-serif; font-size:12px; font-weight:500; line-height:1.45; letter-spacing:0; text-transform:none; opacity:0; pointer-events:none; transform:translateY(-4px); transition:opacity .18s ease,transform .18s ease; }
.season-info:hover .season-info-bubble, .season-info:focus .season-info-bubble { opacity:1; pointer-events:auto; transform:translateY(0); }
[data-theme="dark"] .season-info-bubble { background:#302e2a; border-color:#514d47; color:#f5f2ec; }
@media (max-width:991px) { .previous-season-card { margin-top:0 !important; } }
@media (max-width:767px) { .season-info-bubble { right:-42px; width:min(280px,calc(100vw - 42px)); } }
@media (max-width:767px) { .status-info-bubble { left:-100px; width:min(310px,calc(100vw - 42px)); } }

/* Dzienna i nocna część zużycia czytelnie nawiązują do taryf */
.usage-summary .parameter-label.tariff-day, .usage-summary .parameter-value.tariff-day { color:#e79510 !important; }
.usage-summary .parameter-label.tariff-night, .usage-summary .parameter-value.tariff-night { color:#506f97 !important; }

/* Jeden kontrastowy zestaw zmiennych dla całego trybu ciemnego */
[data-theme="dark"] {
  --bb-ink:#f5f2ec;
  --bb-paper:#181817;
  --bb-panel:#252421;
  --bb-line:#514d47;
  --bb-muted:#c6c1b8;
}
[data-theme="dark"] .cwu-box { background:#492927 !important; border-color:#754743 !important; }
[data-theme="dark"] .co-box-subtitle, [data-theme="dark"] .cwu-box-subtitle { color:#c6c1b8 !important; }
[data-theme="dark"] .usage-summary { background:#302e2a !important; border-color:#514d47 !important; }
[data-theme="dark"] .parameter-row { border-color:#514d47 !important; }
[data-theme="dark"] .monthly-change-up { background:#482826; color:#ffaaa0; }
[data-theme="dark"] .monthly-change-down { background:#1f3c2c; color:#84e2ac; }
[data-theme="dark"] .usage-summary .parameter-label.tariff-day, [data-theme="dark"] .usage-summary .parameter-value.tariff-day { color:#ffc15a !important; }
[data-theme="dark"] .usage-summary .parameter-label.tariff-night, [data-theme="dark"] .usage-summary .parameter-value.tariff-night { color:#a9c7ef !important; }
