:root {
  --bg: #f5f7f5;
  --ink: #17201b;
  --muted: #647069;
  --panel: #ffffff;
  --line: #dce5df;
  --dk1: #006d77;
  --dk2: #c2410c;
  --good: #087f5b;
  --warn: #b45309;
  --bad: #b42318;
  --shadow: 0 16px 40px rgba(18, 37, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(245, 247, 245, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, #b7f7d8 0 8%, transparent 9%),
    linear-gradient(135deg, transparent 34%, #d9f99d 35% 46%, transparent 47%),
    linear-gradient(135deg, #064e3b, #0f766e 56%, #14532d);
  box-shadow: inset 0 0 0 1px rgba(6, 78, 59, 0.2), 0 8px 18px rgba(6, 78, 59, 0.22);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 9px;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #d9f99d;
  box-shadow: 0 -7px 0 #d9f99d;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.language-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.language-toggle button.is-active {
  background: var(--ink);
  color: #fff;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
}

.live-pill {
  min-width: 86px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eaf6ef;
  color: var(--good);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.live-pill.is-loading {
  color: var(--warn);
  background: #fff7ed;
}

.live-pill.is-error {
  color: var(--bad);
  background: #fef3f2;
}

main {
  padding: 18px clamp(18px, 4vw, 56px) 48px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.control-band {
  position: sticky;
  top: 72px;
  z-index: 8;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tab-bar {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tab-bar button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.tab-bar button.is-active {
  background: var(--ink);
  color: #fff;
}

.tab-view[hidden] {
  display: none;
}

.anchor-target {
  display: block;
  scroll-margin-top: 150px;
}

.control-band label,
.toggle-group span {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.date-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.control-band input,
.control-band select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.control-band button,
.table-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.sticky-download {
  margin-left: auto;
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #fff !important;
}

.toggle-group {
  display: flex;
  align-items: end;
  gap: 0;
}

.toggle-group span {
  margin-right: 8px;
  padding-bottom: 12px;
}

.toggle-group button {
  border-radius: 0;
}

.toggle-group button:first-of-type {
  border-radius: 8px 0 0 8px;
}

.toggle-group button:last-of-type {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.toggle-group button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero-copy {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(210px, 0.62fr);
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 47, 43, 0.92), rgba(23, 85, 83, 0.76)),
    url("https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hero-text-block {
  max-width: 760px;
}

.hero-kicker .eyebrow {
  margin-bottom: 0;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy p {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-map {
  position: relative;
  justify-self: end;
  width: min(260px, 100%);
  aspect-ratio: 1.04;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-map svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.18));
}

.map-dk1 {
  fill: rgba(217, 249, 157, 0.82);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3;
}

.map-dk2 {
  fill: rgba(94, 234, 212, 0.78);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3;
}

.map-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.36);
  stroke-dasharray: 6 8;
  stroke-width: 2;
}

.map-label {
  position: absolute;
  display: grid;
  gap: 1px;
  min-width: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(4, 47, 46, 0.72);
  color: #fff;
  text-align: center;
}

.map-label strong {
  font-size: 0.92rem;
}

.map-label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 800;
}

.map-label-dk1 {
  left: 26px;
  bottom: 38px;
}

.map-label-dk2 {
  right: 24px;
  top: 54px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
}

.hero-side {
  display: grid;
  gap: 14px;
}

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

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 152px;
  padding: 22px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card b {
  display: block;
  margin: 12px 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1;
}

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

.activity-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #d9f99d;
  color: #14532d;
  box-shadow: inset 0 0 0 1px rgba(20, 83, 45, 0.12);
  position: relative;
}

.activity-icon::before,
.activity-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.activity-icon-shower::before {
  width: 20px;
  height: 12px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  top: 11px;
}

.activity-icon-shower::after {
  width: 24px;
  height: 10px;
  left: 9px;
  bottom: 9px;
  background:
    radial-gradient(circle, currentColor 2px, transparent 3px) 0 0/8px 8px,
    radial-gradient(circle, currentColor 1.5px, transparent 2.5px) 4px 4px/8px 8px;
}

.activity-icon-oven::before {
  width: 23px;
  height: 23px;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.activity-icon-oven::after {
  width: 12px;
  height: 3px;
  top: 14px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor;
}

.activity-icon-washer::before {
  width: 24px;
  height: 26px;
  border: 3px solid currentColor;
  border-radius: 5px;
}

.activity-icon-washer::after {
  width: 12px;
  height: 12px;
  border: 3px solid currentColor;
  border-radius: 999px;
  bottom: 9px;
}

.activity-icon-car::before {
  width: 26px;
  height: 13px;
  border: 3px solid currentColor;
  border-radius: 7px 7px 4px 4px;
  bottom: 13px;
}

.activity-icon-car::after {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  bottom: 10px;
  left: 12px;
  box-shadow: 14px 0 0 currentColor;
}

.activity-icon-dishwasher::before {
  width: 24px;
  height: 26px;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.activity-icon-dishwasher::after {
  width: 15px;
  height: 3px;
  top: 14px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor;
}

.activity-icon-tv::before {
  width: 25px;
  height: 17px;
  border: 3px solid currentColor;
  border-radius: 3px;
  top: 11px;
}

.activity-icon-tv::after {
  width: 17px;
  height: 3px;
  bottom: 10px;
  background: currentColor;
}

.activity-card h3 {
  margin: 0 0 4px;
  font-size: 0.94rem;
}

.activity-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1;
}

.activity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.chart-panel {
  margin-bottom: 22px;
  padding: 0;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.heatmap {
  margin-bottom: 18px;
}

.heatmap-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.heatmap-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.heatmap-scale i {
  width: 140px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(150, 76%, 44%), hsl(82, 76%, 44%), hsl(15, 76%, 44%));
}

.heatmap-band + .heatmap-band {
  margin-top: 14px;
}

.heatmap-band-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.heatmap-matrix {
  display: grid;
  grid-template-columns: 92px repeat(var(--columns), minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
}

.heat-cell {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  font-size: clamp(0.72rem, 0.9vw, 0.88rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-cell.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(23, 32, 27, 0.18), 0 14px 30px rgba(18, 37, 29, 0.18);
}

.heat-cell.is-current {
  border-color: #111827;
  outline: 2px solid #fff;
  box-shadow: inset 0 0 0 2px #111827, 0 0 0 3px rgba(180, 83, 9, 0.46);
  transform: none;
  z-index: 2;
  animation: nowPulse 1.8s ease-in-out infinite;
}

@keyframes nowPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px #111827, 0 0 0 3px rgba(180, 83, 9, 0.36);
  }
  50% {
    box-shadow: inset 0 0 0 2px #111827, 0 0 0 5px rgba(180, 83, 9, 0.58);
  }
}

.heat-time {
  display: grid;
  align-items: end;
  min-width: 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.heat-row-label,
.heatmap-corner {
  display: grid;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}

.heat-row-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.chart-panel .panel-heading {
  padding: 22px 22px 0;
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 24px;
  height: 3px;
  border-radius: 999px;
}

.line-dk1 {
  background: var(--dk1);
}

.line-dk2 {
  background: var(--dk2);
}

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

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

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

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

td {
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}

tbody tr {
  cursor: pointer;
}

tr.is-selected {
  position: relative;
  background: #f0f8f5;
  box-shadow: inset 4px 0 0 var(--dk1), 0 8px 22px rgba(18, 37, 29, 0.12);
}

tr.is-current {
  background: #fff1dc;
  box-shadow: inset 5px 0 0 #111827, inset 9px 0 0 var(--warn);
  font-weight: 900;
}

tr.is-current td:first-child {
  padding-left: 20px;
}

tr.is-selected.is-current {
  box-shadow: inset 4px 0 0 var(--warn), 0 8px 22px rgba(18, 37, 29, 0.14);
}

.now-chip {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.error-box {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #f5c2bc;
  border-radius: 8px;
  background: #fff5f3;
  color: var(--bad);
}

.dso-panel {
  width: 100%;
}

.dso-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.dso-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dso-form input,
.dso-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.dso-form input {
  width: 180px;
}

.dso-form button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.dso-result {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.tariff-dashboard {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.tariff-heading button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.dso-hint,
.loading-box {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.dso-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  cursor: pointer;
}

.dso-card + .dso-card {
  margin-top: 0;
}

.dso-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(23, 32, 27, 0.16), 0 12px 26px rgba(18, 37, 29, 0.14);
}

.dso-card span {
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dso-card h3 {
  margin: 8px 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.dso-card dl {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.dso-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.dso-card dt {
  color: var(--muted);
  font-weight: 800;
}

.dso-card dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.dso-card small {
  color: var(--muted);
  line-height: 1.45;
}

.dso-current-tariff {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(0, 109, 119, 0.18);
  border-radius: 8px;
  background: #ecfdf5;
}

.dso-current-tariff span {
  color: var(--dk1);
}

.dso-current-tariff strong {
  display: block;
  margin: 10px 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.dso-current-tariff small {
  color: var(--muted);
  font-weight: 800;
}

.feedback-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
}

.feedback-widget summary {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(23, 32, 27, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(18, 37, 29, 0.22);
  font-size: 1.3rem;
  font-weight: 1000;
  list-style: none;
  animation: feedbackPulse 2.2s ease-in-out infinite;
}

.feedback-widget summary::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(8, 127, 91, 0.26);
  border-radius: inherit;
  animation: feedbackRing 2.2s ease-out infinite;
}

.feedback-widget summary::-webkit-details-marker {
  display: none;
}

@keyframes feedbackPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 18px 38px rgba(18, 37, 29, 0.22);
  }
  50% {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(18, 37, 29, 0.28);
  }
}

@keyframes feedbackRing {
  0% {
    opacity: 0.9;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

.feedback-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(340px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(18, 37, 29, 0.18);
}

.feedback-panel h2 {
  margin-bottom: 12px;
}

.feedback-panel form,
.feedback-panel label {
  display: grid;
  gap: 8px;
}

.feedback-panel form {
  gap: 12px;
}

.feedback-panel label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.feedback-panel input,
.feedback-panel select,
.feedback-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
}

.feedback-panel button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.feedback-status {
  margin: 0;
  color: var(--good);
  font-size: 0.84rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .hero-map {
    justify-self: start;
    width: min(240px, 72vw);
  }

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

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-copy {
    min-height: 0;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .current-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }

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

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-band {
    align-items: stretch;
    flex-direction: column;
  }

  .date-controls,
  .toggle-group {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .date-controls label {
    flex: 1;
  }

  .toggle-group span {
    width: 100%;
    padding-bottom: 0;
  }

  .toggle-group button {
    flex: 1;
  }

  .sticky-download {
    width: 100%;
    margin-left: 0;
  }

  .tab-bar {
    display: flex;
    width: 100%;
  }

  .tab-bar button {
    flex: 1;
    padding: 0 10px;
  }

  .dso-form,
  .dso-form label,
  .dso-form input,
  .dso-form select,
  .dso-form button {
    width: 100%;
  }

  .dso-card {
    grid-template-columns: 1fr;
  }

  .chart {
    height: 320px;
    min-height: 320px;
  }

  .heatmap-matrix {
    grid-template-columns: 80px repeat(var(--columns), minmax(34px, 1fr));
    overflow-x: auto;
  }

  .feedback-widget {
    right: 14px;
    bottom: 14px;
  }
}
