:root {
    --bg: #0b0d11;
    --bg-soft: #0f1216;
    --surface: #14171c;
    --surface-2: #1a1e25;
    --ink: #f1f2f4;
    --ink-soft: #d4d6db;
    --ink-muted: #8a8f99;
    --ink-subtle: #5b606b;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --accent: #4d8cff;
    --accent-bright: #6ba0ff;
    --accent-deep: #2563eb;
    --accent-soft: rgba(77, 140, 255, 0.10);
    --accent-line: rgba(77, 140, 255, 0.30);
    --warn: #ffb454;
    --warn-soft: rgba(255, 180, 84, 0.10);
    --warn-line: rgba(255, 180, 84, 0.28);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.10);
    --ok-line: rgba(74, 222, 128, 0.28);
    --danger: #ff5e57;
    --danger-soft: rgba(255, 94, 87, 0.10);
    --danger-line: rgba(255, 94, 87, 0.28);

    --serif: 'Spectral', 'Times New Roman', serif;
    --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 18px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }

  body {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

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

  .read-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent-bright) 100%);
    box-shadow: 0 0 10px rgba(77,140,255,0.55);
    z-index: 100;
    pointer-events: none;
    transition: width 90ms linear;
    will-change: width;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    mix-blend-mode: overlay;
  }
  main, nav.top, footer { position: relative; z-index: 2; }

  .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
  }

  /* nav (matches landing) */
  nav.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 17, 0.75);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease;
  }
  nav.top.scrolled { border-bottom-color: var(--line); }
  nav.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .logo {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .logo::before {
    content: "";
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    background: url("/landing-assets/leadhold-mark.svg") center / contain no-repeat;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(24,168,232,0.18));
  }
  .nav-links { display: none; gap: 32px; }
  @media (min-width: 768px) { .nav-links { display: flex; } }
  .nav-links a {
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 150ms ease;
  }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a.active { color: var(--ink); }
  .nav-cta {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--ink);
    padding: 9px 16px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--line);
    transition: all 200ms ease;
  }
  .nav-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  @media (min-width: 768px) { .nav-cta { display: inline-flex; } }

  .eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }
  .eyebrow::before {
    content: "";
    width: 28px; height: 1px;
    background: var(--ink-muted);
  }

  .btn-primary {
    --mx: 0px; --my: 0px; --lift: 0px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--r-md);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transform: translate(var(--mx), calc(var(--my) + var(--lift)));
    transition: background 220ms ease, box-shadow 220ms ease, transform 240ms cubic-bezier(.22,.8,.22,1);
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px -8px rgba(77, 140, 255, 0.5);
    will-change: transform;
  }
  .btn-primary:hover {
    background: var(--accent-bright);
    --lift: -1px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 12px 32px -8px rgba(77, 140, 255, 0.65);
  }

  .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--line);
    transition: all 200ms ease;
    background: transparent;
  }
  .btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--line-strong); }

  /* ============ help center ============ */

  .hc-hero {
    padding: 72px 0 48px;
    position: relative;
    overflow: hidden;
  }
  @media (min-width: 768px) {
    .hc-hero { padding: 96px 0 56px; }
  }
  .hc-hero::before {
    content: "";
    position: absolute;
    top: -120px; right: -120px;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77,140,255,0.16), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
  }
  .hc-breadcrumb {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-subtle);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .hc-breadcrumb a {
    color: var(--ink-subtle);
    text-decoration: none;
    transition: color 150ms ease;
  }
  .hc-breadcrumb a:hover { color: var(--ink-muted); }
  .hc-breadcrumb .sep { opacity: 0.5; }

  .hc-hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 18px;
    max-width: 780px;
  }
  .hc-hero h1 em { font-style: normal; font-weight: 300; color: var(--ink-soft); }
  .hc-hero p.lead {
    font-size: 18px;
    color: var(--ink-muted);
    line-height: 1.55;
    max-width: 640px;
    font-weight: 300;
    margin-bottom: 36px;
  }

  /* layout */
  .hc-layout {
    padding: 24px 0 96px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }
  @media (min-width: 900px) {
    .hc-layout {
      grid-template-columns: 240px 1fr;
      gap: 56px;
    }
  }

  /* TOC sidebar */
  .hc-toc {
    position: relative;
  }
  @media (min-width: 900px) {
    .hc-toc {
      position: sticky;
      top: 90px;
      align-self: start;
      max-height: calc(100vh - 110px);
      overflow-y: auto;
      padding-right: 8px;
    }
    .hc-toc::-webkit-scrollbar { width: 4px; }
    .hc-toc::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
  }
  .hc-toc-title {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-subtle);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .hc-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .hc-toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 14px;
    transition: background 180ms ease, color 180ms ease;
    border-left: 2px solid transparent;
    margin-left: -2px;
  }
  .hc-toc-list a:hover {
    color: var(--ink);
    background: rgba(255,255,255,0.03);
  }
  .hc-toc-list a.active {
    color: var(--ink);
    border-left-color: var(--accent);
    background: rgba(77,140,255,0.06);
  }
  .hc-toc-list .num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-subtle);
    min-width: 18px;
  }
  .hc-toc-list a.active .num { color: var(--accent-bright); }

  /* main content */
  .hc-main { min-width: 0; }

  .hc-cat {
    padding: 16px 0 56px;
    scroll-margin-top: 90px;
  }
  .hc-cat:not(:first-child) {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 56px;
  }
  .hc-cat-head {
    margin-bottom: 32px;
  }
  .hc-cat-head .eyebrow { margin-bottom: 16px; }
  .hc-cat-head h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 12px;
  }
  .hc-cat-head h2 em { font-style: normal; font-weight: 300; color: var(--ink-soft); }
  .hc-cat-head p {
    font-size: 15.5px;
    color: var(--ink-muted);
    line-height: 1.6;
    font-weight: 300;
    max-width: 640px;
  }

  /* article */
  details.article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 220ms ease, background 220ms ease;
  }
  details.article:hover {
    border-color: var(--line-strong);
  }
  details.article[open] {
    border-color: var(--accent-line);
    background: var(--surface-2);
  }
  details.article summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.005em;
    transition: color 200ms ease;
  }
  details.article summary::-webkit-details-marker { display: none; }
  details.article summary:hover { color: var(--accent-bright); }
  details.article summary > span:first-child { flex: 1; min-width: 0; }

  details.article .article-body {
    padding: 0 22px 22px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 300;
  }
  @keyframes articleEnter {
    from { opacity: 0; transform: translateY(-4px); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }
  details.article[open] .article-body {
    animation: articleEnter 380ms cubic-bezier(.2,.8,.2,1) 100ms backwards;
  }
  .article-body > * + * { margin-top: 14px; }
  .article-body p { color: var(--ink-soft); }
  .article-body strong { color: var(--ink); font-weight: 500; }
  .article-body em {
    font-style: normal;
    background: rgba(77,140,255,0.10);
    color: var(--accent-bright);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
  }
  .article-body h4 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 17px;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-top: 22px !important;
    margin-bottom: 8px !important;
  }
  .article-body ul, .article-body ol {
    padding-left: 22px;
    color: var(--ink-soft);
  }
  .article-body li {
    margin: 8px 0;
    line-height: 1.65;
  }
  .article-body li::marker { color: var(--ink-subtle); }
  .article-body a {
    color: var(--accent-bright);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-line);
    transition: border-color 180ms ease;
  }
  .article-body a:hover { border-bottom-color: var(--accent-bright); }
  .article-body code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--ink);
  }

  /* callouts */
  .callout {
    padding: 14px 16px;
    border-radius: var(--r-sm);
    font-size: 14.5px;
    line-height: 1.6;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid;
  }
  .callout > svg {
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin-top: 2px;
  }
  .callout.warn {
    background: var(--warn-soft);
    border-color: var(--warn-line);
    color: var(--ink-soft);
  }
  .callout.warn > svg { color: var(--warn); }
  .callout.tip {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--ink-soft);
  }
  .callout.tip > svg { color: var(--accent-bright); }
  .callout.danger {
    background: var(--danger-soft);
    border-color: var(--danger-line);
    color: var(--ink-soft);
  }
  .callout.danger > svg { color: var(--danger); }
  .callout.ok {
    background: var(--ok-soft);
    border-color: var(--ok-line);
    color: var(--ink-soft);
  }
  .callout.ok > svg { color: var(--ok); }
  .callout strong { color: var(--ink); }

  /* support footer block */
  .hc-support {
    margin-top: 56px;
    padding: 40px 32px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
  }
  @media (min-width: 700px) {
    .hc-support {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      padding: 36px 40px;
    }
  }
  .hc-support::before {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }
  .hc-support h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 22px;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .hc-support p {
    font-size: 14.5px;
    color: var(--ink-muted);
    line-height: 1.6;
    font-weight: 300;
    max-width: 480px;
  }
  .hc-support-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
  }

  /* footer (matches landing) */
  footer {
    border-top: 1px solid var(--line);
    padding: 48px 0 36px;
    background: var(--bg-soft);
  }
  .foot-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  @media (min-width: 768px) {
    .foot-grid { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 56px; }
  }
  .foot-brand { max-width: 320px; }
  .foot-brand .logo { margin-bottom: 14px; }
  .foot-brand p {
    font-size: 13.5px;
    color: var(--ink-muted);
    line-height: 1.55;
    font-weight: 300;
  }
  .foot-links { display: flex; gap: 56px; flex-wrap: wrap; }
  .foot-col h5 {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-subtle);
    margin-bottom: 14px;
    font-weight: 500;
  }
  .foot-col a {
    display: block;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    transition: color 150ms ease;
  }
  .foot-col a:hover { color: var(--ink); }
  .foot-bottom {
    border-top: 1px solid var(--line);
    margin-top: 40px;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--ink-subtle);
  }
  .foot-bottom .foot-version {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    opacity: 0.7;
  }

  /* focus states */
  a:focus-visible,
  button:focus-visible,
  summary:focus-visible,
  input:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* highlight from URL hash */
  details.article:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(77,140,255,0.12);
  }

  /* reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* highlighted search match */
  .search-highlight {
    margin: 0;
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(70,217,255,0.18);
    color: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    animation: search-highlight-reveal 1.8s cubic-bezier(.2,.8,.2,1) both;
  }

  @keyframes search-highlight-reveal {
    0% {
      background: rgba(70,217,255,0);
      box-shadow: 0 0 0 0 rgba(70,217,255,0);
    }
    38% {
      background: rgba(70,217,255,0.34);
      box-shadow: 0 0 0 4px rgba(70,217,255,0.11), 0 0 22px rgba(70,217,255,0.16);
    }
    100% {
      background: rgba(70,217,255,0.18);
      box-shadow: 0 0 0 1px rgba(70,217,255,0.08);
    }
  }

  /* burger menu — mobile only */
  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    gap: 4px;
    transition: background 150ms ease, border-color 150ms ease;
  }
  .nav-burger:hover { background: rgba(255,255,255,0.08); border-color: var(--accent-line); }
  .nav-burger span {
    display: block;
    width: 16px;
    height: 1.6px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 200ms ease, opacity 150ms ease;
  }
  .nav-burger.open span:nth-child(1) { transform: translateY(2.8px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-2.8px) rotate(-45deg); }
  @media (min-width: 768px) { .nav-burger { display: none; } }

  .nav-mobile-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 32px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease;
  }
  .nav-mobile-overlay.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-mobile-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
    pointer-events: none;
  }
  .nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
  }
  .nav-mobile-links a {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color 150ms ease;
  }
  .nav-mobile-links a:hover, .nav-mobile-links a.active { color: var(--accent-bright); }
  .nav-mobile-links a::after {
    content: "→";
    font-family: var(--mono);
    font-size: 18px;
    color: var(--ink-subtle);
    transition: transform 200ms ease, color 200ms ease;
  }
  .nav-mobile-links a:hover::after { color: var(--accent-bright); transform: translateX(3px); }
  .nav-mobile-cta {
    margin-top: 32px;
    padding: 16px 24px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 15.5px;
    border-radius: var(--r-md);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  body.nav-open { overflow: hidden; }
