:root {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f4f6fa;
  --surface-tint: #eef4ff;
  --text: #111217;
  --muted: #5f6673;
  --soft: #8a929f;
  --border: #d9dee8;
  --border-strong: #b8c0cc;
  --blue: #0a5bff;
  --blue-dark: #0646c8;
  --blue-soft: #dbe7ff;
  --magenta: #e20074;
  --magenta-soft: #fde7f3;
  --green: #098551;
  --green-soft: #dff7ec;
  --green-dark: var(--green);
  --warning: #f5a400;
  --warning-soft: #fff4d8;
  --amber: var(--warning);
  --amber-soft: var(--warning-soft);
  --danger: #d92d20;
  --danger-soft: #fde4e1;
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --orange: #ff6b2c;
  --shadow: 0 18px 50px rgba(17, 18, 23, 0.14);
  --shadow-soft: 0 8px 24px rgba(17, 18, 23, 0.10);
  --radius-card: 18px;
  --radius-sheet: 24px;
  --radius-control: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(10, 91, 255, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(226, 0, 116, 0.08), transparent 36%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
p {
  margin: 0;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.developer-only {
  display: none !important;
}

.developer-mode .developer-only:not(.hidden) {
  display: block !important;
}

.developer-mode .tesla-config-grid.developer-only:not(.hidden),
.developer-mode .garage-health-grid.developer-only:not(.hidden),
.developer-mode .garage-telemetry-grid.developer-only:not(.hidden) {
  display: grid !important;
}

.developer-mode .simulator-actions.developer-only:not(.hidden) {
  display: flex !important;
}

.plug-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.phone-shell {
  width: min(100%, 430px);
}

.phone-frame {
  position: relative;
  width: min(100%, 430px);
  height: min(920px, calc(100vh - 40px));
  min-height: 760px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.icon-button {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.icon-button {
  position: relative;
  background: var(--surface-soft);
  color: var(--text);
}

.icon-button.small {
  min-width: 34px;
  width: 34px;
  height: 34px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
}

.section-actions,
.hero-top,
.section-head,
.screen-heading,
.battery-row,
.progress-labels,
.simulator-actions,
.settings-row,
.setting-line,
.range-line,
.sheet-top,
.setup-top,
.tesla-auth-top,
.schedule-editor-top,
.sheet-actions,
.schedule-editor-actions,
.tesla-auth-actions,
.setup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-actions.single {
  justify-content: stretch;
}

.sheet-actions.single > button {
  width: 100%;
}

.onboarding-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-strip {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 10px;
  background: var(--surface);
}

.auth-strip span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-strip span.ok {
  color: var(--green);
}

.auth-strip span.warn {
  color: #946000;
}

.auth-strip span.bad {
  color: var(--danger);
}

.auth-strip button {
  min-height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.screen-stack {
  height: calc(100% - 112px - 76px);
  overflow: hidden;
}

.screen-view {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 8px 20px 18px;
  background: var(--surface);
  scrollbar-width: none;
}

.screen-view::-webkit-scrollbar {
  display: none;
}

.screen-view.active {
  display: block;
}

#screen-home > .ai-card,
#screen-home > .tesla-card,
#screen-home > .quick-actions,
#screen-home > .hint-card,
#screen-home > .simulator-card,
#screen-home > .quick-grid {
  display: none;
}

.eyebrow,
.hero-label,
.setting-head {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screen-heading {
  margin: 0 0 16px;
}

.screen-heading h2,
.garage-hero-copy strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.hero-card,
.ai-card,
.tesla-card,
.charge-empty-card,
.simulator-card,
.schedule-context-card,
.settings-card,
.log-card,
.hint-card,
.raw-api-card,
.garage-hero,
.vehicle-data-card {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  min-height: 168px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 58%, var(--magenta-soft) 100%);
}

.hero-card[data-state="charging"] {
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 58%, var(--green-soft) 100%);
}

.hero-card[data-state="blocked"] {
  background: linear-gradient(135deg, #fff 0%, var(--warning-soft) 54%, var(--danger-soft) 100%);
}

.hero-card[data-state="setup"] {
  background: linear-gradient(135deg, #fff 0%, var(--warning-soft) 52%, var(--blue-soft) 100%);
}

.hero-card[data-state="plug"] {
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 58%, var(--blue-soft) 100%);
}

.hero-card[data-state="multi"] {
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 55%, var(--surface) 100%);
}

.hero-card h2 {
  font-size: 2.18rem;
  line-height: 0.95;
}

.simplified-home-hero {
  gap: 14px;
  align-content: start;
}

.hero-plan-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.32;
}

.hero-badge,
.chip,
.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.chip.ok,
.badge.success,
.garage-health-grid .ok {
  background: var(--green-soft);
  color: var(--green);
}

.chip.warn,
.badge.warn,
.garage-health-grid .warn {
  background: var(--warning-soft);
  color: #946000;
}

.chip.bad,
.badge.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.battery-row {
  margin-top: 22px;
}

.battery-row div {
  display: grid;
  gap: 5px;
}

.battery-row div:last-child {
  text-align: right;
}

.battery-row span,
.progress-labels,
.panel-note,
.updated,
small,
.muted {
  color: var(--muted);
}

.battery-row strong {
  font-size: 1.18rem;
}

.progress-track,
.mini-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.progress-track span,
.mini-track i {
  display: block;
  width: 47%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.progress-labels {
  margin-top: 8px;
  font-size: 0.78rem;
}

.rate-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.rate-strip[data-rate-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-strip[data-rate-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-strip[data-rate-layout="api-feeds"] {
  grid-template-columns: 1fr;
}

.rate-strip article,
.quick-grid article,
.device-facts div,
.tesla-metrics div,
.assumption-grid div,
.garage-health-grid div,
.garage-telemetry-grid div,
.tesla-config-grid div {
  display: grid;
  gap: 5px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
}

.rate-strip article {
  min-height: 112px;
  gap: 7px;
  align-content: start;
  background: #fff;
  overflow: hidden;
  border-width: 1px;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.rate-strip[data-rate-layout="api-feeds"] > article:not(.api-rate-feed-tile) {
  display: none;
}

.rate-strip[data-rate-count="4"] article {
  min-height: 104px;
}

.rate-strip article:first-child {
  border-color: rgba(10, 91, 255, 0.25);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.rate-strip article[data-tone="good"] {
  border-color: rgba(25, 135, 84, 0.32);
}

.rate-strip article[data-tone="mid"] {
  border-color: rgba(240, 190, 80, 0.45);
}

.rate-strip article[data-tone="bad"] {
  border-color: rgba(223, 50, 38, 0.32);
}

.rate-strip article[data-tone="neutral"] {
  border-color: rgba(10, 91, 255, 0.22);
}

.rate-strip span,
.quick-grid span,
.device-facts span,
.tesla-metrics span,
.assumption-grid span,
.tesla-config-grid span,
.receipt-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.rate-strip > article > span {
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rate-strip strong {
  color: var(--blue);
  font-size: 1.34rem;
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.rate-strip small {
  min-height: 30px;
  font-size: 0.73rem;
  line-height: 1.22;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rate-strip em {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.rate-good,
.tag-good {
  color: var(--green) !important;
}

.rate-mid,
.tag-mid {
  color: #946000 !important;
}

.rate-bad,
.tag-bad {
  color: var(--danger) !important;
}

.rate-neutral,
.tag-neutral {
  color: var(--blue) !important;
}

.rate-strip em.tag-mid {
  color: #946000;
  background: var(--warning-soft);
}

.rate-strip em.tag-bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.rate-strip em.tag-neutral {
  color: var(--blue);
  background: var(--blue-soft);
}

.api-rate-feed-tile {
  min-height: 0 !important;
  gap: 12px !important;
  padding: 14px !important;
  border-radius: var(--radius-card) !important;
  background: #fff !important;
}

.api-rate-feed-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.api-rate-feed-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.api-rate-feed-head span,
.api-rate-feed-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-rate-feed-head strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.08;
  font-weight: 950;
}

.api-rate-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.api-rate-feed-item {
  position: relative;
  display: grid;
  grid-template-rows: 5px minmax(40px, auto) auto;
  gap: 7px;
  min-width: 0;
  min-height: 104px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 10px;
  background: var(--surface-soft);
  overflow: hidden;
}

.api-rate-feed-item::before {
  content: "";
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
}

.api-rate-feed-item[data-feed-color="yellow"]::before {
  background: var(--warning);
}

.api-rate-feed-item[data-feed-color="green"]::before {
  background: var(--green);
}

.api-rate-feed-item strong {
  align-self: end;
  color: var(--text);
  font-size: 1.22rem;
  line-height: 0.98;
  font-weight: 950;
  white-space: nowrap;
}

.api-rate-feed-item span {
  min-height: 40px;
  display: flex;
  align-items: start;
  overflow-wrap: anywhere;
}

.api-rate-feed-item small {
  max-width: 100%;
}

.api-rate-feed-item.is-pending {
  background: #fff;
  border-style: dashed;
}

.api-rate-feed-item.is-pending strong {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 900;
}

.rate-strip .api-rate-feed-item small {
  min-height: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.24;
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.home-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.home-metric-card,
.charge-summary-list-card,
.setup-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.home-metric-card {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
}

button.home-metric-card {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rate-strip article:focus-visible,
button.home-metric-card:focus-visible {
  outline: 3px solid rgba(10, 91, 255, 0.25);
  outline-offset: 2px;
}

.home-metric-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-metric-card strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

/* Savings headline matches the hero headline size */
.home-savings-wide-copy strong {
  font-size: 2.18rem;
  line-height: 0.95;
}

.home-savings-wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 166px;
  align-content: start;
}

.home-savings-wide-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-savings-wide-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.28;
}

.home-savings-comparison.savings-vs-cost {
  min-height: 52px;
  gap: 7px;
  margin-top: 0;
  border-radius: 16px;
  padding: 6px 8px;
  background: var(--surface-soft);
}

.home-savings-comparison.savings-vs-cost > div:not(.empty-state) {
  min-height: 52px;
  gap: 2px;
}

.home-savings-comparison.savings-vs-cost span {
  font-size: 0.6rem;
  line-height: 1.02;
}

.home-savings-comparison.savings-vs-cost strong {
  font-size: 0.82rem;
  line-height: 1.02;
}

.home-savings-comparison.savings-vs-cost i {
  min-height: 12px;
  border-radius: 999px 999px 6px 6px;
}

.home-charge-source-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.home-charge-source-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.home-charge-source-card[data-source-state="on"] {
  border-color: rgba(22, 163, 74, 0.45);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.1), var(--surface) 70%);
}

.home-charge-source-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.home-charge-source-head span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-charge-source-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.1;
}

.home-charge-source-head em {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  padding: 5px 7px;
  white-space: nowrap;
}

.home-charge-source-card[data-source-state="on"] .home-charge-source-head em {
  background: rgba(22, 163, 74, 0.15);
  color: var(--green-dark);
}

.home-charge-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-charge-toggle .charge-state-button {
  min-height: 44px;
  padding: 0 10px;
}

.home-charge-port-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.home-charge-port-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.home-charge-port-actions .secondary-action {
  min-height: 40px;
  min-width: 168px;
  padding: 0 12px;
  white-space: nowrap;
}

.setup-list {
  display: grid;
  gap: 0;
  margin: 0 0 14px;
  overflow: hidden;
}

.settings-account-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.settings-account-card:hover,
.settings-account-card:focus-visible {
  border-color: rgba(10, 88, 255, 0.34);
  background: var(--surface-soft);
}

.settings-account-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-account-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.1;
}

.settings-account-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.25;
}

.settings-account-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.settings-landing-group {
  margin: 0 0 22px;
}

.settings-group-label {
  margin: 0 0 8px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.settings-landing-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.settings-route-row {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border: 0;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: background 0.16s ease;
}

.settings-route-row + .settings-route-row {
  border-top: 1px solid rgba(210, 216, 229, 0.7);
}

.settings-route-row:hover,
.settings-route-row:focus-visible {
  background: var(--surface-soft);
}

.settings-route-row > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text);
}

.settings-route-row strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.settings-route-row small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.settings-route-chevron {
  color: #9199aa;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.settings-route-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.settings-route-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.settings-route-icon.plan,
.settings-route-icon.billing,
.settings-route-icon.support {
  color: var(--green);
  background: var(--green-soft);
}

.settings-route-icon.utility,
.settings-route-icon.alerts {
  color: #946000;
  background: var(--warning-soft);
}

.settings-route-icon.intelligence {
  color: #9b329d;
  background: #f7eaf8;
}

.settings-route-icon.privacy {
  color: #3d597d;
  background: #edf2f8;
}

.settings-hidden-status {
  display: none;
}

.settings-detail-card {
  padding: 0;
  overflow: hidden;
}

.settings-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.settings-detail-summary::-webkit-details-marker {
  display: none;
}

.settings-detail-summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-detail-summary strong {
  font-size: 1.16rem;
  line-height: 1.05;
}

.settings-detail-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-detail-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.settings-detail-summary .chip {
  justify-self: end;
}

.settings-detail-card[open] .settings-detail-summary::after {
  transform: rotate(225deg);
}

.settings-detail-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(210, 216, 229, 0.72);
}

.ai-card {
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--magenta-soft) 100%);
  cursor: pointer;
  transition: padding 0.18s ease, box-shadow 0.18s ease;
}

.ai-card .section-head {
  margin: 0;
}

.ai-card .section-actions {
  gap: 6px;
}

.ai-card.collapsed {
  padding: 10px 12px;
}

.ai-card.collapsed .eyebrow,
.ai-card.collapsed .ai-insight-details {
  display: none;
}

.ai-card.collapsed h2 {
  font-size: 0.98rem;
  line-height: 1.05;
}

.ai-card.collapsed .section-head {
  gap: 8px;
}

.ai-card.collapsed .section-actions .chip {
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.ai-card.collapsed .section-actions .secondary-action.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.ai-card.expanded .ai-insight-details {
  display: grid;
}

.ai-insight-details {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ai-assistant-inline {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-assistant-inline svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ai-decision.wait,
.ai-decision.hold {
  background: var(--warning-soft);
  color: #946000;
}

.ai-decision.start {
  background: var(--green-soft);
  color: var(--green);
}

.ai-decision.stop {
  background: var(--danger-soft);
  color: var(--danger);
}

.ai-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.tesla-card,
.charge-empty-card,
.simulator-card,
.schedule-context-card,
.vehicle-data-card,
.settings-card,
.log-card,
.raw-api-card {
  padding: 16px;
}

.section-head.tight {
  margin-bottom: 8px;
}

.tesla-vehicle {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: #fff;
}

.vehicle-avatar,
.tesla-logo-mark,
.onboarding-symbol,
.setup-hero,
.plug-led {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
}

.vehicle-avatar,
.tesla-logo-mark {
  width: 44px;
  height: 44px;
}

.tesla-vehicle strong,
.garage-hero-copy strong {
  display: block;
}

.tesla-vehicle > div,
.tesla-vehicle-option > span:first-child {
  min-width: 0;
}

.tesla-vehicle span,
.garage-hero-copy span,
.garage-hero-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.tesla-vehicle strong,
.tesla-vehicle span,
.tesla-vehicle-option strong,
.tesla-vehicle-option small {
  overflow-wrap: anywhere;
}

.tesla-vehicle-picker {
  margin-top: 12px;
}

.tesla-vehicle-options {
  display: grid;
  gap: 8px;
}

.tesla-vehicle-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.tesla-vehicle-option.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.tesla-vehicle-option > span:first-child {
  display: grid;
  gap: 2px;
}

.vehicle-row-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.tesla-vehicle-option strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.tesla-vehicle-option small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.tesla-metrics,
.device-facts,
.assumption-grid,
.price-explain-grid,
.tesla-config-grid,
.garage-health-grid,
.garage-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.tesla-config-grid,
.device-facts,
.garage-health-grid,
.garage-telemetry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#aiAssistantInputs.assumption-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#aiAssistantInputs.assumption-grid div {
  min-width: 0;
  overflow: hidden;
  align-content: start;
}

#aiAssistantInputs.assumption-grid div[data-assumption="target"] {
  grid-column: 1 / -1;
}

#aiAssistantInputs.assumption-grid strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: clamp(1rem, 4.4vw, 1.35rem);
  line-height: 1.08;
}

#aiAssistantInputs.assumption-grid span {
  line-height: 1.1;
}

.price-explain-grid {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.price-explain-grid div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.price-explain-grid span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.price-explain-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.12;
  text-align: right;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.price-feed-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.price-feed-card.compact {
  margin: 8px 0 12px;
  padding: 12px;
  background: var(--surface-soft);
}

.price-feed-header,
.price-feed-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.9fr) minmax(116px, 1.25fr) auto;
  gap: 10px;
  align-items: center;
}

.price-feed-header strong {
  grid-column: 1 / span 2;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 950;
}

.price-feed-header span {
  justify-self: end;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.price-feed-bars {
  display: grid;
  gap: 10px;
}

.price-feed-row strong,
.price-feed-row span,
.price-feed-row em {
  min-width: 0;
}

.price-feed-label {
  display: grid;
  gap: 2px;
}

.price-feed-label strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.08;
}

.price-feed-label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
}

.price-feed-track {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
}

.price-feed-track i {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
}

.price-feed-track .feed-blue {
  background: var(--blue);
}

.price-feed-track .feed-yellow {
  background: var(--warning);
}

.price-feed-track .feed-green {
  background: var(--green);
}

.price-feed-value {
  justify-self: end;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 950;
  white-space: nowrap;
}

.tesla-config-grid .wide {
  grid-column: 1 / -1;
}

.plug-detail-card.plug-not-configured {
  background: var(--surface-soft);
}

.plug-wifi-action {
  margin-top: 12px;
}

.plug-wifi-action small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.vehicle-data-card {
  display: grid;
  gap: 10px;
}

.range-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.range-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.range-labels strong {
  color: var(--text);
}

.journey-pills,
.settings-list,
.compact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

.menu-action-grid,
.menu-status-grid {
  margin-top: 12px;
}

.menu-action-grid button,
.menu-status-grid button {
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.menu-action-grid button {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 88px;
}

.menu-status-grid button {
  display: grid;
  gap: 3px;
  min-height: 72px;
  align-content: center;
  background: var(--surface-soft);
}

.menu-action-grid strong,
.menu-status-grid strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.menu-action-grid span,
.menu-status-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.device-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: block;
  background: var(--blue-soft);
  position: relative;
}

.device-icon::before,
.device-icon::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.device-icon.plug {
  background: var(--green-soft);
}

.device-icon.plug::before {
  width: 16px;
  height: 18px;
  left: 11px;
  top: 10px;
  border: 3px solid var(--green);
  border-top-width: 6px;
  border-radius: 7px;
}

.device-icon.car {
  background: var(--blue-soft);
}

.device-icon.car::before {
  width: 24px;
  height: 11px;
  left: 7px;
  top: 15px;
  background: var(--blue);
}

.device-icon.utility {
  background: var(--warning-soft);
}

.device-icon.utility::before {
  width: 4px;
  height: 24px;
  left: 17px;
  top: 7px;
  background: var(--warning);
}

.device-icon.utility::after {
  width: 24px;
  height: 4px;
  left: 7px;
  top: 16px;
  background: var(--warning);
}

.device-icon.home {
  background: var(--magenta-soft);
}

.device-icon.home::before {
  width: 22px;
  height: 16px;
  left: 8px;
  top: 16px;
  background: var(--magenta);
  border-radius: 3px;
}

.device-icon.home::after {
  width: 18px;
  height: 18px;
  left: 10px;
  top: 8px;
  background: var(--magenta);
  transform: rotate(45deg);
  border-radius: 3px;
}

.journey-pills {
  grid-template-columns: repeat(4, 1fr);
}

.journey-pills span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.journey-pills span.active,
.journey-pills span.complete {
  background: var(--blue);
  color: #fff;
}

.tesla-actions,
.utility-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.charge-button-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.primary-action,
.secondary-action,
.charge-state-button,
.primary,
.secondary {
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-control);
  padding: 0 14px;
  font-weight: 900;
}

.primary-action,
.primary {
  background: var(--blue);
  color: #fff;
}

.secondary-action,
.secondary {
  background: var(--surface-soft);
  color: var(--text);
}

.primary-action.compact,
.secondary-action.compact,
.primary.compact,
.secondary.compact {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 0.84rem;
}

.primary-action.full,
.secondary-action.full {
  width: 100%;
}

.charge-state-button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  justify-items: start;
  gap: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.charge-state-button.on.active,
.charge-state-button.on[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.charge-state-button.off.active,
.charge-state-button.off[aria-pressed="true"] {
  background: var(--text);
  color: #fff;
}

.charge-state-button.pending {
  outline: 3px solid var(--warning-soft);
}

.hint-card {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.hint-card.visible {
  display: flex;
}

.simulator-body {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.plug-visual {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--surface-soft), #fff);
}

.plug-face {
  position: relative;
  width: 76px;
  height: 76px;
  border: 2px solid var(--border);
  border-radius: 24px;
  background: #fff;
}

.socket {
  position: absolute;
  width: 8px;
  height: 22px;
  top: 22px;
  border-radius: 999px;
  background: var(--border-strong);
}

.socket-left {
  left: 23px;
}

.socket-right {
  right: 23px;
}

.socket-ground {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 12px;
  height: 8px;
  border-radius: 999px;
  background: var(--border-strong);
  transform: translateX(-50%);
}

.plug-led {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.energy-ring {
  position: absolute;
  inset: 8px;
  border: 2px solid var(--blue-soft);
  border-radius: 32px;
}

.plug-visual[data-state="charging"] .energy-ring {
  border-color: var(--green);
  box-shadow: 0 0 0 8px var(--green-soft);
}

.plug-visual[data-state="idle"] .plug-led {
  background: var(--soft);
}

.simulator-copy,
.battery-chip {
  display: grid;
  gap: 8px;
}

.battery-chip {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-grid article {
  min-height: 82px;
  align-content: center;
}

.plan-rate-context-card {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.plan-rate-context-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.plan-rate-context-head > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.plan-rate-context-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.36rem, 5vw, 1.68rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.plan-rate-context-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.28;
  font-weight: 760;
}

.plan-rate-context-head .chip {
  max-width: 116px;
  text-align: center;
}

.plan-rate-visual {
  display: grid;
  gap: 8px;
  border-radius: 18px;
  padding: 10px;
  background: var(--surface-soft);
}

.plan-rate-signals {
  display: grid;
  gap: 8px;
}

.plan-rate-signals.muted .plan-signal-row {
  background: rgba(255, 255, 255, 0.74);
}

.plan-signal-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) minmax(84px, auto);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1.5px solid rgba(214, 220, 232, 0.88);
  border-radius: 14px;
  background: #fff;
}

.plan-signal-row.pending {
  border-style: dashed;
  color: var(--muted);
}

.plan-signal-dot {
  width: 10px;
  height: 32px;
  border-radius: 999px;
  background: #cdd5e1;
}

.plan-signal-dot.blue {
  background: var(--blue);
}

.plan-signal-dot.yellow {
  background: var(--warning);
}

.plan-signal-dot.green {
  background: var(--green);
}

.plan-signal-dot.gray {
  background: #cdd5e1;
}

.plan-signal-main,
.plan-signal-value {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.plan-signal-main strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.plan-signal-main span,
.plan-signal-value span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.16;
  font-weight: 780;
}

.plan-signal-value {
  justify-items: end;
  text-align: right;
}

.plan-signal-value strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.02;
  white-space: nowrap;
}

.plan-signal-row.pending .plan-signal-value strong {
  color: var(--muted);
  font-size: 0.76rem;
}

.plan-rate-insight {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.24;
  font-weight: 820;
}

.plan-secondary-tag {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1.5px solid rgba(245, 158, 11, 0.32);
  border-radius: 16px;
  padding: 10px;
  background: var(--amber-soft);
}

.plan-secondary-tag span {
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff;
  color: #9a6700;
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}

.plan-secondary-tag strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.22;
}

.schedule-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-target-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.period-tabs,
.segmented-control,
.boost-duration-grid,
.limit-option-grid {
  display: grid;
  gap: 8px;
}

.period-tabs,
.segmented-control {
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 14px;
  border-radius: 999px;
  padding: 4px;
  background: var(--surface-soft);
}

.period-tabs button,
.segmented-control button,
.boost-duration-grid button,
.limit-option-grid button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.period-tabs button.active,
.segmented-control button.active,
.boost-duration-grid button.active,
.limit-option-grid button.active {
  background: var(--blue);
  color: #fff;
}

.time-window-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 12px;
}

.time-window-summary article {
  display: grid;
  gap: 4px;
  min-height: 68px;
  align-content: center;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: #fff;
}

.time-window-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.time-window-summary strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 950;
}

.schedule-row,
.settings-row,
.field {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.schedule-row,
.settings-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.settings-row.button-row {
  width: 100%;
  text-align: left;
}

.settings-row > span,
.setting-line > span,
.range-line > span,
.provider-candidate-list button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-row em,
.menu-list em,
.provider-candidate-list em {
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.field span,
.setting-line span,
.range-line span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

input[type="range"] {
  display: block;
  width: 100%;
  min-height: auto;
  padding: 0;
}

input[type="checkbox"] {
  width: 48px;
  height: 28px;
  min-height: 28px;
  accent-color: var(--blue);
}

.range-line,
.setting-line {
  margin-top: 12px;
}

.range-line.stacked,
.setting-line.stacked {
  display: grid;
  align-items: stretch;
}

.charge-limit-number-line input[type="number"] {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0 16px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 1.22rem;
  font-weight: 900;
  box-sizing: border-box;
}

.charge-limit-number-line input[type="number"]:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(26, 94, 255, 0.16);
}

.panel-note.compact {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 850;
}

.garage-source-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.garage-target-list {
  display: grid;
  gap: 10px;
}

.garage-target-list > .garage-target-card {
  margin: 0;
}

.garage-target-card {
  width: 100%;
  min-height: 112px;
  text-align: left;
  cursor: pointer;
}

.garage-target-card.active {
  border-width: 2px;
  border-color: var(--blue);
  background: #fff;
  box-shadow: none;
}

.garage-target-card.settings-open {
  border-width: 2px;
  border-color: var(--blue);
  border-bottom-color: transparent;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background: #fff;
  box-shadow: none;
}

.garage-target-card[data-source-state="charging"] {
  border-color: rgba(9, 133, 81, 0.48);
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 100%);
  box-shadow: 0 14px 30px rgba(9, 133, 81, 0.12);
}

.garage-target-card[data-source-state="charging"].settings-open {
  border-color: rgba(9, 133, 81, 0.48);
  border-bottom-color: rgba(9, 133, 81, 0.18);
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 100%);
}

.garage-target-card.active[data-source-state="charging"],
.garage-target-card.settings-open[data-source-state="charging"] {
  border-width: 2px;
  border-color: var(--blue);
  background: #fff;
  box-shadow: none;
}

.garage-target-card.settings-open[data-source-state="charging"] {
  border-bottom-color: transparent;
}

.garage-target-card.setup {
  border-style: dashed;
}

.garage-target-card.add-source {
  min-height: 96px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-color: var(--border-strong);
  background: #f5f7fb;
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

.garage-target-card.add-source .garage-source-icon.target {
  background: #edf1f7;
  color: var(--muted);
}

.garage-target-card.add-source .garage-hero-copy span,
.garage-target-card.add-source .garage-hero-copy small {
  color: var(--muted);
}

.garage-target-card.add-source .garage-hero-copy strong {
  color: #252b36;
}

.garage-target-card.add-source .add-source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  width: 100%;
  gap: 8px;
  flex: 0 0 auto;
  align-self: center;
  min-width: 0;
  margin-left: 0;
}

.garage-target-card.add-source .add-source-actions button {
  min-height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.garage-target-card .garage-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.garage-target-card .garage-hero-copy strong,
.garage-target-card .garage-hero-copy small {
  display: block;
  min-width: 0;
}

.garage-target-card .garage-hero-copy strong {
  line-height: 1.05;
}

.garage-target-card .garage-hero-copy small {
  max-width: 100%;
  line-height: 1.25;
}

.garage-target-card em {
  flex: 0 0 auto;
  align-self: center;
  justify-self: end;
  margin-left: auto;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.garage-target-card.settings-open em {
  background: var(--danger-soft);
  color: var(--danger);
}

.garage-target-card[data-source-state="charging"] em {
  background: var(--green-soft);
  color: var(--green);
  animation: garage-charging-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(9, 133, 81, 0.24);
}

.garage-target-card.active[data-source-state="charging"] em,
.garage-target-card.settings-open[data-source-state="charging"] em {
  background: var(--green-soft);
  color: var(--green);
}

@keyframes garage-charging-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(9, 133, 81, 0.26);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(9, 133, 81, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(9, 133, 81, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .garage-target-card[data-source-state="charging"] em {
    animation: none;
  }
}

.garage-target-list > .charge-control-card.target-expanded-panel {
  margin: -10px 0 10px;
  border: 2px solid var(--blue);
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: #fff;
  box-shadow: 0 18px 34px rgba(10, 91, 255, 0.10);
}

.garage-target-list > .charge-control-card.target-expanded-panel .section-head {
  margin-top: 2px;
}

.garage-hero {
  overflow: hidden;
  padding: 16px;
}

.charge-empty-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 56%, var(--warning-soft) 100%);
}

.charge-empty-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px rgba(10, 91, 255, 0.12);
}

.charge-empty-symbol svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.charge-empty-card h2,
.charge-empty-card p {
  margin: 0;
}

.charge-empty-card h2 {
  font-size: 1.65rem;
  line-height: 1;
}

.charge-empty-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.charge-empty-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.charge-empty-actions .secondary-action {
  background: rgba(255, 255, 255, 0.72);
}

.charge-empty-checklist {
  display: grid;
  gap: 8px;
}

.charge-empty-checklist div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.62);
}

.charge-empty-checklist span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.charge-empty-checklist strong {
  color: var(--text);
  font-size: 0.8rem;
  text-align: right;
}

.charge-empty-checklist .ready strong {
  color: var(--green);
}

.charge-empty-checklist .setup strong {
  color: var(--blue);
}

.charge-empty-checklist .missing strong {
  color: var(--danger);
}

.garage-source-card .garage-source-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface-soft), var(--blue-soft));
  color: var(--blue);
}

.garage-source-card .garage-source-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.garage-source-card .garage-source-icon.plug {
  background: var(--green-soft);
  color: var(--green);
}

.garage-source-card .garage-source-icon.target {
  background: var(--blue-soft);
  color: var(--blue);
}

.garage-source-card .garage-source-icon.target[data-target-mode="plug"] {
  background: var(--green-soft);
  color: var(--green);
}

.garage-source-card[data-source-state="missing"] .garage-source-icon.plug {
  background: var(--surface-soft);
  color: var(--muted);
}

.garage-source-card[data-source-state="paired"] .garage-source-icon.plug {
  background: var(--warning-soft);
  color: var(--amber);
}

.garage-source-card[data-source-state="charging"] .garage-source-icon.target {
  background: var(--green-soft);
  color: var(--green);
}

.garage-hero-copy {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.garage-command-grid,
.garage-estimate-grid,
.utility-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.utility-form-grid .full-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  align-items: stretch;
  justify-content: stretch;
  justify-items: stretch;
}

.garage-command-grid label,
.garage-estimate-grid label {
  display: grid;
  gap: 6px;
}

.garage-command-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.garage-command-button {
  min-height: 74px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 1rem;
  line-height: 1.05;
}

#garageLimitButton {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  min-height: 50px;
  display: grid;
  place-items: center;
  white-space: nowrap;
  text-align: center;
}

.charge-limit-auto-status {
  grid-column: 1 / -1;
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.charge-level-control {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  justify-self: stretch;
  justify-items: stretch;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.charge-level-control > span {
  width: 100%;
  min-width: 0;
}

.charge-level-control .charge-level-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.charge-level-control .charge-level-heading strong {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
}

.charge-level-control .charge-level-heading .charge-limit-value-button {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 1.32rem;
  font-weight: 950;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  box-shadow: none;
}

.charge-level-control .charge-level-heading .charge-limit-value-button:focus-visible {
  outline: 3px solid rgba(26, 94, 255, 0.28);
  outline-offset: 2px;
}

.charge-level-control input[type="range"] {
  --charge-level-progress: 60%;
  position: absolute;
  inset: 0;
  inline-size: 100%;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  justify-self: stretch;
  z-index: 3;
}

.charge-level-control input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: transparent;
}

.charge-level-control input[type="range"]::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  margin-top: -10.5px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.18);
  appearance: none;
  -webkit-appearance: none;
}

.charge-level-control input[type="range"]::-moz-range-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: transparent;
}

.charge-level-control input[type="range"]::-moz-range-progress {
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
}

.charge-level-control input[type="range"]::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.18);
}

.charge-level-slider {
  --charge-level-progress: 60%;
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 34px;
}

.charge-level-slider::before,
.charge-level-slider-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 9px;
  border-radius: 999px;
  transform: translateY(-50%);
  content: "";
}

.charge-level-slider::before {
  width: 100%;
  background: var(--border);
}

.charge-level-slider-fill {
  width: var(--charge-level-progress);
  background: var(--blue);
}

.charge-level-slider-thumb {
  position: absolute;
  top: 50%;
  left: var(--charge-level-progress);
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.18);
  transform: translate(-50%, -50%);
}

.settings-card.is-disabled {
  border-color: var(--border);
  background: #f8f9fb;
  color: var(--muted);
  opacity: 0.58;
}

.settings-card.is-disabled .section-head h2,
.settings-card.is-disabled .section-head .eyebrow,
.settings-card.is-disabled .panel-note,
.settings-card.is-disabled label span,
.settings-card.is-disabled .charge-level-control strong,
.settings-card.is-disabled .charge-level-control small {
  color: var(--muted);
}

.settings-card.is-disabled button,
.settings-card.is-disabled input {
  cursor: not-allowed;
}

.settings-card.is-disabled .chip,
.settings-card.is-disabled .charge-level-control {
  background: var(--surface-soft);
}

.device-management-list,
.target-option-list,
.menu-list,
.provider-candidate-list,
.receipt-list,
.support-action-list,
.recovery-action-list,
.event-log {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.device-management-row,
.target-option,
.menu-list button,
.provider-candidate-list button,
.receipt-row,
.notification-row,
.support-action-list button,
.recovery-action-list button {
  width: 100%;
  display: grid;
  gap: 4px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.provider-candidate-list button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.provider-candidate-list button > span {
  min-width: 0;
}

.provider-candidate-list button strong,
.provider-candidate-list button span span {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.provider-candidate-list button span span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.provider-candidate-list button em {
  display: inline-grid;
  justify-items: end;
  gap: 4px;
  color: var(--blue);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.menu-list button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.menu-list {
  gap: 14px;
}

.menu-list button > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.menu-list button strong,
.menu-list button small {
  min-width: 0;
}

.menu-list button small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
}

.target-option.active,
.provider-candidate-list button.active,
.rate-card-option.active,
.receipt-row.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.target-picker-sheet {
  display: grid;
  gap: 14px;
}

.target-picker-sheet .sheet-top {
  align-items: flex-start;
}

.target-picker-sheet h2 {
  max-width: 250px;
}

.target-picker-sheet .target-option-list {
  gap: 10px;
  margin: 0;
  max-height: min(320px, 40vh);
  overflow: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.target-picker-sheet .target-option-list::-webkit-scrollbar {
  display: none;
}

.target-picker-sheet .target-option {
  min-height: 76px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  border-radius: 18px;
  padding: 14px 16px;
}

.target-picker-sheet .target-option::after {
  content: "";
  width: 18px;
  height: 18px;
  grid-column: 2;
  grid-row: 1 / span 2;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
}

.target-picker-sheet .target-option.active::after {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 4px #fff;
}

.target-picker-sheet .target-option strong,
.target-picker-sheet .target-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.target-picker-sheet .target-option strong {
  font-size: 1.02rem;
  line-height: 1.18;
}

.target-picker-sheet .target-option span {
  color: var(--muted);
  line-height: 1.25;
}

.target-picker-setup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.target-picker-setup-actions.is-primary-path {
  grid-template-columns: 1fr;
}

.target-picker-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.72fr) minmax(150px, 1.28fr);
  gap: 10px;
  align-items: center;
  margin: 0;
}

.target-picker-actions .primary-action,
.target-picker-actions .secondary-action {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
}

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

.utility-provider-stage,
.utility-results-stage {
  display: grid;
  gap: 12px;
}

.utility-sheet[data-utility-step="questionnaire"] .utility-provider-stage,
.utility-sheet[data-utility-step="questionnaire"] .utility-results-stage,
.utility-sheet[data-utility-step="questionnaire"] > .sheet-actions {
  display: none;
}

.utility-sheet[data-utility-step="results"] .utility-provider-stage {
  display: none;
}

.utility-sheet:not([data-utility-step="results"]) .utility-results-note {
  display: none;
}

.utility-rate-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(112px, 0.9fr);
  gap: 12px;
  align-items: end;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
}

.utility-rate-hero-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.utility-rate-hero-copy strong {
  min-width: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.utility-rate-hero-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.28;
}

.utility-sheet .setting-line small {
  display: none;
}

.utility-rate-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.utility-rate-tag.hourly {
  background: #dfeaff;
  color: var(--blue);
}

.utility-rate-tag.tou {
  background: #fff1c8;
  color: #a26500;
}

.utility-rate-tag.flat {
  background: #dff8e9;
  color: #0d8d4f;
}

.utility-rate-shape-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(20px, 1fr));
  align-items: end;
  gap: 7px;
  min-height: 92px;
  border-radius: 16px;
  padding: 12px 10px 8px;
  background: rgba(255, 255, 255, 0.78);
}

.utility-rate-hero[data-rate-type="flat"] .utility-rate-shape-chart {
  grid-template-columns: repeat(3, minmax(26px, 1fr));
}

.shape-bar {
  position: relative;
  display: flex;
  min-height: 18px;
  height: var(--bar-height);
  align-items: flex-end;
  justify-content: center;
  border-radius: 999px 999px 8px 8px;
  background: var(--blue);
}

.shape-bar.green {
  background: #0d8d4f;
}

.shape-bar.yellow {
  background: #f6ad0a;
}

.shape-bar.blue {
  background: var(--blue);
}

.shape-bar em {
  position: absolute;
  bottom: -20px;
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
}

.utility-questionnaire {
  display: grid;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-soft);
}

.utility-questionnaire-head,
.utility-question {
  display: grid;
  gap: 6px;
}

.utility-questionnaire-head strong,
.utility-question strong {
  color: var(--text);
  line-height: 1.1;
}

.utility-questionnaire-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.utility-question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.utility-question-options button {
  min-height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.utility-question-options button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.utility-questionnaire-actions {
  grid-template-columns: minmax(96px, 0.7fr) minmax(150px, 1.3fr);
  margin-top: 2px;
}

.utility-rate-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.rate-card-picker {
  display: grid;
  gap: 8px;
  max-height: min(330px, 38vh);
  overflow: auto;
  padding: 2px 2px 4px;
}

.rate-card-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.rate-card-option > span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rate-card-option strong,
.rate-card-option small {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.rate-card-option strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rate-card-option small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.rate-card-option em {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.tariff-filter-note {
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.32;
}

.tariff-full-list-button {
  width: 100%;
  min-height: 42px;
}

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

.device-management-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.device-management-row span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.32;
}

.device-management-row em {
  justify-self: end;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.device-management-row button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--blue);
  font-weight: 900;
}

.status-action-list {
  display: grid;
  gap: 8px;
}

.status-action-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: var(--text);
}

.status-action-list.has-recovery .status-action-row.bad,
.status-action-row.bad {
  border-color: rgba(223, 50, 38, 0.28);
}

.status-action-row.warn {
  border-color: rgba(240, 190, 80, 0.45);
}

.status-action-row.ok {
  border-color: rgba(25, 135, 84, 0.28);
}

.status-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-action-icon.vehicle,
.status-action-icon.schedule,
.status-action-icon.utility {
  background: var(--green-soft);
  color: var(--green);
}

.status-action-icon.plug,
.status-action-icon.savings {
  background: var(--warning-soft);
  color: #946000;
}

.status-action-icon.command {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-action-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.status-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.status-action-copy strong {
  min-width: 0;
  font-size: 0.96rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.status-action-copy span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.22;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-action-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.status-action-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.67rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-action-pill.good {
  background: var(--green-soft);
  color: var(--green);
}

.status-action-pill.warn {
  background: var(--warning-soft);
  color: #946000;
}

.status-action-pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-action-row button {
  min-width: 62px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 11px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.failure-card.severe {
  background: linear-gradient(135deg, #fff 0%, var(--danger-soft) 100%);
}

.account-page-hero {
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 100%);
}

.account-page-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.settings-subsection {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-summary-grid,
.diagnostic-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-grid div,
.diagnostic-status-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface-soft);
}

.account-summary-grid span,
.diagnostic-status-grid span,
.support-action-list span,
.recovery-action-list span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.account-summary-grid strong,
.diagnostic-status-grid strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.support-action-list button,
.recovery-action-list button {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
}

.support-action-list button strong,
.recovery-action-list button strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.support-action-list button span,
.recovery-action-list button span {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.support-action-list button::after,
.recovery-action-list button::after {
  content: ">";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--muted);
  font-weight: 900;
}

.notification-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.notification-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-row > div:first-child strong,
.notification-row > div:first-child span,
.notification-row > div:first-child small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-row > div:first-child span,
.notification-row > div:first-child small {
  color: var(--muted);
}

.notification-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.failure-recovery-sheet .assumption-grid {
  margin-top: 12px;
}

.empty-state {
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.savings-hero {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fff 0%, #eaf8ef 100%);
  box-shadow: var(--shadow-soft);
}

.savings-hero h2 {
  font-size: 2.35rem;
  line-height: 1;
}

.savings-hero .positive {
  color: var(--green);
  font-weight: 850;
}

.savings-period-card {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.period-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.savings-vs-cost {
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  border-radius: 16px;
}

.savings-vs-cost:focus-visible {
  outline: 3px solid rgba(10, 91, 255, 0.28);
  outline-offset: 4px;
}

.savings-vs-cost > div:not(.empty-state) {
  height: 100%;
  min-height: 180px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 5px;
  align-items: end;
}

.savings-vs-cost > .empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
}

.savings-vs-cost span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.savings-vs-cost strong {
  font-size: 1rem;
  line-height: 1.1;
}

.savings-vs-cost i {
  display: block;
  width: 100%;
  min-height: 24px;
  border-radius: 999px 999px 8px 8px;
  background: var(--blue);
}

.savings-vs-cost i.zero {
  min-height: 22px;
  border-radius: 999px 999px 6px 6px;
  opacity: 1;
}

.savings-vs-cost i.baseline {
  background: var(--warning);
}

.savings-vs-cost i.saved {
  background: var(--green);
}

.charge-summary-list-card {
  margin: 0 0 14px;
  padding: 16px;
}

.charge-summary-list {
  display: grid;
  gap: 10px;
}

.charge-summary-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
}

.charge-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.charge-summary-head div {
  min-width: 0;
}

.charge-summary-head span,
.mini-bar-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.charge-summary-head strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.charge-summary-head > strong {
  color: var(--green);
  text-align: right;
  white-space: nowrap;
}

.mini-bar-grid {
  display: grid;
  gap: 7px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: center;
}

.mini-bar-row strong {
  font-size: 0.78rem;
  line-height: 1;
  text-align: right;
}

.mini-track {
  height: 8px;
}

.mini-track.blue i {
  background: var(--blue);
}

.mini-track.gold i {
  background: var(--warning);
}

.mini-track.green i {
  background: var(--green);
}

.period-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.period-tile {
  min-height: 82px;
  display: grid;
  gap: 3px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.period-tile.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.period-tile span,
.period-tile small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.period-tile strong {
  font-size: 1.1rem;
}

.event-log li {
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.raw-api-card summary {
  cursor: pointer;
  font-weight: 900;
}

.pairing-box,
.partner-readiness,
.tesla-onboarding {
  margin-top: 14px;
}

.step-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.bottom-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  padding: 6px 8px 8px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
}

.bottom-tabs button {
  min-height: 60px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 900;
}

.bottom-tabs button.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.bottom-tabs svg {
  width: 20px;
  height: 20px;
}

.app-sheet-overlay,
.setup-overlay,
.schedule-editor-overlay,
.tesla-auth-overlay,
.auth-gate,
.billing-gate {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  padding: 16px;
  background: rgba(244, 246, 250, 0.88);
  backdrop-filter: blur(10px);
}

.auth-gate,
.billing-gate {
  place-items: center;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(10, 91, 255, 0.14), rgba(244, 246, 250, 0.94) 38%),
    rgba(244, 246, 250, 0.92);
}

.app-sheet,
.setup-sheet,
.schedule-editor-sheet,
.tesla-auth-sheet,
.billing-gate-card {
  width: 100%;
  max-height: calc(100% - 20px);
  overflow: auto;
  border-radius: var(--radius-sheet);
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.logo-status-overlay {
  align-items: stretch;
  justify-items: start;
  padding: 0;
  background: rgba(244, 246, 250, 0.74);
  backdrop-filter: blur(8px);
}

.logo-status-window {
  position: relative;
  width: min(86%, 340px);
  height: 100%;
  max-height: none;
  border-radius: 0 24px 24px 0;
  padding: 20px 16px 18px;
  box-shadow: 24px 0 50px rgba(17, 18, 23, 0.18);
}

.logo-status-window::after {
  content: "";
  position: absolute;
  top: 0;
  right: -42px;
  bottom: 0;
  width: 42px;
  background: linear-gradient(90deg, rgba(17, 18, 23, 0.12), rgba(17, 18, 23, 0));
  pointer-events: none;
}

.logo-status-window .sheet-top {
  margin-bottom: 12px;
}

.logo-status-window .sheet-top h2 {
  margin-top: 2px;
  font-size: 1.7rem;
  line-height: 1;
}

.status-decision-card {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, #fff 0%, rgba(219, 231, 255, 0.74) 100%);
  box-shadow: var(--shadow-soft);
}

.status-decision-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-decision-card h3 {
  font-size: 1.28rem;
  line-height: 1.04;
}

.status-decision-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.34;
}

.status-decision-card .primary-action {
  min-height: 42px;
  width: 100%;
}

.logo-status-window .menu-status-grid {
  gap: 8px;
  margin-top: 12px;
}

.logo-status-window .menu-status-grid button {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 76px;
  border-radius: 16px;
}

.logo-status-window .menu-status-grid button small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.2;
}

.status-check-list {
  margin-top: 14px;
}

.status-system-list {
  display: grid;
  gap: 8px;
}

.status-system-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 62px;
  border-radius: 15px;
}

.status-system-row i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
}

.status-system-row.ok i {
  background: var(--green-soft);
  color: var(--green);
}

.status-system-row.warn i {
  background: var(--warning-soft);
  color: #946000;
}

.status-system-row.bad i {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-system-row em {
  align-self: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.status-system-row.ok em {
  background: var(--green-soft);
  color: var(--green);
}

.status-system-row.warn em {
  background: var(--warning-soft);
  color: #946000;
}

.status-system-row.bad em {
  background: var(--danger-soft);
  color: var(--danger);
}

.schedule-editor-sheet {
  --schedule-editor-pane-height: 330px;
}

.schedule-editor-target-card {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-soft);
}

.schedule-editor-target-card > div:first-child {
  display: grid;
  gap: 3px;
}

.schedule-editor-target-card span,
.schedule-editor-target-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.schedule-editor-target-card span {
  color: var(--blue);
  text-transform: uppercase;
}

.schedule-editor-target-card strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 950;
}

.schedule-editor-target-list {
  display: grid;
  gap: 8px;
}

.schedule-editor-target-list button {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.schedule-editor-target-list button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.schedule-editor-target-list button em,
.schedule-editor-target-list button b {
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.schedule-editor-target-list button b {
  background: #fff;
  color: var(--blue);
}

.schedule-editor-target-list button.active b {
  background: var(--blue);
  color: #fff;
}

.schedule-editor-target-list .schedule-editor-target-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-transform: none;
}

.schedule-editor-target-list .schedule-editor-target-meta small {
  overflow-wrap: anywhere;
}

.schedule-type-control {
  grid-template-columns: repeat(4, 1fr);
}

.schedule-type-control button {
  padding: 0 6px;
  font-size: 0.72rem;
}

.schedule-type-control button.locked,
.schedule-type-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.schedule-editor-pane {
  min-height: var(--schedule-editor-pane-height);
}

.schedule-editor-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.72fr) minmax(158px, 1.28fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.schedule-editor-actions .primary-action,
.schedule-editor-actions .secondary-action {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
}

#utilitySettingsOverlay {
  align-items: stretch;
  padding: 0;
  background: var(--surface);
  backdrop-filter: none;
}

#utilitySettingsOverlay .utility-sheet {
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: 20px;
  box-shadow: none;
}

.billing-gate-card {
  max-width: 350px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.billing-gate-card h2 {
  font-size: 2rem;
  line-height: 0.98;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-logo {
  display: block;
  width: 132px;
  max-width: 55%;
  height: auto;
  object-fit: contain;
}

.auth-brand-row p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-brand-row strong {
  display: block;
  margin-top: 2px;
  font-size: 0.98rem;
}

.auth-hero-copy {
  display: grid;
  gap: 8px;
}

.auth-hero-copy span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.auth-primary-button,
.billing-gate-card button.auth-primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 950;
}

.auth-primary-button:disabled,
.billing-gate-card button.auth-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

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

.billing-state-grid div {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface-soft);
}

.billing-state-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-state-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.9rem;
}

.auth-error {
  border-radius: 13px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.auth-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.billing-gate-card button.auth-primary-button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.onboarding-screen {
  padding-bottom: 24px;
}

.setup-progress,
.progress-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 14px;
}

.setup-progress span,
.progress-row span {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
}

.setup-progress span.active,
.setup-progress span.complete,
.progress-row span.active,
.progress-row span.complete {
  background: var(--blue);
}

.setup-step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin-top: 18px;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 100%);
  box-shadow: var(--shadow-soft);
}

.setup-step-card.home,
.setup-step-card.schedule,
.setup-step-card.alerts {
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 100%);
}

.setup-step-card.utility,
.setup-step-card.rate {
  background: linear-gradient(135deg, #fff 0%, var(--warning-soft) 100%);
}

.setup-step-card.vehicle,
.setup-step-card.control {
  background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 100%);
}

.setup-step-card.plug {
  background: linear-gradient(135deg, #fff 0%, var(--magenta-soft) 100%);
}

.setup-hero,
.onboarding-symbol {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--blue), var(--magenta));
  color: #fff;
}

.onboarding-symbol.bolt {
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.onboarding-symbol.done {
  background: var(--green);
}

.setup-copy {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.24;
  margin: 0;
}

.setup-hero-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.setup-hero-copy h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.04;
  font-weight: 950;
}

.setup-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.setup-status-grid {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.setup-status-grid .setup-status-tile {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: center;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.setup-status-grid .setup-status-tile span,
.setup-status-grid .setup-status-tile strong {
  grid-column: 1;
}

.setup-status-indicator {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.setup-status-tile.ready .setup-status-indicator {
  border-color: var(--green);
  background: var(--green);
}

.setup-status-tile.ready .setup-status-indicator::after {
  content: "";
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.setup-actions .primary-action {
  flex: 1;
}

.setup-pairing-panel,
.setup-choice-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.setup-choice-panel {
  grid-template-columns: 1fr;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.setup-choice-list {
  display: grid;
  gap: 10px;
}

.setup-choice {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 6px 12px;
  align-items: center;
  text-align: left;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: none;
}

.setup-choice.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(10, 91, 255, 0.12);
}

.setup-choice strong {
  min-width: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.08;
}

.setup-choice .device-icon {
  grid-row: span 2;
}

.setup-choice small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.18;
}

.pairing-card {
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.setup-skip,
.text-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.tesla-auth-browser {
  overflow: hidden;
  margin-top: 12px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
}

.browser-bar {
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.browser-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.tesla-lock {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
}

.boost-options {
  margin-top: 12px;
}

.boost-options-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.command-preview-grid,
.ai-detail-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.command-sheet {
  display: grid;
  gap: 14px;
}

.command-sheet .sheet-top {
  align-items: flex-start;
}

.command-sheet h2 {
  line-height: 1.02;
}

.command-preview-grid {
  gap: 8px;
  margin-top: 0;
}

.command-preview-grid div,
.ai-detail-card {
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
}

.command-preview-grid div {
  display: grid;
  grid-template-columns: minmax(78px, 0.52fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.command-preview-grid span,
.command-preview-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.command-preview-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.command-preview-grid strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.15;
  text-align: right;
}

.command-sheet .panel-note {
  margin: 0;
  line-height: 1.34;
}

.command-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.72fr) minmax(150px, 1.28fr);
  gap: 10px;
  align-items: center;
  margin-top: 0;
}

.command-actions .primary-action,
.command-actions .secondary-action {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
}

.command-failure {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  background: var(--danger-soft);
  color: var(--danger);
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 999;
  display: none;
  max-width: min(90vw, 360px);
  border-radius: 14px;
  padding: 11px 16px;
  color: var(--bg); /* near-black on the light toast; --text is white under the dark theme */
  background: var(--text);
  box-shadow: 0 12px 32px rgba(17, 18, 23, 0.25);
  font-size: 0.86rem;
  font-weight: 850;
  transform: translateX(-50%);
}

.toast.show {
  display: block;
  animation: toast-pop 2.4s forwards;
}

@keyframes toast-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  12%,
  78% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

.icon-button:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.charge-state-button:focus-visible,
.ai-card:focus-visible,
.bottom-tabs button:focus-visible,
input:focus-visible,
select:focus-visible,
.settings-row.button-row:focus-visible,
.setup-skip:focus-visible,
.rate-card-option:focus-visible {
  outline: 3px solid rgba(10, 91, 255, 0.28);
  outline-offset: 2px;
}

body.native-app,
html.native-app {
  background: var(--surface);
}

body.native-app .plug-stage,
body.native-app .phone-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

body.native-app .phone-frame {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 860px) {
  .plug-stage {
    display: block;
    padding: 0;
  }

  .phone-shell,
  .phone-frame {
    width: 100%;
  }

  .phone-frame {
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 460px) {
  .screen-stack {
    height: calc(100% - 112px - 76px);
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .home-charge-source-grid {
    grid-template-columns: 1fr;
  }

  .charge-button-group {
    grid-template-columns: 1fr 1fr;
  }

  .simulator-body,
  .garage-command-grid,
  .garage-estimate-grid,
  .utility-form-grid,
  .tesla-config-grid,
  .device-facts,
  .garage-health-grid,
  .garage-telemetry-grid {
    grid-template-columns: 1fr;
  }

  .rate-strip {
    gap: 7px;
  }

  .rate-strip article {
    min-height: 112px;
    padding: 10px;
  }

  .rate-strip strong {
    font-size: 1.05rem;
  }
}

/* v1-v9 fidelity pass: keep the production wiring, but match the storyboard
   phone proportions and card/navigation language much more closely. */
@media (min-width: 431px) {
  .plug-stage {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 24px;
    background: var(--bg);
  }

  .phone-shell {
    width: 390px;
  }

  .phone-frame {
    width: 390px;
    height: 844px;
    min-height: 844px;
    overflow: hidden;
    border: 10px solid #17181d;
    border-radius: 44px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
}

.auth-strip {
  display: none;
}

.screen-stack {
  height: calc(100% - 62px - 76px);
}

.screen-view {
  padding: 18px 20px 24px;
}

.screen-heading {
  align-items: end;
  margin-bottom: 14px;
}

.screen-heading h2 {
  font-size: 30px;
  line-height: 1;
}

.hero-card,
.ai-card,
.tesla-card,
.simulator-card,
.schedule-context-card,
.settings-card,
.log-card,
.hint-card,
.raw-api-card,
.garage-hero,
.vehicle-data-card,
.devices-hub-card {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.bottom-tabs {
  height: 76px;
  padding: 0;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: none;
}

.bottom-tabs button {
  min-height: 76px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.bottom-tabs button.active {
  color: var(--blue);
  background: transparent;
}

.bottom-tabs svg {
  width: 19px;
  height: 19px;
}

.bottom-tabs button:focus-visible {
  outline: 0;
  outline-offset: 0;
}

.setup-overlay {
  align-items: stretch;
  padding: 0;
  background: var(--surface);
  backdrop-filter: none;
}

.setup-sheet.onboarding-screen {
  max-height: none;
  height: 100%;
  border-radius: 0;
  padding: 20px;
  box-shadow: none;
}

.setup-top.onboarding-top {
  min-height: 44px;
  margin-top: 0;
}

.setup-step-card.onboarding-hero {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
}

.setup-copy {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.38;
}

.garage-hero {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.garage-source-grid {
  gap: 10px;
}

.garage-source-card .garage-source-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 16px;
}

.garage-source-card .garage-source-icon svg {
  width: 28px;
  height: 28px;
}

.garage-hero-copy {
  min-width: 0;
  margin-top: 0;
}

.garage-hero-copy strong {
  font-size: 18px;
  line-height: 1.1;
}

.vehicle-data-card {
  margin-top: 14px;
}

body.native-app .phone-frame,
body.native-app .plug-stage,
body.native-app .phone-shell {
  border: 0;
  border-radius: 0;
}

@media (max-width: 430px) {
  .plug-stage {
    display: block;
    padding: 0;
  }

  .phone-shell,
  .phone-frame {
    width: 100%;
  }

  .phone-frame {
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen-stack {
    height: calc(100% - 62px - 76px);
  }
}

/* VueRate production dark visual system */
:root {
  color-scheme: dark;
  --bg: #05080b;
  --surface: #0b1116;
  --surface-soft: #111920;
  --surface-tint: #0d1b27;
  --text: #f5f7fa;
  --muted: #a6b0ba;
  --soft: #798692;
  --border: #23303a;
  --border-strong: #34434f;
  --blue: #0a84ff;
  --blue-dark: #0873df;
  --blue-soft: #0c2943;
  --magenta: #ff6b2c;
  --magenta-soft: #351d10;
  --green: #43cf71;
  --green-soft: #0d2f20;
  --warning: #f4b63e;
  --warning-soft: #33270e;
  --danger: #ff5b62;
  --danger-soft: #37161a;
  --orange: #ff6b2c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --shadow-soft: none;
  --radius-card: 8px;
  --radius-sheet: 8px;
  --radius-control: 8px;
}

html,
body,
.plug-stage {
  background: #030609;
}

.phone-frame {
  border: 1px solid #26313a;
  background: var(--bg);
}

.auth-strip,
.screen-view,
.bottom-tabs {
  background: var(--bg);
}

.auth-strip {
  border-bottom: 1px solid var(--border);
}

.icon-button,
.auth-strip button {
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
}

.icon-button:hover,
.icon-button:focus-visible,
.auth-strip button:hover,
.auth-strip button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.screen-view {
  padding-top: 12px;
}

.screen-heading {
  align-items: center;
  margin-bottom: 14px;
}

.screen-heading h2 {
  color: var(--text);
  font-size: 1.72rem;
  line-height: 1.05;
}

.eyebrow,
.hero-label,
.setting-head {
  color: var(--blue);
  letter-spacing: 0;
}

.hero-card,
.ai-card,
.tesla-card,
.charge-empty-card,
.simulator-card,
.schedule-context-card,
.settings-card,
.log-card,
.hint-card,
.raw-api-card,
.garage-hero,
.vehicle-data-card,
.plan-rate-context-card,
.savings-period-card,
.charge-summary-list-card,
.settings-account-card,
.billing-summary-card {
  border-color: var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
}

.hero-card[data-state],
.hero-card[data-state="setup"],
.hero-card[data-state="charging"],
.hero-card[data-state="scheduled"],
.hero-card[data-state="complete"],
.savings-hero,
.account-page-hero,
.utility-rate-hero,
.setup-step-card,
.charge-empty-card {
  background: var(--surface) !important;
}

.hero-card,
.savings-hero,
.home-savings-wide {
  border-left: 3px solid var(--blue);
}

.hero-card[data-state="charging"],
.savings-hero {
  border-left-color: var(--green);
}

.hero-card p,
.hero-card span,
.panel-note,
.setup-copy,
.settings-route-row small,
.settings-account-card small,
.charge-summary-list-card small,
.receipt-list small,
.garage-hero-copy small,
.vehicle-data-card span,
.vehicle-data-card small {
  color: var(--muted);
}

.chip,
.badge,
.updated {
  border-color: var(--border);
  color: var(--muted);
  background: var(--surface-soft);
}

.chip.ok,
.badge.success {
  color: var(--green);
  background: var(--green-soft);
}

.chip.warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.primary-action,
.secondary-action,
.settings-row.button-row {
  border-radius: 8px;
}

.primary-action {
  border-color: var(--blue);
  color: #ffffff;
  background: var(--blue);
}

.secondary-action {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-soft);
}

.primary-action:disabled,
.secondary-action:disabled {
  border-color: var(--border);
  color: #66727d;
  background: #11171c;
  opacity: 1;
}

.rate-strip,
.rate-strip[data-rate-layout="api-feeds"] {
  gap: 8px;
}

.rate-strip article,
.api-rate-feed-tile {
  border-color: var(--border) !important;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface) !important;
  box-shadow: none;
}

.api-rate-feed-grid {
  gap: 7px;
}

.api-rate-feed-item {
  position: relative;
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 9px;
  color: var(--text);
  background: #080d11;
  text-align: left;
}

.api-rate-feed-item::before {
  position: static;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  content: "";
}

.api-rate-feed-item:nth-child(1)::before {
  background: var(--warning);
}

.api-rate-feed-item:nth-child(3)::before {
  background: var(--green);
}

.api-rate-feed-item:hover,
.api-rate-feed-item:focus-visible {
  border-color: var(--blue);
  outline: 0;
  background: var(--surface-soft);
}

.api-rate-feed-item strong {
  color: var(--text);
}

.rate-strip article[data-tone="good"] strong,
.rate-good {
  color: var(--green);
}

.rate-strip article[data-tone="mid"] strong,
.rate-mid {
  color: var(--warning);
}

.rate-strip article[data-tone="bad"] strong,
.rate-bad {
  color: var(--danger);
}

.rate-strip em,
.tag-neutral,
.tag-mid,
.tag-bad,
.tag-good {
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
}

.tag-good {
  color: var(--green);
  background: var(--green-soft);
}

.tag-mid {
  color: var(--warning);
  background: var(--warning-soft);
}

.tag-bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.schedule-context-card {
  padding: 15px;
}

.schedule-target-actions {
  align-items: flex-end;
}

.receipt-list > *,
.charge-summary-list > * {
  border-color: var(--border);
  color: var(--text);
  background: #080d11;
}

.garage-target-card {
  border-color: var(--border);
  background: var(--surface);
}

.garage-target-card.active,
.garage-target-card.settings-open {
  border-color: var(--blue);
  background: var(--surface-tint);
}

.garage-target-card.active[data-source-state="charging"],
.garage-target-card.settings-open[data-source-state="charging"],
.garage-target-list > .charge-control-card.target-expanded-panel {
  border-color: var(--blue);
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
}

.charge-control-card {
  margin-top: 8px;
}

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

.garage-command-button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding-inline: 10px;
}

.charge-start-button {
  border-color: var(--green);
  color: #04150b;
  background: var(--green);
}

.charge-stop-button {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger-soft);
}

.range-meter,
.progress-track,
.charge-level-slider {
  background: #17212a;
}

.range-meter > span,
.progress-track > span {
  background: var(--blue);
}

.settings-landing-group,
.settings-account-card {
  margin-bottom: 14px;
}

.settings-landing-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.settings-route-row {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.settings-route-row:hover,
.settings-route-row:focus-visible {
  background: var(--surface-soft);
}

.settings-route-icon,
.settings-account-avatar,
.account-page-avatar {
  color: var(--blue);
  background: var(--blue-soft);
}

.bottom-tabs {
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 11, 0.98);
}

.bottom-tabs button {
  color: var(--soft);
  background: transparent;
}

.bottom-tabs button.active {
  color: var(--blue);
  background: transparent;
}

.bottom-tabs button:hover,
.bottom-tabs button:focus-visible {
  color: var(--text);
  background: var(--surface);
}

.app-sheet-overlay,
.setup-overlay,
.schedule-editor-overlay,
.tesla-auth-overlay {
  background: rgba(0, 0, 0, 0.78);
}

.auth-gate {
  place-items: center;
  padding: 24px;
  background: var(--bg);
  backdrop-filter: none;
}

.billing-gate-card h2 {
  color: var(--text);
}

.billing-gate {
  background: rgba(0, 0, 0, 0.86);
}

.billing-gate-card {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-sheet,
.setup-sheet,
.schedule-editor-sheet,
.tesla-auth-sheet,
.command-sheet,
.target-picker-sheet {
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  color: var(--text);
  background: var(--bg);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
}

.setup-sheet.onboarding-screen {
  background: var(--bg);
}

.settings-subsection,
.schedule-editor-target-card,
.schedule-editor-pane,
.schedule-editor-review,
.price-explain-grid > div,
.assumption-grid > div,
.diagnostic-status-grid > div,
.billing-summary-card,
.billing-detail-list > div,
.utility-form-grid,
.settings-list,
.setup-status-tile,
.target-option-list button {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.schedule-editor-review {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px;
}

.schedule-editor-review > div {
  display: grid;
  gap: 9px;
}

.schedule-editor-review span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 12px;
}

.schedule-editor-review small {
  color: var(--muted);
}

.schedule-editor-review strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.schedule-editor-target-list button,
.provider-candidate-list button,
.rate-card-option,
.support-action-list button,
.recovery-action-list button {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-soft);
}

.schedule-editor-target-list button.active,
.provider-candidate-list button.active,
.rate-card-option.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.schedule-editor-target-list button.incompatible {
  opacity: 0.58;
}

.plan-rate-insight {
  display: none;
}

.plan-rate-visual,
.plan-signal-row,
.plan-rate-signals.muted .plan-signal-row {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-soft);
}

.setup-choice-panel,
.setup-choice,
.pairing-card {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
}

.setup-choice.active {
  border-color: var(--blue);
  color: var(--text);
  background: var(--blue-soft);
  box-shadow: none;
}

.setup-choice strong,
.garage-target-card.add-source .garage-hero-copy strong {
  color: var(--text);
}

.setup-choice small,
.garage-target-card.add-source .garage-hero-copy span,
.garage-target-card.add-source .garage-hero-copy small {
  color: var(--muted);
}

.garage-target-card.add-source {
  border-color: var(--border-strong);
  background: var(--surface);
}

.garage-target-card.add-source .garage-source-icon.target {
  color: var(--muted);
  background: var(--surface-soft);
}

.garage-target-card.add-source .add-source-actions button {
  min-width: 0;
  padding-inline: 12px;
}

.settings-row,
.schedule-row,
.device-management-row,
.target-option,
.menu-list button,
.provider-candidate-list button,
.receipt-row,
.notification-row,
.support-action-list button,
.recovery-action-list button,
.price-feed-card {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-soft);
}

.status-decision-card {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.status-decision-card h3 {
  color: var(--text);
}

.status-decision-card p:not(.eyebrow) {
  color: var(--muted);
}

.status-system-row.warn i,
.status-system-row.warn em {
  color: var(--warning);
}

.charge-state-button.off.active,
.charge-state-button.off[aria-pressed="true"] {
  color: var(--danger);
  background: var(--danger-soft);
}

.period-tile {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-soft);
}

.settings-route-icon.intelligence {
  color: var(--magenta);
  background: var(--magenta-soft);
}

.settings-route-icon.privacy {
  color: #9fb9dc;
  background: #142235;
}

input,
select,
textarea {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-soft);
}

input[type="checkbox"],
input[type="range"] {
  accent-color: var(--blue);
}

.savings-period-card,
.period-summary-grid {
  border-color: var(--border);
  background: var(--surface);
}

.period-tabs {
  border-color: var(--border);
  background: #080d11;
}

.period-tabs button {
  color: var(--muted);
  background: transparent;
}

.period-tabs button.active,
.period-tile.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.savings-vs-cost i {
  background: var(--blue);
}

.savings-vs-cost i.baseline {
  background: var(--warning);
}

.savings-vs-cost i.saved {
  background: var(--green);
}

/* Home savings comparison: button-style colored tiles */
.home-savings-comparison.savings-vs-cost {
  min-height: 0;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  align-items: stretch;
}

.home-savings-comparison.savings-vs-cost > div:not(.empty-state) {
  --tile-accent: var(--blue);
  --tile-accent-tint: rgba(10, 132, 255, 0.22);
  --tile-accent-border: rgba(10, 132, 255, 0.5);
  min-height: 76px;
  gap: 4px;
  padding: 9px 10px 8px;
  border: 1px solid var(--tile-accent-border);
  border-radius: 14px;
  background:
    linear-gradient(165deg, var(--tile-accent-tint) 0%, rgba(255, 255, 255, 0.02) 100%),
    var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 6px 14px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-savings-comparison.savings-vs-cost > div:nth-child(2) {
  --tile-accent: var(--warning);
  --tile-accent-tint: rgba(244, 182, 62, 0.2);
  --tile-accent-border: rgba(244, 182, 62, 0.5);
}

.home-savings-comparison.savings-vs-cost > div:nth-child(3) {
  --tile-accent: var(--green);
  --tile-accent-tint: rgba(67, 207, 113, 0.2);
  --tile-accent-border: rgba(67, 207, 113, 0.5);
}

.home-savings-comparison.savings-vs-cost span {
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-savings-comparison.savings-vs-cost strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 950;
}

.home-savings-comparison.savings-vs-cost i,
.home-savings-comparison.savings-vs-cost i.zero,
.home-savings-comparison.savings-vs-cost i.baseline,
.home-savings-comparison.savings-vs-cost i.saved {
  min-height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tile-accent), color-mix(in srgb, var(--tile-accent) 65%, #ffffff));
  box-shadow: 0 0 12px var(--tile-accent-tint);
}

.home-savings-wide:hover .home-savings-comparison.savings-vs-cost > div:not(.empty-state) {
  transform: translateY(-1px);
  border-color: var(--tile-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 18px rgba(0, 0, 0, 0.32);
}

.home-savings-wide:active .home-savings-comparison.savings-vs-cost > div:not(.empty-state) {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Weekly charging timeline (Savings tab) */
.weekly-charging-card {
  display: grid;
  gap: 12px;
}

.weekly-charging-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

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

.weekly-charging-legend .swatch {
  width: 16px;
  height: 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.weekly-charging-legend .swatch.charging {
  border-color: var(--green);
  background: rgba(67, 207, 113, 0.32);
}

.weekly-charging-legend .swatch.rate {
  height: 0;
  border: 0;
  border-top: 2px solid var(--blue);
  border-radius: 0;
}

.weekly-charging-grid {
  display: grid;
  gap: 6px;
}

.weekly-charging-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.weekly-charging-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.weekly-charging-row[aria-pressed="true"] .weekly-charging-track {
  box-shadow: 0 0 0 1.5px var(--blue);
}

.weekly-charging-day {
  display: grid;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.weekly-charging-day small {
  margin-top: 3px;
  color: var(--soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.weekly-charging-row.today .weekly-charging-day {
  color: var(--text);
}

.weekly-charging-track {
  position: relative;
  height: 36px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}

.weekly-charging-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.weekly-charging-session {
  position: absolute;
  top: 2px;
  bottom: 2px;
  min-width: 3px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  padding-top: 3px;
  border-bottom: 3px solid var(--green);
  border-radius: 4px;
  background: rgba(67, 207, 113, 0.3);
  color: var(--text);
  font-size: 0.6rem;
  font-weight: 900;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
}

.weekly-charging-rate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.weekly-charging-rate polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.weekly-charging-stat {
  display: grid;
  text-align: right;
  line-height: 1.05;
}

.weekly-charging-stat strong {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.weekly-charging-stat small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.weekly-charging-axis {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 64px;
  gap: 8px;
  margin-top: -4px;
}

.weekly-charging-axis > span {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-size: 0.6rem;
  font-weight: 800;
}

.weekly-charging-axis em {
  font-style: normal;
}

.weekly-charging-axis.compact {
  grid-template-columns: minmax(0, 1fr);
}

.weekly-charging-axis.compact > span {
  grid-column: 1;
}

.weekly-charging-tabs {
  margin: 0;
}

.weekly-charging-daynav {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.weekly-charging-daynav button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.weekly-charging-daynav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.weekly-charging-daynav strong {
  text-align: center;
  font-size: 0.86rem;
}

.weekly-charging-legend .swatch.bar {
  width: 9px;
  height: 14px;
  border: 0;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}

.weekly-charging-legend .swatch.bar.charging {
  background: var(--green);
}

.weekly-hours-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
  height: 104px;
  align-items: end;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.weekly-hour {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  cursor: pointer;
}

.weekly-hour i {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.weekly-hour.charging i {
  background: var(--green);
}

.weekly-hour i.missing {
  min-height: 3px;
  background: var(--border);
}

.weekly-hour.selected {
  background: rgba(255, 255, 255, 0.08);
}

.weekly-hour:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.weekly-hours-strip {
  position: relative;
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.weekly-hours-strip b {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--green);
}

.billing-settings-sheet {
  display: grid;
  gap: 14px;
}

.billing-summary-card {
  border: 1px solid var(--border);
  padding: 15px;
}

.billing-summary-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.billing-summary-head > span {
  display: grid;
  gap: 4px;
}

.billing-summary-head small,
.billing-detail-list span {
  color: var(--muted);
}

.billing-summary-head strong {
  font-size: 1.3rem;
}

.billing-detail-list {
  display: grid;
  border-top: 1px solid var(--border);
}

.billing-detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  background: transparent;
}

.billing-detail-list > div:last-child {
  border-bottom: 0;
}

.billing-detail-list strong {
  max-width: 58%;
  text-align: right;
}

.sheet-actions .compact,
.schedule-editor-actions .compact,
.billing-sheet-actions .compact {
  width: auto;
  min-width: 104px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
}

/* With Restore purchases (iOS) there are three buttons; the main action takes its own full-width row. */
.billing-sheet-actions {
  flex-wrap: wrap;
}

.billing-sheet-actions .compact {
  flex: 1 1 auto;
}

.billing-sheet-actions #billingSettingsManageButton {
  order: -1;
  flex-basis: 100%;
}

@media (max-width: 430px) {
  .phone-frame {
    background: var(--bg);
  }

}

/* Dark theme: surfaces and layouts that still carried light-theme values */
.charge-empty-symbol {
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1.5px var(--border);
}

.charge-empty-actions .secondary-action {
  background: var(--surface-soft);
}

.charge-empty-checklist div {
  border-color: var(--border);
  background: var(--surface-soft);
}

.utility-rate-shape-chart {
  background: var(--surface-soft);
}

.utility-rate-tag.hourly {
  background: var(--blue-soft);
  color: var(--blue);
}

.utility-rate-tag.tou {
  background: var(--warning-soft);
  color: var(--warning);
}

.utility-rate-tag.flat {
  background: var(--green-soft);
  color: var(--green);
}

.shape-bar em {
  color: var(--text);
}

.plan-signal-dot.gray {
  background: var(--border);
}

.device-icon.with-svg {
  display: grid;
  place-items: center;
  color: var(--blue);
}

.device-icon.with-svg::before,
.device-icon.with-svg::after {
  display: none;
}

.device-icon.with-svg svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

/* Two side-by-side actions share the row instead of overflowing it. */
.sheet-actions.split-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.sheet-actions.split-actions .compact {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

/* With no charging history yet, the comparison bars sit as a faint baseline instead of full-height blobs. */
.savings-vs-cost i.zero {
  min-height: 4px;
  height: 4px;
  border-radius: 4px;
  opacity: 0.35;
}

/* Home hero: long status lines (e.g. "Charge info pending") step down a size so they don't fill the card. */
.hero-card h2.compact {
  font-size: 1.6rem;
  line-height: 1.05;
}

/* Home hero badge: color carries the status. */
.hero-badge[data-tone] {
  gap: 6px;
}

.hero-badge[data-tone="ok"],
.hero-badge[data-tone="live"] {
  background: var(--green-soft);
  color: var(--green);
}

.hero-badge[data-tone="warn"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.hero-badge[data-tone="ok"]::before,
.hero-badge[data-tone="live"]::before,
.hero-badge[data-tone="warn"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.hero-badge[data-tone="live"]::before {
  animation: hero-badge-pulse 1.6s ease-in-out infinite;
}

@keyframes hero-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge[data-tone="live"]::before {
    animation: none;
  }
}

/* Home savings: green accent, headline amount, percentage pill, and the facts behind it. */
.home-savings-wide {
  border-left-color: var(--green);
  background:
    linear-gradient(150deg, rgba(67, 207, 113, 0.12) 0%, rgba(67, 207, 113, 0) 55%),
    var(--surface) !important;
}

.home-savings-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-savings-pill {
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.home-savings-wide-copy strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.home-savings-wide.has-savings #homeSavingsMetric {
  color: var(--green);
}

.home-savings-wide-copy strong small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.home-savings-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-savings-facts:empty {
  display: none;
}

.home-savings-facts > div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.home-savings-facts span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-savings-facts strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 950;
}

.home-savings-facts .home-savings-cta {
  grid-column: 1 / -1;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: none;
}

/* Recent charges: Show all / Show fewer control under the latest few. */
.receipt-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--blue);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.receipt-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.receipt-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Settings: friendly header, at-a-glance setup, softer grouped rows. */
#screen-settings .screen-heading h2 {
  font-size: 1.9rem;
}

.settings-profile-hero {
  grid-template-columns: 56px minmax(0, 1fr) 20px;
  gap: 14px;
  min-height: 88px;
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(140deg, rgba(10, 132, 255, 0.16) 0%, rgba(10, 132, 255, 0) 60%),
    var(--surface) !important;
}

.settings-profile-hero .settings-account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--blue), #6aa8ff);
  color: #fff;
  font-size: 1.35rem;
}

.settings-profile-hero > span:nth-child(2) {
  gap: 4px;
}

.settings-profile-hero strong {
  font-size: 1.12rem;
}

.settings-plan-chip {
  justify-self: start;
  margin-top: 2px;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.settings-plan-chip[data-tone="ok"] {
  background: var(--green-soft);
  color: var(--green);
}

.settings-setup-strip {
  margin: 0 0 20px;
}

.settings-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-setup-tile {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.settings-setup-tile:hover,
.settings-setup-tile:focus-visible {
  border-color: var(--blue);
}

.settings-setup-tile:active {
  transform: scale(0.98);
}

.settings-setup-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.settings-setup-icon.utility {
  background: var(--warning-soft);
  color: var(--warning);
}

.settings-setup-icon.plan {
  background: var(--green-soft);
  color: var(--green);
}

.settings-setup-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-setup-tile small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-setup-tile strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.86rem;
  line-height: 1.2;
}

.settings-setup-tile em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.settings-setup-tile em[data-tone="ok"] {
  background: var(--green-soft);
  color: var(--green);
}

.settings-setup-tile em[data-tone="warn"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.settings-setup-tile em[data-tone="ok"]::before {
  content: "✓";
}

.settings-group-label {
  text-transform: none;
  font-size: 0.82rem;
  color: var(--text);
}

.settings-landing-list {
  border-radius: 16px;
}

.settings-route-row {
  min-height: 68px;
  padding: 12px 14px;
}

.settings-route-row strong {
  font-size: 0.95rem;
}

.settings-route-row small {
  font-size: 0.78rem;
}

.settings-route-icon {
  border-radius: 999px;
}

.settings-route-row small {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Savings > Recent smart charges: compact rows that open a cost breakdown. */
.charge-summary-row {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.charge-summary-head {
  width: 100%;
  align-items: center;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.charge-summary-head div {
  flex: 1;
  display: grid;
  gap: 2px;
}

.charge-summary-head strong {
  font-size: 0.9rem;
}

.charge-summary-saved {
  flex: none;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.charge-summary-head svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.charge-summary-row.open .charge-summary-head svg {
  transform: rotate(180deg);
}

.charge-summary-detail {
  display: none;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 12px 14px;
}

.charge-summary-row.open .charge-summary-detail {
  display: grid;
}

.charge-summary-receipt {
  justify-self: start;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.charge-summary-list .receipt-toggle {
  margin-top: 2px;
}

/* Savings > Live charging session: big power figure, battery to target, and the session's numbers. */
.live-session-idle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.live-session-body {
  display: none;
  gap: 14px;
  margin-top: 10px;
}

.live-session-card.is-charging .live-session-body {
  display: grid;
}

.live-session-card.is-charging .live-session-idle {
  display: none;
}

.live-session-card.is-charging {
  border-left: 3px solid var(--green);
  background:
    linear-gradient(150deg, rgba(67, 207, 113, 0.12) 0%, rgba(67, 207, 113, 0) 55%),
    var(--surface) !important;
}

.chip.live {
  gap: 6px;
  background: var(--green-soft);
  color: var(--green);
}

.chip.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  animation: hero-badge-pulse 1.6s ease-in-out infinite;
}

.live-session-power {
  display: grid;
  gap: 2px;
}

.live-session-power strong {
  color: var(--green);
  font-size: 2.3rem;
  line-height: 1;
}

.live-session-power span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.live-session-progress .progress-track {
  position: relative;
  height: 10px;
}

.live-session-progress .progress-track span {
  background: linear-gradient(90deg, var(--green), #8be3a8);
}

.live-session-progress .progress-track i {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 2px;
  background: var(--text);
}

.live-session-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.live-session-stats > div {
  display: grid;
  gap: 3px;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.live-session-stats span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-session-stats strong {
  font-size: 1rem;
  font-weight: 950;
}

.live-session-stats b {
  font-weight: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .chip.live::before {
    animation: none;
  }
}

/* Plans & billing: Pro leads with a glow and gradient; Free sits quietly below. */
.plan-compare {
  display: grid;
  gap: 12px;
  margin: 4px 0 14px;
}

.plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 16px;
  background: var(--surface);
}

.plan-card.plan-pro {
  position: relative;
  border-color: rgba(67, 207, 113, 0.45);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(67, 207, 113, 0.18) 0%, rgba(67, 207, 113, 0) 60%),
    var(--surface);
  box-shadow: 0 0 0 1px rgba(67, 207, 113, 0.12), 0 18px 40px rgba(10, 132, 255, 0.12);
}

.plan-card.current {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-name {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-pro .plan-name {
  background: linear-gradient(90deg, #6aa8ff, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-tag {
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.plan-pro .plan-tag,
.plan-card.current .plan-tag {
  background: var(--green-soft);
  color: var(--green);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
}

.plan-price strong {
  font-size: 2.4rem;
  line-height: 1;
}

.plan-price span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.plan-headline {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.plan-pitch {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.plan-proof {
  margin: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.35;
}

.plan-features {
  display: grid;
  gap: 10px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.plan-features li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.plan-features svg {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 3px;
  background: var(--green-soft);
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-features span {
  display: grid;
  gap: 2px;
  color: var(--muted);
}

.plan-features strong {
  color: var(--text);
  font-size: 0.9rem;
}

.plan-free .plan-features span {
  color: var(--text);
}

.plan-features .plan-missing span {
  color: var(--muted);
}

.plan-features .plan-missing svg {
  background: var(--surface-soft);
  stroke: var(--muted);
}

.plan-cta {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--blue), #2fbf71);
  font-size: 1rem;
}

.plan-fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.savings-pro-teaser {
  display: none;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(67, 207, 113, 0.45);
  border-radius: 20px;
  padding: 18px 16px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(67, 207, 113, 0.18) 0%, rgba(67, 207, 113, 0) 60%),
    var(--surface);
}

.savings-pro-teaser h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.savings-pro-teaser p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.savings-pro-teaser ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
}

#screen-energy.savings-locked .savings-pro-teaser {
  display: grid;
}

#screen-energy.savings-locked .savings-hero,
#screen-energy.savings-locked .savings-period-card:not(.home-only-savings),
#screen-energy.savings-locked .charge-summary-list-card {
  display: none;
}

/* Native app: sheets and gates stay clear of the camera cutout and home indicator, like the header. */
body.native-app .app-sheet-overlay,
body.native-app .setup-overlay,
body.native-app .schedule-editor-overlay,
body.native-app .tesla-auth-overlay,
body.native-app .auth-gate,
body.native-app .billing-gate {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Home live prices: two tiles (right now, this hour). */
.api-rate-feed-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* No top header: screens use the full height above the tab bar, and clear the notch in the native apps. */
.screen-stack {
  height: calc(100% - 76px);
}

body.native-app .screen-view {
  padding-top: max(18px, env(safe-area-inset-top));
}

/* ===== Visual refresh: one accent (VueRate orange), softer borderless cards, rounded bold numbers ===== */
:root {
  --blue: #ff6b2c;
  --blue-dark: #e85a1e;
  --blue-soft: #3a1c0c;
  --surface: #0f161d;
  --surface-soft: #172028;
  --border: #1f2932;
  --radius-card: 20px;
  --font-num: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, system-ui, sans-serif;
}

/* Cards: no outlines, rounder corners, a faint top highlight for depth. */
.hero-card,
.ai-card,
.tesla-card,
.charge-empty-card,
.settings-card,
.log-card,
.hint-card,
.garage-hero,
.vehicle-data-card,
.plan-rate-context-card,
.savings-period-card,
.charge-summary-list-card,
.settings-account-card,
.billing-summary-card,
.home-metric-card,
.settings-landing-list,
.settings-setup-tile,
.savings-hero,
.live-session-card,
.weekly-charging-card,
.rate-strip article,
.api-rate-feed-tile {
  border-color: transparent !important;
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-card,
.savings-hero,
.home-savings-wide,
.live-session-card.is-charging {
  border-left: 0 !important;
}

.hero-card {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 107, 44, 0.12) 0%, rgba(255, 107, 44, 0) 55%),
    var(--surface) !important;
}

.home-savings-wide {
  border-radius: var(--radius-card);
}

/* The first Home tile and other blue-tinted accents follow the orange accent. */
.home-savings-comparison.savings-vs-cost > div:not(.empty-state):first-child {
  --tile-accent-tint: rgba(255, 107, 44, 0.2);
  --tile-accent-border: rgba(255, 107, 44, 0.5);
}

.plan-card.plan-pro,
.savings-pro-teaser {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 107, 44, 0.22) 0%, rgba(255, 107, 44, 0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(67, 207, 113, 0.18) 0%, rgba(67, 207, 113, 0) 60%),
    var(--surface);
}

.plan-pro .plan-name {
  background: linear-gradient(90deg, #ff8a50, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
}

.primary-action,
.auth-primary-button {
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(255, 107, 44, 0.28);
}

/* Bottom tabs: the active tab gets a soft orange pill behind its icon. */
.bottom-tabs button.active svg {
  border-radius: 999px;
  box-shadow: 0 0 0 7px var(--blue-soft);
  background: var(--blue-soft);
}

/* Home charging ring */
.hero-ring-row {
  display: grid;
  gap: 14px;
}

.hero-ring-row.has-ring {
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
}

.hero-ring-row.has-ring .battery-row {
  display: grid;
  gap: 14px;
}

.hero-ring-row.has-ring .battery-row div,
.hero-ring-row.has-ring .battery-row div:last-child {
  text-align: left;
}

.hero-card:has(.hero-ring-row.has-ring) .progress-track,
.hero-card:has(.hero-ring-row.has-ring) .progress-labels {
  display: none;
}

.charge-ring {
  --level: 0;
  --target: 80;
  --ring-color: var(--blue);
  position: relative;
  width: 148px;
  height: 148px;
}

.charge-ring[data-state="complete"] {
  --ring-color: var(--green);
}

.charge-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.charge-ring circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.ring-track {
  stroke: var(--surface-soft);
}

.ring-fill {
  stroke: var(--ring-color);
  stroke-dasharray: var(--level) 100;
  transition: stroke-dasharray 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ring-color) 55%, transparent));
}

.ring-target {
  stroke: var(--text);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 60px 60px;
  transform: rotate(calc(var(--target) * 3.6deg + 90deg)) translateY(0);
}

.charge-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

.charge-ring-center strong {
  font-family: var(--font-num);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.charge-ring-center span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.charge-ring[data-state="charging"] .ring-fill {
  animation: charge-ring-glow 1.8s ease-in-out infinite;
}

@keyframes charge-ring-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 107, 44, 0.5)); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 107, 44, 0.95)); }
}

@media (prefers-reduced-motion: reduce) {
  .charge-ring[data-state="charging"] .ring-fill {
    animation: none;
  }

  .ring-fill {
    transition: none;
  }
}

/* Numbers: rounded, bold, even-width digits. */
.battery-row strong,
#homeSavingsMetric,
#savingsTotal,
.home-savings-comparison strong,
.home-savings-facts strong,
.rate-strip strong,
.api-rate-feed-item strong,
.live-session-power strong,
.live-session-stats strong,
.plan-price strong,
.savings-vs-cost strong,
.charge-summary-saved,
.period-tile strong {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.battery-row strong {
  font-size: 1.5rem;
  font-weight: 800;
}

#homeSavingsMetric,
#savingsTotal {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* A touch more breathing room between Home sections. */
#screen-home > section,
#screen-home > .home-metric-grid {
  margin-bottom: 16px;
}

/* The ring already shows the battery level, so the side column keeps only the second metric. */
.hero-ring-row.has-ring .battery-row div:first-child {
  display: none;
}

.primary-action:disabled,
.auth-primary-button:disabled {
  box-shadow: none;
}

/* Motion: screens ease in on tab change with a short stagger; controls press in slightly. */
@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.screen-view.screen-enter > * {
  animation: screen-enter 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.screen-view.screen-enter > *:nth-child(2) { animation-delay: 40ms; }
.screen-view.screen-enter > *:nth-child(3) { animation-delay: 80ms; }
.screen-view.screen-enter > *:nth-child(4) { animation-delay: 120ms; }
.screen-view.screen-enter > *:nth-child(5) { animation-delay: 160ms; }
.screen-view.screen-enter > *:nth-child(n + 6) { animation-delay: 200ms; }

.primary-action,
.secondary-action,
.auth-primary-button,
.settings-route-row,
.settings-setup-tile,
.home-metric-card,
.charge-summary-head,
.receipt-toggle,
.bottom-tabs button,
.plan-cta {
  transition: transform 140ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.primary-action:active:not(:disabled),
.secondary-action:active:not(:disabled),
.auth-primary-button:active:not(:disabled),
.settings-route-row:active,
.settings-setup-tile:active,
.home-metric-card:active,
.charge-summary-head:active,
.receipt-toggle:active,
.plan-cta:active:not(:disabled) {
  transform: scale(0.97);
}

.bottom-tabs button:active svg {
  transform: scale(0.88);
}

.bottom-tabs button svg {
  transition: transform 140ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .screen-view.screen-enter > * {
    animation: none;
  }

  .primary-action,
  .secondary-action,
  .auth-primary-button,
  .settings-route-row,
  .settings-setup-tile,
  .home-metric-card,
  .charge-summary-head,
  .receipt-toggle,
  .bottom-tabs button,
  .bottom-tabs button svg,
  .plan-cta {
    transition: none;
  }

  .primary-action:active,
  .secondary-action:active,
  .settings-route-row:active,
  .settings-setup-tile:active,
  .bottom-tabs button:active svg {
    transform: none;
  }
}

/* Savings > Prices & charging: the 24-hour price chart (Day view). */
.price-chart-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 2px 0 8px;
  font-size: 0.8rem;
  font-weight: 850;
}

.price-chart-headline .cheap {
  color: var(--green);
}

.price-chart-headline .peak {
  color: var(--muted);
}

.price-chart {
  position: relative;
  height: 150px;
}

.price-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.price-chart-cheap {
  fill: var(--green);
  stroke: none;
  opacity: 0.12;
}

.price-chart-area {
  fill: url(#priceChartFill);
  stroke: none;
}

.price-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 6px rgba(255, 107, 44, 0.45));
}

.price-chart-charge {
  fill: var(--blue);
  stroke: none;
}

.price-chart-charge-dot {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.price-chart-now {
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

.price-chart-now-dot {
  fill: var(--text);
  stroke: var(--blue);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.price-chart-selected {
  stroke: var(--text);
  stroke-width: 1.5;
  opacity: 0.8;
  vector-effect: non-scaling-stroke;
}

.price-chart-hours {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
}

.price-chart-hour {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.price-chart-hour.selected,
.price-chart-hour:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
}

.price-chart-empty {
  display: grid;
  place-items: center;
  height: 120px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.weekly-charging-legend .swatch.line {
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
}

.weekly-charging-legend .swatch.cheap {
  background: rgba(67, 207, 113, 0.35);
}

.weekly-charging-legend .swatch.charging {
  background: var(--blue);
}

.price-chart-now-tag {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-num, system-ui);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/* Home > Autopilot */
.autopilot-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border-radius: var(--radius-card);
  padding: 16px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 107, 44, 0.1) 0%, rgba(255, 107, 44, 0) 55%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.autopilot-card.is-on {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(67, 207, 113, 0.14) 0%, rgba(67, 207, 113, 0) 55%),
    var(--surface);
}

.autopilot-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.autopilot-head h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.autopilot-head .eyebrow {
  margin: 0 0 2px;
}

.autopilot-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.autopilot-card.is-on .autopilot-icon {
  background: var(--green-soft);
  color: var(--green);
}

.autopilot-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.autopilot-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.autopilot-plan {
  display: grid;
  gap: 10px;
}

.autopilot-timeline {
  position: relative;
  display: flex;
  gap: 3px;
  padding-bottom: 16px;
}

.autopilot-timeline i {
  flex: 1;
  height: 12px;
  border-radius: 4px;
  background: var(--surface-soft);
}

.autopilot-timeline i.on {
  background: var(--green);
  box-shadow: 0 0 8px rgba(67, 207, 113, 0.5);
}

.autopilot-timeline-labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.autopilot-timeline-labels em {
  font-style: normal;
}

.autopilot-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.autopilot-facts > div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.autopilot-facts span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.autopilot-facts strong {
  font-family: var(--font-num, system-ui);
  font-size: 0.92rem;
  font-weight: 900;
}

.autopilot-status {
  margin: 0;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 850;
}

.autopilot-status:empty {
  display: none;
}

.autopilot-status.at-risk {
  color: var(--warning);
}

.autopilot-record {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.autopilot-record:empty {
  display: none;
}

.autopilot-trip {
  justify-self: start;
}

.autopilot-trip.active {
  border-color: var(--green);
  color: var(--green);
}

.autopilot-switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 50px;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  transition: background-color 180ms ease;
}

.autopilot-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.autopilot-switch input:checked {
  background: var(--green);
  box-shadow: none;
}

.autopilot-switch input:checked::after {
  transform: translateX(20px);
}

/* Savings > Compared with gas, Rate check */
.gas-compare-card h2,
.rate-check-card h2 {
  margin: 2px 0 10px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.gas-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.gas-compare-grid > div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.gas-compare-grid span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.gas-compare-grid strong {
  font-family: var(--font-num, system-ui);
  font-size: 1rem;
  font-weight: 900;
}

.gas-compare-grid > div:last-child strong {
  color: var(--green);
}

#screen-energy.savings-locked .gas-compare-card,
#screen-energy.savings-locked .rate-check-card {
  display: none;
}

/* Spacing pass: one 12px rhythm between cards on every tab, and no doubled gaps inside cards. */
:is(#screen-home, #screen-device, #screen-garage, #screen-energy, #screen-settings, #screen-account) > :not(.hidden) {
  margin-bottom: 12px;
}

#screen-settings > .settings-landing-group {
  margin-bottom: 16px;
}

.setup-actions {
  margin-top: 14px;
}

.setup-skip {
  display: block;
  margin: 6px auto 0;
}

.weekly-charging-card > .section-head {
  margin-bottom: 0;
}

#savingsPeriodTabs {
  margin-bottom: 10px;
}

/* Sign-in: a full-bleed welcome with a soft glow, a live-looking price preview and a glass form. */
.auth-gate {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: #04070a;
  isolation: isolate;
}

body.native-app .auth-gate {
  padding: 0;
}

.signin-aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.signin-aura::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(120% 70% at 50% 0%, #000 30%, transparent 75%);
}

.signin-aura i {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: signin-drift 18s ease-in-out infinite alternate;
}

.signin-aura i:nth-child(1) {
  width: 340px;
  height: 340px;
  top: -140px;
  left: -90px;
  background: #ff6b2c;
}

.signin-aura i:nth-child(2) {
  width: 300px;
  height: 300px;
  top: 60px;
  right: -150px;
  background: #22c55e;
  opacity: 0.32;
  animation-duration: 22s;
  animation-delay: -6s;
}

.signin-aura i:nth-child(3) {
  width: 260px;
  height: 260px;
  bottom: -160px;
  left: 20%;
  background: #0a84ff;
  opacity: 0.22;
  animation-duration: 26s;
}

@keyframes signin-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 30px, 0) scale(1.12); }
}

.signin {
  min-height: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: max(28px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
  color: var(--text);
  animation: signin-rise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.signin-hero {
  display: grid;
  gap: 8px;
}

.signin-logo {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
}

.signin-eyebrow {
  justify-self: start;
  padding: 5px 10px;
  border: 1px solid rgba(255, 107, 44, 0.35);
  border-radius: 999px;
  background: rgba(255, 107, 44, 0.12);
  color: #ff8a50;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signin-title {
  margin: 2px 0 0;
  color: #fff;
  font-size: clamp(1.9rem, 8.4vw, 2.35rem);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.signin-title b {
  background: linear-gradient(92deg, #ff8a50, #ff6b2c 45%, #4ade80);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.signin-subcopy {
  margin: 0;
  max-width: 34ch;
  color: #a6b0ba;
  font-size: 0.95rem;
  line-height: 1.45;
}

.signin-preview {
  padding: 14px 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.signin-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dfe5ea;
  font-size: 0.8rem;
  font-weight: 800;
}

.signin-preview-head em {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4ade80;
  font-size: 0.72rem;
  font-style: normal;
}

.signin-preview-head svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.signin-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: signin-pulse 2s ease-out infinite;
}

@keyframes signin-pulse {
  to { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}

.signin-bars {
  height: 64px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 5px;
}

.signin-bars i {
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: rgba(255, 255, 255, 0.12);
  transform-origin: bottom;
  animation: signin-bar 700ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--d) both;
}

.signin-bars i.on {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

@keyframes signin-bar {
  from { transform: scaleY(0.1); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}

.signin-preview-axis {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: #6f7a85;
  font-size: 0.66rem;
  font-weight: 700;
}

.signin-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(12, 17, 22, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.signin-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.signin-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 11px;
  background: #1b232b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.signin-tabs[data-active="signup"]::before {
  transform: translateX(100%);
}

.signin-tabs button {
  position: relative;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #8a949e;
  font-size: 0.9rem;
  font-weight: 800;
  transition: color 200ms ease;
}

.signin-tabs button.active {
  color: #fff;
}

.signin-form {
  display: grid;
  gap: 10px;
}

.signin-field {
  position: relative;
  display: block;
}

.signin-field input {
  width: 100%;
  height: 58px;
  padding: 22px 16px 6px 46px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1rem;
  font-weight: 650;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.signin-field.has-toggle input {
  padding-right: 50px;
}

.signin-field input:focus {
  border-color: rgba(255, 107, 44, 0.8);
  background: rgba(255, 107, 44, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 107, 44, 0.16);
}

.signin-field input:disabled {
  opacity: 0.6;
}

.signin-field-label {
  position: absolute;
  left: 46px;
  top: 50%;
  color: #7d8792;
  font-size: 0.95rem;
  font-weight: 650;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: transform 180ms ease, color 180ms ease, top 180ms ease;
}

.signin-field input:focus + .signin-field-label,
.signin-field input:not(:placeholder-shown) + .signin-field-label {
  top: 17px;
  transform: translateY(-50%) scale(0.76);
  color: #a6b0ba;
}

.signin-field input:focus + .signin-field-label {
  color: #ff8a50;
}

.signin-field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  display: grid;
  color: #6f7a85;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 180ms ease;
}

.signin-field:focus-within .signin-field-icon {
  color: #ff6b2c;
}

.signin svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signin-field-icon svg,
.signin-reveal svg {
  width: 20px;
  height: 20px;
}

.signin-reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #7d8792;
  transform: translateY(-50%);
}

.signin-reveal[aria-pressed="true"] {
  color: #ff8a50;
}

.signin-inline-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.signin-link {
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #ff8a50;
  font-size: 0.86rem;
  font-weight: 800;
}

.signin-back-row {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.signin-back-row:empty {
  display: none;
}

.signin-hint {
  margin: 0;
  color: #7d8792;
  font-size: 0.8rem;
  line-height: 1.4;
}

.signin-message,
.signin-error {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.signin-message {
  border: 1px solid rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}

.signin-error {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.signin-primary {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff8a50, #ff6b2c 55%, #e2550f);
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
  box-shadow: 0 12px 30px rgba(255, 107, 44, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 140ms ease, box-shadow 200ms ease, opacity 200ms ease;
}

.signin-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: signin-shine 3.6s ease-in-out 1.2s infinite;
}

@keyframes signin-shine {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.signin-primary svg {
  width: 19px;
  height: 19px;
  transition: transform 200ms ease;
}

.signin-primary:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.signin-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.signin-primary:disabled {
  opacity: 0.7;
}

.signin-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: signin-spin 700ms linear infinite;
}

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

.signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6f7a85;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signin-divider::before,
.signin-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.signin-alt {
  display: grid;
  gap: 8px;
}

.signin-alt-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #dfe5ea;
  font-size: 0.9rem;
  font-weight: 750;
  transition: background 180ms ease, border-color 180ms ease;
}

.signin-alt-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.signin-alt-button svg {
  width: 18px;
  height: 18px;
  color: #4ade80;
}

.signin-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #6f7a85;
  font-size: 0.75rem;
  font-weight: 650;
  text-align: center;
}

.signin-footer svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.signin :focus-visible {
  outline: 2px solid #ff8a50;
  outline-offset: 2px;
}

/* Short screens (or the keyboard is up): drop the preview so the form stays in view. */
@media (max-height: 700px) {
  .signin-preview {
    display: none;
  }

  .signin {
    gap: 14px;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .signin-logo {
    width: 104px;
    margin-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signin,
  .signin-aura i,
  .signin-bars i,
  .signin-live-dot,
  .signin-primary::after {
    animation: none;
  }
}

/* Schedule editor: rounder sheet, a calmer vehicle card and a clean review list. */
.schedule-editor-sheet {
  border-radius: 24px 24px 0 0;
  padding: 20px 18px max(18px, env(safe-area-inset-bottom));
}

.schedule-editor-pane {
  min-height: 0;
}

.schedule-editor-target-card {
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
}

.schedule-editor-target-card > div:first-child {
  display: grid;
  gap: 2px;
}

.schedule-editor-target-card > div:first-child > span,
.schedule-editor-review .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule-editor-target-card strong {
  font-size: 1rem;
  font-weight: 800;
}

.schedule-editor-target-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.schedule-editor-review {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
}

.schedule-editor-review > div {
  gap: 0;
  margin-top: 6px;
}

.schedule-editor-review span {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.schedule-editor-review span:first-child {
  border-top: 0;
  padding-top: 2px;
}

.schedule-editor-review small {
  font-size: 0.86rem;
  font-weight: 600;
}

.schedule-editor-review strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.schedule-editor-actions {
  margin-top: 14px;
}

/* Time window: two big pickers, a 24-hour strip and a one-line summary. */
.time-window-pane {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.time-window-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.time-window-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.time-window-picker {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.time-window-picker:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.18);
}

.time-window-picker > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.time-window-picker select {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 18px 0 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ba' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 14px;
  color: var(--text);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: none;
  outline: none;
  cursor: pointer;
}

.time-window-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.time-window-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.time-window-track {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  height: 22px;
}

.time-window-track i {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 200ms ease;
}

.time-window-track i.on {
  background: linear-gradient(180deg, #ff8a50, var(--orange));
}

.time-window-axis {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.time-window-intro,
.time-window-summary {
  display: block;
  width: 100%;
  max-width: none;
}

.time-window-summary {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.time-window-summary.warn {
  color: #fbbf24;
}

@media (max-width: 360px) {
  .time-window-pickers {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 4px;
  }

  .time-window-picker {
    padding: 9px 10px;
  }

  .time-window-picker select {
    font-size: 1rem;
  }
}

/* The other schedule editors (ready-by, cost, negative rate) use the same card and field style. */
.schedule-editor-pane:not(.time-window-pane) {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.schedule-editor-pane:not(.time-window-pane) > .setup-copy {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.schedule-editor-pane .setting-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-editor-pane .setting-line > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.schedule-editor-pane .setting-line strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.schedule-editor-pane .setting-line small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.schedule-editor-pane .setting-line input,
.schedule-editor-pane .setting-line select {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.schedule-editor-pane .setting-line select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ba' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  text-align-last: right;
}

.schedule-editor-pane .setting-line input:focus,
.schedule-editor-pane .setting-line select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.18);
  outline: none;
}

/* Service area on sign-up, and the savings disclaimer on sign-in and Home. */
.signin-zip-status {
  margin: -4px 2px 0;
  color: #7d8792;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4;
}

.signin-zip-status[data-tone="ok"] {
  color: #4ade80;
}

.signin-zip-status[data-tone="warn"] {
  color: #ffb27d;
}

.signin-region {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 154, 92, 0.3);
  border-radius: 14px;
  background: rgba(255, 154, 92, 0.08);
}

.signin-region strong {
  font-size: 0.95rem;
}

.signin-region p {
  margin: 0;
  color: #a9b2bc;
  font-size: 0.84rem;
  line-height: 1.45;
}

.signin-region .signin-region-done {
  color: #4ade80;
  font-weight: 700;
}

.legal-disclaimer {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
}

.legal-disclaimer summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.legal-disclaimer summary::-webkit-details-marker {
  display: none;
}

.legal-disclaimer summary em {
  font-style: normal;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-disclaimer-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
}

.legal-disclaimer-body strong {
  font-size: 0.8rem;
}

.legal-disclaimer-body p {
  margin: 0;
}

.signin-disclaimer {
  margin-top: -8px;
  color: #6f7a85;
}

.signin-disclaimer summary em {
  color: #a9b2bc;
}

.signin-disclaimer .legal-disclaimer-body {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #a9b2bc;
}

.home-legal {
  padding: 4px 4px 8px;
  color: var(--soft);
}

.home-legal .legal-disclaimer summary em {
  color: var(--muted);
}

.home-legal .legal-disclaimer-body {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

/* Utility setup: what VueRate can do with the chosen utility, and time-of-use off-peak hours. */
.utility-compat {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.utility-compat[data-tier="none"] {
  border-color: rgba(245, 164, 0, 0.45);
  background: var(--warning-soft);
}

.utility-compat-note {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.utility-offpeak {
  display: grid;
  gap: 10px;
}

.utility-offpeak-head {
  display: grid;
  gap: 2px;
}

.utility-offpeak-head small {
  color: var(--muted);
  font-size: 0.8rem;
}

.utility-offpeak-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.utility-offpeak-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.utility-offpeak-row select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
}

.utility-offpeak-weekends {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

/* ===== Match getrevolt.ai: navy-black surfaces, orange primary, blue second accent, orange-to-blue gradient ===== */
:root {
  --bg: #05070b;
  --surface: #0b111a;
  --surface-soft: #111a27;
  --surface-tint: #0d1724;
  --border: #1a2433;
  --text: #f4f7fb;
  --muted: #9aa8b8;
  --soft: #6b7a8c;
  --orange: #ff6b2c;
  --orange-2: #ff8a50;
  --accent-blue: #149dff;
  --accent-blue-soft: #0a2a44;
  /* Blue to orange, like the logo: pure blue holds, then moves straight into orange,
     so the blend never turns pink or muddy. */
  --brand-gradient: linear-gradient(92deg, var(--accent-blue) 0%, var(--accent-blue) 22%, var(--orange-2) 78%, var(--orange) 100%);
}

html,
body,
.plug-stage {
  background: var(--bg);
}

.savings-hero h2 {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.primary-action:not(:disabled),
.auth-primary-button:not(:disabled) {
  box-shadow: 0 8px 26px -8px rgba(255, 107, 44, 0.6);
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

a {
  color: var(--accent-blue);
}

/* ===== VueRate brand system (logo and getrevolt.ai): orange for actions, blue for
   navigation and selection, the orange-to-blue gradient for brand moments. ===== */
:root {
  --accent-blue-soft: rgba(20, 157, 255, 0.14);
  --accent-blue-line: rgba(20, 157, 255, 0.5);
  --action-gradient: linear-gradient(92deg, var(--orange), var(--orange-2));
}

/* Ambient glow from the site hero: blue top right, orange bottom left. */
html,
body,
.plug-stage {
  background:
    radial-gradient(70% 45% at 100% 0%, rgba(20, 157, 255, 0.12), transparent 70%),
    radial-gradient(70% 45% at 0% 100%, rgba(255, 107, 44, 0.08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* Section labels are blue, like the website's kickers. */
.eyebrow,
.hero-label,
.setting-head {
  color: var(--accent-blue);
}

/* Navigation and selection are blue. */
.bottom-tabs button.active {
  color: var(--accent-blue);
}

.bottom-tabs button.active svg {
  background: var(--accent-blue-soft);
  box-shadow: 0 0 0 7px var(--accent-blue-soft);
}

.period-tabs button.active,
.segmented-control button.active,
.boost-duration-grid button.active,
.limit-option-grid button.active {
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  box-shadow: inset 0 0 0 1px var(--accent-blue-line);
}

.rate-card-option.active,
.setup-choice.active,
.period-tile.active {
  border-color: var(--accent-blue-line);
  color: var(--text);
  background: var(--accent-blue-soft);
}

.period-tile.active strong {
  color: var(--accent-blue);
}

/* Main buttons use the site's orange gradient; Start Charging stays green. */
.primary-action:not(:disabled):not(.charge-start-button),
.auth-primary-button:not(:disabled) {
  border-color: transparent;
  color: #fff;
  background: var(--action-gradient);
}

/* Brand gradient, kept to three places: battery ring, savings total and sign-in headline.
   The charge slider is solid blue because blue means selected. */
.charge-ring:not([data-state="complete"]) .ring-fill {
  stroke: url(#revoltRingGradient);
  filter: drop-shadow(0 0 8px rgba(20, 157, 255, 0.35));
}

.charge-level-slider-fill {
  background: var(--accent-blue);
}

.signin-title b {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero cards get the site's soft blue lift. */
.hero-card,
.savings-hero {
  box-shadow: 0 30px 80px -40px rgba(20, 157, 255, 0.35);
}

/* Sign-in glow: the site's orange and blue instead of orange and green. */
.signin-aura i:nth-child(2),
.signin-aura i:nth-child(3) {
  background: var(--accent-blue);
}

/* The Pro plan label is solid orange; the brand gradient is kept for the three hero places. */
.plan-pro .plan-name {
  background: none;
  color: var(--orange);
}

/* ===== Color system pass =====
   Orange: main actions only. Blue: selection, on-states, links and labels.
   Green: savings, success and "connected". Amber: peak prices and warnings.
   Red: errors and stopping only. Neutral grey: informational states. */
:root {
  /* --blue was set to orange by an earlier one-accent pass, which made every
     "blue" and "neutral" element orange. It is blue again. */
  --blue: var(--accent-blue);
  --blue-dark: #0b7fd6;
  --blue-soft: rgba(20, 157, 255, 0.14);
}

/* Informational tags and states are neutral, not accent or alarm colors. */
.tag-neutral,
.rate-strip em.tag-neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.garage-target-card:not([data-source-state="charging"]) em,
.garage-target-card.settings-open:not([data-source-state="charging"]) em {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.charge-state-button.off.active,
.charge-state-button.off[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

/* Switches use the same blue as every other selected state. */
.autopilot-switch input:checked {
  background: var(--accent-blue);
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--accent-blue);
}

/* Active schedule and current plan: a blue outline, no green glow. */

.plan-card.plan-pro,
.plan-card.plan-pro.current {
  border-color: var(--accent-blue-line);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(20, 157, 255, 0.2) 0%, rgba(20, 157, 255, 0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(255, 107, 44, 0.14) 0%, rgba(255, 107, 44, 0) 60%),
    var(--surface);
  box-shadow: 0 18px 40px -12px rgba(20, 157, 255, 0.25);
}

.plan-card.plan-pro .plan-tag {
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
}

/* Avatar uses the brand colors instead of pink. */
.settings-profile-hero .settings-account-avatar {
  background: linear-gradient(140deg, var(--accent-blue) 0%, var(--accent-blue) 30%, var(--orange) 100%);
}

/* "Add rates" is an action, so it is blue rather than muddy amber. */

/* Costs: your VueRate cost is blue, peak cost amber, savings green. */
.home-savings-comparison.savings-vs-cost > div:not(.empty-state):first-child {
  --tile-accent: var(--accent-blue);
  --tile-accent-tint: rgba(20, 157, 255, 0.2);
  --tile-accent-border: rgba(20, 157, 255, 0.5);
}

/* The current plan is outlined in blue, not green. */
.plan-card.current {
  outline-color: var(--accent-blue-line);
}

/* Rate Guard needing setup reads as an action (blue), not muddy amber. */

/* Chosen charging hours are a selection, so they are blue. */
.time-window-track i.on {
  background: var(--accent-blue);
}

/* Setup icons use the brand blue-to-orange instead of blue-to-green or magenta. */
.onboarding-symbol,
.onboarding-symbol.bolt {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue) 30%, var(--orange) 100%);
}

/* Account deletion: a quiet danger row that opens an inline typed confirmation. */
.delete-account {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.delete-account-row strong,
.delete-account-row em {
  color: var(--danger);
}

.delete-account-confirm {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  background: var(--danger-soft);
  color: var(--text);
}

.delete-account-confirm p {
  margin: 0;
}

.delete-account-confirm input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  letter-spacing: 0.08em;
}

.delete-account-status:empty {
  display: none;
}

.delete-account-status {
  color: var(--danger);
  font-weight: 700;
}

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

.delete-account-submit {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--danger);
  color: #fff;
  font-weight: 900;
}

.delete-account-submit:disabled {
  opacity: 0.45;
}

/* Tesla connect: one clear next step for each connection state */
.tesla-connect {
  padding-top: 4px;
  scroll-margin-top: 24px;
}

.tesla-connect-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
}

.tesla-connect-mark {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--accent-blue);
}

.tesla-connect-mark svg,
.tesla-key-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tesla-connect-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  min-width: 0;
}

.tesla-connect-title h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.tesla-connect-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.tesla-connect-steps {
  display: grid;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tesla-connect-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 18px;
}

.tesla-connect-steps li:last-child {
  padding-bottom: 0;
}

.tesla-connect-steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 4px;
  left: 13px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
}

.tesla-connect-steps .step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.tesla-connect-steps li.active .step-index {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  color: #fff;
}

.tesla-connect-steps li.complete .step-index {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.tesla-connect-steps strong {
  display: block;
  font-size: 0.98rem;
  line-height: 28px;
}

.tesla-connect-steps small {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.tesla-key-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1.5px solid rgba(255, 138, 80, 0.45);
  border-radius: 18px;
  background: rgba(255, 107, 44, 0.08);
}

.tesla-key-card.ready {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  padding: 12px 14px;
  border-color: var(--border);
  background: transparent;
}

.tesla-key-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 107, 44, 0.16);
  color: var(--orange-2);
}

.tesla-key-card.ready .tesla-key-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.tesla-key-card.ready .tesla-key-icon svg {
  width: 18px;
  height: 18px;
}

.tesla-key-text strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

.tesla-key-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.tesla-key-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.tesla-key-actions .primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.tesla-connect-actions {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.tesla-connect-actions .primary-action {
  width: 100%;
}

.tesla-connect-actions .primary-action.hidden,
.tesla-key-actions.hidden,
.tesla-connect-title .chip.hidden {
  display: none;
}

.tesla-text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.tesla-remove-button {
  justify-self: center;
  padding: 0 16px;
}

@media (hover: hover) {
  .tesla-text-button:hover {
    color: var(--text);
  }

  .tesla-remove-button:hover {
    color: var(--danger);
  }
}

/* Tesla car picker */
.tesla-vehicle-picker {
  margin-top: 20px;
}

.tesla-vehicle-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.tesla-vehicle-options .tesla-vehicle-option {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tesla-vehicle-options .tesla-vehicle-option.active {
  border-color: var(--accent-blue);
  background: var(--blue-soft);
}

.tesla-vehicle-radio {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.tesla-vehicle-option.active .tesla-vehicle-radio {
  border-color: var(--accent-blue);
}

.tesla-vehicle-option.active .tesla-vehicle-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.tesla-vehicle-option .vehicle-row-copy {
  gap: 3px;
}

.tesla-vehicle-option .vehicle-row-copy strong {
  font-size: 1rem;
  line-height: 1.25;
}

.tesla-vehicle-option .vehicle-row-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

/* ===== Wallet and checkout ===== */
.wallet-stacked {
  z-index: 70;
}

.wallet-sheet,
.checkout-sheet,
.wallet-detail-sheet {
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: calc(100% - 20px);
  overflow-y: auto;
}

.wallet-plan {
  position: relative;
  display: grid;
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--accent-blue-line, var(--border));
  border-radius: var(--radius-card);
  padding: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 107, 44, 0.22), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(20, 157, 255, 0.2), transparent 55%),
    var(--surface);
}

.wallet-plan .eyebrow {
  margin: 0;
}

.wallet-plan strong {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.wallet-plan span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.wallet-plan .primary-action {
  margin-top: 10px;
  justify-self: start;
}

.wallet-attention {
  border: 1px solid rgba(255, 138, 122, 0.4);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  color: #ffb4a8;
  background: rgba(217, 45, 32, 0.12);
  font-size: 14px;
  line-height: 1.4;
}

.wallet-section {
  display: grid;
  gap: 8px;
}

.wallet-section h3 {
  margin: 0;
  font-size: 15px;
}

.wallet-methods {
  display: grid;
  gap: 8px;
}

.wallet-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.wallet-method:hover {
  border-color: #2b3a4f;
}

.wallet-method:active {
  transform: scale(0.985);
}

.wallet-method.selected {
  border-color: var(--accent-blue);
  background: var(--surface-tint);
  box-shadow: inset 0 0 0 1px var(--accent-blue);
}

.wallet-method.expired strong,
.wallet-method.expired small {
  color: var(--soft);
}

.wallet-method-new {
  min-height: 48px;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.wallet-method-new.selected {
  color: var(--text);
}

.wallet-method-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.wallet-method-text strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wallet-method-text small {
  color: var(--muted);
  font-size: 13px;
}

.wallet-method em {
  border-radius: 999px;
  flex: none;
  padding: 3px 8px;
  color: var(--accent-blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.wallet-add {
  border-style: dashed;
  background: transparent;
}

.wallet-skeleton {
  height: 64px;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-soft) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: wallet-shimmer 1.3s linear infinite;
}

@keyframes wallet-shimmer {
  to {
    background-position: -200% 0;
  }
}

.wallet-empty {
  margin: 0;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 14px;
}

.card-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 46px;
  height: 32px;
  border-radius: 6px;
  color: #fff;
  background: #1b2736;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.card-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.card-mark-visa {
  background: #1a1f71;
  font-size: 13px;
  font-style: italic;
}

.card-mark-amex,
.card-mark-americanexpress {
  background: #2e77bc;
}

.card-mark-discover {
  background: #e87722;
}

.card-mark-mastercard {
  background: #fff;
}

.card-mark-mastercard i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eb001b;
}

.card-mark-mastercard i + i {
  margin-left: -6px;
  background: #f79e1b;
  mix-blend-mode: multiply;
}

.card-mark-add {
  color: var(--accent-blue);
  background: var(--blue-soft);
}

.wallet-cancel-link {
  justify-self: center;
  border: 0;
  padding: 8px;
  color: var(--muted);
  background: none;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wallet-danger {
  color: #ff8a7a;
}

.wallet-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
}

.wallet-trust svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.wallet-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

#checkoutMain {
  display: grid;
  gap: 14px;
}

.checkout-test {
  margin: 0;
  border: 1px dashed rgba(245, 164, 0, 0.5);
  border-radius: 10px;
  padding: 8px 12px;
  color: #ffc861;
  background: rgba(245, 164, 0, 0.08);
  font-size: 13px;
  text-align: center;
}

.checkout-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  background: var(--surface);
}

.checkout-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.checkout-summary span {
  color: var(--muted);
}

.checkout-total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.checkout-total strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.checkout-express-buttons {
  display: grid;
  gap: 10px;
}

.checkout-express-buttons > div {
  width: 100%;
  height: 50px;
}

.apple-pay-button {
  display: block;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 10px;
  -webkit-appearance: -apple-pay-button;
  appearance: auto;
  -apple-pay-button-style: white;
  -apple-pay-button-type: subscribe;
}

.checkout-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.checkout-divider::before,
.checkout-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.checkout-fields {
  display: grid;
  gap: 12px;
}

.checkout-fields label,
.checkout-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkout-fields input,
.checkout-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 15px 14px;
  color: var(--text);
  background: var(--surface);
  font-size: 17px;
  font-weight: 400;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.checkout-fields input::placeholder {
  color: var(--soft);
}

.checkout-fields input:focus,
.checkout-input:focus-within {
  outline: 0;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* Matches Nuvei's frames, whose pages are light, so browsers keep them transparent. */
.checkout-input iframe {
  color-scheme: light;
}

.checkout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.billing-card-error {
  margin: 10px 0 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #ffb4a8;
  background: rgba(217, 45, 32, 0.12);
  font-size: 14px;
  line-height: 1.4;
}

.checkout-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 17px;
}

.checkout-pay svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.checkout-pay.busy svg {
  display: none;
}

.checkout-pay.busy::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: checkout-spin 700ms linear infinite;
}

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

.checkout-terms {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.checkout-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 8px 12px;
  text-align: center;
}

.checkout-success h3 {
  margin: 8px 0 0;
  font-size: 24px;
}

.checkout-success p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.checkout-success-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-gradient);
  animation: checkout-pop 320ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.checkout-success-mark svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes checkout-pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-skeleton,
  .checkout-pay.busy::before,
  .checkout-success-mark {
    animation: none;
  }
}

/* Android asks for 48px touch areas. These grow what a finger can hit without changing how the controls look. */
.autopilot-switch {
  position: relative;
}

.icon-button.small::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.autopilot-switch::before {
  content: "";
  position: absolute;
  inset: -10px 0;
}

/* Tapping a label does not open a select, so the select fills the whole picker. */
.time-window-picker > span {
  position: relative;
  z-index: 1;
  line-height: 16px;
  pointer-events: none;
}

.time-window-picker select {
  width: calc(100% + 24px);
  margin: -28px -12px -10px;
  padding: 28px 30px 10px 12px;
  background-position: right 12px bottom 13px;
}

/* Android: the fingerprint lock and the no-connection notice. */
.app-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
}

.app-lock.hidden,
.offline-banner.hidden,
.app-lock-row.hidden {
  display: none;
}

.app-lock img {
  object-fit: contain;
}

.app-lock h2 {
  margin: 0;
  font-size: 1.1rem;
}

.app-lock .primary-action {
  min-width: 180px;
}

.offline-banner {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 16px;
  right: 16px;
  z-index: 998;
  width: fit-content;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
  font-weight: 750;
  text-align: center;
}

.app-lock-row {
  cursor: default;
}

.app-lock-row .autopilot-switch {
  justify-self: end;
}

/* Plan > Charging plan: the ready-by goal, when to charge, optional price rules, and tonight's plan. */
.charging-plan-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-card);
  padding: 16px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10, 91, 255, 0.12) 0%, rgba(10, 91, 255, 0) 55%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.charging-plan-card h2 {
  margin: 2px 0 0;
}

.charging-plan-goal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.charging-plan-goal label {
  display: grid;
  gap: 6px;
}

/* Android asks for 48px touch areas. */
.charging-plan-goal select,
.charging-plan-window select {
  min-height: 48px;
}

.charging-plan-goal span,
.charging-plan-when legend {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.charging-plan-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.charging-plan-when {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.charging-plan-when legend {
  margin-bottom: 8px;
  padding: 0;
}

.charging-plan-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.charging-plan-option.selected {
  border-color: var(--blue);
  background: var(--surface-tint);
}

.charging-plan-option.needs-setup {
  opacity: 0.75;
}

.charging-plan-option input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.charging-plan-option span,
.charging-plan-toggle span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.charging-plan-option small,
.charging-plan-toggle small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.charging-plan-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding-left: 32px;
}

.charging-plan-window span {
  color: var(--muted);
  font-weight: 700;
}

.charging-plan-extras {
  display: grid;
  gap: 8px;
}

.charging-plan-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.charging-plan-toggle input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 0;
}

.charging-plan-toggle select {
  display: inline-block;
  width: auto;
  min-height: 30px;
  padding: 0 6px;
  font-weight: 800;
}

.charging-plan-toggle .charging-plan-cap-hint {
  color: var(--text);
  opacity: 0.72;
}

/* Home energy: Tesla Powerwall and solar on Home */
.home-energy-card {
  --he-solar: #f4b63e;
  --he-battery: var(--green);
  --he-grid: #8fa3b8;
  --he-car: var(--blue);
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border-radius: var(--radius-card);
  padding: 16px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(244, 182, 62, 0.1) 0%, rgba(244, 182, 62, 0) 60%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.home-energy-card[data-view="invite"],
.home-energy-card[data-view="none"] {
  background: var(--surface);
}

.he-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.he-head h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.he-head .eyebrow {
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.he-badge {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--he-solar);
  background: rgba(244, 182, 62, 0.14);
}

.he-badge svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.he-badge.he-tone-battery { color: var(--he-battery); background: var(--green-soft); }
.he-badge.he-tone-grid,
.he-badge.he-tone-muted { color: var(--he-grid); background: var(--surface-soft); }
.he-badge.he-tone-alert { color: var(--warning); background: var(--warning-soft); }

.he-pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--he-solar);
  background: rgba(244, 182, 62, 0.14);
}

.he-pill.he-tone-battery { color: var(--he-battery); background: var(--green-soft); }
.he-pill.he-tone-grid,
.he-pill.he-tone-muted { color: var(--muted); background: var(--surface-soft); }
.he-pill.he-tone-alert { color: var(--warning); background: var(--warning-soft); }

.he-copy,
.he-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.he-note.alert {
  color: var(--warning);
}

.he-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.he-flow-diagram {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.he-track {
  stroke: var(--border);
  stroke-width: 1.5;
}

.he-flow {
  stroke-linecap: round;
  stroke-dasharray: 0.5 11;
  animation: he-flow 1.6s linear infinite;
}

.he-flow.he-solar,
.he-flow.he-export { stroke: var(--he-solar); filter: drop-shadow(0 0 3px rgba(244, 182, 62, 0.6)); }
.he-flow.he-battery { stroke: var(--he-battery); filter: drop-shadow(0 0 3px rgba(67, 207, 113, 0.5)); }
.he-flow.he-grid { stroke: var(--he-grid); }
.he-flow.he-car { stroke: var(--he-car); filter: drop-shadow(0 0 3px rgba(10, 132, 255, 0.5)); }

@keyframes he-flow {
  to { stroke-dashoffset: -23; }
}

.he-node-bg {
  fill: var(--surface-soft);
  stroke: var(--border);
  stroke-width: 1.5;
  transition: stroke 300ms ease, fill 300ms ease;
}

.he-icon {
  fill: none;
  stroke: var(--soft);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 300ms ease;
}

.he-node.is-active.he-solar .he-node-bg { stroke: var(--he-solar); fill: rgba(244, 182, 62, 0.12); }
.he-node.is-active.he-solar .he-icon { stroke: var(--he-solar); }
.he-node.is-active.he-battery .he-node-bg { stroke: var(--he-battery); fill: var(--green-soft); }
.he-node.is-active.he-battery .he-icon { stroke: var(--he-battery); }
.he-node.is-active.he-grid .he-node-bg { stroke: var(--he-grid); }
.he-node.is-active.he-grid .he-icon { stroke: var(--text); }
.he-node.is-active.he-car .he-node-bg { stroke: var(--he-car); fill: var(--blue-soft); }
.he-node.is-active.he-car .he-icon { stroke: var(--he-car); }
.he-node.he-home .he-node-bg { fill: var(--surface-tint); stroke: var(--border-strong); stroke-width: 2; }
.he-node.he-home .he-icon { stroke: var(--text); }

.he-ring-track {
  fill: none;
  stroke: var(--surface-soft);
  stroke-width: 3.5;
}

.he-ring {
  fill: none;
  stroke: var(--he-battery);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 600ms ease;
}

.he-flow-diagram text {
  stroke: none;
  paint-order: normal;
}

.he-value {
  fill: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.he-caption {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.he-tip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(244, 182, 62, 0.1);
  border: 1px solid rgba(244, 182, 62, 0.3);
}

.he-tip p {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.he-today {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.he-today-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.he-today-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.he-today-head strong {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.he-mix-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.he-mix-bar i,
.he-mix-legend i {
  display: block;
  background: var(--he-grid);
}

.he-mix-bar i { height: 100%; }
.he-mix-bar i:first-child { border-radius: 999px 0 0 999px; }
.he-mix-bar i:last-child { border-radius: 0 999px 999px 0; }
.he-mix-bar i:only-child { border-radius: 999px; }

.he-mix-bar .he-solar,
.he-mix-legend .he-solar { background: var(--he-solar); }
.he-mix-bar .he-battery,
.he-mix-legend .he-battery { background: var(--he-battery); }

.he-mix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

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

.he-mix-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.he-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.he-facts > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.he-facts span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.he-facts strong {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.he-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.he-foot .stale {
  color: var(--warning);
}

.he-site {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 8px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .he-flow {
    animation: none;
    stroke-dasharray: none;
    opacity: 0.8;
  }
}

/* Home energy detail */
.home-energy-card[role="button"] {
  cursor: pointer;
  transition: transform 160ms ease;
}

.home-energy-card[role="button"]:active {
  transform: scale(0.99);
}

.home-energy-card[role="button"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.he-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

.he-more svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.he-detail-overlay {
  --he-solar: #f4b63e;
  --he-battery: var(--green);
  --he-grid: #8fa3b8;
  --he-car: var(--blue);
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  animation: he-detail-in 220ms ease-out;
}

@keyframes he-detail-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.he-detail-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.he-detail-top h2 {
  margin: 0;
  font-size: 1.25rem;
}

.he-detail-top .eyebrow {
  margin: 0;
}

.he-detail-top .icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.he-detail-body {
  display: grid;
  gap: 14px;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}

.he-detail-hero,
.he-section {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.he-detail-hero {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(244, 182, 62, 0.12) 0%, rgba(244, 182, 62, 0) 60%),
    var(--surface);
}

.he-section h3 {
  margin: 0;
  font-size: 1.05rem;
}

.he-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.he-segment {
  display: flex;
  gap: 2px;
  border-radius: 12px;
  padding: 3px;
  background: var(--surface-soft);
}

.he-segment button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.he-segment.small button {
  min-height: 32px;
  font-size: 0.76rem;
}

.he-segment button.is-on {
  color: var(--text);
  background: var(--surface-tint);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.he-segment button:disabled {
  cursor: default;
  opacity: 0.55;
}

.he-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.he-baseline {
  stroke: var(--border);
  stroke-width: 1;
}

.he-bar.he-solar { fill: var(--he-solar); }
.he-bar.he-battery { fill: var(--he-battery); }
.he-bar.he-grid { fill: var(--he-grid); }

.he-hit {
  fill: transparent;
  cursor: pointer;
}

.he-hit.is-selected {
  fill: rgba(255, 255, 255, 0.06);
}

.he-made-line {
  fill: none;
  stroke: #ffd98a;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-dasharray: 3 3;
}

.he-made-dot {
  fill: #ffd98a;
}

.he-axis {
  fill: var(--soft);
  font-size: 9.5px;
  font-weight: 700;
}

.he-mix-legend .he-made {
  background: #ffd98a;
}

.he-mix-legend .he-grid {
  background: var(--he-grid);
}

.he-chart-hint {
  margin: 0;
  min-height: 18px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.he-chart-hint.is-selected {
  color: var(--text);
}

.he-chart-hint strong {
  margin-right: 6px;
}

.he-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.he-tiles > div {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft);
}

.he-tiles span,
.he-tiles small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.he-tiles small {
  color: var(--soft);
  font-weight: 700;
}

.he-tiles strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.he-worth-hero {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.he-worth-hero strong {
  display: block;
  color: var(--green);
  font-size: 1.9rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.he-worth-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.he-worth-note {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
}

.he-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.he-suggestion {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
}

.he-suggestion h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.he-suggestion p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.42;
}

.he-suggestion > div > p:last-child {
  margin-bottom: 0;
}

.he-suggestion-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--he-solar);
  background: rgba(244, 182, 62, 0.14);
}

.he-suggestion-icon.he-battery { color: var(--he-battery); background: var(--green-soft); }
.he-suggestion-icon.he-grid,
.he-suggestion-icon.he-home { color: var(--text); background: var(--surface-tint); }
.he-suggestion-icon.he-car { color: var(--he-car); background: var(--blue-soft); }

.he-suggestion-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.he-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.he-confirm p {
  flex-basis: 100%;
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.he-settings {
  display: grid;
  gap: 2px;
}

.he-setting {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.he-setting:first-child {
  border-top: 0;
  padding-top: 0;
}

.he-setting h4 {
  margin: 0 0 3px;
  font-size: 0.92rem;
}

.he-setting h4 b {
  float: right;
  color: var(--he-battery);
  font-variant-numeric: tabular-nums;
}

.he-setting p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.he-toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  cursor: pointer;
}

.he-range {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  accent-color: var(--he-battery);
  -webkit-appearance: none;
  appearance: none;
}

.he-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--he-battery) var(--he-range, 20%), var(--surface-soft) var(--he-range, 20%));
}

.he-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 999px;
  border: 3px solid var(--surface);
  background: var(--he-battery);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.he-range-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.he-schedule .he-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

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

.he-schedule-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.he-schedule-grid select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 0.9rem;
}

.he-schedule-error {
  margin: 0;
  color: var(--warning);
  font-size: 0.82rem;
  font-weight: 700;
}

.he-preset {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
}

.he-preset.is-on {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.he-preset h4 {
  margin: 0 0 3px;
  font-size: 0.92rem;
}

.he-preset > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.he-preset > div > p.he-preset-note {
  margin-top: 6px;
  color: var(--text);
  font-weight: 700;
}

.he-preset .primary-action {
  justify-self: start;
}

.he-locked {
  display: grid;
  gap: 8px;
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  background: var(--blue-soft);
}

.he-locked p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.he-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.he-detail-body > .he-foot {
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .he-detail-overlay { animation: none; }
}

/* The app's global svg rule strokes everything; the chart draws its own. */
.he-chart rect,
.he-chart circle,
.he-chart text {
  stroke: none;
}

.he-range {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.he-toggle-row input[type="checkbox"] {
  position: relative;
  width: 50px;
  height: 30px;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.he-toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease;
}

.he-toggle-row input[type="checkbox"]:checked {
  background: var(--he-battery);
  box-shadow: none;
}

.he-toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.he-toggle-row input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: default;
}

.he-toggle-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.he-suggestion .secondary-action,
.he-locked .secondary-action {
  justify-self: start;
  width: auto;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #6cb6ff;
  background: rgba(10, 132, 255, 0.16);
  font-size: 0.86rem;
  font-weight: 800;
}

.he-suggestion .secondary-action:disabled {
  color: var(--soft);
  background: var(--surface);
}

/* Home energy detail: Powerwall panel */
.he-powerwall-head {
  display: grid;
  gap: 12px;
}

.he-powerwall-head .eyebrow {
  margin: 0;
}

.he-powerwall-pct {
  display: block;
  font-size: 2.4rem;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--he-battery);
}

.he-powerwall-left {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.he-gauge {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: visible;
}

.he-gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fb15d, var(--he-battery));
  box-shadow: 0 0 12px rgba(67, 207, 113, 0.35);
  transition: width 600ms ease;
}

.he-gauge-reserve,
.he-unit-reserve {
  position: absolute;
  background: var(--warning);
}

.he-gauge-reserve {
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 2px;
}

.he-powerwall-facts {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.he-powerwall-facts li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.he-powerwall-facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--he-battery);
}

.he-units {
  display: flex;
  gap: 10px;
}

.he-unit {
  position: relative;
  flex: 1;
  max-width: 64px;
  height: 92px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.he-unit-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, #2fb15d, var(--he-battery));
  opacity: 0.85;
}

.he-unit-reserve {
  left: 6px;
  right: 6px;
  height: 2px;
  border-radius: 2px;
}

.he-unit em {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  color: var(--text);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.he-unit-note {
  margin: 0;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Bottom bar: icons say what each tab does (plug, schedule clock, coin), at 24px, with unselected tabs bright enough
   to read on the dark bar. The selected tab keeps its blue circle and gets a heavier line. */
.bottom-tabs button {
  color: #a3adbd;
}

.bottom-tabs button.active {
  color: var(--accent-blue);
}

.bottom-tabs button svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}

.bottom-tabs button.active svg {
  stroke-width: 2.3;
}

/* Account page (tap your name in Settings): a back link, a centered profile header, then the same grouped rows as
   the Settings landing, ending with Sign out and a quiet data-deletion link. */
#screen-account > .settings-landing-group {
  margin-bottom: 20px;
}

.account-page-nav {
  margin: -4px 0 4px;
}

.account-page-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  border: 0;
  padding: 0 8px 0 0;
  background: transparent;
  color: var(--accent-blue);
  font-size: 1rem;
  font-weight: 700;
}

.account-page-back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

#screen-account .account-page-hero {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 24px !important;
  border: 0;
  padding: 8px 16px 4px;
  background: transparent !important;
  box-shadow: none;
  text-align: center;
}

#screen-account .account-page-avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent-blue) 0%, var(--accent-blue) 30%, var(--orange) 100%);
  box-shadow: 0 12px 32px -10px rgba(20, 157, 255, 0.55);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

#screen-account .account-page-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.2;
}

#screen-account .account-page-hero p {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-account .account-page-hero .settings-plan-chip {
  justify-self: center;
  margin-top: 8px;
}

.settings-route-icon.account,
.settings-route-icon.vehicle {
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
}

.account-page-session-row {
  width: 100%;
  display: grid;
  gap: 2px;
  min-height: 60px;
  border: 0;
  padding: 12px 16px;
  background: transparent;
  color: var(--accent-blue);
  text-align: center;
}

.account-page-session-row.signed-in {
  color: #ff6b6b;
}

.account-page-session-row strong {
  font-size: 1rem;
}

.account-page-session-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-page-session-row:hover,
.account-page-session-row:focus-visible {
  background: var(--surface-soft);
}

.account-page-delete {
  width: 100%;
  display: grid;
  gap: 2px;
  margin-top: 14px;
  border: 0;
  padding: 8px;
  background: transparent;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.account-page-delete small {
  color: var(--soft);
  font-size: 0.74rem;
}

.account-page-delete small:empty {
  display: none;
}

/* Charge tab: the car card and its controls read as one card, with no boxes inside it; battery facts sit in a single
   card below; adding another vehicle is a quiet row at the bottom. */
#screen-garage .charge-control-card.target-expanded-panel {
  position: relative;
  padding: 6px 16px 16px !important;
}

#screen-garage .garage-refresh {
  position: absolute;
  top: -50px;
  right: 14px;
  z-index: 1;
}

#screen-garage .garage-target-card.settings-open > em {
  margin-right: 44px;
}

#screen-garage .garage-command-grid {
  display: grid;
  gap: 14px;
}

#screen-garage .garage-command-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#screen-garage .garage-command-button {
  min-height: 50px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: none;
}

#screen-garage .garage-command-button:disabled {
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--soft) !important;
  box-shadow: none !important;
  opacity: 1;
}

#screen-garage .charge-stop-button:not(:disabled) {
  border: 1px solid rgba(255, 107, 107, 0.5) !important;
  background: rgba(255, 107, 107, 0.12) !important;
  color: #ff8a8a !important;
}

#screen-garage .charge-level-control {
  margin: 0;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 14px 0 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#screen-garage .charge-level-control.hidden {
  display: none;
}

#screen-garage .charge-level-heading strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

#screen-garage .charge-level-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#screen-garage .charge-limit-value-button {
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-size: 1rem;
  font-weight: 800;
}

#screen-garage .charge-limit-auto-status:empty {
  display: none;
}

#screen-garage .vehicle-data-card {
  padding: 18px 16px !important;
}

#screen-garage .garage-battery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#screen-garage .garage-battery-head h2 {
  margin: 2px 0 0;
  font-size: 1.5rem;
}

#screen-garage .range-meter {
  position: relative;
  height: 12px;
  overflow: visible;
  border-radius: 999px;
  background: var(--surface-soft);
}

#screen-garage .range-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue), #4fc3ff);
}

#screen-garage .range-meter-limit {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0.7;
}

#screen-garage .range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

#screen-garage .range-labels.hidden {
  display: none;
}

#screen-garage .garage-add-source:empty {
  display: none;
}

.garage-add-source-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card, 16px);
  background: transparent;
  color: var(--accent-blue);
  font-size: 0.95rem;
  font-weight: 800;
}

.garage-add-source-row span {
  font-size: 1.25rem;
  line-height: 1;
}

.garage-add-source-row:hover,
.garage-add-source-row:focus-visible {
  background: var(--surface-soft);
}

#screen-garage .charge-level-slider {
  background: transparent !important;
  box-shadow: none !important;
}

#screen-garage .garage-battery-head h2 {
  font-size: 2rem;
  line-height: 1.1;
}

/* Charge tab, one card per car: the car and how it's plugged in, then its battery with the limit marked on the bar, the
   limit slider right under it, one line on what charging to the limit takes, one button, and the charge port. */
#screen-garage .garage-target-card.settings-open > em {
  display: none;
}

#screen-garage .charge-control-card .vehicle-data-card.charge-battery {
  margin: 0 0 4px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 10px 0 2px !important;
  background: transparent !important;
  box-shadow: none !important;
}

#screen-garage .charge-battery .garage-battery-head {
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

#screen-garage .charge-battery .garage-battery-head h2 {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

#screen-garage .charge-battery-range {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 800;
}

#screen-garage .charge-battery .range-labels {
  justify-content: flex-end;
}

#screen-garage .charge-battery .range-labels strong {
  color: var(--text);
}

#screen-garage .charge-control-card .charge-level-control {
  padding-top: 12px !important;
}

#screen-garage .charge-summary {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

#screen-garage .charge-summary:empty {
  display: none;
}

#screen-garage .garage-command-actions {
  grid-template-columns: 1fr;
}

#screen-garage .garage-command-button.hidden {
  display: none;
}

#screen-garage .charge-port-link {
  justify-self: center;
  min-height: 40px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 800;
}

#screen-garage .charge-port-link:disabled {
  color: var(--soft);
}

#screen-garage .charge-port-link.hidden {
  display: none;
}

/* Home: the car comes first; savings is one figure. "More" opens a quiet breakdown (a few rows and a link to the
   Savings tab, where the bars live); with no savings yet, one sentence and one link replace tiles of dashes. */
#screen-home .home-savings-wide {
  position: relative;
  display: grid;
  gap: 0;
  padding: 16px !important;
  text-align: left;
  cursor: default;
}

#screen-home .home-savings-eyebrow {
  justify-content: flex-start;
  min-height: 30px;
  padding-right: 84px;
}

#screen-home .home-savings-wide-copy strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0 0;
}

#screen-home #homeSavingsSubcopy {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

#screen-home .home-savings-wide.has-more #homeSavingsSubcopy {
  display: none;
}

.home-savings-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.home-savings-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.home-savings-wide.open .home-savings-toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

.home-savings-toggle:hover,
.home-savings-toggle:focus-visible {
  color: var(--text);
  border-color: var(--border-strong);
}

#screen-home .home-savings-facts {
  display: block;
  margin-top: 10px;
}

#screen-home .home-savings-wide.has-more:not(.open) .home-savings-facts {
  display: none;
}

#screen-home .home-savings-facts > .home-savings-rows {
  display: grid;
  border-radius: 0;
  padding: 0;
  background: none;
}

.home-savings-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.home-savings-rows > div + div {
  border-top: 1px solid var(--border);
}

#screen-home .home-savings-rows span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
}

#screen-home .home-savings-rows strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.home-savings-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.home-savings-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

.home-savings-link b {
  font-size: 1.15rem;
  line-height: 1;
}

.rate-strip[data-rate-count="1"] {
  grid-template-columns: 1fr;
}

.rate-strip[data-rate-count="1"] #nowRateTile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label tag"
    "value tag"
    "detail tag";
  align-items: center;
  column-gap: 12px;
  min-height: 0;
  padding: 16px;
  cursor: pointer;
}

.rate-strip[data-rate-count="1"] #nowRateTile > span { grid-area: label; }
.rate-strip[data-rate-count="1"] #nowRateTile > strong { grid-area: value; color: var(--text); font-size: 1.1rem; }
.rate-strip[data-rate-count="1"] #nowRateTile > small { grid-area: detail; white-space: normal; }

.rate-strip[data-rate-count="1"] #nowRateTile > em {
  grid-area: tag;
  position: static;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

#screen-home .home-charge-source-card {
  padding: 16px !important;
}

#screen-home .home-charge-source-head {
  margin-bottom: 12px;
}

#screen-home .home-charge-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
}

#screen-home .home-charge-toggle .charge-state-button {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  box-shadow: none;
}

#screen-home .home-charge-toggle .charge-state-button.on.active {
  border-color: transparent;
  background: var(--green, #34c759);
  color: #04130a;
}

#screen-home .home-charge-toggle .charge-state-button.off.active {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

#screen-home .home-charge-port-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

#screen-home .home-charge-port-actions.hidden {
  display: none;
}

#screen-home .home-charge-port-actions > span {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

#screen-home .home-charge-port-actions button {
  width: auto;
  min-height: 38px;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  font-size: 0.86rem;
}

#screen-home .home-savings-wide {
  min-height: 0 !important;
  height: auto !important;
}

/* Savings tab: one summary card (period, total, two cost bars, energy and price); the live session card only shows
   while the car is charging; an empty history is a single quiet line. */
#screen-energy .savings-summary-card {
  display: grid;
  gap: 16px;
  padding: 16px !important;
}

#screen-energy .savings-summary-card .period-tabs {
  margin: 0;
}

#screen-energy .savings-summary-card .savings-hero {
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#screen-energy .savings-summary-card .savings-hero h2 {
  margin: 2px 0 6px;
  font-size: 2.2rem;
  line-height: 1.1;
}

#screen-energy .savings-summary-card .savings-hero p.positive {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.savings-bars {
  display: grid;
  gap: 12px;
  cursor: pointer;
}

.savings-bars:empty {
  display: none;
}

.savings-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 6px;
  align-items: baseline;
}

.savings-bar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.savings-bar strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
}

.savings-bar i {
  grid-column: 1 / -1;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(245, 183, 64, 0.85);
}

.savings-bar[data-kind="actual"] i {
  background: linear-gradient(90deg, var(--accent-blue), #4fc3ff);
}

#screen-energy .savings-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

#screen-energy .savings-facts div {
  display: grid;
  gap: 3px;
}

#screen-energy .savings-facts div.hidden {
  display: none;
}

#screen-energy .savings-facts dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

#screen-energy .savings-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
}

#screen-energy .live-session-card:not(.is-charging) {
  display: none;
}

#screen-energy .charge-summary-list .empty-state {
  border: 0;
  padding: 4px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

#screen-energy .gas-compare-grid {
  gap: 12px;
  margin: 14px 0 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

#screen-energy .gas-compare-grid > div {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#screen-energy .gas-compare-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#screen-energy .gas-compare-grid strong {
  font-size: 1.02rem;
}

#screen-energy #gasCompareNote {
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 600;
}

/* Home splits into Car and Home views when the account has solar or Powerwalls. The switch sits at the top; each view
   hides the other's cards, and the live price strip shows in both. */
.home-view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px !important;
  border-radius: 999px;
  padding: 4px;
  background: var(--surface);
}

.home-view-switch.hidden {
  display: none;
}

.home-view-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  transition: background 0.16s ease, color 0.16s ease;
}

.home-view-switch button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-view-switch button.active {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

#screen-home[data-home-view="car"] #homeEnergyCard,
#screen-home[data-home-view="car"] #homeEnergySummary,
#screen-home[data-home-view="car"] #homeEnergyWeek,
#screen-home[data-home-view="home"] > .hero-card,
#screen-home[data-home-view="home"] #homeMetricGrid,
#screen-home[data-home-view="home"] #autopilotCard,
#screen-home[data-home-view="home"] #homeChargeSourceGrid {
  display: none !important;
}

.home-energy-summary {
  display: grid;
  gap: 10px;
}

.home-energy-summary.hidden {
  display: none;
}

.home-energy-summary > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.home-energy-summary > button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-energy-summary small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hes-worth strong {
  color: var(--green, #34c759);
  font-size: 1.7rem;
  line-height: 1.1;
}

.hes-worth .hes-go {
  color: var(--soft);
  font-size: 1.6rem;
  line-height: 1;
}

.hes-mode strong {
  font-size: 0.98rem;
}

.hes-mode em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.hes-mode em.on {
  background: rgba(52, 199, 89, 0.16);
  color: var(--green, #34c759);
}

/* Car view: one line of home energy under the switch, opening the Home energy view. */
.home-energy-peek {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px !important;
  border: 0;
  border-radius: var(--radius-card, 16px);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.home-energy-peek.hidden {
  display: none;
}

.hep-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 183, 64, 0.16);
  color: #f5b740;
}

.hep-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hep-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hep-copy strong {
  font-size: 0.95rem;
}

.hep-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hep-go {
  color: var(--soft);
  font-size: 1.5rem;
  line-height: 1;
}

/* Home energy view: the solar charging switch. */
.home-energy-summary .hes-solar,
.home-energy-summary .hes-storm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
}

.hes-solar > span,
.hes-storm > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hes-solar strong,
.hes-storm strong {
  font-size: 0.98rem;
}

.hes-solar.active small,
.hes-storm.active small {
  color: var(--green, #34c759);
}

/* Plan: Tonight comes first (what Autopilot will do, when, at what cost, and whether it's on track), then the vehicle
   as a slim row, the goal and when to charge, and the utility last. Autopilot is the one switch that runs the plan. */
#screen-device .plan-tonight-card {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  padding: 18px 16px;
  background: var(--surface);
}

#screen-device .plan-tonight-card h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

#screen-device .plan-tonight-meta,
#screen-device .plan-tonight-card small {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

#screen-device .plan-tonight-meta:empty,
#screen-device .plan-tonight-card small:empty,
#screen-device .plan-tonight-card .hidden {
  display: none;
}

#screen-device .plan-tonight-timeline {
  margin-top: 6px;
}

#screen-device .plan-tonight-card .primary-action {
  justify-self: start;
  margin-top: 6px;
}

#screen-device > .plan-vehicle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 16px !important;
}

#screen-device > .plan-vehicle-row h2 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

#screen-device > .plan-rate-context-card {
  margin-top: 12px;
}

/* First run: each step says what it's for and lists three short benefits with checkmarks. */
.setup-benefits {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.setup-benefits:empty {
  display: none;
}

.setup-benefits li {
  position: relative;
  padding-left: 26px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.setup-benefits li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--accent-blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234fb3ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Home: the weekly summary, one quiet card with the week's savings and a line on what charging cost. */
#screen-home .weekly-summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-card, 16px);
  padding: 14px 16px;
  background: var(--surface);
}

#screen-home .weekly-summary-card.hidden {
  display: none;
}

#screen-home .weekly-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#screen-home .weekly-summary-head .eyebrow {
  margin: 0;
}

#screen-home .weekly-summary-head button {
  min-height: 32px;
  padding: 0 4px;
  font-size: 0.86rem;
}

#screen-home .weekly-summary-card h3 {
  margin: 0;
  color: var(--green);
  font-size: 1.3rem;
}

#screen-home .weekly-summary-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

#screen-home .weekly-summary-card p:last-child:empty {
  display: none;
}

/* Home: the Storm Watch banner, shown while the Powerwall expects an outage, saying what VueRate is doing for the car. */
#screen-home .storm-watch-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-radius: var(--radius-card, 16px);
  padding: 14px 16px;
  background: var(--warning-soft);
}

#screen-home .storm-watch-banner.hidden {
  display: none;
}

#screen-home .swb-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 176, 32, 0.18);
  color: var(--warning);
}

#screen-home .swb-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-home .swb-copy {
  display: grid;
  gap: 2px;
}

#screen-home .swb-copy strong {
  color: var(--text);
  font-size: 1rem;
}

#screen-home .swb-copy small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

#screen-home .storm-watch-banner .secondary-action {
  grid-column: 2;
  justify-self: start;
}

/* Home energy diagram: each node's name reads first; what it's doing sits under it in the muted color. */
.he-caption {
  fill: var(--text);
}

.he-caption.he-status {
  fill: var(--muted);
}

/* Solar charging's result for the week, under its status. */
.hes-solar small.hes-result {
  display: block;
  margin-top: 2px;
  color: var(--green);
}

/* Home energy > Week ahead: a headline for the week's shape, seven days of expected solar (bar height is the share of
   a clear day; storm days in red), and up to three things to do, each with one button. */
#screen-home .home-energy-week {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
}

#screen-home .home-energy-week.hidden {
  display: none;
}

.hew-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.hew-head .eyebrow {
  margin: 0;
}

.hew-source {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.home-energy-week h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.2;
}

.hew-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.hew-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}

.hew-day {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 6px 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.hew-day:active {
  transform: scale(0.96);
}

.hew-day.selected {
  border-color: rgba(255, 194, 75, 0.55);
  background: rgba(255, 194, 75, 0.1);
}

.hew-day.storm.selected {
  border-color: rgba(255, 138, 138, 0.6);
}

.hew-day:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.hew-day.storm {
  background: rgba(255, 107, 107, 0.12);
}

.hew-name {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.hew-day.storm .hew-name,
.hew-day.storm .hew-kwh {
  color: #ff8a8a;
}

.hew-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hew-day[data-icon="sun"] .hew-icon svg,
.hew-day[data-icon="partly"] .hew-icon svg {
  stroke: #ffc24b;
}

.hew-day.storm .hew-icon svg {
  stroke: #ff8a8a;
}

.hew-bar {
  display: flex;
  align-items: flex-end;
  width: 14px;
  height: 46px;
}

.hew-bar i {
  display: block;
  width: 100%;
  border-radius: 4px;
  background: #ffc24b;
}

.hew-day:not([data-icon="sun"]):not([data-icon="partly"]) .hew-bar i {
  opacity: 0.55;
}

.hew-day.storm .hew-bar i {
  background: #ff8a8a;
  opacity: 1;
}

.hew-kwh {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hew-axis {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

/* The forecast learning badge, and the last week's forecasts next to what the panels made. */
.hew-learn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin-top: 8px;
  padding: 6px 10px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.hew-learn.learned {
  color: var(--text);
  border-color: rgba(52, 199, 89, 0.45);
  background: rgba(52, 199, 89, 0.08);
}

.hew-learn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.hew-learn.learned .hew-learn-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}

.hew-learn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.hew-learn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.hew-learn-detail {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  animation: hew-detail-in 200ms ease-out;
}

.hew-learn-lead,
.hew-learn-note {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hew-learn-lead b {
  font-size: 1.05rem;
}

.hew-learn-note {
  color: var(--muted);
}

.hew-learn-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.hew-learn-day {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.hew-learn-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 52px;
}

.hew-learn-bars i {
  display: block;
  width: 7px;
  border-radius: 3px;
}

.hew-learn-bars i.f,
.hew-learn-key .f::before {
  background: rgba(255, 194, 75, 0.35);
}

.hew-learn-bars i.a,
.hew-learn-key .a::before {
  background: #ffc24b;
}

.hew-learn-day b {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.hew-learn-day small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.hew-learn-key {
  display: flex;
  gap: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.hew-learn-key span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
}

/* The tapped day: its weather, solar hour by hour, and the details that matter for the Powerwall. */
.hew-detail {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  animation: hew-detail-in 200ms ease-out;
}

@keyframes hew-detail-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.hew-detail.storm {
  border-color: rgba(255, 138, 138, 0.4);
}

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

.hew-detail-head strong {
  display: block;
  font-size: 1rem;
}

.hew-detail-head small {
  color: var(--muted);
  font-size: 0.84rem;
}

.hew-detail-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.hew-detail-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hew-detail-icon[data-icon="sun"] svg,
.hew-detail-icon[data-icon="partly"] svg {
  stroke: #ffc24b;
}

.hew-detail-icon[data-icon="storm"] svg {
  stroke: #ff8a8a;
}

.hew-temps {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.hew-temps b {
  font-size: 1.3rem;
  font-weight: 800;
}

.hew-temps i {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.hew-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.12);
  font-size: 0.86rem;
  font-weight: 700;
}

.hew-alert svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hew-solar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.hew-solar span {
  display: grid;
  gap: 1px;
}

.hew-solar b {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hew-made b {
  color: #ffc24b;
}

.hew-hours {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hew-hours rect,
.hew-hours text {
  stroke: none;
}

.hew-hour {
  fill: #ffc24b;
  opacity: 0.75;
}

.hew-hour.peak {
  opacity: 1;
}

.hew-hour.past {
  opacity: 0.28;
}

.hew-base {
  stroke: var(--border);
  stroke-width: 1;
}

.hew-tick {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
}

.hew-peak {
  fill: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}

.hew-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 8px;
  margin: 0;
}

.hew-facts div {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.hew-facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hew-facts dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  font-weight: 750;
  white-space: nowrap;
}

.hew-forecast {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.hew-plan {
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--green);
  font-size: 0.86rem;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .hew-detail,
  .hew-day {
    animation: none;
    transition: none;
  }
}

.hew-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.hew-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
}

.hew-action-icon svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hew-action.tone-alert .hew-action-icon svg {
  stroke: #ff8a8a;
}

.hew-action.tone-car .hew-action-icon svg {
  stroke: var(--accent-blue);
}

.hew-action-copy {
  display: grid;
  gap: 2px;
}

.hew-action-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}

.hew-action-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.hew-action .secondary-action {
  grid-column: 2;
  justify-self: start;
  min-height: 34px;
  white-space: nowrap;
}

/* Week ahead without a location: one field for the home's ZIP. */
.hew-zip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hew-zip input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.hew-zip .primary-action {
  min-height: 44px;
  white-space: nowrap;
}

.hew-error {
  margin: 0;
  color: #ff8a8a;
  font-size: 0.84rem;
  font-weight: 700;
}

.hew-error.hidden {
  display: none;
}

/* Home energy diagram: the house in the middle is labeled VueRate, in the brand blue. */
.he-node.he-home .he-caption {
  fill: var(--accent-blue);
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* While the car charges, the middle is house + car over the total in use: a blue ring, the number a touch larger,
   and a quiet "in use" under it. */
.he-node.he-home.with-car .he-node-bg {
  stroke: var(--he-car);
  stroke-opacity: 0.7;
  fill: color-mix(in srgb, var(--he-car) 10%, var(--surface-tint));
}

.he-node.he-home.with-car .he-value {
  font-size: 14.5px;
}

.he-node.he-home.with-car .he-caption {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.he-node.he-home.with-car .he-icon:last-of-type {
  stroke: var(--he-car);
}

.he-plus {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
  stroke-linecap: round;
}

/* Home-only mode (a Powerwall or solar, no EV): no Charge tab; Plan shows the Powerwall plan instead of charging;
   Savings shows what solar and the Powerwall saved instead of charging receipts. */
body[data-home-only="true"] .bottom-nav [data-tab="garage"],
body[data-home-only="true"] nav [data-tab="garage"],
body[data-home-only="true"] #chargingPlanTonight,
body[data-home-only="true"] #scheduleTargetCard,
body[data-home-only="true"] #chargingPlanCard,
body[data-home-only="true"] #screen-energy .savings-pro-teaser,
body[data-home-only="true"] #screen-energy .savings-summary-card,
body[data-home-only="true"] #liveSessionCard,
body[data-home-only="true"] #gasCompareCard,
body[data-home-only="true"] #rateCheckCard,
body[data-home-only="true"] #screen-energy .charge-summary-list-card,
body[data-home-only="true"] #weeklyChargingCard,
body[data-home-only="true"] #homeEnergyPeek,
body[data-home-only="true"] #homeViewSwitch {
  display: none !important;
}

#screen-device .powerwall-plan {
  --he-solar: #f4b63e;
  --he-battery: var(--green);
  --he-grid: #8fa3b8;
  --he-car: var(--blue);
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
}

#screen-device .powerwall-plan.hidden {
  display: none;
}

#screen-device .powerwall-plan .he-section {
  margin: 0;
}

.pp-empty {
  display: grid;
  gap: 6px;
}

.pp-empty .eyebrow,
.pp-empty h3,
.pp-empty p {
  margin: 0;
}

.pp-empty p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.pp-empty .primary-action {
  justify-self: start;
  margin-top: 6px;
}

#screen-energy .home-only-savings {
  display: grid;
  gap: 8px;
}

#screen-energy .home-only-savings.hidden {
  display: none;
}

.home-only-savings .eyebrow,
.home-only-savings h2 {
  margin: 0;
}

.home-only-savings h2 {
  color: var(--green);
  font-size: 1.7rem;
}

.hos-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.hos-rows {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.hos-rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hos-rows dt {
  color: var(--muted);
  font-weight: 700;
}

.hos-rows dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Home energy > Weather plan: VueRate runs the Powerwall's reserve from the forecast and hourly prices. Off, an offer
   with its two limits; on, the plan's headline, what it saves, a 24-hour chart, its steps, the likely plan for the
   week, the limits as chips, and pause or change. */
#screen-home .weather-plan,
.powerwall-plan .weather-plan {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
}

.powerwall-plan .weather-plan {
  margin-bottom: 14px;
}

#screen-home .weather-plan.hidden {
  display: none;
}

.wp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wp-head .eyebrow {
  margin: 0;
}

.wp-status {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.wp-status.on {
  background: rgba(46, 204, 113, 0.14);
  color: var(--green);
}

.wp-status.off {
  background: var(--surface-soft);
  color: var(--muted);
}

.wp-status.paused {
  background: rgba(255, 194, 75, 0.16);
  color: #d99a1c;
}

.wp-status.error {
  background: rgba(255, 107, 107, 0.14);
  color: #ff8a8a;
}

.weather-plan h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.2;
}

.wp-sub,
.wp-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.wp-note {
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 194, 75, 0.12);
}

.wp-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.wp-tiles div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.wp-tiles small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.wp-tiles strong {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
}

.wp-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
  overflow: visible;
}

.wp-band.fill {
  fill: var(--accent-blue);
  opacity: 0.14;
}

.wp-band.pricey {
  fill: #ff6b6b;
  opacity: 0.1;
}

.wp-band.storm {
  fill: #ff6b6b;
  opacity: 0.22;
}

.wp-solar {
  fill: #ffc24b;
  opacity: 0.4;
}

.wp-axis {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.wp-floor {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.wp-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.wp-dot {
  fill: var(--green);
}

.wp-peak,
.wp-tick,
.wp-band,
.wp-solar {
  stroke: none;
  paint-order: normal;
}

.wp-peak {
  fill: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.wp-tick {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.wp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.wp-key::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: 0;
}

.wp-key.line::before {
  height: 3px;
  vertical-align: 2px;
  background: var(--green);
}

.wp-key.solar::before {
  background: rgba(255, 194, 75, 0.6);
}

.wp-key.fill::before {
  background: color-mix(in srgb, var(--accent-blue) 30%, transparent);
}

.wp-key.pricey::before {
  background: rgba(255, 107, 107, 0.25);
}

.wp-steps {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.wp-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.wp-step > span:last-child {
  display: grid;
  gap: 2px;
}

.wp-step strong {
  color: var(--text);
  font-size: 0.92rem;
}

.wp-step small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.wp-step-icon svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wp-step.fill .wp-step-icon svg {
  stroke: var(--accent-blue);
}

.wp-step.keep .wp-step-icon svg {
  stroke: var(--green);
}

.wp-step.storm .wp-step-icon svg {
  stroke: #ff8a8a;
}

.wp-step.home .wp-step-icon svg {
  stroke: #ffc24b;
}

.wp-week-label {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.wp-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.wp-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  border-radius: 10px;
  padding: 6px 0;
  background: var(--surface-soft);
  font-size: 0.72rem;
}

.wp-day b {
  color: var(--muted);
  font-weight: 800;
}

.wp-day i {
  font-style: normal;
  font-weight: 900;
}

.wp-day.fill i {
  color: var(--accent-blue);
}

.wp-day.sun i {
  color: #d99a1c;
}

.wp-day.keep i {
  color: var(--green);
}

.wp-day.storm {
  background: rgba(255, 107, 107, 0.14);
}

.wp-day.storm i,
.wp-day.storm b {
  color: #ff8a8a;
}

.wp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.wp-chips span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.wp-buttons {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.wp-buttons button {
  flex: 1;
}

.wp-limits {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.wp-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wp-limit > span {
  display: grid;
  gap: 2px;
}

.wp-limit strong {
  color: var(--text);
  font-size: 0.9rem;
}

.wp-limit small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.wp-limit select {
  min-width: 84px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

/* Charge controls: a sheet that slides up over Home (no tab of its own). Home stays drawn underneath behind a dimmed
   backdrop; tapping it, the close button, Escape or Android's back button closes the sheet. With more than one car,
   the cars become a compact switcher above the controls. */
.screen-stack {
  position: relative;
}

.charge-sheet-backdrop {
  position: absolute;
  inset: 0;
  display: none;
  background: rgba(2, 6, 12, 0.62);
}

body.charge-sheet-open .charge-sheet-backdrop {
  display: block;
  animation: charge-sheet-fade 180ms ease-out;
}

body.charge-sheet-open #screen-home {
  overflow: hidden;
}

#screen-garage.charge-sheet.active {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  max-height: calc(100% - 24px);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 16px 20px;
  background: var(--surface);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
  animation: charge-sheet-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.native-app #screen-garage.charge-sheet.active {
  padding-top: 8px;
}

.charge-sheet-grabber {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 2px;
  background: var(--border-strong);
}

#screen-garage .charge-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#screen-garage .charge-sheet-head > div {
  flex: 1;
  min-width: 0;
}

#screen-garage .charge-sheet-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.charge-sheet-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
}

.charge-sheet-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

#screen-garage .garage-add-source {
  display: none;
}

/* More than one car: a two-up switcher instead of full cards. */
#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg);
}

#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) > .garage-target-card {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) > .garage-target-card.active {
  background: var(--surface-soft);
  color: var(--text);
}

#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-source-icon,
#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-hero-copy > span,
#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-hero-copy > small,
#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-target-card > em {
  display: none;
}

#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-hero-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Home's car card opens the sheet. */
.hero-controls-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.hero-controls-button.hidden {
  display: none;
}

.hero-controls-button:hover,
.hero-controls-button:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.hero-controls-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@keyframes charge-sheet-rise {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes charge-sheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-garage.charge-sheet.active,
  body.charge-sheet-open .charge-sheet-backdrop {
    animation: none;
  }
}

/* Under the car switcher the refresh button sits inside the controls' top corner, level with the battery figure. */
#screen-garage .garage-source-grid + .charge-control-card .garage-refresh {
  top: 14px;
  right: 14px;
}

#screen-garage .garage-target-list:has(> .garage-target-card + .garage-target-card) .garage-hero-copy {
  width: 100%;
  text-align: center;
}

/* Free plan: the savings card is an invitation sized like a sentence, not a headline. */
#screen-home .home-savings-wide.locked #homeSavingsMetric {
  font-size: 1.3rem;
  line-height: 1.2;
}

/* Account settings sheet: grouped iOS-style lists, stacked fields, switches, and a footer that never collides with the last row. */
#accountSettingsOverlay .app-sheet {
  padding-bottom: 0;
}

#accountSettingsOverlay .settings-subsection {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#accountSettingsOverlay .settings-subsection + .settings-subsection,
#accountSettingsOverlay .settings-subsection + .account-settings-footer {
  margin-top: 26px;
}

#accountSettingsOverlay .setting-head {
  margin: 0 4px;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
}

#accountSettingsOverlay .settings-list.compact-list {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

#accountSettingsOverlay .settings-list .settings-row {
  min-height: 60px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#accountSettingsOverlay .settings-list .settings-row:not(.hidden) ~ .settings-row {
  border-top: 1px solid var(--border);
}

#accountSettingsOverlay .settings-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#accountSettingsOverlay .settings-row strong {
  font-size: 0.98rem;
}

#accountSettingsOverlay .settings-row small {
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted);
}

#accountSettingsOverlay .settings-row.button-row em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 600;
}

#accountSettingsOverlay .settings-row.button-row em::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
}

/* Profile: labels above full-width fields. */
#accountSettingsOverlay .account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#accountSettingsOverlay .account-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#accountSettingsOverlay .account-field.wide {
  grid-column: 1 / -1;
}

#accountSettingsOverlay .account-field > span {
  margin: 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

#accountSettingsOverlay .account-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
}

/* Toggles render as switches. */
#accountSettingsOverlay .settings-row input[type="checkbox"] {
  position: relative;
  flex: none;
  width: 50px;
  height: 30px;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease;
}

#accountSettingsOverlay .settings-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease;
}

#accountSettingsOverlay .settings-row input[type="checkbox"]:checked {
  background: var(--green);
  box-shadow: none;
}

#accountSettingsOverlay .settings-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

#accountSettingsOverlay .settings-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

#accountSettingsOverlay .account-select-row select {
  flex: none;
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
}

/* Delete account sits on its own, below the privacy list. */
#accountSettingsOverlay .delete-account {
  margin-top: 12px;
}

#accountSettingsOverlay .delete-account-row {
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

#accountSettingsOverlay .delete-account-row em::after {
  display: none;
}

/* Sticky footer with room above it and a solid backing. */
#accountSettingsOverlay .account-settings-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  margin-left: -20px;
  margin-right: -20px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

#accountSettingsOverlay .account-settings-footer > button {
  width: 100%;
  min-height: 48px;
}

#accountSettingsOverlay .sheet-top {
  margin-bottom: 18px;
}

/* Vera, the in-app assistant: a round button above the tab bar and a full-height chat sheet. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rev-button {
  position: absolute;
  right: 16px;
  bottom: calc(76px + 16px);
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 56px;
  min-width: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff 0%, #6a5cff 55%, #ff6b2c 130%);
  box-shadow: 0 10px 28px rgba(10, 91, 255, 0.38), 0 2px 6px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, padding 260ms ease;
  -webkit-tap-highlight-color: transparent;
}

.rev-button:active {
  transform: scale(0.94);
}

.rev-button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.rev-button-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
}

.rev-button svg,
.rev-avatar svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: none;
}

.rev-button-label {
  max-width: 0;
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 260ms ease, opacity 200ms ease;
}

.rev-button.intro {
  padding-right: 20px;
}

.rev-button.intro .rev-button-mark {
  width: 48px;
  margin-left: 4px;
}

.rev-button.intro .rev-button-label {
  max-width: 120px;
  opacity: 1;
}

.rev-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(106, 92, 255, 0.5);
  animation: rev-pulse 2.6s ease-out 1s 2;
  pointer-events: none;
}

@keyframes rev-pulse {
  0% { box-shadow: 0 0 0 0 rgba(106, 92, 255, 0.5); }
  100% { box-shadow: 0 0 0 16px rgba(106, 92, 255, 0); }
}

body.charge-sheet-open .rev-button {
  display: none;
}

/* Room so the button never covers the last thing on a screen. */
.screen-view:not(.charge-sheet) {
  padding-bottom: 96px;
}

.rev-overlay {
  padding: 12px 12px 0;
}

.rev-overlay .rev-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: 100%;
  height: calc(100% - 12px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  animation: rev-sheet-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes rev-sheet-in {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.rev-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px 18px;
  border-bottom: 1px solid var(--border);
}

.rev-head h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.rev-head p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.rev-head p i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.rev-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff 0%, #6a5cff 55%, #ff6b2c 130%);
}

.rev-avatar.small {
  width: 28px;
  height: 28px;
}

.rev-avatar.small svg {
  width: 16px;
  height: 16px;
}

.rev-scroll {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 8px;
}

/* Messages sit at the bottom, next to where you type, like a messaging app. */
.rev-log {
  display: grid;
  align-content: end;
  gap: 14px;
  flex: 1 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rev-message.grouped {
  margin-top: -8px;
}

.rev-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: rev-message-in 220ms ease-out;
}

@keyframes rev-message-in {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.rev-message p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

.rev-text {
  display: grid;
  gap: 8px;
}

.rev-text ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  list-style: disc;
  font-size: 0.98rem;
  line-height: 1.45;
}

.rev-text strong {
  font-weight: 750;
}

.rev-message.you {
  justify-content: flex-end;
}

.rev-message.you p {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 20px 20px 6px 20px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff, #1f63e6);
  box-shadow: 0 6px 18px rgba(31, 99, 230, 0.25);
}

.rev-bubble {
  display: grid;
  gap: 12px;
  max-width: 86%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px 20px 20px 6px;
  color: var(--text);
  background: var(--surface-soft);
}

/* A reply with an action uses the full width, so the button's words stay on one line. */
.rev-bubble:has(.rev-suggest) {
  flex: 1;
  max-width: 100%;
}

.rev-message.grouped .rev-bubble {
  border-radius: 6px 20px 20px 6px;
}

.rev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rev-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--blue);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.rev-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rev-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.rev-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
  animation: rev-dot 1s ease-in-out infinite;
}

.rev-dots i:nth-child(2) { animation-delay: 0.15s; }
.rev-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes rev-dot {
  0%, 60%, 100% { opacity: 0.35; transform: none; }
  30% { opacity: 1; transform: translateY(-3px); }
}

.rev-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 16px 10px;
  scrollbar-width: none;
  /* The row scrolls sideways; a fade at the edge says there's more instead of cutting a question in half. */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  scroll-padding-inline: 16px;
}

.rev-chips::-webkit-scrollbar {
  display: none;
}

.rev-chips.hidden {
  display: none;
}

.rev-chips button {
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.rev-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 12px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-soft);
}

.rev-compose:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 123, 255, 0.16);
}

.rev-compose input {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 1rem;
  box-shadow: none;
}

.rev-compose button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff, #6a5cff);
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.rev-compose button:not(:disabled):active {
  transform: scale(0.92);
}

.rev-compose button:disabled {
  opacity: 1;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  cursor: default;
}

.rev-compose svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rev-note {
  margin: 0;
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
}

/* Vera's first screen: a face and hello, the car at a glance, and questions to tap. */
.rev-welcome {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px 6px 4px;
  text-align: center;
}

.rev-welcome-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 6px;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(106, 92, 255, 0.14), 0 12px 36px rgba(47, 123, 255, 0.35);
}

.rev-welcome-face img {
  width: 118%;
  height: 118%;
  object-fit: cover;
}

.rev-welcome h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.rev-welcome > p {
  max-width: 30ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.rev-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  width: 100%;
  margin: 10px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.rev-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 8px;
}

.rev-stats div + div {
  border-left: 1px solid var(--border);
}

.rev-stats dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rev-stats dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* On the first screen the questions are cards to tap, not a row to scroll. */
.rev-chips.cards {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding: 4px 16px 12px;
  -webkit-mask-image: none;
  mask-image: none;
}

.rev-chips.cards button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px 0 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: left;
  white-space: normal;
  transition: border-color 150ms ease, background 150ms ease;
}

.rev-chips.cards button:hover,
.rev-chips.cards button:focus-visible {
  border-color: var(--blue);
}

.rev-chips.cards svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* An action Vera suggests: one clear button, and a word that nothing happens until it's tapped. */
.rev-suggest {
  display: grid;
  gap: 6px;
}

.rev-suggest small {
  color: var(--muted);
  font-size: 0.74rem;
}

.rev-suggest .rev-do {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px 0 8px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff7a3d, #ff5a1f);
  box-shadow: 0 8px 22px rgba(255, 107, 44, 0.28);
  font-size: 0.95rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

.rev-suggest .rev-do:active {
  transform: scale(0.98);
}

.rev-suggest .rev-do:disabled {
  opacity: 0.6;
}

.rev-suggest .rev-do > span:not(.rev-do-icon) {
  flex: 1;
}

.rev-do-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}

.rev-suggest svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rev-do-icon svg {
  fill: currentColor;
  stroke: none;
}

.rev-done {
  justify-self: start;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.14);
}

.rev-thinking {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.rev-message.typing .rev-bubble {
  display: flex;
  align-items: center;
}

/* While Vera is open a toast shows above the composer, not over Vera's name. */
body.rev-open .toast {
  top: auto;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .rev-button,
  .rev-button-label,
  .rev-overlay .rev-sheet,
  .rev-message,
  .rev-dots i,
  .rev-button::after {
    animation: none;
    transition: none;
  }
}

.rev-button.tucked {
  transform: translateY(24px) scale(0.6);
  opacity: 0;
  pointer-events: none;
}

.rev-button {
  transition: transform 200ms ease, opacity 200ms ease, box-shadow 160ms ease, padding 260ms ease;
}

/* Vera's face fills each circle, cropped a little past the headphones so the eyes and glasses read at small sizes. */
.rev-button-mark,
.rev-avatar {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.rev-button-mark img,
.rev-avatar img {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 116%;
  height: 116%;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

.rev-button-mark {
  background: linear-gradient(135deg, #2f7bff 0%, #6a5cff 55%, #ff6b2c 130%);
}

.rev-button.intro .rev-button-mark {
  width: 48px;
  height: 48px;
}

/* The floating Vera is the whole robot, small and waving, standing over the tab bar with a soft shadow instead of a
   colored circle. On the first visit an "Ask Vera" speech bubble sits beside it. */
.rev-button,
.rev-button.intro {
  right: 10px;
  bottom: calc(76px + 6px);
  width: 58px;
  height: 76px;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rev-button::after {
  display: none;
}

.rev-button .rev-button-mark,
.rev-button.intro .rev-button-mark {
  position: absolute;
  inset: 0;
  width: 58px;
  height: 76px;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  animation: rev-float 3.2s ease-in-out infinite;
}

.rev-button .rev-button-mark img {
  top: auto;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  transform: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.32)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.25));
}

@keyframes rev-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.rev-button .rev-button-label {
  position: absolute;
  right: calc(100% + 4px);
  top: 12px;
  max-width: none;
  padding: 8px 12px;
  border-radius: 16px 16px 4px 16px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff 0%, #6a5cff 100%);
  box-shadow: 0 6px 16px rgba(47, 123, 255, 0.35);
  font-size: 0.92rem;
  opacity: 0;
  transform: translateX(8px) scale(0.9);
  transform-origin: right bottom;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.rev-button.intro .rev-button-label {
  max-width: none;
  opacity: 1;
  transform: none;
}

.rev-button:active .rev-button-mark {
  transform: scale(0.92);
}

.rev-button:focus-visible {
  outline-offset: 2px;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .rev-button .rev-button-mark {
    animation: none;
  }
}

/* Sun first on the Autopilot card: tonight's hours colored by where their energy comes from, then a row per source. */
.autopilot-plan.sun-first > .autopilot-timeline,
.autopilot-plan.sun-first > .autopilot-facts {
  display: none;
}

.sun-first {
  --sf-solar: #f4b63e;
  --sf-grid: var(--blue);
  --sf-sell: var(--green);
  display: grid;
  gap: 8px;
}

.sf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  color: #7a4d00;
  background: #fdf0d2;
  font-size: 0.78rem;
  font-weight: 700;
}

.sf-pill svg,
.sf-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-cost {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.sf-bar {
  display: flex;
  gap: 2px;
  height: 14px;
}

.sf-bar i {
  flex: 1;
  border-radius: 3px;
  background: var(--surface-soft);
}

.sf-bar i.sf-solar { background: var(--sf-solar); }
.sf-bar i.sf-grid { background: var(--sf-grid); }
.sf-bar i.sf-sell { background: var(--sf-sell); }

.sf-labels {
  position: static;
  margin-top: -4px;
}

.sf-rows {
  display: grid;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

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

.sf-row + .sf-row {
  border-top: 1px solid var(--border);
}

.sf-row > span:nth-child(2) {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sf-row strong {
  font-size: 0.92rem;
}

.sf-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.sf-row em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.95rem;
}

.sf-row em.good {
  color: var(--green);
}

.sf-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
}

.sf-icon svg {
  width: 16px;
  height: 16px;
}

.sf-icon.sf-solar { color: #b26b00; background: #fdf0d2; }
.sf-icon.sf-sell { color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); }
.sf-icon.sf-grid { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }

.sf-saving {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  font-size: 0.86rem;
}

/* Activity: what VueRate did, on Home and in its own sheet. */
.activity-card {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  border-radius: var(--radius-card);
  padding: 16px 16px 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.activity-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.activity-head h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.activity-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-row {
  --activity-tone: var(--blue);
  --activity-tint: rgba(10, 91, 255, 0.14);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
}

.activity-row + .activity-row {
  border-top: 1px solid var(--border);
}

/* Tints are see-through so they sit on both the light and dark surfaces. One colour per area, as on Today: car blue,
   sun amber, Powerwall green, storm violet; money saved is mint, and a warning is coral so it never looks like sun. */
.activity-row.tone-car { --activity-tone: var(--v-car2, var(--blue)); --activity-tint: rgba(61, 139, 255, 0.16); }
.activity-row.tone-sun { --activity-tone: var(--v-sun, #d99a1e); --activity-tint: rgba(255, 181, 71, 0.16); }
.activity-row.tone-good { --activity-tone: var(--v-mint, var(--green)); --activity-tint: rgba(59, 232, 166, 0.14); }
.activity-row.tone-home { --activity-tone: #8FD3A8; --activity-tint: rgba(143, 211, 168, 0.14); }
.activity-row.tone-storm { --activity-tone: var(--v-storm, #8c7bff); --activity-tint: rgba(166, 148, 255, 0.16); }
.activity-row.tone-warn { --activity-tone: var(--v-coral, #e5534b); --activity-tint: rgba(255, 106, 92, 0.16); }
.activity-row.tone-muted { --activity-tone: var(--muted); --activity-tint: rgba(128, 138, 154, 0.16); }

.activity-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--activity-tone);
  background: var(--activity-tint);
}

.activity-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-copy strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.activity-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.activity-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}

.activity-meta time {
  color: var(--soft);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.activity-meta b {
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.activity-meta b.good {
  color: var(--v-mint, var(--green));
}

.activity-empty {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.activity-overlay {
  padding: 12px 12px 0;
}

.activity-overlay .activity-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: calc(100% - 12px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  animation: rev-sheet-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.activity-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px 20px;
  border-bottom: 1px solid var(--border);
}

.activity-sheet-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.activity-sheet-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* A plain fill under the header, so the sticky day headers match what scrolls beneath them. */
.activity-scroll {
  overflow-y: auto;
  padding: 0 20px 32px;
  background: var(--surface);
  overscroll-behavior: contain;
}

/* Each group's header: the day on the left, what it saved on the right. */
.activity-day h4 {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 16px 0 6px;
  color: var(--soft);
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-day h4 b {
  color: var(--v-mint, var(--green));
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .activity-overlay .activity-sheet { animation: none; }
}

/* Settings > Alerts: a switch for each kind of push alert, and quiet hours. */
.settings-route-icon.alerts {
  color: var(--orange);
  background: rgba(255, 107, 44, 0.14);
}

.alerts-overlay {
  padding: 12px 12px 0;
}

.alerts-overlay .alerts-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: calc(100% - 12px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  animation: rev-sheet-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.alerts-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px 20px;
  border-bottom: 1px solid var(--border);
}

.alerts-sheet-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.alerts-sheet-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.alerts-scroll {
  display: grid;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  padding: 16px 16px 32px;
  overscroll-behavior: contain;
}

.alerts-off {
  display: grid;
  gap: 6px;
  border-radius: var(--radius-card);
  padding: 16px;
  background: rgba(255, 107, 44, 0.12);
}

.alerts-off small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.alerts-off button {
  justify-self: start;
  margin-top: 6px;
}

.alerts-list {
  display: grid;
  gap: 16px;
}

.alerts-group {
  border-radius: var(--radius-card);
  padding: 0 16px;
  background: var(--surface);
}

.alerts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 0;
}

.alerts-row + .alerts-row {
  border-top: 1px solid var(--border);
}

.alerts-row > span {
  display: grid;
  gap: 2px;
}

.alerts-row strong {
  font-size: 0.95rem;
}

.alerts-row small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .alerts-overlay .alerts-sheet { animation: none; }
}

/* An action Vera on Claude suggested: filled, since tapping it changes something; a note once it's done. */
.rev-actions button.rev-do {
  border-color: transparent;
  color: #fff;
  background: var(--orange);
}

.rev-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 650;
}

.rev-done svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Home > Energy plan: the next 24 hours of the car, the Powerwall and the house as one plan (09i-day-plan.js). A
   sentence and the dollars first, then an hour-by-hour strip: price bars with the priciest stretch in orange, when the
   car charges (blue from the grid, amber from the sun), and the Powerwall's charge as a green line. */
#screen-home .day-plan {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(46, 204, 113, 0.32);
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.08), transparent 60%), var(--surface);
}

#screen-home .day-plan.hidden {
  display: none;
}

.day-plan h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.24rem;
  line-height: 1.2;
}

.dp-sentence {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.dp-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
  overflow: visible;
}

.dp-chart rect,
.dp-chart text {
  stroke: none;
}

.dp-price {
  fill: var(--border-strong);
  opacity: 0.55;
}

.dp-price.peak {
  fill: var(--orange);
  opacity: 0.9;
}

.dp-track {
  stroke: var(--border);
  stroke-width: 1;
}

.dp-car.grid {
  fill: var(--accent-blue, var(--blue));
}

.dp-car.solar {
  fill: var(--amber);
}

.dp-soc {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.dp-soc-fill {
  fill: var(--green);
  opacity: 0.14;
  stroke: none;
}

.dp-tick,
.dp-lane {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.dp-lane {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 8px;
}

.dp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

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

.dp-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.dp-legend i.peak {
  background: var(--orange);
}

.dp-legend i.grid {
  background: var(--accent-blue, var(--blue));
}

.dp-legend i.solar {
  background: var(--amber);
}

.dp-legend i.soc {
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.dp-rows {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

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

.dp-row-icon svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dp-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dp-row-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}

.dp-row-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.dp-row-side {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.dp-row-side b {
  color: var(--green);
  font-size: 0.92rem;
}

.dp-row-side em {
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.dp-row-side em.on {
  color: var(--green);
  background: rgba(46, 204, 113, 0.14);
}

.dp-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.dp-approve {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.dp-approve .primary-action {
  width: 100%;
}

.dp-approve small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}

.dp-running {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--green);
  background: rgba(46, 204, 113, 0.1);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.dp-running svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* Home > Your solar's worth (09j-solar-worth.js): the panels' power in dollars at hourly prices, today, 7 days and
   30 days, and the free miles spare solar put in the car. Free miles and panel health in the week ahead too. */
#screen-home .solar-worth {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  padding: 16px;
  background: var(--surface);
}

#screen-home .solar-worth.hidden {
  display: none;
}

.solar-worth h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.2;
}

.sw-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.sw-tile {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  padding: 10px 8px;
  background: var(--surface-soft);
  text-align: center;
}

.sw-tile b {
  color: var(--green);
  font-size: 1.08rem;
}

.sw-tile small,
.sw-split {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.sw-tile .sw-days {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
}

.sw-split {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.sw-miles,
.hew-miles {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(20, 157, 255, 0.1);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.sw-miles svg,
.hew-miles svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent-blue, var(--blue));
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hew-panels {
  margin-top: 4px;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 107, 107, 0.1);
}

/* Choose your cars: which of the Tesla account's cars VueRate manages (one car, one VueRate account). */
#teslaCarsOverlay {
  z-index: 80;
}

.tesla-cars-sheet {
  display: grid;
  gap: 12px;
}

.tesla-cars-intro,
.tesla-cars-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tesla-cars-status.error {
  color: var(--danger);
}

.tesla-cars-status:empty {
  display: none;
}

.tesla-cars-list {
  display: grid;
  gap: 10px;
  max-height: min(360px, 45vh);
  overflow: auto;
}

.tesla-car-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--surface);
}

.tesla-car-row input {
  width: 22px;
  height: 22px;
  flex: none;
}

.tesla-car-row span {
  display: grid;
  gap: 2px;
}

.tesla-car-row small {
  color: var(--muted);
}

.tesla-car-row.taken {
  opacity: 0.6;
}

.tesla-cars-save {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.tesla-cars-save:disabled {
  opacity: 0.5;
/* Settings > Shared access, and the banner shown while viewing an account shared with you. */
.shared-account-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 12px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--text);
}

.shared-account-banner span {
  display: grid;
  min-width: 0;
}

.shared-account-banner strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-account-banner small {
  color: var(--muted);
}

.shared-account-banner button,
.shared-access-btn {
  flex: none;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.shared-access-btn.primary,
.shared-account-banner button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.shared-access-btn:disabled {
  opacity: 0.55;
}

.shared-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.shared-access-row > span:first-child {
  display: grid;
  min-width: 0;
  flex: 1 1 160px;
}

.shared-access-row strong,
.shared-access-row small {
  overflow-wrap: anywhere;
}

.shared-access-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shared-access-role {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.shared-access-invite {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.shared-access-note {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.shared-access-note.error {
  color: var(--danger);
}
