/* DSHToolkit — design system v2
   Editorial dark UI. Built for the English developer audience.
   One stylesheet, no build step, no runtime JS dependency. */

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

:root {
  /* surfaces — warm-tinted near-black, not pure grey */
  --ink-0: #0a0a0c;
  --ink-1: #0e0e12;
  --ink-2: #14141a;
  --ink-3: #1b1b23;
  --ink-4: #232330;

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);

  /* type */
  --text: #f2f3f7;
  --text-2: #a8adbd;
  --text-3: #71768a;

  /* accent — a single, confident hue. no rainbow gradients. */
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --accent-line: rgba(108, 140, 255, 0.32);
  --accent-ink: #0a0a0c;

  --good: #4ade80;
  --warn: #fbbf24;

  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Berkeley Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 22px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 30px -12px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 12px 40px -16px rgba(108, 140, 255, 0.45);

  --max: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  img, svg { display: block; max-width: 100%; }
  button, input { font: inherit; color: inherit; }
  ul, ol { list-style: none; }
}

@layer base {
  body {
    background: var(--ink-0);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.62;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* a single hairline of light at the top of the page — the signature */
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line) 30%, rgba(255,255,255,.35) 50%, var(--accent-line) 70%, transparent);
    pointer-events: none;
    z-index: 100;
  }

  main { flex: 1 0 auto; }

  a { color: inherit; text-decoration: none; }
  a:hover { color: var(--text); }

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

  h1, h2, h3, h4 {
    font-weight: 620;
    letter-spacing: -0.03em;
    line-height: 1.14;
    text-wrap: balance;
  }

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

@layer layout {
  .wrap {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: 28px;
  }
  @media (max-width: 680px) {
    .wrap { padding-inline: 18px; }
  }
  section { padding-block: 84px; }
  section + section { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- header */
@layer components {
  header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--ink-0) 82%, transparent);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    align-items: center;
    gap: 34px;
    height: 66px;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 640;
    font-size: 15.5px;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .logo-mark {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--text);
    color: var(--ink-0);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-1);
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .logo:hover .logo-mark { background: var(--accent); transform: rotate(-6deg); }

  .nav-links {
    display: flex;
    gap: 26px;
    font-size: 14px;
    color: var(--text-2);
    font-weight: 470;
  }
  .nav-links a { position: relative; transition: color 0.15s; }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s var(--ease);
  }
  .nav-links a:hover { color: var(--text); }
  .nav-links a:hover::after { transform: scaleX(1); }

  .nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
  @media (max-width: 900px) { .nav-links { display: none; } }

  /* ---------------------------------------------------------------- buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding-inline: 18px;
    border-radius: var(--radius-m);
    border: 1px solid var(--line-2);
    font-size: 14px;
    font-weight: 560;
    letter-spacing: -0.01em;
    white-space: nowrap;
    background: transparent;
    transition: border-color 0.16s, background 0.16s, transform 0.16s var(--ease), box-shadow 0.16s;
    cursor: pointer;
  }
  .btn:hover {
    border-color: var(--line-3);
    background: var(--ink-2);
    transform: translateY(-1px);
  }
  .btn:active { transform: translateY(0); }

  .btn-p {
    background: var(--text);
    border-color: var(--text);
    color: var(--accent-ink);
    font-weight: 620;
    box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, var(--shadow-2);
  }
  .btn-p:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-glow);
  }

  /* ---------------------------------------------------------------- hero */
  .hero {
    position: relative;
    padding-block: 108px 88px;
    text-align: center;
    overflow: hidden;
    border-top: 0 !important;
  }
  .hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -280px;
    width: 1100px;
    height: 620px;
    translate: -50% 0;
    background: radial-gradient(closest-side, rgba(108, 140, 255, 0.16), transparent 78%);
    pointer-events: none;
    z-index: 0;
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(to right, var(--line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
  }
  .hero > .wrap { position: relative; z-index: 1; }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 30px;
    padding-inline: 13px;
    margin-bottom: 30px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.01em;
    color: var(--text-2);
  }
  .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16);
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
  }

  h1 {
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 640;
    letter-spacing: -0.045em;
    line-height: 1.03;
    margin-bottom: 22px;
  }
  h1 em {
    font-style: normal;
    color: var(--text-2);
    /* a soft light thrown from above — not a gradient wordmark */
    background: linear-gradient(180deg, var(--text) 8%, var(--text-2) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .sub {
    font-size: 17.5px;
    line-height: 1.6;
    color: var(--text-2);
    max-width: 620px;
    margin: 0 auto 38px;
    text-wrap: pretty;
  }

  .hero > .wrap > div[style] { gap: 12px !important; }

  /* ---------------------------------------------------------------- stats */
  .stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 76px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: linear-gradient(180deg, rgba(255,255,255,.022), transparent);
    overflow: hidden;
  }
  .stat {
    padding: 26px 20px 24px;
    border-right: 1px solid var(--line);
    text-align: left;
  }
  .stat:last-child { border-right: 0; }
  .stat b {
    display: block;
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 7px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .stat span {
    font-size: 11.5px;
    font-weight: 520;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  @media (max-width: 760px) {
    .stats { grid-template-columns: repeat(2, 1fr); margin-top: 52px; }
    .stat:nth-child(2n) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  }

  /* ---------------------------------------------------------------- section head */
  .sec-head { margin-bottom: 36px; max-width: 660px; }
  .sec-head h2 {
    font-size: 30px;
    font-weight: 620;
    letter-spacing: -0.035em;
    margin-bottom: 10px;
  }
  .sec-head p { color: var(--text-2); font-size: 16px; text-wrap: pretty; }

  /* ---------------------------------------------------------------- category cards */
  .cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 14px;
  }
  .cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--ink-1);
    transition: border-color 0.2s, background 0.2s, transform 0.24s var(--ease);
    overflow: hidden;
  }
  .cat-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
    opacity: 0;
    transition: opacity 0.24s;
  }
  .cat-card:hover {
    border-color: var(--line-2);
    background: var(--ink-2);
    transform: translateY(-3px);
  }
  .cat-card:hover::after { opacity: 1; }
  .cat-card h3 {
    font-size: 16.5px;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    letter-spacing: -0.02em;
  }
  .cat-card p { font-size: 13.5px; line-height: 1.55; color: var(--text-3); }
  .cat-card .n {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    background: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    flex: 0 0 auto;
    transition: color .2s, border-color .2s;
  }
  .cat-card:hover .n { color: var(--text); border-color: var(--line-3); }

  /* ---------------------------------------------------------------- plugin list rows */
  .plist {
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    overflow: hidden;
    background: var(--ink-1);
  }
  .prow {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: start;
    gap: 4px 14px;
    padding: 17px 22px 18px;
    border-bottom: 1px solid var(--line);
    transition: background 0.16s;
  }
  .prow:last-child { border-bottom: 0; }
  .prow:hover { background: var(--ink-2); }

  .rank {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    padding-top: 3px;
    font-variant-numeric: tabular-nums;
  }
  .pbody { min-width: 0; }
  .pname {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 560;
    letter-spacing: -0.015em;
    margin-bottom: 3px;
  }
  .pname > a:first-child { color: var(--text); border-bottom: 1px solid transparent; }
  .pname > a:first-child:hover { border-bottom-color: var(--line-3); }
  .ext {
    font-size: 12px;
    color: var(--text-3);
    opacity: 0;
    transition: opacity 0.16s, color 0.16s;
    translate: 0 -1px;
  }
  .prow:hover .ext { opacity: 1; }
  .ext:hover { color: var(--accent); }

  .pdesc {
    font-size: 13.8px;
    line-height: 1.55;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: pretty;
  }
  .pmeta {
    display: flex;
    gap: 16px;
    margin-top: 9px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
  }
  .pmeta span { position: relative; }
  .pmeta span + span::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 50%;
    width: 2px; height: 2px;
    border-radius: 50%;
    background: var(--text-3);
    translate: 0 -50%;
  }
  .tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    color: var(--text-3);
    border: 1px solid var(--line-2);
    border-radius: 4px;
    padding: 0 5px;
    line-height: 17px;
  }

  .stars {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-2);
    white-space: nowrap;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
    transition: color 0.16s;
  }
  .stars:hover { color: var(--accent); }
  @media (max-width: 640px) {
    .prow { grid-template-columns: 30px 1fr; padding: 15px 16px 16px; }
    .stars { grid-column: 2; padding-top: 0; margin-top: 6px; color: var(--text-3); }
  }

  /* ---------------------------------------------------------------- chips / filters */
  .chips, .filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
  }
  .chip {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding-inline: 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 12.8px;
    font-weight: 500;
    color: var(--text-2);
    transition: 0.16s;
  }
  .chip:hover { border-color: var(--line-3); color: var(--text); background: var(--ink-2); }
  .chip.on {
    background: var(--text);
    border-color: var(--text);
    color: var(--accent-ink);
    font-weight: 600;
  }

  /* ---------------------------------------------------------------- page head / crumb */
  .crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.8px;
    color: var(--text-3);
    padding-top: 36px;
    font-family: var(--font-mono);
  }
  .crumb a { transition: color 0.15s; }
  .crumb a:hover { color: var(--text); }
  .crumb span { color: var(--ink-4); }

  .page-head { padding: 22px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
  .page-head h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 640;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
  }
  .page-head p { color: var(--text-2); font-size: 16px; max-width: 720px; text-wrap: pretty; }

  /* ---------------------------------------------------------------- prose */
  .prose { max-width: 760px; padding-bottom: 96px; }
  .prose h2 {
    font-size: 22px;
    font-weight: 620;
    letter-spacing: -0.025em;
    margin: 46px 0 14px;
    padding-top: 4px;
  }
  .prose h2:first-child { margin-top: 0; }
  .prose h3 { font-size: 16.5px; font-weight: 600; margin: 30px 0 8px; }
  .prose p { color: var(--text-2); margin-bottom: 15px; text-wrap: pretty; }
  .prose p a, .prose li a { color: var(--text); border-bottom: 1px solid var(--line-3); }
  .prose p a:hover { border-bottom-color: var(--accent); color: var(--accent); }
  .prose ul, .prose ol { margin: 0 0 18px 2px; }
  .prose ul li, .prose ol li {
    color: var(--text-2);
    padding-left: 18px;
    position: relative;
    margin-bottom: 7px;
  }
  .prose ul li::before {
    content: "";
    position: absolute;
    left: 2px; top: 0.72em;
    width: 5px; height: 1px;
    background: var(--text-3);
  }

  .plug-meta {
    font-family: var(--font-mono) !important;
    font-size: 12.5px !important;
    color: var(--text-3) !important;
    letter-spacing: 0 !important;
    margin-bottom: 22px !important;
  }

  .cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }

  pre {
    background: var(--ink-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 18px 20px;
    overflow-x: auto;
    margin-bottom: 18px;
    position: relative;
  }
  pre::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--accent-line), transparent);
  }
  code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: #d6dae6;
  }
  p code, li code, td code {
    background: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12.5px;
    color: var(--text);
  }

  /* ---------------------------------------------------------------- table */
  .tbl {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
    margin-bottom: 22px;
    font-size: 14px;
  }
  .tbl th, .tbl td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
  }
  .tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
  .tbl th {
    width: 34%;
    font-weight: 500;
    color: var(--text-3);
    font-size: 12.5px;
    font-family: var(--font-mono);
    letter-spacing: 0;
    background: rgba(255,255,255,0.015);
  }
  .tbl td { color: var(--text-2); }
  .tbl td a { color: var(--text); border-bottom: 1px solid var(--line-3); }

  /* ---------------------------------------------------------------- guides */
  .guide-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    overflow: hidden;
    background: var(--ink-1);
  }
  .guide-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    transition: background 0.16s, padding 0.24s var(--ease);
  }
  .guide-item:last-child { border-bottom: 0; }
  .guide-item:hover { background: var(--ink-2); padding-left: 26px; }
  .gm { flex: 1; min-width: 0; color: var(--text); font-weight: 520; font-size: 14.8px; }
  .gm small { display: block; color: var(--text-3); font-weight: 400; font-size: 13px; margin-top: 2px; }

  /* ---------------------------------------------------------------- steps / faq / notes */
  .steps { counter-reset: s; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; margin-bottom: 22px; }
  .step {
    counter-increment: s;
    background: var(--ink-1);
    padding: 20px 22px 20px 64px;
    position: relative;
    color: var(--text-2);
    font-size: 14.5px;
  }
  .step-n {
    position: absolute;
    left: 20px; top: 19px;
    width: 26px; height: 26px;
    border-radius: 7px;
    display: grid; place-items: center;
    background: var(--ink-3);
    border: 1px solid var(--line-2);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text);
  }
  .faq { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
  .q { background: var(--ink-1); padding: 20px 22px; }
  .q b, .q strong { display: block; color: var(--text); font-weight: 560; font-size: 15px; margin-bottom: 6px; letter-spacing: -0.015em; }
  .q p { color: var(--text-2); font-size: 14px; margin: 0; }
  .note {
    border-left: 2px solid var(--accent);
    background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
    border-radius: 0 var(--radius-m) var(--radius-m) 0;
    padding: 16px 18px;
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 20px;
  }

  /* ---------------------------------------------------------------- cta band */
  .cta-band {
    position: relative;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-xl);
    padding: 54px 40px;
    text-align: center;
    overflow: hidden;
    background:
      radial-gradient(ellipse 60% 100% at 50% 0%, rgba(108,140,255,.14), transparent 70%),
      var(--ink-1);
  }
  .cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.035em; margin-bottom: 12px; }
  .cta-band p { color: var(--text-2); max-width: 520px; margin: 0 auto 26px; }

  .rec { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; background: var(--ink-1); }

  /* ---------------------------------------------------------------- footer */
  footer {
    border-top: 1px solid var(--line);
    margin-top: 96px;
    padding-block: 56px 40px;
    background: var(--ink-0);
  }
  .fgrid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 40px;
  }
  .fgrid > div:first-child p { color: var(--text-3); font-size: 13.5px; }
  .fcol h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
  }
  .fcol a {
    display: block;
    font-size: 13.8px;
    color: var(--text-2);
    padding-block: 3.5px;
    transition: color 0.15s, translate 0.2s var(--ease);
  }
  .fcol a:hover { color: var(--text); translate: 2px 0; }
  footer .logo { color: var(--text); margin-bottom: 12px !important; }
  @media (max-width: 820px) {
    .fgrid { grid-template-columns: 1fr 1fr; gap: 34px; }
    .fgrid > div:first-child { grid-column: 1 / -1; max-width: none !important; }
  }

  /* ---------------------------------------------------------------- utilities */
  .muted { color: var(--text-3); }
  .mono { font-family: var(--font-mono); }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  .hero .eyebrow, .hero h1, .hero .sub, .hero .wrap > div[style], .stats {
    animation: rise 0.7s var(--ease) backwards;
  }
  .hero .eyebrow { animation-delay: 0.02s; }
  .hero h1 { animation-delay: 0.08s; }
  .hero .sub { animation-delay: 0.16s; }
  .hero .wrap > div[style] { animation-delay: 0.24s; }
  .stats { animation-delay: 0.32s; }
}

/* ---------------------------------------------------------------- mobile nav */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: transparent;
  padding: 0;
  place-items: center;
  gap: 4px;
  cursor: pointer;
  grid-auto-flow: row;
}
.nav-toggle span {
  display: block;
  width: 15px; height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform .24s var(--ease), opacity .2s;
}
body.nav-open .nav-toggle span:first-child { transform: translateY(2.75px) rotate(45deg); }
body.nav-open .nav-toggle span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-cta { margin-left: 8px; }
  .nav-cta .btn { height: 36px; padding-inline: 14px; font-size: 13.5px; }
  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    left: 0; right: 0; top: 66px;
    flex-direction: column;
    gap: 0;
    padding: 8px 18px 18px;
    background: color-mix(in srgb, var(--ink-0) 96%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
    animation: rise .28s var(--ease);
  }
  body.nav-open .nav-links a { padding-block: 12px; border-bottom: 1px solid var(--line); }
  body.nav-open .nav-links a::after { display: none; }
}

/* ---------------------------------------------------------------- filter rail */
.filter {
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-inline: -28px;
  padding-inline: 28px;
}
.filter::-webkit-scrollbar { display: none; }
.filter .chip { flex: 0 0 auto; }
@media (max-width: 680px) {
  .filter { margin-inline: -18px; padding-inline: 18px; }
}

/* ---------------------------------------------------------------- small polish */
.header-cta-ghost { color: var(--text-2) !important; }
.cat-grid + .cat-grid { margin-top: 14px; }
.prose > h2 + p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  section { padding-block: 60px; }
  .hero { padding-block: 72px 60px; }
  .sub { font-size: 16px; }
  .cta-band { padding: 38px 22px; margin-inline: -2px; }
  .prose { padding-bottom: 64px; }
}

  /* ------------------------------------------------- category intro block */
  .cat-intro {
    max-width: 760px;
    padding-bottom: 34px;
  }
  .cat-intro p {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.68;
    margin-bottom: 15px;
    text-wrap: pretty;
  }
  .cat-intro p:first-child {
    font-size: 17px;
    color: var(--text);
  }
  .cat-intro strong { color: var(--text); font-weight: 600; }
  .cat-intro a {
    color: var(--text);
    border-bottom: 1px solid var(--line-3);
    transition: border-color 0.15s, color 0.15s;
  }
  .cat-intro a:hover { border-bottom-color: var(--accent); color: var(--accent); }
  .cat-list-h {
    font-size: 13px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-weight: 500;
    padding: 18px 0 14px;
    border-top: 1px solid var(--line);
    margin-bottom: 6px;
  }

.pill{display:inline-block;font-family:var(--mono);font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;padding:2px 7px;border-radius:20px;vertical-align:1px}
.pill.ok{background:rgba(64,196,140,.14);color:#4FC48C;border:1px solid rgba(64,196,140,.28)}
.pill.warn{background:rgba(232,168,72,.13);color:#E8A848;border:1px solid rgba(232,168,72,.26)}
.tbl{width:100%;border-collapse:collapse;margin:0 0 20px;font-size:14px}
.tbl th{text-align:left;font-family:var(--mono);font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--txt3);border-bottom:1px solid var(--line);padding:8px 10px 8px 0;font-weight:500}
.tbl td{padding:9px 10px 9px 0;border-bottom:1px solid rgba(255,255,255,.05);color:var(--txt2);vertical-align:top}
.tbl tr:last-child td{border-bottom:none}
.tbl a{color:var(--acc2)}

/* link from the category intro into its data deep-dive */
.cat-deep{margin:0 0 22px;font-size:14px}
.cat-deep a{display:inline-block;padding:9px 15px;border:1px solid var(--line);border-radius:8px;color:var(--acc2);text-decoration:none;transition:border-color .15s,background .15s}
.cat-deep a:hover{border-color:var(--acc2);background:rgba(255,255,255,.03)}
