/* pairble landing page. SPDX-License-Identifier: Apache-2.0
 *
 * Motion is used only where it explains something: the phone walks through
 * what the customer sees, and the diagram shows where the password goes.
 * Both stand still under prefers-reduced-motion. */

:root {
  --bg: #f7f7f4;
  --bg-2: #efefea;
  --surface: #ffffff;
  --line: rgba(20, 22, 30, 0.1);
  --fg: #12141a;
  --muted: #5b6070;
  --accent: #0f7b6c;
  --accent-2: #3a4fd8;
  --accent-3: #8a3ffc;
  --accent-fg: #ffffff;
  --glow-a: rgba(15, 180, 150, 0.18);
  --glow-b: rgba(70, 90, 255, 0.14);
  --ok: #138a4a;
  --warn: #b4531a;
  --code-bg: #10131b;
  --code-bg-2: #171b26;
  --code-fg: #dfe3ee;
  --code-muted: #7c8499;
  --code-kw: #c79bff;
  --code-str: #9ee6a7;
  --code-fn: #7cc7ff;
  --code-num: #ffb86b;
  --code-mac: #5fe0c8;
  --code-cmt: #7c8499;
  --shadow: 0 1px 2px rgba(16, 20, 30, 0.06), 0 12px 32px -12px rgba(16, 20, 30, 0.18);
  --radius: 18px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12;
    --bg-2: #10131a;
    --surface: #141821;
    --line: rgba(255, 255, 255, 0.09);
    --fg: #eef0f5;
    --muted: #a0a6b6;
    --accent: #3ee0c1;
    --accent-2: #7c8cff;
    --accent-3: #b98cff;
    --accent-fg: #06110f;
    --glow-a: rgba(62, 224, 193, 0.16);
    --glow-b: rgba(124, 140, 255, 0.16);
    --ok: #4ade80;
    --warn: #fb923c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --surface: #141821;
  --line: rgba(255, 255, 255, 0.09);
  --fg: #eef0f5;
  --muted: #a0a6b6;
  --accent: #3ee0c1;
  --accent-2: #7c8cff;
  --accent-3: #b98cff;
  --accent-fg: #06110f;
  --glow-a: rgba(62, 224, 193, 0.16);
  --glow-b: rgba(124, 140, 255, 0.16);
  --ok: #4ade80;
  --warn: #fb923c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 750; max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 680; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: 16px; }
.narrow { width: min(820px, 100%); }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

.kicker { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.sub { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 1.05rem; }
main > section { padding-block: clamp(64px, 9vw, 120px); }

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

.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 16px; height: 60px; width: min(1160px, 100%); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .top-in { padding-inline: 32px; } }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 760; font-size: 1.12rem; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; fill: var(--accent); }
.brand-mark .alt { fill: var(--accent-2); opacity: 0.85; }
.brand-mark circle { fill: var(--accent-3); }
.nav { display: none; gap: 4px; margin-inline-start: 12px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.94rem; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--fg); background: var(--bg-2); }
@media (min-width: 980px) { .nav { display: flex; } }
.tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; height: 38px; background: var(--surface); }
.lang svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: none; }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 0.92rem; padding: 0 2px; max-width: 9.5rem; cursor: pointer; }
.lang select:focus-visible { outline: none; }
.lang:focus-within { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .moon { display: block; }
}
.gh { display: none; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-size: 0.9rem; }
.gh:hover { border-color: currentColor; }
.gh svg { width: 17px; height: 17px; fill: currentColor; }
@media (min-width: 620px) { .gh { display: inline-flex; } }

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

.hero { position: relative; padding-top: clamp(40px, 7vw, 96px); overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(10px);
}
.hero::before { width: 780px; height: 780px; inset-block-start: -360px; inset-inline-end: -220px; background: radial-gradient(closest-side, var(--glow-a), transparent); }
.hero::after { width: 680px; height: 680px; inset-block-start: 120px; inset-inline-start: -300px; background: radial-gradient(closest-side, var(--glow-b), transparent); }
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.hero h1 { font-size: clamp(2.5rem, 1.35rem + 5vw, 4.9rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; margin-top: 22px; max-width: 14ch; text-wrap: balance; }
.grad { background: linear-gradient(100deg, var(--accent) 5%, var(--accent-2) 55%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.25rem); color: var(--muted); margin-top: 24px; max-width: 56ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 650; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: transparent; }
.soon { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.soon::before { content: "→ "; color: var(--accent); }
.badges { margin-top: 22px; font: 500 0.82rem/1.6 var(--mono); color: var(--muted); }

/* ---- the phone ----------------------------------------------------------- */

.phone { margin: 0 auto; position: relative; width: min(300px, 82vw); }
.phone-body {
  position: relative; aspect-ratio: 300 / 610; border-radius: 46px; padding: 14px;
  background: linear-gradient(145deg, #2a2f3b, #0f1117);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.08) inset, 0 40px 80px -30px rgba(10, 20, 40, 0.55), 0 18px 36px -18px rgba(10, 20, 40, 0.4);
}
.notch { position: absolute; top: 24px; left: 50%; translate: -50% 0; width: 88px; height: 24px; border-radius: 14px; background: #06070a; z-index: 3; }
.screen {
  position: absolute; inset: 14px; border-radius: 34px; padding: 64px 20px 24px;
  background: #f4f5f7; color: #16181f; display: flex; flex-direction: column; gap: 14px;
  opacity: 0; transform: scale(0.98); transition: opacity 0.45s ease, transform 0.45s ease;
  overflow: hidden; font-size: 14px; line-height: 1.4;
}
.phone[data-step="1"] .s-scan, .phone[data-step="2"] .s-list, .phone[data-step="3"] .s-pass, .phone[data-step="4"] .s-done, .phone:not([data-step]) .s-list { opacity: 1; transform: none; }
.s-scan { background: #0d0f14; color: #e9ecf3; align-items: center; text-align: center; }
.viewfinder { position: relative; width: 170px; height: 170px; margin-top: 18px; border-radius: 22px; display: grid; place-items: center; }
.viewfinder::before { content: ""; position: absolute; inset: 0; border-radius: 22px; border: 3px solid #ffd60a; -webkit-mask: linear-gradient(#000 0 0) top/100% 26% no-repeat, linear-gradient(#000 0 0) bottom/100% 26% no-repeat; mask: linear-gradient(#000 0 0) top/100% 26% no-repeat, linear-gradient(#000 0 0) bottom/100% 26% no-repeat; }
.qr-mini {
  width: 112px; height: 112px; border-radius: 6px; background-color: #fff;
  background-image:
    linear-gradient(#111 0 0), linear-gradient(#111 0 0), linear-gradient(#111 0 0),
    repeating-conic-gradient(#111 0 25%, #fff 0 50%);
  background-size: 30px 30px, 30px 30px, 30px 30px, 16px 16px;
  background-position: 8px 8px, calc(100% - 8px) 8px, 8px calc(100% - 8px), center;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  box-shadow: 0 0 0 8px #fff;
}
.scanline { position: absolute; left: 14px; right: 14px; height: 2px; background: #ffd60a; box-shadow: 0 0 12px #ffd60a; top: 20%; }
.phone[data-step="1"] .scanline { animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { to { top: 80%; } }
.clip-card { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255, 255, 255, 0.96); color: #111; padding: 14px; border-radius: 18px; transform: translateY(140%); transition: transform 0.5s cubic-bezier(.2,.8,.2,1) 0.9s; }
.phone[data-step="1"] .clip-card { transform: none; }
.pill { display: inline-flex; align-items: center; justify-content: center; background: #0a7aff; color: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 650; font-size: 13px; }
.pill.wide { width: 100%; padding: 12px; margin-top: auto; font-size: 15px; position: relative; }
.scr-title { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.nets { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 14px; overflow: hidden; }
.nets li { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; border-bottom: 1px solid #eceef2; transition: background 0.3s ease 0.9s; }
.nets li:last-child { border-bottom: 0; }
.phone[data-step="2"] .nets .pick { background: #e5f1ff; }
.bars { width: 18px; height: 13px; background: linear-gradient(to right, #16181f 0 3px, transparent 3px 5px, #16181f 5px 8px, transparent 8px 10px, #16181f 10px 13px, transparent 13px 15px, #16181f 15px 18px); -webkit-mask: linear-gradient(to top right, #000 50%, transparent 50%); mask: linear-gradient(to top right, #000 50%, transparent 50%); }
.bars.b3 { opacity: 0.75; } .bars.b2 { opacity: 0.45; }
.field { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 12px; color: #5b6070; }
.typed { font-size: 16px; letter-spacing: 2px; color: #16181f; clip-path: inset(0 100% 0 0); }
.phone[data-step="3"] .typed { animation: type 1.2s steps(10) 0.3s forwards; }
@keyframes type { to { clip-path: inset(0 0 0 0); } }
.join .joining { display: none; }
.phone[data-step="3"] .join { animation: press 0.01s 1.7s forwards; }
@keyframes press { to { background: #5aa2ff; } }
.s-done { align-items: center; justify-content: center; text-align: center; }
.check svg { width: 96px; height: 96px; fill: none; stroke: #16a34a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 132; stroke-dashoffset: 132; }
.check path { stroke-dasharray: 34; stroke-dashoffset: 34; }
.phone[data-step="4"] .check circle { animation: draw 0.6s ease forwards; }
.phone[data-step="4"] .check path { animation: draw 0.4s ease 0.45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.phone-steps { display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.phone-steps button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 0.8rem var(--mono); cursor: pointer; }
.phone-steps button[aria-current="step"] { background: var(--fg); color: var(--bg); border-color: transparent; }

/* ---- how it works ---------------------------------------------------------- */

.how { background: var(--bg-2); border-block: 1px solid var(--line); }
.how-grid { display: grid; gap: 40px; margin-top: 48px; }
@media (min-width: 960px) { .how-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: 56px; } }
.flow {
  position: sticky; top: 76px; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 32px); overflow: hidden;
}
.flow-row { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 6px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--muted); position: relative; min-width: 58px; }
.node svg { width: clamp(42px, 8vw, 60px); height: auto; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; padding: 8px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); box-sizing: content-box; transition: border-color 0.4s ease, box-shadow 0.4s ease; }
.node .chip { fill: var(--bg); }
.device-node .state { position: absolute; top: 100%; margin-top: 6px; left: 50%; translate: -50% 0; white-space: nowrap; }
.flow-row { padding-bottom: 28px; }
.state { font-style: normal; font: 600 0.68rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.state .on { display: none; }
.flow[data-stage="4"] .state { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.flow[data-stage="4"] .state .off { display: none; }
.flow[data-stage="4"] .state .on { display: inline; }
.link { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px); margin-bottom: 26px; }
.link-label { position: absolute; top: 12px; left: 0; right: 0; font: 500 0.66rem/1.25 var(--mono); color: var(--muted); text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.packet { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; opacity: 0; inset-inline-start: 0; }
.p-out { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.p-back { background: var(--accent-2); box-shadow: 0 0 14px var(--accent-2); inset-inline-start: calc(100% - 14px); }
.flow[data-stage="2"] .p-out { animation: to-end 1.3s ease-in-out infinite; }
.flow[data-stage="3"] .p-back { animation: to-start 1.3s ease-in-out infinite; }
.flow[data-stage="4"] .p-out { animation: to-end 1.3s ease-in-out infinite; }
.flow[data-stage="4"] .p-out::after { content: ""; position: absolute; inset: 3px; border-radius: 2px; background: var(--accent-fg); -webkit-mask: linear-gradient(#000 0 0) bottom/100% 55% no-repeat; mask: linear-gradient(#000 0 0) bottom/100% 55% no-repeat; }
@keyframes to-end { 0% { opacity: 0; inset-inline-start: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; inset-inline-start: calc(100% - 14px); } }
@keyframes to-start { 0% { opacity: 0; inset-inline-start: calc(100% - 14px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; inset-inline-start: 0; } }
.link-wifi { background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px); }
.wave { position: absolute; inset: -1px 0; background: linear-gradient(90deg, var(--ok), var(--accent)); transform-origin: left; transform: scaleX(0); transition: transform 0.9s ease 1s; }
[dir="rtl"] .wave { transform-origin: right; }
.flow[data-stage="4"] .wave { transform: scaleX(1); }
.flow[data-stage="4"] .router-node svg, .flow[data-stage="4"] .device-node svg { border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent); }
.flow[data-stage="2"] .device-node svg, .flow[data-stage="3"] .device-node svg { border-color: var(--accent); }
.flow[data-stage="1"] .phone-node svg { border-color: var(--accent); }
.qr-drop { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 0.85rem; color: var(--muted); opacity: 0.35; transition: opacity 0.4s ease; }
.qr-drop .qr-mini { width: 38px; height: 38px; background-size: 11px 11px, 11px 11px, 11px 11px, 6px 6px; background-position: 3px 3px, calc(100% - 3px) 3px, 3px calc(100% - 3px), center; box-shadow: 0 0 0 3px #fff; border: 1px solid var(--line); }
.flow[data-stage="1"] .qr-drop { opacity: 1; }
.captions { list-style: none; padding: 0; margin: 18px 0 0; min-height: 3.2em; position: relative; }
.captions li { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease; font-weight: 600; }
.flow[data-stage="1"] .captions li:nth-child(1), .flow[data-stage="2"] .captions li:nth-child(2),
.flow[data-stage="3"] .captions li:nth-child(3), .flow[data-stage="4"] .captions li:nth-child(4) { opacity: 1; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 22px 22px 22px 70px; border-radius: 18px; border: 1px solid transparent; transition: background 0.3s ease, border-color 0.3s ease; }
[dir="rtl"] .steps li { padding: 22px 70px 22px 22px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 18px; top: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 700 0.95rem var(--mono); background: var(--surface); border: 1px solid var(--line); }
.steps li.active { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.steps li.active::before { background: var(--fg); color: var(--bg); border-color: transparent; }
.steps p { color: var(--muted); margin-top: 8px; }
@media (min-width: 960px) { .steps li { min-height: 36vh; display: flex; flex-direction: column; justify-content: center; } }

/* ---- features ------------------------------------------------------------ */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; margin-top: 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.ficon { width: 42px; height: 42px; padding: 9px; border-radius: 12px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.card .thin { stroke-width: 1.4; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card b { color: var(--fg); font-weight: 650; }
.card .ex { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.92rem; }

/* ---- code ---------------------------------------------------------------- */

.tabs { display: flex; gap: 6px; margin-top: 40px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 0.93rem; font-weight: 600; padding: 9px 16px; border-radius: 12px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: transparent; }
.panel { display: grid; gap: 24px; margin-top: 20px; }
.panel[hidden] { display: none; }
@media (min-width: 960px) { .panel { grid-template-columns: 0.75fr 1.25fr; gap: 40px; } }
.panel-text p { color: var(--muted); margin-top: 12px; }
.panel-text .note { font-size: 0.92rem; font-style: italic; }
.panel-code { display: grid; gap: 12px; min-width: 0; }
.codebox, .outbox { border-radius: 16px; overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: var(--shadow); }
.outbox { background: #0a0c11; }
.codebar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 16px; background: var(--code-bg-2); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.lang-tag { font: 600 0.72rem/1 var(--mono); color: var(--code-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.copy { border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: var(--code-fg); font: 600 0.8rem var(--sans); padding: 6px 12px; border-radius: 8px; cursor: pointer; min-width: 5.5rem; }
.copy:hover { background: rgba(255, 255, 255, 0.07); }
.copy.done { color: var(--code-str); border-color: currentColor; }
pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 0.86rem/1.65 var(--mono); color: var(--code-fg); tab-size: 4; direction: ltr; text-align: left; }
pre code { font-size: inherit; }
.out { color: #b9c0d0; }
.hl .k { color: var(--code-kw); } .hl .s { color: var(--code-str); } .hl .f { color: var(--code-fn); }
.hl .n { color: var(--code-num); } .hl .m { color: var(--code-mac); } .hl .c { color: var(--code-cmt); font-style: italic; }
.hl .p { color: var(--code-kw); } .hl .o { color: var(--code-fn); }

.config { margin-top: 72px; }
.config h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 640px; }
th, td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td:nth-child(3) { color: var(--muted); }
td code { white-space: nowrap; }

/* ---- guides --------------------------------------------------------------- */

.guides { background: var(--bg-2); border-block: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin-top: 48px; }
.guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.guide .sub { font-size: 0.96rem; margin-top: 8px; }
.guide ol { list-style: none; counter-reset: g; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.guide li { counter-increment: g; position: relative; padding-inline-start: 38px; font-size: 0.95rem; }
.guide li::before { content: counter(g); position: absolute; inset-inline-start: 0; top: 1px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font: 700 0.75rem var(--mono); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---- FAQ ------------------------------------------------------------------- */

.faq h2 { margin-bottom: 36px; }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 650; font-size: 1.06rem; position: relative; }
[dir="rtl"] summary { padding: 20px 0 20px 40px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; inset-inline-end: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { color: var(--muted); padding-bottom: 22px; max-width: 70ch; }

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

.foot { border-top: 1px solid var(--line); padding-block: 40px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: end; }
.foot p { color: var(--muted); margin-top: 8px; font-size: 0.94rem; }
.fine { font-size: 0.85rem; }
.fine span { white-space: nowrap; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .phone[data-step="1"] .scanline { animation: none; }
  .packet { display: none; }
  /* The end of each little story, drawn at once. */
  .typed { clip-path: none; }
  .clip-card { transform: none; }
  .check circle, .check path { stroke-dashoffset: 0; animation: none !important; }
}

/* ---- text pages (privacy, support) -------------------------------------------- */

.doc { padding-block: clamp(48px, 7vw, 96px); }
.doc h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; }
.doc .updated { color: var(--muted); font: 500 0.82rem var(--mono); margin-top: 18px; }
.doc section { margin-top: 44px; }
.doc h2 { font-size: 1.35rem; max-width: none; }
.doc section p { color: var(--muted); margin-top: 12px; max-width: 68ch; }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.mail { font-weight: 650; }
.fine a { color: inherit; }
