/* ============================================================
   Rakeen TechDocs — page styles
   All visual rules for the React-powered docs site. Tokens come from
   ../shared/tokens.css. Inline animations and component CSS live here.
   ============================================================ */
/* Base ============================================================== */
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; }
  body { font-family: var(--font-body); font-size: 17px; line-height: 1.55;
    color: var(--rk-ink); background: var(--rk-paper); -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em; }
  a { color: inherit; text-decoration: none; }
  button { background: transparent; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
  input, select, textarea { font: inherit; color: inherit; }
  input:focus, input:focus-visible, select:focus, select:focus-visible, textarea:focus, textarea:focus-visible { box-shadow: none !important; outline: none; }
  ::selection { background: var(--rk-blue); color: var(--paper-2); }
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-thumb { background: var(--ink-12); border-radius: 999px; }
  ::-webkit-scrollbar-track { background: transparent; }

  /* Dark theme overrides ============================================
     Recolor only the surface + ink tokens; brand blue/mist hold.
     A single root-level data-theme="dark" attribute flips the whole site. */
  [data-theme="dark"] {
    /* Surfaces use a slightly warmed deep navy so the brand still reads */
    --rk-paper:   #0a1020;
    --paper:      #0a1020;
    --paper-2:    #131a31;   /* card surface */
    --paper-3:    #0e1428;
    /* Ink swaps to off-white */
    --rk-ink:     #eef1f8;
    --ink-100:    #eef1f8;
    /* Opacity-based ink tokens become light-on-dark */
    --ink-80:  rgba(238,241,248,0.85);
    --ink-65:  rgba(238,241,248,0.72);
    --ink-50:  rgba(238,241,248,0.55);
    --ink-35:  rgba(238,241,248,0.38);
    --ink-20:  rgba(238,241,248,0.22);
    --ink-12:  rgba(238,241,248,0.14);
    --ink-8:   rgba(238,241,248,0.10);
    --ink-5:   rgba(238,241,248,0.06);
    /* Mist tokens dim toward teal-on-dark */
    --mist-40: rgba(58,93,192,0.10);
    --mist-60: rgba(58,93,192,0.14);
    --text:       #eef1f8;
    --text-soft:  rgba(238,241,248,0.72);
    --text-mute:  rgba(238,241,248,0.55);
  }
  /* The fixed nav background reads the page surface, so flip its
     scrolled glass tint to match dark mode. */
  [data-theme="dark"] .nav.scrolled { background: rgba(10,16,32,0.72); }
  /* Inputs in dark mode get an explicit fill so they remain legible */
  [data-theme="dark"] .field { background: rgba(238,241,248,0.04); }
  /* Smooth the surface swap when toggling theme */
  html { transition: background-color var(--dur-2) var(--ease-out); }
  body { transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }

  /* Rakeen wordmark — uses the official supplied SVG as a CSS mask so the
     fill can match the surface it's on. The wordmark file is 1080×344.68;
     the top ~210px is the RAKEEN letters, the rest is the tagline. */
  .brand-wordmark { display: inline-block; flex-shrink: 0;
    -webkit-mask-image: url('logos/rakeen-wordmark.svg');
    mask-image: url('logos/rakeen-wordmark.svg');
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: top center; mask-position: top center; }
  /* Nav variant — crops the tagline, shows just RAKEEN letters */
  .brand-wordmark--crop { width: 116px; height: 24px;
    -webkit-mask-size: 100% auto; mask-size: 100% auto;
    background-color: var(--rk-ink); }
  .brand-wordmark--crop.invert { background-color: var(--rk-paper); }
  /* Full lockup — wordmark + tagline */
  .brand-wordmark--full { width: 156px; height: 50px;
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-position: center; mask-position: center;
    background-color: var(--rk-ink); }
  .brand-wordmark--full.invert { background-color: var(--rk-paper); }

  .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--rk-blue); }
  .mono { font-family: var(--font-mono); }
  .em-serif { font-style: italic; font-weight: 300; }

  /* Nav =============================================================== */
  .nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: background var(--dur-2) var(--ease-out), backdrop-filter var(--dur-2) var(--ease-out); }
  .nav__inner { max-width: 1440px; margin: 0 auto; padding: 16px 32px;
    display: flex; align-items: center; gap: 28px; }
  .nav.scrolled { background: rgba(243,248,248,0.72); backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px); }
  .nav__brand { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
  .nav__brand-text { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
  .nav__brand-text small { font-size: 11.5px; font-weight: 500; color: var(--text-mute); margin-left: 6px; letter-spacing: 0.06em; }
  .nav__links { display: flex; gap: 4px; margin-left: 12px; }
  .nav__link { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
    color: var(--ink-65); cursor: pointer; transition: color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); position: relative; }
  .nav__link:hover { color: var(--rk-ink); }
  .nav__link.active { color: var(--rk-ink); }
  .nav__link.active::after { content:''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--rk-blue); }
  .nav__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .nav__search { display: inline-flex; align-items: center; gap: 10px;
    padding: 9px 14px; background: var(--mist-40); color: var(--ink-65);
    border-radius: 999px; font-size: 13px; cursor: pointer; min-width: 260px;
    transition: background var(--dur-2) var(--ease-out); }
  .nav__search:hover { background: var(--mist-60); color: var(--rk-ink); }
  .nav__kbd { margin-left: auto; font-family: var(--font-mono); font-size: 11px;
    background: var(--paper-2); padding: 2px 7px; border-radius: 4px; color: var(--text-mute); }
  .pill-btn { display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
    color: var(--ink-65); cursor: pointer; transition: color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
  .pill-btn:hover { background: var(--ink-5); color: var(--rk-ink); }
  .dropdown { position: absolute; top: calc(100% + 8px); background: var(--paper-2);
    border-radius: 12px; padding: 4px; box-shadow: var(--shadow-3); min-width: 180px; z-index: 50; }
  .dropdown__item { display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink-65);
    transition: background var(--dur-1) var(--ease-out); }
  .dropdown__item:hover { background: var(--mist-40); color: var(--rk-ink); }
  .dropdown__item.current { color: var(--rk-blue); font-weight: 600; }

  /* Main ============================================================== */
  main { padding-top: 70px; }
  .container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
  .container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
  .container-art { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

  /* Hero ============================================================== */
  .hero { padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px); position: relative; }
  .hero__eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--rk-blue); }
  .hero__eyebrow::before { content:''; width: 32px; height: 1px; background: var(--rk-blue); opacity: 0.4; }
  .hero__h { font-family: var(--font-display); font-size: clamp(56px, 7vw, 96px);
    font-weight: 500; line-height: 1.0; letter-spacing: -0.035em; margin: 32px 0 24px; max-width: 880px;
    animation: rise 1s var(--ease-out) both; }
  .hero__h em { font-style: italic; font-weight: 300; color: var(--rk-blue); }
  .hero__sub { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--text-soft); max-width: 600px;
    animation: rise 1s var(--ease-out) 100ms both; }
  .hero__trending { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 36px;
    animation: rise 1s var(--ease-out) 200ms both; }
  .trend-chip { padding: 8px 14px; border-radius: 999px; background: var(--paper-2);
    box-shadow: var(--shadow-1); font-size: 13px; color: var(--ink-65); cursor: pointer;
    transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
  .trend-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--rk-blue); }
  .trend-chip__label { font-size: 11px; color: var(--text-mute); letter-spacing: 0.06em; margin-right: 8px; text-transform: uppercase; font-weight: 600; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

  /* Category sections ================================================= */
  .cat { margin-top: clamp(60px, 8vw, 100px); }
  .cat__head { display: flex; align-items: baseline; gap: 16px; padding-bottom: 18px; margin-bottom: 28px;
    border-bottom: 1px solid var(--ink-8); }
  .cat__chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    font-weight: 600; padding: 4px 10px; border-radius: 4px; }
  .cat__chip.endpoint { background: rgba(58,93,192,0.10); color: var(--rk-blue); }
  .cat__chip.network  { background: var(--mist-60); color: var(--rk-ink); }
  .cat__chip.connect  { background: rgba(22,29,54,0.08); color: var(--rk-ink); }
  .cat__title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.018em; }
  .cat__tag { font-size: 14px; color: var(--text-soft); font-style: italic; flex: 1; }
  .cat__count { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); letter-spacing: 0.08em; }

  /* Product cards ===================================================== */
  .grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
  @media (min-width: 720px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
  .pcard { background: var(--paper-2); border-radius: 20px;
    padding: 28px; min-height: 260px; cursor: pointer; position: relative; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: var(--shadow-1);
    transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out); }
  .pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
  .pcard:hover .pcard__arrow { transform: translate(4px, -4px); color: var(--rk-blue); }
  .pcard--primary { background: #0e1830; color: #eef1f8; }
  [data-theme="dark"] .pcard--primary { background: #1a2542; }
  .pcard--primary .pcard__h { color: #eef1f8; }
  .pcard--primary .pcard__d { color: rgba(238,241,248,0.72); }
  .pcard--primary .pcard__meta { color: rgba(238,241,248,0.58); }
  .pcard__logo { height: 50px; display: flex; align-items: center; margin-bottom: 12px; }
  .pcard__logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
  .pcard__h { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.018em; margin-bottom: 8px; }
  .pcard__d { font-size: 14px; line-height: 1.55; color: var(--text-soft); flex: 1; }
  .pcard__meta { display: flex; justify-content: space-between; align-items: center;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(22,29,54,0.08);
    font-size: 12px; color: var(--text-mute); }
  .pcard--primary .pcard__meta { border-top-color: rgba(255,255,255,0.10); }
  .pcard__ver { font-family: var(--font-mono); font-size: 11.5px; }
  .pcard__arrow { position: absolute; top: 24px; right: 24px; color: var(--text-mute);
    transition: transform var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
  .pcard__primary-tag { position: absolute; top: 24px; right: 24px;
    padding: 3px 9px; border-radius: 999px; font-family: var(--font-mono);
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; background: rgba(58,93,192,0.30); color: #c6d1eb; }
  .pcard--primary .pcard__arrow { display: none; }

  /* Product card · Radial Bloom logo treatment ======================
     Two stacked logo layers per card. Outline draws at rest in
     ink-stroke; on hover the original brand colors bloom radially
     from the logo center over 950ms (cubic-bezier 0.22,1,0.36,1).
     Pure CSS — paths are styled because the SVG markup is injected
     inline by the SVG_CACHE useEffect in td-app.jsx. */
  .pcard__logo { position: relative; height: 50px; margin-bottom: 14px; overflow: visible; }
  .pcard__logo-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-start; }
  .pcard__logo-layer svg { height: 100%; width: auto; max-width: 100%; display: block; }
  .pcard__logo-layer--outline svg path,
  .pcard__logo-layer--outline svg .cls-1,
  .pcard__logo-layer--outline svg .cls-2,
  .pcard__logo-layer--outline svg .cls-3 {
    fill: none !important; stroke: var(--rk-ink); stroke-width: 1.1;
    vector-effect: non-scaling-stroke; opacity: 0.55;
    transition: opacity 420ms var(--ease-out); }
  .pcard:hover .pcard__logo-layer--outline svg path,
  .pcard:hover .pcard__logo-layer--outline svg .cls-1,
  .pcard:hover .pcard__logo-layer--outline svg .cls-2,
  .pcard:hover .pcard__logo-layer--outline svg .cls-3,
  .pcard:focus-visible .pcard__logo-layer--outline svg path,
  .pcard:focus-visible .pcard__logo-layer--outline svg .cls-1,
  .pcard:focus-visible .pcard__logo-layer--outline svg .cls-2,
  .pcard:focus-visible .pcard__logo-layer--outline svg .cls-3 { opacity: 0; }
  .pcard__logo-layer--fill { clip-path: circle(0% at 50% 50%); transition: clip-path 950ms var(--ease-snap); }
  .pcard:hover .pcard__logo-layer--fill,
  .pcard:focus-visible .pcard__logo-layer--fill { clip-path: circle(110% at 50% 50%); }
  .pcard--primary .pcard__logo-layer--outline svg path,
  .pcard--primary .pcard__logo-layer--outline svg .cls-1,
  .pcard--primary .pcard__logo-layer--outline svg .cls-2,
  .pcard--primary .pcard__logo-layer--outline svg .cls-3 { stroke: rgba(238,241,248,0.70); }
  .pcard:focus-visible { outline: 2px solid var(--rk-blue); outline-offset: 3px; }

  /* Footer link variants =========================================== */
  .footer__l--static { cursor: default; opacity: 0.45; }
  .footer__l--static:hover { color: var(--text-soft); }

  @media (prefers-reduced-motion: reduce) {
    .pcard__logo-layer--fill { clip-path: circle(110% at 50% 50%); transition: none; }
    .pcard__logo-layer--outline svg path,
    .pcard__logo-layer--outline svg .cls-1,
    .pcard__logo-layer--outline svg .cls-2,
    .pcard__logo-layer--outline svg .cls-3 { opacity: 0; transition: none; }
  }

  /* Route transition · full-screen wordmark loader =================
     Shown for ~550ms when setRoute() is called. The wordmark SVG is
     injected inline and each letter pops in sequence with a spring
     overshoot (rk-wm-pop @keyframes, ported verbatim from the lab). */
  .app-loader { position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: var(--rk-paper);
    animation: app-loader-fade 240ms var(--ease-out) both; }
  .app-loader[data-leaving="1"] { animation: app-loader-fade-out 220ms var(--ease-out) forwards; }
  @keyframes app-loader-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes app-loader-fade-out { from { opacity: 1; } to { opacity: 0; } }

  .spin-logo { --size: 140px; width: var(--size); height: var(--size);
    display: inline-block; position: relative; }
  .spin-logo svg { width: 100%; height: 100%; display: block; }
  .spin--wm-pop svg path { fill: var(--rk-ink);
    transform-box: fill-box; transform-origin: 50% 50%; opacity: 0;
    animation: rk-wm-pop 2.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
  .spin--wm-pop svg path:nth-of-type(5) { animation-delay: 0ms; }
  .spin--wm-pop svg path:nth-of-type(1) { animation-delay: 90ms; }
  .spin--wm-pop svg path:nth-of-type(6) { animation-delay: 180ms; }
  .spin--wm-pop svg path:nth-of-type(2) { animation-delay: 270ms; }
  .spin--wm-pop svg path:nth-of-type(3) { animation-delay: 360ms; }
  .spin--wm-pop svg path:nth-of-type(4) { animation-delay: 450ms; }
  @keyframes rk-wm-pop {
    0%   { transform: scale(0); opacity: 0; }
    18%  { transform: scale(1.18); opacity: 1; }
    32%  { transform: scale(1); }
    78%  { transform: scale(1); opacity: 1; }
    92%  { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(0); opacity: 0; }
  }

  /* New view enters from a subtle lift after the loader leaves */
  .app-page { animation: app-page-enter 480ms var(--ease-out) both; }
  @keyframes app-page-enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .app-loader, .app-loader[data-leaving="1"] { animation: none; }
    .app-page { animation: none; }
    .spin--wm-pop svg path { animation: none; opacity: 1; }
  }

  /* Two-column section ================================================ */
  .twocol { margin-top: clamp(60px, 8vw, 100px); display: grid; grid-template-columns: 1fr; gap: 56px; }
  @media (min-width: 920px) { .twocol { grid-template-columns: 1.4fr 1fr; } }
  .section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-8); }
  .section-head h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.018em; margin: 0; }
  .section-head a { font-size: 13px; color: var(--rk-blue); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

  .release { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid rgba(22,29,54,0.06); cursor: pointer; transition: padding-left var(--dur-2) var(--ease-out); }
  .release:hover { padding-left: 4px; }
  .release:hover .release__title { color: var(--rk-blue); }
  .release__ver { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); white-space: nowrap; min-width: 100px; padding-top: 3px; }
  .release__title { font-size: 14.5px; font-weight: 500; transition: color var(--dur-1) var(--ease-out); }
  .release__date { font-size: 12px; color: var(--text-mute); margin-top: 3px; font-family: var(--font-mono); }
  .release__tag { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    padding: 2px 7px; border-radius: 3px; margin-right: 8px; }
  .release__tag.minor { background: rgba(58,93,192,0.10); color: var(--rk-blue); }
  .release__tag.patch { background: var(--mist-60); color: var(--rk-ink); }

  .adv { display: flex; gap: 12px; padding: 14px 0; align-items: flex-start; border-bottom: 1px solid rgba(22,29,54,0.06); cursor: pointer; }
  .adv__sev { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
    padding: 3px 7px; border-radius: 3px; text-transform: uppercase; flex-shrink: 0; }
  .adv__sev.high { background: rgba(181,75,75,0.14); color: #8c2e2e; }
  .adv__sev.medium { background: rgba(196,149,42,0.16); color: #8a6618; }
  .adv__sev.low { background: var(--mist-60); color: var(--rk-ink); }
  .adv__title { font-size: 13.5px; line-height: 1.45; margin-bottom: 3px; }
  .adv__id { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

  /* Footer ============================================================ */
  .footer { margin-top: clamp(80px, 12vw, 160px); background: var(--paper-2); padding: 80px 0 36px; }
  .footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; }
  @media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
  .footer__col-h { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-mute); margin-bottom: 16px; }
  .footer__l { display: block; padding: 4px 0; font-size: 14px; color: var(--text-soft); cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
  .footer__l:hover { color: var(--rk-blue); }
  .footer__rule { height: 1px; background: var(--ink-8); margin: 48px 0 18px; }
  .footer__legal { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-mute); flex-wrap: wrap; gap: 12px; }

  /* Product overview ================================================== */
  .pview { display: flex; min-height: calc(100vh - 70px); }
  .pview__nav { width: 280px; min-width: 280px; padding: 32px 16px 32px 32px;
    border-right: 1px solid var(--ink-8); overflow-y: auto; }
  .pview__main { flex: 1; padding: 40px 56px 80px; overflow-y: auto; max-width: 960px; }
  .crumb { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px; letter-spacing: 0.04em; }
  .crumb a { color: var(--ink-65); cursor: pointer; transition: color var(--dur-1) var(--ease-out); }
  .crumb a:hover { color: var(--rk-blue); }
  .pview__head { padding-bottom: 32px; border-bottom: 1px solid var(--ink-8); margin-bottom: 36px; }
  .pview__logo { height: 60px; margin-bottom: 20px; }
  .pview__logo img { height: 100%; width: auto; }
  .pview__h { font-family: var(--font-display); font-size: clamp(36px, 4.5vw, 56px); font-weight: 500;
    letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 16px; max-width: 680px; }
  .pview__sub { font-size: 18px; line-height: 1.55; color: var(--text-soft); max-width: 600px; }
  .pview__pills { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
  .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    background: var(--mist-40); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--rk-ink); }
  .pill.mono { font-family: var(--font-mono); }
  .pnav__h { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-mute); padding: 0 12px 8px; }
  .pnav__group { margin-bottom: 18px; }
  .pnav__item { display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-65);
    cursor: pointer; transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); position: relative; }
  .pnav__item::before { content:''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%) scale(0);
    width: 4px; height: 4px; border-radius: 50%; background: var(--rk-blue); transition: transform var(--dur-2) var(--ease-spring); }
  .pnav__item:hover { background: var(--mist-40); color: var(--rk-ink); }
  .pnav__item.active { background: rgba(58,93,192,0.08); color: var(--rk-blue); font-weight: 600; padding-left: 18px; }
  .pnav__item.active::before { transform: translateY(-50%) scale(1); }
  .pnav__item .new-tag { font-family: var(--font-mono); font-size: 9px; padding: 1px 5px; border-radius: 3px;
    background: var(--rk-blue); color: var(--paper); font-weight: 700; letter-spacing: 0.06em; }

  .tasks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
  @media (max-width: 720px) { .tasks { grid-template-columns: 1fr; } }
  .task { padding: 16px 20px; background: var(--paper-2); border-radius: 12px;
    box-shadow: var(--shadow-1); cursor: pointer; display: flex; align-items: center; gap: 14px;
    transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
  .task:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .task:hover .task__arrow { transform: translateX(3px); color: var(--rk-blue); }
  .task__num { font-family: var(--font-mono); font-size: 12px; color: var(--rk-blue); font-weight: 600; }
  .task__body { flex: 1; }
  .task__l { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
  .task__t { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
  .task__arrow { color: var(--text-mute); transition: transform var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }

  .sec-h { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--rk-blue); margin-top: 40px; margin-bottom: 6px; }

  /* Article =========================================================== */
  .art-shell { display: flex; min-height: calc(100vh - 70px); }
  .art-shell__nav { width: 260px; min-width: 260px; padding: 32px 16px 32px 32px; overflow-y: auto;
    border-right: 1px solid var(--ink-8); }
  .art { flex: 1; padding: 40px 56px 80px; max-width: 760px; }
  .art-shell__toc { width: 220px; min-width: 220px; padding: 60px 32px 60px 24px;
    position: sticky; top: 70px; align-self: flex-start; height: calc(100vh - 70px); overflow-y: auto; }
  .art__h { font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 500;
    letter-spacing: -0.028em; line-height: 1.08; margin-bottom: 14px; }
  .art__sub { font-size: 18px; line-height: 1.55; color: var(--text-soft); margin-bottom: 20px; }
  .art__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); display: flex; gap: 18px;
    padding-bottom: 26px; border-bottom: 1px solid var(--ink-8); margin-bottom: 32px; flex-wrap: wrap; }
  .art p { font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
  .art p code { font-family: var(--font-mono); font-size: 13.5px; background: var(--mist-40); padding: 2px 6px;
    border-radius: 4px; color: var(--rk-blue); }
  .art h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.015em;
    margin: 38px 0 14px; padding-top: 24px; border-top: 1px solid rgba(22,29,54,0.06); scroll-margin-top: 90px; }
  .art h2:first-of-type { padding-top: 0; border-top: 0; }
  .art h2 .num { font-family: var(--font-mono); font-size: 12px; color: var(--rk-blue); font-weight: 500; letter-spacing: 0.04em; margin-right: 12px; }
  .art ul { padding-left: 24px; margin-bottom: 16px; }
  .art li { font-size: 16px; line-height: 1.65; margin-bottom: 8px; }
  .steps { list-style: none; padding: 0; counter-reset: step; margin: 18px 0 24px; }
  .steps li { counter-increment: step; position: relative; padding: 16px 0 16px 56px;
    border-bottom: 1px solid rgba(22,29,54,0.06); font-size: 16px; line-height: 1.6; margin: 0; }
  .steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 18px;
    width: 40px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--rk-blue);
    letter-spacing: 0.04em; border-bottom: 2px solid var(--rk-blue); padding-bottom: 2px; }
  .callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--mist-40);
    margin: 20px 0; font-size: 14.5px; line-height: 1.55; color: var(--rk-ink); }
  .callout.warn { background: rgba(196,149,42,0.10); }
  .callout svg { flex-shrink: 0; margin-top: 2px; }
  .codeblock { background: #0e1830; color: #eef1f8; border-radius: 12px; margin: 20px 0; overflow: hidden;
    box-shadow: var(--shadow-2); }
  [data-theme="dark"] .codeblock { background: #1a2542; }
  .codeblock__head { display: flex; justify-content: space-between; padding: 10px 16px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(238,241,248,0.62); }
  .codeblock pre { font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
    padding: 14px 18px 18px; margin: 0; white-space: pre; overflow-x: auto; color: #eef1f8; }
  .tok-c { color: #8a96a6; } .tok-s { color: #c6dfdf; } .tok-f { color: #9ad9b3; }

  .toc__h { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-mute); margin-bottom: 14px; }
  .toc__item { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 14px;
    font-size: 13px; color: var(--ink-65); cursor: pointer; position: relative;
    transition: color var(--dur-1) var(--ease-out); }
  .toc__item::before { content:''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scale(0);
    width: 3px; height: 14px; border-radius: 2px; background: var(--rk-blue); transition: transform var(--dur-2) var(--ease-spring); }
  .toc__item:hover { color: var(--rk-ink); }
  .toc__item.active { color: var(--rk-blue); font-weight: 600; }
  .toc__item.active::before { transform: translateY(-50%) scale(1); }
  .toc__num { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
  .toc__item.active .toc__num { color: var(--rk-blue); }

  .related { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--ink-8); }
  .related__h { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-mute); margin-bottom: 16px; }
  .related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .related__item { padding: 16px 18px; background: var(--paper-2); border-radius: 12px;
    box-shadow: var(--shadow-1); cursor: pointer; display: flex; align-items: center; gap: 14px;
    transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
  .related__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .related__item:hover .related__title { color: var(--rk-blue); }
  .related__title { font-size: 14px; font-weight: 600; transition: color var(--dur-1) var(--ease-out); }
  .related__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
  .helpful { margin-top: 36px; padding: 22px 24px; background: var(--paper-2); border-radius: 16px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: var(--shadow-1); }
  .helpful__q { font-size: 14px; font-weight: 600; }
  .helpful__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
    background: var(--mist-40); font-size: 13px; cursor: pointer; transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
  .helpful__btn:hover { background: var(--rk-blue); color: var(--paper); }
  .helpful__meta { margin-left: auto; font-size: 12px; color: var(--text-mute); }
  .helpful__meta a { color: var(--rk-blue); cursor: pointer; }

  /* Hardware spec ===================================================== */
  .hwspec { max-width: 1080px; margin: 0 auto; padding: 40px 56px 80px; }
  .hwspec__h { font-family: var(--font-display); font-size: clamp(40px, 5vw, 60px); font-weight: 500;
    letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 16px; }
  .hwspec__h em { font-style: italic; font-weight: 300; color: var(--rk-blue); }
  .hwspec__sub { font-size: 18px; line-height: 1.55; color: var(--text-soft); max-width: 680px; margin-bottom: 36px; }
  .picker { padding: 28px; background: var(--paper-2); border-radius: 20px; box-shadow: var(--shadow-1);
    margin-bottom: 24px; }
  .picker__q { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
  .picker__chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .picker__chip { padding: 8px 14px; border-radius: 999px; background: transparent;
    font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-65); cursor: pointer;
    transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); box-shadow: inset 0 0 0 1px var(--ink-12); }
  .picker__chip:hover { box-shadow: inset 0 0 0 1px var(--rk-blue); color: var(--rk-blue); }
  .picker__chip.active { background: var(--rk-ink); color: var(--paper); box-shadow: none; font-weight: 600; }
  .hw-result { padding: 36px; background: #0e1830; color: #eef1f8;
    border-radius: 20px; margin-bottom: 24px; box-shadow: var(--shadow-3); position: relative; overflow: hidden; }
  [data-theme="dark"] .hw-result { background: #1a2542; }
  .hw-result::before { content:''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(58,93,192,0.30), transparent 50%); pointer-events: none; }
  .hw-result__eyebrow { position: relative; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
    text-transform: uppercase; color: #c6dfdf; margin-bottom: 10px; }
  .hw-result__h { position: relative; font-family: var(--font-display); font-size: 32px; font-weight: 600;
    letter-spacing: -0.02em; margin-bottom: 6px; color: #eef1f8; }
  .hw-result__h em { font-style: italic; font-weight: 300; color: #c6dfdf; }
  .hw-result__sub { position: relative; font-size: 14.5px; color: rgba(238,241,248,0.72); margin-bottom: 28px; }
  .hw-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  @media (max-width: 720px) { .hw-grid { grid-template-columns: repeat(2, 1fr); } }
  .hw-cell { padding: 18px 20px; background: rgba(255,255,255,0.07); border-radius: 12px; }
  [data-theme="dark"] .hw-cell { background: rgba(255,255,255,0.06); }
  .hw-cell__l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(238,241,248,0.62); margin-bottom: 8px; }
  .hw-cell__v { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.018em; line-height: 1.1; color: #eef1f8; }
  .hw-cell__u { font-size: 13px; color: rgba(238,241,248,0.62); margin-left: 4px; font-weight: 400; }
  .notes { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 32px; }
  .note { display: flex; gap: 12px; padding: 14px 18px; background: rgba(196,149,42,0.08); border-radius: 12px;
    font-size: 14px; line-height: 1.55; color: var(--text-soft); }
  [data-theme="dark"] .note { background: rgba(196,149,42,0.14); color: var(--ink-65); }
  .note svg { flex-shrink: 0; margin-top: 2px; color: #c4952a; }
  .hwtable { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 20px;
    background: var(--paper-2); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-1); }
  .hwtable th, .hwtable td { font-family: var(--font-mono); font-size: 12px; padding: 12px 14px;
    text-align: right; border-bottom: 1px solid rgba(22,29,54,0.06); }
  .hwtable th { background: var(--mist-40); font-weight: 700; color: var(--text-mute);
    letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }
  .hwtable td:first-child, .hwtable th:first-child { text-align: left; }
  .hwtable td:first-child { font-weight: 600; color: var(--rk-ink); font-family: inherit; }
  .hwtable tr { cursor: pointer; }
  .hwtable tr.active td { background: rgba(58,93,192,0.06); color: var(--rk-ink); }
  .hwtable tr.active td:first-child { color: var(--rk-blue); }

  /* What's new ======================================================== */
  .wn { max-width: 880px; margin: 0 auto; padding: 40px 56px 80px; }
  .wn-hero { padding: 40px 36px; border-radius: 24px; background: #0e1830; color: #eef1f8;
    margin-bottom: 40px; position: relative; overflow: hidden; box-shadow: var(--shadow-3); }
  [data-theme="dark"] .wn-hero { background: #1a2542; }
  .wn-hero::before { content:''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(58,93,192,0.35), transparent 55%); pointer-events: none; }
  .wn-hero__eb { position: relative; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
    color: #c6dfdf; }
  .wn-hero__ver { position: relative; font-family: var(--font-mono); font-size: 14px; color: rgba(238,241,248,0.78); margin: 10px 0 8px; }
  .wn-hero__h { position: relative; font-family: var(--font-display); font-size: 40px; font-weight: 500;
    letter-spacing: -0.028em; line-height: 1.08; margin-bottom: 8px; max-width: 600px; color: #eef1f8; }
  .wn-hero__date { position: relative; font-size: 14px; color: rgba(238,241,248,0.68); }
  .wn-hero__upgrade { position: relative; margin-top: 22px; padding: 14px 18px;
    background: rgba(255,255,255,0.10); border-radius: 12px; font-size: 13.5px; line-height: 1.55;
    display: flex; gap: 12px; align-items: flex-start; color: #eef1f8; }
  .wn-group { margin-bottom: 40px; }
  .wn-group__h { display: flex; align-items: center; gap: 14px; padding-bottom: 14px;
    border-bottom: 1px solid var(--ink-8); margin-bottom: 20px; }
  .wn-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    padding: 4px 10px; border-radius: 4px; text-transform: uppercase; }
  .wn-tag.new { background: rgba(58,93,192,0.10); color: var(--rk-blue); }
  .wn-tag.fix { background: var(--mist-60); color: var(--rk-ink); }
  .wn-tag.break { background: rgba(181,75,75,0.12); color: #8c2e2e; }
  .wn-group__label { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
  .wn-item { padding: 14px 0; border-bottom: 1px solid rgba(22,29,54,0.05); }
  .wn-item:last-child { border-bottom: 0; }
  .wn-item__h { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
  .wn-item__d { font-size: 14.5px; color: var(--text-soft); line-height: 1.55; }

  /* Search overlay ==================================================== */
  .search-bg { position: fixed; inset: 0; background: rgba(22,29,54,0.36);
    backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding-top: 100px;
    animation: fade 200ms var(--ease-out); }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .search-modal { width: 640px; max-width: calc(100vw - 32px); background: var(--paper-2);
    border-radius: 20px; box-shadow: var(--shadow-5); overflow: hidden;
    animation: modalRise 280ms var(--ease-out); }
  @keyframes modalRise { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
  .search-modal__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; }
  .search-modal__head input { flex: 1; background: transparent; border: 0; outline: none; font: inherit;
    font-size: 16px; color: var(--rk-ink); }
  .search-modal__head input::placeholder { color: var(--text-mute); }
  .search-modal__results { max-height: 420px; overflow-y: auto; padding: 4px 0 12px; }
  .search-modal__group { padding: 12px 22px 6px; font-family: var(--font-mono); font-size: 10.5px;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
  .search-modal__item { display: flex; align-items: center; gap: 14px; padding: 10px 22px; cursor: pointer;
    transition: background var(--dur-1) var(--ease-out); }
  .search-modal__item:hover { background: var(--mist-40); }
  .search-modal__icon { width: 32px; height: 32px; border-radius: 10px; background: rgba(58,93,192,0.08);
    color: var(--rk-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .search-modal__title { font-size: 14px; font-weight: 500; }
  .search-modal__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
  .search-modal__foot { display: flex; gap: 18px; padding: 12px 22px; background: var(--mist-40);
    font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
  .search-modal__foot .kbd { background: var(--paper-2); padding: 1px 6px; border-radius: 4px; margin-right: 4px; }

  /* Nested NavTree =============================================== */
  .tnav { padding: 4px 6px 12px; }
  .tnav__group { margin-bottom: 16px; }
  .tnav__group-h { padding: 12px 12px 6px; font-family: var(--font-mono); font-size: 10.5px;
    font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
  .tnav__item { display: flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 8px; font-size: 13px;
    color: var(--ink-65); cursor: pointer; position: relative;
    transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
  .tnav__item:hover { background: var(--ink-5); color: var(--rk-ink); }
  .tnav__item.active { background: rgba(58,93,192,0.10); color: var(--rk-blue); font-weight: 600; }
  [data-theme="dark"] .tnav__item.active { background: rgba(58,93,192,0.20); color: #b3c4ee; }
  .tnav__chev { display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; color: var(--text-mute); flex-shrink: 0;
    transition: transform var(--dur-2) var(--ease-out), color var(--dur-1) var(--ease-out); }
  .tnav__chev.open { transform: rotate(90deg); color: var(--rk-blue); }
  .tnav__item:hover .tnav__chev { color: var(--rk-ink); }
  .tnav__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-12);
    flex-shrink: 0; margin: 0 5px; transition: background var(--dur-1) var(--ease-out); }
  .tnav__item:hover .tnav__dot { background: var(--ink-20); }
  .tnav__item.active .tnav__dot { background: var(--rk-blue); }
  .tnav__l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tnav__tag { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
    padding: 1px 6px; border-radius: 3px; }
  .tnav__tag.new  { background: var(--rk-blue); color: var(--paper); }
  .tnav__tag.emph { background: rgba(196,149,42,0.18); color: #8a6618; }
  /* Visual rule beneath children to show the tree depth */
  .tnav__item.depth-1 { font-weight: 500; }
  .tnav__item.depth-2 { font-size: 12.5px; color: var(--text-soft); }
  .tnav__item.depth-3 { font-size: 12px; color: var(--text-mute); }
  /* Subtle guide-line for children, drawn from the chevron column. */
  .tnav__item.depth-1, .tnav__item.depth-2, .tnav__item.depth-3 { position: relative; }
  .tnav__item.depth-1::before { content:''; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--ink-8) 12%, var(--ink-8) 88%, transparent 100%); }
  .tnav__item.depth-2::before { content:''; position: absolute; left: 32px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--ink-8) 12%, var(--ink-8) 88%, transparent 100%); }
  .tnav__item.depth-3::before { content:''; position: absolute; left: 46px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--ink-8) 12%, var(--ink-8) 88%, transparent 100%); }
  [data-theme="dark"] .tnav__item.depth-1::before,
  [data-theme="dark"] .tnav__item.depth-2::before,
  [data-theme="dark"] .tnav__item.depth-3::before { background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.10) 12%, rgba(255,255,255,0.10) 88%, transparent 100%); }

  /* Admin / Add a guide =========================================== */
  .admin { max-width: 920px; margin: 0 auto; padding: 40px 56px 80px; }
  .admin__hero { padding-bottom: 28px; border-bottom: 1px solid var(--ink-8); margin-bottom: 32px; }
  .admin__h { font-family: var(--font-display); font-size: clamp(36px, 4.5vw, 52px); font-weight: 500;
    letter-spacing: -0.028em; line-height: 1.06; margin-bottom: 12px; }
  .admin__h em { font-style: italic; font-weight: 300; color: var(--rk-blue); }
  .admin__sub { font-size: 17px; line-height: 1.55; color: var(--text-soft); max-width: 580px; }
  .admin__role { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px;
    background: var(--mist-40); color: var(--rk-ink); font-family: var(--font-mono); font-size: 11px;
    font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
  .admin__role::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: var(--rk-blue); }
  .form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
  @media (min-width: 720px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid--3 { grid-template-columns: 2fr 1fr 1fr; } }
  .field { display: flex; flex-direction: column; gap: 6px; }
  .field__l { font-size: 11px; font-weight: 600; letter-spacing: 0.10em;
    text-transform: uppercase; color: var(--text-mute); padding-left: 2px;
    transition: color var(--dur-2) var(--ease-out); }
  .field.focused .field__l { color: var(--rk-blue); }
  .field__c { display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--paper-2); border-radius: 14px;
    box-shadow: inset 0 0 0 1px var(--ink-12);
    transition: box-shadow var(--dur-2) var(--ease-out); }
  .field.focused .field__c { box-shadow: inset 0 0 0 2px var(--rk-blue); }
  .field__c input, .field__c select, .field__c textarea { width: 100%; background: transparent; border: 0;
    outline: none; font: inherit; font-size: 15px; color: var(--rk-ink); appearance: none; line-height: 1.45; }
  .field__c input::placeholder, .field__c textarea::placeholder { color: var(--text-mute); }
  .field__c textarea { resize: vertical; min-height: 80px; }
  .field__hint { padding-left: 4px; font-size: 12px; color: var(--text-mute); }

  .blocks-editor { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
  .block-item { padding: 16px 18px; background: var(--paper-2); border-radius: 14px;
    box-shadow: var(--shadow-1); transition: box-shadow var(--dur-2) var(--ease-out); }
  .block-item:hover { box-shadow: var(--shadow-2); }
  .block-item__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .block-item__type { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; padding: 4px 9px; border-radius: 4px;
    background: rgba(58,93,192,0.10); color: var(--rk-blue); }
  .block-item__type.callout { background: rgba(196,149,42,0.16); color: #8a6618; }
  .block-item__type.code    { background: rgba(22,29,54,0.10); color: var(--rk-ink); }
  [data-theme="dark"] .block-item__type.code { background: rgba(238,241,248,0.10); color: var(--rk-ink); }
  .block-item__num { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
  .block-item__del { margin-left: auto; }
  .block-item__del:hover { color: #b54b4b; }
  .block-item textarea, .block-item input { width: 100%; background: transparent; border: 0; outline: none;
    font: inherit; font-size: 15px; color: var(--rk-ink); line-height: 1.55; resize: vertical; }
  .block-item .step-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0;
    border-bottom: 1px solid rgba(22,29,54,0.06); }
  .block-item .step-row:last-child { border-bottom: 0; }
  .block-item .step-row__n { font-family: var(--font-mono); font-size: 12px; color: var(--rk-blue); font-weight: 600; min-width: 24px; padding-top: 6px; }
  .block-item .step-row button.ghost-x { color: var(--text-mute); padding: 4px; }
  .block-item .step-row button.ghost-x:hover { color: #b54b4b; }
  .block-item__code { font-family: var(--font-mono); font-size: 13px; padding: 12px 14px;
    background: var(--rk-ink); color: var(--paper); border-radius: 10px;
    min-height: 140px; }
  .block-item__code textarea { color: var(--paper); font-family: inherit; }

  .add-block-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
  .add-block-bar button { padding: 8px 14px; border-radius: 999px; font-family: var(--font-mono);
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
    background: var(--mist-40); color: var(--rk-ink); cursor: pointer;
    transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
  .add-block-bar button:hover { background: var(--mist-60); transform: translateY(-1px); }

  .admin__actions { display: flex; gap: 12px; align-items: center; margin-top: 36px; padding-top: 24px;
    border-top: 1px solid var(--ink-8); }
  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out),
                box-shadow var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
  .btn--primary { background: var(--rk-blue); color: var(--paper);
    box-shadow: 0 16px 40px rgba(58,93,192,0.28); }
  .btn--primary:hover { background: #2e4ba1; transform: translateY(-1px); box-shadow: 0 28px 80px rgba(58,93,192,0.42); }
  .btn--ghost { color: var(--rk-ink); }
  .btn--ghost:hover { background: var(--ink-5); }

  /* Toast */
  .toast { position: fixed; bottom: 28px; right: 28px; z-index: 300;
    padding: 14px 20px; background: var(--rk-ink); color: var(--paper);
    border-radius: 999px; font-size: 14px; font-weight: 500; max-width: 380px;
    box-shadow: var(--shadow-4); display: inline-flex; align-items: center; gap: 10px;
    animation: toastIn 280ms var(--ease-out); }
  .toast--success { background: #14563a; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

  /* Section: your guides on product view */
  .user-guide-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
  @media (min-width: 720px) { .user-guide-list { grid-template-columns: 1fr 1fr; } }
  .user-guide { padding: 16px 18px; background: var(--paper-2); border-radius: 14px; box-shadow: var(--shadow-1);
    cursor: pointer; transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
    display: flex; align-items: center; gap: 14px; position: relative; }
  .user-guide:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .user-guide:hover .user-guide__title { color: var(--rk-blue); }
  .user-guide__badge { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.10em;
    padding: 2px 7px; border-radius: 3px; background: rgba(58,93,192,0.10); color: var(--rk-blue); text-transform: uppercase; }
  .user-guide__title { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; transition: color var(--dur-2) var(--ease-out); }
  .user-guide__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
  .user-guide__del { color: var(--text-mute); cursor: pointer; padding: 6px; border-radius: 8px;
    transition: color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
  .user-guide__del:hover { color: #b54b4b; background: rgba(181,75,75,0.10); }

  /* ================================================================
     Responsive nav — burger button + mobile drawer
     ================================================================ */
  .nav__burger { display: none; margin-left: auto;
    width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
    padding: 8px; position: relative; border-radius: 10px;
    transition: background var(--dur-2) var(--ease-out); }
  .nav__burger:hover { background: var(--ink-5); }
  .nav__burger:focus-visible { outline: 2px solid var(--rk-blue); outline-offset: 2px; }
  .nav__burger-line { display: block; width: 22px; height: 2px; background: var(--rk-ink);
    border-radius: 2px; margin: 4px auto; transform-origin: center;
    transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
  .nav__burger.is-open .nav__burger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__burger.is-open .nav__burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav__burger.is-open .nav__burger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-mobile { position: fixed; inset: 0; z-index: 200;
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3); }
  .nav-mobile.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
  .nav-mobile__backdrop { position: absolute; inset: 0;
    background: rgba(22,29,54,0.48); backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px); }
  .nav-mobile__panel { position: absolute; top: 0; right: 0; bottom: 0;
    width: min(360px, 100%); background: var(--rk-paper);
    display: flex; flex-direction: column; gap: 20px;
    padding: clamp(20px, 6vw, 32px); padding-top: clamp(80px, 18vw, 96px);
    box-shadow: -16px 0 48px rgba(22,29,54,0.18);
    transform: translateX(100%); transition: transform var(--dur-3) cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto; }
  .nav-mobile.is-open .nav-mobile__panel { transform: translateX(0); }
  .nav-mobile__head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px;
    border-bottom: 1px solid var(--ink-8); }
  .nav-mobile__eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
    color: var(--rk-blue); font-weight: 600; }
  .nav-mobile__title { font-family: var(--font-display); font-size: clamp(22px, 6vw, 28px);
    font-weight: 600; letter-spacing: -0.018em; color: var(--rk-ink); line-height: 1.15; }
  .nav-mobile__search { display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--paper-2); border-radius: 12px;
    color: var(--ink-65); font-size: 14px; width: 100%; cursor: pointer; text-align: left;
    transition: background var(--dur-2) var(--ease-out); }
  .nav-mobile__search:hover { background: var(--mist-40); color: var(--rk-ink); }
  .nav-mobile__search .nav__kbd { margin-left: auto; }
  .nav-mobile__nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-mobile__link { display: flex; align-items: center; gap: 16px;
    padding: 14px 12px; border-radius: 10px; background: transparent;
    color: var(--rk-ink); font-size: 16px; font-weight: 500;
    text-align: left; width: 100%; cursor: pointer;
    opacity: 0; transform: translateX(12px);
    transition: opacity 320ms var(--ease-out) calc(var(--i, 0) * 40ms + 120ms),
      transform 320ms var(--ease-out) calc(var(--i, 0) * 40ms + 120ms),
      background var(--dur-2) var(--ease-out); }
  .nav-mobile.is-open .nav-mobile__link { opacity: 1; transform: translateX(0); }
  .nav-mobile__link:hover { background: var(--ink-5); }
  .nav-mobile__link.is-active { background: rgba(58,93,192,0.08); color: var(--rk-blue); }
  .nav-mobile__link.is-active .nav-mobile__link-num { color: var(--rk-blue); }
  .nav-mobile__link-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute);
    letter-spacing: 0.05em; font-weight: 600; min-width: 24px; }
  .nav-mobile__link-label { flex: 1; }
  .nav-mobile__link svg { color: var(--text-mute); transition: transform var(--dur-2) var(--ease-out); }
  .nav-mobile__link:hover svg { transform: translateX(4px); color: var(--rk-ink); }
  .nav-mobile__tools { display: flex; gap: 10px; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid var(--ink-8); }
  .nav-mobile__foot { margin-top: auto; padding-top: 16px;
    border-top: 1px solid var(--ink-8); }
  .nav-mobile__cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px 20px; border-radius: 999px;
    background: var(--rk-blue); color: var(--paper);
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
  .nav-mobile__cta:hover { background: #2e4ba1; transform: translateY(-1px); }

  @media (prefers-reduced-motion: reduce) {
    .nav-mobile__panel, .nav-mobile__link, .nav__burger-line { transition-duration: 0.01ms !important; }
  }

  /* ================================================================
     Nav mobile breakpoint — ≤ 960px
     ================================================================ */
  @media (max-width: 960px) {
    .nav__inner { padding: 12px 18px; gap: 14px; }
    .nav__brand-tag { display: none; }
    .nav__links { display: none; }
    .nav__search { min-width: 0; padding: 9px 12px; }
    .nav__search-label, .nav__kbd { display: none; }
    .nav__lang, .nav__theme, .nav__add, .nav__ver-picker { display: none; }
    .nav__burger { display: block; }
    main { padding-top: 60px; }
  }
  @media (max-width: 480px) {
    .nav__inner { padding: 10px 14px; }
  }

  /* ================================================================
     Section-level mobile fixes
     ================================================================ */

  /* Hero — already uses clamp() so just tighten container padding */
  @media (max-width: 720px) {
    .container, .container-wide, .container-art { padding: 0 20px; }
    .hero { padding: clamp(60px, 12vw, 100px) 0 clamp(36px, 6vw, 56px); }
    .hero__trending { margin-top: 24px; }
    .cat__head { flex-wrap: wrap; gap: 8px; }
    .cat__tag { width: 100%; order: 3; flex-basis: 100%; }
  }
  @media (max-width: 480px) {
    .container, .container-wide, .container-art { padding: 0 16px; }
  }

  /* Footer — collapse to single column at very narrow */
  @media (max-width: 480px) {
    .footer { padding: 56px 0 28px; }
    .footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .footer__legal { flex-direction: column; gap: 6px; align-items: flex-start; }
  }

  /* Product overview — stack sidebar above main */
  @media (max-width: 960px) {
    .pview { flex-direction: column; min-height: 0; }
    .pview__nav { width: 100%; min-width: 0; padding: 20px 20px 8px;
      border-right: 0; border-bottom: 1px solid var(--ink-8);
      max-height: 280px; }
    .pview__main { padding: 28px 20px 56px; max-width: none; }
    .pview__head { padding-bottom: 20px; margin-bottom: 24px; }
    .pview__logo { height: 44px; margin-bottom: 14px; }
  }

  /* Article view — stack 3 columns to 1 */
  @media (max-width: 960px) {
    .art-shell { flex-direction: column; min-height: 0; }
    .art-shell__nav { width: 100%; min-width: 0; padding: 20px 20px 8px;
      border-right: 0; border-bottom: 1px solid var(--ink-8);
      max-height: 240px; }
    .art-shell__toc { display: none; }
    .art { padding: 28px 20px 56px; max-width: none; }
    .art__h { margin-bottom: 12px; }
    .art h2 { font-size: 20px; margin: 28px 0 10px; }
    .art p, .art li { font-size: 15.5px; }
  }

  /* Tasks/related — already 1 col @720, but extra polish */
  @media (max-width: 720px) {
    .related__grid { grid-template-columns: 1fr; }
  }

  /* Hardware spec — narrow padding and 1-col grid */
  @media (max-width: 720px) {
    .hwspec { padding: 32px 20px 56px; }
    .hw-result { padding: 24px 22px; }
    .hw-result__h { font-size: clamp(22px, 6vw, 32px); }
    .hw-grid { grid-template-columns: 1fr; gap: 10px; }
    .hwtable { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  }

  /* What's new — narrow padding and clamp the title */
  @media (max-width: 720px) {
    .wn { padding: 32px 20px 56px; }
    .wn-hero { padding: 28px 24px; border-radius: 18px; }
    .wn-hero__h { font-size: clamp(24px, 7vw, 40px); }
    .wn-group__h { flex-wrap: wrap; gap: 8px; }
    .wn-group__label { font-size: 17px; }
  }

  /* Admin / Add a guide */
  @media (max-width: 720px) {
    .admin { padding: 28px 20px 56px; }
    .admin__hero { padding-bottom: 20px; margin-bottom: 24px; }
    .admin__actions { flex-direction: column; align-items: stretch; }
    .admin__actions .btn { width: 100%; justify-content: center; }
    .add-block-bar { gap: 6px; }
    .add-block-bar button { padding: 7px 12px; font-size: 11px; }
  }

  /* Search modal — fit within mobile viewport */
  @media (max-width: 560px) {
    .search-bg { padding-top: 40px; padding-left: 12px; padding-right: 12px; align-items: flex-start; }
    .search-modal { width: 100%; max-width: 100%; }
    .search-modal__foot { flex-wrap: wrap; gap: 8px 14px; }
  }

  /* Two-column section (release notes/advisories on home) */
  @media (max-width: 920px) {
    .twocol { gap: 36px; }
  }
  @media (max-width: 560px) {
    .release { gap: 12px; }
    .release__ver { min-width: 78px; }
  }

  /* Hide back-chip overlap with mobile menu (small screens) */
  @media (max-width: 480px) {
    .footer__rule { margin: 32px 0 16px; }
  }

