  :root { --ink:#0f172a; --muted:#64748b; --line:#334155; --accent:#036C70; --accent-soft:color-mix(in srgb, var(--accent) 10%, #fff); --accent-ring:color-mix(in srgb, var(--accent) 40%, #fff); }
  * { box-sizing: border-box; }
  body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color:#1e293b; background:#eef2f7; }
  h2,h3,h4,p,ul { margin:0; padding:0; }
  ul { list-style:none; }
  button { font-family:inherit; cursor:pointer; }
  #app { display:flex; flex-direction:column; height:100vh; height:100dvh; background:#f8fafc; }
  #app.cards-view { height:auto; min-height:100vh; }
  #app.cards-view main { flex:none; }
  #app.cards-view #list-view { position:static; overflow:visible; }
  #app.cards-view .about-cue { position:fixed; }
  .about-cue.hidden { display:none; }
  /* Expand/Collapse/Reset view only act on the tree */
  #app.cards-view .toolbar-left .btn, #app.cards-view .zoom-hint { display:none; }
  .jump-wrap { display:none; }

  header { background:#fff; border-bottom:1px solid #e2e8f0; display:flex; flex-direction:column; z-index:20; }
  .row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
  /* search leads the toolbar; the tree-only buttons sit at the far right */
  .search-group { flex:1 1 180px; max-width:360px; min-width:135px; order:-2; } /* shrinks so the tree buttons stay on the first row */
  .seg { order:-1; }
  .toolbar-left { margin-left:auto; }
    .toolbar-hint { margin-left:8px; padding-left:10px; border-left:1px solid #cbd5e1; color:var(--muted); font-size:13px; white-space:nowrap; }
  .toolbar-hint kbd { font:600 11px/1 inherit; font-family:inherit; padding:2px 6px; border:1px solid #cbd5e1; border-bottom-width:2px; border-radius:4px; background:#f8fafc; color:#475569; }
  .search { position:relative; width:100%; }
  .search svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:#94a3b8; }
  .search input { width:100%; height:36px; border:1px solid #cbd5e1; border-radius:8px; background:#f8fafc; padding:0 34px; font-size:14px; outline:none; color:#1e293b; transition:border-color .15s,box-shadow .15s,background .15s; }
  .search input:hover { border-color:#94a3b8; background:#fff; }
  .search input:focus { border-color:var(--accent-ring); background:#fff; box-shadow:0 0 0 3px var(--accent-soft); }
  #clear-search { position:absolute; right:7px; top:50%; transform:translateY(-50%); border:0; background:none; color:#94a3b8; font-size:16px; display:none; }
  #clear-search:hover { color:#334155; }
  .search-kbd { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:11px; font-weight:600; line-height:1; padding:3px 7px; border:1px solid #cbd5e1; border-bottom-width:2px; border-radius:4px; background:#fff; color:#64748b; pointer-events:none; }
  .search input:focus ~ .search-kbd, .search input:not(:placeholder-shown) ~ .search-kbd { display:none; }
  #clear-search:focus-visible { outline:2px solid var(--accent-ring); outline-offset:1px; border-radius:4px; }
  .btn { background:#fff; border:1px solid #cbd5e1; color:#475569; padding:6px 12px; border-radius:7px; font-size:13px; font-weight:700; }
  .btn-icon { vertical-align:-2px; margin-right:5px; }
  .btn:hover { background:#f1f5f9; }
  .btn.primary { color:var(--accent); border-color:var(--accent-ring); }
  .btn.primary:hover { background:var(--accent-soft); }
  .toolbar-row { padding:8px 20px; }
  .toolbar-left { display:flex; flex-wrap:nowrap; gap:8px; align-items:center; }
  .seg { display:flex; background:#e2e8f0; border:1px solid #cbd5e1; border-radius:8px; padding:2px; gap:2px; }
  .seg button { border:0; background:transparent; color:#475569; padding:5px 14px; border-radius:6px; font-size:13px; font-weight:600; }
  .seg button.active { background:#fff; color:var(--accent); font-weight:700; box-shadow:0 2px 4px rgba(0,0,0,.08); }
  #status { font-size:13px; color:var(--muted); }

  html { scroll-behavior:smooth; }
  main { position:relative; flex:1; min-height:0; }
  .about-cue { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); z-index:25; padding:6px 14px; border:1px solid var(--accent-ring); border-radius:999px; background:rgba(255,255,255,.92); color:var(--accent); font-size:12.5px; font-weight:700; text-decoration:none; box-shadow:0 4px 10px rgba(15,23,42,.12); }
  .about-cue:hover { background:var(--accent-soft); }
  .about-cue:focus-visible { outline:3px solid var(--accent-ring); outline-offset:2px; }
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .seo-content { padding:48px 24px; background:#fff; border-top:1px solid #e2e8f0; }
  .seo-inner { max-width:900px; margin:0 auto; }
  .seo-content h2 { margin-bottom:12px; color:var(--ink); font-size:26px; font-weight:800; }
  .seo-content h3 { margin:28px 0 10px; color:var(--ink); font-size:19px; font-weight:700; }
  .seo-content p { margin:0 0 12px; color:#475569; font-size:15px; line-height:1.7; }
  .seo-content code { color:var(--accent); background:var(--accent-soft); padding:2px 5px; border-radius:4px; }
  .seo-browse, .seo-faq details { border:1px solid #e2e8f0; border-radius:8px; margin:10px 0; }
  .seo-browse { border-color:#a6dfe1; background:#eef8f8; }
  .seo-browse summary, .seo-faq summary { padding:12px 16px; color:var(--ink); font-weight:700; cursor:pointer; }
  .seo-browse[open] { padding:0; background:#eef8f8; }
  .seo-browse[open] summary { border-bottom:1px solid #a6dfe1; background:#eef8f8; }
  .seo-browse-content { padding:1px 16px 16px; border-radius:0 0 7px 7px; background:#fff; }
  .seo-browse h3 { margin:20px 0 6px; font-size:16px; }
  .seo-browse p { margin-bottom:8px; font-size:14px; }
  .seo-browse ul { padding-left:20px; list-style:disc; }
  .seo-browse li { margin:6px 0; color:#475569; font-size:14px; line-height:1.6; }
  .seo-browse a, .seo-more-tools a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
  .seo-faq details { border-color:#a6dfe1; background:#eef8f8; }
  .seo-faq summary { background:#eef8f8; }
  .seo-faq details[open] { background:#eef8f8; }
  .seo-faq details[open] summary { border-bottom:1px solid #a6dfe1; }
  .seo-faq-content { padding:1px 16px 14px; border-radius:0 0 7px 7px; background:#fff; }
  .seo-faq details p { margin:0; }
  .seo-more-tools { margin-top:28px !important; }
  #tree-view, #list-view { position:absolute; inset:0; }
  #tree-view { overflow:auto; cursor:grab; user-select:none; background-image:radial-gradient(#cbd5e1 1.2px, transparent 1.2px); background-size:24px 24px; }
  #tree-view { scrollbar-width:none; }
  #tree-view::-webkit-scrollbar { display:none; }
  #tree-view.dragging { cursor:grabbing; }
  #sizer { position:relative; }
  #canvas { position:absolute; left:0; top:0; transform-origin:0 0; padding:60px; width:max-content; }
  #connections { position:absolute; left:0; top:0; pointer-events:none; overflow:visible; }
  .connector { fill:none; stroke:#94a3b8; stroke-width:3; stroke-linejoin:round; }
  .connector.branch { stroke-opacity:.7; }
  #nodes { position:relative; display:flex; align-items:center; gap:90px; }
  .cats { display:flex; flex-direction:column; gap:20px; }
  .cat-row { display:flex; align-items:center; gap:90px; }
  .children { display:flex; flex-direction:column; gap:12px; }

  .node { background:#fff; border:2px solid #cbd5e1; border-radius:14px; }
  .root { display:flex; align-items:center; gap:16px; padding:20px 24px; width:388px; background:#036C70; border-color:#025a5e; cursor:pointer; position:relative; }
  .root h2, .root p { color:#fff; }
  .root h2 { font-size:20px; font-weight:800; }
  .root p { font-size:13px; opacity:.9; }
  .root .badge { background:rgba(255,255,255,.2); border:1.5px solid rgba(255,255,255,.6); }
  /* Root chevron: down while closed, flips up while open (like the category counts). */
  .root-chev { display:flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; margin-left:auto; border-radius:8px; background:rgba(255,255,255,.18); color:#fff; }
  .root-chev svg { width:18px; height:18px; transition:transform .2s; }
  .root.open .root-chev svg { transform:rotate(180deg); }
  .root:focus-visible { outline:3px solid #37c6d0; outline-offset:3px; }
  /* same lift as the category cards, so the root also reads as clickable */
  .root { transition:box-shadow .2s, transform .2s; }
  .root:hover { background:#038387; box-shadow:0 8px 20px -6px rgba(3,108,112,.45); transform:translateY(-1px); }
  .root:hover .root-chev { background:rgba(255,255,255,.28); }
  .badge { width:50px; height:50px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:22px; }
  .cat { display:flex; align-items:center; gap:14px; width:400px; padding:10px 14px; cursor:pointer; position:relative; transition:box-shadow .2s, transform .2s; }
  .cat:hover { box-shadow:0 8px 20px -6px rgba(0,0,0,.2); transform:translateY(-1px); z-index:5; }
  /* hover also tints the group and rings it in its category colour (--c, set by app.js), so it is clear which one the pointer is on */
  .cat { transition:box-shadow .2s, transform .2s, background-color .2s; }
  .cat:hover { background:color-mix(in srgb, var(--c) 7%, #fff); box-shadow:0 0 0 2px var(--c), 0 8px 20px -6px rgba(0,0,0,.2); }
  .cat .txt { flex:1; min-width:0; }
  .cat h3 { font-size:17px; font-weight:700; color:var(--ink); }
  /* the tree is a map: category descriptions show as a tooltip here and in full in Cards view */
  .cat p { display:none; }
  .cat .badge { width:40px; height:40px; border-radius:10px; font-size:18px; }
  .count { display:flex; align-items:center; gap:6px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; font-weight:700; color:#475569; }
  .count svg { width:14px; height:14px; transition:transform .2s; }
  .cat.open .count svg { transform:rotate(180deg); }
  .fn { display:flex; align-items:center; width:450px; min-height:62px; padding:10px 16px 10px 18px; cursor:pointer; border-radius:10px; border-width:1px; position:relative; overflow:hidden; text-align:left; transition:box-shadow .2s, transform .2s; animation:scaleIn .35s cubic-bezier(.175,.885,.32,1.275) both; }
  .fn::before { content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--c); }
  .fn:hover { box-shadow:0 8px 20px -6px rgba(0,0,0,.2); transform:translateX(3px); }
  /* the shadow alone is easy to miss, so the hovered card also takes a tint and border of its category colour */
  .fn { transition:box-shadow .2s, transform .2s, background-color .2s, border-color .2s; }
  .fn:hover { background:color-mix(in srgb, var(--c) 7%, #fff); border-color:color-mix(in srgb, var(--c) 60%, #cbd5e1); }
  .fn:hover svg { color:var(--c); }
  .fn .txt { flex:1; min-width:0; }
  .fn h4 { font-size:17px; font-weight:600; color:var(--ink); }
  .fn p { font-size:12.5px; color:#334155; margin-top:2px; line-height:1.3; }
  .fn svg { width:18px; height:18px; color:#94a3b8; flex-shrink:0; margin-left:10px; }
  .fn.hit { box-shadow:0 0 0 3px #fde68a; }
  .fn.spot { box-shadow:0 0 0 4px #f59e0b, 0 8px 24px -6px rgba(245,158,11,.6); }
  mark { background:#fde68a; color:inherit; border-radius:3px; }
  @keyframes scaleIn { from { transform:scale(.85); opacity:0; } to { transform:scale(1); opacity:1; } }
  .tip { position:absolute; left:50%; top:100%; transform:translateX(-50%); margin-top:8px; background:#025a5e; color:#fff; padding:8px 14px; border-radius:8px; font-size:13px; font-weight:600; white-space:nowrap; opacity:0; visibility:hidden; transition:opacity .2s; pointer-events:none; z-index:50; }
  .cat:hover .tip, .root:hover .tip { opacity:1; visibility:visible; transition-delay:.3s; }

  #controls { position:absolute; top:20px; right:24px; z-index:30; display:flex; flex-direction:column; gap:4px; background:#fff; padding:6px; border-radius:8px; border:1px solid #cbd5e1; box-shadow:0 10px 15px -3px rgba(0,0,0,.1); }
  #controls button { border:0; background:#fff; width:36px; height:36px; border-radius:6px; font-size:20px; font-weight:700; color:#475569; }
  #controls button:hover { background:#f1f5f9; color:var(--ink); }
  #controls #zoom-level { text-align:center; font-size:12px; font-weight:700; color:#475569; padding:4px 0; }
  #controls button:focus-visible { outline:3px solid var(--accent-ring); outline-offset:1px; }
  #controls hr { border:0; border-top:1px solid #e2e8f0; width:100%; margin:2px 0; }

  #list-view { display:none; overflow-y:auto; padding:32px; }
  .list-cat { max-width:1300px; margin:0 auto 36px; }
  .list-cat > header { all:unset; display:flex; align-items:center; gap:14px; margin-bottom:16px; }
  .list-cat h3 { font-size:20px; font-weight:800; color:var(--ink); }
  .list-cat .d { font-size:14px; color:var(--muted); }
  .grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }
  .grid .fn { width:auto; }
  .empty { text-align:center; color:var(--muted); padding:48px 24px; margin:40px auto; max-width:560px; font-size:16px; border:2px dashed #cbd5e1; border-radius:20px; background:rgba(255,255,255,.55); }
  .empty-ico { width:56px; height:56px; color:#64748b; margin:0 auto 14px; display:block; }
  .empty p { font-weight:700; font-size:22px; color:var(--ink); margin:0; }
  .suggestions { margin-top:10px; }
  .suggestions button { border:0; padding:0; background:none; color:var(--accent); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }

  #drawer { position:fixed; inset:0; z-index:100; display:none; }
  /* Only the drawer body scrolls while it is open, not the page behind it */
  html:has(#drawer.show) { overflow:hidden; }
  #backdrop { position:absolute; inset:0; background:rgba(15,23,42,.55); opacity:0; transition:opacity .3s; }
  #panel { position:absolute; top:0; bottom:0; right:0; width:100%; max-width:560px; background:#fff; box-shadow:-10px 0 25px -5px rgba(0,0,0,.15); transform:translateX(100%); transition:transform .3s cubic-bezier(.16,1,.3,1); display:flex; flex-direction:column; }
  #drawer.show #backdrop { opacity:1; }
  #drawer.show #panel { transform:none; }
  #panel .body { flex:1; overflow-y:auto; padding:40px; position:relative; }
  #close { position:absolute; top:20px; right:20px; width:40px; height:40px; border:0; border-radius:50%; background:#f1f5f9; color:#64748b; font-size:20px; }
    #share { position:absolute; top:20px; right:72px; width:40px; height:40px; border:0; border-radius:50%; background:transparent; color:#64748b; display:flex; align-items:center; justify-content:center; cursor:pointer; }
    #share:hover { background:#f1f5f9; color:#334155; }
    #share:focus-visible { outline:3px solid var(--accent-ring); outline-offset:2px; }
    #share::after { content:attr(data-tip); position:absolute; top:46px; right:0; white-space:nowrap; background:#0f172a; color:#fff; font-size:12px; font-weight:600; padding:6px 10px; border-radius:6px; opacity:0; pointer-events:none; transition:opacity .15s; z-index:5; }
    #share:hover::after, #share:focus-visible::after { opacity:1; }
    #link-toast { position:absolute; bottom:92px; right:calc(min(100vw, 560px) / 2); transform:translate(50%,12px); max-width:calc(100vw - 40px); font-size:14px; font-weight:700; color:#fff; background:#047857; border-radius:999px; padding:10px 18px; box-shadow:0 8px 20px rgba(0,0,0,.25); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:10; }
    #link-toast.show { opacity:1; transform:translate(50%,0); }
    #link-toast.err { background:#b91c1c; }
    #share .ico-done { display:none; }
    #share.done { background:#d1fae5; color:#047857; }
    #share.done .ico-share { display:none; }
    #share.done .ico-done { display:inline; }
    #share.done::after { opacity:0; }
    .d-head { display:flex; gap:14px; align-items:flex-start; margin-bottom:28px; }
  .d-ico { width:56px; height:56px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:22px; }
  .d-title { flex:1; min-width:0; }
  .d-title > .chip { max-width:calc(100% - 100px); }
  .d-title h2 { overflow-wrap:anywhere; }
  .chip { display:inline-block; max-width:100%; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:999px; padding:4px 12px; font-size:11px; font-weight:800; letter-spacing:.05em; color:#475569; text-transform:uppercase; }
  .d-head h2 { font-size:26px; font-weight:800; color:var(--ink); margin-top:8px; font-family:Consolas,Menlo,monospace; }
  .box { border-radius:12px; padding:18px 20px; margin-bottom:24px; border:1px solid #e2e8f0; border-left-width:5px; }
  .box .lbl { font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; margin-bottom:8px; }
  /* --c is the open formula's letter colour, set on #drawer-content by app.js; --c-text is a shade of it that stays readable as text */
  #drawer-content { --c-text:color-mix(in srgb, var(--c, var(--accent)) 55%, var(--ink)); }
  .obj { background:color-mix(in srgb, var(--c, var(--accent)) 12%, #fff); border-color:color-mix(in srgb, var(--c, var(--accent)) 35%, #fff); border-left-color:var(--c, var(--accent)); }
  .obj .lbl { color:var(--c-text); }
  .obj p { font-size:16px; font-weight:500; color:var(--ink); }
  .ex { background:#fffbeb; border-color:#fde68a; border-left-color:#f59e0b; }
  .ex .lbl { color:#92400e; }
  .ex pre { margin:0; font-family:Consolas,Menlo,monospace; font-size:14px; line-height:1.55; color:var(--ink); white-space:pre-wrap; word-break:break-word; }
  .ex .t-fn { color:var(--accent); font-weight:700; }
  .ex .t-str { color:#047857; }
  .ex .t-num { color:#b45309; }
  .ex .t-com { color:#64748b; font-style:italic; }
  #copy-example { margin-top:12px; border:1px solid #fcd34d; border-radius:6px; background:#fff; color:#92400e; padding:6px 10px; font-size:12px; font-weight:700; }
  #copy-example:hover { background:#fef3c7; }
  .impl h4 { color:var(--ink); font-size:16px; font-weight:700; margin-bottom:12px; }
  .impl li { display:flex; gap:12px; align-items:flex-start; border:1px solid #e2e8f0; border-radius:10px; padding:14px 16px; margin-bottom:10px; font-size:14px; color:#334155; }
  .impl li::before { content:""; flex-shrink:0; width:18px; height:18px; margin-top:1px; background:var(--c, var(--accent)); -webkit-mask:center/contain no-repeat; mask:center/contain no-repeat; }
  .impl li.k-in::before { background:var(--c, var(--accent)); -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E"); }
  .impl li.k-out::before { background:var(--c, var(--accent)); -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 6l-6 6 6 6'/%3E%3C/svg%3E"); }
  .impl li.k-info::before { width:8px; height:8px; margin:6px 5px 0; border-radius:50%; -webkit-mask:none; mask:none; }
  .learn-link { display:inline-block; margin-top:4px; color:var(--c-text); font-size:12.5px; font-weight:400; text-decoration:none; }
  .learn-link:hover { text-decoration:underline; color:#025a5e; }
  .foot { background:#f8fafc; border-top:1px solid #e2e8f0; display:flex; align-items:center; justify-content:flex-end; padding:12px 24px; font-size:14px; }
  .foot-pager { display:flex; align-items:center; gap:10px; }
  .foot-title { min-width:72px; color:#475569; font-size:13px; font-weight:600; text-align:center; white-space:nowrap; }
  .drawer-nav { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#334155; font:inherit; font-weight:700; cursor:pointer; }
  .drawer-nav:hover:not(:disabled) { background:#f1f5f9; }
  .drawer-nav:disabled { border-color:#e2e8f0; background:#f8fafc; color:#94a3b8; cursor:not-allowed; }
  .drawer-nav:focus-visible, #close:focus-visible, #copy-example:focus-visible, .suggestions button:focus-visible { outline:3px solid var(--accent-ring); outline-offset:2px; }

  /* drop the zoom hint so search, view toggle and tree buttons stay on one row */
  @media (max-width:1250px) {
    .zoom-hint { display:none; }
  }

  @media (min-width:701px) and (max-width:1100px) {
    .toolbar-row { padding:4px 16px 6px; }
  }

  @media (max-width:700px) {
    .toolbar-row { padding:6px 14px 8px; }
    .zoom-hint, .search-kbd { display:none; }
    .search-group { flex:1 0 100%; max-width:none; min-width:0; margin-left:0; order:-1; }
    .toolbar-row { gap:6px; }
    .toolbar-left { gap:6px; }
    .toolbar-left .btn { padding:6px 8px; font-size:12px; }
    .seg button { padding:5px 10px; font-size:12px; }
    #list-view { padding:20px 14px; }
    .grid { grid-template-columns:1fr; }
    #panel .body { padding:28px 20px; }
    .seo-content { padding:32px 16px; }
    .seo-content h2 { font-size:22px; }
    .foot { padding:10px 16px; }
    .foot-pager { flex:1; justify-content:space-between; gap:6px; }
    .foot-title { min-width:0; }
    .drawer-nav { padding:0 12px; }

    /* toolbar: search + Tree/Cards on one row; status row only when it has something to say */
    .search-group { flex:1 1 0; max-width:none; order:-2; }
    .seg { order:-1; }
    /* Categories / A-Z gets its own full-width row under search */
    .seg.group-seg { order:0; flex:1 0 100%; }
    .group-seg button { flex:1; }
    .toolbar-left { flex:1 0 100%; }
    #app.cards-view .toolbar-left:not(:has(#status:not(:empty))) { display:none; }

    /* compact cards: one-line description, slim group headers */
    #list-view { padding:12px 14px; }
    .list-cat { margin-bottom:20px; }
    .list-cat > header { gap:10px; margin-bottom:8px; }
    .list-cat .badge { width:32px; height:32px; border-radius:8px; font-size:15px; }
    .list-cat h3 { font-size:16px; }
    .list-cat h3 + .d { display:none; }
    .grid { gap:8px; }
    .grid .fn { min-height:0; padding:8px 10px 8px 16px; }
    .grid .fn::before { width:4px; }
    .grid .fn h4 { font-size:15px; }
    .grid .fn p { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .grid .fn svg { width:16px; height:16px; }

    /* only the toolbar and jump bar stay pinned; the title band scrolls away (--hero-h / --pinned-h set by app.js) */
    #app.cards-view > header { position:sticky; top:calc(-1 * var(--hero-h, 0px)); }
    #app.cards-view .jump-wrap { display:flex; align-items:center; gap:6px; padding:0 14px 8px; }
    .jump-track { position:relative; flex:1; min-width:0; }
    /* Categories / A-Z leads the chip row in Cards view (moved here by app.js) instead of taking a pinned row of its own */
    .jump-wrap .seg.group-seg { flex:none; order:0; }
    .jump-bar { display:flex; position:relative; gap:6px; overflow-x:auto; scrollbar-width:none; }
    /* fade whichever edge has more chips beyond it (can-prev / can-next set by app.js) */
    .jump-wrap.can-next .jump-bar { -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent); mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent); }
    .jump-wrap.can-prev .jump-bar { -webkit-mask-image:linear-gradient(90deg,transparent,#000 32px); mask-image:linear-gradient(90deg,transparent,#000 32px); }
    .jump-wrap.can-prev.can-next .jump-bar { -webkit-mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent); mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent); }
    .jump-bar::-webkit-scrollbar { display:none; }
    .jump-bar button { flex:none; min-width:36px; height:32px; padding:0 10px; border:1px solid #cbd5e1; border-radius:999px; background:#fff; font-size:13px; font-weight:600; color:#334155; }
    .jump-bar button[aria-current="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
    .jump-bar button:disabled { opacity:.35; cursor:default; }
    /* single-letter groups (A-Z) are compact borderless buttons so the whole alphabet fits on one row */
    .jump-bar:has(.letter) { gap:2px; }
    .jump-bar button.letter { min-width:0; width:30px; height:30px; padding:0; border-color:transparent; border-radius:50%; background:none; }
    .jump-bar button.letter:not(:disabled):not([aria-current="true"]):hover { background:var(--accent-soft); }
    .jump-bar button.letter[aria-current="true"] { background:var(--accent); color:#fff; }
    .jump-arrow { display:none; position:absolute; top:0; z-index:1; width:32px; height:32px; align-items:center; justify-content:center; padding:0 0 3px; border:1px solid #cbd5e1; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(15,23,42,.15); font-size:22px; line-height:1; color:#334155; }
    .jump-arrow:hover { background:#f1f5f9; }
    .jump-arrow.prev { left:8px; }
    .jump-arrow.next { right:8px; }
    .list-cat { scroll-margin-top:calc(var(--pinned-h, 0px) + 8px); }

  }

  /* a mouse can't swipe the hidden-scrollbar row, so it gets arrows at whichever edge has more chips */
  @media (max-width:700px) and (hover:hover) and (pointer:fine) {
    .jump-wrap.can-prev .jump-arrow.prev, .jump-wrap.can-next .jump-arrow.next { display:flex; }
  }

  /* same back-to-top button as the Connector Explorer, in this tool's accent */
  .back-to-top { position:fixed; right:24px; bottom:24px; z-index:30; width:48px; height:48px; border:1px solid var(--accent); border-radius:50%; background:#0f172a; color:#fff; box-shadow:0 4px 14px rgba(15,23,42,.25); font-size:25px; line-height:1; }
  .back-to-top:hover { background:var(--accent); }
  .back-to-top:focus-visible { outline:3px solid var(--accent-ring); outline-offset:3px; }
  @media (max-width:600px) {
    .back-to-top { right:16px; bottom:16px; width:44px; height:44px; }
  }

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

  /* Title and What's New pill share a line; the pill sits outside the h1. */

  /* Light/dark switch: same control as the home page. It sits last in the header actions. */
  .theme-switch { position:relative; flex:none; width:52px; height:32px; padding:0; border:1px solid #cbd5e1; border-radius:999px; background:#f1f5f9; }
  .theme-switch:hover { border-color:#94a3b8; }
  .theme-switch:focus-visible { outline:2px solid var(--fme-accent, #036C70); outline-offset:2px; }
  .dark .theme-switch { border-color:#475569; background:#1e293b; }
  .dark .theme-switch:hover { border-color:#64748b; }
  .dark .theme-switch:focus-visible { outline-color:#7fd8de; }
  .theme-switch-knob { position:absolute; top:3px; left:3px; display:grid; width:24px; height:24px; place-items:center; border-radius:999px; background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.25); color:#d97706; transition:transform .15s ease; }
  .theme-switch-knob svg { width:14px; height:14px; }
  .theme-moon { display:none; }
  .dark .theme-switch-knob { transform:translateX(20px); background:#334155; color:#c7d2fe; }
  .dark .theme-sun { display:none; }
  .dark .theme-moon { display:block; }
  /* Phones: a square icon button like Share and More tools, so the title keeps its room */
  @media (max-width:700px) {
    .theme-switch { width:36px; height:36px; border-color:#e2e8f0; border-radius:8px; background:#fff; }
    .dark .theme-switch { border-color:#334155; background:#1e293b; }
    .theme-switch-knob, .dark .theme-switch-knob { top:5px; left:5px; transform:none; background:transparent; box-shadow:none; }
    .theme-switch-knob svg { width:16px; height:16px; }
  }

  /* Dark mode (html.dark, set by the switch). Light mode keeps the white shared header; dark mode moves it and the working areas to slate,
     with a brighter blue divider so the accent still reads. */
  .dark { color-scheme:dark; --ink:#f1f5f9; --muted:#94a3b8; --accent:#37c6d0; --accent-soft:color-mix(in srgb, #1a9ba1 18%, #0f172a); --accent-ring:color-mix(in srgb, #1a9ba1 60%, #0f172a); }
  .dark .fme-hdr { background:#0f172a; border-bottom-color:#1a9ba1; color:#f8fafc; }
  .dark .fme-hdr h1 { color:#fff; }
  .dark .fme-hdr .fme-tagline, .dark .fme-hdr .fme-crumb, .dark .fme-hdr .fme-trust-text { color:#cbd5e1; }
  .dark .fme-hdr .fme-crumb:has(+ .fme-crumb)::after { color:#64748b; }
  .dark .fme-hdr .fme-crumb:hover { color:#fff; }
  .dark .fme-hdr .fme-crumb-logo { padding:1px; background:#fff; }
  .dark .fme-hdr .fme-trust { color:#34d399; }
  .dark .fme-hdr .fme-trust:hover, .dark .fme-hdr .fme-trust[aria-expanded="true"] { background:#1e293b; }
  .dark .fme-hdr .fme-action { border-color:#334155; background:#1e293b; color:#e2e8f0; }
  .dark .fme-hdr .fme-action:hover { border-color:#475569; background:#334155; color:#fff; }
  .dark .fme-hdr :is(.fme-crumb, .fme-pill, .fme-trust, .fme-action):focus-visible { outline-color:#7fd8de; }
  .dark body { background:#020617; color:#cbd5e1; }
  .dark #app { background:#020617; }
  .dark #app > header { background:#0f172a; border-bottom-color:#1e293b; }
  .dark .toolbar-hint { border-left-color:#334155; }
  .dark .toolbar-hint kbd, .dark .search-kbd { border-color:#475569; background:#1e293b; color:#cbd5e1; }
  .dark .search input { border-color:#334155; background:#020617; color:#f1f5f9; }
  .dark .search input::placeholder { color:#64748b; }
  .dark .search input:hover { border-color:#475569; background:#020617; }
  .dark .search input:focus { background:#020617; }
  .dark #clear-search:hover { color:#e2e8f0; }
  .dark .btn { border-color:#334155; background:#1e293b; color:#cbd5e1; }
  .dark .btn:hover { background:#334155; color:#fff; }
  .dark .seg { border-color:#334155; background:#020617; }
  .dark .seg button { color:#94a3b8; }
  .dark .seg button.active { background:#334155; color:#7fd8de; box-shadow:none; } /* a clear raised pill, as the white one is in light mode */
  .dark .about-cue { background:rgba(15,23,42,.92); box-shadow:0 4px 10px rgba(0,0,0,.4); }

  .dark #tree-view { background-image:radial-gradient(#1e293b 1.2px, transparent 1.2px); }
  .dark .connector { stroke:#475569; }
  /* cards sit one step lighter than the canvas so they lift off it; the count chip is inset back to the darker shade */
  .dark .node:not(.root) { background:#1e293b; border-color:#334155; }
  .dark .root { background:#035b5f; border-color:#1a9ba1; } /* one shade deeper than light mode so it doesn't glare on the dark canvas */
  .dark .root:hover { background:#036C70; border-color:#37c6d0; box-shadow:0 8px 24px -6px rgba(26,155,161,.5); } /* brightens back to the light-mode shades */
  .dark .count { border-color:#334155; background:#0f172a; color:#cbd5e1; }
  /* a shadow can't show on a dark canvas, so hover lightens the card and (for functions) tints its border with the category colour */
  .dark .fn, .dark .cat { transition:box-shadow .2s, transform .2s, background-color .2s, border-color .2s; }
  .dark .fn:hover, .dark .cat:hover { background:#273449; }
  .dark .cat:hover { background:color-mix(in srgb, var(--c) 12%, #1e293b); box-shadow:0 0 0 2px var(--c), 0 8px 20px -6px rgba(0,0,0,.6); }
  .dark .fn:hover { background:color-mix(in srgb, var(--c) 12%, #1e293b); border-color:color-mix(in srgb, var(--c) 65%, #334155); } /* category tint, as in light mode */
  .dark .fn:hover svg { color:#e2e8f0; }
  .dark .fn p { color:#cbd5e1; }
  .dark .fn svg { color:#64748b; }
  .dark .fn.hit:not(.spot) { box-shadow:0 0 0 3px rgba(250,204,21,.45); }
  .dark mark { background:#854d0e; color:#fef9c3; }
  .dark #controls { border-color:#334155; background:#0f172a; box-shadow:0 10px 15px -3px rgba(0,0,0,.5); }
  .dark #controls button { background:#0f172a; color:#cbd5e1; }
  .dark #controls button:hover { background:#1e293b; color:#fff; }
  .dark #controls #zoom-level { color:#cbd5e1; }
  .dark #controls hr { border-color:#334155; }
  .dark .empty { border-color:#334155; background:rgba(15,23,42,.6); }
  .dark .empty-ico { color:#94a3b8; }

  /* a shadow can't show on a dark page, so the panel gets a defined left edge; a lighter dim keeps the page behind from going murky */
  .dark #backdrop { background:rgba(2,6,23,.5); }
  .dark #panel { background:#0f172a; border-left:1px solid #334155; box-shadow:-10px 0 25px -5px rgba(0,0,0,.6); }
  .dark #close { background:#1e293b; color:#cbd5e1; }
  .dark #share { color:#cbd5e1; }
  .dark #share:hover { background:#1e293b; color:#fff; }
  .dark #share::after { background:#334155; }
  .dark #share.done { background:#064e3b; color:#6ee7b7; }
  .dark .chip { border-color:#334155; background:#1e293b; color:#cbd5e1; }
  .dark .box { border-color:#334155; }
  .dark .obj { background:color-mix(in srgb, var(--c, var(--accent)) 14%, #0f172a); border-color:color-mix(in srgb, var(--c, var(--accent)) 30%, #0f172a); border-left-color:var(--c, var(--accent)); }
  /* code sits in a plain dark well (amber tints turn muddy on navy); amber stays on the edge and label */
  .dark .ex { background:#020617; border-color:#334155; border-left-color:#f59e0b; }
  .dark .ex .lbl { color:#fbbf24; }
  .dark .ex .t-str { color:#34d399; }
  .dark .ex .t-num { color:#fdba74; }
  .dark .ex .t-com { color:#94a3b8; }
  .dark #copy-example { border-color:rgba(252,211,77,.45); background:transparent; color:#fcd34d; }
  .dark #copy-example:hover { border-color:#fcd34d; background:rgba(245,158,11,.12); }
  .dark .impl li { border-color:#334155; color:#cbd5e1; }
  .dark .learn-link:hover { color:#a6dfe1; }
  .dark .foot { border-top-color:#1e293b; background:#0f172a; }
  .dark .foot-title { color:#94a3b8; }
  .dark .drawer-nav { border-color:#334155; background:#1e293b; color:#e2e8f0; }
  .dark .drawer-nav:hover:not(:disabled) { background:#334155; }
  .dark .drawer-nav:disabled { border-color:#1e293b; background:#0f172a; color:#475569; }

  .dark .jump-bar button, .dark .jump-arrow { border-color:#334155; background:#1e293b; color:#e2e8f0; }
  .dark .jump-bar button.letter { border-color:transparent; background:none; }
  .dark .jump-bar button[aria-current="true"], .dark .jump-bar button.letter[aria-current="true"] { border-color:#038387; background:#038387; color:#fff; }
  .dark .jump-arrow:hover { background:#334155; }
  .dark .back-to-top { background:#1e293b; }
  .dark .back-to-top:hover { background:#038387; }

  .dark .seo-content { border-top-color:#1e293b; background:#0f172a; }
  .dark .seo-content p, .dark .seo-browse li { color:#cbd5e1; }
  .dark .seo-browse, .dark .seo-faq details, .dark .seo-browse[open], .dark .seo-faq details[open],
  .dark .seo-browse summary, .dark .seo-faq summary, .dark .seo-browse[open] summary { border-color:#0b5457; background:#06302f; }
  .dark .seo-faq details[open] summary { border-bottom-color:#0b5457; }
  .dark .seo-browse-content, .dark .seo-faq-content { background:#0f172a; }
  .dark support-card { --support-card-text:#f1f5f9; --support-card-bg:#0f172a; --support-card-border:#0b5457; --support-card-muted:#94a3b8; }

  /* Shared chrome from fme-site.css (popover, phone tip, footer) */
  .dark .fme-pop { border-color:#334155; background:#0f172a; color:#cbd5e1; box-shadow:0 10px 30px rgba(0,0,0,.5); }
  .dark .fme-pop-title { color:#f1f5f9; }
  .dark .fme-pop li::before { color:#34d399; }
  .dark .fme-pop a { color:#7fd8de; }
  .dark .fme-hint { border-top-color:#1e293b; background:#082f49; color:#bae6fd; }
  .dark .fme-hint-close { color:#bae6fd; }
  .dark .fme-hint-close:hover { background:#0c4a6e; }
  .dark .fme-toast { background:#1e293b; }
  .dark .fme-foot { background:#0f172a; color:#94a3b8; }
  .dark .fme-foot-logo, .dark .fme-foot-h { color:#f1f5f9; }
  .dark .fme-foot-social a, .dark .fme-foot-legal { color:#94a3b8; }
  .dark .fme-foot-col a, .dark .fme-foot-col button, .dark .fme-foot-legal a { color:#cbd5e1; }
  .dark .fme-foot-social a:hover, .dark .fme-foot-col a:hover, .dark .fme-foot-col button:hover, .dark .fme-foot-legal a:hover { color:#7fd8de; }
  .dark .fme-foot a:focus-visible, .dark .fme-foot button:focus-visible { outline-color:#7fd8de; }
  .dark .fme-foot-legal-in { border-top-color:#1e293b; }

  /* SharePoint branches: an opened action splits into its Card (details) and Parameters, which lists each parameter name */
  .act-row, .param-row { display:flex; align-items:center; gap:70px; }
  .act-kids { display:flex; flex-direction:column; gap:14px; }
  .param-list { display:flex; flex-direction:column; gap:8px; }
  .connector.leaf { stroke-width:2; }
  /* the tree is a map: long descriptions stop at two lines; the Card and Cards view show them in full */
  .children .fn p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .fn svg { transition:transform .2s, color .2s; }
  .fn.open { border-color:var(--c); background:color-mix(in srgb, var(--c) 7%, #fff); }
  .fn.open svg { transform:rotate(90deg); color:var(--c); }
  .tag { display:inline-block; margin-left:8px; padding:1px 7px; border:1px solid #e2e8f0; border-radius:999px; background:#f1f5f9; color:#475569; font-size:11px; font-weight:700; vertical-align:2px; white-space:nowrap; }
  .tag.dep { border-color:#fecaca; background:#fef2f2; color:#b91c1c; }
  .sub { display:flex; align-items:center; gap:10px; width:230px; min-height:48px; padding:10px 14px; border-width:1px; border-left:5px solid var(--c); border-radius:10px; color:var(--ink); font-size:15px; font-weight:700; text-align:left; }
  .sub small { margin-left:auto; padding:2px 8px; border:1px solid #e2e8f0; border-radius:6px; background:#f8fafc; color:#475569; font-size:12px; font-weight:700; }
  .sub-ico { flex:none; width:18px; height:18px; color:var(--c); }
  .sub-card { cursor:pointer; transition:background-color .2s, box-shadow .2s, transform .2s; }
  .sub-card:hover { background:color-mix(in srgb, var(--c) 7%, #fff); box-shadow:0 0 0 2px var(--c); transform:translateX(3px); }
  button.sub-params { cursor:pointer; transition:background-color .2s, box-shadow .2s; }
  button.sub-params:hover { background:color-mix(in srgb, var(--c) 7%, #fff); box-shadow:0 0 0 2px var(--c); }
  .sub-chev { display:flex; flex:none; width:16px; height:16px; margin-left:-2px; color:var(--muted); }
  .sub-chev svg { width:16px; height:16px; transition:transform .2s; }
  .sub-params.open .sub-chev svg { transform:rotate(90deg); color:var(--c); }
  .param { display:flex; align-items:center; gap:6px; width:270px; min-height:40px; padding:8px 12px; border-width:1px; border-radius:8px; color:var(--ink); font-size:14px; font-weight:500; text-align:left; cursor:pointer; transition:background-color .2s, border-color .2s; }
  .param:hover { border-color:var(--c); background:color-mix(in srgb, var(--c) 7%, #fff); }
  .param.none { color:var(--muted); font-weight:500; font-style:italic; cursor:default; }
  .param .req { color:#b91c1c; font-weight:800; }
  .fn:focus-visible, .sub-card:focus-visible, .sub-params:focus-visible, .param:focus-visible { outline:3px solid var(--accent-ring); outline-offset:2px; }

  /* Card (drawer): action names are sentences, not code, so the title uses the body font */
  .d-head h2 { font-family:inherit; }
  .d-title .tag { margin:8px 0 0; }
  .op-id { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:-8px 0 24px; color:var(--muted); font-size:13px; }
  .op-id > span:first-child { font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
  .op-id code, .p-key code, .ret-list code { padding:2px 6px; border-radius:4px; background:color-mix(in srgb, var(--c, var(--accent)) 10%, #fff); color:var(--c-text); font-family:Consolas,Menlo,monospace; font-size:13px; overflow-wrap:anywhere; }
  .impl { margin-bottom:24px; }
  .impl h4 .d { color:var(--muted); font-weight:600; }
  .impl li.p-item, .impl .ret-list li { display:block; }
  .impl li.p-item::before, .impl .ret-list li::before { display:none; }
  .impl .ret-list li { padding:10px 14px; }
  .p-top, .ret-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  .ret-head { margin-bottom:8px; }
  .p-name { margin-right:4px; color:var(--ink); font-size:15px; font-weight:700; }
  .pill { display:inline-block; padding:1px 8px; border:1px solid #e2e8f0; border-radius:999px; background:#f8fafc; color:#475569; font-size:11.5px; font-weight:700; }
  .pill.req { border-color:#fecaca; background:#fef2f2; color:#b91c1c; }
  .pill.type { font-family:Consolas,Menlo,monospace; font-weight:600; }
  .ret-list .pill { margin-left:6px; }
  /* a type with a definition links to its card in Definitions */
  .pill.link { border-color:color-mix(in srgb, var(--accent) 45%, #fff); background:var(--accent-soft); color:var(--accent); text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
  .pill.link::after { content:" →"; text-decoration:none; }
  .pill.link:hover { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 18%, #fff); }
  .pill.link:focus-visible, .used-link:focus-visible { outline:3px solid var(--accent-ring); outline-offset:2px; }
  .ret-head .pill.link { padding:4px 12px; font-size:13px; }
  /* Definitions: names are type names, so they read as code */
  .def h4, .d-head h2.mono { font-family:Consolas,Menlo,monospace; }
  .used-by { display:flex; flex-wrap:wrap; gap:8px; }
  .used-link { min-height:36px; padding:6px 12px; border:1px solid #e2e8f0; border-left:4px solid var(--c); border-radius:8px; background:#fff; color:var(--ink); font-size:13.5px; font-weight:600; text-align:left; }
  .used-link:hover { background:color-mix(in srgb, var(--c) 8%, #fff); border-color:var(--c); }
  .p-key { margin-top:6px; color:var(--muted); font-size:13px; }
  .p-item p, .ret-list p { margin-top:6px; color:#334155; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
  .p-item { transition:box-shadow .3s; }
  .p-item.spot { box-shadow:0 0 0 3px #f59e0b; }
  .none-note { margin-bottom:10px; color:#475569; font-size:14px; line-height:1.5; }
  /* Parameter and property cards: a header strip tinted in the category colour holds the name and pills; key and description sit on white */
  .impl li.p-item { padding:0; overflow:hidden; border-color:color-mix(in srgb, var(--c, var(--accent)) 28%, #e2e8f0); }
  .p-item .p-top { padding:10px 16px; background:color-mix(in srgb, var(--c, var(--accent)) 9%, #fff); border-bottom:1px solid color-mix(in srgb, var(--c, var(--accent)) 18%, #fff); }
  .p-item .p-key { margin:10px 16px 0; }
  .p-item p { margin:6px 16px 0; }
  .p-item > :last-child { margin-bottom:12px; }
  .p-item .pill.type:not(.link), .p-key code { border:1px solid color-mix(in srgb, var(--c, var(--accent)) 25%, #e2e8f0); background:#fff; }
  /* Returns: an amber box, the second colour, as the Example box in the Functions Explorer */
  .impl.ret { padding:18px 20px; border:1px solid #fde68a; border-left:5px solid #f59e0b; border-radius:12px; background:#fffbeb; }
  .impl.ret h4 { margin-bottom:10px; color:#92400e; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
  .impl.ret .none-note { margin-bottom:0; color:#334155; }
  .impl.ret .ret-list { margin-top:12px; }
  .impl.ret .ret-list li { border-color:#fde68a; background:#fff; }
  .impl.ret .ret-list li:last-child { margin-bottom:0; }
  .impl.ret .pill:not(.link) { background:#fff; }

  .dark .node.fn.open { border-color:var(--c); background:color-mix(in srgb, var(--c) 12%, #1e293b); }
  .dark .node.sub { border-left-color:var(--c); }
  .dark .sub-card:hover, .dark .param:hover { background:color-mix(in srgb, var(--c) 12%, #1e293b); }
  .dark .node.param:hover { border-color:var(--c); }
  .dark .sub small, .dark .pill, .dark .tag { border-color:#334155; background:#0f172a; color:#cbd5e1; }
  .dark .pill.link { border-color:#1a9ba1; background:var(--accent-soft); color:var(--accent); }
  .dark .pill.link:hover { background:color-mix(in srgb, #1a9ba1 30%, #0f172a); }
  .dark .used-link { border-color:#334155; border-left-color:var(--c); background:#1e293b; color:#e2e8f0; }
  .dark .used-link:hover { background:color-mix(in srgb, var(--c) 14%, #1e293b); border-color:var(--c); }
  .dark .pill.req, .dark .tag.dep { border-color:#7f1d1d; background:#450a0a; color:#fca5a5; }
  .dark .param .req { color:#f87171; }
  .dark .op-id code, .dark .p-key code, .dark .ret-list code { background:#020617; color:color-mix(in srgb, var(--c, var(--accent)) 45%, #fff); }
  .dark .p-item p, .dark .ret-list p, .dark .none-note { color:#cbd5e1; }
  .dark .impl li.p-item { border-color:color-mix(in srgb, var(--c, var(--accent)) 30%, #334155); }
  .dark .p-item .p-top { background:color-mix(in srgb, var(--c, var(--accent)) 14%, #0f172a); border-bottom-color:color-mix(in srgb, var(--c, var(--accent)) 25%, #0f172a); }
  .dark .p-item .pill.type:not(.link), .dark .p-key code { border-color:#334155; background:#020617; }
  .dark .impl.ret { border-color:#334155; border-left-color:#f59e0b; background:#020617; }
  .dark .impl.ret h4 { color:#fbbf24; }
  .dark .impl.ret .none-note { color:#cbd5e1; }
  .dark .impl.ret .ret-list li { border-color:#334155; background:#0f172a; }
  .dark .impl.ret .pill:not(.link) { background:#0f172a; }

  /* Beta badge beside the title: an outlined chip in the tool accent, so it doesn't read as a second What's New pill */
  .beta-badge { display:inline-block; margin-left:4px; padding:2px 8px; border:1.5px solid var(--fme-accent, #036C70); border-radius:999px; background:color-mix(in srgb, #036C70 8%, #fff); color:#036C70; font-size:12px; font-weight:800; letter-spacing:.08em; line-height:1.4; text-transform:uppercase; vertical-align:middle; white-space:nowrap; }
  .dark .beta-badge { border-color:#1a9ba1; background:color-mix(in srgb, #1a9ba1 18%, #0f172a); color:#7fd8de; }
  @media (max-width:700px) { .beta-badge { padding:1px 6px; font-size:10.5px; } }

  /* About section: each action's parameter names and keys, kept as readable (and crawlable) text */
  .seo-params { display:block; margin-top:2px; color:var(--muted); font-size:13px; line-height:1.6; }
  .seo-params code { padding:1px 4px; font-size:12px; }
