/* Public website in the app's style: tokens from client/lib/theme/tokens.dart (DESIGN.md, «Светлое пламя»),
   backdrop and glass from widgets/glass.dart, the lens from widgets/connect_button.dart.
   Theme: <html data-theme="light|dark">, set in <head> before the first paint (SiteShell.razor). */

/* Inter — the app's font (OFL, fonts/Inter-OFL.txt); variable subsets, a browser loads only what the page uses. */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* AppColors.light */
  color-scheme: light;
  --bg: #F7E9DC; --sheet: #FFFBF6;
  --surface: rgb(255 255 255 / .70); --border: rgb(90 42 10 / .10);
  --text: #1F140A; --muted: #6B5444; --faint: #9A8574;
  --accent: #E8590C; --accent-hi: #C2410C; --accent-soft: #FFE8D6;
  --ok: #16A34A; --ok-soft: rgb(22 163 74 / .14);
  --warn: #D97706; --warn-soft: rgb(217 119 6 / .12);
  --danger: #DC2626; --danger-hi: #B91C1C;
  --glass-hi: rgb(255 255 255 / .75); --glass-lo: rgb(255 255 255 / .40);
  --rim: rgb(255 255 255 / .95); --rim-2: rgb(90 42 10 / .04); --rim-3: rgb(90 42 10 / .04); --rim-4: rgb(90 42 10 / .06); --rim-5: rgb(255 255 255 / .76);
  --shadow: rgb(138 58 10 / .18);
  --card-shadow: 0 8px 24px rgb(138 58 10 / .18);
  --bar: rgb(255 251 246 / .72);
  /* GlassVolumePainter: light along the top edge, shade along the bottom one */
  --vol-top: rgb(255 255 255 / .55); --vol-bottom: rgb(122 58 16 / .08);
  /* Primary buttons as in the app (flameGlass, owner 03.11): orange glass with an orange rim */
  --btn-glass: linear-gradient(rgb(255 122 0 / .24), rgb(255 122 0 / .10));
  --btn-text: #C2410C;
  --btn-rim: inset 0 0 0 1.2px rgb(255 122 0 / .75);
  --btn-shadow: var(--btn-rim), 0 4px 14px rgb(255 90 0 / .15);
  /* The app's three spots of light and the grid (_BackdropPainter) */
  --spot-1: rgb(255 184 0 / .40); --spot-2: rgb(255 122 0 / .25); --spot-3: rgb(255 90 0 / .35); --spot-4: transparent;
  --grid: rgb(31 20 10 / .04);
  /* The lens (_LiquidGlassPainter): glass body and highlight */
  --lens-1: rgb(255 255 255 / .95); --lens-2: rgb(255 255 255 / .70); --lens-3: rgb(255 255 255 / .80);
  --shine: rgb(255 255 255 / .85);
  /* Phone frame: silver in light, graphite in dark */
  --frame-1: #E9ECF1; --frame-2: #B9BFC9; --frame-3: #F7F8FA; --frame-edge: rgb(0 0 0 / .18);

  /* Sp / Ts */
  --r-card: 24px; --r-tile: 18px; --r-field: 14px; --r-sheet: 28px;
  --gap: 12px; --pad: 20px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1200px;
}
[data-theme="dark"] {
  /* AppColors.dark */
  color-scheme: dark;
  --btn-glass: linear-gradient(rgb(255 122 0 / .30), rgb(255 122 0 / .14));
  --btn-text: #FFD0A8;
  --btn-rim: inset 0 0 0 1.2px rgb(255 122 0 / .70);
  --bg: #0B0807; --sheet: #1C130D;
  --surface: rgb(255 240 225 / .08); --border: rgb(255 200 160 / .14);
  --text: #FFF4EA; --muted: #C9B4A3; --faint: #8F7A6A;
  --accent: #FF8A3D; --accent-hi: #FFA05C; --accent-soft: rgb(255 122 0 / .20);
  --ok: #4ADE80; --ok-soft: rgb(74 222 128 / .16);
  --warn: #FBBF24; --warn-soft: rgb(251 191 36 / .12);
  --danger: #F87171; --danger-hi: #FCA5A5;
  --glass-hi: rgb(255 240 225 / .14); --glass-lo: rgb(255 240 225 / .043);
  --rim: rgb(255 235 220 / .55); --rim-2: rgb(255 255 255 / .09); --rim-3: transparent; --rim-4: rgb(255 255 255 / .05); --rim-5: rgb(255 235 220 / .165);
  --shadow: rgb(0 0 0 / .55);
  --card-shadow: 0 8px 30px rgb(0 0 0 / .55);
  --bar: rgb(28 19 13 / .62);
  --vol-top: rgb(255 255 255 / .11); --vol-bottom: rgb(0 0 0 / .22);
  --spot-1: rgb(255 90 0 / .32); --spot-2: rgb(255 122 0 / .18); --spot-3: rgb(224 49 10 / .32); --spot-4: transparent;
  --grid: rgb(255 255 255 / .03);
  --lens-1: rgb(255 255 255 / .18); --lens-2: rgb(255 255 255 / .06); --lens-3: rgb(255 255 255 / .08);
  --shine: rgb(255 255 255 / .16);
  --frame-1: #3A3E47; --frame-2: #121419; --frame-3: #2A2E36; --frame-edge: rgb(255 255 255 / .10);
}

/* ── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
/* AppBackdrop: soft spots of light and a 64 px grid fading to the edges, painted once under the whole page */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(62vmax 50vmax at 20% 24%, var(--spot-1), transparent 70%),
    radial-gradient(50vmax 42vmax at 80% 16%, var(--spot-2), transparent 70%),
    radial-gradient(68vmax 56vmax at 72% 82%, var(--spot-3), transparent 70%),
    radial-gradient(44vmax 36vmax at 28% 82%, var(--spot-4), transparent 70%);
}
body::after {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 100%);
}
/* Theme switch by hand: one cross-fade of two snapshots (SiteShell ToggleScript), nothing repaints per frame */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
h1 { font-size: 32px; line-height: 1.19; font-weight: 600; letter-spacing: -.028em; margin: 8px 0 12px; }
h2 { font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.022em; margin: 56px 0 16px; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.012em; margin: 0 0 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin: 4px 0; }
b, strong { font-weight: 600; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.pre { white-space: pre-line; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
main.wrap { padding-top: 28px; padding-bottom: 56px; }

/* ── Glass (GlassPanel): translucent fill, rim brighter at the top-left and bottom-right corners, light along the top
   edge and shade along the bottom one, so that it reads as a thick pane, not a flat one (owner 02.11) ── */
.glass, .card, .steps li {
  position: relative; border-radius: var(--r-card);
  background:
    linear-gradient(var(--vol-top), transparent 44px),
    linear-gradient(to top, var(--vol-bottom), transparent 28px),
    linear-gradient(160deg, var(--glass-hi), var(--glass-lo) 48%, color-mix(in srgb, var(--glass-lo) 60%, var(--glass-hi)));
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
}
.glass::before, .card::before, .steps li::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--rim), var(--rim-2) 26%, var(--rim-3) 50%, var(--rim-4) 74%, var(--rim-5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card { padding: 20px 22px; }
.card > b { display: block; font-size: 17px; margin-bottom: 6px; }
.card + .card { margin-top: var(--gap); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.grid .card + .card { margin-top: 0; }

/* ── Buttons and pills ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-field); border: 0;
  background: var(--btn-glass); color: var(--btn-text); font: 600 16px/1.2 var(--font); letter-spacing: -.01em;
  box-shadow: var(--btn-shadow); cursor: pointer;
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
.btn:hover { color: var(--btn-text); filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn.ghost { position: relative; color: var(--text); background: linear-gradient(var(--vol-top), transparent 24px), linear-gradient(160deg, var(--glass-hi), var(--glass-lo)); box-shadow: var(--card-shadow); }
.btn.ghost:hover { color: var(--accent); filter: none; }
.btn.ghost::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--rim), var(--rim-2) 26%, var(--rim-3) 50%, var(--rim-4) 74%, var(--rim-5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card form { margin: 14px 0; }
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.badge { padding: 6px 14px; font-size: 14px; margin: 0 0 16px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.pill { padding: 3px 11px; font-size: 13px; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

/* ── Header: a frosted bar, the nav as a capsule like the app's tab bar ── */
.top { position: sticky; top: 0; z-index: 10; padding: 10px 0; }
.top-in {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding: 0 8px 0 16px; border-radius: 999px;
  background: var(--bar); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--card-shadow);
}
.top-in { position: relative; }
.top-in::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--rim), var(--rim-2) 26%, var(--rim-3) 50%, var(--rim-4) 74%, var(--rim-5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Wordmark: a picture per theme, like the phone screens; the icon alone only on a narrow phone */
.brand { display: flex; align-items: center; flex: none; }
.brand .mark { display: none; border-radius: 8px; }
.brand .wm { display: block; width: auto; height: 32px; margin-left: -3px; }
.brand .wm-dark, [data-theme="dark"] .brand .wm-light { display: none; }
[data-theme="dark"] .brand .wm-dark { display: block; }
.top-r { display: flex; align-items: center; gap: 6px; min-width: 0; }
nav { display: flex; gap: 2px; }
nav a { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; }
nav a:hover { color: var(--text); }
nav a.on { color: var(--accent); background: var(--accent-soft); }
/* Shown only with scripts (the head script sets data-theme) */
.theme-btn {
  display: none; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  align-items: center; justify-content: center; color: var(--text); background: var(--accent-soft);
}
[data-theme] .theme-btn { display: inline-flex; }
.theme-btn:hover { color: var(--accent); }
.theme-btn .moon, [data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: center; padding: 28px 0 24px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -.035em; max-width: 620px; margin-top: 0; }
.hero .lead { margin-bottom: 8px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 28px 0 16px; }
.cta-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cta-side b { font-size: 20px; letter-spacing: -.02em; }
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 600px; }
.hero-art .phone { --w: 290px; z-index: 2; transform: rotate(3deg) translateX(46px); }
.hero-art .phone.back { position: absolute; z-index: 1; --w: 250px; transform: rotate(-9deg) translate(-120px, 18px); opacity: .92; }
.chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-tile);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.chip small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.chip.c1 { right: 0; top: 18%; }
.chip.c2 { left: 2%; bottom: 14%; }

/* ── The lens: the app's connect button as the big round «download» ────── */
.lens {
  --s: 152px; --level: 21%; /* the icon stays above the surface */
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%; color: var(--muted);
  background: radial-gradient(circle at 32% 27%, var(--lens-1), var(--lens-2) 70%, var(--lens-3));
  box-shadow: 0 0 0 1px var(--border), inset 0 0 0 1px var(--rim-5), 0 26px 44px -18px var(--shadow);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .6s ease, color .4s ease;
  -webkit-tap-highlight-color: transparent;
}
.lens .liquid { position: absolute; inset: 5.5%; border-radius: 50%; overflow: hidden; }
/* Two waves sliding sideways, the back one paler, as in the app. They slide and do not turn, so the flame's gradient stays
   upright and starts at the surface: only the liquid burns, the glass above it stays glass (owner 02.11). */
.lens .liquid::before, .lens .liquid::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 200%; height: var(--level);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10Q50 0 100 10T200 10V20H0Z'/%3E%3C/svg%3E") repeat-x 0 0 / 50% 10px, linear-gradient(#000 0 0) no-repeat 0 9px / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10Q50 0 100 10T200 10V20H0Z'/%3E%3C/svg%3E") repeat-x 0 0 / 50% 10px, linear-gradient(#000 0 0) no-repeat 0 9px / 100% 100%;
  transition: height .9s cubic-bezier(.65, 0, .35, 1);
}
.lens .liquid::before { height: calc(var(--level) + 5%); background: rgb(255 122 0 / .38); animation: wave 9s linear infinite reverse; }
.lens .liquid::after { background: linear-gradient(#FFB800, #FF7A00 40%, #FF3D00); animation: wave 6.5s linear infinite; }
.lens::after { /* highlight across the top, over the liquid */
  content: ""; position: absolute; left: 15%; top: 8%; width: 66%; height: 33%; border-radius: 50%; pointer-events: none;
  background: linear-gradient(var(--shine), transparent);
}
.lens svg { position: relative; z-index: 1; width: 34%; height: 34%; stroke-width: 2.2; transform: translateY(-9%); transition: color .4s ease .2s; }
.lens:hover, .lens:focus-visible { --level: 80%; color: #fff; box-shadow: 0 0 0 1px var(--border), inset 0 0 0 1px var(--rim-5), 0 0 60px rgb(255 90 0 / .55), 0 26px 44px -18px var(--shadow); }
.lens:active { transform: scale(.95, .92); transition-duration: .1s; }
@keyframes wave { to { transform: translateX(-50%); } }

/* ── Phone mock-up: drawn here, the screen is a real app screenshot in the page's theme ── */
.phone {
  --w: 280px;
  position: relative; width: var(--w); max-width: 100%; flex: none; padding: calc(var(--w) * .035); border-radius: calc(var(--w) * .16);
  background: linear-gradient(145deg, var(--frame-3), var(--frame-1) 18%, var(--frame-2) 55%, var(--frame-1));
  box-shadow: inset 0 0 0 1px var(--frame-edge), inset 0 0 0 calc(var(--w) * .012) rgb(0 0 0 / .55), 0 50px 70px -36px var(--shadow), 0 18px 30px -18px var(--shadow);
}
/* Side buttons: volume on the left, power on the right */
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: var(--frame-2); }
.phone::before { left: -2px; top: 22%; height: 11%; }
.phone::after { right: -2px; top: 28%; height: 7%; }
.screen {
  position: relative; display: block; overflow: hidden; aspect-ratio: 360 / 780;
  border-radius: calc(var(--w) * .13); background: var(--bg);
  isolation: isolate;
}
.screen::after { /* punch-hole camera */
  content: ""; position: absolute; z-index: 2; left: 50%; top: 1.6%; width: 3.6%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3a4152, #05060a 60%);
}
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.screen .shot-dark { opacity: 0; }
[data-theme="dark"] .screen .shot-dark { opacity: 1; }
[data-theme="dark"] .screen .shot-light { opacity: 0; }

/* ── Feature rows: text + phone ────────────────────────────────────────── */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin: 72px 0; }
.feature .phone { --w: 270px; justify-self: center; }
.feature.flip .text { order: 2; }
.feature h2, h2.after-kicker { margin-top: 12px; }
#platforms { margin-top: 72px; }
.feature .lead { margin-bottom: 18px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.kicker .ic { width: 18px; height: 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; margin: 0; align-items: flex-start; }
.ticks .ic { width: 22px; height: 22px; padding: 4px; margin-top: 1px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); stroke-width: 3; }

.platform-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); margin-top: 18px; }
.tile { padding: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: transform .25s ease; }
.tile:hover { color: var(--text); transform: translateY(-3px); }
.tile .icon { width: 48px; height: 48px; border-radius: var(--r-field); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.tile .icon .ic { width: 24px; height: 24px; }
.tile p { color: var(--muted); font-size: 15px; margin: 0; }
.tile .go { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 15px; color: var(--accent); }

.feat { display: flex; flex-direction: column; gap: 4px; }
.feat .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.feat b { display: block; font-size: 17px; }
.feat span { color: var(--muted); font-size: 15px; }

/* ── Steps ─────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.steps li { counter-increment: s; padding: 20px 22px; margin: 0; }
.steps li > b::before {
  content: counter(s); display: flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--btn-glass); color: var(--btn-text); box-shadow: var(--btn-rim); font-weight: 600; font-size: 15px; margin-bottom: 12px;
}
.steps b { display: block; margin-bottom: 4px; font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }

/* ── Connecting a client: tabs without scripts, steps on a line ─────────── */
.clients { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.clients > input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.clients > label { order: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 500; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.clients > input:checked + label { background: var(--btn-glass); color: var(--btn-text); box-shadow: var(--btn-rim); }
.clients > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.clients > .client { order: 1; width: 100%; display: none; margin-top: 12px; }
.clients > input:checked + label + .client { display: block; }
.line-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.line-steps li { counter-increment: s; position: relative; padding: 0 0 24px 46px; margin: 0; }
.line-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; display: flex; width: 32px; height: 32px; border-radius: 50%;
  align-items: center; justify-content: center; background: var(--btn-glass); color: var(--btn-text); box-shadow: var(--btn-rim); font-weight: 600; font-size: 15px;
}
.line-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--border); }
.line-steps b { display: block; margin-bottom: 4px; font-size: 17px; line-height: 32px; }
.line-steps p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.line-steps .warn-text { color: var(--warn); }

/* ── Support in the cabinet ────────────────────────────────────────────── */
.chat { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.chat li { display: grid; gap: 2px; max-width: 86%; padding: 10px 14px; border-radius: var(--r-field); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); overflow-wrap: anywhere; }
.chat li.mine { justify-self: end; background: var(--accent-soft); box-shadow: none; }

/* ── The Telegram Mini App: the cabinet's pages in Telegram's window ────── */
.tg-back[hidden], .tg-hidden { display: none !important; }
body:not(.tg) .tg-back { display: none; }
body.tg main.wrap { padding: 12px 14px calc(24px + env(safe-area-inset-bottom)); }
body.tg .brand { margin: 2px 0 10px; }
body.tg .brand .mark { display: none; }
body.tg .brand .wm { display: block !important; height: 28px; }
body.tg .brand .wm-dark, [data-theme="dark"] body.tg .brand .wm-light { display: none !important; }
[data-theme="dark"] body.tg .brand .wm-dark { display: block !important; }
body.tg h1 { font-size: 24px; }
body.tg h2[data-tg-sec] { margin-top: 0; }
body.tg .acc-head { margin-bottom: 4px; }
body.tg .acc-grid { grid-template-columns: 1fr; margin-top: 12px; }
body.tg .link-grid { grid-template-columns: 1fr; }
body.tg .qr-card { display: none; }
body.tg .btn { width: 100%; justify-content: center; }
body.tg [data-tg-sec]:not(.tg-on) { display: none; }
.tg-menu { display: grid; gap: 8px; }
.tg-menu a { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: var(--r-tile); color: var(--text); font-size: 16px; }
.tg-menu a .ic { color: var(--accent); }
.tg-menu a > span:first-of-type { flex: 1; }

/* ── Prices ────────────────────────────────────────────────────────────── */
.price { display: flex; flex-direction: column; gap: 2px; }
.price b { font-size: 30px; letter-spacing: -.03em; margin: 4px 0; font-variant-numeric: tabular-nums; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { padding: 0; }
.faq .card + .card { margin-top: 0; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 17px; padding: 18px 56px 18px 22px; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s ease, margin .25s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); white-space: pre-line; }

/* ── Download ──────────────────────────────────────────────────────────── */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.page-head .phone { --w: 150px; transform: rotate(6deg); margin: 0 32px 0 0; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); margin: 24px 0; align-items: stretch; }
.platforms .card + .card { margin-top: 0; }
/* Cards of one row are one height; the last line («обновляется само») sits at the bottom */
.platform { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.platform > p:last-child { margin-top: auto; margin-bottom: 0; }
.platform > .ptitle { align-self: stretch; }
.platform > .howto { margin-top: 4px; } /* margins do not collapse in a flex column */
.platform.mine { box-shadow: var(--card-shadow), 0 0 0 2px var(--accent); }
.ptitle { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ptitle .icon { width: 44px; height: 44px; border-radius: var(--r-field); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ptitle b { font-size: 20px; letter-spacing: -.02em; margin-right: auto; }
.howto { margin-top: 16px; color: var(--muted); font-size: 15px; }
.platform .btn { margin-top: 6px; }

.note { background: var(--accent-soft); border-radius: var(--r-field); padding: 14px 18px; max-width: 680px; }
.narrow { max-width: 460px; margin: 0 auto; }
.key { font-size: 30px; font-weight: 700; letter-spacing: 2px; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.doc { max-width: 720px; }
.doc li { color: var(--text); }

/* ── Forms (the cabinet) ───────────────────────────────────────────────── */
.fields { display: grid; gap: 12px; }
.fields label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.fields.inline { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
input:not([type=hidden]), select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-field);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 400 16px/1.3 var(--font); letter-spacing: -.01em; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
/* Д1 (31.10): the open list draws options on its own background — white in Chrome on Windows, under the dark theme's
   white text. Give them the sheet colour of the theme. */
select option { background-color: var(--sheet); color: var(--text); }
.btn[data-copy] { margin-bottom: 14px; }
textarea.secret { resize: none; font: 400 13px/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace; word-break: break-all; margin-bottom: 12px; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; padding: 0 4px; min-height: 40px; }
.btn.danger:hover { color: var(--danger-hi); filter: none; }
.note.warn { background: var(--warn-soft); color: var(--text); }
.note.ok { background: var(--ok-soft); color: var(--text); }
.narrow .note, .note + .card { margin-bottom: var(--gap); }

/* ── Cabinet ───────────────────────────────────────────────────────────── */
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.acc-head h1 { margin-bottom: 2px; }
.acc-head form { margin-top: 10px; }
/* Д2 (31.10): the cards of one row are one height. */
.acc-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); margin-top: 16px; align-items: stretch; }
.acc-grid .card + .card { margin-top: 0; }
.row-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.row-title b { font-size: 17px; }
#subscription .btn { margin-top: 6px; }
.devices { list-style: none; padding: 0; margin: 0 0 var(--gap); display: grid; gap: 10px; }
.devices li { margin: 0; }
.device { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 14px 18px; }
.device .icon { width: 44px; height: 44px; border-radius: var(--r-field); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dev-main { display: flex; flex-direction: column; min-width: 0; }
.dev-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-edit { grid-column: 1 / -1; }
.dev-edit summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; width: max-content; margin-left: 58px; }
.dev-edit form { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dev-edit form.fields.inline { display: grid; }
#add { margin-top: var(--gap); max-width: 640px; }
.sessions { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.sessions li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; }
.sessions .pill { margin-left: 8px; }
.warn-text { color: var(--warn); }
.big-code { font-size: 1.5rem; letter-spacing: .08em; }
details > summary { cursor: pointer; margin: 8px 0; }
.apple-region { max-width: 680px; margin: 8px 0; }
.apple-region > summary { color: var(--accent); font-weight: 500; }
.apple-region p, .apple-region ol { margin: 8px 0; }
.apple-region ol { padding-left: 20px; }
.invite-code { font-size: 2.2rem; font-weight: 700; letter-spacing: .1em; margin: 6px 0 14px; }
.qr { display: flex; justify-content: center; margin: 14px 0; }
.qr img { padding: 12px; background: #fff; border-radius: var(--r-tile); image-rendering: pixelated; width: 232px; height: 232px; }
.qr-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.link-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.link-grid .card + .card { margin-top: 0; }
.apps { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.apps li { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.apps .btn { min-height: 44px; padding: 0 16px; }
.apps .sep { flex-basis: 100%; margin-top: 4px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 26px; margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.foot-wrap { margin-top: 8px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ── Narrow screens ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 12px; }
  .hero-art { min-height: 0; padding: 12px 0 8px; }
  .hero-art .phone { --w: 260px; transform: none; }
  .hero-art .phone.back, .chip.c2 { display: none; }
  .chip.c1 { right: auto; left: calc(50% + 70px); top: 12%; }
  .feature { grid-template-columns: 1fr; gap: 28px; margin: 56px 0; }
  .feature.flip .text { order: 0; }
  .feature .phone { --w: 250px; }
  .page-head { grid-template-columns: 1fr; }
  .page-head .phone { display: none; }
  .acc-grid, .link-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --pad: 14px; }
  h1 { font-size: 28px; }
  h2 { font-size: 23px; margin-top: 44px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 17px; }
  .top { padding: 8px 0; }
  .top-in { height: 54px; padding: 0 5px 0 12px; gap: 6px; }
  .brand .mark { width: 26px; height: 26px; }
  .brand .wm { height: 28px; }
  nav a { padding: 7px 9px; font-size: 14px; }
  /* Four links do not fit next to the brand: the questions stay on the home page */
  nav a.nav-faq { display: none; }
  .device { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .device .icon { width: 40px; height: 40px; }
  .device > .pill { grid-column: 2; justify-self: start; }
  .dev-edit summary { margin-left: 54px; }
  .fields.inline { grid-template-columns: 1fr; }
  .theme-btn { width: 40px; height: 40px; }
  .cta { gap: 16px; flex-wrap: nowrap; }
  .lens { --s: 112px; }
  .cta-side { min-width: 0; }
  .cta-side b { font-size: 18px; }
  .cta-side .btn { padding: 0 16px; }
  .feat { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
  .feat .icon { grid-row: span 2; margin: 0; }
  .steps li > b::before { display: inline-flex; vertical-align: middle; width: 28px; height: 28px; font-size: 14px; margin: -3px 10px 0 0; }
  .chip.c1 { left: auto; right: 0; top: 6%; padding: 9px 12px; font-size: 13px; }
  .card, .steps li, .platform { padding: 18px; }
  .platforms { grid-template-columns: 1fr; }
  .platform .btn { width: 100%; }
  .foot { padding: 18px 20px; }
}
/* Three links, the wordmark and the theme button do not fit an ordinary phone: the icon stays, the word goes */
@media (max-width: 440px) {
  .brand .wm { display: none !important; }
  .brand .mark { display: block; }
}
@media (max-width: 380px) {
  nav a { padding: 7px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lens .liquid::before, .lens .liquid::after { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
