:root {
  /* FileFly app dark theme — exact match (constants/colors.ts) */
  --bg: #050a14;
  --bg-elevated: #0a1220;
  --bg-surface: #101c30;
  --ink: #e8eef8;
  --ink-soft: #d4e0ef;
  --muted: #a8bdd6;
  --muted-strong: #c5d4e8;
  --line: #1a2c45;
  --border: #1a2c45;
  --brand: #60a5fa;
  --brand-mid: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: rgba(96, 165, 250, 0.16);
  --hero-from: #1d6fff;
  --hero-to: #06b6d4;
  --sheen: #22d3ee;
  --cyan: #7dd3fc;
  --glow: rgba(96, 165, 250, 0.35);
  --accent: #fbbf24;
  --accent-ink: #1a1206;
  --accent-hover: #fcd34d;
  --success: #34d399;
  --radius: 16px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --max: 1120px;
  --read-size: 1.0625rem;
  --read-lh: 1.72;
  --read-measure: 65ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--read-size);
  font-weight: 450;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 10% -8%, rgba(29, 111, 255, 0.22), transparent 55%),
    radial-gradient(860px 460px at 92% 0%, rgba(6, 182, 212, 0.14), transparent 50%),
    radial-gradient(760px 480px at 50% 100%, rgba(37, 99, 235, 0.12), transparent 55%),
    var(--bg);
  line-height: var(--read-lh);
  letter-spacing: 0.015em;
  word-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

.shell {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: white;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid #b8840c;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 14px 32px rgba(232, 169, 23, 0.35);
  text-shadow: none;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--accent-ink) !important;
  border-color: #c99210;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
}

.section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0.7rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.section-head p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: var(--read-measure);
}

.section-head a,
.prose a,
.seo-link {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.grid-3 {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.feature-tile {
  position: relative;
  overflow: hidden;
  padding: 1.45rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.95), rgba(10, 18, 32, 0.9));
  border: 1px solid var(--line);
  min-height: 100%;
}

.feature-tile::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 70%);
  pointer-events: none;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--cyan);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.feature-tile h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.feature-tile p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.65;
}

.page-hero {
  padding: 4.5rem 0 3rem;
}

.page-hero h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: var(--read-measure);
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.7;
  margin: 0;
}

.page-hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.prose {
  max-width: var(--read-measure);
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 0.015em;
}

.prose h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.25;
  margin-top: 1.6rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 18, 32, 0.8);
  padding: 1.1rem 1.2rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0.85rem 0 0;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.7;
}

.cta-band {
  margin: 2rem 0 4rem;
  padding: 2.4rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.28), rgba(37, 99, 235, 0.12)),
    var(--bg-elevated);
  border: 1px solid rgba(96, 165, 250, 0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.cta-band p {
  margin: 0;
  color: var(--muted-strong);
  max-width: 48ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.cta-band .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.muted {
  color: var(--muted-strong);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(5, 10, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  background: linear-gradient(145deg, #1d6fff, #06b6d4);
}

img.brand-mark {
  background: transparent;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-name span {
  color: var(--cyan);
  font-weight: 600;
}

.desktop-nav {
  display: none;
  gap: 1.2rem;
  align-items: center;
}

.desktop-nav a {
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.98rem;
}

.desktop-nav a.is-active,
.desktop-nav a:hover {
  color: var(--ink);
}

.mobile-toggle {
  display: inline-flex;
  padding: 0.55rem 0.7rem;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 0.55rem 0;
  color: var(--muted);
  font-weight: 600;
}

@media (min-width: 920px) {
  .desktop-nav {
    display: flex;
  }
  .mobile-toggle {
    display: none;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 3rem 0 2.5rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1.5rem;
}

.footer-cols a {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin-top: 2rem;
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Home hero */
.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 4.5rem 0 2rem;
}

.home-hero h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.75rem);
  margin: 0.85rem 0 1rem;
  line-height: 1.12;
}

.home-hero .lead {
  color: var(--ink-soft);
  font-size: 1.12rem;
  max-width: var(--read-measure);
  margin: 0;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.step-row p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 1.02rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 28px;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel {
  padding: 1.4rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 48, 0.65);
}

.panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.security-band {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 28px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.1), rgba(29, 111, 255, 0.1) 50%, rgba(6, 182, 212, 0.06));
}

.security-band .eyebrow {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.security-band a.seo-link {
  color: #6ee7b7;
  font-weight: 700;
}

/* Transfer scene */
.transfer-scene {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.transfer-glow {
  position: absolute;
  inset: 10% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.35), transparent 65%);
  filter: blur(8px);
}

.transfer-phones {
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.phone {
  width: 168px;
  height: 320px;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(160deg, #0d1a2e, #050a14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  animation: floatY 4.5s ease-in-out infinite;
}

.phone.left {
  transform: rotate(-6deg);
}

.phone.right {
  transform: rotate(6deg);
  animation-delay: -2s;
}

.phone-inner {
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #1d6fff, #06b6d4 55%, #0a1220);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  opacity: 0.85;
}

.phone-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.phone-card {
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.phone-card .name {
  font-size: 12px;
  font-weight: 700;
}

.phone-card .meta {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 4px;
}

.phone-speed {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.speed-chip {
  color: var(--accent) !important;
  font-weight: 800 !important;
}

.beam {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 88px;
}

.speed-meter {
  position: relative;
  z-index: 2;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background:
    linear-gradient(160deg, rgba(29, 111, 255, 0.28), rgba(6, 182, 212, 0.18)),
    rgba(5, 10, 20, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 12px 28px rgba(29, 111, 255, 0.35);
  text-align: center;
  animation: speedPulse 2.4s ease-in-out infinite;
}

.speed-meter-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}

.speed-meter-value small {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fbbf24;
  vertical-align: 2px;
}

.speed-meter-label {
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 238, 248, 0.8);
}

.speed-meter--compact {
  padding: 0.4rem 0.55rem;
  margin-bottom: 6px;
}

.speed-meter--compact .speed-meter-value {
  font-size: 1.05rem;
}

.enc-beam-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.speed-panel {
  border-color: rgba(96, 165, 250, 0.4) !important;
  background:
    radial-gradient(500px 180px at 10% 0%, rgba(29, 111, 255, 0.22), transparent 55%),
    radial-gradient(420px 160px at 90% 20%, rgba(251, 191, 36, 0.12), transparent 50%),
    rgba(16, 28, 48, 0.75) !important;
}

.speed-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.speed-stats div {
  padding: 0.75rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(5, 10, 20, 0.35);
  text-align: center;
}

.speed-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.1;
}

.speed-stats span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-strong);
}

.speed-note {
  margin: 0.85rem 0 0 !important;
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
}

@keyframes speedPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.04) inset,
      0 12px 28px rgba(29, 111, 255, 0.35);
  }
  50% {
    transform: translateY(-3px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06) inset,
      0 16px 34px rgba(6, 182, 212, 0.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  .speed-meter {
    animation: none;
  }
}

[data-theme="light"] .speed-meter {
  background:
    linear-gradient(160deg, rgba(29, 111, 255, 0.12), rgba(6, 182, 212, 0.1)),
    #ffffff;
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

[data-theme="light"] .speed-meter-value {
  color: #0f172a;
}

[data-theme="light"] .speed-meter-label {
  color: #475569;
}

[data-theme="light"] .speed-chip {
  color: #b45309 !important;
}

[data-theme="light"] .speed-panel {
  background:
    radial-gradient(500px 180px at 10% 0%, rgba(29, 111, 255, 0.12), transparent 55%),
    radial-gradient(420px 160px at 90% 20%, rgba(251, 191, 36, 0.1), transparent 50%),
    #ffffff !important;
}

[data-theme="light"] .speed-stats div {
  background: #f3f7fc;
  border-color: #dbe7f5;
}

[data-theme="light"] .phone-speed {
  color: #fbbf24;
  text-shadow: none;
}

.bar {
  margin-top: 10px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: 40%;
  animation: progress 3.2s ease-in-out infinite;
}

.bar.send > span {
  background: var(--cyan);
}

.bar.recv > span {
  background: #fbbf24;
}

.beam-track {
  position: relative;
  width: 72px;
  height: 14px;
  display: grid;
  place-items: center;
}

.beam-line {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #22d3ee, #60a5fa, transparent);
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.8);
  animation: beam 2.2s ease-in-out infinite;
}

.beam-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes floatY {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes progress {
  0%,
  100% {
    width: 18%;
  }
  50% {
    width: 88%;
  }
}

@keyframes beam {
  0%,
  100% {
    transform: translateX(-18px);
    opacity: 0.35;
  }
  50% {
    transform: translateX(18px);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

/* How-to diagram */
.howto-diagram {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

.howto-visual {
  position: relative;
  min-height: 340px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 48, 0.65);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.howto-glow {
  position: absolute;
  inset: 12% 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.32), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.howto-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.howto-stage.is-hidden {
  display: none;
}

.howto-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.howto-step-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.7);
  color: var(--muted);
  cursor: pointer;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.howto-step-btn:hover {
  border-color: rgba(96, 165, 250, 0.45);
  color: var(--ink);
}

.howto-step-btn:active {
  transform: scale(0.99);
}

.howto-step-btn.is-active {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(96, 165, 250, 0.12);
  color: #fff;
}

.howto-step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(96, 165, 250, 0.18);
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.85rem;
}

.howto-step-btn.is-active .howto-step-num {
  background: linear-gradient(145deg, #1d6fff, #06b6d4);
  color: #fff;
}

.howto-step-text strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  display: block;
}

.howto-step-body {
  display: none;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-strong);
  font-weight: 500;
  margin-top: 4px;
}

.howto-step-btn.is-active .howto-step-body {
  display: block;
}

.howto-hint {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
}

.diagram-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.diagram-device {
  width: 100px;
  height: 170px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, #0d1a2e, #050a14);
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: floatY 3.5s ease-in-out infinite;
}

.diagram-device.right {
  animation-delay: -1.5s;
}

.diagram-device-inner {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, #1d6fff, #06b6d4 55%, #0a1220);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.diagram-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 14px;
}

.diagram-sub {
  color: var(--muted-strong);
  font-size: 0.95rem;
  margin-top: 4px;
  line-height: 1.5;
}

.wifi-pulse {
  width: 56px;
  height: 56px;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 1.4rem;
}

.wifi-pulse::before,
.wifi-pulse::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  animation: pulse 2s ease-out infinite;
}

.wifi-pulse::after {
  animation-delay: 0.45s;
}

.pin-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.pin-row span {
  width: 44px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(96, 165, 250, 0.25);
  border: 1px solid rgba(125, 211, 252, 0.4);
  animation: floatY 1.2s ease-in-out infinite;
}

.pin-row span:nth-child(2) {
  animation-delay: 0.15s;
}
.pin-row span:nth-child(3) {
  animation-delay: 0.3s;
}
.pin-row span:nth-child(4) {
  animation-delay: 0.45s;
}

.done-ring {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #34d399, #059669);
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 0 40px rgba(52, 211, 153, 0.35);
  animation: pulse 1.4s ease-in-out infinite;
}

.enc-beam {
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #22d3ee, #60a5fa, transparent);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.6);
  animation: beam 2s ease-in-out infinite;
  position: relative;
}

.pick-list {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  padding: 14px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.pick-list div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 600;
}

.pick-list div:first-child {
  background: rgba(96, 165, 250, 0.35);
}

.qr-box {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 2px solid rgba(232, 169, 23, 0.65);
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  color: #ffe08a;
  font-size: 1.6rem;
  animation: pulse 2.4s ease-in-out infinite;
}

.step-list {
  display: grid;
  gap: 14px;
}

.step-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.step-row:nth-child(odd) {
  background: rgba(96, 165, 250, 0.08);
}

.step-row:nth-child(even) {
  background: rgba(16, 28, 48, 0.65);
}

.step-n {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--cyan);
}

.step-row h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.step-row p {
  margin: 0;
}

.download-card {
  padding: 1.6rem;
  border-radius: 24px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.02));
}

.check-list {
  margin: 0;
  padding: 0;
  color: var(--muted);
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 10px;
}

.check-list li::before {
  content: "✓";
  color: #34d399;
  font-weight: 800;
}

@media (max-width: 960px) {
  .home-hero {
    grid-template-columns: 1fr;
  }
  .home-feature-grid {
    grid-template-columns: 1fr;
  }
  .transfer-phones {
    gap: 14px;
  }
  .phone {
    width: 130px;
    height: 250px;
  }
}

@media (max-width: 860px) {
  .howto-diagram {
    grid-template-columns: 1fr;
  }
  .howto-visual {
    min-height: 280px;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem 1.45rem 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(16, 28, 48, 0.95), rgba(10, 18, 32, 0.85));
  transition: border-color 0.2s, transform 0.2s;
  min-height: 100%;
}

.blog-card:hover {
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-3px);
}

.blog-card .tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.blog-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.blog-card p {
  margin: 0;
  color: var(--muted-strong);
  flex: 1;
  line-height: 1.65;
  font-size: 1.02rem;
}

.blog-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.blog-card .read {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.95rem;
}

.blog-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: 26px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background:
    linear-gradient(120deg, rgba(29, 111, 255, 0.22), rgba(6, 182, 212, 0.12) 55%, rgba(10, 18, 32, 0.4));
}

.blog-featured h2 {
  margin: 0.6rem 0 0.8rem;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
}

.article-body {
  max-width: var(--read-measure);
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 0.015em;
  color: var(--ink-soft);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 2.2rem 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin: 1.5rem 0 0.6rem;
  line-height: 1.3;
  color: var(--ink);
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.article-body li {
  margin-bottom: 0.55rem;
  line-height: 1.7;
}

.article-body a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1rem 0 1.5rem;
}

.toc {
  position: sticky;
  top: 88px;
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 48, 0.65);
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.toc a {
  display: block;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  line-height: 1.45;
}

.toc a:hover {
  color: #fff;
}

.callout {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
}

.callout strong {
  color: #ffe08a;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  text-align: left;
}

.compare-table th {
  background: rgba(96, 165, 250, 0.15);
  font-weight: 700;
}

.compare-table tr:nth-child(even) td {
  background: rgba(10, 18, 32, 0.7);
}

.mid-cta {
  margin: 2rem 0;
  padding: 1.4rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(37, 99, 235, 0.08));
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.mid-cta p {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.related {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.related a {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 48, 0.65);
  font-weight: 700;
  color: #e8e6f4;
}

.related a:hover {
  border-color: rgba(96, 165, 250, 0.45);
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-featured {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
}

/* Blog motion & advanced UX */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 80;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
}

.read-progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #1d6fff, #22d3ee, #34d399);
  transition: transform 0.08s linear;
}

.is-blog .page-hero {
  position: relative;
  overflow: hidden;
}

.is-blog .page-hero::before,
.is-blog .page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: blogOrb 12s ease-in-out infinite;
}

.is-blog .page-hero::before {
  width: 280px;
  height: 280px;
  top: -60px;
  right: 8%;
  background: rgba(96, 165, 250, 0.28);
}

.is-blog .page-hero::after {
  width: 200px;
  height: 200px;
  bottom: -40px;
  left: 12%;
  background: rgba(251, 191, 36, 0.14);
  animation-delay: -4s;
}

.is-blog .page-hero > .shell {
  position: relative;
  z-index: 1;
}

@keyframes blogOrb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-18px, 14px) scale(1.08);
    opacity: 1;
  }
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Failsafe: never leave section labels / cards permanently blank */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal]:not(.is-visible) {
    animation: revealFailsafe 0.01s linear 1.4s forwards;
  }
}

@keyframes revealFailsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

.blog-card,
.blog-featured {
  --mx: 50%;
  --my: 40%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

.blog-card::before,
.blog-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(125, 211, 252, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.blog-card > *,
.blog-featured > * {
  position: relative;
  z-index: 1;
}

.blog-card:hover,
.blog-featured:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.blog-card:hover::before,
.blog-featured:hover::before {
  opacity: 1;
}

.blog-card .read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.25s ease, color 0.25s ease;
}

.blog-card:hover .read {
  gap: 0.65rem;
  color: #ffe9a8;
}

.blog-card .tag,
.blog-featured .tag {
  animation: tagFloat 3.5s ease-in-out infinite;
}

@keyframes tagFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.blog-featured {
  background:
    linear-gradient(120deg, rgba(29, 111, 255, 0.26), rgba(6, 182, 212, 0.14) 55%, rgba(10, 18, 32, 0.4));
  background-size: 160% 160%;
  animation: featuredShift 10s ease-in-out infinite;
}

@keyframes featuredShift {
  0%,
  100% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 100% 60%;
  }
}

.toc a {
  position: relative;
  padding-left: 0.85rem;
  transition: color 0.2s ease, transform 0.2s ease, padding 0.2s ease;
}

.toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 3px;
  height: 0.85em;
  border-radius: 99px;
  background: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toc a:hover {
  transform: translateX(3px);
}

.toc a.is-active {
  color: #fff;
}

.toc a.is-active::before {
  background: linear-gradient(180deg, #22d3ee, #1d6fff);
  transform: scaleY(1.15);
}

.callout {
  position: relative;
  overflow: hidden;
  animation: calloutIn 0.6s ease both;
}

.callout::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -30%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-18deg) translateX(-120%);
  animation: sheen 5.5s ease-in-out infinite;
}

@keyframes calloutIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheen {
  0%,
  60% {
    transform: skewX(-18deg) translateX(-140%);
  }
  100% {
    transform: skewX(-18deg) translateX(420%);
  }
}

.mid-cta {
  position: relative;
  overflow: hidden;
}

.mid-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(251, 191, 36, 0.08) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: ctaSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaSweep {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.mid-cta .btn-accent {
  animation: ctaPulse 2.4s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: 0 16px 40px rgba(251, 191, 36, 0.28);
  }
  50% {
    box-shadow: 0 16px 48px rgba(251, 191, 36, 0.48);
  }
}

.compare-table {
  overflow: hidden;
  border-radius: 14px;
}

.compare-table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}

.compare-table tbody tr:hover td {
  background: rgba(96, 165, 250, 0.12);
}

.related a {
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.related a:hover {
  transform: translateX(6px);
  background: rgba(96, 165, 250, 0.12);
}

.heading-anchor {
  cursor: pointer;
  transition: color 0.2s ease;
}

.heading-anchor:hover {
  color: var(--cyan);
}

.heading-anchor.copied::after {
  content: " link copied";
  font-size: 0.7rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  color: #34d399;
  font-weight: 700;
  margin-left: 0.5rem;
  animation: fadePop 0.35s ease;
}

@keyframes fadePop {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 48, 0.65);
  animation: metaIn 0.5s ease both;
}

.article-meta span:nth-child(2) {
  animation-delay: 0.08s;
}
.article-meta span:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes metaIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.blog-visual {
  position: relative;
  min-height: 160px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, #0d1a2e, #050a14);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.blog-visual .beam-mini {
  width: 70%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #22d3ee, #60a5fa, transparent);
  animation: beam 2s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.55);
}

.blog-visual .node {
  position: absolute;
  width: 46px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #1d6fff, #06b6d4 70%, #0a1220);
  animation: floatY 3.8s ease-in-out infinite;
}

.blog-visual .node.left {
  left: 14%;
  transform: rotate(-8deg);
}

.blog-visual .node.right {
  right: 14%;
  transform: rotate(8deg);
  animation-delay: -1.6s;
}

@media (prefers-reduced-motion: reduce) {
  .is-blog .page-hero::before,
  .is-blog .page-hero::after,
  .blog-featured,
  .blog-card .tag,
  .callout::after,
  .mid-cta::before,
  .mid-cta .btn-accent,
  .blog-visual .beam-mini,
  .blog-visual .node {
    animation: none !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blog-card:hover,
  .blog-featured:hover,
  .related a:hover {
    transform: none;
  }
}

/* =========================================================
   Premium light theme — app light palette (colors.ts)
   ========================================================= */
html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html.theme-animating,
html.theme-animating *,
html.theme-animating *::before,
html.theme-animating *::after {
  transition:
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.45s ease,
    fill 0.35s ease,
    stroke 0.35s ease !important;
}

[data-theme="light"] {
  --bg: #f3f7fc;
  --bg-elevated: #ffffff;
  --bg-surface: #ffffff;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #475569;
  --muted-strong: #334155;
  --line: #dbe7f5;
  --border: #dbe7f5;
  --brand: #2563eb;
  --brand-mid: #2563eb;
  --brand-deep: #1e40af;
  --brand-soft: rgba(37, 99, 235, 0.1);
  --hero-from: #1d6fff;
  --hero-to: #06b6d4;
  --sheen: #0891b2;
  --cyan: #0369a1;
  --glow: rgba(37, 99, 235, 0.22);
  --accent: #f59e0b;
  --accent-ink: #1a1206;
  --accent-hover: #fbbf24;
  --success: #059669;
}

[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 10% -8%, rgba(29, 111, 255, 0.14), transparent 55%),
    radial-gradient(860px 460px at 92% 0%, rgba(6, 182, 212, 0.1), transparent 50%),
    radial-gradient(760px 480px at 50% 100%, rgba(37, 99, 235, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fc 40%, #eef4fb 100%);
  color: var(--ink);
}

[data-theme="light"] .site-header {
  background: rgba(243, 247, 252, 0.82);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

[data-theme="light"] .btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-ghost:hover {
  background: #ffffff;
  border-color: #c5d8ef;
}

[data-theme="light"] .feature-tile,
[data-theme="light"] .faq-item,
[data-theme="light"] .security-card,
[data-theme="light"] .download-card,
[data-theme="light"] .blog-card,
[data-theme="light"] .related a,
[data-theme="light"] .callout,
[data-theme="light"] .stat-card,
[data-theme="light"] .step-card,
[data-theme="light"] .permission-card,
[data-theme="light"] .howto-step,
[data-theme="light"] .mode-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 30px rgba(15, 45, 90, 0.06);
}

[data-theme="light"] .eyebrow {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.28);
  color: #1d4ed8;
}

[data-theme="light"] .blog-card .tag,
[data-theme="light"] .blog-featured .tag,
[data-theme="light"] .tag {
  background: rgba(217, 119, 6, 0.14) !important;
  color: #b45309 !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
}

[data-theme="light"] .blog-card h2,
[data-theme="light"] .blog-card .display,
[data-theme="light"] .blog-featured h2 {
  color: #0f172a !important;
}

[data-theme="light"] .blog-card p,
[data-theme="light"] .blog-card .meta,
[data-theme="light"] .blog-card .read {
  color: #475569 !important;
}

[data-theme="light"] .blog-card:hover .read {
  color: #b45309 !important;
}

[data-theme="light"] .blog-featured .tag {
  color: #b45309 !important;
}

[data-theme="light"] .callout strong {
  color: #b45309 !important;
}

[data-theme="light"] .article-meta span {
  background: #ffffff;
  border-color: #dbe7f5;
  color: #475569 !important;
}

[data-theme="light"] .brand-name span {
  color: #2563eb;
}

[data-theme="light"] .phone,
[data-theme="light"] .diagram-device,
[data-theme="light"] .blog-visual {
  background: linear-gradient(160deg, #e8f1fc, #f8fbff) !important;
  border-color: #c9daf0 !important;
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.12) !important;
}

[data-theme="light"] .phone-inner,
[data-theme="light"] .diagram-device-inner,
[data-theme="light"] .blog-visual .node {
  background: linear-gradient(180deg, #1d6fff, #06b6d4 55%, #0c4a6e) !important;
  color: #fff;
}

[data-theme="light"] .phone-card,
[data-theme="light"] .diagram-chip {
  background: rgba(2, 6, 23, 0.22) !important;
}

[data-theme="light"] .transfer-glow,
[data-theme="light"] .security-band,
[data-theme="light"] .mid-cta,
[data-theme="light"] .blog-featured,
[data-theme="light"] .cta-band {
  background:
    radial-gradient(600px 280px at 20% 20%, rgba(29, 111, 255, 0.14), transparent 60%),
    radial-gradient(500px 260px at 90% 10%, rgba(6, 182, 212, 0.12), transparent 55%),
    linear-gradient(120deg, rgba(232, 241, 252, 0.95), rgba(248, 251, 255, 0.98)) !important;
  border-color: #c9daf0 !important;
  box-shadow: 0 18px 40px rgba(15, 45, 90, 0.08);
}

[data-theme="light"] .article-meta span {
  background: #ffffff;
  border-color: var(--border);
  color: var(--muted);
}

[data-theme="light"] .site-footer {
  background: #eaf1f9;
  border-top-color: var(--border);
}

[data-theme="light"] .mobile-nav {
  background: rgba(243, 247, 252, 0.98);
}

[data-theme="light"] .prose code,
[data-theme="light"] code {
  background: #e8f0fe;
  color: #1e40af;
}

[data-theme="light"] .read-progress,
[data-theme="light"] .blog-progress {
  background: linear-gradient(90deg, #1d6fff, #06b6d4);
}

/* How-to diagram + home panels — full light readability */
[data-theme="light"] .howto-visual {
  background: linear-gradient(165deg, #ffffff, #f0f6ff) !important;
  border-color: #c9daf0 !important;
  box-shadow: 0 16px 40px rgba(15, 45, 90, 0.08);
}

[data-theme="light"] .howto-glow {
  background: radial-gradient(circle, rgba(29, 111, 255, 0.18), transparent 70%);
}

[data-theme="light"] .howto-step-btn {
  background: #ffffff !important;
  border-color: #dbe7f5 !important;
  color: #475569 !important;
  box-shadow: 0 6px 18px rgba(15, 45, 90, 0.04);
}

[data-theme="light"] .howto-step-btn.is-active {
  background: linear-gradient(135deg, rgba(29, 111, 255, 0.1), rgba(6, 182, 212, 0.08)) !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .howto-step-btn.is-active .howto-step-text strong {
  color: #0f172a;
}

[data-theme="light"] .howto-step-btn.is-active .howto-step-body {
  color: #334155;
}

[data-theme="light"] .howto-step-num {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

[data-theme="light"] .diagram-label,
[data-theme="light"] .diagram-sub {
  color: #0f172a;
}

[data-theme="light"] .diagram-sub {
  color: #475569;
}

[data-theme="light"] .pick-list {
  background: #ffffff !important;
  border-color: #dbe7f5 !important;
  box-shadow: 0 12px 28px rgba(15, 45, 90, 0.08);
  color: #0f172a;
}

[data-theme="light"] .pick-list div {
  background: #f3f7fc !important;
  border-color: #dbe7f5 !important;
  color: #0f172a;
}

[data-theme="light"] .pick-list div:first-child {
  background: linear-gradient(135deg, rgba(29, 111, 255, 0.16), rgba(6, 182, 212, 0.12)) !important;
  border-color: rgba(37, 99, 235, 0.28) !important;
  color: #0f172a;
}

[data-theme="light"] .pin-row span {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}

[data-theme="light"] .panel,
[data-theme="light"] .howto-diagram .panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border-color: #dbe7f5 !important;
  box-shadow: 0 10px 28px rgba(15, 45, 90, 0.06);
  color: #0f172a;
}

[data-theme="light"] .panel h3,
[data-theme="light"] .panel .display {
  color: #0f172a;
}

[data-theme="light"] .panel p,
[data-theme="light"] .panel .muted,
[data-theme="light"] .home-feature-grid .muted {
  color: #475569 !important;
}

[data-theme="light"] .feature-tile h3,
[data-theme="light"] .feature-tile .display {
  color: #0f172a;
}

[data-theme="light"] .feature-tile p {
  color: #475569 !important;
}

[data-theme="light"] .security-band .eyebrow {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.28);
  color: #047857;
}

[data-theme="light"] .security-band a.seo-link,
[data-theme="light"] .security-band .seo-link {
  color: #047857;
}

[data-theme="light"] .security-band h2,
[data-theme="light"] .security-band .display,
[data-theme="light"] .cta-band h2,
[data-theme="light"] .cta-band .display,
[data-theme="light"] .mid-cta h2,
[data-theme="light"] .mid-cta .display {
  color: #0f172a;
}

[data-theme="light"] .security-band p,
[data-theme="light"] .cta-band p,
[data-theme="light"] .mid-cta p,
[data-theme="light"] .page-hero p,
[data-theme="light"] .lead,
[data-theme="light"] .muted {
  color: #475569;
}

[data-theme="light"] .page-hero h1,
[data-theme="light"] .section-head h2,
[data-theme="light"] .display {
  color: #0f172a;
}

[data-theme="light"] .faq-item,
[data-theme="light"] details.faq-item {
  background: #ffffff !important;
  border-color: #dbe7f5 !important;
  color: #0f172a;
}

[data-theme="light"] .faq-item summary {
  color: #0f172a;
}

[data-theme="light"] .faq-item p {
  color: #475569;
}

[data-theme="light"] .hero-meta,
[data-theme="light"] .howto-hint,
[data-theme="light"] .howto-hint.muted {
  color: #475569 !important;
}

[data-theme="light"] .transfer-scene .phone {
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.14) !important;
}

[data-theme="light"] .qr-box {
  background: #ffffff;
  border-color: #dbe7f5;
  color: #0f172a;
}

[data-theme="light"] .check-list li {
  color: #334155;
}

[data-theme="light"] .download-card,
[data-theme="light"] .stat-card {
  color: #0f172a;
}

[data-theme="light"] .site-footer,
[data-theme="light"] .site-footer a,
[data-theme="light"] .footer-bottom {
  color: #475569;
}

[data-theme="light"] .site-footer .display {
  color: #0f172a;
}

[data-theme="light"] .desktop-nav a {
  color: #475569;
}

[data-theme="light"] .desktop-nav a.is-active,
[data-theme="light"] .desktop-nav a:hover {
  color: #0f172a;
}

[data-theme="light"] .step-row:nth-child(even) {
  background: #ffffff !important;
  border-color: #dbe7f5;
}

[data-theme="light"] .step-row:nth-child(odd) {
  background: rgba(37, 99, 235, 0.06) !important;
}

[data-theme="light"] .toc,
[data-theme="light"] .related a,
[data-theme="light"] .blog-card {
  background: #ffffff !important;
  border-color: #dbe7f5 !important;
  color: #0f172a;
}

[data-theme="light"] .compare-table tr:nth-child(even) td {
  background: #f8fbff !important;
}

[data-theme="light"] .compare-table th {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #0f172a;
}

[data-theme="light"] .qr-box {
  background: #ffffff !important;
  border-color: rgba(217, 119, 6, 0.45);
  color: #b45309;
  box-shadow: 0 8px 20px rgba(15, 45, 90, 0.08);
}

[data-theme="light"] .phone-card .name,
[data-theme="light"] .phone-card .meta,
[data-theme="light"] .phone-badge,
[data-theme="light"] .phone-title {
  color: #fff;
}

/* ---- Advanced theme switcher ---- */
.theme-switch {
  --ts-pad: 3px;
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 0;
  padding: var(--ts-pad);
  min-width: 118px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(16, 28, 48, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 20px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

[data-theme="light"] .theme-switch {
  background:
    linear-gradient(180deg, #ffffff, #f3f7fc);
  box-shadow:
    0 1px 0 #fff inset,
    0 8px 18px rgba(37, 99, 235, 0.08);
}

.theme-switch-thumb {
  position: absolute;
  top: var(--ts-pad);
  left: var(--ts-pad);
  width: calc((100% - 6px) / 3);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  box-shadow:
    0 8px 18px rgba(37, 99, 235, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  pointer-events: none;
}

.theme-switch[data-active="dark"] .theme-switch-thumb {
  transform: translateX(0);
}
.theme-switch[data-active="system"] .theme-switch-thumb {
  transform: translateX(100%);
}
.theme-switch[data-active="light"] .theme-switch-thumb {
  transform: translateX(200%);
}

.theme-switch button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  transition: color 0.25s ease, transform 0.2s ease;
}

.theme-switch button svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-switch button[aria-pressed="true"] {
  color: #fff;
}

.theme-switch button:hover {
  color: var(--ink);
}

.theme-switch button[aria-pressed="true"]:hover {
  color: #fff;
}

.theme-switch button:focus-visible {
  outline: 2px solid var(--sheen);
  outline-offset: 2px;
}

.theme-switch button:active {
  transform: scale(0.92);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

@media (min-width: 920px) {
  .site-header-inner .desktop-nav {
    margin-left: auto;
  }
  .site-header-inner .header-tools {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .theme-switch {
    min-width: 104px;
    height: 34px;
  }
  .theme-switch button svg {
    width: 13px;
    height: 13px;
  }
}

/* Soft light shine on switch when light is active */
.theme-switch[data-active="light"] .theme-switch-thumb {
  background: linear-gradient(135deg, #38bdf8, #1d6fff);
}

.theme-switch[data-active="system"] .theme-switch-thumb {
  background: linear-gradient(135deg, #64748b, #2563eb);
}
