:root {
  --bg-deep: #0b1f17;
  --bg-mid: #123528;
  --panel: rgba(248, 250, 249, 0.92);
  --panel-border: rgba(15, 50, 36, 0.12);
  --ink: #0f241c;
  --muted: #4a6358;
  --accent: #1f8a5b;
  --accent-soft: #d8f3e6;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(8, 28, 20, 0.28);
  --font: "Heebo", "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-deep);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 15% 10%, rgba(56, 189, 130, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(14, 116, 144, 0.28), transparent 50%),
    linear-gradient(165deg, #0b1f17 0%, #123528 45%, #0a1620 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    -18deg,
    transparent 0 14px,
    rgba(255, 255, 255, 0.04) 14px 15px
  );
}

.gear-btn {
  position: fixed;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 231, 196, 0.35);
  border-radius: 12px;
  background: rgba(11, 31, 23, 0.72);
  color: #c6f6d5;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.gear-btn:hover {
  background: rgba(31, 138, 91, 0.35);
  color: #fff;
}

.gear-btn:active {
  transform: translateY(1px);
}

.gear-btn.is-active,
body.settings-open .gear-btn {
  background: rgba(31, 138, 91, 0.55);
  color: #fff;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.settings-hero {
  margin-bottom: 1.25rem;
  color: #f4faf7;
  animation: rise 0.55s ease both;
}

.settings-hero h1 {
  margin: 0.85rem 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.btn-back {
  background: rgba(248, 250, 249, 0.12);
  border-color: rgba(159, 231, 196, 0.35);
  color: #c6f6d5;
}

.btn-back:hover {
  background: rgba(248, 250, 249, 0.2);
  color: #fff;
}

.hero {
  margin-bottom: 1.75rem;
  color: #f4faf7;
  animation: rise 0.7s ease both;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.brand {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9fe7c4;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.btn-install {
  margin-inline-start: auto;
  background: #d8f3e6;
  color: #0f6b42;
  border: 1px solid rgba(31, 138, 91, 0.35);
}

.btn-install:hover {
  background: #c6ecd9;
}

.install-hint {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: rgba(232, 245, 238, 0.75);
}

.lede {
  margin: 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(232, 245, 238, 0.82);
}

.system-badge,
.util-badge {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(156, 231, 196, 0.16);
  border: 1px solid rgba(159, 231, 196, 0.35);
  color: #c6f6d5;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.util-badge {
  margin-inline-start: 0.5rem;
  background: rgba(94, 234, 212, 0.14);
  border-color: rgba(94, 234, 212, 0.35);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.5rem;
  backdrop-filter: blur(10px);
  animation: rise 0.85s ease 0.08s both;
}

.panel + .panel {
  margin-top: 1rem;
}

.settings-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.settings-form {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.field-hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.ui-input {
  height: 36px;
  border: 1px solid rgba(15, 36, 28, 0.18);
  border-radius: 8px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 0.92rem;
  background: #fff;
  color: var(--ink);
}

.ui-input:focus {
  outline: 2px solid rgba(31, 138, 91, 0.35);
  outline-offset: 1px;
  border-color: var(--accent);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
  justify-content: flex-start;
}

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

.btn-primary:hover {
  background: #187a50;
  color: #fff;
}

.settings-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.settings-status.is-ok {
  color: var(--accent);
  font-weight: 600;
}

.settings-status.is-error {
  color: var(--danger);
  font-weight: 600;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.btn {
  appearance: none;
  border: 1px solid rgba(31, 138, 91, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  height: 36px;
  padding: 0 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: #c7edd9;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.state {
  min-height: 8rem;
}

.hidden {
  display: none !important;
}

#state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(31, 138, 91, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.state-error {
  background: var(--danger-bg);
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
}

.error-title {
  margin: 0 0 0.4rem;
  color: var(--danger);
  font-weight: 700;
  font-size: 1.05rem;
}

.error-body {
  margin: 0 0 0.55rem;
  line-height: 1.5;
}

.error-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.metric {
  text-align: center;
  padding: 0.6rem 0 1.25rem;
  border-bottom: 1px solid rgba(15, 36, 28, 0.08);
  margin-bottom: 1.15rem;
}

.metric-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
}

.metric-value {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-value .unit {
  margin-inline-start: 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: 0.35em;
}

.metric-sub {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat {
  background: #f3f8f5;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  display: grid;
  gap: 0.25rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
}

.stat-unit {
  color: var(--muted);
  font-size: 0.8rem;
}

.plants {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.plant {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(15, 36, 28, 0.08);
  border-radius: 10px;
  background: #fff;
}

.plant-name {
  font-weight: 600;
}

.plant-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: start;
}

.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ui-select {
  height: 36px;
  border: 1px solid rgba(15, 36, 28, 0.18);
  border-radius: 8px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ink);
  max-width: min(100%, 280px);
}

.subhead {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(15, 36, 28, 0.08);
  border-radius: 12px;
  background: #fff;
}

.table-wrap-tall {
  max-height: 28rem;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.65rem;
  text-align: start;
  border-bottom: 1px solid rgba(15, 36, 28, 0.08);
  white-space: nowrap;
}

.data-table th {
  background: #f3f8f5;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: end;
}

.data-table tr.is-debt td.net {
  color: var(--danger);
  font-weight: 700;
}

.data-table tr.is-credit td.net {
  color: var(--accent);
  font-weight: 700;
}

.data-table td.pct {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.05rem;
}

.stat-accent {
  background: var(--accent-soft);
  border: 1px solid rgba(31, 138, 91, 0.35);
}

.stat-accent .stat-value {
  color: var(--accent);
  font-size: 1.45rem;
}

.sun-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.compare-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.duo-card {
  background: #f3f8f5;
  border-radius: 14px;
  padding: 1.1rem 1rem 1rem;
  text-align: center;
  border: 1px solid rgba(15, 36, 28, 0.08);
}

.duo-card.duo-actual {
  background: var(--accent-soft);
  border-color: rgba(31, 138, 91, 0.28);
}

.duo-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.duo-value {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.duo-value .unit {
  margin-inline-start: 0.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: 0.3em;
}

.duo-sub {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.duo-result {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.duo-result.is-low {
  color: var(--danger);
}

.all-time-peak {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.all-time-peak .mono {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
}

.all-time-peak .unit {
  margin-inline-start: 0.2rem;
  font-weight: 600;
}

.all-time-peak-when {
  margin-inline-start: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.health-block {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(15, 36, 28, 0.1);
}

.health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.health-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #e8eee9;
  color: var(--muted);
}

.health-badge.is-ok {
  background: #d8f3e6;
  color: #0f6b42;
}

.health-badge.is-warn {
  background: #fff3d6;
  color: #9a6700;
}

.health-badge.is-bad {
  background: #fde8e6;
  color: var(--danger);
}

.health-summary {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.health-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.health-check {
  background: #f7faf8;
  border: 1px solid rgba(15, 36, 28, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.7rem;
  border-inline-start: 3px solid #94a3b8;
}

.health-check.is-ok {
  border-inline-start-color: #1f8a5b;
}

.health-check.is-warn {
  border-inline-start-color: #d97706;
}

.health-check.is-bad {
  border-inline-start-color: var(--danger);
}

.health-check-title {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.health-check-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.health-check-detail {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.health-issues {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.health-issues li {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff8eb;
  color: #7a5a00;
}

.health-issues li.is-bad {
  background: #fef3f2;
  color: var(--danger);
}

@media (max-width: 640px) {
  .compare-duo {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.week-range {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.week-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 6rem;
  color: var(--muted);
}

.week-summary {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.week-summary .mono {
  font-size: 1.35rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.leg::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  margin-inline-end: 0.4rem;
  vertical-align: -0.1em;
}

.leg-prod::before {
  background: linear-gradient(180deg, #34d399 0%, #1f8a5b 100%);
}

.leg-grid::before {
  background: linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%);
}

.leg-self::before {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.month-chart {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  padding: 0.35rem 0.15rem 0;
  width: 100%;
}

.money-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}

.money-card {
  background: #f3f8f5;
  border: 1px solid rgba(15, 36, 28, 0.08);
  border-radius: 14px;
  padding: 0.9rem 0.85rem 0.85rem;
  text-align: center;
}

.money-card.money-system {
  background: var(--accent-soft);
  border-color: rgba(31, 138, 91, 0.28);
}

.money-label {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.money-value {
  margin: 0;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.money-value .unit {
  margin-inline-start: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.money-value.money-pos {
  color: var(--accent);
}

.money-value.money-neg {
  color: #1d4ed8;
}

.money-sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .money-summary {
    grid-template-columns: 1fr;
  }
}

.month-col {
  display: grid;
  gap: 0.45rem;
  min-height: 0;
  text-align: start;
  padding: 0.65rem 0.7rem;
  background: #f7faf8;
  border: 1px solid rgba(15, 36, 28, 0.08);
  border-radius: 12px;
}

.month-row-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.month-money {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  margin-inline-start: auto;
}

.month-money-detail {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.month-pair {
  display: grid;
  gap: 0.4rem;
  align-items: stretch;
  min-height: 0;
}

.month-pair.month-horizontal {
  grid-template-columns: 1fr;
}

.month-pair.month-triple {
  grid-template-columns: 1fr;
}

.month-pair.month-single {
  grid-template-columns: 1fr;
  max-width: none;
  margin-inline: 0;
  width: 100%;
}

.month-bar-wrap {
  display: grid;
  grid-template-columns: 3.2rem 1fr 3.4rem;
  gap: 0.45rem;
  align-items: center;
  min-height: 0;
}

.month-bar-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.month-bar-track {
  position: relative;
  width: 100%;
  height: 1.15rem;
  min-height: 1.15rem;
  background: #eef5f1;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

.month-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.month-bar-fill.is-prod {
  background: linear-gradient(90deg, #1f8a5b 0%, #34d399 100%);
}

.month-bar-fill.is-grid {
  background: linear-gradient(90deg, #1d4ed8 0%, #60a5fa 100%);
}

.month-bar-fill.is-self {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}

.month-bar-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  text-align: end;
}

.month-cover {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
}

.month-label {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  align-items: end;
  min-height: 11rem;
  margin-bottom: 1.1rem;
  padding: 0.5rem 0.25rem 0;
}

.week-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 0.3rem;
  min-height: 10.5rem;
  text-align: center;
}

.week-bar-track {
  position: relative;
  height: 100%;
  min-height: 7rem;
  background: #eef5f1;
  border-radius: 10px 10px 6px 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.week-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #34d399 0%, #1f8a5b 100%);
  border-radius: 10px 10px 0 0;
  transition: height 0.35s ease;
}

.week-bar.is-today .week-bar-fill {
  background: linear-gradient(180deg, #5eead4 0%, #0f766e 100%);
}

.week-bar.is-future .week-bar-track {
  opacity: 0.45;
}

.week-bar-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.week-bar-day {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.week-bar.is-today .week-bar-day {
  color: var(--accent);
  font-weight: 700;
}

.week-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.week-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 36, 28, 0.08);
}

.week-row.is-today {
  border-color: rgba(31, 138, 91, 0.35);
  background: var(--accent-soft);
}

.week-row-day {
  font-weight: 600;
}

.week-row-date {
  color: var(--muted);
  font-size: 0.88rem;
}

.week-row-kwh {
  font-weight: 600;
  font-size: 1rem;
}

.footer {
  margin-top: 1.5rem;
  color: rgba(232, 245, 238, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
  animation: rise 1s ease 0.15s both;
}

.footer code {
  color: #c6f6d5;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1.25rem, 920px);
    padding-top: 2.2rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .week-chart {
    gap: 0.3rem;
  }

  .week-bar-val {
    font-size: 0.68rem;
  }

  .week-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "day kwh"
      "date kwh";
  }

  .week-row-day {
    grid-area: day;
  }

  .week-row-date {
    grid-area: date;
  }

  .week-row-kwh {
    grid-area: kwh;
  }
}
