/* ---------------------------------------------------------------------------
   Catalog-only styles for the public web store.

   Reads the tokens and primitives of pages/site.css (the palette, the type
   scale, .panel / .bg-brand-gradient / .rings, .btn, .pill, the phone frames)
   and redefines none of them, so site.css's dark-scheme overrides reach these
   rules on their own. Where a rule here does name a colour, it sits on a
   surface that is the same in both schemes: the blue panels (white text), or
   the photo plate, which stays light in dark mode too (D364).

   Kept as a separate static file rather than appended to site.css: the legal
   pages never load it, and WhiteNoise serves it hashed and compressed in prod.
   Self-hosted, no imports, no third-party requests.

   Everything here works with JavaScript off: the gallery is a CSS scroll-snap
   strip, the filters and the picker are links, the plan switcher is a `:checked`
   rule, the search box is a GET form. The few rules scoped under `.gal-live` /
   `.chips-live` / `.calc-live` / `.is-swapping` style controls catalog.js adds
   on top of that — never anything the page needs in order to function. Each of
   those blocks is marked "catalog.js only"; the test that a control is a real
   link is in pages.tests.ProgressiveEnhancementTests, not here.
   --------------------------------------------------------------------------- */

/* Lucide glyphs (ISC, templates/pages/icons/LICENSE.txt) for the places a
   template can't include an SVG: the buttons catalog.js creates, a <summary>
   whose text the tests pin, and a <select>, which has no children to draw in.
   As masks they take `currentColor`; the select's is white, because it only
   ever sits on the blue panel. */
:root {
  --i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  --i-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --i-chevron-down-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- breadcrumbs */

/* Shared by the browse hero (white on blue) and the product page (on the
   page). Each link gets a 44px-tall hit area through ::after; the row itself
   stays a slim line of text. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.375rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}
.crumbs a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: color 0.2s;
}
.crumbs a::after {
  content: "";
  position: absolute;
  inset: -0.75rem -0.1875rem;
}
.crumbs a:hover {
  color: var(--accent);
}
.crumbs [aria-current] {
  color: var(--ink);
  font-weight: 500;
}
.crumb-sep {
  display: inline-flex;
  color: var(--ink-muted);
}
.crumb-sep .icon {
  width: 0.875rem;
  height: 0.875rem;
}
/* On the blue hero the crumbs sit in the gradient's lit top-left corner, so
   they stay near-white to keep their contrast; the current page is set apart
   by weight instead of by a dimmer colour. */
.on-dark .crumbs,
.on-dark .crumbs a {
  color: rgb(255 255 255 / 0.92);
}
.on-dark .crumbs a:hover,
.on-dark .crumbs [aria-current] {
  color: #fff;
}
.on-dark .crumbs [aria-current] {
  font-weight: 600;
}
.on-dark .crumb-sep {
  color: rgb(255 255 255 / 0.6);
}

/* ------------------------------------------------------------ browse hero */

/* Short on purpose (D365): breadcrumbs, the h1 and the search field, and no
   more. On a 390px phone it stays under ~240px, so the chip rows and the first
   row of cards are on the first screen. */
.bhero {
  padding: var(--inset) var(--inset) 0;
}
.bhero-in {
  padding-block: 1.75rem;
}
@media (min-width: 768px) {
  .bhero-in { padding-block: 3rem 3.25rem; }
}
@media (min-width: 1024px) {
  .bhero-in { padding-block: 3.5rem 3.75rem; }
}
.bhero .rings {
  top: 50%;
  right: -21rem;
  width: 38rem;
  transform: translateY(-50%);
}
@media (min-width: 768px) {
  .bhero .rings { right: -14rem; width: 52rem; }
}
@media (min-width: 1024px) {
  .bhero .rings { right: -6rem; width: 60rem; }
}
.bhero .crumbs {
  margin-bottom: 0.875rem;
}
.ctitle {
  max-width: 22ch;
  margin: 0;
}
/* A category's price line (D377): body text under the h1, a step back from
   the white heading like the hero's other secondary text. */
.cintro {
  max-width: 40rem;
  margin: 0.5rem 0 0;
  color: rgb(255 255 255 / 0.9);
}

/* The search form drawn as one white pill: the icon, the field and the submit
   button inside it. White in both schemes, like every control on the blue
   panel, so its colours are literal. The focus ring goes round the whole pill
   (white, over the blue) while the field is focused; the field's own outline
   only gives way where :has() exists to draw that ring. */
.csearch {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 40rem;
  height: 3.5rem;
  margin: 1.25rem 0 0;
  padding: 0.375rem 0.375rem 0.375rem 1.125rem;
  border-radius: 9999px;
  background: #fff;
  color: #0a1330;
  box-shadow: 0 18px 40px -18px rgb(4 23 63 / 0.6);
}
@media (min-width: 768px) {
  .csearch { height: 3.75rem; margin-top: 1.75rem; padding-left: 1.375rem; }
}
.csearch > .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #4a587c;
}
.csearch input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 1rem/1.2 var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.csearch input::placeholder {
  color: #5d6a8c;
  opacity: 1;
}
.csearch:has(input:focus-visible) {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
@supports selector(:has(*)) {
  .csearch input:focus-visible { outline: none; }
}
.csearch .btn {
  height: 100%;
  padding: 0 1.25rem;
  box-shadow: none;
}
@media (min-width: 768px) {
  .csearch .btn { padding: 0 1.75rem; }
}
/* Below ~380px the placeholder would be cut short; the icon only decorates
   (the button says what the form does), so it gives up its room first. The
   field's text stays 16px: smaller, and iOS zooms the page on focus. */
@media (max-width: 379px) {
  .csearch { gap: 0.375rem; padding-left: 0.875rem; }
  .csearch > .icon { display: none; }
  .csearch .btn { padding: 0 0.75rem; }
}
/* .on-dark turns focus rings white, which would vanish on the white pill. */
.csearch .btn:focus-visible {
  outline-color: var(--brand);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ chips */

.cbody {
  padding-top: 1.25rem;
  padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem);
}
@media (min-width: 768px) {
  .cbody { padding-top: 1.75rem; }
}

/* Exists only to position the arrows catalog.js adds, for the same reason as
   `.gal-frame`: the row itself is the scroll container. */
.chiprow {
  position: relative;
}
/* Pills that scroll sideways rather than wrap. The padding leaves room for a
   chip's focus ring inside the scroll box (which clips), the negative margin
   puts the chips back on the column's edge. On a phone the strip runs out to
   the screen edge instead, so a chip scrolls under the edge rather than being
   cut off 20px short of it. */
.chips {
  display: flex;
  gap: 0.5rem;
  margin: 0 -0.375rem;
  padding: 0.375rem;
  overflow-x: auto;
  scrollbar-width: thin;
  /* A chip scrolled to by Tab lands clear of the edge (and of the fade). */
  scroll-padding-inline: 1.5rem;
}
@media (max-width: 639px) {
  .chips {
    margin-inline: calc(-1 * clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem));
    padding-inline: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  }
}
.chiprow + .chiprow {
  margin-top: 0.125rem;
}
/* One chip for the browse filters and the product picker alike. Selected is a
   brand fill with white text, in both schemes (5.9:1). */
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip:not(.on):hover {
  background: var(--tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line));
  text-decoration: none;
}
.chip.on {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

/* --- catalog.js only: the scrollbar goes and the arrows + edge fades replace
   it. Deliberately *not* unconditional, unlike the gallery's: the gallery has a
   thumbnail row that navigates it with no script at all, and a chip row has no
   such second control — so with the script blocked the scrollbar stays, ugly
   and working, rather than leaving a mouse no way to reach the last category. */
.chips-live {
  scrollbar-width: none;
  --fade-s: 0px;
  --fade-e: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-s),
    #000 calc(100% - var(--fade-e)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-s),
    #000 calc(100% - var(--fade-e)), transparent 100%);
}
.chips-live::-webkit-scrollbar {
  display: none;
}
/* Set only while there is something to scroll to on that side, so a row that
   fits is not faded at either end. */
.chips-live.more-s { --fade-s: 3rem; }
.chips-live.more-e { --fade-e: 3rem; }
/* `.chip-nav` itself is styled with the gallery's arrows, below — it shares
   their base rule, which would otherwise re-set any size given up here. */

/* ------------------------------------------------------------ grid, card */

/* Two columns on a phone (D365: the old 170px minimum track left a 390px phone
   with one), then as many 13.5rem tracks as fit. */
.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}
@media (min-width: 640px) {
  .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
  }
}
.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.5rem;
  border-radius: var(--r-tile);
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  text-decoration: none;
}
.pcard:hover {
  text-decoration: none;
}
/* The photo plate: light in both schemes, and the photo multiplied onto it so
   the white it was shot on becomes the plate (D364). */
.pcard-img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1.125rem;
  background: var(--plate);
}
.pcard-img img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 9%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
/* No photo: the bare plate and a faint picture icon, centred, so it reads as
   a deliberate "no photo yet" rather than a broken image. */
.pcard-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #0a1330;
}
.pcard-ph .icon {
  width: 28%;
  height: 28%;
  stroke-width: 1.25;
  opacity: 0.16;
}
/* On the plate, so literal: the brand pill reads on it in both schemes. */
.pcard-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 9999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}
.pcard-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem 0.5rem 0.375rem;
}
.pcard-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.pcard-attrs {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}
/* Pushed to the card's foot, so the prices in a row line up whatever the
   names and specs above them run to. */
.pcard-price {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pcard-options {
  color: var(--ink-soft);
  font-size: 0.75rem;
}
@media (max-width: 419px) {
  .pcard-body { padding-inline: 0.375rem; }
  .pcard-name { font-size: 0.875rem; }
  .pcard-attrs { font-size: 0.75rem; }
  .pcard-price { font-size: 1.0625rem; }
}

/* ------------------------------------------------------- empty, pager */

.cempty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 34rem;
  margin: 1.5rem auto 0;
  padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) 1.5rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  text-align: center;
}
.cempty-icon {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  background: var(--tint-strong);
  color: var(--accent);
}
.cempty-icon .icon {
  width: 1.75rem;
  height: 1.75rem;
  stroke-width: 1.8;
}
.cempty p {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* The label centred between two pills; on a phone the pills shrink to arrow
   circles (their text stays for screen readers) so the row fits at 360px. */
.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0;
}
.pager > :first-child { justify-self: start; }
.pager > :last-child { justify-self: end; }
.pager-label {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
@media (max-width: 479px) {
  .pager .btn {
    width: 3rem;
    padding: 0;
  }
  .pager .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ------------------------------------------------------------ app promo */

/* After the grid and the pager, page 1 only (D365). The app's own screens rise
   out of the panel's lower edge, which clips them: on a phone below the text,
   on a wide screen beside it. The phone frames are site.css's (/app/'s hero). */
.promo {
  padding: 0 var(--inset);
}
.promo .rings {
  top: 85%;
  left: 50%;
  width: 52rem;
  transform: translate(-50%, -50%);
}
.promo-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: clamp(2.75rem, 2rem + 3vw, 4rem);
}
.promo-title {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.034em;
}
.promo .lead {
  max-width: 34rem;
  margin: 1.25rem 0 0;
}
.promo .hero-actions {
  margin-top: 2rem;
}
.promo .phones {
  max-width: 19rem;
}
.promo .phones-stage {
  aspect-ratio: 10 / 11;
  margin-bottom: -38%;
}
@media (min-width: 640px) {
  .promo .phones { max-width: 23rem; }
}
@media (min-width: 768px) {
  .promo .rings { top: 50%; left: 78%; width: 60rem; }
  .promo-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 2rem;
    padding-top: 0;
  }
  .promo-text { padding-block: clamp(3.5rem, 2rem + 3vw, 5rem); }
  .promo .phones {
    align-self: end;
    max-width: 25rem;
    margin-top: 3rem;
  }
  .promo .phones-stage { margin-bottom: -34%; }
}

/* ---------------------------------------------------------------- about */

.cabout {
  padding: var(--inset);
}
.cabout .rings {
  top: 50%;
  right: -32rem;
  width: 50rem;
  transform: translateY(-50%);
}
.cabout-in {
  display: grid;
  gap: 1rem;
  padding-block: clamp(2.5rem, 1.75rem + 3vw, 4.5rem);
}
@media (min-width: 1024px) {
  .cabout .rings { right: -18rem; }
  .cabout-in {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
  }
}
.cabout h2 {
  margin: 0;
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.cabout p {
  max-width: 42rem;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* --------------------------------------------------------- product page */

.pwrap {
  padding-top: 1.25rem;
  padding-bottom: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}
@media (min-width: 768px) {
  .pwrap { padding-top: 1.75rem; }
}

/* The media column runs a little wider than the info column, but its height is
   capped (the strip, below), so it can no longer push the price and the picker
   below the fold the way the old proportional square did: at 1.05fr of a
   1040px page that gallery grew to ~500px tall (D164). The app frames its
   gallery as a 230px card for the same reason (the offer is the hero, not the
   photo). On a wide screen the media column also stays in view under the
   header while the info column scrolls. */
.pdetail {
  display: grid;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1.25rem;
}
@media (min-width: 900px) {
  .pdetail {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 0.5rem + 3vw, 4rem);
    margin-top: 1.75rem;
  }
  .pdetail-media {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}
/* Both columns need `min-width: 0`, and the media one is the load-bearing case:
   a grid item's automatic minimum size is its min-content width, and the
   gallery's is the widest photo, so on a phone (where the grid collapses to one
   column) the media column blew out to ~1650px and took the whole page sideways
   with it. The scroll strip's own `overflow-x` does not save it — the overflow
   is the *item*, one level up. */
.pdetail-info,
.pdetail-media {
  min-width: 0;
}

/* gallery — scroll-snap strip, thumbnails are same-page anchors */
.gal {
  min-width: 0;
}
/* Exists only so the arrows can be positioned over the strip: the strip itself
   is the scroll container, so an absolutely-positioned child would scroll away
   with the photos. */
.gal-frame {
  position: relative;
}
/* The plate is on the *slide*, not on the strip: with one background behind
   all of them the photos read as one long canvas that happens to scroll, rather
   than as separate pictures (owner, 2026-08-08).

   Both scrollbars go with it, and the vertical one is not cosmetic — where the
   platform draws classic (non-overlay) bars, the horizontal one eats ~15px of
   the box, the full-height slide then overflows what is left, and the strip
   grows a *second*, vertical scrollbar. The thumbnails below are the
   script-free way to navigate, so nothing is lost by hiding them. */
.gal-strip {
  display: flex;
  gap: 0.75rem;
  height: 20rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--r-card);
}
@media (min-width: 640px) {
  .gal-strip { height: 24rem; }
}
@media (min-width: 900px) {
  .gal-strip { height: 28.75rem; }
}
.gal-strip::-webkit-scrollbar {
  display: none;
}
/* A block, not a centring grid: in a grid's auto-sized row the photo's
   `height: 100%` has nothing definite to resolve against, falls back to auto,
   and a square photo then overflows a wide slide and is cut top and bottom.
   object-fit centres it instead. */
.gal-slide {
  flex: 0 0 100%;
  display: block;
  height: 100%;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: center;
  border-radius: var(--r-card);
  background: var(--plate);
}
/* The padding is inside the box (the global border-box), so it is the app's
   `EdgeInsets.all(md)` around a `BoxFit.contain` photo. In rem, not %: a
   percentage padding follows the width, and a wide slide would squeeze a tall
   photo from above and below. */
.gal-slide img {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  object-fit: contain;
  mix-blend-mode: multiply;
}
.gal-slide.pcard-ph {
  display: grid;
}
.gal-slide.pcard-ph .icon {
  width: 4.5rem;
  height: 4.5rem;
}
/* The padding gives the selected ring and the focus ring room inside the row,
   which clips; the negative margin keeps the tiles on the column's edge. */
.gal-thumbs {
  display: flex;
  gap: 0.5rem;
  margin: 0.375rem -0.375rem 0;
  padding: 0.375rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.gal-thumb {
  flex: none;
  display: block;
  width: 4rem;
  height: 4rem;
  overflow: hidden;
  border-radius: 0.875rem;
  background: var(--plate);
  transition: box-shadow 0.2s;
}
.gal-thumb:focus-visible {
  outline-offset: 2px;
}
.gal-thumb:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.gal-thumb.on {
  box-shadow: 0 0 0 2px var(--accent);
}
.gal-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* --- catalog.js only: the arrows, the zoom cursor and the lightbox. Scoped
   under .gal-live so nothing here can imply an affordance the page does not
   actually have when the script is blocked. */
.gal-live .gal-slide img {
  cursor: zoom-in;
}
/* The active thumbnail is scrolled into view by the script, so this row loses
   its scrollbar too — but only once that is true. */
.gal-live .gal-thumbs {
  scrollbar-width: none;
}
.gal-live .gal-thumbs::-webkit-scrollbar {
  display: none;
}
/* The round buttons catalog.js creates (empty <button>s: the glyph is the
   ::before mask). */
.gal-nav,
.lb-nav,
.lb-close,
.chip-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}
.gal-nav::before,
.lb-nav::before,
.lb-close::before,
.chip-nav::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  -webkit-mask: var(--i-chevron) center / contain no-repeat;
  mask: var(--i-chevron) center / contain no-repeat;
}
.gal-nav.prev::before,
.lb-nav.prev::before,
.chip-nav.prev::before {
  transform: scaleX(-1);
}
.lb-close::before {
  -webkit-mask-image: var(--i-x);
  mask-image: var(--i-x);
}
/* Over the plate, which is light in both schemes: a white disc with ink. */
.gal-nav {
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #0a1330;
  box-shadow: 0 1px 2px rgb(10 19 48 / 0.06), 0 8px 20px -6px rgb(4 23 63 / 0.28);
}
.gal-nav.prev { left: 0.875rem; }
.gal-nav.next { right: 0.875rem; }
.gal-nav:hover {
  color: var(--brand);
}
/* The chip row's pair: 36px, smaller than the gallery's and sitting on the
   row's own edge, so it never stands taller than the 40px chips it scrolls.
   Placed here, after the shared base, because the two rules have equal
   specificity and the later one wins. */
.chip-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
}
.chip-nav::before {
  width: 1.125rem;
  height: 1.125rem;
}
.chip-nav.prev { left: -0.25rem; }
.chip-nav.next { right: -0.25rem; }
.chip-nav:hover {
  background: var(--tint);
  color: var(--accent);
}
/* Also how an arrow disappears when there is nothing on that side — including a
   chip row that fits, where both are disabled from the start. */
.gal-nav:disabled,
.chip-nav:disabled {
  opacity: 0;
  pointer-events: none;
}
/* On a touch screen the swipe is the gesture and an arrow just covers the
   product (or two chips); the thumbnails below stay the direct way to jump. */
@media (hover: none) and (pointer: coarse) {
  .gal-nav,
  .chip-nav {
    display: none;
  }
}

/* The lightbox: a blurred night backdrop and glass round buttons. */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
}
.lightbox::backdrop {
  background: rgb(4 10 28 / 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4.5rem 1rem;
  object-fit: contain;
}
.lb-nav,
.lb-close {
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.lb-nav:hover,
.lb-close:hover {
  background: rgb(255 255 255 / 0.25);
}
.lightbox :focus-visible {
  outline-color: #fff;
}
.lb-close { top: 1rem; right: 1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 1rem; }
.lb-nav.next { right: 1rem; }

/* The in-flight state of a <main> swap. The delay is what keeps a fast swap
   from flashing — most land well inside it and are never seen at all. */
.is-swapping {
  cursor: progress;
}
.is-swapping main {
  opacity: 0.55;
  transition: opacity 0.15s ease 0.12s;
}

/* ------------------------------------------------------------- info column */

.ptitle {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
}
.pmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.875rem;
}
.pmeta p {
  margin: 0;
}
.pprice {
  margin: 1.25rem 0 0;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-variant-numeric: tabular-nums;
}
/* The "from $X / month" teaser as a pill; the icon is its sibling (the <p>
   holds the teaser text alone). */
.pmonthly-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding: 0.5rem 1rem 0.5rem 0.875rem;
  border-radius: 9999px;
  background: var(--tint-strong);
  color: var(--accent);
}
.pmonthly-pill .icon {
  width: 1.125rem;
  height: 1.125rem;
}
.pmonthly {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

/* variant picker — the app's labelled chip rows, as links; a hairline sets
   the choice off from the price above it */
.vheading,
.vpick {
  margin: 1.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.vheading {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.vheading + .vpick {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}
.vpick {
  display: grid;
  gap: 1.25rem;
}
.vlabel {
  display: block;
  margin-bottom: 0.625rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.vchips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* "Buy in the app": a compact blue card, the heading and "Learn more" on one
   row, the badges under them. */
.buy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.125rem 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--r-card);
}
@media (min-width: 640px) {
  .buy { padding: 1.75rem; }
}
.buy .rings {
  top: 50%;
  right: -12rem;
  width: 28rem;
  transform: translateY(-50%);
}
.buyheading {
  grid-area: 1 / 1;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.buy-more {
  grid-area: 1 / 2;
}
.buy .store-badges {
  grid-column: 1 / -1;
  margin: 0;
}

/* -------------------------------------------------- full-width sections */

.psec {
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.psec > h2,
.plans > h2 {
  margin: 0 0 1.25rem;
}

/* used units — the app's radio-style _OptionTile: a mark, the price as the
   title, the specs under it, the whole tile tappable. A used-unit list is often
   ten rows long, and each tile is short — one column of full-page-width rows
   left most of the page empty. Fills sideways first, collapsing to a single
   column on a phone. */
.units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.unit-item {
  margin: 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.unit {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  height: 100%;
  padding: 1rem 1.125rem;
  border-radius: 1.25rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  text-decoration: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.unit:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line)),
    var(--shadow-card);
  text-decoration: none;
}
.unit.on {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-card);
}
.unit-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.125rem;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 2px var(--ink-muted);
}
.unit-mark::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background: var(--accent);
  transform: scale(0);
}
.unit.on .unit-mark {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.unit.on .unit-mark::after {
  transform: scale(1);
}
.unit-main {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}
.unit-price {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.unit-attrs {
  font-size: 0.9375rem;
  font-weight: 500;
}
.unit-meta,
.unit-note {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* installment panel — the app's InstallmentCalculator (design handoff, screen
   04) on the brand gradient. The plan switcher is a radio group:
   `:checked + label + .calc-panel` reveals the matching panel, and flexbox
   `order` lifts every label into one row above it, so the whole thing works
   with no JavaScript. catalog.js then swaps the chip row for a `<select>` over
   those same radios (`.calc-live`) — the app's PlanPickerField, which a chip row
   per tariff is not: thirteen of them wrap to two rows and read as filters
   rather than as one choice. Every colour inside is literal: the panel is blue
   in both schemes. */
.plans {
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}
.plans .rings {
  top: -14rem;
  right: -18rem;
  width: 46rem;
}
.calc {
  /* Contains the absolutely-positioned radios below. */
  position: relative;
}
.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Visually hidden but still focusable — `display: none` would take the plan
   chips out of the keyboard's reach entirely. */
.calc-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.calc-chip {
  order: 1;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, color 0.2s;
}
.calc-chip:hover {
  background: rgb(255 255 255 / 0.22);
}
.calc-radio:checked + .calc-chip {
  background: #fff;
  color: var(--brand);
  box-shadow: none;
}
.calc-radio:focus-visible + .calc-chip {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.calc-panel {
  order: 2;
  display: none;
  width: 100%;
  margin-top: 1.25rem;
}
.calc-radio:checked + .calc-chip + .calc-panel {
  display: block;
}

/* --- catalog.js only: the dropdown that replaces the chip row. The field is
   the app's, drawn as glass on the panel (a translucent white fill, white bold
   text, a chevron); the option list is the platform's own and keeps the ambient
   theme, which is exactly what the app does too — its picker sheet is its own
   surface, not part of the blue panel. */
.calc-live .calc-chip {
  display: none;
}
.calc-live .calc-panel {
  margin-top: 1.5rem;
}
.calc-select {
  display: block;
  width: min(100%, 22rem);
  height: 3.25rem;
  margin: 0;
  padding: 0 3rem 0 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 9999px;
  background-color: rgb(255 255 255 / 0.14);
  background-image: var(--i-chevron-down-white);
  background-position: right 1.125rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: #fff;
  font: 600 1rem/1.2 var(--font);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s;
}
.calc-select:hover {
  background-color: rgb(255 255 255 / 0.22);
}
.calc-select:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
/* Windows and Linux draw the option list in the select's own colors, which here
   would be white on a translucent white — so it is given the page's surface. */
.calc-select option {
  color: var(--ink);
  background: var(--surface);
}
.calc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 1.25rem;
}
.calc-monthly {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.calc-monthly.full {
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
}
.calc-total {
  color: rgb(255 255 255 / 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
/* The schedule in a glass sub-panel, in up to three newspaper columns so a
   24-month plan stays a compact block. The hairlines are each row's top
   shadow, and the panel has no top padding and clips: the first row of every
   column loses its line to the clip, so no column opens with a stray rule. */
.calc-sched {
  margin: 0;
  padding: 0 1.25rem;
  overflow: hidden;
  list-style: none;
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  column-gap: 2.5rem;
  column-rule: 1px solid rgb(255 255 255 / 0.12);
}
@media (min-width: 640px) {
  .calc-sched { columns: 2; padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  .calc-sched { columns: 3; }
}
.calc-sched li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0;
  break-inside: avoid;
  box-shadow: 0 -1px 0 rgb(255 255 255 / 0.12);
  font-size: 0.875rem;
}
/* Wide enough for a two-digit instalment: the whole schedule is printed, so a
   12-month plan ends on "12" and a 16px column clipped it. */
.calc-sched .n {
  flex: 0 0 auto;
  width: 1.5rem;
  color: rgb(255 255 255 / 0.65);
  font-variant-numeric: tabular-nums;
}
.calc-sched .d {
  flex: 1 1 auto;
  font-weight: 500;
}
.calc-sched .a {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.calc-note {
  margin: 1.25rem 0 0;
  color: rgb(255 255 255 / 0.9);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* the full configuration list, collapsed under the picker: the <summary> as
   a ghost pill whose chevron turns when it opens */
.vall {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.vall summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.125rem 0 1.375rem;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background-color 0.2s;
}
.vall summary::after {
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  background: currentColor;
  -webkit-mask: var(--i-chevron-down) center / contain no-repeat;
  mask: var(--i-chevron-down) center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}
.vall summary:hover {
  background: var(--tint);
}
.vall[open] summary {
  margin-bottom: 1rem;
}
.vall[open] summary::after {
  transform: rotate(180deg);
}

/* the configuration table: a rounded card with hairline rows */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.ptable {
  width: 100%;
  border-collapse: collapse;
}
.ptable th,
.ptable td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.ptable th {
  background: var(--tint);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ptable tbody tr:last-child td {
  border-bottom: 0;
}
.ptable .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ptable td.num {
  font-weight: 700;
}

@media (max-width: 640px) {
  /* Stacked rows: each cell carries its column label from data-label. */
  .ptable,
  .ptable thead,
  .ptable tbody,
  .ptable tr,
  .ptable td {
    display: block;
    width: 100%;
  }
  .ptable thead {
    display: none;
  }
  .ptable tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
  }
  .ptable tbody tr:last-child {
    border-bottom: 0;
  }
  .ptable td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.375rem 1.25rem;
    border: 0;
  }
  .ptable td::before {
    content: attr(data-label);
    color: var(--ink-soft);
    font-size: 0.8125rem;
    font-weight: 500;
  }
}

/* ----------------------------------------------------------------- motion */

/* Hover lift and the photo's slow zoom, only on devices that hover and only
   when nobody asked for less motion; the base state is the final state. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .pcard {
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  }
  .pcard:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift);
  }
  .pcard-img img {
    transition: transform 0.6s var(--ease);
  }
  .pcard:hover .pcard-img img {
    transform: scale(1.045);
  }
  .unit-mark::after {
    transition: transform 0.2s var(--ease);
  }
  .pager .btn .icon:first-child {
    transition: transform 0.3s var(--ease);
  }
  .pager .btn:hover .icon:first-child {
    transform: translateX(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip,
  .unit,
  .gal-thumb,
  .calc-chip,
  .calc-select,
  .vall summary,
  .vall summary::after,
  .gal-nav,
  .lb-nav,
  .lb-close,
  .chip-nav,
  .is-swapping main {
    transition: none;
  }
  /* catalog.js reads the same query and stops passing `behavior: "smooth"`. */
  .gal-strip {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------ dark refinements */

/* Where a token swap alone isn't enough: in dark, --tint is a shade *below*
   --surface, so a hover that should lift a control takes the stronger tint. */
@media (prefers-color-scheme: dark) {
  .chip:not(.on):hover,
  .chip-nav:hover,
  .vall summary:hover {
    background: var(--tint-strong);
  }
}
