/* DiffusionBear — Ink layered design system, chrome, dialogs, accordions, responsive tables & copy controls */
@layer reset, tokens, base, layout, components, utilities;

@layer tokens {
  :root {
    /* Matte-dark editorial neutral ramp + single cool accent */
    --db-bg-0: #0a0b0d;
    --db-bg: #0a0b0d;
    --db-bg-2: #0a0b0d;
    --db-panel: #111316;
    --db-panel-2: #16191d;
    --db-panel-3: #111316;
    --db-border: rgba(255, 255, 255, .07);
    --db-border-2: rgba(255, 255, 255, .12);
    --db-border-3: rgba(255, 255, 255, .18);
    --db-text: #ececee;
    --db-text-2: #a1a4ab;
    --db-bright: #ffffff;
    --db-muted: #a1a4ab;
    --db-muted-2: #6b6f78;

    /* Single restrained accent + high-contrast off-white primary CTA */
    --db-accent: #8ab4ff;
    --db-accent-text: #8ab4ff;
    --db-accent-ink: #8ab4ff;
    --db-accent-ink-hover: #a8c7ff;
    --db-cta-bg: #ececee;
    --db-cta-bg-hover: #ffffff;
    --db-cta-fg: #0a0b0d;
    --db-cta-border: rgba(255, 255, 255, .24);
    --db-cyan: #8ab4ff;

    /* Semantic signals (used strictly for deltas, status & licence tags) */
    --db-emerald: #5fb98a;
    --db-amber: #d4a24c;
    --db-orange: #d4a24c;
    --db-pink: #a1a4ab;
    --db-red: #e5484d;
    --db-focus: #8ab4ff;

    /* Nested radii & hairline elevation */
    --db-radius-xs: 4px;
    --db-radius-sm: 6px;
    --db-radius: 10px;
    --db-radius-lg: 14px;
    --db-radius-pill: 999px;
    --db-shadow-1: none;
    --db-shadow-2: none;

    /* Layout & 4px spacing base */
    --db-wrap: 1120px;
    --db-gutter: clamp(1rem, 4vw, 2rem);
    --db-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    --db-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Editorial Design System tokens */
    --surface-1: #111316;
    --surface-2: #16191d;
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --fg: #ececee;
    --fg-2: #a1a4ab;
    --fg-3: #6b6f78;
    --ok: #5fb98a;
    --fs-xs: .75rem;
    --fs-sm: .875rem;
    --fs-md: 1rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.75rem;
    --fs-2xl: clamp(2rem, 4vw, 2.75rem);
    --lh-tight: 1.15;
    --lh-body: 1.6;
    --tracking-tight: -.02em;
    --wrap-text: 680px;
    --gutter: var(--db-gutter);
    --sp-1: .25rem;
    --sp-2: .5rem;
    --sp-3: .75rem;
    --sp-4: 1rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-24: 6rem;
    --section-y: clamp(3.5rem, 8vw, 6rem);
    --nav-h: 56px;

    /* Motion */
    --db-dur: 150ms;
    --db-dur-enter: 280ms;
    --db-ease: cubic-bezier(.2, .8, .2, 1);

    /* Token aliases shared across landing/guide/lab stylesheets */
    --bg: var(--db-bg);
    --bg-2: var(--db-bg-2);
    --panel: var(--db-panel);
    --panel-2: var(--db-panel-2);
    --panel-3: var(--db-panel-3);
    --card-bg: var(--db-panel);
    --card-alt: var(--db-panel-2);
    --border: var(--db-border);
    --border-2: var(--db-border-2);
    --text: var(--db-text);
    --text-2: var(--db-text-2);
    --bright: var(--db-bright);
    --muted: var(--db-muted);
    --muted-2: var(--db-muted-2);
    --text-muted: var(--db-muted);
    --accent: var(--db-accent-text);
    --accent-2: var(--db-accent);
    --accent-text: var(--db-accent-text);
    --accent-ink: var(--db-accent-ink);
    --accent-ink-hover: var(--db-accent-ink-hover);
    --neon-cyan: var(--db-accent);
    --cyan: var(--db-accent);
    --neon-emerald: var(--db-emerald);
    --emerald: var(--db-emerald);
    --green: var(--db-emerald);
    --warn: var(--db-amber);
    --amber: var(--db-amber);
    --orange: var(--db-orange);
    --pink: var(--db-muted);
    --red: var(--db-red);
    --purple: var(--db-accent-text);
    --focus: var(--db-focus);
    --radius: var(--db-radius);
    --radius-sm: var(--db-radius-sm);
    --radius-lg: var(--db-radius-lg);
    --radius-pill: var(--db-radius-pill);
    --shadow: var(--db-shadow-1);
    --shadow-1: var(--db-shadow-1);
    --shadow-2: var(--db-shadow-2);
    --wrap: var(--db-wrap);
    --font: var(--db-font);
    --mono: var(--db-mono);
    --dur: var(--db-dur);
    --ease: var(--db-ease);
  }
}

@layer reset {
  :where(*, *::before, *::after) {
    box-sizing: border-box;
  }

  html {
    font-size: 16px;
    color-scheme: dark;
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  @media (min-width: 900px) {
    html {
      font-size: 16px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
  }
}

@layer base {
  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--db-bg);
    color: var(--db-text);
    font-family: var(--db-font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }

  main {
    flex: 1;
  }

  :where(h1, h2, h3, h4, h5, h6, th) {
    text-wrap: balance;
  }

  :where(main p, main li, .faq__a) {
    text-wrap: pretty;
  }

  :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--db-focus);
    outline-offset: 2px;
    border-radius: 4px;
  }

  ::selection {
    background: rgba(56, 189, 248, .28);
    color: var(--db-text);
  }

  :where(img, svg, video) {
    max-width: 100%;
    height: auto;
  }

  :where(code, kbd, pre, td.num, th.num) {
    font-variant-numeric: tabular-nums;
  }

  /* Smooth native <details> disclosure when supported and user allows motion */
  @media (prefers-reduced-motion: no-preference) {
    @supports (interpolate-size: allow-keywords) {
      :root {
        interpolate-size: allow-keywords;
      }
      details::details-content {
        block-size: 0;
        overflow: clip;
        opacity: 0;
        transition: block-size .22s var(--db-ease), opacity var(--db-dur) var(--db-ease), content-visibility .22s allow-discrete;
      }
      details[open]::details-content {
        block-size: auto;
        opacity: 1;
      }
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    .db-nav,
    .db-drop__inner,
    .db-drawer,
    .shot__zoom-hint,
    .shot__theme-toggle,
    .nav {
      background: var(--db-bg-2) !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }
  }

  @media (forced-colors: active) {
    :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
      outline: 2px solid Highlight;
    }
    .db-nav__cta,
    .db-drawer__link,
    .db-drop__tag,
    .shot__theme-btn.is-active {
      border: 1px solid ButtonText;
    }
  }
}

@layer components {
  .skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--db-cta-bg);
    color: var(--db-cta-fg);
    padding: 8px 16px;
    border-radius: 0 0 var(--db-radius-sm) 0;
    font-weight: 600;
    text-decoration: none;
  }
  .skip:focus {
    left: 0;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* ==========================================================================
     TOP NAVIGATION BAR (.db-nav)
     ========================================================================== */
  .db-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    width: 100%;
    background: color-mix(in srgb, var(--db-bg) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--db-border);
    font-family: var(--db-font);
    letter-spacing: 0;
    word-spacing: normal;
  }
  .db-nav__inner {
    height: 100%;
    max-width: var(--db-wrap);
    margin-inline: auto;
    padding-inline: var(--db-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .db-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--db-text);
    flex: 0 0 auto;
  }
  .db-brand:hover {
    color: var(--db-text);
  }
  .db-brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: block;
    border: 1px solid var(--db-border);
  }
  .db-brand__word {
    font-weight: 600;
    letter-spacing: -.02em;
    font-size: 1rem;
    white-space: nowrap;
    color: var(--db-text);
  }
  .db-brand__word em {
    font-style: normal;
    color: var(--db-muted);
    font-weight: 500;
  }
  .db-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .db-nav__link {
    color: var(--db-muted);
    text-decoration: none;
    font-family: var(--db-font);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 6px 10px;
    border-radius: var(--db-radius-sm);
    transition: color var(--db-dur) var(--db-ease), background-color var(--db-dur) var(--db-ease);
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .db-nav__link:hover {
    color: var(--db-text);
    background: var(--db-panel);
  }
  .db-nav__link[aria-current="page"] {
    color: var(--db-text);
    background: transparent;
    border-radius: 0;
    box-shadow: inset 0 -1px 0 var(--db-accent);
  }
  .db-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--db-radius-sm);
    color: var(--db-muted);
    text-decoration: none;
    transition: color var(--db-dur) var(--db-ease), background-color var(--db-dur) var(--db-ease);
    flex: 0 0 auto;
  }
  .db-nav__icon:hover {
    color: var(--db-text);
    background: var(--db-panel);
  }
  .db-nav__sep {
    width: 1px;
    height: 16px;
    background: var(--db-border);
    margin-inline: 4px;
    flex: 0 0 auto;
  }

  .db-drop {
    position: relative;
  }
  .db-drop__trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
  }
  .db-drop__trigger::after {
    content: "▾";
    font-size: .75rem;
    color: var(--db-muted-2);
  }
  @media (prefers-reduced-motion: no-preference) {
    .db-drop__trigger::after {
      transition: transform var(--db-dur) var(--db-ease);
    }
  }
  .db-drop.is-open .db-drop__trigger,
  html:not(.db-js) .db-drop:hover .db-drop__trigger,
  html:not(.db-js) .db-drop:focus-within .db-drop__trigger {
    color: var(--db-text);
    background: var(--db-panel);
  }
  .db-drop.is-open .db-drop__trigger::after,
  html:not(.db-js) .db-drop:hover .db-drop__trigger::after,
  html:not(.db-js) .db-drop:focus-within .db-drop__trigger::after {
    transform: rotate(180deg);
    color: var(--db-accent-text);
  }
  .db-drop__menu {
    display: none;
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: 100%;
    padding-block-start: 8px;
    width: 288px;
    max-width: calc(100vw - 24px);
    z-index: 120;
  }
  .db-drop__inner {
    background: rgba(17, 20, 28, .98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--db-border-2);
    border-radius: var(--db-radius);
    padding: 6px;
    box-shadow: var(--db-shadow-2);
    display: grid;
    gap: 2px;
    max-height: min(75vh, 520px);
    overflow-y: auto;
  }
  .db-drop.is-open .db-drop__menu,
  html:not(.db-js) .db-drop:hover .db-drop__menu,
  html:not(.db-js) .db-drop:focus-within .db-drop__menu {
    display: block;
  }
  .db-drop__label {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--db-muted-2);
    padding: 8px 10px 4px;
  }
  .db-drop__inner a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--db-radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--db-muted);
    text-decoration: none;
    transition: background-color var(--db-dur) var(--db-ease), color var(--db-dur) var(--db-ease);
  }
  .db-drop__inner a:hover,
  .db-drop__inner a[aria-current="page"] {
    background: var(--db-panel-2);
    color: var(--db-text);
  }
  .db-drop__inner a[aria-current="page"] {
    color: var(--db-accent-text);
  }
  .db-drop__tag {
    font-family: var(--db-mono);
    font-variant-numeric: tabular-nums;
    font-size: .72rem;
    padding: 2px 6px;
    border-radius: var(--db-radius-xs);
    background: var(--db-panel-2);
    color: var(--db-muted);
    border: 1px solid var(--db-border);
    flex-shrink: 0;
  }
  .db-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    font-family: var(--db-font);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: 0;
    border-radius: var(--db-radius-sm);
    background: var(--db-cta-bg);
    color: var(--db-cta-fg);
    border: 1px solid var(--db-cta-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease);
  }
  .db-nav__cta:hover {
    background: var(--db-cta-bg-hover);
    border-color: rgba(255, 255, 255, .4);
    color: var(--db-cta-fg);
  }

  .db-nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--db-radius-sm);
    background: var(--db-panel);
    color: var(--db-text);
    border: 1px solid var(--db-border-2);
    cursor: pointer;
    flex: 0 0 auto;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease);
  }
  .db-nav__toggle:hover {
    background: var(--db-panel-2);
    border-color: var(--db-border-3);
  }
  .db-nav__toggle[aria-expanded="true"] {
    background: var(--db-panel-2);
    border-color: var(--db-accent);
    color: var(--db-accent-text);
  }
  .db-nav__toggle .db-nav__icon-close {
    display: none;
  }
  .db-nav__toggle[aria-expanded="true"] .db-nav__icon-open {
    display: none;
  }
  .db-nav__toggle[aria-expanded="true"] .db-nav__icon-close {
    display: block;
  }

  @media (max-width: 860px) {
    html.db-js .db-nav__link--hide-md {
      display: none;
    }
    html.db-js .db-nav__toggle {
      display: inline-flex;
    }
  }
  @media (max-width: 620px) {
    html.db-js .db-nav__link:not(.db-drop__trigger),
    html.db-js .db-nav__sep,
    html.db-js .db-drop,
    html.db-js .db-nav__icon {
      display: none;
    }
    .db-nav__links {
      gap: 6px;
    }
    .db-nav__cta {
      padding: 6px 12px;
      font-size: .8125rem;
    }
    html:not(.db-js) .db-nav {
      height: auto;
      min-height: 64px;
      padding-block: 8px;
    }
    html:not(.db-js) .db-nav__inner {
      flex-wrap: wrap;
      height: auto;
    }
    html:not(.db-js) .db-nav__links {
      flex-wrap: wrap;
      justify-content: flex-end;
    }
  }

  /* ==========================================================================
     MOBILE NAVIGATION DRAWER (native top-layer modal <dialog class="db-drawer">)
     ========================================================================== */
  dialog.db-drawer {
    margin: 0;
    margin-inline-start: auto;
    padding: 0;
    border: 0;
    border-inline-start: 1px solid var(--db-border);
    inline-size: min(420px, 100vw);
    max-inline-size: 100vw;
    block-size: 100dvh;
    max-block-size: 100dvh;
    background: rgba(11, 13, 20, .98);
    color: var(--db-text);
    font-family: var(--db-font);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
  }
  dialog.db-drawer::backdrop {
    background: rgba(7, 8, 13, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    overscroll-behavior: contain;
    opacity: 0;
  }
  dialog.db-drawer[open] {
    opacity: 1;
  }
  dialog.db-drawer[open]::backdrop {
    opacity: 1;
  }
  @media (prefers-reduced-motion: no-preference) {
    dialog.db-drawer {
      transform: translateX(16px);
      transition:
        opacity .2s var(--db-ease),
        transform .22s var(--db-ease),
        overlay .22s allow-discrete,
        display .22s allow-discrete;
    }
    dialog.db-drawer::backdrop {
      transition:
        opacity .2s var(--db-ease),
        overlay .2s allow-discrete,
        display .2s allow-discrete;
    }
    dialog.db-drawer[open] {
      transform: translateX(0);
    }
    @starting-style {
      dialog.db-drawer[open] {
        opacity: 0;
        transform: translateX(16px);
      }
      dialog.db-drawer[open]::backdrop {
        opacity: 0;
      }
    }
  }
  .db-drawer__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(11, 13, 20, .95);
    border-bottom: 1px solid var(--db-border);
  }
  .db-drawer__head-title {
    font-size: .875rem;
    font-weight: 600;
    color: var(--db-text);
  }
  .db-drawer__close {
    display: inline-grid;
    place-items: center;
    min-inline-size: 36px;
    min-block-size: 36px;
    border-radius: var(--db-radius-sm);
    border: 1px solid var(--db-border-2);
    background: var(--db-panel);
    color: var(--db-text);
    cursor: pointer;
    line-height: 1;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease);
  }
  .db-drawer__close:hover {
    background: var(--db-panel-2);
    border-color: var(--db-border-3);
  }
  .db-drawer__inner {
    padding: 16px 16px 40px;
    display: grid;
    gap: 20px;
  }
  .db-drawer__section {
    display: grid;
    gap: 6px;
  }
  .db-drawer__label {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--db-muted-2);
    padding: 4px 8px;
    margin: 0;
  }
  .db-drawer__list {
    display: grid;
    gap: 4px;
  }
  .db-drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-block-size: 44px;
    padding: 8px 12px;
    border-radius: var(--db-radius-sm);
    background: var(--db-panel);
    border: 1px solid var(--db-border);
    color: var(--db-text);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease);
  }
  .db-drawer__link:hover {
    background: var(--db-panel-2);
    border-color: var(--db-border-2);
    color: var(--db-text);
  }
  .db-drawer__link[aria-current="page"],
  .db-drawer__link.is-active {
    border-color: rgba(56, 189, 248, .35);
    color: var(--db-accent-text);
  }
  .db-drawer__link-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .db-drawer__langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .db-drawer__langs a {
    display: inline-flex;
    align-items: center;
    min-block-size: 36px;
    padding: 4px 12px;
    border-radius: var(--db-radius-sm);
    background: var(--db-panel);
    border: 1px solid var(--db-border);
    color: var(--db-muted);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
  }
  .db-drawer__langs a:hover,
  .db-drawer__langs a[aria-current="page"] {
    color: var(--db-accent-text);
    border-color: rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .08);
  }
  .db-drawer__cta {
    width: 100%;
    min-block-size: 44px;
    font-size: .92rem;
  }

  /* ==========================================================================
     UNIFIED FOOTER (.db-footer)
     ========================================================================== */
  .db-footer {
    width: 100%;
    background: var(--db-bg-2);
    border-top: 1px solid var(--db-border);
    padding: 48px 0 40px;
    margin-top: 64px;
    color: var(--db-muted-2);
    font-family: var(--db-font);
    font-size: .875rem;
    letter-spacing: 0;
    word-spacing: normal;
    text-align: left;
  }
  .db-footer__inner {
    max-width: var(--db-wrap);
    margin-inline: auto;
    padding-inline: var(--db-gutter);
  }
  .db-footer__grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--db-border);
  }
  @media (min-width: 640px) {
    .db-footer__grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  @media (min-width: 960px) {
    .db-footer__grid {
      grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
  }
  .db-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -.02em;
    color: var(--db-text);
    text-decoration: none;
  }
  .db-footer__brand:hover {
    color: var(--db-text);
  }
  .db-footer__brand img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: block;
    border: 1px solid var(--db-border);
  }
  .db-footer__brand em {
    font-style: normal;
    color: var(--db-muted);
    font-weight: 500;
  }
  .db-footer__desc {
    margin: 12px 0 0;
    color: var(--db-muted);
    font-size: .875rem;
    line-height: 1.55;
    max-width: 36ch;
  }
  .db-footer__copy {
    margin: 8px 0 0;
    color: var(--db-muted-2);
    font-size: .8125rem;
  }
  .db-footer__copy a {
    color: var(--db-accent-text);
    text-decoration: none;
  }
  .db-footer__copy a:hover {
    text-decoration: underline;
  }
  .db-footer__col-title {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--db-text);
    margin: 0 0 12px;
  }
  .db-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }
  .db-footer__list li {
    margin: 0;
    padding: 0;
  }
  .db-footer__list a {
    color: var(--db-muted);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 400;
    transition: color var(--db-dur) var(--db-ease);
  }
  .db-footer__list a:hover,
  .db-footer__list a[aria-current="page"] {
    color: var(--db-text);
  }
  .db-footer__bottom {
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .db-footer__langs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-size: .8125rem;
  }
  .db-footer__langs span {
    color: var(--db-muted-2);
    font-weight: 500;
    margin-inline-end: 4px;
  }
  .db-footer__langs a {
    color: var(--db-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: var(--db-radius-xs);
    background: var(--db-panel);
    border: 1px solid var(--db-border);
    font-weight: 500;
    transition: color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease), background-color var(--db-dur) var(--db-ease);
  }
  .db-footer__langs a:hover,
  .db-footer__langs a[aria-current="page"] {
    color: var(--db-accent-text);
    border-color: rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .08);
  }
  .db-footer__privacy {
    margin: 0;
    font-size: .8125rem;
    color: var(--db-muted-2);
  }

  /* ==========================================================================
     STUDIO SCREENSHOTS, STRIP & NATIVE <dialog class="shot-zoom">
     ========================================================================== */
  .shots__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
  }
  @media (min-width: 760px) {
    .shots__grid {
      grid-template-columns: repeat(12, 1fr);
    }
    .shot--hero { grid-column: span 12; }
    .shot--b { grid-column: span 5; }
    .shot--half,
    .shot--c,
    .shot--wide { grid-column: span 6; }
  }
  .shot {
    margin: 0;
  }
  .shot__frame {
    position: relative;
    border-radius: var(--db-radius);
    background: var(--db-panel);
    border: 1px solid var(--db-border);
    overflow: hidden;
    box-shadow: var(--db-shadow-1);
    transition: border-color var(--db-dur) var(--db-ease);
  }
  .shot__frame:hover,
  .shot__frame:has(.shot__trigger:focus-visible) {
    border-color: var(--db-border-3);
  }
  .shot--hero .shot__frame {
    border-color: var(--db-border-2);
    box-shadow: var(--db-shadow-2);
  }
  .shot__trigger {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: zoom-in;
    line-height: 0;
  }
  .shot__trigger:focus-visible {
    outline: 2px solid var(--db-focus);
    outline-offset: -3px;
  }
  .shot__trigger img {
    display: block;
    width: 100%;
    height: auto;
  }
  .shot__zoom-hint {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-end: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--db-radius-xs);
    background: rgba(11, 13, 20, .86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--db-border-2);
    color: var(--db-text);
    font-size: .75rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--db-dur) var(--db-ease);
  }
  .shot__trigger:hover .shot__zoom-hint,
  .shot__trigger:focus-visible .shot__zoom-hint {
    opacity: 1;
  }
  .framed {
    padding-top: 28px;
  }
  .framed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--db-panel-2);
    border-bottom: 1px solid var(--db-border);
    z-index: 1;
  }
  .lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    z-index: 2;
    pointer-events: none;
  }
  .lights i {
    position: absolute;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
    background: rgba(238, 240, 245, .16);
    border: 1px solid rgba(238, 240, 245, .14);
  }
  .lights i:nth-child(1) { left: 12px; }
  .lights i:nth-child(2) { left: 26px; }
  .lights i:nth-child(3) { left: 40px; }
  .shot__theme-toggle {
    position: absolute;
    top: 4px;
    inset-inline-end: 12px;
    z-index: 4;
    display: flex;
    gap: 2px;
    background: var(--db-bg-0);
    padding: 2px;
    border-radius: var(--db-radius-xs);
    border: 1px solid var(--db-border-2);
  }
  .shot__theme-btn {
    background: none;
    border: 0;
    color: var(--db-muted);
    font-family: var(--db-font);
    font-size: .72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--db-radius-xs);
    cursor: pointer;
    transition: background-color var(--db-dur) var(--db-ease), color var(--db-dur) var(--db-ease);
    letter-spacing: 0;
  }
  .shot__theme-btn:hover {
    color: var(--db-text);
  }
  .shot__theme-btn.is-active {
    background: var(--db-panel-2);
    color: var(--db-text);
  }
  .shot__cap {
    padding-top: 12px;
  }
  .shot__t {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--db-text);
  }
  .shot__d {
    margin: 0;
    font-size: .875rem;
    line-height: 1.55;
    color: var(--db-muted);
    max-width: 52ch;
  }

  .shot-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
  }
  .shot-strip__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: var(--db-panel);
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    color: var(--db-text);
    text-decoration: none;
    transition: border-color var(--db-dur) var(--db-ease), background-color var(--db-dur) var(--db-ease);
  }
  .shot-strip__item:hover {
    border-color: var(--db-border-3);
    background: var(--db-panel-2);
    color: var(--db-text);
  }
  .shot-strip__item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: top;
    border-radius: var(--db-radius-sm);
    display: block;
  }
  .shot-strip__item span {
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.35;
  }

  /* Native top-layer <dialog class="shot-zoom"> */
  dialog.shot-zoom {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--db-text);
    max-inline-size: min(1360px, 95vw);
    max-block-size: 94dvh;
    margin: auto;
    overflow: visible;
    overscroll-behavior: contain;
    opacity: 0;
  }
  dialog.shot-zoom::backdrop {
    background: rgba(7, 8, 13, .86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    overscroll-behavior: contain;
    opacity: 0;
    cursor: zoom-out;
  }
  dialog.shot-zoom[open] {
    opacity: 1;
  }
  dialog.shot-zoom[open]::backdrop {
    opacity: 1;
  }
  @media (prefers-reduced-motion: no-preference) {
    dialog.shot-zoom {
      transform: scale(.97) translateY(6px);
      transition:
        opacity .2s var(--db-ease),
        transform .24s var(--db-ease),
        overlay .24s allow-discrete,
        display .24s allow-discrete;
    }
    dialog.shot-zoom::backdrop {
      transition:
        opacity .2s var(--db-ease),
        overlay .2s allow-discrete,
        display .2s allow-discrete;
    }
    dialog.shot-zoom[open] {
      transform: scale(1) translateY(0);
    }
    @starting-style {
      dialog.shot-zoom[open] {
        opacity: 0;
        transform: scale(.97) translateY(6px);
      }
      dialog.shot-zoom[open]::backdrop {
        opacity: 0;
      }
    }
  }
  .shot-zoom__window {
    background: var(--db-panel);
    border: 1px solid var(--db-border-2);
    border-radius: var(--db-radius-lg);
    overflow: hidden;
    box-shadow: var(--db-shadow-2);
    display: flex;
    flex-direction: column;
    max-block-size: 94dvh;
  }
  .shot-zoom__titlebar {
    position: relative;
    height: 36px;
    flex-shrink: 0;
    background: var(--db-panel-2);
    border-bottom: 1px solid var(--db-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
  }
  .shot-zoom__lights {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 60px;
  }
  .shot-zoom__lights i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(238, 240, 245, .16);
    border: 1px solid rgba(238, 240, 245, .14);
  }
  .shot-zoom__title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: .8125rem;
    font-weight: 500;
    color: var(--db-text);
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
  }
  .shot-zoom__close {
    background: var(--db-panel);
    border: 1px solid var(--db-border-2);
    color: var(--db-muted);
    min-inline-size: 28px;
    min-block-size: 28px;
    border-radius: var(--db-radius-xs);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease), color var(--db-dur) var(--db-ease);
    line-height: 1;
  }
  .shot-zoom__close:hover {
    background: var(--db-panel-2);
    border-color: var(--db-border-3);
    color: var(--db-text);
  }
  .shot-zoom__body {
    overflow: auto;
    cursor: zoom-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--db-bg-0);
  }
  .shot-zoom__body img {
    display: block;
    max-width: 100%;
    max-height: calc(94dvh - 96px);
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .shot-zoom__meta {
    flex-shrink: 0;
    padding: 12px 20px;
    background: var(--db-panel);
    border-top: 1px solid var(--db-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .shot-zoom__desc {
    margin: 0;
    font-size: .84rem;
    line-height: 1.45;
    color: var(--db-muted);
  }
  .shot-zoom__hint {
    flex-shrink: 0;
    font-size: .75rem;
    color: var(--db-muted-2);
    font-family: var(--db-mono);
    font-variant-numeric: tabular-nums;
  }
  .shot-zoom__hint kbd {
    background: var(--db-panel-2);
    border: 1px solid var(--db-border-2);
    border-radius: var(--db-radius-xs);
    padding: 2px 6px;
    font-size: .72rem;
    color: var(--db-text-2);
  }
  @media (max-width: 640px) {
    .shot-zoom__title { display: none; }
    .shot-zoom__meta {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .shot-zoom__hint { font-size: .72rem; }
  }

  /* ==========================================================================
     RESPONSIVE TABLE WRAPPER & SCROLL AFFORDANCES
     ========================================================================== */
  .db-table-wrap {
    overflow: auto;
    max-inline-size: 100%;
    border: 1px solid var(--db-border);
    border-radius: var(--db-radius);
    background: var(--db-panel);
    container-type: inline-size;
  }
  @supports not (animation-timeline: scroll()) {
    .db-table-wrap {
      background:
        linear-gradient(90deg, var(--db-panel) 20%, transparent) left center / 28px 100% no-repeat local,
        linear-gradient(90deg, transparent, var(--db-panel) 80%) right center / 28px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .48), transparent) left center / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .48), transparent) right center / 14px 100% no-repeat scroll,
        var(--db-panel);
    }
  }

  /* ==========================================================================
     INVOKER COPY BUTTONS (.db-copy / .db-copy-btn / .db-copy-tip)
     ========================================================================== */
  .db-copy {
    position: relative;
    display: inline-flex;
    align-items: center;
  }
  .db-copy-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-inline-size: 28px;
    min-block-size: 28px;
    padding: 4px 8px;
    border-radius: var(--db-radius-sm);
    border: 1px solid var(--db-border-2);
    background: var(--db-panel-2);
    color: var(--db-text);
    font-family: var(--db-mono);
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--db-dur) var(--db-ease), border-color var(--db-dur) var(--db-ease), color var(--db-dur) var(--db-ease);
  }
  .db-copy-btn:hover {
    background: var(--db-panel);
    border-color: var(--db-border-3);
  }
  .db-copy-btn[data-copied] {
    border-color: var(--db-emerald);
    color: var(--db-emerald);
  }
  .db-copy-btn[data-failed] {
    border-color: var(--db-red);
    color: var(--db-red);
  }
  .db-copy-tip {
    position: absolute;
    inset-block-end: calc(100% + 8px);
    inset-inline-end: 0;
    padding: 4px 8px;
    border-radius: var(--db-radius-xs);
    background: var(--db-bg-0);
    border: 1px solid var(--db-border-2);
    color: var(--db-text);
    font-family: var(--db-mono);
    font-size: .72rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--db-dur) var(--db-ease);
  }
  .db-copy-btn[data-copied] + .db-copy-tip,
  .db-copy-btn[data-failed] + .db-copy-tip {
    opacity: 1;
  }

  /* ==========================================================================
     HEAVY BELOW-FOLD DEFERRAL
     ========================================================================== */
  .db-defer {
    content-visibility: auto;
    contain-intrinsic-size: auto 640px;
  }

  /* ==========================================================================
     UNIFIED MATTE-DARK EDITORIAL SYSTEM (index, agentic-api, benchmark, fibo)
     ========================================================================== */
  .ed-wrap {
    max-width: var(--db-wrap);
    margin-inline: auto;
    padding-inline: var(--db-gutter);
    width: 100%;
    min-width: 0;
  }
  .ed-section {
    padding-block: var(--section-y);
    border-top: 1px solid var(--line);
  }
  .ed-section--hero {
    border-top: 0;
    padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-y);
  }
  .eyebrow {
    font-family: var(--db-mono);
    font-weight: 500;
    font-size: var(--fs-xs);
    line-height: 1.2;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 var(--sp-3);
  }
  .ed-h1 {
    font-size: var(--fs-2xl);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    font-weight: 600;
    color: var(--fg);
    margin: 0 0 var(--sp-4);
  }
  .ed-h2 {
    font-size: var(--fs-xl);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    font-weight: 600;
    color: var(--fg);
    margin: 0 0 var(--sp-4);
  }
  .ed-h3 {
    font-size: var(--fs-md);
    line-height: 1.3;
    font-weight: 600;
    color: var(--fg);
    margin: 0 0 var(--sp-2);
  }
  .ed-lead {
    font-size: var(--fs-lg);
    line-height: 1.5;
    color: var(--fg-2);
    max-width: var(--wrap-text);
    margin: 0 0 var(--sp-6);
  }
  .ed-prose {
    color: var(--fg-2);
    max-width: var(--wrap-text);
    margin: 0 0 var(--sp-4);
  }
  .ed-meta {
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    line-height: 1.6;
    color: var(--fg-3);
    margin: var(--sp-3) 0 0;
  }
  .ed-meta code {
    font-size: .75rem;
    padding: 2px 5px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--fg-2);
  }
  .card {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: var(--db-radius);
    padding: var(--sp-6);
    min-width: 0;
    transition: border-color var(--db-dur) var(--db-ease);
  }
  .card:hover {
    border-color: var(--line-2);
  }
  .card p:last-child {
    margin-bottom: 0;
  }
  .btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
  }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    height: 40px;
    padding: 0 var(--sp-4);
    border-radius: var(--db-radius-sm);
    font: 500 var(--fs-sm)/1 var(--db-font);
    border: 1px solid var(--line-2);
    color: var(--fg);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--db-dur) var(--db-ease), background-color var(--db-dur) var(--db-ease);
  }
  .btn:hover {
    border-color: var(--fg-3);
    background: var(--surface-2);
    color: var(--fg);
  }
  .btn--primary {
    background: var(--fg);
    color: var(--db-bg);
    border-color: var(--fg);
  }
  .btn--primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--db-bg);
  }
  .btn--sm {
    height: 32px;
    padding: 0 var(--sp-3);
    font-size: var(--fs-xs);
  }
  .tag {
    display: inline-block;
    font: 500 var(--fs-xs)/1.2 var(--db-mono);
    color: var(--fg-2);
    border: 1px solid var(--line-2);
    border-radius: 4px;
    padding: 3px 6px;
    white-space: nowrap;
  }
  .tag--nc {
    color: var(--db-amber);
    border-color: color-mix(in srgb, var(--db-amber) 40%, transparent);
  }
  .tag--ok {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  }
  .ed-grid-2 {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
  }
  .ed-grid-3 {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
  }
  @media (min-width: 720px) {
    .ed-grid-2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ed-grid-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  .ed-hero-grid {
    display: grid;
    gap: var(--sp-8);
    grid-template-columns: 1fr;
    align-items: center;
  }
  @media (min-width: 960px) {
    .ed-hero-grid {
      grid-template-columns: 1.05fr .95fr;
    }
  }
  .ed-media-frame {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: var(--db-radius-lg);
    overflow: hidden;
  }
  .ed-media-frame video,
  .ed-media-frame img {
    display: block;
    width: 100%;
    height: auto;
  }
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--db-radius);
    background: var(--surface-1);
    max-width: 100%;
  }
  .table-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    text-align: left;
  }
  .table-scroll th {
    font: 500 var(--fs-xs)/1.3 var(--db-mono);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fg-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4);
    white-space: nowrap;
  }
  .table-scroll td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--line);
    color: var(--fg-2);
    vertical-align: top;
  }
  .table-scroll tr:last-child td,
  .table-scroll tr:last-child th {
    border-bottom: 0;
  }
  .table-scroll th:first-child,
  .table-scroll td:first-child {
    position: sticky;
    left: 0;
    background: var(--surface-1);
    color: var(--fg);
    font-weight: 500;
    z-index: 1;
  }
  .table-scroll thead th:first-child {
    background: var(--surface-2);
    z-index: 2;
  }
  .num {
    font-family: var(--db-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
  }
  .ed-pre {
    font-family: var(--db-mono);
    font-size: var(--fs-sm);
    line-height: 1.55;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--db-radius-sm);
    padding: var(--sp-4);
    overflow-x: auto;
    max-width: 100%;
    margin: 0;
    color: var(--fg);
  }
  .ed-faq details {
    border-bottom: 1px solid var(--line);
    padding-block: var(--sp-4);
  }
  .ed-faq details:first-child {
    border-top: 1px solid var(--line);
  }
  .ed-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--fg);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-4);
  }
  .ed-faq summary::after {
    content: "+";
    font-family: var(--db-mono);
    color: var(--fg-3);
    font-weight: 400;
  }
  .ed-faq details[open] summary::after {
    content: "−";
  }
  .ed-faq details p {
    margin: var(--sp-3) 0 0;
    color: var(--fg-2);
    max-width: var(--wrap-text);
  }
  .ed-link {
    color: var(--db-accent);
    text-decoration: none;
  }
  .ed-link:hover {
    text-decoration: underline;
  }
  .ed-copy-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
  }
  .bar-list {
    display: grid;
    gap: var(--sp-2);
    margin: var(--sp-6) 0;
  }
  .bar-row {
    display: grid;
    grid-template-columns: minmax(0, 220px) 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    font-size: var(--fs-sm);
  }
  @media (max-width: 520px) {
    .bar-row {
      grid-template-columns: 1fr auto;
    }
    .bar-track {
      grid-column: 1 / -1;
    }
  }
  .bar-label {
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bar-track {
    height: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
  .bar-fill {
    height: 100%;
    background: var(--fg-2);
    border-radius: 3px;
  }
  .bar-fill--warn {
    background: var(--db-amber);
  }
  .bar-val {
    font-family: var(--db-mono);
    font-variant-numeric: tabular-nums;
    color: var(--fg-2);
    font-size: var(--fs-xs);
    white-space: nowrap;
  }
  .ed-checker {
    background-color: var(--surface-1);
    background-image:
      linear-gradient(45deg, var(--surface-2) 25%, transparent 25%),
      linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, var(--surface-2) 75%),
      linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  }
  .ed-grid-4 {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
  }
  @media (min-width: 640px) {
    .ed-grid-4 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (min-width: 960px) {
    .ed-grid-4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
  .ed-thumb-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: var(--db-radius-sm);
    overflow: hidden;
  }
  .ed-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--db-radius-sm);
  }
  .ed-thumb--sq {
    aspect-ratio: 1 / 1;
  }
  .ed-lightbox {
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: var(--db-radius);
    background: var(--surface-1);
    color: var(--fg);
    max-width: min(94vw, 1120px);
    max-height: 92vh;
    margin: auto;
    overflow: hidden;
  }
  .ed-lightbox[open] {
    display: flex;
    flex-direction: column;
  }
  .ed-lightbox::backdrop {
    background: rgba(5, 6, 8, .86);
    backdrop-filter: blur(6px);
  }
  .ed-lightbox__wrap {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .ed-lightbox__wrap--split {
    grid-template-columns: 1fr;
  }
  @media (min-width: 820px) {
    .ed-lightbox__wrap--split {
      grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
    }
  }
  .ed-lightbox__media {
    background: var(--db-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
  }
  .ed-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    margin-inline: auto;
    object-fit: contain;
  }
  .ed-lightbox__meta {
    padding: var(--sp-4);
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    min-width: 0;
  }
  @media (min-width: 820px) {
    .ed-lightbox__wrap--split .ed-lightbox__meta {
      border-top: 0;
      border-left: 1px solid var(--line);
    }
  }
  .ed-lightbox__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--sp-3);
  }
  .ed-lightbox__text {
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    color: var(--fg);
    font-weight: 500;
  }
  .ed-lightbox__label {
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fg-3);
    margin: 0 0 var(--sp-1);
  }
  .ed-lightbox__prompt {
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--fg-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--db-radius-sm);
    padding: var(--sp-3);
    margin: 0;
    word-break: break-word;
  }
  .ed-lightbox__params {
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    line-height: 1.6;
    color: var(--fg-2);
    margin: 0;
    white-space: pre-wrap;
  }
  .ed-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3) var(--sp-4);
    margin: var(--sp-3) 0 0;
  }
  .ed-meta-list dt {
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: .05em;
  }
  .ed-meta-list dd {
    margin: 2px 0 0;
    font-family: var(--db-mono);
    font-size: var(--fs-xs);
    color: var(--fg);
    word-break: break-word;
  }
}

@layer utilities {
  .db-mt-1 { margin-top: 12px; }
  .db-mt-2 { margin-top: 16px; }
  .db-mt-3 { margin-top: 24px; }
  .db-mt-4 { margin-top: 32px; }
  .db-mb-0 { margin-bottom: 0; }
  .db-mb-1 { margin-bottom: 8px; }
  .db-mb-2 { margin-bottom: 16px; }
  .db-mb-3 { margin-bottom: 24px; }
  .db-mb-4 { margin-bottom: 48px; }
  .db-flex-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
  .db-flex-center { display: flex; justify-content: center; }
  .db-text-center { text-align: center; }
  .db-align-center { align-items: center; }
  .db-fw-700 { font-weight: 600; }
  .db-link-cyan { color: var(--db-accent-text); font-weight: 500; }
  .db-callout-warn { border-inline-start: 3px solid var(--db-amber); }
  .db-callout-cyan { border-inline-start: 3px solid var(--db-accent); }
  .db-note-sm { font-size: .875rem; color: var(--db-muted); }
  .db-muted { color: var(--db-muted); }
  .db-cyan { color: var(--db-accent-text); }
  .db-amber { color: var(--db-amber); }
  .skip-link {
    position: absolute;
    left: var(--sp-4);
    top: -100px;
    z-index: 200;
    padding: var(--sp-2) var(--sp-3);
    background: var(--fg);
    color: var(--db-bg);
    border-radius: var(--db-radius-sm);
    font-size: var(--fs-sm);
    text-decoration: none;
  }
  .skip-link:focus {
    top: var(--sp-2);
  }
  [data-ui-theme][aria-pressed="true"] {
    background: var(--surface-2);
    border-color: var(--fg-3);
  }
}
