/* ===================================================================
   Svitgrid homepage layer — white redesign (2026-08).

   Replaces the 2026-06 dark override. Loaded AFTER main.css on /,
   /uk/, /pricing/ and /uk/pricing/, and scoped to components that
   exist on no other page: the live stat strip, the inverter table,
   the pricing matrix, and the embedded solar map. The two pricing
   pages share .pincl/.ptable rather than duplicating them, which is
   why the detail page loads this file at all.

   Three rules this file exists to keep:
     - flat fills only, no gradient and no glow;
     - a border must separate things that would otherwise be confused,
       otherwise use a hairline rule or nothing;
     - amber carries fills and rules; text amber is --color-primary-text.
   =================================================================== */

/* Visually hidden — screen-reader text for the matrix's tick cells. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Hero: live stat strip ------------------------------------------
   Was three rounded cards. Three numbers do not need three boxes, so
   this is one row between two hairlines, flush left, with the unit
   riding on the number (see js/stat-format.js). */
.hero-live-stats {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  margin: var(--space-2xl) 0 0;
  padding: 0;
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

/* `1 1 0` so the three cells split the row evenly and a long value cannot
   push its neighbour onto a second line — `auto` basis did exactly that and
   dropped "206.6 MWh" to a row of its own. */
.hero-live-stats li {
  flex: 1 1 0;
  min-width: 0;
  padding: var(--space-md);
  border-right: 1px solid var(--color-gray-200);
}

.hero-live-stats li:last-child { border-right: 0; }

.hero-live-stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-gray-900);
  font-variant-numeric: tabular-nums;
  /* The unit is part of the value (js/stat-format.js appends it), so it must
     never be left on a line of its own — "206.6" over "MWh" reads as two
     facts. The cell is free to grow instead; the row already wraps. */
  white-space: nowrap;
}

.hero-live-stats span {
  display: block;
  margin-top: 5px;
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

@media (min-width: 768px) {
  .hero-live-stats li:first-child { padding-left: 0; }
}

/* Below this the three values genuinely cannot share a line in mono, so let
   the row break by CELL — never mid-value. */
@media (max-width: 620px) {
  .hero-live-stats { flex-wrap: wrap; }
  .hero-live-stats li { flex: 1 1 140px; }
}

/* --- Supported inverters: a table, because it is reference data -----
   Was four cards with ghost initials behind centred copy, which forced
   every spec string to rag into five short lines. */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.inv-table th,
.inv-table td {
  padding: 13px 18px 13px 0;
  border-bottom: 1px solid var(--color-gray-200);
  vertical-align: top;
}

.inv-table thead th {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-gray-900);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.inv-table tbody th {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-gray-900);
  white-space: nowrap;
}

.inv-table td { color: var(--color-gray-700); }
.inv-table em { font-style: normal; color: var(--color-gray-500); }

.inv-table .n {
  text-align: right;
  padding-right: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--color-gray-900);
}

.inv-table__soon th,
.inv-table__soon td {
  border-bottom: 0;
  padding-top: 15px;
  color: var(--color-gray-500);
  font-weight: 600;
}

/* --- Pricing: a matrix, so the upgrade path reads across ------------
   Was four cards; four columns of prose put every feature on two lines
   and still could not answer what one step up buys you. */
.pricing { padding: var(--space-4xl) 0; }

.ptable-scroll { overflow-x: auto; }

/* --- What every plan includes -------------------------------------
   Eight features are ungated, so they were eight rows of four identical
   ticks — the table's whole top half said nothing and made the cheapest
   plan read as empty. Stated once, above the table, they read as the
   product; the table below is then only the upgrade path. */
.pincl {
  margin-bottom: var(--space-xl);
  padding: 18px 20px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
}

.pincl__title {
  margin: 0 0 12px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.pincl__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--color-gray-700);
}

.pincl__list li { position: relative; padding-left: 18px; }

/* Same 9px square the table uses for "included", so one visual language
   says "you get this" in both places. */
.pincl__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--color-primary-text);
}

@media (max-width: 600px) {
  .pincl__list { grid-template-columns: 1fr; }
}

.ptable {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.ptable__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.ptable th,
.ptable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-gray-200);
  text-align: center;
  color: var(--color-gray-700);
}

.ptable tbody th,
.ptable thead td {
  text-align: left;
  padding-left: 0;
  width: 34%;
  font-weight: 400;
}

.ptable thead th {
  border-bottom: 2px solid var(--color-gray-900);
  vertical-align: bottom;
  padding-bottom: 14px;
}

/* "Most popular" is a rule on the column, not a halo and not a pill. */
.ptable thead th.ptable__pop { border-bottom-color: var(--color-primary); border-bottom-width: 4px; }
.ptable thead th.ptable__pop .ptable__tier { color: var(--color-primary-text); }

.ptable__tier {
  display: block;
  margin-bottom: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.ptable__amt {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-gray-900);
  font-variant-numeric: tabular-nums;
}

.ptable__amt i {
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--color-gray-500);
}

.ptable__yr {
  display: block;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-gray-500);
}

.ptable__grp th {
  border-bottom: 0;
  padding: 22px 0 6px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.ptable td.on::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--color-primary-text);
}

.ptable td.off::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 1px;
  background: var(--color-gray-300);
  vertical-align: middle;
}

.ptable td.txt {
  font-weight: 600;
  color: var(--color-gray-900);
  font-variant-numeric: tabular-nums;
}

.pricing__lede {
  margin: var(--space-lg) 0 0;
  max-width: 62ch;
  font-size: 0.8125rem;
  color: var(--color-gray-700);
}

.pricing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-lg);
}

/* Mono has no narrow forms, so a two-word label wraps early in a flex row. */
.pricing__actions .btn {
  font-size: 0.8125rem;
  padding: 14px 24px;
  white-space: nowrap;
}

.pricing__note {
  max-width: 74ch;
  margin: var(--space-xl) 0 0;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--color-gray-500);
}

/* --- Gateway + setup cards: the dark-theme glow and tints removed --- */
.gateway__photo { display: inline-block; padding: var(--space-lg) var(--space-md); }

.gateway__photo .gateway__image {
  max-width: min(100%, 400px);
  border-radius: 0;
}

.gateway__price-hint {
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.setup-card__best-for {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--color-gray-700);
  font-size: 0.8125rem;
}

.setup-card--recommended .setup-card__best-for {
  background: #FEF6E7;
  border-color: #F3DCA8;
}

.setup-card__best-for strong { color: var(--color-gray-900); }

.setup-card__subtitle,
.setup-card__sub { color: var(--color-gray-500); }

/* --- Solar map: the ping ring is built in JS, so it must stay ------- */
.smap-beacon { background: transparent; border: 0; }

.smap-beacon i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(180, 83, 9, 0.55);
  box-sizing: border-box;
  opacity: 0;
  animation: smap-ping 2.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes smap-ping {
  0%   { transform: scale(0.35); opacity: 0.9; }
  70%  { transform: scale(1);    opacity: 0; }
  100% { transform: scale(1);    opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .smap-beacon i { animation: none; opacity: 0.5; }
}

/* --- Hero capability slider --------------------------------------------
   Replaces the single looping clip. Slides are display-swapped rather than
   translated: only one video is ever in the layout, so nothing off-screen is
   decoding, and js/phone-slider.js only attaches a source once its slide
   becomes active. */
.phone-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* A track, not a stack. Slides sit in a row and the row is translated, so a
   drag can follow the finger and a change can be animated — the display-swap
   this replaced could only cut. The frame clips it. */
.phone-slider__frame {
  overflow: hidden;
  width: 100%;
  /* horizontal gestures are the slider's, vertical ones stay the page's */
  touch-action: pan-y;
}

.phone-slider__slides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.phone-slider__slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-lg);
  /* 320px of phone at the clips' own 540x1174 is 696px; a constant height
     stops the hero jumping when a shorter still follows a taller clip. */
  min-height: calc(320px * 1174 / 540);
}

/* The caption travels with its slide rather than being swapped by script:
   the track already moves, so the words move with the thing they describe. */
.phone-slider__cap {
  margin: 0;
  text-align: center;
  max-width: 38ch;
  /* three lines' worth, so a motto that wraps cannot shift the dots */
  min-height: 4.2em;
}

.phone-slider__cap b {
  display: block;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-gray-900);
}

.phone-slider__cap span {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-gray-700);
}

.phone-slider__slide > * { line-height: 0; }

/* 320, not 360: every 10px of phone width costs 22px of hero height, and the
   column beside it has only ~470px to fill. */
.phone-slider__slide .hero__phone-img {
  width: 320px;
  max-width: 100%;
  /* the browser's own image drag would eat the swipe */
  -webkit-user-drag: none;
  user-select: none;
}

@media (max-width: 767px) {
  .phone-slider__slide { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-slider__slides { transition: none; }
}

}


/* Dots. The label each one carries is for screen readers only — sighted
   readers get position, not a menu. */
.phone-slider__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.phone-slider__dot {
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 6px;          /* a 24px-tall hit area around an 8px dot */
  line-height: 0;
  cursor: pointer;
}

.phone-slider__dot::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gray-300);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.phone-slider__dot:hover::before { background: var(--color-gray-500); }

.phone-slider__dot.is-active::before {
  background: var(--color-primary);
  transform: scale(1.25);
}

.phone-slider__dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .phone-slider__dot::before { transition: none; }
}

/* --- Scheduling band ---------------------------------------------------
   A landscape iPad capture. It sits here rather than in the hero slider
   because the hero's column is 360px of portrait phone, and this clip's
   content — a centred sheet inside a mostly-empty tablet screen — is
   illegible at that size. Full container width, no frame. */
.sched {
  padding: var(--space-4xl) 0;
  border-top: 1px solid var(--color-gray-200);
}

.sched__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-gray-900);
  margin: 0;
}

.sched__desc {
  margin: var(--space-sm) 0 0;
  max-width: 62ch;
  color: var(--color-gray-700);
}

.sched__figure {
  margin: var(--space-2xl) 0 0;
}

.sched__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

@media (min-width: 480px) {
  .sched__title { font-size: 1.95rem; }
}

/* --- Annotated features -------------------------------------------------
   One screen with the capabilities labelled around it, instead of four
   identical phone-left/text-right rows. The callouts ARE the slider's dots:
   clicking one shows its screen, and the active one lights up — so the
   section is a single diagram that keeps changing rather than four that
   repeat. Four is the ceiling; a fifth pair has nowhere to sit. */
.annot {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.annot__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.annot__stage { width: 100%; }

.annot__item {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: block;
  position: relative;
  transition: opacity 0.3s ease;
}

.annot__eyebrow {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  transition: color 0.3s ease;
}

.annot__title {
  display: block;
  margin-top: 5px;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
}

.annot__body {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-gray-700);
}

.annot__item.is-active .annot__eyebrow { color: var(--color-primary-text); }

.annot__item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

@media (min-width: 1000px) {
  .annot {
    grid-template-columns: 1fr 300px 1fr;
    gap: var(--space-3xl);
  }

  /* The label leans toward the screen it points at; the sentence under it
     stays flush left, because ragged-left body text is slower to read. */
  .annot__col--l .annot__eyebrow,
  .annot__col--l .annot__title { text-align: right; }

  /* A rule from the label to the screen, growing and turning amber when its
     slide is the one showing. */
  .annot__item::after {
    content: "";
    position: absolute;
    top: 6px;
    width: 22px;
    height: 1px;
    background: var(--color-gray-300);
    transition: width 0.3s ease, background-color 0.3s ease;
  }

  .annot__col--l .annot__item { padding-right: 34px; }
  .annot__col--l .annot__item::after { right: 0; }
  .annot__col--r .annot__item { padding-left: 34px; }
  .annot__col--r .annot__item::after { left: 0; }

  .annot__item.is-active::after {
    width: 30px;
    background: var(--color-primary);
  }
}

@media (prefers-reduced-motion: reduce) {
  .annot__item, .annot__item::after, .annot__eyebrow { transition: none; }
}

/* ===================================================================
   Full-features page (/pricing/, /uk/pricing/)

   Everything above is shared with the homepage matrix. What follows
   exists only on the detail page: the link that leads to it, the
   keeps/stops pair that describes the free hardware floor, and the
   plain prose blocks between tables.
   =================================================================== */

/* The route from the homepage matrix to the full table. A link, not a
   button: the buttons directly below it are "get the app" and
   "contact us", and a third one of equal weight would compete with
   both. */
.pricing__more {
  margin: var(--space-lg) 0 0;
  text-align: center;
  font-size: 0.8125rem;
}

.pricing__more a {
  color: var(--color-primary-text);
  border-bottom: 1px solid var(--color-gray-300);
  padding-bottom: 2px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.pricing__more a:hover { border-bottom-color: var(--color-primary); }

/* On the detail page the lede introduces the table directly, so it needs the
   gap the homepage's .pincl block used to provide. */
.pricing__lede + .ptable-scroll { margin-top: var(--space-xl); }

/* A titled prose block between tables. Same border and ground as
   .pincl so the page reads as one system, but it holds sentences
   rather than a feature grid. */
.pblock {
  margin: var(--space-3xl) 0 var(--space-xl);
  padding: 20px 22px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
}

.pblock__title {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
}

.pblock p {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--color-gray-700);
}

.pblock p:last-child { margin-bottom: 0; }

/* Keeps on the left, stops on the right. Two lists rather than one
   annotated list, because the question a lapsed customer is actually
   asking is "does my hardware still work", and the answer has to be
   readable without parsing per-row markers. */
.pfloor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-2xl);
  margin-top: 16px;
}

.pfloor__title {
  margin: 0 0 10px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.pfloor__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-gray-700);
}

.pfloor__list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
}

.pfloor__list li:last-child { margin-bottom: 0; }

/* The same 9px square and 9x1 dash the matrix uses for included and
   not-included, so "kept" and "stopped" carry the meaning they
   already carry two tables higher up the page. */
.pfloor__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
}

.pfloor__list--keep li::before {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--color-primary-text);
}

.pfloor__list--stop li::before {
  width: 9px;
  height: 1px;
  background: var(--color-gray-300);
  top: 0.75em;
}

@media (max-width: 600px) {
  .pfloor { grid-template-columns: 1fr; }
}

/* ===================================
   Installers (#installers)
   Pitch on the left, enquiry form on the right. The inputs reuse
   .reserve__field from the Gateway order form so both forms on the site
   look like one system; the form element itself is .partner__form, which
   js/partner-form.js wires (NOT .reserve__form — that handler redirects to
   the order-confirmed page).
   =================================== */

.installers {
  padding: var(--space-4xl) 0;
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-gray-200);
}

.installers .feature-row__label { color: var(--color-primary-text); }

.installers__grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 900px) {
  .installers__grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-3xl); }
}

.installers__lede {
  color: var(--color-gray-700);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.installers__offers {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
  display: grid;
  gap: var(--space-lg);
}

.installers__offer-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 4px;
}

.installers__offer p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-gray-600);
}

.installers__offer {
  padding-left: var(--space-lg);
  border-left: 2px solid var(--color-primary);
}

.installers__note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-gray-500);
  margin: 0;
}

.partner__card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.partner__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 4px;
}

.partner__sub {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin: 0 0 var(--space-lg);
}

.partner__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Inputs are width:auto by default and would sit at their intrinsic size
   inside the column; the order form never noticed because its modal is
   narrow. */
.partner__form .reserve__field input,
.partner__form .reserve__field textarea { width: 100%; min-width: 0; }

.partner__row {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 520px) {
  .partner__row { grid-template-columns: 1fr 1fr; }
}

.partner__form .btn { align-self: flex-start; }

.partner__status {
  font-size: 0.875rem;
  margin: 0;
  min-height: 1.5em;
}

.partner__status[data-state="idle"] { color: transparent; }
.partner__status[data-state="sending"] { color: var(--color-gray-600); }
.partner__status[data-state="sent"] { color: #15803d; }
.partner__status[data-state="error"] { color: #b91c1c; }

.partner__alt {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin: var(--space-md) 0 0;
}

.installers__pitch .section-header__title { margin-bottom: var(--space-md); }

/* Same treatment as .pricing__more: ink text with an amber underline,
   not the browser's default blue. */
.installers__note a,
.partner__alt a {
  color: var(--color-gray-900);
  text-decoration: none;
  border-bottom: 1px solid var(--color-gray-300);
}

.installers__note a:hover,
.partner__alt a:hover { border-bottom-color: var(--color-primary); }
