/* ------------------------------------------------------------------
   OC Remote — site styles
   Palette follows the OpenCode grey scale and link blue.
   Light: page #FBFBFB, dark: page #0F1013 with a lifted, luminous feel.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light;

  --bg: #fbfbfb;
  --surface: #ffffff;
  --subtle: #f5f5f5;
  --hover: #eeeeee;

  --line: #e4e4e4;
  --line-strong: #d2d2d2;

  --ink: #161616;
  --emphasis: #3a3a3a;
  --body: #5c5c5c;
  --muted: #6b6b6b;

  --accent: #3b5cf6;
  --accent-ink: #2e49cc;
  --accent-soft: #eef1ff;

  --ok: #178a55;
  --ok-soft: #e9f6ef;

  --device: #1b1c1f;

  --code-bg: #ffffff;
  --code-head: #f5f5f5;
  --code-text: #24262b;
  --code-muted: #6b6b6b;
  --code-line: #e6e6e6;
  --code-green: #127a4a;
  --code-blue: #2e49cc;

  --grid: rgba(22, 22, 22, 0.055);
  --shadow: 0 18px 40px rgba(22, 22, 22, 0.1);
  --shadow-sm: 0 8px 20px rgba(22, 22, 22, 0.07);

  --r: 3px;
  --wrap: 1200px;

  --sans: "Inter", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", "Roboto Mono",
    "Noto Sans Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f1013;
  --surface: #17191d;
  --subtle: #1c1f24;
  --hover: #23262c;

  --line: #2a2e35;
  --line-strong: #3b4049;

  --ink: #f4f5f7;
  --emphasis: #dde0e5;
  --body: #bfc4cc;
  --muted: #9aa1ab;

  --accent: #7d9bff;
  --accent-ink: #a6baff;
  --accent-soft: #19213a;

  --ok: #5ad39a;
  --ok-soft: #12271e;

  --device: #26282d;

  --code-bg: #14171b;
  --code-head: #191d22;
  --code-text: #dde2e9;
  --code-muted: #98a0aa;
  --code-line: #2a2f37;
  --code-green: #6bd8a4;
  --code-blue: #9db7ff;

  --grid: rgba(255, 255, 255, 0.05);
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, color 220ms ease;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.9rem, 5.4vw, 4.9rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.85rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

p {
  color: var(--body);
  text-wrap: pretty;
}

code,
pre {
  font-family: var(--mono);
}

.wrap {
  width: min(var(--wrap), calc(100% - 56px));
  margin: 0 auto;
}

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  transition: top 160ms ease;
}

.skip:focus {
  top: 12px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: var(--scroll, 0%);
  height: 2px;
  background: var(--accent);
  pointer-events: none;
}

/* ------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-name {
  display: flex;
  line-height: 1;
}

.brand-name strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-right: auto;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  color: var(--body);
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

.lang-switch a[aria-current="true"] {
  background: var(--hover);
  color: var(--ink);
  font-weight: 600;
}

.icon-link,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--body);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.icon-link:hover,
.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--ink);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------------------------
   Buttons and small pieces
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.btn .arrow {
  font-family: var(--mono);
  font-weight: 400;
  opacity: 0.75;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--subtle);
}

.btn-small {
  padding: 9px 13px;
  font-size: 14px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  animation: softPulse 3.2s ease-in-out infinite;
}

.lede {
  max-width: 590px;
  margin-bottom: 26px;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--body);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--subtle);
  font-size: 13px;
  line-height: 1.5;
  color: var(--body);
  white-space: nowrap;
}

.chip--accent {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
}

.inline-cta:hover {
  border-bottom-color: var(--accent-ink);
}

.inline-cta span {
  font-family: var(--mono);
  font-weight: 400;
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 480px at 80% 8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 68%),
    radial-gradient(700px 420px at 4% 96%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%),
    var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 70% 80% at 72% 34%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 34%, #000 20%, transparent 78%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 48px;
  align-items: center;
  padding: 70px 0 78px;
}

.hero-copy {
  max-width: 630px;
}

h1 .accent {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 42px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 560px;
  margin: 0;
  border-top: 1px solid var(--line);
}

.hero-facts div {
  padding: 14px 16px 0 0;
}

.hero-facts dt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero-facts dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink);
}

.hero-stage {
  position: relative;
  min-height: 600px;
}

.hero-phone {
  position: absolute;
  right: 4px;
  top: 0;
  z-index: 2;
  width: 258px;
}

.hero-terminal {
  position: absolute;
  left: -56px;
  top: 24%;
  bottom: auto;
  z-index: 1;
  width: 360px;
}

.e2ee-chip {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--emphasis);
}

.e2ee-chip svg {
  width: 14px;
  height: 14px;
  color: var(--ok);
}

/* Phone frames */

.phone {
  position: relative;
  margin: 0;
  padding: 6px;
  border-radius: 30px;
  background: var(--device);
  box-shadow: var(--shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.phone--sm {
  width: 100%;
  padding: 5px;
  border-radius: 24px;
}

.phone--sm img {
  border-radius: 19px;
}

.phone--card {
  width: 158px;
  padding: 4px;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.phone--card img {
  border-radius: 18px;
}

/* Keep the hero phone absolutely placed after the generic .phone rule. */
.hero-phone {
  position: absolute;
  top: 0;
  right: 4px;
  z-index: 3;
  width: 258px;
}

/* Terminal windows */

.terminal-shell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 10px;
  background: var(--code-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 18px 45px rgba(16, 16, 16, 0.16);
}

[data-theme="dark"] .terminal-shell {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 45px rgba(0, 0, 0, 0.42);
}

.terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--code-line);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--code-head) 62%, #fff) 0%,
    var(--code-head) 100%
  );
}

[data-theme="dark"] .terminal-bar {
  background: linear-gradient(180deg, #24282f 0%, #191d22 100%);
}

.terminal-bar i {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.terminal-bar i:nth-child(1) {
  background: #ff5f57;
}

.terminal-bar i:nth-child(2) {
  background: #febc2e;
}

.terminal-bar i:nth-child(3) {
  background: #28c840;
}

.terminal-bar span {
  position: absolute;
  left: 50%;
  max-width: 56%;
  overflow: hidden;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--code-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-code {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.68;
  white-space: pre;
}

.terminal-code .cmd {
  color: var(--code-blue);
}

.terminal-code .ok {
  color: var(--code-green);
}

.terminal-code .muted {
  color: var(--code-muted);
}

/* ------------------------------------------------------------------
   Flow strip
   ------------------------------------------------------------------ */

.flow {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.flow-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 34px 0 36px;
}

.flow-inner::before,
.flow-inner::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 0;
  height: 1px;
  background: var(--line-strong);
}

.flow-inner::before {
  right: 0;
}

.flow-inner::after {
  right: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) 220ms;
}

.flow-inner.is-in::after {
  transform: scaleX(1);
}

.flow-step {
  position: relative;
  padding: 54px 34px 0 0;
}

.flow-step::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.flow-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.flow-step span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */

.section {
  padding: 78px 0;
  border-bottom: 1px solid var(--line);
}

.band {
  background: var(--subtle);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
  gap: 56px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head h2::before,
.security-copy h2::before,
.download h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 20px;
  background: var(--accent);
}

.section-head h2 {
  max-width: 620px;
}

.section-head p {
  max-width: 470px;
  margin: 0 0 3px auto;
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
}

/* ------------------------------------------------------------------
   Feature matrix
   ------------------------------------------------------------------ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 180ms ease, transform 180ms ease,
    box-shadow 180ms ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-copy {
  min-width: 0;
}

.feature-copy h3 {
  margin-bottom: 8px;
}

.feature-copy p {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.7;
}

.feature-visual {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

/* Panels used inside feature cards */

.panel {
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--subtle);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.panel-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.panel-row:last-child {
  border-bottom: 0;
}

.panel-row code {
  font-size: 13px;
  color: var(--accent-ink);
}

.panel-row span {
  color: var(--body);
}

.panel-row.disabled {
  opacity: 0.42;
}

.panel-row.disabled code {
  color: var(--muted);
}

.panel--dark {
  border-color: var(--line);
  background: var(--subtle);
}

.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

.event-row code {
  font-size: 13px;
  color: var(--accent-ink);
}

.event-row span {
  font-size: 13px;
  color: var(--body);
  text-align: right;
}

.event-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  font-size: 13px;
  color: var(--body);
}

.event-foot .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  animation: softPulse 2.6s ease-in-out infinite;
}

@keyframes softPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ------------------------------------------------------------------
   Platforms
   ------------------------------------------------------------------ */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.platform-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.platform-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.platform-head h3 {
  margin-bottom: 4px;
  font-size: 21px;
}

.platform-head p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
}

.platform-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--subtle);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.platform-visual {
  min-width: 0;
  margin-top: auto;
}

.platform-visual .phone-wrap {
  width: 160px;
  margin: 0 auto;
}

.platform-command {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--subtle);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body);
  overflow-wrap: anywhere;
}

.platform-card .terminal-code {
  font-size: 13px;
}

/* ------------------------------------------------------------------
   Security
   ------------------------------------------------------------------ */

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 56px;
  align-items: center;
}

.security-copy h2 {
  margin-bottom: 18px;
}

.security-copy > p {
  max-width: 520px;
  margin-bottom: 26px;
  font-size: 16px;
  line-height: 1.75;
}

.security-points {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.security-points li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.security-points strong {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}

.security-points span {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
}

.diagram-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.diagram-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.node {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--subtle);
}

.node small {
  display: block;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}

.node strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.node span {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.link-line {
  position: relative;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.link-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
  animation: travel 3.4s ease-in-out infinite;
}

.relay-line {
  position: relative;
  margin-top: 18px;
  padding: 10px 12px 10px 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: var(--bg);
  font-size: 13.5px;
  color: var(--muted);
}

.relay-line::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.diagram-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ------------------------------------------------------------------
   Gallery rail
   ------------------------------------------------------------------ */

.section-head--rail {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.section-head--rail p {
  margin-left: 0;
}

.rail-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rail-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.rail-controls button:hover {
  border-color: var(--ink);
  background: var(--hover);
}

.rail-controls button[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  overflow-anchor: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail.dragging {
  cursor: grabbing;
}

.rail.dragging .shot,
.rail.dragging .shot-frame {
  cursor: grabbing;
}

.rail.dragging .shot-frame {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.rail img {
  -webkit-user-drag: none;
  user-select: none;
}

.shot {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: grab;
}

.shot-frame {
  display: block;
  height: clamp(372px, 38.4vw, 528px);
  padding: 5px;
  border-radius: 26px;
  background: var(--device);
  box-shadow: var(--shadow-sm);
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 300ms ease;
}

.shot-frame img {
  height: 100%;
  width: auto;
  border-radius: 21px;
}

.shot:hover .shot-frame,
.shot:focus-visible .shot-frame {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.shot-cap {
  display: block;
  margin-top: 12px;
  padding-left: 3px;
}

.shot-cap strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.shot-cap span {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

.rail-progress {
  height: 2px;
  margin-top: 10px;
  background: var(--line);
}

.rail-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 120ms linear;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 28px;
  background: color-mix(in srgb, #0a0b0c 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(94vw, 520px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

body.lightbox-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------
   Download
   ------------------------------------------------------------------ */

.download {
  padding: 78px 0;
  border-bottom: 1px solid var(--line);
  background: var(--subtle);
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 56px;
  align-items: start;
}

.download h2 {
  margin-bottom: 16px;
}

.download .lede {
  max-width: 450px;
  margin-bottom: 20px;
  font-size: 16px;
}

.download .btn {
  margin-bottom: 18px;
}

.download-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 430px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.download-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--muted);
}

.release-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.release-versions > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
}

.release-versions em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
}

.release-versions code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
}

.download-groups {
  display: grid;
  gap: 22px;
}

.download-group h3 {
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.download-file {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}

.download-file a {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--accent-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.download-file a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-size {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.download-button {
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-ink);
  text-decoration: none;
  white-space: nowrap;
}

.download-button:hover {
  border-color: var(--accent-ink);
  background: var(--accent-soft);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.footer {
  padding: 42px 0 30px;
  background: var(--bg);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--body);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Sub pages
   ------------------------------------------------------------------ */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(760px 360px at 84% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--bg);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 60% 80% at 80% 20%, #000 10%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 80% 20%, #000 10%, transparent 76%);
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow,
.page-hero h1,
.page-hero .lede {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.page-hero h1 {
  animation-delay: 60ms;
}

.page-hero .lede {
  animation-delay: 130ms;
}

.diagram {
  margin-bottom: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.page-hero h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 4.6vw, 4.1rem);
}

.page-hero .lede {
  max-width: 700px;
  margin-bottom: 0;
  font-size: 17px;
}

.prose {
  padding: 58px 0 82px;
}

.prose-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 60px;
  align-items: start;
}

.prose-grid > *,
.faq-grid > * {
  min-width: 0;
}

.sticky-note {
  position: sticky;
  top: 92px;
}

.sticky-note h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.sticky-note p {
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.75;
}

.steps {
  min-width: 0;
  display: grid;
}

.step {
  min-width: 0;
  position: relative;
  padding: 0 0 34px 38px;
  border-left: 1px solid var(--line-strong);
}

.step:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.step-num {
  position: absolute;
  left: -15px;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.step h3 {
  margin-bottom: 7px;
  font-size: 19px;
}

.step p {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.75;
}

.step > p:last-child {
  margin-bottom: 0;
}

.code-block {
  min-width: 0;
  position: relative;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 10px;
  background: var(--code-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 28px rgba(16, 16, 16, 0.08);
}

[data-theme="dark"] .code-block {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.32);
}

.code-block .code-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--code-line);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--code-head) 62%, #fff) 0%,
    var(--code-head) 100%
  );
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--code-muted);
}

[data-theme="dark"] .code-block .code-head {
  background: linear-gradient(180deg, #24282f 0%, #191d22 100%);
}

.code-head i {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.code-head i:nth-child(1) {
  background: #ff5f57;
}

.code-head i:nth-child(2) {
  background: #febc2e;
}

.code-head i:nth-child(3) {
  background: #28c840;
}

.code-head span {
  position: absolute;
  left: 50%;
  max-width: 50%;
  overflow: hidden;
  transform: translateX(-50%);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-head .copy {
  position: relative;
  z-index: 1;
  margin-left: auto;
}

.copy {
  padding: 2px 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.copy:hover {
  color: var(--ink);
}

pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 13.5px;
  line-height: 1.7;
}

code {
  font-size: 0.92em;
}

p code,
li code,
td code,
.sticky-note code {
  overflow-wrap: anywhere;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--subtle);
  color: var(--emphasis);
  font-size: 0.9em;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

td {
  color: var(--body);
  line-height: 1.65;
}

td strong {
  font-weight: 600;
  color: var(--ink);
}

.callout {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: var(--surface);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--body);
}

.callout svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--accent);
}

.accordion {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 160ms ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.75;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: 56px;
  align-items: start;
}

.faq-side {
  position: sticky;
  top: 92px;
}

.faq-side h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.faq-side p {
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.75;
}

.faq-group {
  margin-bottom: 40px;
}

.faq-group:last-child {
  margin-bottom: 0;
}

.faq-group h2 {
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* Keep the old security-page hooks neutral; the dark band is gone. */
.security-page .diagram {
  margin-bottom: 34px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.section-kicker span {
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------
   Reveal and motion
   ------------------------------------------------------------------ */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.feature-card[data-reveal]:nth-child(2),
.platform-card[data-reveal]:nth-child(2) {
  --d: 90ms;
}

.feature-card[data-reveal]:nth-child(3),
.platform-card[data-reveal]:nth-child(3) {
  --d: 150ms;
}

.feature-card[data-reveal]:nth-child(4) {
  --d: 210ms;
}

.hero-copy > * {
  animation: rise 760ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 60ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 130ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 200ms;
}

.hero-copy > :nth-child(5) {
  animation-delay: 260ms;
}

.hero-stage {
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 160ms both;
}

.hero-phone {
  animation: float 7s ease-in-out 1.2s infinite;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes travel {
  0%,
  100% {
    left: 0;
    opacity: 0.25;
  }
  50% {
    left: calc(100% - 6px);
    opacity: 1;
  }
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 54px 0 60px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-stage {
    width: min(520px, 100%);
    min-height: 560px;
    margin: 0 auto;
  }

  .hero-phone {
    width: 224px;
  }

  .hero-terminal {
    width: 360px;
    left: -56px;
  }

  .security-grid {
    gap: 36px;
  }

  .security-points li {
    grid-template-columns: 126px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links a {
    padding: 11px 12px;
    border-radius: 2px;
  }

  .nav-links a:hover {
    background: var(--subtle);
  }

  .nav-links a[aria-current="page"]::after {
    display: none;
  }

  .nav-links a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-ink);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions > .btn {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 54px 0 60px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-stage {
    min-height: 560px;
    width: min(520px, 100%);
    margin: 0 auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
  }

  .platform-card .platform-command {
    grid-column: 1 / -1;
  }

  .platform-visual {
    margin: 0;
  }

  .security-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .prose-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .sticky-note,
  .faq-side {
    position: static;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  .section-head p {
    margin: 0;
  }

  .section-head--rail {
    grid-template-columns: 1fr auto;
  }

  .rail-controls {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .section,
  .download {
    padding: 54px 0;
  }

  .page-hero {
    padding: 50px 0 40px;
  }

  .prose {
    padding: 42px 0 62px;
  }

  h1 {
    font-size: clamp(2.45rem, 10vw, 3.3rem);
  }

  h2 {
    font-size: clamp(1.7rem, 6.6vw, 2.2rem);
  }

  .lede {
    font-size: 16.5px;
  }

  .hero-grid {
    padding: 42px 0 48px;
  }

  .hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    width: min(370px, 100%);
    padding-bottom: 8px;
  }

  .e2ee-chip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    margin: 0;
  }

  .hero-phone {
    position: relative;
    top: auto;
    right: auto;
    order: 1;
    align-self: flex-end;
    width: 218px;
    margin-right: 4px;
  }

  .hero-terminal {
    position: absolute;
    left: 0;
    top: 24%;
    bottom: auto;
    z-index: 1;
    width: 80%;
    margin: 0;
  }

  .platform-visual .phone-wrap {
    width: 140px;
  }

  .platform-card .terminal-code {
    font-size: 13px;
    line-height: 1.6;
  }

  .hero-facts {
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
  }

  .hero-facts div:last-child {
    grid-column: span 2;
  }

  .flow-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 8px;
  }

  .flow-inner::before,
  .flow-inner::after {
    display: none;
  }

  .flow-step {
    padding: 0 16px 14px 22px;
  }

  .flow-step::before {
    top: 7px;
    left: 0;
  }

  .feature-card {
    gap: 18px;
    padding: 22px;
  }

  .feature-card h3 {
    font-size: 19px;
  }

  .phone--card {
    width: 132px;
  }

  .panel {
    max-width: 100%;
  }

  .platform-card {
    display: flex;
    align-items: stretch;
  }

  .platform-visual .phone-wrap {
    width: 168px;
  }

  .diagram-panel {
    padding: 18px;
  }

  .diagram-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .link-line {
    padding: 4px 0 4px 18px;
  }

  .link-line::after {
    top: 10px;
  }

  .security-points li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .shot-frame {
    height: 384px;
  }

  .rail {
    gap: 14px;
  }

  .download-item {
    gap: 10px;
    padding: 10px 0;
  }

  .download-file {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-base {
    flex-direction: column;
    gap: 6px;
  }

  .nav-row {
    gap: 12px;
  }

  .nav-actions {
    gap: 6px;
  }

  .icon-link {
    display: none;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
  }

  table {
    min-width: 520px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .hero-stage {
    min-height: 0;
  }

  .hero-phone {
    width: 196px;
  }

  .hero-terminal {
    width: min(300px, 100%);
  }

  .terminal-code {
    font-size: 13px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .feature-visual {
    justify-content: flex-start;
  }

  .feature-visual .phone--card {
    display: none;
  }

  .panel-row {
    grid-template-columns: 82px minmax(0, 1fr);
    font-size: 13px;
  }

  .section-head--rail {
    grid-template-columns: 1fr;
  }

  .rail-controls {
    justify-content: flex-start;
  }

  .shot-frame {
    height: 360px;
  }

  .shot-cap span {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .flow-inner::after {
    transform: scaleX(1);
  }
}

/* Pairing mock used in the phone platform card */
.pair-panel {
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.pair-code {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: 0.16em;
  color: var(--ink);
  text-align: center;
}

.pair-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.pair-meta span {
  color: var(--muted);
}

.pair-meta code,
.pair-meta strong {
  font-size: 13px;
  color: var(--emphasis);
}

.pair-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--body);
}

.pair-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  animation: softPulse 2.8s ease-in-out infinite;
}

/* Sequential flow reveal */
.js .flow-step {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .flow-inner.is-in .flow-step {
  opacity: 1;
  transform: none;
}

.js .flow-inner.is-in .flow-step:nth-child(1) {
  transition-delay: 180ms;
}

.js .flow-inner.is-in .flow-step:nth-child(2) {
  transition-delay: 320ms;
}

.js .flow-inner.is-in .flow-step:nth-child(3) {
  transition-delay: 460ms;
}

.js .flow-inner.is-in .flow-step:nth-child(4) {
  transition-delay: 600ms;
}

@media (prefers-reduced-motion: reduce) {
  .js .flow-step {
    opacity: 1;
    transform: none;
  }
}
