:root {
  --ec-color-brand-black: #1c2f3c;
  --ec-color-brand-green: #d5ea3b;
  --ec-color-primary: #1c2f3c;
  --ec-color-primary-light: #f7f9fb;
  --ec-color-text: #1c2733;
  --ec-color-muted: #5d6976;
  --ec-color-border: #d9e0e7;
  --ec-color-surface: #ffffff;
  --ec-color-page: #ffffff;
  --ec-border-radius: 4px;
  --ec-font-size: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-y: auto;
  color: var(--ec-color-text);
  background: var(--ec-color-page);
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-size: var(--ec-font-size);
}

a { color: #2268a8; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.container { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mr-3 { margin-right: 1rem; }
.mt-3 { margin-top: 1rem; }
.ml-2 { margin-left: .5rem; }
.pl-4 { padding-left: 1.5rem; }
.border-top { border-top: 1px solid var(--ec-color-border); }
.border-bottom { border-bottom: 1px solid var(--ec-color-border); }
.text-wrap { white-space: normal; }
.font-weight-bold { font-weight: 700; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background-color: var(--ec-color-brand-black);
  box-shadow: 0 1px 4px rgba(28, 47, 60, .5);
}

.nav-logo { height: 2.5rem; display: block; }
.navbar-nav { display: flex; flex-wrap: wrap; list-style: none; align-items: center; height: 2.5rem; gap: 2rem; margin: 0; padding: 0; }
.nav-link { color: var(--ec-color-primary-light); display: inline-block; height: 1.25rem; border-bottom: 2px solid transparent; transition: border-color .2s ease-in-out; }
.nav-link:hover, .nav-link:focus, .nav-link.active { border-color: var(--ec-color-brand-green); text-decoration: none; }
.nav-cta { display: flex; align-items: center; background-color: var(--ec-color-brand-green); color: var(--ec-color-primary); height: 2.5rem; padding: 0 1rem; border-radius: var(--ec-border-radius); font-weight: 700; }

.row { display: flex; gap: 2rem; }
.col { flex: 1 1 0; }
.col-md-auto { flex: 0 0 auto; }
.text-display-1 { font-size: 1rem; line-height: 1.55; }
.hero-title { font-size: 3rem; line-height: 1.08; margin: 0; color: var(--ec-color-brand-black); }
.hero-ad { width: 300px; max-width: 100%; display: block; }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--ec-color-border); }
.tab-link { color: var(--ec-color-muted); padding: .75rem 1rem; border-bottom: 3px solid transparent; font-weight: 700; }
.tab-link.active, .tab-link:hover, .tab-link:focus { color: var(--ec-color-primary); border-bottom-color: var(--ec-color-brand-green); text-decoration: none; }
.tab-menu { position: relative; }
.tab-menu-toggle { display: inline-flex; align-items: center; gap: .5rem; height: 100%; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 700; cursor: pointer; }
.tab-menu-toggle::after { content: ""; width: .4rem; height: .4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-25%) rotate(45deg); transition: transform .15s ease-in-out; }
.tab-menu-toggle[aria-expanded="true"]::after { transform: translateY(25%) rotate(-135deg); }
.tab-menu-list { position: absolute; top: calc(100% + 1px); left: 0; z-index: 10; min-width: 100%; padding: .35rem 0; background: #fff; border: 1px solid var(--ec-color-border); border-radius: var(--ec-border-radius); box-shadow: 0 8px 24px rgba(28, 47, 60, .14); }
.tab-menu-list[hidden] { display: none; }
.tab-menu-item { display: block; padding: .6rem 1rem; color: var(--ec-color-text); font-weight: 600; white-space: nowrap; }
.tab-menu-item:hover, .tab-menu-item:focus { background: var(--ec-color-primary-light); text-decoration: none; }
.tab-menu-item.active { color: var(--ec-color-primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--ec-color-brand-green); }
.tab-select-field { display: none; }
.tabs.tabs-collapsed { padding-bottom: 1rem; }
.tabs.tabs-collapsed > .tab-link, .tabs.tabs-collapsed > .tab-menu { display: none; }
.tabs.tabs-collapsed > .tab-select-field { display: block; width: 100%; }

.report-section { display: none; }
.report-section.active { display: block; }
.report-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.report-form.heating { grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 1fr)) minmax(250px, auto); }
.form-field label, .field-label { display: block; color: var(--ec-color-muted); font-size: .78rem; font-weight: 700; margin-bottom: .35rem; }
.form-control { width: 100%; height: 2.5rem; border: 1px solid var(--ec-color-border); border-radius: var(--ec-border-radius); background: #fff; padding: 0 .75rem; color: var(--ec-color-text); }
.radio-toggle {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: .1875rem;
  border: 1px solid #b8c3cc;
  border-radius: 999px;
  background: #edf1f4;
  box-shadow: inset 0 1px 2px rgba(28,47,60,.08);
}
.radio-toggle label {
  margin: 0;
  height: 100%;
}
.radio-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3.125rem;
  height: 100%;
  padding: 0 .875rem;
  border-radius: 999px;
  color: #405364;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  transition: background-color .15s ease-in-out, color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.radio-toggle span:hover {
  color: var(--ec-color-primary);
}
.radio-toggle input:focus-visible + span {
  outline: 2px solid var(--ec-color-brand-green);
  outline-offset: 2px;
}
.radio-toggle input:checked + span {
  background: var(--ec-color-brand-black);
  color: #fff;
  box-shadow: 0 1px 2px rgba(28,47,60,.22);
}
.btn { height: 2.5rem; border: 0; border-radius: var(--ec-border-radius); background: #0d5f91; color: #fff; padding: 0 1rem; font-weight: 700; cursor: pointer; }
.btn:hover, .btn:focus { background: #094f7a; }
.btn:focus-visible { outline: 2px solid var(--ec-color-brand-green); outline-offset: 2px; }
.btn-secondary { background: #33475b; }

.card { background: var(--ec-color-surface); border: 1px solid var(--ec-color-border); border-radius: var(--ec-border-radius); box-shadow: 0 1px 2px rgba(28,47,60,.05); margin-bottom: 1.5rem; overflow: hidden; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--ec-color-border); background: #fff; }
.card-title { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--ec-color-border); background: #fbfcfd; color: var(--ec-color-muted); }
.chart-placeholder { min-height: 350px; padding: 1rem; display: flex; align-items: center; justify-content: center; color: var(--ec-color-muted); border-bottom: 1px solid var(--ec-color-border); }
.chart-bars { width: 100%; height: 300px; display: flex; gap: .5rem; align-items: end; padding: 1rem; }
.chart-series { flex: 1; display: flex; align-items: end; justify-content: center; height: 100%; background: linear-gradient(180deg, #e9f5ce 0%, #f8fbf1 100%); border-radius: 3px 3px 0 0; color: #33475b; font-size: .75rem; padding-bottom: .5rem; }

.table-wrap { overflow-x: auto; }
table.ec-table { width: 100%; border-collapse: collapse; background: #fff; }
.ec-table th, .ec-table td { border-bottom: 1px solid var(--ec-color-border); padding: .65rem .75rem; text-align: left; white-space: nowrap; }
.ec-table th { color: #33475b; font-weight: 700; background: #f8fafc; }
.ec-table tbody tr:hover { background: #fbfcfd; }
.secondHeaderRow td { background: #f0f6df; font-weight: 700; }
.link-button { border: 0; background: transparent; color: #2268a8; padding: 0; cursor: pointer; font: inherit; }

.faq-item { padding: 1rem 0; }
.faq-question { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.faq-question h2 { margin: 0; font-size: 1.1rem; }
.faq-toggle { width: 1.5rem; height: 1.5rem; border: 1px solid var(--ec-color-border); background: #fff; border-radius: 50%; font-weight: 700; }
.faq-answer { margin-top: 1rem; margin-left: .5rem; padding-left: 1.5rem; line-height: 1.55; color: var(--ec-color-text); }

footer.container { height: 4.5rem; }
.text-body-1 { margin: 0; }
.text-caption-2 { font-size: .82rem; line-height: 1.4; }
.status-message { margin: .75rem 0; color: var(--ec-color-muted); }
.error-message { color: #b42318; font-weight: 700; }

@media (max-width: 920px) {
  .row { flex-direction: column; }
  .report-form, .report-form.heating { grid-template-columns: 1fr 1fr; }
  .nav-cta { margin-top: .75rem; }
}

@media (max-width: 620px) {
  .navbar .container { align-items: flex-start; gap: 1rem; }
  .navbar-nav { height: auto; gap: 1rem; }
  .hero-title { font-size: 2.2rem; }
  .report-form, .report-form.heating { grid-template-columns: 1fr; }
  .daily-modal .modal-header { flex-direction: column; align-items: flex-start; }
}

body.modal-open { overflow: hidden; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 47, 60, .58); backdrop-filter: blur(2px); }
.modal-panel { position: relative; width: min(920px, 100%); max-height: min(760px, calc(100vh - 2rem)); overflow: hidden; background: #fff; border-radius: 12px; box-shadow: 0 24px 70px rgba(28, 47, 60, .35); border: 1px solid rgba(255,255,255,.55); }
.modal-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; border-bottom: 1px solid var(--ec-color-border); background: linear-gradient(135deg, #fff, #f4f8ef); }
.modal-header h2 { margin: 0; color: var(--ec-color-brand-black); font-size: 1.25rem; }
.modal-header p { margin: .25rem 0 0; color: var(--ec-color-muted); }
.modal-close { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 999px; background: var(--ec-color-brand-black); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal-close:hover, .modal-close:focus { background: #243f51; outline: 2px solid var(--ec-color-brand-green); outline-offset: 2px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; flex-shrink: 0; }
.map-modal iframe { display: block; width: 100%; height: min(560px, calc(100vh - 11rem)); border: 0; background: #eef3f6; }

.daily-modal .modal-panel { width: min(1000px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.daily-modal .modal-header { align-items: center; }
.daily-modal .modal-body { display: flex; flex-direction: column; min-height: 0; padding: 0 1.25rem 1.25rem; background: var(--ec-color-page); }
.daily-modal .status-message:empty { display: none; }
.daily-table-wrap { flex: 1 1 auto; min-height: 8rem; overflow: auto; margin-top: 1rem; border: 1px solid var(--ec-color-border); border-radius: var(--ec-border-radius); background: #fff; }
.daily-table thead th { position: sticky; z-index: 1; height: 2.5rem; padding-top: 0; padding-bottom: 0; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--ec-color-border); }
.daily-table thead tr:first-child th { top: 0; font-weight: 600; }
.daily-table thead tr:last-child th { top: 2.5rem; }
.daily-legend-title { margin: 1rem 0 .5rem; font-size: 1rem; }
.daily-legend { margin: 0; padding: 0; list-style: none; line-height: 1.7; }

.btn-outline { background: #fff; color: var(--ec-color-primary); box-shadow: inset 0 0 0 1px #b8c3cc; }
.btn-outline:hover, .btn-outline:focus { background: var(--ec-color-primary-light); }
