@layer reset, base, theme, components, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
  }

  img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
  }

  button, input, select, textarea {
    font: inherit;
    color: inherit;
  }
}

@layer theme {
  :root {
    --bg-primary: #151E28;
    --bg-secondary: #1C2733;
    --bg-card: #22303F;
    --bg-elevated: #2A3B4D;
    --border-color: #384D63;
    --border-subtle: #2B3C4E;
    --border-highlight: rgba(0, 230, 168, 0.45);

    --mint-primary: #00E6A8;
    --mint-bright: #5CFFD0;
    --mint-dim: #008F68;
    --mint-surface: rgba(0, 230, 168, 0.14);

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    --danger: #FF4D6A;
    --warning: #FFB547;
    --info: #38BDF8;
    --success: #00E6A8;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    --shadow-card: 0 20px 44px -12px rgba(5, 8, 12, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-glow: 0 10px 28px -8px rgba(0, 230, 168, 0.28);
    --container-max: 1280px;

    --space-xs: 0.625rem;
    --space-sm: 0.9rem;
    --space-md: 1.35rem;
    --space-lg: 1.85rem;
    --space-xl: 2.5rem;
    --space-section: clamp(3.75rem, 6.5vw, 5.75rem);
  }
}

@layer base {
  body {
    background-color: var(--bg-primary);
    background-image:
      radial-gradient(circle at 18% 0%, rgba(0, 230, 168, 0.11) 0%, transparent 45%),
      radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.10) 0%, transparent 42%),
      linear-gradient(180deg, #18222D 0%, #131B24 100%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  a {
    color: var(--mint-bright);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
  }

  a:hover {
    color: var(--mint-primary);
  }

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

  ::selection {
    background: rgba(0, 230, 168, 0.28);
    color: var(--text-primary);
  }

  h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.22;
    letter-spacing: -0.022em;
    font-weight: 700;
    overflow-wrap: break-word;
  }

  h1 {
    font-size: clamp(2rem, 3.6vw + 0.85rem, 3.65rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(1.55rem, 2.4vw + 0.6rem, 2.4rem);
  }

  h3 {
    font-size: clamp(1.12rem, 1.1vw + 0.55rem, 1.35rem);
  }

  p, li, td, th {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0.12em 0.4em;
    border-radius: 6px;
    color: var(--mint-bright);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  pre {
    font-family: var(--font-mono);
    background: #0B0F14;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.2rem;
    max-width: 100%;
    overflow-x: auto;
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--text-primary);
  }

  pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@layer components {
  /* Full-Viewport Animated Network Graph Background Canvas */
  .network-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
  }

  main,
  .site-footer {
    position: relative;
    z-index: 1;
  }

  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.25rem);
    padding-inline-start: max(clamp(1rem, 4vw, 2.25rem), env(safe-area-inset-left));
    padding-inline-end: max(clamp(1rem, 4vw, 2.25rem), env(safe-area-inset-right));
  }

  /* Prevent CSS Grid & Flex blowout from long content */
  .hero-grid > *,
  .bridge-columns > *,
  .bento-grid-2 > *,
  .bento-grid-3 > *,
  .bento-grid-4 > *,
  .signal-tiers > *,
  .gallery-grid > *,
  .footer-grid > *,
  .kpi-strip > *,
  .preview-card-row > *,
  .docs-layout > *,
  .docs-content > *,
  .docs-section-card > *,
  .bento-card > * {
    min-width: 0;
  }

  /* =========================================================
     STICKY RESPONSIVE HEADER & DROPDOWN NAVIGATION (NO WRAPPING)
     ========================================================= */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(21, 30, 40, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1.5rem;
    min-height: 4.6rem;
    position: relative;
  }

  .brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.48rem;
    letter-spacing: -0.028em;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 0.5rem;
  }

  .brand-link:hover {
    color: var(--mint-bright);
  }

  .brand-sub {
    display: none;
  }

  .header-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 1.35rem;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .nav-list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
    list-style: none;
  }

  .nav-list > li {
    position: relative;
    flex-shrink: 0;
  }

  .nav-link,
  .nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.16s ease;
  }

  .nav-link:hover,
  .nav-dropdown-trigger:hover,
  .nav-dropdown-trigger[aria-expanded="true"] {
    color: var(--text-primary);
  }

  .nav-link[aria-current="page"],
  .nav-dropdown-trigger[data-active="true"] {
    color: var(--mint-bright);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--mint-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.5rem;
  }

  .nav-dropdown-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.18s ease;
    opacity: 0.8;
  }

  .nav-dropdown-trigger[aria-expanded="true"] .nav-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--mint-bright);
  }

  /* Desktop Dropdown Panel */
  .nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    left: auto;
    width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.55rem;
    box-shadow: var(--shadow-card);
    z-index: 120;
    display: grid;
    gap: 0.25rem;
  }

  .nav-dropdown-panel[hidden] {
    display: none !important;
  }

  .dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.15s ease;
  }

  .dropdown-item:hover,
  .dropdown-item[aria-current="page"] {
    background: var(--bg-elevated);
    color: var(--mint-bright);
  }

  .dropdown-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .dropdown-item-desc {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.35;
  }

  .header-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.85rem;
    flex-shrink: 0;
  }

  .header-actions .btn {
    padding: 0.44rem 0.95rem;
    font-size: 0.83rem;
    white-space: nowrap;
  }

  .mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
  }

  @media (max-width: 1040px) {
    .brand-sub {
      display: none;
    }

    .mobile-menu-btn {
      display: inline-flex;
      min-height: 44px;
    }

    .header-nav-wrap {
      display: none;
      margin-left: 0;
      position: absolute;
      top: calc(100% + 0.4rem);
      left: 1rem;
      right: 1rem;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 1rem;
      flex-direction: column;
      align-items: stretch;
      gap: 0.85rem;
      box-shadow: var(--shadow-card);
      max-height: calc(100dvh - 5.5rem);
      overflow-y: auto;
    }

    .header-nav-wrap.is-open {
      display: flex;
    }

    .nav-list {
      flex-direction: column;
      align-items: stretch;
      gap: 0.35rem;
    }

    .nav-link,
    .nav-dropdown-trigger {
      width: 100%;
      min-height: 44px;
      justify-content: space-between;
      padding: 0.65rem 0.8rem;
    }

    .nav-dropdown-panel {
      position: static;
      right: auto;
      width: 100%;
      margin-top: 0.25rem;
      background: rgba(10, 13, 16, 0.55);
      box-shadow: none;
      border-color: var(--border-subtle);
    }

    .header-actions {
      flex-direction: column;
      align-items: stretch;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border-subtle);
    }

    .header-actions .btn {
      width: 100%;
      min-height: 44px;
    }
  }

  @media (max-width: 480px) {
    .brand-sub {
      display: none;
    }
  }

  /* =========================================================
     BUTTONS & PILLS
     ========================================================= */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.68rem 1.25rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
    text-decoration: none;
    text-align: center;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--mint-bright) 0%, var(--mint-primary) 100%);
    color: #041510;
    box-shadow: var(--shadow-glow);
  }

  .btn-primary:hover {
    color: #041510;
    box-shadow: 0 14px 40px -8px rgba(0, 230, 168, 0.42);
  }

  .btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-color);
  }

  .btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--mint-primary);
    background: #232E39;
  }

  .btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border-color: var(--border-color);
    padding: 0.5rem 0.95rem;
    font-size: 0.84rem;
  }

  .btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--mint-primary);
    background: rgba(0, 230, 168, 0.08);
  }

  .eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
  }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.78rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.3;
  }

  .pill-mint {
    background: var(--mint-surface);
    border-color: var(--border-highlight);
    color: var(--mint-bright);
  }

  .pill-info {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.36);
    color: #7DD3FC;
  }

  .pill-warning {
    background: rgba(255, 181, 71, 0.12);
    border-color: rgba(255, 181, 71, 0.32);
    color: var(--warning);
  }

  /* =========================================================
     HERO SECTION & INTERACTIVE SHOWCASE STAGE
     ========================================================= */
  .hero {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(1.75rem, 3.5vw, 3rem);
    align-items: center;
  }

  @media (max-width: 1080px) {
    .hero-grid {
      grid-template-columns: 1fr;
    }
  }

  .hero-lead {
    position: relative;
    font-size: clamp(1rem, 1.15vw, 1.14rem);
    color: var(--text-secondary);
    margin-block: 1.15rem 1.6rem;
    max-width: 62ch;
  }

  /* Inline Technical Clarifier Tooltip */
  .tech-tooltip-wrap {
    position: relative;
    display: inline-block;
  }

  .tech-term-btn {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: underline dotted var(--mint-primary);
    text-underline-thickness: 2px;
    text-underline-offset: 0.24em;
    cursor: help;
    display: inline;
  }

  .tech-term-btn:hover,
  .tech-term-btn:focus-visible {
    color: var(--mint-bright);
  }

  .tech-tooltip-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.6rem);
    transform: translateX(-50%) translateY(4px);
    width: min(340px, 84vw);
    padding: 0.85rem 0.95rem;
    background: #0D141C;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.48;
    font-weight: 400;
    text-align: left;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  }

  .tech-tooltip-wrap:hover .tech-tooltip-bubble,
  .tech-tooltip-wrap:focus-within .tech-tooltip-bubble,
  .tech-tooltip-wrap.is-open .tech-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  @media (max-width: 680px) {
    .tech-tooltip-wrap {
      position: static;
    }

    .tech-tooltip-bubble {
      left: 0;
      right: 0;
      top: calc(100% + 0.5rem);
      bottom: auto;
      width: auto;
      max-width: 100%;
      transform: translateY(4px);
    }

    .tech-tooltip-wrap:hover .tech-tooltip-bubble,
    .tech-tooltip-wrap:focus-within .tech-tooltip-bubble,
    .tech-tooltip-wrap.is-open .tech-tooltip-bubble {
      transform: translateY(0);
    }
  }

  .text-gradient {
    background: linear-gradient(135deg, #FFFFFF 15%, var(--mint-bright) 65%, var(--info) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group:last-child,
  .bento-card .hero-cta-group,
  .bridge-cta-panel .hero-cta-group {
    margin-bottom: 0;
  }

  .btn-hero-primary {
    padding: 0.85rem 1.7rem;
    font-size: 0.98rem;
  }

  .hero-quiet-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.18s ease;
  }

  .hero-quiet-link:hover {
    color: var(--mint-bright);
  }

  @media (max-width: 520px) {
    .hero-cta-group {
      flex-direction: column;
      align-items: stretch;
    }

    .hero-cta-group .btn {
      width: 100%;
    }

    .hero-quiet-link {
      text-align: center;
    }
  }

  /* Compact Single-Row Trust Strip */
  .hero-trust-strip {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.86rem;
    color: var(--text-secondary);
  }

  .hero-trust-strip li strong {
    color: var(--text-primary);
  }

  /* 4-Item KPI Strip (used on subpages if needed) */
  .kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
  }

  @media (max-width: 680px) {
    .kpi-strip {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 380px) {
    .kpi-strip {
      grid-template-columns: 1fr;
    }
  }

  .kpi-item {
    background: rgba(34, 48, 63, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
  }

  .kpi-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
  }

  .kpi-label {
    display: block;
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    line-height: 1.35;
  }

  /* Interactive Showcase Stage */
  .showcase-stage {
    background: linear-gradient(165deg, rgba(36, 51, 67, 0.95) 0%, rgba(26, 37, 49, 0.96) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(0.95rem, 2vw, 1.35rem);
    box-shadow: var(--shadow-card);
    width: 100%;
  }

  .showcase-header {
    margin-bottom: 0.85rem;
  }

  .showcase-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }

  @media (max-width: 560px) {
    .showcase-tabs {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .tab-btn {
    background: rgba(17, 22, 28, 0.48);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
  }

  .tab-btn[aria-selected="true"] {
    background: rgba(0, 230, 168, 0.16);
    border-color: var(--mint-primary);
    color: var(--mint-bright);
  }

  /* Flexible Translucent Device Frame (lets the background 3D network shine through) */
  .device-frame {
    background: rgba(10, 14, 18, 0.34);
    border: 1.5px solid rgba(56, 189, 248, 0.24);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .device-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: rgba(13, 18, 24, 0.48);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.76rem;
    color: var(--text-secondary);
  }

  .device-viewport {
    padding: clamp(0.75rem, 1.8vw, 1.15rem);
    background:
      radial-gradient(circle at 50% 20%, rgba(0, 230, 168, 0.08), transparent 65%),
      rgba(10, 13, 16, 0.28);
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .screenshot-img,
  .hero-demo-video {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 12px;
    margin-inline: auto;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    transition: transform 0.22s ease, border-color 0.22s ease;
  }

  .screenshot-img:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
  }

  .hero-demo-video[hidden] {
    display: none !important;
  }

  .showcase-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .card-visual-frame {
    margin-block: 0.9rem 0.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background:
      radial-gradient(circle at 50% 45%, rgba(0, 230, 168, 0.10), rgba(8, 12, 18, 0.88) 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    aspect-ratio: 16 / 10;
  }

  .card-visual-frame img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    border-radius: 8px;
  }

  .card-visual-frame-phone {
    aspect-ratio: auto;
    padding: 0.85rem;
  }

  .card-visual-frame-phone img {
    width: auto;
    height: auto;
    max-height: 330px;
    max-width: 100%;
    margin-inline: auto;
  }

  .phone-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
    margin-top: 1.5rem;
  }

  @media (max-width: 980px) {
    .phone-strip-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 520px) {
    .phone-strip-grid {
      grid-template-columns: 1fr;
    }
  }

  .phone-shot-card {
    background: rgba(34, 48, 63, 0.94);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

  .phone-shot-card:hover {
    transform: translateY(-3px);
    border-color: var(--mint-primary);
  }

  .phone-shot-card img {
    width: 100%;
    max-height: 390px;
    object-fit: contain;
    border-radius: 12px;
    background: #070A0E;
    border: 1px solid var(--border-subtle);
  }

  .phone-shot-caption {
    text-align: center;
  }

  .phone-shot-caption h3 {
    font-size: 0.98rem;
    margin-top: 0.35rem;
  }

  .phone-shot-caption p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
  }

  .screenshot-img[hidden] {
    display: none !important;
  }

  .live-ui-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .live-ui-preview[hidden] {
    display: none !important;
  }

  .preview-card-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  @media (max-width: 520px) {
    .preview-card-row {
      grid-template-columns: 1fr;
    }
  }

  .preview-mini-card {
    background: rgba(22, 29, 36, 0.42);
    border: 1px solid rgba(35, 48, 60, 0.72);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
  }

  .preview-mini-card p + p {
    margin-top: 0.45rem;
  }

  .preview-mini-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 600;
  }

  .preview-mini-val {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
  }

  /* Animated SVG Network Graph inside Topology Preview */
  .topology-svg-stage {
    background: rgba(8, 11, 14, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.5rem;
    overflow: hidden;
  }

  .topology-svg-stage svg {
    width: 100%;
    height: auto;
    max-height: 170px;
    display: block;
  }

  @keyframes nodePulseRing {
    0% {
      r: 7px;
      stroke-opacity: 0.85;
    }
    100% {
      r: 24px;
      stroke-opacity: 0;
    }
  }

  .svg-pulse-ring {
    animation: nodePulseRing 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  }

  .svg-pulse-ring-delay-1 {
    animation-delay: 0.8s;
  }

  .svg-pulse-ring-delay-2 {
    animation-delay: 1.6s;
  }

  .showcase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.95rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
  }

  /* =========================================================
     SECTIONS & BALANCED BENTO GRIDS
     ========================================================= */
  .section {
    padding-block: var(--space-section);
    border-top: 1px solid var(--border-subtle);
  }

  .section-alt {
    background: linear-gradient(180deg, rgba(28, 39, 51, 0.78) 0%, rgba(21, 30, 40, 0.78) 100%);
  }

  .section-header {
    max-width: 72ch;
    margin-bottom: clamp(2rem, 4vw, 2.85rem);
  }

  .section-header p {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 1.04rem;
  }

  /* 2-Column Balanced Grid (stacks cleanly at <= 900px) */
  .bento-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.2vw, 1.6rem);
  }

  @media (max-width: 900px) {
    .bento-grid-2 {
      grid-template-columns: 1fr;
    }
  }

  /* 3-Column Balanced Grid (3 cols -> 1 col stack at <= 980px so there is NEVER an orphaned 3rd card) */
  .bento-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.2vw, 1.6rem);
  }

  @media (max-width: 980px) {
    .bento-grid-3 {
      grid-template-columns: 1fr;
    }
  }

  /* 4-Column Pricing / Suite Grid (4 cols -> 2x2 tablet/small laptop -> 1 col mobile) */
  .bento-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }

  @media (max-width: 1200px) {
    .bento-grid-4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1.4rem;
    }
  }

  @media (max-width: 680px) {
    .bento-grid-4 {
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }
  }

  .bento-card {
    background: rgba(34, 48, 63, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.35rem, 2.2vw, 1.75rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, transform 0.2s ease;
    height: 100%;
  }

  /* Defensive spacing whenever multiple .bento-card blocks stack outside a grid */
  .bento-card + .bento-card {
    margin-top: 1.35rem;
  }

  :where(.bento-grid-2, .bento-grid-3, .bento-grid-4) > .bento-card + .bento-card {
    margin-top: 0;
  }

  .bento-grid-4 .bento-card > :last-child {
    margin-top: auto;
    width: 100%;
  }

  .bento-grid-4 .bento-card .btn {
    width: 100%;
  }

  .bento-card:hover {
    border-color: rgba(0, 230, 168, 0.42);
  }

  .card-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--mint-surface);
    border: 1px solid var(--border-highlight);
    display: grid;
    place-items: center;
    color: var(--mint-bright);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .bento-card p {
    color: var(--text-secondary);
    font-size: 0.94rem;
  }

  .feature-list {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin-top: 0.75rem;
  }

  .feature-list li {
    position: relative;
    padding-left: 1.45rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
  }

  .feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--mint-primary);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
    forced-color-adjust: none;
  }

  /* =========================================================
     L2 DESKTOP BRIDGE SPOTLIGHT
     ========================================================= */
  .bridge-spotlight {
    background:
      radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.12), transparent 45%),
      radial-gradient(circle at 10% 90%, rgba(0, 230, 168, 0.1), transparent 50%),
      rgba(22, 29, 36, 0.48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-xl);
    padding: clamp(1.35rem, 3.2vw, 2.75rem);
    box-shadow: var(--shadow-card);
  }

  .bridge-columns {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    align-items: start;
  }

  @media (max-width: 1024px) {
    .bridge-columns {
      grid-template-columns: 1fr;
    }
  }

  .bridge-cta-panel {
    margin-top: 1.35rem;
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(13, 19, 26, 0.56);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .bridge-cta-panel p {
    color: var(--text-secondary);
    font-size: 0.92rem;
  }

  .pairing-steps {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.1rem;
  }

  .step-card {
    background: rgba(17, 22, 28, 0.46);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.05rem 1.15rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
  }

  .step-num {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-pill);
    background: var(--mint-surface);
    border: 1px solid var(--border-highlight);
    color: var(--mint-bright);
    font-weight: 700;
    font-size: 0.82rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
  }

  .code-panel {
    background: rgba(11, 15, 20, 0.55);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 100%;
  }

  .code-panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: rgba(17, 22, 28, 0.55);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-secondary);
  }

  .code-panel pre {
    border: 0;
    border-radius: 0;
    margin: 0;
    background: transparent;
  }

  /* =========================================================
     4-TIER SIGNAL STRENGTH GRID (4 -> 2x2 -> 1, NEVER 3+1)
     ========================================================= */
  .signal-tiers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }

  @media (max-width: 1080px) {
    .signal-tiers {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 580px) {
    .signal-tiers {
      grid-template-columns: 1fr;
    }
  }

  .tier-card {
    background: rgba(17, 22, 28, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    border-left-width: 4px;
  }

  .tier-strong { border-left-color: var(--mint-bright); }
  .tier-good { border-left-color: var(--info); }
  .tier-weak { border-left-color: var(--warning); }
  .tier-dead { border-left-color: var(--danger); }

  /* =========================================================
     6-CARD SCREENSHOT GALLERY (3x2 -> 2x3 -> 1x6)
     ========================================================= */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  @media (max-width: 1080px) {
    .gallery-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 660px) {
    .gallery-grid {
      grid-template-columns: 1fr;
    }
  }

  .gallery-card {
    background: rgba(22, 29, 36, 0.44);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .gallery-slot {
    min-height: 195px;
    background:
      radial-gradient(circle at 50% 30%, rgba(0, 230, 168, 0.08), transparent 70%),
      rgba(11, 15, 20, 0.34);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem;
    text-align: center;
  }

  .gallery-meta {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    flex: 1;
  }

  .gallery-meta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.4rem;
  }

  /* =========================================================
     RESPONSIVE DATA TABLES (Desktop Table -> Mobile Cards)
     ========================================================= */
  .table-wrapper,
  .table-wrap {
    width: 100%;
    max-inline-size: 100%;
    container-type: inline-size;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(22, 29, 36, 0.46);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: var(--shadow-card);
    overflow: auto;
  }

  .price-banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-block: 0.75rem 0.6rem;
  }

  .price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-variant-numeric: tabular-nums;
  }

  .price-amount {
    font-size: clamp(1.85rem, 2.3vw, 2.35rem);
    font-weight: 800;
    color: var(--mint-bright);
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
  }

  .price-term {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.35;
  }

  .price-strike {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
  }

  .referral-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 1rem;
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-highlight);
    background: var(--mint-surface);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
  }

  .referral-banner[hidden] {
    display: none !important;
  }

  .bento-card-featured {
    border-color: var(--mint-primary);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    background:
      linear-gradient(165deg, rgba(0, 230, 168, 0.10) 0%, rgba(22, 29, 36, 0.62) 48%);
  }

  table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
  }

  caption {
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: rgba(17, 22, 28, 0.55);
    border-bottom: 1px solid var(--border-color);
  }

  thead {
    background: rgba(30, 39, 48, 0.55);
  }

  th, td {
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 1rem 1.2rem;
  }

  .comparison-table thead th .pill {
    margin-top: 0.45rem;
    white-space: nowrap;
    text-transform: none;
  }

  thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
  }

  tbody th {
    color: var(--text-primary);
    font-weight: 600;
    width: 24%;
    background: rgba(255, 255, 255, 0.015);
    border-right: 1px solid var(--border-subtle);
  }

  tbody td {
    color: var(--text-secondary);
  }

  tbody tr:last-child th,
  tbody tr:last-child td {
    border-bottom: 0;
  }

  @container (width < 600px) {
    table, thead, tbody, tr, th, td {
      display: block;
      width: 100%;
    }

    thead {
      display: none;
    }

    tbody tr {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      margin-bottom: 0.9rem;
      overflow: hidden;
    }

    tbody th {
      position: sticky;
      inset-block-start: 0;
      z-index: 2;
      width: 100%;
      background: var(--bg-elevated);
      border-right: 0;
      border-bottom: 1px solid var(--border-color);
      padding: 0.85rem 1.1rem;
      font-size: 0.98rem;
    }

    tbody td {
      padding: 0.85rem 1.1rem;
      border-bottom: 1px solid var(--border-subtle);
    }

    tbody td:last-child {
      border-bottom: 0;
    }

    tbody td::before {
      content: attr(data-label);
      display: block;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--mint-bright);
      margin-bottom: 0.3rem;
    }
  }

  @media (max-width: 780px) {
    .table-wrapper,
    .table-wrap {
      background: transparent;
      border: 0;
      box-shadow: none;
    }

    .tab-btn {
      min-height: 44px;
    }

    caption {
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      margin-bottom: 0.85rem;
    }

    table, thead, tbody, tr, th, td {
      display: block;
      width: 100%;
    }

    thead {
      display: none;
    }

    tbody tr {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      margin-bottom: 0.9rem;
      overflow: hidden;
    }

    tbody th {
      width: 100%;
      background: var(--bg-elevated);
      border-right: 0;
      border-bottom: 1px solid var(--border-color);
      padding: 0.85rem 1.1rem;
      font-size: 0.98rem;
    }

    tbody td {
      padding: 0.85rem 1.1rem;
      border-bottom: 1px solid var(--border-subtle);
    }

    tbody td:last-child {
      border-bottom: 0;
    }

    tbody td::before {
      content: attr(data-label);
      display: block;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--mint-bright);
      margin-bottom: 0.3rem;
    }
  }

  /* =========================================================
     ACCORDIONS, DIALOG & FOOTER
     ========================================================= */
  .faq-stack {
    display: grid;
    gap: 0.85rem;
  }

  details.faq-item {
    background: rgba(22, 29, 36, 0.46);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.05rem 1.25rem;
  }

  details.faq-item[open] {
    border-color: var(--border-highlight);
  }

  details.faq-item summary {
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-primary);
  }

  details.faq-item .faq-body {
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.94rem;
  }

  dialog:modal {
    overscroll-behavior: contain;
  }

  dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
  }

  dialog.modal-dialog {
    margin: auto;
    width: min(92vw, 720px);
    max-height: 88dvh;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-card);
  }

  dialog.modal-dialog::backdrop {
    background-color: rgba(6, 9, 12, 0.84);
    backdrop-filter: blur(8px);
  }

  dialog.lightbox-dialog {
    width: min(96vw, 1140px);
    max-height: 94dvh;
    background: #0B0F14;
  }

  .lightbox-stage {
    background: #06080B;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: clamp(0.5rem, 1.5vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    max-height: 72dvh;
    min-height: 260px;
  }

  .lightbox-stage img {
    display: block;
    max-width: 100%;
    max-height: 68dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    transition: max-height 0.2s ease, max-width 0.2s ease;
    cursor: zoom-in;
  }

  .lightbox-stage.is-zoomed {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .lightbox-stage.is-zoomed img {
    max-width: none;
    max-height: none;
    width: min(1080px, 185vw);
    cursor: zoom-out;
  }

  .lightbox-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .lightbox-nav-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  /* Interactive Click-to-Enlarge Screenshot Affordance */
  .screenshot-img,
  .phone-shot-card img,
  .card-visual-frame img {
    cursor: zoom-in;
  }

  .phone-shot-card {
    cursor: pointer;
    position: relative;
  }

  .zoom-hint-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--mint-bright);
    background: rgba(0, 230, 168, 0.12);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-pill);
    padding: 0.18rem 0.6rem;
    margin-top: 0.45rem;
  }

  .dialog-inner {
    padding: clamp(1.2rem, 3vw, 1.75rem);
    overflow-y: auto;
    max-height: 88dvh;
    display: grid;
    gap: 1.1rem;
  }

  .dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .site-footer {
    background: #070A0D;
    border-top: 1px solid var(--border-color);
    padding-block: 3.25rem max(2.5rem, env(safe-area-inset-bottom));
    color: var(--text-secondary);
    font-size: 0.9rem;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.25rem;
  }

  @media (max-width: 820px) {
    .footer-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
  }

  .footer-links {
    list-style: none;
    display: grid;
    gap: 0.45rem;
    margin-top: 0.7rem;
  }

  .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
  }

  /* =========================================================
     DOCUMENTATION PORTAL LAYOUT (Sidebar TOC + Main Content)
     ========================================================= */
  .docs-pillar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
  }

  @media (max-width: 900px) {
    .docs-pillar-nav {
      grid-template-columns: 1fr;
    }
  }

  .docs-pillar-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    background: rgba(22, 29, 36, 0.56);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.18s ease, background-color 0.2s ease;
    box-shadow: var(--shadow-card);
  }

  .docs-pillar-link:hover {
    border-color: var(--mint-primary);
    background: rgba(30, 39, 48, 0.68);
    transform: translateY(-2px);
    color: var(--text-primary);
  }

  .docs-pillar-link h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
  }

  .docs-pillar-link p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  .docs-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
  }

  @media (max-width: 1024px) {
    .docs-layout {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .docs-sidebar {
    position: sticky;
    top: 5.25rem;
    background: rgba(22, 29, 36, 0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    max-height: calc(100dvh - 6.5rem);
    overflow-y: auto;
  }

  @media (max-width: 1024px) {
    .docs-sidebar {
      position: static;
      max-height: none;
    }
  }

  .docs-toc-group + .docs-toc-group {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
  }

  .docs-toc-heading {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mint-bright);
    margin-bottom: 0.5rem;
    display: block;
  }

  .docs-toc-list {
    list-style: none;
    display: grid;
    gap: 0.25rem;
  }

  .docs-toc-list a {
    display: block;
    font-size: 0.84rem;
    color: var(--text-secondary);
    padding: 0.36rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .docs-toc-list a:hover {
    color: var(--text-primary);
    background: rgba(0, 230, 168, 0.1);
  }

  .docs-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    min-width: 0;
  }

  .docs-section-card {
    background: rgba(22, 29, 36, 0.48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(1.35rem, 3vw, 2.25rem);
    box-shadow: var(--shadow-card);
    min-width: 0;
    max-width: 100%;
  }

  .docs-section-card h2 {
    margin-top: 0.4rem;
    margin-bottom: 0.75rem;
  }

  .docs-section-card h3 {
    margin-top: 1.65rem;
    margin-bottom: 0.65rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border-subtle);
  }

  .docs-section-card h3:first-of-type {
    margin-top: 1.25rem;
  }

  .docs-callout {
    background: rgba(0, 230, 168, 0.07);
    border: 1px solid var(--border-highlight);
    border-left: 4px solid var(--mint-primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
  }

  .docs-callout strong {
    color: var(--text-primary);
  }

  .docs-callout-info {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.32);
    border-left-color: var(--info);
  }

  .docs-callout-warn {
    background: rgba(255, 181, 71, 0.08);
    border-color: rgba(255, 181, 71, 0.32);
    border-left-color: var(--warning);
  }
}

@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mt-sm { margin-top: 0.75rem; }
  .mt-md { margin-top: 1.25rem; }
  .mt-lg { margin-top: 2rem; }
}
