/* Auddio Design System - Authentic to Auddio Flutter Mobile App & Inspired by Eclipse Music */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-display: 'Outfit', 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-h: 68px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Auddio App Brand Tokens (from audiio_theme_tokens.dart) */
  --primary-purple: #6C38FF; /* Premium Vibrant Royal Violet from Logo */
  --accent-indigo: #5E32ED;  /* Deep Indigo Accent */
  --accent-coral: #FF7854;   /* Dynamic player accent */
  --accent-amber: #FFB36B;   /* Warm warning / stats amber */
  --accent-teal: #00C853;    /* Success green */

  --accent: var(--primary-purple);
  --accent-soft: rgba(108, 56, 255, 0.18);
  --on-accent: #ffffff;

  /* Surfaces & Warm Charcoal Theme matching Auddio Flutter App */
  --bg: #0e0e12;
  --bg-2: #141419;
  --surface: #1a1a22;
  --surface-2: #23232e;
  --surface-elevated: #2c2c3a;
  --text: #f8fafc;
  --text-2: #b4b4c4;
  --muted: #747488;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(14, 14, 18, 0.85);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.5);
  --frame: #1f1f28;
  --danger: #FF5252;
  --ok: #00C853;
  --warn: #FFB36B;
  color-scheme: dark;
}

:root[data-accent="coral"] {
  --accent: #FF7854;
  --accent-soft: rgba(255, 120, 84, 0.18);
  --on-accent: #ffffff;
}

:root[data-accent="blue"] {
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --on-accent: #ffffff;
}

:root[data-accent="teal"] {
  --accent: #00C853;
  --accent-soft: rgba(0, 200, 83, 0.18);
  --on-accent: #ffffff;
}

:root[data-accent="amber"] {
  --accent: #FFB36B;
  --accent-soft: rgba(255, 179, 107, 0.18);
  --on-accent: #0e0e12;
}

:root[data-accent="ink"] {
  --accent: #f8fafc;
  --accent-soft: rgba(255, 255, 255, 0.14);
  --on-accent: #0e0e12;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.6rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 600;
}

p {
  margin: 0;
}

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

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

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container.narrow {
  max-width: 880px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36em;
}

.lede.big {
  font-size: clamp(1.15rem, 1.6vw, 1.38rem);
  line-height: 1.58;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* App-Like Pill Badge */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.pill-badge svg {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 26px color-mix(in srgb, var(--accent) 50%, transparent);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--text);
  color: var(--bg);
}

.btn-solid:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 0.88rem;
  border-radius: 10px;
}

.btn-lg {
  height: 52px;
  padding: 0 28px;
  font-size: 1.04rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Navigation Header */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled,
body.dark-nav .nav {
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  color: var(--text);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  white-space: nowrap;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-text {
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.15s;
}

.nav-text:hover {
  color: var(--text);
}

.nav-burger {
  display: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
}

/* Mobile Slide-in Drawer Sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--bg);
  display: none;
  flex-direction: column;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet.open {
  display: flex;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.sheet-links {
  display: grid;
  padding: 20px 0;
}

.sheet-links a {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.sheet-links a.active {
  color: var(--accent);
}

.sheet-foot {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  gap: 12px;
}

body.sheet-open {
  overflow: hidden;
}

/* Bands (Section Stripes) */
.band {
  position: relative;
  background: var(--bg);
  color: var(--text);
  padding: clamp(72px, 9vw, 120px) 0;
}

.band.tight {
  padding: clamp(48px, 6vw, 84px) 0;
}

.band.light {
  background: var(--bg-2);
}

.band + .band.light,
.band.light + .band {
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.split.rev > :first-child {
  order: 2;
}

.split .copy h2 {
  margin-bottom: 20px;
}

.split .copy .lede {
  margin-bottom: 28px;
}

.points {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 0.975rem;
  line-height: 1.55;
}

.points li strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
  font-size: 1.05rem;
}

/* Device Frames (Hardware Mimic with Realistic iPhone 17 Pro Dynamic Island) */
.shot {
  position: relative;
  overflow: hidden;
  background: #000000;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.frame-desktop {
  border-radius: 16px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  background: #000000;
  overflow: hidden;
}

.frame-desktop .shot {
  border-radius: 15px;
  aspect-ratio: 16 / 10;
}

.frame-phone {
  position: relative;
  border-radius: 46px;
  padding: 8px;
  background: linear-gradient(145deg, #3d3d48 0%, #1e1e24 45%, #2a2a34 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 35px 80px -15px rgba(0, 0, 0, 0.85),
    0 15px 35px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.95),
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.7);
  overflow: visible;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Realistic Hardware Buttons (Volume & Power / Action Button) */
.frame-phone::before {
  content: "";
  position: absolute;
  top: 90px;
  left: -3px;
  width: 3px;
  height: 44px;
  background: #3a3a46;
  border-radius: 2px 0 0 2px;
  box-shadow: 
    0 54px 0 #3a3a46, /* Volume down */
    0 -42px 0 #3a3a46; /* Action button */
}

.frame-phone .shot {
  position: relative;
  border-radius: 38px;
  aspect-ratio: 9 / 19.5;
  background: #000000;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(56px, 8vw, 110px)) 0 clamp(72px, 9vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero .lede {
  margin-bottom: 34px;
}

.hero-plat {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-plat span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-plat span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-art {
  position: relative;
  min-height: 560px;
}

.hero-art .frame-desktop {
  position: absolute;
  left: 0;
  top: 50%;
  width: 140%;
  transform: translateY(-50%) perspective(2400px) rotateY(-7deg) rotateX(1.8deg);
  transform-origin: left center;
}

.hero-art .frame-phone {
  position: absolute;
  left: -24px;
  bottom: 5%;
  width: clamp(200px, 17vw, 250px);
  transform: rotate(-3deg);
  z-index: 3;
}

/* Story Custom Layouts */
.story .frame-desktop {
  width: 112%;
}

.story.rev .frame-desktop {
  margin-left: -12%;
}

.story .shot img {
  object-position: left top;
}

.phones {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: end;
  min-height: 520px;
}

.phones .frame-phone {
  width: min(100%, 260px);
}

.phones .frame-phone:first-child {
  justify-self: end;
  margin-right: -8%;
  transform: translateY(-40px) rotate(-3deg);
  z-index: 1;
}

.phones .frame-phone:last-child {
  justify-self: start;
  transform: rotate(3deg);
}

/* Trio Section */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.trio .cell {
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
}

.trio h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.trio p {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.trio .frame-phone {
  width: min(100%, 210px);
  margin-top: auto;
  align-self: center;
}

/* Feature Grid (Hairline Border System) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-grid > div {
  padding: 34px 30px 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-grid p {
  color: var(--text-2);
  font-size: 0.925rem;
  line-height: 1.6;
}

.section-head {
  max-width: 44em;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2 {
  margin-bottom: 16px;
}

/* Download Row */
.dl-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.dl-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.dl-plats .btn {
  min-width: 180px;
}

.dl-web {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.925rem;
}

.dl-web a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Developer Docs Two-Column Layout */
.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 96px;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 10px;
}

.toc .label {
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px 12px;
}

.toc .label:first-child {
  margin-top: 0;
}

.toc a {
  display: block;
  padding: 7px 12px;
  color: var(--text-2);
  font-size: 0.88rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.15s;
}

.toc a:hover {
  color: var(--text);
  background: var(--bg-2);
}

.toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.doc {
  min-width: 0;
}

.doc h1 {
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  margin-bottom: 14px;
}

.doc .subtitle {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 44em;
  margin-bottom: 12px;
  line-height: 1.6;
}

.doc h2 {
  font-size: 1.65rem;
  margin: 56px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.doc h3 {
  font-size: 1.2rem;
  margin: 34px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.doc h4 {
  font-size: 1.02rem;
  margin: 22px 0 8px;
  color: var(--text);
}

.doc p, .doc li {
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.7;
}

.doc p {
  margin: 0 0 16px;
}

.doc ul, .doc ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.doc li {
  margin: 6px 0;
}

.doc strong {
  color: var(--text);
}

.doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 44px 0;
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text);
}

/* Code block wrapper with title bar and copy button */
.code-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 16px 0 24px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

.code-header .lang {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-2);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent);
}

.copy-btn.copied {
  color: var(--ok);
  border-color: var(--ok);
}

.doc pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.6;
  background: transparent;
  border: 0;
}

.doc pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-2);
}

/* Tables */
.doc .table-wrap {
  overflow-x: auto;
  margin: 16px 0 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.doc th {
  background: var(--bg-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc tr:last-child td {
  border-bottom: 0;
}

.doc td code {
  white-space: nowrap;
}

/* Callouts / Tips */
.doc .tip {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
}

.doc .tip strong {
  color: var(--accent);
}

.doc .tip.warning {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}

.doc .tip.warning strong {
  color: var(--warn);
}

/* Mobile Docs TOC */
.doc-mobile-toc {
  display: none;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 0;
    padding: calc(var(--nav-h) + 20px) var(--gutter) 64px;
  }
  .toc {
    display: none;
  }
  .doc-mobile-toc {
    display: block;
    margin-bottom: 28px;
  }
  .doc-mobile-toc summary {
    list-style: none;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
  }
  .doc-mobile-toc summary::-webkit-details-marker {
    display: none;
  }
  .doc-mobile-toc summary .toc-toggle {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
  }
  .doc-mobile-toc[open] summary .toc-toggle::after {
    content: "Hide";
  }
  .doc-mobile-toc[open] summary .toc-toggle {
    font-size: 0;
  }
  .doc-mobile-toc[open] summary .toc-toggle::after {
    font-size: 0.82rem;
  }
  .doc-mobile-toc[open] summary {
    border-radius: 12px 12px 0 0;
  }
  .doc-mobile-toc .list {
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 10px 8px;
    display: grid;
  }
  .doc-mobile-toc .list a {
    padding: 9px 12px;
    color: var(--text-2);
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
  }
  .doc-mobile-toc .list a.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
  }
  .doc-mobile-toc .list .label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 12px 0 6px 12px;
  }
}

/* Footer */
.footer {
  background: #08080a;
  color: #f8fafc;
  padding: clamp(56px, 7vw, 96px) 0 28px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 36px;
}

.footer-brand p {
  color: var(--text-2);
  font-size: 0.925rem;
  max-width: 26em;
  margin-top: 16px;
  line-height: 1.6;
}

.footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 700;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer li a {
  font-size: 0.925rem;
  color: var(--text-2);
  transition: color 0.15s;
}

.footer li a:hover {
  color: var(--text);
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5rem, 18vw, 16rem);
  line-height: 0.74;
  letter-spacing: -0.05em;
  color: #121217;
  margin: clamp(48px, 7vw, 96px) 0 0;
  height: 0.72em;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Floating Accent Preview Bar */
.pv-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(18, 18, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pv-bar .pv-label {
  font-size: 0.7rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 6px;
  font-weight: 700;
}

.pv-bar button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
}

.pv-bar button:hover {
  color: var(--text);
}

.pv-bar button.on {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pv-bar .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .nav-links a {
    padding: 8px 11px;
    font-size: 0.88rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 0;
    padding-bottom: 40px;
  }
  .hero-art .frame-desktop {
    position: relative;
    width: 100%;
    top: auto;
    transform: none;
  }
  .hero-art .frame-phone {
    left: auto;
    right: -10px;
    bottom: 0;
    width: 170px;
  }
  .split, .split.rev {
    grid-template-columns: 1fr;
  }
  .split.rev > :first-child {
    order: 0;
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .nav-links, .nav-text, .nav-right .btn {
    display: none;
  }
  .nav-inner {
    grid-template-columns: 1fr auto;
  }
  .nav-burger {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
  }
  h1 {
    font-size: clamp(2.3rem, 10vw, 3.1rem);
  }
  h2 {
    font-size: clamp(1.8rem, 7.5vw, 2.3rem);
  }
  .band {
    padding: 60px 0;
  }
  .hero {
    padding-top: calc(var(--nav-h) + 36px);
    padding-bottom: 54px;
  }
  .hero .btn-row .btn {
    width: 100%;
  }
  .hero-art .frame-phone {
    width: 140px;
    right: -4px;
    border-radius: 30px;
    padding: 5px;
  }
  .hero-art .frame-phone .shot {
    border-radius: 25px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid > div {
    padding: 24px 20px 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .dl-row {
    grid-template-columns: 1fr;
  }
  .dl-plats {
    flex-direction: column;
  }
  .dl-plats .btn {
    width: 100%;
  }
  .phones {
    min-height: 0;
  }
  .trio {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .trio .frame-phone {
    display: none;
  }
  .pv-bar {
    right: 12px;
    bottom: 12px;
  }
  .pv-bar .pv-label {
    display: none;
  }
}

/* Documentation Actions Bar & SDK Version Badge */
.doc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 28px;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}

.doc-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.doc-badge strong {
  color: var(--text);
}

/* Auto-Generated TypeScript SDK API Reference Styles */
.api-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 24px 0;
  transition: border-color 0.15s;
}

.api-card:hover {
  border-color: var(--line-2);
}

.api-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.api-kind-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.api-kind-badge.class {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.api-kind-badge.method {
  background: color-mix(in srgb, #3b82f6 18%, transparent);
  color: #60a5fa;
  border-color: color-mix(in srgb, #3b82f6 40%, transparent);
}

.api-kind-badge.function {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

.api-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--text);
}

.api-signature {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0 16px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text);
  overflow-x: auto;
}

.api-comment {
  font-size: 0.94rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Capability Cards Grid for Rich Visual Presentation */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}

.capability-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.capability-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.capability-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cap-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.cap-endpoint {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.capability-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-family: var(--font-display);
  color: var(--text);
}

.capability-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.55;
  flex-grow: 1;
}

/* Enhanced Table Styling */
.doc table tbody tr {
  transition: background-color 0.12s ease;
}

.doc table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.doc table code {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  font-weight: 600;
}
