/* SeamDroid site — tokens from DESIGN/ (Authkit "frosted glass at midnight").
   Font substitutes: Inter (body), Manrope (display — Space Grotesk has no Cyrillic), JetBrains Mono (eyebrows/code). */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-cyrillic.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-cyrillic.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-cyrillic.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  color-scheme: dark;

  --color-midnight-canvas: #05060f;
  --color-steel-plate: #2f343e;
  --color-fog-veil: #9da7ba;
  --color-moon-mist: #c7d3ea;
  --color-frost-glow: #d1e4fa;
  --color-ice-highlight: #d8ecf8;
  --gradient-ice-highlight: linear-gradient(180deg, #d8ecf8 0%, #98c0ef 100%);
  --color-pure-white: #ffffff;
  --color-void-violet: #663af3;
  --color-deep-teal: #269684;

  --glass-edge: rgba(186, 215, 247, 0.12);
  --glass-edge-strong: rgba(186, 214, 247, 0.24);
  --frost-wash: rgba(186, 214, 247, 0.06);
  --frost-wash-hover: rgba(186, 214, 247, 0.12);
  --surface-glass: rgba(186, 214, 247, 0.03);
  --surface-deep: rgba(5, 6, 15, 0.97);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-badges: 6px;
  --radius-inputs: 6px;
  --radius-cards: 16px;
  --radius-buttons: 999px;

  --shadow-feature: inset 0 1px 1px rgba(199, 211, 234, 0.12), inset 0 24px 48px rgba(199, 211, 234, 0.05), 0 24px 32px rgba(6, 6, 14, 0.7);
  --shadow-modal: inset 0 1px 1px rgba(216, 236, 248, 0.2), inset 0 24px 48px rgba(168, 216, 245, 0.06), 0 16px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(199, 211, 234, 0.08);
  --shadow-hairline: inset 0 0 0 1px var(--glass-edge);

  --page-max-width: 1200px;
  --section-gap: 120px;
  --gutter: 24px;
  --transition: 160ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-midnight-canvas);
  color: var(--color-frost-glow);
  font: 400 16px/1.5 var(--font-sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: var(--color-frost-glow); text-decoration-color: var(--glass-edge-strong); text-underline-offset: 3px; transition: color var(--transition), text-decoration-color var(--transition); }
a:hover { color: var(--color-pure-white); text-decoration-color: currentColor; }
/* Read by screen readers and search engines, not shown. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--color-frost-glow); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--font-mono); font-size: 0.88em; color: var(--color-ice-highlight); }
p code, li code { background: rgba(199, 211, 234, 0.08); padding: 1px 6px; border-radius: var(--radius-badges); }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: var(--page-max-width); margin: 0 auto; padding: 0 var(--gutter); }

/* Ambient layer: blueprint grid + conic spotlight */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(124, 145, 182, 0.18), transparent 70%),
    conic-gradient(from 180deg at 50% -8%, transparent 44%, rgba(124, 145, 182, 0.22) 48.5%, rgba(124, 145, 182, 0.4) 50%, rgba(124, 145, 182, 0.22) 51.5%, transparent 56%),
    linear-gradient(var(--color-midnight-canvas), var(--color-midnight-canvas));
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(186, 215, 247, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(186, 215, 247, 0.06) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 85%);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(5, 6, 15, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(186, 215, 247, 0.08);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 16px; color: var(--color-frost-glow); text-decoration: none; }
.brand-sm { font-size: 14px; gap: 8px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 6px 12px; border-radius: var(--radius-buttons); font-size: 14px; color: var(--color-moon-mist); text-decoration: none; }
.nav a:hover { color: var(--color-pure-white); background: var(--frost-wash); }
/* "More": the topic pages and the changelog, a drop-down on computers */
.nav-more { position: relative; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 12px; border: 0; border-radius: var(--radius-buttons);
  background: transparent; font: 400 14px/1.5 var(--font-sans); letter-spacing: -0.01em; color: var(--color-moon-mist); cursor: pointer; }
.nav-more-btn .i { width: 14px; height: 14px; transition: transform var(--transition); }
.nav-more-btn:hover, .nav-more-btn[aria-expanded="true"], .nav-more-btn[data-current] { color: var(--color-pure-white); background: var(--frost-wash); }
.nav-more-btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.nav-more-list { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; padding: 6px; flex-direction: column; gap: 2px;
  border-radius: 12px; background: var(--color-midnight-canvas); box-shadow: var(--shadow-modal), 0 24px 32px rgba(0, 0, 0, 0.5); }
.nav-more.open .nav-more-list { display: flex; }
.nav .nav-more-list a { padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--color-pure-white); }

/* Phones: the sections fold into a menu under this button */
.menu-btn { display: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-buttons);
  background: transparent; color: var(--color-frost-glow); box-shadow: var(--shadow-hairline); cursor: pointer; transition: background var(--transition); }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--frost-wash); }
.lang { padding: 6px 10px; border-radius: var(--radius-buttons); font: 500 12px/1.2 var(--font-mono); letter-spacing: 0.08em; color: var(--color-moon-mist); text-decoration: none; box-shadow: var(--shadow-hairline); }
.lang:hover { color: var(--color-pure-white); background: var(--frost-wash); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-buttons); border: 0;
  font: 500 15px/1.2 var(--font-sans); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition), transform var(--transition);
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--color-void-violet); color: var(--color-pure-white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px rgba(102, 58, 243, 0.28); }
.btn-primary:hover { background: #7350f5; color: var(--color-pure-white); }
.btn-ghost { background: var(--frost-wash); color: var(--color-pure-white); box-shadow: var(--shadow-hairline); }
.btn-ghost:hover { background: var(--frost-wash-hover); color: var(--color-pure-white); }
.btn-outline { background: transparent; color: var(--color-frost-glow); box-shadow: var(--shadow-hairline); }
.btn-outline:hover { background: var(--frost-wash); color: var(--color-pure-white); }
.btn:active { transform: translateY(1px); }

/* Glass surfaces */
.glass { background: var(--surface-glass); border-radius: var(--radius-cards); box-shadow: var(--shadow-feature); }

/* Eyebrow with fading lines */
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 0 20px;
  font: 400 13px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-moon-mist);
  font-feature-settings: "tnum" on;
}
.eyebrow::before, .eyebrow::after { content: ""; height: 1px; width: 72px; flex: 0 1 72px; }
.eyebrow::before { background: linear-gradient(90deg, transparent, var(--glass-edge)); }
.eyebrow::after { background: linear-gradient(90deg, var(--glass-edge), transparent); }

/* Hero */
.hero { position: relative; padding: 96px 0 40px; overflow: clip; }
.hero-copy { text-align: center; }
.wordmark {
  margin: 0; font: 500 clamp(64px, 13vw, 168px)/1 var(--font-display); letter-spacing: -0.035em;
  background: var(--gradient-ice-highlight); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(186, 207, 247, 0.22)) drop-shadow(0 0 24px rgba(238, 186, 247, 0.12));
  padding-bottom: 0.06em;
}
.lead { max-width: 640px; margin: 24px auto 0; font-size: 18px; line-height: 1.55; color: var(--color-moon-mist); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-meta { margin: 20px 0 0; font: 400 12px/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--color-fog-veil); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-fog-veil); flex: none; }
.dot-live { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }

/* Hero stage: three floating glass cards in a fan */
.stage {
  position: relative; max-width: 1040px; height: 600px; margin: 72px auto 0; padding: 0 var(--gutter);
  display: flex; justify-content: center; align-items: flex-start;
}
.float-card { position: absolute; background: var(--surface-deep); box-shadow: var(--shadow-modal); padding: 20px; }
.card-center { position: relative; z-index: 2; width: 340px; padding: 0; overflow: hidden; }
.card-left { z-index: 1; width: 300px; top: 70px; left: calc(50% - 470px); transform: rotate(-6deg); }
.card-right { z-index: 1; width: 280px; top: 120px; right: calc(50% - 460px); transform: rotate(5deg); }
@media (prefers-reduced-motion: no-preference) {
  .card-left { animation: bob-l 9s ease-in-out infinite; }
  .card-right { animation: bob-r 10s ease-in-out infinite; }
  @keyframes bob-l { 50% { transform: rotate(-6deg) translateY(-8px); } }
  @keyframes bob-r { 50% { transform: rotate(5deg) translateY(-10px); } }
}

.mini-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.app-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--frost-wash-hover); color: var(--color-frost-glow); }
.app-ic .i { width: 15px; height: 15px; }
.mini-title { font-size: 13px; font-weight: 500; color: var(--color-moon-mist); }
.mini-time { margin-left: auto; font-size: 12px; color: var(--color-fog-veil); }
.note-from { margin: 0; font-weight: 600; font-size: 15px; color: var(--color-pure-white); }
.note-text { margin: 4px 0 16px; font-size: 14px; line-height: 1.43; color: var(--color-moon-mist); }
.reply { display: flex; gap: 8px; }
.reply-input {
  flex: 1; min-width: 0; padding: 9px 10px; border-radius: var(--radius-inputs); font-size: 13px; color: var(--color-pure-white);
  background: rgba(199, 211, 234, 0.06); box-shadow: inset 0 0 0 1px var(--glass-edge-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-violet { padding: 9px 14px; border-radius: var(--radius-inputs); background: var(--color-void-violet); color: #fff; font-size: 13px; font-weight: 500; }

.win-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; box-shadow: 0 1px 0 rgba(186, 215, 247, 0.08); }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(199, 211, 234, 0.18); }
.win-title { font-size: 13px; color: var(--color-moon-mist); }
.win-badge { margin-left: auto; font: 400 11px/1 var(--font-mono); padding: 4px 6px; border-radius: var(--radius-badges); background: rgba(199, 211, 234, 0.12); color: var(--color-frost-glow); }
.phone { padding: 18px 64px 6px; }
.phone-screen {
  position: relative; aspect-ratio: 9 / 19; border-radius: 26px; padding: 12px 16px; overflow: hidden;
  background:
    radial-gradient(120% 60% at 20% 0%, rgba(102, 58, 243, 0.55), transparent 60%),
    radial-gradient(100% 60% at 100% 100%, rgba(38, 150, 132, 0.45), transparent 60%),
    linear-gradient(180deg, #11142a, #070912);
  box-shadow: inset 0 0 0 1px rgba(216, 236, 248, 0.14), 0 0 0 6px #0b0d19, 0 0 0 7px rgba(186, 215, 247, 0.12);
}
.ps-status { display: flex; justify-content: space-between; font: 500 10px/1 var(--font-sans); color: rgba(255, 255, 255, 0.85); letter-spacing: 0.02em; }
.ps-clock { margin-top: 34px; text-align: center; font: 300 54px/1 var(--font-display); color: #fff; letter-spacing: -0.03em; }
.ps-date { margin-top: 6px; text-align: center; font-size: 11px; color: rgba(255, 255, 255, 0.75); }
.ps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 14px; margin-top: 74px; }
.ps-grid i, .ps-dock i { aspect-ratio: 1; border-radius: 30%; background: rgba(216, 236, 248, 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.ps-dock { position: absolute; left: 12px; right: 12px; bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 10px 12px; border-radius: 22px; background: rgba(216, 236, 248, 0.08); }
.win-nav { display: flex; justify-content: center; gap: 48px; padding: 12px 0 16px; color: var(--color-fog-veil); font-size: 15px; }

.clip { display: block; padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius-inputs); background: rgba(199, 211, 234, 0.06); box-shadow: inset 0 0 0 1px var(--glass-edge); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sync-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-moon-mist); }

/* Sections */
.section { padding: calc(var(--section-gap) / 2) 0; margin-top: calc(var(--section-gap) / 2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 {
  margin: 0; font: 500 clamp(32px, 5vw, 48px)/1.15 var(--font-display); letter-spacing: -0.025em;
  background: var(--gradient-ice-highlight); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lead { max-width: 640px; margin: 16px auto 0; font-size: 17px; color: var(--color-moon-mist); }
h3 { margin: 0; font: 500 18px/1.33 var(--font-sans); color: var(--color-ice-highlight); letter-spacing: -0.01em; }

.tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--color-frost-glow);
  background: var(--frost-wash); box-shadow: inset 0 1px 1px rgba(216, 236, 248, 0.2), inset 0 0 0 1px var(--glass-edge), 0 0 24px rgba(182, 217, 252, 0.06); }
.tile .i { width: 24px; height: 24px; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 28px 24px;
  transition: background var(--transition), transform var(--transition); }
/* The whole card opens the feature's page: the title's link covers it */
.feature-link { color: inherit; text-decoration: none; }
.feature-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-cards); }
.feature-link:focus-visible { outline: none; }
.feature-link:focus-visible::after { outline: 2px solid var(--color-frost-glow); outline-offset: 3px; }
.feature:hover .feature-link { color: var(--color-pure-white); }
.feature .feat-more { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--color-fog-veil); transition: color var(--transition); }
.feature:hover .feat-more { color: var(--color-ice-highlight); }
.feature:hover { background: rgba(186, 214, 247, 0.05); transform: translateY(-2px); }
.feature .tile { margin-bottom: 20px; }
/* "Full mode" / "Subscription" mark on a feature card */
.feat-tag { display: inline-block; margin-top: 8px; padding: 4px 8px; border-radius: var(--radius-badges);
  font: 400 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-fog-veil); background: rgba(199, 211, 234, 0.08); }
.feature p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--color-fog-veil); }

/* Screenshots: the phone window and the settings, one tab at a time */
.shots { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; }
.shot-phone img { border-radius: 14px; box-shadow: var(--shadow-feature), 0 0 0 1px var(--glass-edge); }
.shots figcaption { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--color-fog-veil); }
.shot-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.shot-tabs button { padding: 7px 14px; border: 0; border-radius: var(--radius-buttons); background: transparent; cursor: pointer;
  font: 500 14px/1.2 var(--font-sans); color: var(--color-moon-mist); box-shadow: var(--shadow-hairline);
  transition: background var(--transition), color var(--transition); }
.shot-tabs button:hover { color: var(--color-pure-white); background: var(--frost-wash); }
.shot-tabs [aria-selected="true"] { color: var(--color-pure-white); background: var(--frost-wash-hover); box-shadow: inset 0 0 0 1px var(--glass-edge-strong); }
.shot-panel img { filter: drop-shadow(0 24px 32px rgba(6, 6, 14, 0.7)); }
#shot-tray img { width: auto; max-width: 100%; margin: 24px auto; }

/* Why SeamDroid */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.why { padding: 28px 24px; }
.why .tile { width: 48px; height: 48px; margin-bottom: 18px; }
.why .tile .i { width: 22px; height: 22px; }
.why p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--color-fog-veil); }

/* Closing call to action */
.cta-card { text-align: center; padding: 72px 32px; box-shadow: var(--shadow-modal);
  background: radial-gradient(60% 90% at 50% 0%, rgba(102, 58, 243, 0.18), transparent 70%), var(--surface-glass); }
.cta-card h2 { margin: 0; font: 500 clamp(30px, 4.5vw, 44px)/1.15 var(--font-display); letter-spacing: -0.025em;
  background: var(--gradient-ice-highlight); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-card p { margin: 12px 0 0; color: var(--color-moon-mist); font-size: 17px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.step { padding: 28px 24px; }
.step-n { display: inline-block; margin-bottom: 18px; font: 400 13px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--color-fog-veil); padding: 6px 8px; border-radius: var(--radius-badges); background: rgba(199, 211, 234, 0.08); }
.step p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--color-fog-veil); }
.note { max-width: 760px; margin: 28px auto 0; text-align: center; font-size: 14px; color: var(--color-fog-veil); }

/* Downloads */
.downloads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 880px; margin: 0 auto; }
/* Wide card: name and format on the left, download button on the right, details below. */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; padding: 28px 32px; min-width: 0; }
.dl > :not(.dl-head):not(.btn) { grid-column: 1 / -1; }
.dl > .btn { min-width: 200px; }
.dl-head { display: flex; align-items: center; gap: 14px; }
.tile-sm { width: 44px; height: 44px; }
.tile-sm .i { width: 20px; height: 20px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; font: 400 12px/1.3 var(--font-mono); color: var(--color-fog-veil); }
.dl-meta span:empty { display: none; }
.btn-block { width: auto; }
.dl .code { font-size: 12.5px; line-height: 1.7; padding: 16px 130px 16px 18px;
  overflow-x: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
/* One command per line; a wrapped tail is indented under its command. */
.dl .code .cmd { display: block; padding-left: 2ch; text-indent: -2ch; }
.dl .code .cmd + .cmd { margin-top: 8px; }
.dl-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-fog-veil); }
.dl-sum { margin: 0; padding-top: 14px; box-shadow: 0 -1px 0 var(--glass-edge); font: 400 11px/1.4 var(--font-mono); color: var(--color-fog-veil); overflow-wrap: anywhere; }
.dl-sum:empty { display: none; }
.dl-alt { margin: 0; font-size: 14px; color: var(--color-moon-mist); }
.dl-alt [data-size]:not(:empty)::before { content: " · "; }
.dl-alt [data-size] { font: 400 12px/1 var(--font-mono); color: var(--color-fog-veil); }
.checksums { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--color-fog-veil); }

.code {
  position: relative; margin: 0; padding: 18px 20px; padding-right: 120px; border-radius: 12px; overflow-x: auto;
  background: rgba(3, 4, 10, 0.85); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 1px rgba(216, 236, 248, 0.08);
  font: 400 13.5px/1.75 var(--font-mono); color: var(--color-ice-highlight); white-space: pre;
}
.code code { font-size: inherit; }
.copy {
  position: absolute; top: 12px; right: 12px; padding: 6px 12px; border: 0; border-radius: var(--radius-buttons);
  background: var(--frost-wash); box-shadow: var(--shadow-hairline); color: var(--color-moon-mist);
  font: 500 12px/1.2 var(--font-sans); cursor: pointer; transition: background var(--transition), color var(--transition);
}
.copy:hover { background: var(--frost-wash-hover); color: var(--color-pure-white); }
.copy.done { color: #4ade80; }


.reqs { max-width: 880px; margin: 48px auto 0; padding: 28px 32px; }
.reqs dl { display: grid; gap: 0; margin: 16px 0 0; }
.reqs dl div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px 0; box-shadow: 0 1px 0 rgba(186, 215, 247, 0.07); }
.reqs dl div:last-child { box-shadow: none; }
.reqs dt { font: 400 12px/1.6 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-fog-veil); }
.reqs dd { margin: 0; font-size: 15px; color: var(--color-moon-mist); }

/* Details: Xiaomi notes, FAQ */
.details { width: 100%; max-width: 880px; margin: 0 auto; padding: 0; }
.steps + .details { margin-top: 24px; }
.details summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; cursor: pointer; list-style: none;
  font-weight: 500; font-size: 16px; color: var(--color-ice-highlight);
}
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; flex: none; font: 300 22px/1 var(--font-sans); color: var(--color-fog-veil); transition: transform var(--transition); }
.details[open] summary::after { transform: rotate(45deg); }
.details > p, .details > ul { margin: 0; padding: 0 28px 24px; font-size: 15px; line-height: 1.6; color: var(--color-fog-veil); }
.details > ul { padding-left: 44px; display: grid; gap: 8px; }
.faq { display: grid; gap: 14px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin: 0 auto; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px; }
.plan h3 { font-size: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 0; }
.plan-amount { font: 500 44px/1 var(--font-display); letter-spacing: -0.03em; color: var(--color-pure-white); }
.plan-period { font-size: 15px; color: var(--color-fog-veil); }
.plan-sub { margin: 8px 0 0; font-size: 14px; color: var(--color-fog-veil); }
.plan-sub b { font-weight: 500; color: var(--color-ice-highlight); }
.plan-list { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 12px; flex: 1; align-content: start; }
.plan-list li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--color-moon-mist); }
.plan-list .i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #4ade80; }
.plan-list li.off { color: var(--color-fog-veil); }
.plan-list li.off .i { color: var(--color-fog-veil); opacity: 0.6; }
.plan-btn { width: 100%; }
.plan-actions { display: grid; gap: 10px; }
.plan-pro { box-shadow: var(--shadow-modal), inset 0 0 0 1px rgba(150, 120, 255, 0.45), 0 0 48px rgba(102, 58, 243, 0.18);
  background: radial-gradient(90% 60% at 50% 0%, rgba(102, 58, 243, 0.16), transparent 70%), var(--surface-glass); }
.plan-badge { position: absolute; top: 28px; right: 28px; margin: 0; padding: 5px 10px; border-radius: var(--radius-buttons);
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #c4b5fd; background: rgba(102, 58, 243, 0.18); }
#pricing .note a, .plan-list a { color: var(--color-ice-highlight); }

/* Subscription purchase dialog (app.js): order code → payment → key */
.buy { width: min(520px, calc(100% - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
  background: transparent; color: inherit; overflow: visible; }
.buy::backdrop { background: rgba(3, 4, 10, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.buy [hidden] { display: none; }
.buy.wide { width: min(1000px, calc(100% - 32px)); }
.buy-pay { display: grid; gap: 28px; }
.buy.wide .buy-pay { grid-template-columns: minmax(0, 1fr) 460px; align-items: start; }
.buy-frame { overflow: hidden; border-radius: 12px; background: #0b1426; box-shadow: var(--shadow-hairline); }
.buy-frame iframe { display: block; width: 100%; height: min(720px, calc(100dvh - 120px)); border: 0; }
.buy-card { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 32px;
  border-radius: var(--radius-cards); background: var(--surface-deep); box-shadow: var(--shadow-modal); }
.buy h3 { margin: 0 44px 22px 0; font: 500 22px/1.25 var(--font-display); letter-spacing: -0.015em; color: var(--color-pure-white); }
.buy p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--color-moon-mist); }
.buy p b { font-weight: 500; color: var(--color-pure-white); }
.buy-close { position: absolute; top: 22px; right: 22px; display: grid; place-items: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 50%; background: var(--frost-wash); box-shadow: var(--shadow-hairline);
  color: var(--color-moon-mist); cursor: pointer; transition: background var(--transition), color var(--transition); }
.buy-close:hover { background: var(--frost-wash-hover); color: var(--color-pure-white); }
.buy-close .i { width: 18px; height: 18px; }
.buy-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: buy; }
.buy-steps li { position: relative; display: grid; gap: 10px; padding-left: 40px; counter-increment: buy; }
.buy-steps li::before { content: counter(buy); position: absolute; top: -1px; left: 0; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; font: 500 13px/1 var(--font-mono); color: var(--color-ice-highlight);
  background: rgba(199, 211, 234, 0.08); }
.buy .buy-code { padding: 14px 120px 14px 18px; font-size: 17px; line-height: 1.6; letter-spacing: 0.06em; white-space: nowrap; }
.buy .buy-code code { padding: 0; background: none; }
.buy .buy-code .copy { top: 50%; transform: translateY(-50%); }
.buy .buy-wait { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--color-fog-veil); }
[data-buy-step="loading"] .buy-wait { margin-top: 0; }
.spinner { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--glass-edge-strong);
  border-top-color: var(--color-frost-glow); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.buy .buy-note { margin-top: 16px; font-size: 13.5px; color: var(--color-fog-veil); }
.buy-note a { color: var(--color-ice-highlight); }
[data-buy-step="done"] { display: grid; gap: 14px; }
[data-buy-step="done"] .buy-note { margin-top: 0; }
.buy .buy-ok { font-weight: 500; color: #4ade80; }
.buy .buy-error { margin-bottom: 18px; color: #fca5a5; }
@media (max-width: 720px) {
  .buy-card { padding: 24px 20px; }
  .buy-steps li { padding-left: 36px; }
  .buy .buy-code { padding-right: 18px; padding-bottom: 52px; font-size: 15px; }
  .buy .buy-code .copy { top: auto; bottom: 10px; transform: none; }
}

/* Setup guide */
.doc { padding: 72px 0 0; }
.doc-inner { max-width: 840px; }
.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-bottom: 96px; }
.doc-head { text-align: center; margin-bottom: 40px; }
/* padding: the gradient is clipped to the text box, which would cut off descenders (g, y, р, у). */
.doc-head h1 { margin: 0; padding-bottom: 0.08em; font: 500 clamp(36px, 6vw, 56px)/1.1 var(--font-display); letter-spacing: -0.03em;
  background: var(--gradient-ice-highlight); -webkit-background-clip: text; background-clip: text; color: transparent; }
.toc { padding: 20px 28px; margin-bottom: 56px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 15px; line-height: 2; color: var(--color-fog-veil); }
.toc a { text-decoration: none; color: var(--color-moon-mist); }
.toc a:hover { color: var(--color-pure-white); }
.doc-section { margin-bottom: 56px; }
.doc-section h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; font: 500 26px/1.25 var(--font-display); letter-spacing: -0.02em; color: var(--color-ice-highlight); }
.doc-section h2 .step-n { margin: 0; }
.doc-section p, .doc-section li { font-size: 16px; line-height: 1.65; color: var(--color-moon-mist); }
.doc-section p { margin: 0 0 14px; }
.doc-section ul { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.doc-section b { font-weight: 500; color: var(--color-ice-highlight); }
.optional { font: 400 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fog-veil); padding: 6px 8px; border-radius: var(--radius-badges); background: rgba(199, 211, 234, 0.08); }
.callout { margin: 16px 0 0; padding: 18px 22px; border-radius: 12px; background: rgba(102, 58, 243, 0.07); box-shadow: inset 0 0 0 1px rgba(150, 120, 255, 0.22); }
.callout > :last-child { margin-bottom: 0; }
.table-wrap + .callout { margin-top: 20px; }
.callout .btn { margin-top: 4px; }
.table-wrap td a { color: var(--color-ice-highlight); }
.callout-tag { display: inline-block; margin-bottom: 10px; font: 400 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #c4b5fd; }
.table-wrap { overflow-x: auto; padding: 4px 0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table-wrap th { text-align: left; padding: 14px 20px; font: 400 12px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-fog-veil); }
.table-wrap td { padding: 14px 20px; vertical-align: top; color: var(--color-moon-mist); box-shadow: 0 -1px 0 rgba(186, 215, 247, 0.07); }
.table-wrap td:first-child { color: var(--color-ice-highlight); width: 42%; }
.table-wrap b { font-weight: 500; color: var(--color-ice-highlight); }
.doc-cta { margin-top: 24px; }
/* Basic vs full mode comparison: a real 3-column table at every width (no card layout on phones). */
.modes { margin-bottom: 12px; }
.modes th:not(:first-child) { color: var(--color-ice-highlight); }
.modes td:first-child { width: 28%; }
.doc-section ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 10px; }
.doc-figure { margin: 0 0 56px; text-align: center; }
.doc-figure img { width: 100%; height: auto; margin: 0 auto; filter: drop-shadow(0 24px 32px rgba(6, 6, 14, 0.7)); }
.doc-section .doc-figure { margin: 24px 0 0; }
.doc-figure-narrow img { width: min(300px, 70%); border-radius: 14px; box-shadow: 0 0 0 1px var(--glass-edge); filter: none; }
.doc-figure figcaption { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--color-fog-veil); }
.compare td:not(:first-child), .compare th { text-align: left; }
.doc-section .table-wrap + p { margin-top: 18px; }
.changelog-entry h2 { font-size: 22px; }
.mode-note { margin: -8px 0 40px; }
.mode-note a { color: var(--color-ice-highlight); }
.mode-note p { margin: 0; }
.mode-app { background: rgba(38, 150, 132, 0.08); box-shadow: inset 0 0 0 1px rgba(38, 150, 132, 0.3); }
.mode-app .callout-tag { color: #7fd8c6; }
.doc-note { margin: 0 0 40px; font-size: 14px; line-height: 1.6; color: var(--color-fog-veil); }
.nav a[aria-current="page"] { color: var(--color-pure-white); background: var(--frost-wash); }

/* Footer */
.site-footer { margin-top: 80px; padding: 32px 0 48px; box-shadow: 0 -1px 0 rgba(186, 215, 247, 0.08); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; font-size: 13px; color: var(--color-fog-veil); }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--color-fog-veil); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--color-pure-white); }
.footer-inner p:last-child { margin-left: auto; }
.footer-org { text-align: right; line-height: 1.6; }

/* Responsive */
@media (max-width: 1080px) {
  /* Header: the sections and "More" still fit in one line; Download is its icon (the word stays for screen readers) */
  .nav a, .nav-more-btn { padding-left: 8px; padding-right: 8px; }
  .site-header .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-header .btn-sm { padding: 8px 10px; }
  .card-left { left: 0; }
  .card-right { right: 0; }
}
@media (max-width: 900px) {
  .feature-grid, .steps, .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot-phone { max-width: 260px; margin: 0 auto !important; }
  .stage { height: 600px; }
  .card-left { left: -40px; top: 40px; }
  .card-right { right: -40px; top: 250px; }
}
@media (max-width: 860px) {
  /* Header: the sections fold into the menu button */
  .menu-btn { display: inline-grid; order: 1; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px;
    padding: 8px var(--gutter) 16px; background: var(--color-midnight-canvas); box-shadow: 0 1px 0 rgba(186, 215, 247, 0.08), 0 24px 32px rgba(0, 0, 0, 0.5); }
  .site-header.menu-open .nav { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
  .nav a[aria-current="page"] { background: var(--frost-wash); color: var(--color-pure-white); }
  /* In the phone menu "More" is just more links, under a line */
  .nav-more-btn { display: none; }
  .nav-more-list { display: flex; position: static; min-width: 0; padding: 8px 0 0; margin-top: 6px; border-radius: 0;
    background: none; box-shadow: 0 -1px 0 rgba(186, 215, 247, 0.08); }
  .nav .nav-more-list a { padding: 12px 14px; border-radius: 10px; }
  .header-inner { gap: 10px; }
  .lang { margin-left: auto; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --section-gap: 80px; }
  .hero { padding-top: 64px; }
  .lead { font-size: 16px; }
  .stage { height: auto; flex-direction: column; align-items: center; gap: 16px; margin-top: 48px; }
  .float-card { position: relative; inset: auto; transform: none; animation: none; }
  .card-center { width: min(320px, 100%); }
  .card-left, .card-right { width: min(340px, 100%); left: auto; right: auto; top: auto; animation: none !important; }
  .feature-grid, .steps, .why-grid, .plans { grid-template-columns: minmax(0, 1fr); }
  .shot-phone { max-width: 220px; }
  .plan { padding: 26px 22px; }
  .cta-card { padding: 48px 20px; }
  .doc { padding-top: 48px; }
  .toc ol { columns: 1; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: auto !important; }
  .table-wrap thead { display: none; }
  .table-wrap tr { padding: 14px 18px; box-shadow: 0 -1px 0 rgba(186, 215, 247, 0.07); }
  .table-wrap tr:first-child { box-shadow: none; }
  .table-wrap td { padding: 0; box-shadow: none; }
  .table-wrap td:first-child { margin-bottom: 6px; }
  .modes table { display: table; font-size: 13px; }
  .compare { overflow-x: auto; }
  .compare table { min-width: 520px; }
  .modes thead { display: table-header-group; }
  .modes tbody { display: table-row-group; }
  .modes tr { display: table-row; padding: 0; }
  .modes th, .modes td { display: table-cell; padding: 10px 10px; width: auto !important; margin: 0; box-shadow: 0 -1px 0 rgba(186, 215, 247, 0.07); }
  .code { padding: 52px 16px 16px; font-size: 12.5px; }
  .reqs { padding: 24px 20px; }
  .dl { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .dl > .btn { width: 100%; min-width: 0; }
  .dl .code { padding: 50px 16px 16px; }
  .reqs dl div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .details summary { padding: 18px 20px; }
  .details > p, .details > ul { padding: 0 20px 20px; }
  .details > ul { padding-left: 38px; }
  .footer-inner p:last-child { margin-left: 0; }
  .footer-org { text-align: left; }
  .eyebrow::before, .eyebrow::after { flex-basis: 32px; width: 32px; }
}
