/* Vivid redesign: Today (#screen-home). Loaded after styles-vivid.css; scope every rule to this area.
   Mockup 01: the car hero (chip, glowing ring left, Ready by / Autopilot right, timeline), Vera's note, Price now +
   Home (or Charging tonight) side by side, the $ saved strip and the Storm Watch strip. Markup and state come from
   09l-today-vivid.js; the calm rules this beats are scoped "#screen-home .simplified-home-hero[data-ring=true] .x",
   so these rules match or beat that. */

#screen-home {
  --today-gap: var(--v-gap);
}

/* ---------- What Today leaves out: each fact once, the details a tap away ---------- */
/* Score rings, the long "Your week" card, the Autopilot list and the price row are retired here: the hero says the
   battery and tonight's plan, the tiles say the price, the strip says the savings. Plan and Savings keep the detail. */
#screen-home .home-scores,
#screen-home .weekly-summary-card,
#screen-home:not([data-plan-open="true"]) .autopilot-card,
#screen-home .rate-strip,
#screen-home .home-savings-wide.today-hidden {
  display: none !important;
}

/* First run (no Tesla yet): Connect your Tesla leads, alone with the price. */
#screen-home[data-today="first-run"] .simplified-home-hero,
#screen-home[data-today="first-run"] .home-metric-grid,
#screen-home[data-today="first-run"] .activity-card {
  display: none !important;
}

#screen-home[data-today="home-only"] .today-pager {
  display: none;
}

/* ---------- First run: Connect your Tesla ---------- */
#screen-home .today-connect:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 var(--v-gap);
  padding: 18px 18px 20px;
}

#screen-home .today-connect.hidden {
  display: none;
}

#screen-home .today-connect-art {
  display: block;
  width: calc(100% + 12px);
  margin: -4px -6px 4px;
}

#screen-home .today-connect-art svg {
  display: block;
  width: 100%;
  height: auto;
  fill: #000;
  stroke: none;
}

#screen-home .today-connect-title {
  margin: 0;
  color: #fff;
}

#screen-home .today-connect-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: pretty;
}

#screen-home .today-connect-button {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 16px;
  color: #0B2A6B;
  background: #fff;
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.7);
  font-size: 17px;
  font-weight: 700;
}

#screen-home .today-connect-button.hidden,
#screen-home .today-connect-foot.hidden {
  display: none;
}

#screen-home .today-connect-foot {
  margin: 2px 0 0;
  align-self: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-align: center;
}

/* ---------- The car hero ---------- */
#screen-home .simplified-home-hero[data-ring="true"] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 18px !important;
  text-align: left;
}

#screen-home .today-pager {
  margin: 0 0 var(--v-gap);
}

#screen-home .simplified-home-hero .today-chip-row {
  order: 0;
  display: flex;
  min-width: 0;
}

#screen-home .simplified-home-hero:not([data-ring="true"]) .today-chip-row,
#screen-home .today-chip-row.hidden {
  display: none;
}

#screen-home .today-hero-chip {
  max-width: 100%;
  white-space: normal;
  border-radius: 14px;
}

#screen-home .today-hero-chip .today-chip-text {
  min-width: 0;
}

#screen-home .today-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v-tx3);
}

#screen-home .today-hero-chip[data-tone="ok"] .today-dot,
#screen-home .today-hero-chip[data-tone="live"] .today-dot {
  background: var(--v-mint);
  box-shadow: 0 0 8px var(--v-mint);
}

#screen-home .today-hero-chip[data-tone="warn"] .today-dot {
  background: var(--v-sun);
  box-shadow: 0 0 8px var(--v-sun);
}

#screen-home .simplified-home-hero[data-ring="true"] .hero-top,
#screen-home .simplified-home-hero[data-ring="true"] .battery-row,
#screen-home .simplified-home-hero[data-ring="true"] .progress-track,
#screen-home .simplified-home-hero[data-ring="true"] .progress-labels {
  display: none;
}

/* The plan sentence only shows when it says something the timeline can't (asleep, unplugged, can't reach Tesla). */
#screen-home .simplified-home-hero[data-ring="true"] .hero-plan-copy {
  order: 3;
  max-width: none;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

#screen-home .simplified-home-hero[data-ring="true"][data-copy="hide"] .hero-plan-copy {
  display: none;
}

#screen-home .simplified-home-hero[data-ring="true"] .hero-ring-row {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 4vw, 16px);
  margin: 14px 0 0;
}

#screen-home .simplified-home-hero:not([data-ring="true"]) .today-hero-side {
  display: none;
}

/* The ring: 112-150px, drawn by todayRingSvg() (glow arc breathing behind the level, the goal as an amber dot). */
#screen-home .simplified-home-hero[data-ring="true"] .charge-ring {
  position: relative;
  flex: none;
  width: clamp(112px, 36vw, 150px);
  height: clamp(112px, 36vw, 150px);
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: none;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring svg circle {
  fill: none;
  stroke-width: 14;
  filter: none;
  animation: none;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring svg circle.breathe {
  stroke-width: 20;
  animation: breathe 3.2s ease-in-out infinite;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring svg circle.today-ring-dot {
  fill: #FFB547;
  stroke-width: 3;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring-name,
#screen-home .simplified-home-hero[data-ring="true"] .charge-ring-center #chargeRingValue {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#screen-home .today-ring-num {
  color: #fff;
  font-size: clamp(32px, 11vw, 46px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#screen-home .today-ring-num .u {
  color: #fff;
  font-size: 0.5em;
  font-weight: 750;
  letter-spacing: 0;
}

#screen-home .simplified-home-hero:not([data-ring="true"]) .today-ring-num {
  display: none;
}

#screen-home .simplified-home-hero[data-ring="true"] .charge-ring-center #chargeRingLabel {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Right column: Ready by 7:00 AM, then Autopilot 10 PM–6 AM (a button to Plan). */
#screen-home .simplified-home-hero[data-ring="true"] .today-hero-side .hero-ready-line {
  order: 0;
}

#screen-home .simplified-home-hero[data-ring="true"] .today-hero-side .today-hero-plan {
  order: 1;
}

#screen-home .today-hero-side {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

#screen-home .simplified-home-hero[data-ring="true"] .hero-ready-line:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: #fff;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
}

#screen-home .today-ready-big {
  color: #fff;
  font-size: clamp(28px, 9.4vw, 38px);
}

#screen-home .today-hero-plan:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 2px 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: none;
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#screen-home .today-hero-plan.hidden {
  display: none;
}

#screen-home .today-hero-plan:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#screen-home .today-hero-plan .v-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#screen-home .today-bolt {
  flex: none;
  width: 12px;
  height: 12px;
  fill: #FFD08A;
  stroke: none;
}

#screen-home .today-plan-val {
  color: #fff;
  font-size: clamp(15px, 5.1vw, 20px);
  white-space: normal;
  overflow-wrap: normal;
}

#screen-home .today-plan-val.off {
  color: rgba(255, 255, 255, 0.9);
}

/* The timeline: Now ... 10 PM ... 6 AM ... 7 AM, the charging hours lit, the ready-by tick in amber. */
#screen-home .today-timeline:not(.hidden) {
  order: 2;
  display: block;
  margin: 16px 0 0;
  cursor: pointer;
}

#screen-home .today-timeline.hidden {
  display: none;
}

#screen-home .today-tl-bar {
  position: relative;
  height: 10px;
  margin-right: 1px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
}

#screen-home .today-tl-run {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, #9BD0FF, #fff);
  box-shadow: 0 0 14px rgba(155, 208, 255, 0.9);
}

#screen-home .today-tl-ready {
  position: absolute;
  top: -4px;
  right: 0;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--v-goal);
}

#screen-home .today-tl-labels {
  position: relative;
  height: 16px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#screen-home .today-tl-labels span {
  position: absolute;
  top: 0;
}

#screen-home .today-tl-labels .mid {
  transform: translateX(-50%);
}

#screen-home .today-tl-labels .end {
  right: 0;
  color: #FFD08A;
}

/* Tesla's own schedule card, and the actions. */
#screen-home .simplified-home-hero[data-ring="true"] .tesla-schedule-status:not(.hidden) {
  order: 3;
  align-items: flex-start;
  margin: 14px 0 0;
  text-align: left;
}

#screen-home .simplified-home-hero[data-ring="true"] .hero-actions {
  order: 5;
  justify-content: stretch;
  gap: 10px;
  margin: 16px 0 0;
}

#screen-home .simplified-home-hero[data-ring="true"] .hero-actions .hero-controls-button {
  flex: 1 1 128px;
  min-height: 46px;
  padding: 0 14px;
  white-space: nowrap;
}

/* View-only shared access: in place of Charge controls and Take control, one calm line with an eye. */
#screen-home .hero-view-only {
  display: flex;
  order: 6;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: break-word;
}

#screen-home .hero-view-only svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-home .hero-view-only span {
  min-width: 0;
}

#screen-home .hero-view-only strong {
  color: #fff;
  font-weight: 700;
}

/* Can't reach Tesla: Try again sits beside the chip that says so, not as a third full-width button. */
#screen-home .simplified-home-hero .today-chip-row {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#screen-home .simplified-home-hero .today-chip-row .today-retry.hidden {
  display: none;
}

#screen-home .simplified-home-hero .today-chip-row .today-retry:not(.hidden) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -6px 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

#screen-home .simplified-home-hero .today-chip-row .today-retry:disabled {
  opacity: 0.6;
}

/* ---------- Two cars: the pager ---------- */
#screen-home .today-pager.is-pager .today-pager-track {
  display: flex;
  gap: 10px;
  margin: 0 calc(var(--v-gutter) * -1);
  padding: 0 var(--v-gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--v-gutter);
  scrollbar-width: none;
}

#screen-home .today-pager.is-pager .today-pager-track::-webkit-scrollbar {
  display: none;
}

#screen-home .today-pager.is-pager .today-page {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#screen-home .today-mini {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#screen-home .today-mini-main {
  display: flex;
  align-items: center;
  gap: clamp(12px, 4vw, 16px);
}

#screen-home .today-mini-ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(112px, 36vw, 150px);
  height: clamp(112px, 36vw, 150px);
}

#screen-home .today-mini-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#screen-home .today-mini-num {
  position: relative;
  color: #fff;
  font-size: clamp(32px, 11vw, 46px);
  font-weight: 800;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

#screen-home .today-mini-num .u {
  font-size: 0.5em;
}

#screen-home .today-mini-side {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#screen-home .today-mini-note {
  margin-top: 8px;
}

#screen-home .today-switch-car {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 8, 30, 0.32);
  font-weight: 600;
}

#screen-home .today-pager-dots:not(.hidden) {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 6px;
}

#screen-home .today-pager-dots.hidden {
  display: none;
}

/* Each dot is a 44px target; the negative margins keep the row as compact as the dots look. */
#screen-home .today-pager-dots button {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: -10px -6px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
}

#screen-home .today-pager-dots button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  transition: width 160ms ease, background 160ms ease;
}

#screen-home .today-pager-dots button[aria-selected="true"]::after {
  width: 18px;
  background: var(--v-car2);
}

/* ---------- Vera ---------- */
#screen-home .today-rev-note:not(.hidden) {
  margin: 0 0 var(--v-gap);
}

/* ---------- Tiles: Price now + Home (or Charging tonight) ---------- */
#screen-home .today-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--v-gap);
  margin: 0 0 var(--v-gap);
}

#screen-home .today-tiles[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

#screen-home .today-tiles.hidden,
#screen-home .today-tiles > .hidden {
  display: none !important;
}

#screen-home .today-tiles > .v-tile,
#screen-home .today-tiles > .home-energy-peek:not(.hidden) {
  gap: 4px;
  align-self: stretch;
  min-height: 0;
  /* styles.css gives the old peek row margin-bottom: 12px !important, which made the Home tile 12px shorter. */
  margin: 0 !important;
  padding: 14px;
}

#screen-home .today-tile-ico {
  display: flex;
  flex: none;
}

#screen-home .today-tile-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-home .today-price-tile .today-tile-ico svg {
  fill: currentColor;
  stroke: none;
}

#screen-home .today-tile-big {
  margin-top: 6px;
  color: #fff;
  font-size: clamp(28px, 9.6vw, 38px);
}

#screen-home .today-tile-ttl {
  margin-top: 6px;
  font-size: 17px;
}

#screen-home .today-price-tile {
  color: var(--v-tx);
  background: linear-gradient(160deg, rgba(166, 180, 210, 0.12), rgba(166, 180, 210, 0.02) 60%), var(--v-card);
}

#screen-home .today-price-tile .today-tile-ico {
  color: var(--v-car2);
}

#screen-home .today-price-tile[data-tone="good"] {
  border-color: rgba(59, 232, 166, 0.22);
  background: linear-gradient(160deg, rgba(59, 232, 166, 0.16), rgba(59, 232, 166, 0.03) 60%), var(--v-card);
}

#screen-home .today-price-tile[data-tone="good"] .today-tile-ico,
#screen-home .today-price-tile[data-tone="good"] .today-spark {
  color: var(--v-mint);
}

#screen-home .today-price-tile[data-tone="mid"] {
  border-color: rgba(255, 181, 71, 0.22);
  background: linear-gradient(160deg, rgba(255, 181, 71, 0.16), rgba(255, 181, 71, 0.03) 60%), var(--v-card);
}

#screen-home .today-price-tile[data-tone="mid"] .today-tile-ico,
#screen-home .today-price-tile[data-tone="mid"] .today-spark {
  color: var(--v-sun);
}

#screen-home .today-price-tile[data-tone="bad"] {
  border-color: rgba(255, 106, 92, 0.26);
  background: linear-gradient(160deg, rgba(255, 106, 92, 0.18), rgba(255, 106, 92, 0.03) 60%), var(--v-card);
}

#screen-home .today-price-tile[data-tone="bad"] .today-tile-ico,
#screen-home .today-price-tile[data-tone="bad"] .today-spark {
  color: var(--v-coral);
}

#screen-home .today-price-row {
  gap: 4px 8px;
  align-items: center;
}

#screen-home .today-price-row .today-tile-big .u {
  font-size: 0.55em;
}

#screen-home .today-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

#screen-home .today-pill.good {
  color: var(--v-ink-mint);
  background: var(--v-mint);
}

#screen-home .today-pill.mid {
  color: var(--v-ink-amber);
  background: var(--v-sun);
}

#screen-home .today-pill.bad {
  color: #2A0703;
  background: var(--v-coral);
}

#screen-home .today-spark {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 8px;
}

#screen-home .today-tonight-tile {
  border-color: rgba(125, 184, 255, 0.22);
  background: linear-gradient(160deg, rgba(61, 139, 255, 0.18), rgba(61, 139, 255, 0.03) 60%), var(--v-card);
}

#screen-home .today-tonight-tile .today-tile-ico {
  color: var(--v-car2);
}

/* The Home tile is styled by styles-vivid.css; here it only sits in the row. */
#screen-home .today-tiles > .home-energy-peek .v-big {
  margin-top: 6px;
  font-size: clamp(28px, 9.6vw, 38px);
}

#screen-home .today-tiles > .home-energy-peek .v-ico.sm {
  width: auto;
  height: auto;
  background: none;
}

/* ---------- The $ saved strip (or the one VueRate Drive invitation) ---------- */
#screen-home .home-metric-grid {
  display: block;
  margin: 0 0 var(--v-gap);
}

#screen-home .home-metric-grid > .home-metric-card:not(.home-savings-wide) {
  display: none;
}

#screen-home .home-savings-wide {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin: 0;
  padding: 12px 14px !important;
  border: 1px solid var(--v-line) !important;
  border-radius: var(--v-r-card) !important;
  background: linear-gradient(90deg, rgba(59, 232, 166, 0.16), rgba(59, 232, 166, 0) 70%), var(--v-card) !important;
  cursor: pointer;
}

#screen-home .home-savings-wide:focus-visible {
  outline: 2px solid var(--v-car2);
  outline-offset: 2px;
}

#screen-home .home-savings-wide[data-mode="invite"] {
  border-color: rgba(125, 184, 255, 0.24) !important;
  background: linear-gradient(90deg, rgba(61, 139, 255, 0.18), rgba(61, 139, 255, 0) 75%), var(--v-card) !important;
}

#screen-home .home-savings-wide .today-savings-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--v-mint);
  background: rgba(59, 232, 166, 0.15);
}

#screen-home .home-savings-wide[data-mode="invite"] .today-savings-ico {
  color: var(--v-car2);
  background: rgba(61, 139, 255, 0.18);
}

#screen-home .home-savings-wide .today-savings-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-home .home-savings-wide[data-mode="invite"] .today-savings-ico svg {
  fill: currentColor;
  stroke: none;
}

#screen-home .home-savings-wide .home-savings-wide-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#screen-home .home-savings-wide .home-savings-eyebrow,
#screen-home .home-savings-wide #homeSavingsSubcopy,
#screen-home .home-savings-wide #homeSavingsPeriod,
#screen-home .home-savings-wide .home-savings-toggle,
#screen-home .home-savings-wide .home-savings-facts {
  display: none !important;
}

#screen-home .home-savings-wide .home-savings-wide-copy > strong {
  display: block;
  margin: 0;
  color: var(--v-tx);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#screen-home .home-metric-card.home-savings-wide #homeSavingsMetric,
#screen-home .home-metric-card.home-savings-wide.has-savings #homeSavingsMetric,
#screen-home .home-metric-card.home-savings-wide.locked #homeSavingsMetric {
  color: var(--v-tx);
  background: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-text-fill-color: currentColor;
}

#screen-home .home-metric-card.home-savings-wide[data-mode="invite"] #homeSavingsMetric,
#screen-home .home-metric-card.home-savings-wide[data-mode="empty"] #homeSavingsMetric,
#screen-home .home-metric-card.home-savings-wide[data-mode="loading"] #homeSavingsMetric,
#screen-home .home-metric-card.home-savings-wide[data-mode="error"] #homeSavingsMetric {
  white-space: normal;
}

/* While a paid account's savings load: a quiet "Loading savings…" with a soft pulse, not "Ready to save". */
#screen-home .home-metric-card.home-savings-wide[data-mode="loading"] #homeSavingsMetric {
  color: var(--v-tx2);
  -webkit-text-fill-color: currentColor;
  animation: today-savings-pulse 1.4s ease-in-out infinite;
}

@keyframes today-savings-pulse {
  50% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  #screen-home .home-metric-card.home-savings-wide[data-mode="loading"] #homeSavingsMetric {
    animation: none;
  }
}

#screen-home .home-savings-wide[data-mode="saved"] .home-savings-wide-copy > strong::after {
  content: " saved";
}

#screen-home .home-savings-wide .today-savings-line {
  margin: 0;
  color: var(--v-tx2);
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

#screen-home .today-savings-line:empty {
  display: none;
}

#screen-home .home-savings-wide .today-savings-chev {
  align-self: center;
}

/* ---------- Storm Watch strip (styles-vivid.css sets the storm look) ---------- */
#screen-home .storm-watch-banner:not(.hidden) {
  min-height: 64px;
  margin: 0 0 var(--v-gap);
}

/* Tile heads: the label wraps before it can reach the icon. */
#screen-home .today-tile-head {
  align-items: flex-start;
  gap: 8px;
}

#screen-home .today-tile-head > .v-lbl {
  flex: 1;
  min-width: 0;
  overflow-wrap: normal;
}

/* Another car's page is as tall as the hero beside it; its content sits in the middle. */
#screen-home .today-pager.is-pager .today-mini {
  justify-content: center;
}

/* ---------- Tonight's plan, opened from the hero's Autopilot line ---------- */
#screen-home .today-plan-chev {
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: 2px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

#screen-home .today-hero-plan[data-opens="plan"] .today-plan-chev {
  transform: rotate(-90deg);
}

#screen-home .today-hero-plan[aria-expanded="true"] .today-plan-chev {
  transform: rotate(180deg);
}

#screen-home[data-plan-open="true"] .autopilot-card:not(.hidden) {
  display: grid;
  gap: 10px;
  margin: 0 0 var(--v-gap);
  padding: 16px !important;
  border: 1px solid rgba(125, 184, 255, 0.24) !important;
  border-radius: var(--v-r-card) !important;
  background: linear-gradient(160deg, rgba(61, 139, 255, 0.14), rgba(61, 139, 255, 0.02) 60%), var(--v-card) !important;
}

/* Opened from the hero, the card skips what the hero already says (the hours, the cost, the ready-by time) and keeps
   the switch, Sun first, how it's going, and the road trip boost. */
#screen-home[data-plan-open="true"] .autopilot-card .autopilot-details-toggle,
#screen-home[data-plan-open="true"] .autopilot-card .autopilot-plan:not(.sun-first) .autopilot-timeline,
#screen-home[data-plan-open="true"] .autopilot-card .autopilot-plan:not(.sun-first) .autopilot-facts {
  display: none !important;
}

#screen-home[data-plan-open="true"] .autopilot-card .autopilot-plan:not(.hidden) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

#screen-home[data-plan-open="true"] .autopilot-card .autopilot-status {
  margin: 0;
  color: var(--v-tx2);
  font-size: 14px;
}

#screen-home[data-plan-open="true"] .autopilot-card .autopilot-trip:not(.hidden) {
  width: 100%;
  min-height: 46px;
  margin: 2px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--v-line-strong);
  border-radius: 999px;
  color: var(--v-tx);
  background: var(--v-card2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

/* At 320-359px "Road trip? Charge to 100%" (and "100% by 11 PM · Cancel") stays on one line: a little less padding
   and type, and the button never shrinks below its label. */
@media (max-width: 359px) {
  #screen-home[data-plan-open="true"] .autopilot-card .autopilot-trip:not(.hidden) {
    padding: 8px 10px;
    font-size: 14px;
    letter-spacing: -0.005em;
  }
}

#screen-home[data-plan-open="true"] .autopilot-card #autopilotPreviewNote:not(.hidden) {
  margin: 0;
  color: var(--v-tx3);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* Short centred and two-line copy wraps evenly instead of leaving one word on the last line. */
#screen-home .today-connect-foot,
#screen-home .today-connect-copy,
#screen-home .simplified-home-hero .hero-plan-copy,
#screen-home .today-savings-line {
  text-wrap: balance;
}

/* The strip's pairs are spans, so legacy ".home-metric-card span" label styles (uppercase, small) are undone here. */
#screen-home .home-savings-wide .today-savings-line .nw {
  display: inline;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  white-space: nowrap;
}

/* Autopilot's switch is the same mint on Today as on Plan and Me. */
#screen-home .autopilot-card .autopilot-switch input:checked {
  background: var(--v-mint2);
  box-shadow: none;
}

/* A payment that didn't go through: the strip turns amber and opens Plans & billing. */
#screen-home .home-metric-card.home-savings-wide[data-mode="attention"] {
  border-color: rgba(255, 181, 71, 0.45);
}

#screen-home .home-metric-card.home-savings-wide[data-mode="attention"] #homeSavingsMetric {
  color: var(--v-sun);
  -webkit-text-fill-color: currentColor;
  white-space: normal;
}

#screen-home .home-savings-wide[data-mode="attention"] .today-savings-ico {
  color: var(--v-sun);
  background: rgba(255, 181, 71, 0.14);
}
