/* blackvoice.rudralabs.dev. Loaded after styles.css (the Rudra Labs design system) and uses its tokens
   and layers. Black Voice's own identity is monochrome: black, white and the waveform. */

@layer components {

  /* Navigation ------------------------------------------------------------ */
  .gnav__mark { width: 22px; height: 23px; }
  .gnav__links a[aria-current="page"] { color: var(--white); }

  .footer__mark { width: 24px; height: 25px; }
  .footer__maker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 500;
  }
  .footer__maker:hover { text-decoration: none; color: var(--white); }
  .footer__maker-mark { width: 16px; height: 16px; }

  /* Shared pieces ---------------------------------------------------------- */
  .bv-narrow { width: min(100% - 2 * var(--gutter), 46rem); }
  .bv-page-head { padding-top: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
  .bv-h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
  }
  .bv-h2--spaced { margin-top: clamp(3.5rem, 2.5rem + 3vw, 5rem); }
  .bv-p { margin-top: 1rem; line-height: 1.6; }
  .bv-p:first-child { margin-top: 0; }
  .bv-more {
    margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
    text-align: center;
    color: var(--text-2);
  }
  .bv-updated { margin-top: 2.5rem; font-size: var(--step-small); color: var(--text-2); }
  .bv-size { margin-left: 0.5rem; opacity: 0.75; font-weight: 400; }

  :where(.bv-p, .bv-reqs, .bv-ledger, .bv-more) code {
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: 0.875em;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  .section--alt :where(.bv-p, .bv-reqs) code { background: var(--bg); }

  /* Hero --------------------------------------------------------------------- */
  .bv-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 36rem;
    min-height: min(calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px)), 52rem);
    padding: clamp(4rem, 3rem + 5vw, 7rem) var(--gutter) clamp(4.5rem, 3.5rem + 5vw, 7rem);
    background: var(--black);
    text-align: center;
  }
  .bv-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 34%;
    width: min(90vw, 40rem);
    aspect-ratio: 1;
    translate: -50% -50%;
    background: radial-gradient(closest-side, rgb(255 255 255 / 0.1), transparent);
  }
  .bv-hero__wave {
    width: clamp(8.5rem, 6.5rem + 9vw, 14rem);
    height: auto;
    margin-bottom: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
    color: var(--white);
    overflow: visible;
  }
  .bv-hero__wave rect { transform-box: fill-box; transform-origin: center; }
  .bv-hero__title {
    padding-bottom: 0.04em;
    font-size: var(--step-hero);
    line-height: 0.95;
    letter-spacing: -0.045em;
    color: var(--white);
  }
  .bv-hero__tagline {
    margin-top: 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #f5f5f7;
  }
  .bv-hero__sub {
    max-width: 32rem;
    margin-top: 1rem;
    font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
    line-height: 1.4;
    color: var(--text-2);
  }
  .bv-hero__meta { margin-top: 1.75rem; font-size: var(--step-small); color: var(--text-2); }

  /* Conversation ----------------------------------------------------------- */
  .bv-talk { padding-top: 0; }
  .bv-chat {
    display: grid;
    gap: 0.625rem;
    max-width: 38rem;
    margin-inline: auto;
    padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #161617;
    font-family: var(--font-mono);
    font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.0625rem);
    line-height: 1.5;
    letter-spacing: 0;
  }
  .bv-chat__line { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; color: var(--text-2); }
  .bv-chat__line--reply { color: var(--white); }
  .bv-chat__line--reply + .bv-chat__line { margin-top: 0.875rem; }

  /* Features ------------------------------------------------------------------ */
  .bv-features { display: grid; grid-template-columns: 1fr; gap: 2.25rem 3rem; }
  @media (min-width: 735px) { .bv-features { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1069px) { .bv-features { grid-template-columns: repeat(3, 1fr); } }
  .bv-feature { padding-top: 1.5rem; border-top: 1px solid var(--line); }
  .bv-feature__title { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.02em; }
  .bv-feature__text { margin-top: 0.5rem; color: var(--text-2); }

  .bv-works { max-width: 44rem; margin: clamp(4rem, 3rem + 4vw, 6rem) auto 0; text-align: center; }
  .bv-works__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -0.025em; }
  .bv-works__text { margin-top: 0.75rem; color: var(--text-2); }
  .bv-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
  .bv-chip { padding: 0.375rem 0.875rem; border-radius: 980px; background: var(--bg-alt); font-size: var(--step-small); }

  /* Things to try: what you say, grouped by what it does --------------------- */
  .bv-try { max-width: 46rem; margin-inline: auto; }
  .bv-try__row {
    display: grid;
    gap: 0.25rem 2rem;
    padding-block: 1.125rem;
    border-top: 1px solid var(--line);
  }
  .bv-try__row:last-child { border-bottom: 1px solid var(--line); }
  @media (min-width: 735px) { .bv-try__row { grid-template-columns: 7rem 1fr; align-items: baseline; } }
  .bv-try dt { font-size: var(--step-small); font-weight: 600; color: var(--text-2); }
  .bv-try dd { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
  .bv-try q {
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  /* Privacy ladder: the order speech recognition is tried in ----------------- */
  .bv-ladder { max-width: 44rem; margin-inline: auto; counter-reset: tier; }
  .bv-tier {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    column-gap: 1.25rem;
    padding-block: 1.5rem;
    border-top: 1px solid var(--line);
  }
  .bv-tier::before {
    content: counter(tier);
    counter-increment: tier;
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: var(--step-small);
    font-weight: 600;
  }
  .bv-tier--local::before { border-color: var(--white); background: var(--white); color: var(--black); }
  .bv-tier--cloud::before { border-style: dashed; color: var(--text-2); }
  .bv-tier__title { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.02em; }
  .bv-tier__text { margin-top: 0.25rem; color: var(--text-2); }

  .bv-config { max-width: 44rem; margin: 2.5rem auto 0; }
  .bv-code {
    overflow-x: auto;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #161617;
    color: #f5f5f7;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  .bv-code__caption { margin-top: 1rem; text-align: center; font-size: var(--step-small); color: var(--text-2); }

  /* Safety tiers ------------------------------------------------------------- */
  .bv-guard { display: grid; grid-template-columns: 1fr; gap: 12px; }
  @media (min-width: 735px) { .bv-guard { grid-template-columns: repeat(3, 1fr); } }
  .bv-guard__tier { padding: 2rem 1.75rem; border-radius: 18px; background: var(--bg); }
  .bv-guard__tier--refused { --dot: #ff453a; }
  .bv-guard__tier--asks { --dot: #ff9f0a; }
  .bv-guard__tier--runs { --dot: #30d158; }
  .bv-guard__label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: var(--step-4);
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .bv-guard__label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
  .bv-guard__text { margin-top: 0.625rem; color: var(--text-2); }
  .bv-guard__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 1.25rem;
    font-size: var(--step-small);
    color: var(--text-2);
  }
  .bv-guard__examples li { padding: 0.25rem 0.625rem; border-radius: 8px; background: var(--bg-alt); }
  .bv-guard__examples code { font-family: var(--font-mono); color: var(--text); }
  .bv-guard__note { max-width: 40rem; margin: 2.5rem auto 0; text-align: center; color: var(--text-2); }

  /* Get it (home) -------------------------------------------------------------- */
  .bv-get { display: grid; gap: 12px; }
  @media (min-width: 735px) { .bv-get { grid-template-columns: repeat(3, 1fr); } }
  .bv-get__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 18px;
    background: var(--bg-alt);
  }
  .bv-get__title { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.02em; }
  .bv-get__distros { margin: 0.25rem 0 1.5rem; font-size: var(--step-small); color: var(--text-2); }
  .bv-get__item .btn { margin-top: auto; }

  /* Download page ---------------------------------------------------------- */
  .bv-install { display: grid; gap: 12px; max-width: 60rem; margin-inline: auto; }
  .bv-pkg {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 18px;
    background: var(--bg-alt);
  }
  .bv-pkg__head { display: flex; flex-direction: column; align-items: flex-start; }
  .bv-pkg__title { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.02em; }
  .bv-pkg__distros { margin-top: 0.25rem; font-size: var(--step-small); color: var(--text-2); }
  .bv-pkg__download { margin-top: 1.25rem; }
  .bv-pkg__body { display: grid; gap: 0.875rem; min-width: 0; }
  @media (min-width: 735px) {
    .bv-pkg {
      grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
      column-gap: clamp(1.5rem, 1rem + 2vw, 3rem);
      align-items: start;
      padding: 2rem;
    }
  }

  .bv-cmd {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.875rem 1rem;
    border-radius: 12px;
    background: var(--black);
    color: #f5f5f7;
  }
  .bv-cmd code {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    letter-spacing: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .bv-copy {
    flex-shrink: 0;
    min-height: 28px;
    padding: 0.125rem 0.625rem;
    border: 1px solid rgb(255 255 255 / 0.24);
    border-radius: 8px;
    background: transparent;
    color: #f5f5f7;
    font-size: var(--step-fine);
    transition: background-color 0.15s ease;
  }
  .bv-copy:hover { background: rgb(255 255 255 / 0.1); }
  .bv-sha { font-size: var(--step-fine); color: var(--text-2); }
  .bv-sha code { display: block; margin-top: 0.25rem; font-family: var(--font-mono); letter-spacing: 0; overflow-wrap: anywhere; }
  #verify .bv-cmd { margin-block: 1.25rem; }

  .bv-steps { counter-reset: step; }
  .bv-step {
    position: relative;
    padding: 1.5rem 0 1.5rem 3.25rem;
    border-top: 1px solid var(--line);
  }
  .bv-step::before {
    content: counter(step);
    counter-increment: step;
    position: absolute;
    left: 0;
    top: 1.375rem;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    font-size: var(--step-small);
    font-weight: 600;
  }
  .bv-step__title { margin-bottom: 0.75rem; font-size: var(--step-4); font-weight: 600; letter-spacing: -0.02em; }
  .bv-step__text { margin-top: 0.625rem; color: var(--text-2); }

  .bv-reqs__row {
    display: grid;
    gap: 0.25rem 1.5rem;
    padding-block: 0.875rem;
    border-top: 1px solid var(--line);
  }
  @media (min-width: 735px) { .bv-reqs__row { grid-template-columns: 7rem 1fr; } }
  .bv-reqs dt { font-weight: 600; }
  .bv-reqs dd { color: var(--text-2); line-height: 1.55; }

  .bv-history { margin-bottom: 1.5rem; }
  .bv-history__item {
    display: grid;
    gap: 0.25rem 1.5rem;
    padding-block: 1rem;
    border-top: 1px solid var(--line);
  }
  @media (min-width: 735px) {
    .bv-history__item { grid-template-columns: 11rem 11rem 1fr; align-items: baseline; }
  }
  .bv-history__version { font-weight: 600; }
  .bv-history__tag {
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 980px;
    background: var(--text);
    color: var(--bg);
    font-size: var(--step-fine);
    font-weight: 600;
    vertical-align: 0.1em;
  }
  .bv-history__date { color: var(--text-2); }
  .bv-history__files { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

  /* Privacy ledger ---------------------------------------------------------- */
  .bv-ledger { max-width: 60rem; margin-inline: auto; }
  .bv-ledger table { width: 100%; border-collapse: collapse; text-align: left; }
  .bv-ledger__caption {
    margin-bottom: 1rem;
    text-align: left;
    font-size: var(--step-4);
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .bv-ledger :is(th, td) { padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
  .bv-ledger thead th { padding-block: 0.625rem; border-top: 0; font-size: var(--step-small); font-weight: 600; color: var(--text-2); }
  .bv-ledger tbody th { font-weight: 600; white-space: nowrap; }
  .bv-ledger td { color: var(--text-2); }
  .bv-ledger tbody th::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.625rem;
    border-radius: 50%;
    background: var(--line-strong);
    vertical-align: 0.15em;
  }
  .bv-ledger__row--never th::before { background: #30d158; }
  @media (max-width: 734px) {
    .bv-ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .bv-ledger :is(table, caption, tbody, tr, th, td) { display: block; }
    .bv-ledger tr { padding-block: 1.25rem; border-top: 1px solid var(--line); }
    .bv-ledger :is(th, td) { padding: 0; border: 0; }
    .bv-ledger tbody th { margin-bottom: 0.625rem; white-space: normal; font-size: var(--step-4); }
    .bv-ledger td { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: 0.375rem; }
    .bv-ledger td::before { content: attr(data-label); font-size: var(--step-small); font-weight: 600; color: var(--text); }
  }

  /* 404 -------------------------------------------------------------------- */
  .bv-notfound {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: min(calc(100svh - var(--nav-h)), 44rem);
    padding: 5rem var(--gutter);
    background: var(--black);
    text-align: center;
  }
  .bv-notfound__wave { width: 9rem; height: auto; margin-bottom: 2.5rem; color: rgb(255 255 255 / 0.45); }
  .bv-notfound__title { font-size: var(--step-2); letter-spacing: -0.035em; color: var(--white); }
  .bv-notfound__text { margin-top: 1rem; font-size: var(--step-4); color: var(--text-2); }

  /* Documentation layout ---------------------------------------------------- */
  .docs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: clamp(2rem, 1rem + 3vw, 4rem);
    width: min(100% - 2 * var(--gutter), 1200px);
    margin-inline: auto;
    padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(4rem, 3rem + 4vw, 6rem);
  }
  @media (min-width: 900px) { .docs { grid-template-columns: 14rem minmax(0, 1fr); } }
  @media (min-width: 1240px) { .docs { grid-template-columns: 14rem minmax(0, 1fr) 12rem; } }

  .docs-nav { font-size: var(--step-small); }
  @media (min-width: 900px) {
    .docs-nav {
      position: sticky;
      top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 2rem);
      align-self: start;
      max-height: calc(100vh - var(--nav-h) - 3rem);
      overflow-y: auto;
      overscroll-behavior: contain;
    }
  }
  .docs-jump { display: inline-block; margin-bottom: 1.25rem; font-size: var(--step-small); font-weight: 500; }
  @media (min-width: 900px) { .docs-jump { display: none; } }
  @media (max-width: 899px) {
    .docs-main { order: -1; }
    .docs-nav { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 1rem); }
  }
  .docs-nav__heading {
    margin: 1.5rem 0 0.375rem;
    padding-inline: 0.75rem;
    font-size: var(--step-fine);
    font-weight: 600;
    color: var(--text-2);
  }
  .docs-nav__link {
    display: block;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    color: var(--text-2);
    line-height: 1.35;
  }
  .docs-nav__link:hover { color: var(--text); text-decoration: none; background: var(--bg-alt); }
  .docs-nav__link[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--bg-alt); }
  .docs-nav__version {
    margin-top: 1.5rem;
    padding: 1rem 0.75rem 0;
    border-top: 1px solid var(--line);
    font-size: var(--step-fine);
    line-height: 1.5;
    color: var(--text-2);
  }

  .docs-toc { display: none; font-size: var(--step-fine); }
  @media (min-width: 1240px) {
    .docs-toc {
      display: block;
      position: sticky;
      top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 2rem);
      align-self: start;
      max-height: calc(100vh - var(--nav-h) - 3rem);
      overflow-y: auto;
    }
  }
  .docs-toc__title { margin-bottom: 0.625rem; font-size: var(--step-fine); font-weight: 600; }
  .docs-toc a { display: block; padding-block: 0.3125rem; color: var(--text-2); line-height: 1.35; }
  .docs-toc a:hover { color: var(--text); text-decoration: none; }

  /* Documentation content -------------------------------------------------- */
  .doc { max-width: 46rem; line-height: 1.6; }
  .doc :where(h1, h2, h3, h4) { scroll-margin-top: calc(var(--nav-h) + 1.5rem); letter-spacing: -0.02em; }
  .doc h1 { margin-bottom: 1.5rem; font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; }
  .doc h2 {
    margin-top: 3.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
    line-height: 1.2;
  }
  .doc h3 { margin-top: 2.25rem; font-size: 1.25rem; line-height: 1.3; }
  .doc h4 { margin-top: 1.75rem; font-size: 1.0625rem; }
  .doc :where(p, ul, ol, .doc-table, .doc-code, blockquote, .doc-diagram) { margin-top: 1rem; }
  .doc :where(h2, h3, h4) + :where(p, ul, ol, .doc-table, .doc-code, blockquote) { margin-top: 0.75rem; }
  .doc :where(ul, ol) { padding-left: 1.375rem; }
  .doc ul { list-style: disc; }
  .doc ol { list-style: decimal; }
  .doc li + li, .doc li > :where(ul, ol) { margin-top: 0.375rem; }
  .doc li::marker { color: var(--text-2); }
  .doc strong { font-weight: 600; }
  .doc sub { vertical-align: baseline; font-size: var(--step-small); color: var(--text-2); }
  .doc a { color: var(--link); }
  .doc hr { margin-block: 2.5rem; border: 0; border-top: 1px solid var(--line); }
  .doc :not(pre) > code {
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: 0.875em;
    letter-spacing: 0;
  }
  .doc blockquote {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: var(--bg-alt);
  }
  .doc blockquote > :first-child { margin-top: 0; }

  .doc-code { position: relative; }
  .doc pre {
    overflow-x: auto;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-alt);
    font-family: var(--font-mono);
    font-size: 0.84375rem;
    line-height: 1.6;
    letter-spacing: 0;
    tab-size: 4;
  }
  .doc-code .doc-copy {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    min-height: 28px;
    padding: 0.125rem 0.625rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: var(--step-fine);
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  .doc-code:hover .doc-copy, .doc-code .doc-copy:focus-visible { opacity: 1; }
  @media (hover: none) { .doc-code .doc-copy { opacity: 1; } }

  .doc-table { overflow-x: auto; }
  .doc table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
  .doc :is(th, td) { padding: 0.625rem 1rem 0.625rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  .doc th { font-weight: 600; }
  .doc tbody tr:first-child :is(th, td) { border-top: 1px solid var(--line); }

  .doc-diagram { margin-block: 1.75rem; }
  .doc-diagram__zoom { display: block; cursor: zoom-in; }
  .doc-diagram img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
  .doc-diagram__open { margin-top: 0.75rem; font-size: var(--step-small); }
  .doc-diagram details { margin-top: 0.25rem; font-size: var(--step-small); color: var(--text-2); }
  .doc-diagram summary { cursor: pointer; }
  .doc-diagram details pre { margin-top: 0.75rem; }

  .doc-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4rem;
  }
  .doc-pager a {
    display: grid;
    gap: 0.125rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
  }
  .doc-pager a:hover { border-color: var(--link); text-decoration: none; }
  .doc-pager__next { grid-column: 2; text-align: right; }
  .doc-pager__label { font-size: var(--step-fine); color: var(--text-2); }
  .doc-pager__title { font-weight: 600; }
  .doc__edit { margin-top: 2rem; font-size: var(--step-small); }
}

/* One orchestrated moment: the waveform speaks once, then the name settles in. */
@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .bv-hero__wave rect { animation: bv-speak 1.5s var(--ease-out) both; }
    .bv-hero__wave rect:nth-child(1) { animation-delay: 0.05s; }
    .bv-hero__wave rect:nth-child(2) { animation-delay: 0.12s; }
    .bv-hero__wave rect:nth-child(3) { animation-delay: 0.19s; }
    .bv-hero__wave rect:nth-child(4) { animation-delay: 0.26s; }
    .bv-hero__wave rect:nth-child(5) { animation-delay: 0.33s; }
    .bv-hero__wave rect:nth-child(6) { animation-delay: 0.4s; }
    .bv-hero__wave rect:nth-child(7) { animation-delay: 0.47s; }
    .bv-hero__wave rect:nth-child(8) { animation-delay: 0.54s; }
    .bv-hero__title { animation: rise-in 0.9s var(--ease-out) 0.55s both; }
    .bv-hero__tagline { animation: rise-in 0.9s var(--ease-out) 0.7s both; }
    .bv-hero__sub,
    .bv-hero .hero__actions,
    .bv-hero__meta { animation: rise-in 0.9s var(--ease-out) 0.85s both; }
  }

  @keyframes bv-speak {
    0% { scale: 1 0.1; opacity: 0; }
    20% { opacity: 1; }
    42% { scale: 1 1.35; }
    62% { scale: 1 0.6; }
    80% { scale: 1 1.08; }
    100% { scale: 1 1; }
  }
}
