/* ==========================================================================
   site.css: the public site's one shared sheet (tokens, base, the shell,
   the content pages). The catalog adds catalog.css on its own pages only.

   The look is isell.uz's (D363): the app's "Confident Blue" palette, Onest,
   big display type with tight tracking, generous radii, soft blue-tinted
   shadows, brand-gradient panels with concentric rings, a frosted header and
   an ink footer panel. isell.uz is light only; the store also follows a dark
   system theme (D364), so every colour below is a token with a dark twin, and
   components read tokens, never hexes (the blue panels aside: they are blue
   in both schemes, so their whites are literal).

   Hand-written on purpose: Tailwind, as isell.uz uses, would put a Node build
   into the Django image for about fifteen templates. The token values are
   copied from isell.uz's src/styles/global.css; keep them in step with it and
   with mobile/lib/core/theme/app_colors.dart, where the palette comes from.

   An external file rather than base.html's old inline <style>: WhiteNoise
   serves it hashed and immutable, so a visitor downloads it once, not inside
   every page.
   ========================================================================== */

/* Onest: the app's one typeface, self-hosted (the same variable TTF the app
   bundles, wght 100-900). Deliberately not Google Fonts: these are the privacy
   and terms pages, and they should not hand visitor IPs to a third party to
   render their own text. The full file, never a subset: a Russian-only subset
   once printed «Ма сулот» for «Маҳсулот» (2026-09-07). The system fonts after it
   only cover the swap moment; Onest covers uz/ru/en on its own, so text never
   switches typeface mid-sentence once it has loaded. */
@font-face {
  font-family: "Onest";
  src: url("fonts/Onest.23cd8aa6cc08.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  /* Brand blues: the same in both schemes (the gradient panels, the primary
     button). */
  --brand: #0050f0;
  --brand-deep: #0b3bc4;
  --brand-night: #04173f;
  --sky: #9db9ff;    /* accents on blue */
  --mist: #c9daff;   /* display text on blue: 3.5:1 or more on the gradient */

  /* Surfaces, light. */
  --page: #ffffff;
  --surface: #ffffff;       /* cards, fields */
  --tint: #f0f4ff;          /* section panels, hovers */
  --tint-strong: #e7edff;   /* chips, icon wells, the secondary button */
  /* The product photo well. Grist's photos are shot on white, and on a light
     plate with `mix-blend-mode: multiply` that white melts away; a dark plate
     would leave a white box inside every dark card. So it stays light in dark
     mode too, only dimmed (D364). */
  --plate: #f0f4ff;
  --line: #dce4fb;          /* hairlines, card rings */

  /* Text. --ink-muted is under AA: decoration only, never text to read. */
  --ink: #0a1330;           /* 16.9:1 on white */
  --ink-soft: #4a587c;      /* body/secondary text, 7.0:1 on white */
  --ink-muted: #8a97b8;
  --accent: #0050f0;        /* links, selected text, price accents */
  --on-accent: #ffffff;     /* text on an --accent fill */
  --focus: #0050f0;

  --footer: #0a1330;
  --header: rgb(255 255 255 / 0.8);

  /* Soft and blue-tinted, from the app's cardShadow/fabShadow. */
  --shadow-card: 0 1px 2px rgb(10 19 48 / 0.04), 0 8px 22px rgb(2 50 180 / 0.08);
  --shadow-lift: 0 2px 6px rgb(10 19 48 / 0.05), 0 24px 48px -12px rgb(2 50 180 / 0.22);
  --shadow-cta: 0 12px 26px -8px rgb(0 80 240 / 0.55);
  --shadow-float: 0 30px 60px -18px rgb(4 23 63 / 0.45), 0 8px 18px -6px rgb(4 23 63 / 0.18);

  --font: "Onest", ui-sans-serif, system-ui, sans-serif;

  /* Type scale. The marketing sizes are isell.uz's; the store's own headings
     (--text-h1-store, --text-h2-store) run a step smaller, because a store's
     h1 should not push the products, or a policy's text, down the screen. */
  --text-display: clamp(2.5rem, 1.45rem + 4.4vw, 4.75rem);
  --text-h1: clamp(2.375rem, 1.6rem + 3.2vw, 4.25rem);
  --text-h2: clamp(2rem, 1.45rem + 2.3vw, 3.375rem);
  --text-h3: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  --text-h1-store: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  --text-h2-store: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --text-lead: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --text-eyebrow: 0.8125rem;

  --r-field: 1rem;
  --r-tile: 1.5rem;
  --r-card: 1.75rem;
  --r-panel: 2rem;          /* 2.5rem from 768px */
  /* How far the full-width panels (heroes, bands, the footer) sit in from the
     viewport edge, as on isell.uz. */
  --inset: 0.5rem;          /* 0.75rem from 640px */
  --header-h: 4rem;         /* 4.5rem from 768px */

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 640px) {
  :root { --inset: 0.75rem; }
}
@media (min-width: 768px) {
  :root { --r-panel: 2.5rem; --header-h: 4.5rem; }
}

/* The app's dark scheme (_confidentBlueDark): the accent lifts to #7FA6FF and
   text on it turns night blue, an inversion the app makes too. Dark cards are
   separated by their --line ring and tone; a shadow on near-black reads as
   dirt, so --shadow-card draws nothing. It is a transparent shadow, not `none`:
   the cards list it after their ring (`inset 0 0 0 1px …, var(--shadow-card)`),
   and `none` inside a list makes the whole declaration invalid, ring and all. */
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0e16;
    --surface: #141a26;
    --tint: #111725;
    --tint-strong: #1e2637;
    --plate: #e4e9f6;
    --line: #262f42;
    --ink: #e7eaf3;
    --ink-soft: #aab4cf;
    --ink-muted: #7f8bab;
    --accent: #7fa6ff;
    --on-accent: #04173f;
    --focus: #7fa6ff;
    --footer: #121a2b;
    --header: rgb(11 14 22 / 0.78);
    --shadow-card: 0 0 #0000;
    --shadow-lift: 0 24px 48px -16px rgb(0 0 0 / 0.7);
    --shadow-cta: 0 12px 26px -10px rgb(0 80 240 / 0.5);
    --shadow-float: 0 30px 60px -18px rgb(0 0 0 / 0.8);
  }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  /* An anchor jump (#img-2, the skip link) lands below the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

/* A column, so the footer sits at the bottom of a short page (404, a sparse
   category) instead of floating halfway up. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

/* `#main` takes focus only as a landing target (the skip link, catalog.js
   after a swap); it is not a control, so it draws no ring. */
#main:focus {
  outline: none;
}

img,
svg {
  max-width: 100%;
}
img {
  height: auto;
}

::selection {
  background: var(--brand);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 0.12em;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: var(--text-h1-store);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
}
h2 {
  font-size: var(--text-h2-store);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 2.75rem 0 0.75rem;
}
h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}

p {
  text-wrap: pretty;
}

/* One visible focus style everywhere; .on-dark flips it to white over the
   blue and ink panels. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.on-dark :focus-visible {
  outline-color: #fff;
}

summary {
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}

/* Lucide icons (templates/pages/icons/): sized by their context, 1.25em by
   default so an icon inside text or a button scales with it. */
.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-cta);
}
.skip:focus {
  top: 0.75rem;
}

/* The page column: 80rem with fluid side gutters, as isell.uz. */
.wrap {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
}

/* --------------------------------------------------------- type helpers */

.display {
  font-size: var(--text-display);
  line-height: 1.02;
  letter-spacing: -0.042em;
}
.title-h1 {
  font-size: var(--text-h1);
  line-height: 1.04;
  letter-spacing: -0.038em;
}
.title-h2 {
  font-size: var(--text-h2);
  line-height: 1.06;
  letter-spacing: -0.034em;
}
.lead {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: var(--text-eyebrow);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
/* The old muted grey failed AA as text; everything that says .muted is text. */
.muted {
  color: var(--ink-soft);
}
.updated {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* A small rounded label (the "Used" badge, the monthly teaser). */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--tint-strong);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

/* --------------------------------------------------------------- buttons */

/* Pills, as isell.uz's Button: primary (brand, with the FAB glow),
   .secondary (tint), .ghost (surface + ring) on the page; .light and .glass
   on the blue panels. Sizes: .sm 40px, default 48px, .lg 56px. The existing
   `class="btn"` / `class="btn secondary"` markup keeps working unchanged. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--brand);
  color: #fff;
  font: 600 0.9375rem/1 var(--font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--brand-deep);
  text-decoration: none;
}
.btn .icon {
  width: 1.15em;
  height: 1.15em;
}
.btn.sm {
  height: 2.5rem;
  padding: 0 1rem;
  gap: 0.375rem;
  font-size: 0.875rem;
}
.btn.lg {
  height: 3.5rem;
  padding: 0 1.75rem;
  gap: 0.625rem;
  font-size: 1rem;
}
.btn.secondary {
  background: var(--tint-strong);
  color: var(--accent);
  box-shadow: none;
}
.btn.secondary:hover {
  background: var(--line);
}
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover {
  background: var(--tint);
}
/* On blue, in both schemes, so the colours are literal. */
.btn.light {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 30px 60px -18px rgb(4 23 63 / 0.45), 0 8px 18px -6px rgb(4 23 63 / 0.18);
}
.btn.light:hover {
  background: #f0f4ff;
}
.btn.glass {
  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);
}
.btn.glass:hover {
  background: rgb(255 255 255 / 0.25);
}

/* -------------------------------------------------------- panels, rings */

/* The full-width rounded panels (heroes, bands): a section wrapper insets them
   from the viewport edge by --inset, the panel clips its rings and rounds. */
.bleed {
  padding-inline: var(--inset);
}
.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-panel);
}
.panel-tint {
  background: var(--tint);
}

/* The brand gradient: the store listing's feature graphic, lit from the top
   left. The same in both schemes: blue is the brand, not a light-mode colour. */
.bg-brand-gradient {
  background-color: var(--brand);
  background-image:
    radial-gradient(80% 60% at 18% 0%, rgb(255 255 255 / 0.12), transparent 62%),
    radial-gradient(70% 90% at 100% 100%, rgb(4 23 63 / 0.42), transparent 70%),
    linear-gradient(150deg, #1a63ff 0%, var(--brand) 42%, var(--brand-deep) 100%);
}
/* The deepest panel: night blue with a brand glow. */
.bg-night-gradient {
  background-color: var(--brand-night);
  background-image:
    radial-gradient(70% 90% at 0% 0%, rgb(0 80 240 / 0.55), transparent 65%),
    radial-gradient(60% 80% at 100% 100%, rgb(11 59 196 / 0.6), transparent 70%);
}
/* Frosted glass over the gradient. */
.glass {
  background-color: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

/* Text on the blue and ink panels. Marking the panel .on-dark also turns the
   focus ring white. */
.on-dark {
  color: #fff;
}
.on-dark .lead {
  color: rgb(255 255 255 / 0.9);
}
.on-dark .eyebrow {
  color: var(--mist);
}
.on-dark a:not(.btn) {
  color: #fff;
}

/* pages/svg/rings.svg. White on blue by default; the tint panels draw them in
   the accent, fainter. Each context places them (top/left/width). */
.rings {
  position: absolute;
  z-index: -1;
  max-width: none;
  pointer-events: none;
  user-select: none;
  color: #fff;
  opacity: 0.2;
}
.panel-tint .rings {
  color: var(--accent);
  opacity: 0.12;
}

/* ---------------------------------------------------------------- header */

/* Frosted and sticky, one row at every width. Shopping links only (Catalog,
   App, Contacts): the legal pages, which must stay reachable, live in the
   footer and in the phone menu (D363). */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}
.brand {
  flex: none;
  display: inline-flex;
  margin-left: -0.25rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
}
.brand img {
  display: block;
  width: auto;
  height: 1.75rem;
}
@media (min-width: 768px) {
  .brand img { height: 2rem; }
}

nav.primary {
  display: none;
}
@media (min-width: 1024px) {
  nav.primary {
    display: flex;
    gap: 0.25rem;
    margin-left: 1.5rem;
  }
}
nav.primary a {
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
nav.primary a:hover {
  background: var(--tint);
  color: var(--ink);
}
nav.primary a[aria-current="page"] {
  background: var(--tint);
  color: var(--accent);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
@media (min-width: 640px) {
  .bar-end { gap: 0.75rem; }
}
.bar-cta {
  display: none;
}
@media (min-width: 768px) {
  .btn.bar-cta { display: inline-flex; }
}

/* The language switcher: isell.uz's segmented pill, short codes on screen and
   the endonym for screen readers. catalog.js swaps this element (`.langs`) for
   the fetched page's after every in-place navigation. On phones each link
   gets a 44px-tall hit area through ::after while the drawn pill stays slim. */
.langs {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 9999px;
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--line);
}
.langs a {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 2.25rem;
  min-width: 2.75rem;
  padding: 0 0.625rem;
  border-radius: 9999px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.langs a::after {
  content: "";
  position: absolute;
  inset: -0.25rem 0;
}
.langs a:hover {
  color: var(--ink);
}
.langs a[aria-current="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .langs a { height: 2rem; min-width: 2.5rem; }
}

/* Phones and tablets: a native disclosure, no script (D166). */
.menu {
  position: relative;
}
@media (min-width: 1024px) {
  .menu { display: none; }
}
.menu > summary {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.2s;
}
.menu > summary:hover {
  background: var(--tint);
}
.menu > summary .icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.menu .i-close,
.menu[open] .i-open {
  display: none;
}
.menu[open] .i-close {
  display: block;
}
.menu-card {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(21rem, calc(100vw - 1.5rem));
  padding: 0.75rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
  transform-origin: top right;
}
.menu-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}
.menu-links a:hover {
  background: var(--tint);
}
.menu-links a[aria-current="page"] {
  background: var(--tint);
  color: var(--accent);
}
.menu-links .icon {
  width: 1rem;
  height: 1rem;
  color: var(--ink-muted);
}
.menu-card .menu-legal {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.menu-legal a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.875rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.menu-legal a:hover {
  background: var(--tint);
  color: var(--ink);
}
.menu-legal a[aria-current="page"] {
  color: var(--accent);
}
.menu-cta {
  margin-top: 0.5rem;
  padding: 0.75rem 0.25rem 0.25rem;
  border-top: 1px solid var(--line);
}
.menu-cta .btn {
  width: 100%;
}

/* ---------------------------------------------------------- store badges */

/* Vendor artwork, so CSS touches only what the two brand guidelines leave to
   us: one shared height (Apple asks that a badge shown beside another be the
   same size, and >= 40px on the web) and the clear space around them (Google
   asks for >= 1/4 of the badge height on every side: 14px against a 50px
   badge). The artwork itself is never recoloured or reshaped; the hover is on
   the link, not the image. Both badges read on white, on the dark page, on
   the blue panels and on the ink footer: Apple's black badge carries a white
   keyline and Google's a grey one. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin: 1.5rem 0 0;
}
.store-badges + .cta {
  margin-top: 0.875rem;
}
.store-badges a {
  display: inline-flex;
  border-radius: 0.6rem;
}
.store-badges img {
  display: block;
  width: auto;
  height: 50px;
}
@media (max-width: 767px) {
  /* Both badges plus their clear space fit one row on a 360px screen at 44,
     still above Apple's 40px web minimum; at 50 they'd break onto two. */
  .store-badges img { height: 44px; }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

/* ---------------------------------------------------------------- footer */

/* isell.uz's rounded ink panel, inset like the heroes. In dark mode it lifts
   a tone off the page so it still reads as a panel. */
footer.site {
  margin: 0 var(--inset) var(--inset);
  border-radius: var(--r-panel);
  background: var(--footer);
  color: #fff;
}
footer.site > .wrap {
  padding-top: clamp(3.5rem, 2.5rem + 3vw, 5rem);
  padding-bottom: 2.5rem;
}
.foot-top {
  display: grid;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .foot-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; }
}
.foot-brand .brand img {
  height: 2.25rem;
}
.foot-tagline {
  max-width: 24rem;
  margin: 1.5rem 0 0;
  color: rgb(255 255 255 / 0.7);
  line-height: 1.65;
}
.footer-badges {
  margin-top: 2rem;
}
.footer-badges .store-badges {
  margin: 0;
}
/* Legal gets the wider column on phones: its Russian titles are the long ones.
   The third column (isell.uz, D377) wraps under the first there, and stands
   beside the other two from 1024px. */
.foot-cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 3rem 1.5rem;
}
@media (min-width: 1024px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 13rem)); justify-content: end; }
}
.foot-title {
  margin: 0;
  color: rgb(255 255 255 / 0.55);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}
.foot-cols ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
/* 44px rows: these are the legal pages' only way in on a phone besides the
   menu, so they get full-size touch targets. The padding keeps a title that
   wraps onto two lines visibly apart from the next one. */
footer.site .foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.5rem;
  line-height: 1.35;
  color: rgb(255 255 255 / 0.72);
  text-decoration: none;
  transition: color 0.2s;
}
footer.site .foot-cols a:hover,
footer.site .foot-cols a[aria-current="page"] {
  color: #fff;
}
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.6);
  font-size: 0.875rem;
}
.foot-bottom p {
  margin: 0;
}

/* --------------------------------------------------------- page layouts */

/* The default column under base.html's {% block main %} (the catalog pages
   use it until they set their own). */
.page {
  padding-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  padding-bottom: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}

/* The content pages' title block (pages/content/_layout.html): a tint panel
   with the accent rings, isell.uz's PageHeader. */
.page-head {
  padding: var(--inset) var(--inset) 0;
}
.page-head .wrap {
  padding-top: clamp(2.75rem, 1.75rem + 4vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 1.75rem + 3vw, 4.5rem);
}
.page-head h1 {
  max-width: 22ch;
  margin: 0;
}
.page-head .lead {
  max-width: 42rem;
  margin: 1.25rem 0 0;
}
.page-head .updated {
  margin: 1.25rem 0 0;
}
.page-head .rings {
  top: 50%;
  right: -45%;
  width: 56rem;
  transform: translateY(-50%);
}
@media (min-width: 640px) {
  .page-head .rings { right: -20%; }
}
@media (min-width: 1024px) {
  .page-head .rings { right: -8%; }
}

.doc {
  padding-top: clamp(2.5rem, 1.75rem + 2.5vw, 4rem);
  padding-bottom: clamp(4rem, 2.5rem + 5vw, 7rem);
}
@media (min-width: 1024px) {
  .doc.has-aside {
    display: grid;
    grid-template-columns: minmax(0, 45rem) minmax(0, 17rem);
    justify-content: space-between;
    gap: 4rem;
    align-items: start;
  }
}

/* The legal pages' side card on wide screens: the other three documents and a
   way to ask a person, within reach on a long policy. Phones have the footer
   and the menu instead. */
.doc-aside {
  display: none;
}
@media (min-width: 1024px) {
  .doc-aside {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: 0.75rem;
    border-radius: var(--r-tile);
    background: var(--tint);
  }
}
.doc-aside p {
  margin: 0.75rem 0.75rem 0.5rem;
}
.doc-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-aside li a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.875rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.doc-aside li a:hover {
  background: var(--surface);
  color: var(--ink);
}
.doc-aside li a[aria-current="page"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}
.doc-aside .btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* ----------------------------------------------------------------- prose */

/* The legal pages are long and dense: a ~45rem measure, generous rhythm,
   accent markers, headings that open clear space above them. */
.prose {
  max-width: 45rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
}
.prose h2 {
  margin: 3rem 0 0.875rem;
}
.prose h3 {
  margin: 2.25rem 0 0.5rem;
}
.prose h2 + h3 {
  margin-top: 1.5rem;
}
.prose ul,
.prose ol {
  padding-left: 1.375rem;
}
.prose li {
  margin: 0.45em 0;
  padding-left: 0.25rem;
}
.prose li::marker {
  color: var(--accent);
}
.prose ol > li::marker {
  font-weight: 700;
}
.prose strong {
  font-weight: 600;
}
.prose a {
  font-weight: 500;
}
.prose code {
  padding: 0.125em 0.45em;
  border-radius: 0.4em;
  background: var(--tint-strong);
  font: 500 0.9em/1 var(--font);
  font-variant-numeric: tabular-nums;
}
.prose hr,
hr {
  height: 0;
  margin: 2.75rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose .muted {
  font-size: 0.9375rem;
}

/* Numbered steps (/delete/'s in-app route): brand number wells joined by a
   hairline, isell.uz's StepList. An <ol>, so the order is announced too. */
.prose ol.steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.prose ol.steps > li {
  position: relative;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.35rem 0 1.25rem 3.75rem;
  counter-increment: step;
}
.prose ol.steps > li:last-child {
  padding-bottom: 0.25rem;
}
.prose ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.875rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-cta);
}
.prose ol.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 2.75rem;
  bottom: 0.25rem;
  width: 1px;
  background: var(--line);
}

/* The published KATM consent offer (/katm/). Framed like the paper form it
   is, with ruled blanks where a signer's own copy carries their data. */
.katm-offer {
  margin: 2rem 0;
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
  border-radius: var(--r-tile);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.prose .katm-offer h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  letter-spacing: -0.015em;
  text-align: center;
}
.katm-offer p {
  margin: 0 0 0.9em;
}
.katm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.prose .katm-field {
  margin: 0.35rem 0;
}
.katm-field strong {
  display: inline-block;
  min-width: 7rem;
}
.katm-blank {
  display: inline-block;
  min-width: 9.5rem;
  height: 1.1em;
  border-bottom: 1px solid var(--ink-muted);
  vertical-align: baseline;
}
.prose .katm-signature {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  margin: 3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.katm-rule {
  display: block;
  width: 10.5rem;
  margin-bottom: 0.375rem;
  border-bottom: 1px solid var(--ink);
}
/* The template breaks the line after each rule for the PDF's sake; here the
   rule is already a block, so the <br> would only open a blank line. */
.katm-signature br {
  display: none;
}
.prose .katm-field + p:not(.katm-field) {
  margin-top: 1.25rem;
}

/* --------------------------------------------------------- contact card */

/* One card, a row per way to reach us: an icon well, the label over the
   value. Empty settings hide their row in the template. */
.contact-list {
  margin: 1.75rem 0;
  padding: 0.5rem 1.25rem;
  list-style: none;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
}
.prose .contact-list {
  padding: 0.5rem 1.25rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0.9rem 0;
}
.contact-list li + li {
  border-top: 1px solid var(--line);
}
.contact-list .ci {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--tint-strong);
  color: var(--accent);
}
.contact-list .ci .icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.8;
}
.contact-list .k {
  grid-column: 2;
  align-self: end;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.contact-list .v {
  grid-column: 2;
  align-self: start;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.contact-list .v a {
  font-weight: 600;
  text-decoration: none;
}
.contact-list .v a:hover {
  text-decoration: underline;
}

/* /contacts/: from 640px each way to reach us is its own tile (two, then
   three across), so the page uses its width instead of one narrow column. */
.doc-wide .prose {
  max-width: none;
}
.doc-wide .prose > :not(.contact-list) {
  max-width: 45rem;
}
@media (min-width: 640px) {
  .doc-wide .contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 2.5rem;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .doc-wide .contact-list li {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.125rem;
    align-items: start;
    padding: 1.5rem;
    border-radius: var(--r-tile);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  }
  .doc-wide .contact-list li + li {
    border-top: 0;
  }
  .doc-wide .contact-list .ci {
    grid-row: auto;
    margin-bottom: 1rem;
  }
  .doc-wide .contact-list .k,
  .doc-wide .contact-list .v {
    grid-column: 1;
  }
}
@media (min-width: 1024px) {
  .doc-wide .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}

/* --------------------------------------------------------------- cards */

/* isell.uz's white Card: an icon well, a title, soft text. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .grid { gap: 1rem; }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent), var(--shadow-card);
}
@media (min-width: 768px) {
  .card { padding: 2rem; }
  .card-icon { margin-bottom: 2rem; }
}
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  background: var(--tint-strong);
  color: var(--accent);
}
.card-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 1.8;
}
/* The step's number: decoration (aria-hidden), the order is in the text. */
.card-step {
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .card-step { top: 2rem; right: 2rem; }
}
.card h3 {
  margin: 0;
  font-size: var(--text-h3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.card p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.65;
}

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

/* The hero: brand gradient, rings behind the phones, the display heading, the
   badges and a glass "Contact us". On phones the phones come below the text
   and the panel's lower edge cuts them, a device rising out of it. */
.app-hero {
  padding: var(--inset) var(--inset) 0;
}
.app-hero .rings {
  top: 78%;
  left: 50%;
  width: 56rem;
  transform: translate(-50%, -50%);
}
.app-hero-grid {
  display: grid;
  align-items: center;
  gap: 3rem;
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
}
@media (min-width: 1024px) {
  .app-hero .rings { top: 50%; left: 76%; width: 66rem; }
  .app-hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2.5rem;
    padding-block: 6rem;
  }
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  padding: 0.375rem 1rem 0.375rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: #fff;
  color: var(--brand);
}
.hero-chip-icon .icon {
  width: 1rem;
  height: 1rem;
}
.app-hero h1 {
  margin: 1.75rem 0 0;
  max-width: 12ch;
}
.app-hero .lead {
  max-width: 36rem;
  margin: 1.5rem 0 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin-top: 2.25rem;
}
.hero-actions .store-badges {
  margin: 0;
}
/* The same height as the badges beside it, so the row reads as one. */
.hero-actions .btn {
  height: 44px;
}
@media (min-width: 768px) {
  .hero-actions .btn { height: 50px; }
}

/* Two app screenshots in CSS phone frames, leaning at different depths. The
   frame stays night ink in both schemes: it is a device, not a surface. */
.phones {
  position: relative;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}
@media (min-width: 640px) {
  .phones { max-width: 28rem; }
}
.phones-stage {
  position: relative;
  aspect-ratio: 10 / 11;
  margin-bottom: -22%;
}
@media (min-width: 1024px) {
  .phones { max-width: 32rem; }
  .phones-stage { aspect-ratio: 10 / 10.5; margin-bottom: 0; }
}
.phone-slot {
  position: absolute;
}
.phone-slot.back {
  left: 0;
  top: 7%;
  width: 47%;
  rotate: -6deg;
}
.phone-slot.front {
  right: 0;
  top: 0;
  width: 51%;
  rotate: 4deg;
}
.phone {
  padding: 0.45rem;
  border-radius: 2.4rem;
  background: #0a1330;
  box-shadow: 0 30px 60px -18px rgb(4 23 63 / 0.55), 0 8px 18px -6px rgb(4 23 63 / 0.25),
    0 0 0 1px rgb(255 255 255 / 0.25);
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 1.95rem;
  background: #f0f4ff;
}
.phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}
/* The dynamic island, over the screenshot's empty status-bar strip. */
.phone-screen::after {
  content: "";
  position: absolute;
  top: 1.6%;
  left: 35%;
  width: 30%;
  height: 3.2%;
  border-radius: 9999px;
  background: #0a1330;
}
@media (min-width: 640px) {
  .phone { padding: 0.5rem; border-radius: 2.75rem; }
  .phone-screen { border-radius: 2.25rem; }
}

.app-section {
  padding-top: clamp(4rem, 2.6rem + 4.6vw, 6.75rem);
}
.app-section > h2 {
  max-width: 18ch;
  margin: 0;
}
/* Four steps: one column, then two by two, then one row of four, never three
   and an orphan. */
.app-section .grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .app-section .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .app-section .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* "About": a tint panel closing the page, heading beside the text on wide
   screens. */
.app-about {
  padding: clamp(4rem, 2.6rem + 4.6vw, 6.75rem) var(--inset) var(--inset);
}
.app-about .rings {
  top: 50%;
  right: -30rem;
  width: 50rem;
  transform: translateY(-50%);
}
.app-about-grid {
  display: grid;
  gap: 1.5rem;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}
@media (min-width: 1024px) {
  .app-about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
  .app-about .rings { right: -18rem; }
}
.app-about h2 {
  margin: 0;
}
.app-about .prose {
  color: var(--ink-soft);
}
.app-about .prose p:last-child {
  margin-bottom: 0;
}

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

/* CSS only, and all of it off under prefers-reduced-motion: the base state is
   the final state, motion is layered on only when nobody asked for less. */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
/* The same entrance without the fade, for headings and leads: they are the
   Largest Contentful Paint candidates, and an element that starts at opacity 0
   holds the LCP back until it shows. */
@keyframes lift {
  from { transform: translateY(18px); }
  to { transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .motion-rise { animation: rise 0.9s var(--ease) both; animation-delay: var(--d, 0ms); }
  .motion-lift { animation: lift 0.9s var(--ease) both; animation-delay: var(--d, 0ms); }
  .delay-1 { --d: 80ms; }
  .delay-2 { --d: 160ms; }
  .delay-3 { --d: 240ms; }
  .delay-4 { --d: 320ms; }

  .phone-slot.back .phone { animation: float 9s ease-in-out -3s infinite; }
  .phone-slot.front .phone { animation: float 7s ease-in-out infinite; }

  .menu[open] .menu-card { animation: pop 0.22s var(--ease); }

  /* Scroll reveal: only where scroll-driven animations exist, so nothing ever
     waits on a script. The range ends once the element has fully entered. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 85%;
    }
  }

  /* Hover lift, only on devices that hover. */
  @media (hover: hover) {
    .card,
    .lift {
      transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    }
    .card:hover,
    .lift:hover {
      transform: translateY(-4px);
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent),
        var(--shadow-lift);
    }
    .store-badges a {
      transition: transform 0.2s var(--ease);
    }
    .store-badges a:hover {
      transform: translateY(-2px);
    }
    .btn .icon:last-child {
      transition: transform 0.3s var(--ease);
    }
    .btn:hover .icon:last-child {
      transform: translateX(3px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn,
  .store-badges a {
    transition: none;
  }
}

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

/* Where a token swap alone isn't enough. */
@media (prefers-color-scheme: dark) {
  nav.primary a:hover,
  nav.primary a[aria-current="page"],
  .menu-links a:hover,
  .menu-links a[aria-current="page"],
  .menu-legal a:hover {
    background: var(--tint-strong);
  }
  /* --surface on --tint is too close to see in dark: the current language
     takes the stronger tint and full ink instead of a white chip. */
  .langs a[aria-current="true"] {
    background: var(--tint-strong);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .doc-aside li a:hover,
  .doc-aside li a[aria-current="page"] {
    background: var(--tint-strong);
  }
  /* The tint panels and the footer sit only a tone off the page in dark, so a
     hairline draws their edge. */
  .panel-tint,
  .doc-aside {
    box-shadow: inset 0 0 0 1px var(--line);
  }
  footer.site {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  }
}
