/* desk.css — the Workspace shell (the installable app at /app/; controller: js/desk.js).
   The sidebar is a fixed dark rail (the Caspian house palette); the content pane follows the
   app's own light/dark tokens so every tool renders exactly as it does on the site. Every class
   is prefixed dk-. The site's own chrome (header, mega-menu, footer, help block) is hidden, never
   removed, so app.js keeps every element it expects. Loaded only by /app/index.html. */
:root {
  --dk-w: 272px;
  --dk-top-h: 56px;
  --dk-base: #0b0e14;
  --dk-raised: #141925;
  --dk-over: #1c2333;
  --dk-line: #232a3a;
  --dk-line2: #2e3850;
  --dk-text: #e8ecf4;
  --dk-text2: #a4aec4;
  --dk-muted: #6b7488;
  --dk-accent: #e2364d;
  --dk-accent-soft: rgba(226, 54, 77, 0.16);
  --dk-radius: 8px;
}
html[data-dk-collapsed] { --dk-w: 64px; }

/* ---- the app's own chrome, parked ------------------------------------------------------- */
body > header,
footer.site-footer,
#install-banner,
#megamenu, #megamenuOverlay,
#tool-help,
#header-download,
main .tool-view .instructions, main .tool-view [data-intro],
#co-fab,
#view-home { display: none !important; }

html, body { height: auto; }
body { padding-left: var(--dk-w); transition: padding-left .18s ease; }
main { padding: 24px 32px 56px; max-width: 1480px; margin: 0 auto; }
@media (max-width: 760px) { main { padding: 16px 16px 40px; } }

/* ---- sidebar ---------------------------------------------------------------------------- */
.dk-side {
  position: fixed; inset: 0 auto 0 0; width: var(--dk-w); z-index: 120;
  background: var(--dk-base); color: var(--dk-text2);
  border-right: 1px solid var(--dk-line);
  display: flex; flex-direction: column;
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.4;
  transition: width .18s ease, transform .2s ease;
  color-scheme: dark;
}
.dk-side *, .dk-topbar * { box-sizing: border-box; }
.dk-side button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dk-side button:focus-visible, .dk-topbar button:focus-visible, .dk-search-input:focus-visible, .dk-lang:focus-visible { outline: 2px solid var(--dk-accent); outline-offset: 1px; }

.dk-brand { display: flex; align-items: center; gap: 6px; height: var(--dk-top-h); padding: 0 12px 0 14px; border-bottom: 1px solid var(--dk-line); flex: 0 0 auto; }
.dk-brand-btn { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; padding: 6px 4px; border-radius: var(--dk-radius); }
.dk-brand-btn:hover { background: var(--dk-raised); }
.dk-mark { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #e2364d, #b30d29); box-shadow: 0 2px 8px rgba(226, 54, 77, .35); }
.dk-brand-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.dk-brand-name { color: var(--dk-text); font-size: 15px; font-weight: 500; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dk-brand-name b { font-weight: 700; }
.dk-brand-ver { flex: 0 0 auto; font-size: 10.5px; color: var(--dk-muted); font-variant-numeric: tabular-nums; padding: 1px 6px; border: 1px solid var(--dk-line2); border-radius: 999px; margin-right: 6px; white-space: nowrap; }

.dk-iconbtn { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 7px; color: var(--dk-muted); }
.dk-iconbtn:hover { background: var(--dk-raised); color: var(--dk-text); }

.dk-search { position: relative; display: flex; align-items: center; margin: 12px 12px 6px; flex: 0 0 auto; }
.dk-search-ic { position: absolute; left: 10px; color: var(--dk-muted); pointer-events: none; }
.dk-search-input { width: 100%; height: 34px; padding: 0 30px 0 32px; border-radius: var(--dk-radius); border: 1px solid var(--dk-line); background: var(--dk-raised); color: var(--dk-text); font: inherit; font-size: 13px; outline: none; }
.dk-search-input::placeholder { color: var(--dk-muted); }
.dk-search-input:focus { border-color: var(--dk-line2); background: var(--dk-over); }
.dk-kbd { position: absolute; right: 9px; font: 600 10.5px/1 var(--font-ui); color: var(--dk-muted); border: 1px solid var(--dk-line2); border-radius: 4px; padding: 3px 5px; pointer-events: none; }
.dk-search-input:focus ~ .dk-kbd, .dk-search:has(.dk-search-input:not(:placeholder-shown)) .dk-kbd { display: none; }
.dk-search-clear { position: absolute; right: 8px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: var(--dk-muted); }
.dk-search-clear:hover { color: var(--dk-text); background: var(--dk-over); }

.dk-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 12px; scrollbar-width: thin; scrollbar-color: var(--dk-line2) transparent; }
.dk-nav::-webkit-scrollbar { width: 8px; }
.dk-nav::-webkit-scrollbar-thumb { background: var(--dk-line2); border-radius: 8px; }

.dk-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 7px; color: var(--dk-text2); white-space: nowrap; }
.dk-item:hover { background: var(--dk-raised); color: var(--dk-text); }
.dk-item.active { background: var(--dk-over); color: var(--dk-text); }
.dk-item.active .dk-item-ic { color: var(--dk-accent); }
.dk-item-ic { width: 18px; flex: 0 0 18px; display: grid; place-items: center; color: var(--dk-muted); }
.dk-item-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dk-count { font-size: 11px; color: var(--dk-muted); font-variant-numeric: tabular-nums; }
.dk-item.active .dk-count { color: var(--dk-text2); }

.dk-eyebrow { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-muted); }
.dk-eyebrow:first-child { padding-top: 6px; }

.dk-sec { margin: 1px 0; }
.dk-sec-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px 0 6px; border-radius: 7px; color: var(--dk-text2); white-space: nowrap; }
.dk-sec-head:hover { background: var(--dk-raised); color: var(--dk-text); }
.dk-sec.has-active > .dk-sec-head { color: var(--dk-text); }
.dk-chev { width: 14px; flex: 0 0 14px; color: var(--dk-muted); transition: transform .15s ease; }
.dk-sec.open .dk-chev { transform: rotate(90deg); }
.dk-sec-ic { width: 18px; flex: 0 0 18px; display: grid; place-items: center; color: var(--dk-muted); }
.dk-sec.has-active > .dk-sec-head .dk-sec-ic { color: var(--dk-accent); }
.dk-sec-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dk-sec-body { display: none; padding: 2px 0 6px 0; margin-left: 15px; border-left: 1px solid var(--dk-line); }
.dk-sec.open .dk-sec-body { display: block; }
.dk-cat { padding: 8px 0 3px 14px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-tool { display: flex; align-items: center; gap: 9px; width: calc(100% - 4px); height: 30px; margin: 0 0 0 4px; padding: 0 8px 0 10px; border-radius: 6px; color: var(--dk-text2); white-space: nowrap; font-size: 13px; }
.dk-tool:hover { background: var(--dk-raised); color: var(--dk-text); }
.dk-tool.active { background: var(--dk-over); color: var(--dk-text); font-weight: 500; }
.dk-tool.active .dk-tool-ic { color: var(--dk-accent); }
.dk-tool-ic { width: 16px; flex: 0 0 16px; display: grid; place-items: center; color: var(--dk-muted); }
.dk-tool-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dk-tool .tool-new-pill { margin-left: 4px; }

/* search results (replace the tree while a query is present) */
.dk-results { padding: 2px 0; }
.dk-res { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 7px; color: var(--dk-text2); }
.dk-res:hover, .dk-res.kb-active { background: var(--dk-over); color: var(--dk-text); }
.dk-res-ic { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--cat, #c8102e) 18%, transparent); color: var(--cat, #e2364d); }
.dk-res-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dk-res-name { font-size: 13px; color: var(--dk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-res-name mark { background: none; color: var(--dk-accent); font-weight: 600; }
.dk-res-cat { font-size: 11px; color: var(--dk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-res-empty { padding: 18px 10px; font-size: 13px; color: var(--dk-muted); text-align: center; }
.dk-res-hint { padding: 8px 10px 4px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-muted); font-weight: 600; }

.dk-foot { flex: 0 0 auto; padding: 8px 8px 10px; border-top: 1px solid var(--dk-line); }
.dk-item.dk-install { color: var(--dk-text); background: var(--dk-accent-soft); margin-bottom: 4px; }
.dk-item.dk-install .dk-item-ic { color: var(--dk-accent); }
.dk-item.dk-install:hover { background: var(--dk-accent); color: #fff; }
.dk-item.dk-install:hover .dk-item-ic { color: #fff; }
.dk-item[hidden] { display: none; }
.dk-foot-row { display: flex; align-items: center; gap: 6px; padding: 6px 2px 0; }
.dk-foot-spacer { flex: 1; }
.dk-lang-wrap { position: relative; display: flex; align-items: center; color: var(--dk-muted); }
.dk-lang-wrap > svg { position: absolute; left: 8px; pointer-events: none; }
.dk-lang { appearance: none; -webkit-appearance: none; height: 30px; padding: 0 22px 0 26px; border-radius: 7px; border: 1px solid transparent; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7488' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center; color: var(--dk-text2); font: 600 12px var(--font-ui); cursor: pointer; letter-spacing: .04em; }
.dk-lang:hover { background-color: var(--dk-raised); color: var(--dk-text); }
.dk-lang option { background: var(--dk-raised); color: var(--dk-text); }
.dk-private { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 10.5px; color: var(--dk-muted); white-space: nowrap; overflow: hidden; padding-right: 4px; }
.dk-private span { overflow: hidden; text-overflow: ellipsis; }
.dk-foot-row { overflow: hidden; }
.dk-ic-sun { display: none; }
html[data-theme="dark"] .dk-ic-sun { display: block; }
html[data-theme="dark"] .dk-ic-moon { display: none; }

/* collapsed rail */
html[data-dk-collapsed] .dk-brand { padding: 0 0 0 0; justify-content: center; flex-direction: column; height: auto; gap: 2px; padding: 10px 0 8px; }
html[data-dk-collapsed] .dk-brand-btn { flex: 0 0 auto; padding: 4px; }
html[data-dk-collapsed] .dk-brand-text,
html[data-dk-collapsed] .dk-search-input, html[data-dk-collapsed] .dk-kbd, html[data-dk-collapsed] .dk-search-clear,
html[data-dk-collapsed] .dk-item-lbl, html[data-dk-collapsed] .dk-count, html[data-dk-collapsed] .dk-eyebrow,
html[data-dk-collapsed] .dk-sec-lbl, html[data-dk-collapsed] .dk-chev, html[data-dk-collapsed] .dk-sec-body,
html[data-dk-collapsed] .dk-lang-wrap, html[data-dk-collapsed] .dk-private, html[data-dk-collapsed] .dk-brand-ver, html[data-dk-collapsed] .dk-results { display: none !important; }
html[data-dk-collapsed] .dk-search { justify-content: center; margin: 10px 0 4px; }
html[data-dk-collapsed] .dk-search-ic { position: static; width: 34px; height: 34px; padding: 9px; border-radius: 8px; color: var(--dk-text2); pointer-events: auto; cursor: pointer; }
html[data-dk-collapsed] .dk-search-ic:hover { background: var(--dk-raised); color: var(--dk-text); }
html[data-dk-collapsed] .dk-nav { padding: 4px 0 12px; }
html[data-dk-collapsed] .dk-item, html[data-dk-collapsed] .dk-sec-head { width: 40px; margin: 2px auto; padding: 0; justify-content: center; }
html[data-dk-collapsed] .dk-tree { display: flex; flex-direction: column; align-items: center; }
html[data-dk-collapsed] .dk-sec { width: 100%; }
html[data-dk-collapsed] .dk-foot { padding: 8px 0 10px; }
html[data-dk-collapsed] .dk-foot-row { flex-direction: column; padding: 4px 0 0; }
html[data-dk-collapsed] .dk-collapse svg { transform: scaleX(-1); }

/* ---- top bar ----------------------------------------------------------------------------- */
.dk-topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 110;
  height: var(--dk-top-h); display: flex; align-items: center; gap: 14px;
  padding: 0 24px 0 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
}
.dk-menu { display: none; color: var(--ink-soft); }
.dk-menu:hover { background: var(--bg); color: var(--ink); }
.dk-crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-faded); white-space: nowrap; flex: 0 0 auto; }
.dk-crumb:empty { display: none; }
.dk-crumb .dk-crumb-sep { color: var(--border-strong); }
.dk-crumb b { font-weight: 500; color: var(--ink-soft); }
.dk-crumb-link { background: none; border: 0; padding: 4px 6px; margin: 0 -2px; border-radius: 6px; color: var(--ink-faded); font: inherit; cursor: pointer; }
.dk-crumb-link:hover { color: var(--ink); background: var(--bg); }
.dk-crumb-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dk-anchor { scroll-margin-top: calc(var(--dk-top-h) + 16px); }
.dk-cat-label { scroll-margin-top: calc(var(--dk-top-h) + 16px); }
.dk-top-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:not(.home-active) .dk-top-title { display: none; }
body.home-active .dk-crumb { display: none; }
.dk-top-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.dk-topbtn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--ink-soft); font: 500 12.5px var(--font-ui); cursor: pointer; }
.dk-topbtn:hover { border-color: var(--border-strong); color: var(--ink); background: var(--bg); }
.dk-topbtn[hidden] { display: none; }

/* the app's tool header, re-housed in the top bar as a single row */
.dk-topbar .tool-header { margin: 0; flex: 1; min-width: 0; align-items: center; gap: 12px; }
.dk-topbar .tool-header-main { display: flex; align-items: center; min-width: 0; flex: 1; }
.dk-topbar .tool-breadcrumb, .dk-topbar .tool-subtitle { display: none; }
.dk-topbar .tool-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.dk-topbar .tool-header-right { flex: 0 0 auto; }

/* ---- home (tool overview) --------------------------------------------------------------- */
.dk-home { font-family: var(--font-ui); display: flex; flex-direction: column; gap: 28px; }
.dk-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dk-h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0 0 4px; text-wrap: balance; }
.dk-lede { font-size: 13.5px; color: var(--ink-faded); margin: 0; }
.dk-lede b { color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.dk-home-search { position: relative; flex: 0 1 360px; min-width: 240px; }
.dk-home-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faded); pointer-events: none; }
.dk-home-search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.dk-home-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.dk-group { display: flex; flex-direction: column; gap: 12px; }
.dk-group-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.dk-group-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-pale); color: var(--accent-ink); }
.dk-group-title { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; margin: 0; }
.dk-group-count { font-size: 12px; color: var(--ink-faded); font-variant-numeric: tabular-nums; }
.dk-group-action { margin-left: auto; font: 500 12px var(--font-ui); color: var(--ink-faded); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.dk-group-action:hover { color: var(--accent-ink); background: var(--accent-pale); }
.dk-cat-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cat, var(--ink-faded)); margin: 6px 0 -4px; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; }
.dk-tile { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 12px; min-height: 70px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.dk-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dk-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dk-tile-ic { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--cat, #c8102e) 12%, transparent); color: var(--cat, #c8102e); }
.dk-tile-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.dk-tile-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dk-tile-name mark { background: none; color: var(--accent-ink); }
.dk-tile-sub { font-size: 12px; line-height: 1.4; color: var(--ink-faded); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dk-tile .home-card-star { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-faded); opacity: 0; transition: opacity .12s ease; }
.dk-tile:hover .home-card-star, .dk-tile .home-card-star.on, .dk-tile .home-card-star:focus-visible { opacity: 1; }
.dk-tile .home-card-star.on { color: var(--accent-ink); }
.dk-tile .home-card-star.on svg { fill: currentColor; }
.dk-tile .home-card-star:hover { background: var(--accent-pale); color: var(--accent-ink); }
.dk-empty { padding: 28px 16px; text-align: center; color: var(--ink-faded); font-size: 13.5px; border: 1px dashed var(--border); border-radius: 10px; }

/* ---- docs -------------------------------------------------------------------------------- */
.dk-docs { font-family: var(--font-ui); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.dk-docs-nav { position: sticky; top: calc(var(--dk-top-h) + 20px); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - var(--dk-top-h) - 44px); }
.dk-docs-search { position: relative; }
.dk-docs-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-faded); pointer-events: none; }
.dk-docs-search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; outline: none; }
.dk-docs-search input:focus { border-color: var(--accent); }
.dk-docs-list { overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.dk-docs-sec { padding: 12px 0 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faded); }
.dk-docs-link { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.dk-docs-link:hover { background: var(--panel); color: var(--ink); }
.dk-docs-link.active { background: var(--accent-pale); color: var(--accent-ink); font-weight: 500; }
.dk-docs-link svg { flex: 0 0 auto; color: var(--ink-faded); }
.dk-docs-link.active svg { color: var(--accent-ink); }
.dk-docs-body { min-width: 0; max-width: 780px; }
.dk-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); margin-bottom: 24px; flex-wrap: wrap; }
.dk-tab { height: 28px; padding: 0 12px; border-radius: 6px; border: 0; background: none; color: var(--ink-soft); font: 500 12.5px var(--font-ui); cursor: pointer; }
.dk-tab:hover { color: var(--ink); background: var(--bg); }
.dk-tab.active { background: var(--invert-bg); color: var(--invert-ink); }
.dk-docs-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faded); margin-bottom: 8px; }
.dk-docs-eyebrow b { color: var(--cat, var(--accent-ink)); font-weight: 600; }
.dk-docs-title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px; text-wrap: balance; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dk-docs-title .dk-tile-ic { width: 40px; height: 40px; flex: 0 0 40px; }
.dk-docs-lede { font-size: 15px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 18px; max-width: 65ch; }
.dk-docs-intro { margin: 0 0 18px; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--panel); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.dk-docs-intro-h { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.dk-docs-intro p { margin: 0; }
.dk-docs-intro p + p { margin-top: 8px; }
.dk-docs-intro b { color: var(--ink); }
.dk-docs-intro kbd { font: inherit; font-size: 12px; padding: 1px 5px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg); }
.dk-docs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dk-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); font: 500 13px var(--font-ui); cursor: pointer; }
.dk-btn:hover { border-color: var(--border-strong); background: var(--bg); }
.dk-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dk-btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.dk-docs-body .tool-help { max-width: none; margin: 8px 0 0; padding-top: 22px; }
.dk-docs-body .tool-help h2:first-child { margin-top: 0; }
.dk-docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 28px; }
.dk-docs-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.dk-docs-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dk-docs-card b { font-size: 13.5px; font-weight: 600; }
.dk-docs-card span { font-size: 12.5px; color: var(--ink-faded); line-height: 1.45; }
.dk-docs-index { columns: 2; column-gap: 32px; }
.dk-docs-index h3 { break-after: avoid; font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.dk-docs-index ul { list-style: none; margin: 0 0 18px; padding: 0; break-inside: avoid-column; }
.dk-docs-index li { margin: 0; }
.dk-docs-index button { background: none; border: 0; padding: 3px 0; color: var(--ink-soft); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.dk-docs-index button:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---- responsive -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .dk-docs { grid-template-columns: 1fr; gap: 20px; }
  .dk-docs-nav { position: static; max-height: 260px; }
  .dk-docs-index { columns: 1; }
}
@media (max-width: 900px) {
  :root { --dk-w: 0px; }
  html[data-dk-collapsed] { --dk-w: 0px; }
  body { padding-left: 0; }
  .dk-side { width: 288px; transform: translateX(-100%); box-shadow: none; }
  .dk-side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.45); }
  html[data-dk-collapsed] .dk-side { width: 288px; }
  html[data-dk-collapsed] .dk-brand-text, html[data-dk-collapsed] .dk-search-input, html[data-dk-collapsed] .dk-item-lbl, html[data-dk-collapsed] .dk-count, html[data-dk-collapsed] .dk-eyebrow, html[data-dk-collapsed] .dk-sec-lbl, html[data-dk-collapsed] .dk-chev, html[data-dk-collapsed] .dk-lang-wrap, html[data-dk-collapsed] .dk-private, html[data-dk-collapsed] .dk-brand-ver, html[data-dk-collapsed] .dk-results { display: revert !important; }
  html[data-dk-collapsed] .dk-sec.open .dk-sec-body { display: block !important; }
  html[data-dk-collapsed] .dk-kbd { display: none !important; }
  html[data-dk-collapsed] .dk-brand { flex-direction: row; height: var(--dk-top-h); padding: 0 12px 0 14px; }
  html[data-dk-collapsed] .dk-search { margin: 12px 12px 6px; justify-content: flex-start; }
  html[data-dk-collapsed] .dk-search-ic { position: absolute; width: auto; height: auto; padding: 0; pointer-events: none; }
  html[data-dk-collapsed] .dk-item, html[data-dk-collapsed] .dk-sec-head { width: 100%; margin: 0; padding: 0 10px; justify-content: flex-start; }
  html[data-dk-collapsed] .dk-sec-head { padding: 0 8px 0 6px; }
  html[data-dk-collapsed] .dk-foot-row { flex-direction: row; }
  .dk-collapse { display: none; }
  .dk-overlay { position: fixed; inset: 0; z-index: 115; background: rgba(6, 8, 12, .55); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .dk-overlay.on { opacity: 1; pointer-events: auto; }
  .dk-menu { display: grid; }
  .dk-topbar { padding: 0 14px 0 10px; gap: 10px; }
  .dk-crumb { display: none; }
  .dk-topbtn span { display: none; }
  .dk-topbtn { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-side, body, .dk-tile, .dk-chev, .dk-overlay { transition: none; }
}
