Open demo

CSS code

HTML
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
  <symbol id="dk-i-trash" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 7h15M10 11v6M14 11v6M6.5 7l1 12a1.5 1.5 0 0 0 1.5 1.4h6a1.5 1.5 0 0 0 1.5-1.4l1-12M9.5 7V4.5h5V7"/></symbol>
  <symbol id="dk-i-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m8 12.3 2.7 2.7L16 9.6"/></symbol>
  <symbol id="dk-i-err" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m9 9 6 6M15 9l-6 6"/></symbol>
  <symbol id="dk-i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.75h.01"/></symbol>
  <symbol id="dk-i-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4 2.8 19.5h18.4z"/><path d="M12 10v4.5M12 17.25h.01"/></symbol>
  <symbol id="dk-i-x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"/></symbol>
  <symbol id="dk-i-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="8.5" y="8.5" width="11.5" height="11.5" rx="2"/><path d="M15.5 8.5V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7.5a2 2 0 0 0 2 2h2.5"/></symbol>
  <symbol id="dk-i-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v11M7.5 10.5 12 15l4.5-4.5M5 19.5h14"/></symbol>
  <symbol id="dk-i-users" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8.5" r="3.5"/><path d="M3 19.5c.6-3.3 3-5 6-5s5.4 1.7 6 5"/><path d="M15.5 5.2a3.5 3.5 0 0 1 0 6.6M17.5 14.7c1.8.6 3 2.2 3.5 4.8"/></symbol>
  <symbol id="dk-i-edit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20h4L19 9l-4-4L4 16z"/><path d="m13.5 6.5 4 4"/></symbol>
  <symbol id="dk-i-branch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6.5" cy="5.5" r="2"/><circle cx="6.5" cy="18.5" r="2"/><circle cx="17.5" cy="7.5" r="2"/><path d="M6.5 7.5v9M17.5 9.5c0 4-4 5-11 7"/></symbol>
  <symbol id="dk-i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3L19.5 9"/><path d="M19.5 4.5V9H15"/></symbol>
  <symbol id="dk-i-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></symbol>
  <symbol id="dk-i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2"/></symbol>
  <symbol id="dk-i-rocket" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 15c-1.5 1.3-2 4-2 4s2.7-.5 4-2M14.5 4.5C17.5 3 21 3 21 3s0 3.5-1.5 6.5L13 16l-5-5z"/><path d="m9.5 12.5-3-1L8.5 9h4M11.5 14.5l1 3 2.5-2V11.5"/></symbol>
  <symbol id="dk-i-settings" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></symbol>
  <symbol id="dk-i-terminal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4.5" width="18" height="15" rx="2"/><path d="m7 9.5 3 2.5-3 2.5M12.5 15H17"/></symbol>
  <symbol id="dk-i-key" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="15" r="4"/><path d="m11 12 8.5-8.5M16 7l2.5 2.5M14 9l2 2"/></symbol>
  <symbol id="dk-i-chevr" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></symbol>
</svg>
<div class="cols">
<section><span class="lbl">Dialog · native <dialog>, opens as a modal</span><div class="stack" style="gap:16px">
<div class="hrow"><button class="dk-btn dk-btn--danger" type="button" data-dialog-open="dlg-env"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete environment…</button></div>
<dialog class="dk-dialog" id="dlg-env" aria-labelledby="dlg-env-t" aria-describedby="dlg-env-d" open><form method="dialog"><div class="dk-dialog__body"><span class="dk-dialog__icon" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg></span><div><h2 id="dlg-env-t">Delete the staging environment?</h2><p id="dlg-env-d">This removes <code>staging</code>, its 14 environment variables and 3 preview domains. Production is not affected. This cannot be undone.</p></div></div><div class="dk-dialog__foot"><button class="dk-btn" value="cancel">Cancel</button><button class="dk-btn dk-btn--danger" value="delete">Delete environment</button></div></form></dialog>
</div></section>
<section><span class="lbl">Toasts · in a status region</span><div role="status"><ul class="dk-toasts">
<li class="dk-toast dk-toast--success" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p class="dk-toast__text"><b>Deployment ready</b>atlas-api is live on production in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="dk-toast dk-toast--danger" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p class="dk-toast__text"><b>Build failed</b>Step 4 of 7: npm run build exited with code 1.</p><button class="dk-x" type="button" aria-label="Dismiss: Build failed" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="dk-toast dk-toast--accent" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p class="dk-toast__text"><b>Invite sent</b>Leo Brandt can join Northwind Labs for 7 days.</p><button class="dk-x" type="button" aria-label="Dismiss: Invite sent" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
</ul></div></section></div>
<section><span class="lbl">Alerts · info, success, warning, danger</span><div class="cols" style="gap:12px">
<div class="dk-alert dk-alert--accent" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p style="margin:0"><b>Scheduled maintenance</b>The EU dashboard is read-only on 21 Oct, 02:00 to 02:30 UTC.</p></div>
<div class="dk-alert dk-alert--success" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p style="margin:0"><b>Domain verified</b>api.northwind.dev now serves traffic over HTTPS.</p></div>
<div class="dk-alert dk-alert--warning" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-warn"/></svg><p style="margin:0"><b>You have used 92% of build minutes</b>Builds queue once you reach 6,000 minutes this cycle.</p></div>
<div class="dk-alert dk-alert--danger" role="alert"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p style="margin:0"><b>Payment declined</b>Update the card ending 4417 before 24 Oct to keep production online.</p></div>
</div></section>
<div class="cols"><div class="stack" style="gap:44px">
<section><span class="lbl">Tooltips · hover or focus, Escape hides</span><div class="hrow" style="padding-top:34px">
<span class="dk-tip-wrap" data-tip data-open><button class="dk-btn dk-btn--icon" type="button" aria-label="Copy deployment URL" aria-describedby="tip-0"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-copy"/></svg></button><span class="dk-tip" role="tooltip" id="tip-0">Copy URL</span></span>
<span class="dk-tip-wrap" data-tip><button class="dk-btn dk-btn--icon" type="button" aria-label="Download logs" aria-describedby="tip-1"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-download"/></svg></button><span class="dk-tip" role="tooltip" id="tip-1">Download logs</span></span>
<span class="dk-tip-wrap" data-tip><button class="dk-btn dk-btn--icon" type="button" aria-label="Share with team" aria-describedby="tip-2"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg></button><span class="dk-tip" role="tooltip" id="tip-2">Share</span></span>
</div></section>
<section style="min-height:230px"><span class="lbl">Dropdown menu</span><details class="dk-dd" data-menu open><summary class="dk-btn">Deployment actions<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chev"/></svg></summary><ul class="dk-menu">
<li><button type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-edit"/></svg>Rename<kbd class="dk-kbd">R</kbd></button></li>
<li><button type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-branch"/></svg>Change branch<kbd class="dk-kbd">B</kbd></button></li>
<li><button type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-refresh"/></svg>Redeploy<kbd class="dk-kbd">⇧ R</kbd></button></li>
<li class="dk-menu__sep"><button type="button" class="dk-danger"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete deployment</button></li></ul></details></section>
</div><section><span class="lbl">Command menu</span><div class="dk-cmd">
<label class="dk-cmd__search"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-search"/></svg><span class="dk-sr">Search commands</span><input type="text" placeholder="Type a command or search" value="dep"></label><div class="dk-cmd__list">
<h3>Suggestions</h3><ul>
<li><button class="dk-cmd__item" type="button" data-active><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy atlas-api to production<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-terminal"/></svg>Open runtime logs<span class="dk-cmd__keys" aria-hidden="true"><kbd class="dk-kbd">G</kbd><kbd class="dk-kbd">L</kbd></span></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-settings"/></svg>Project settings<span class="dk-cmd__keys" aria-hidden="true"><kbd class="dk-kbd">G</kbd><kbd class="dk-kbd">S</kbd></span></button></li>
</ul>
<h3>Actions</h3><ul>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-key"/></svg>Create access token<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg>Invite a teammate<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
</ul>
</div><div class="dk-cmd__foot" aria-hidden="true"><span><kbd class="dk-kbd">↑</kbd><kbd class="dk-kbd">↓</kbd>move</span><span><kbd class="dk-kbd">↵</kbd>run</span><span><kbd class="dk-kbd">esc</kbd>close</span></div></div></section></div>
CSS
/* ── Dark UI kit tokens (uiCookies) — identical in every set ──────────────────────────────
   Dark first. Elevation is a lighter surface, not a shadow: surface-0 is the page, 1 cards and
   panels, 2 controls, menus and dialogs, 3 hover, selected rows and tooltips.
   Every colour is a light-dark() pair, so flipping color-scheme turns the whole kit light:
   data-theme="dark" | "light" | "system" on any wrapper (system follows prefers-color-scheme),
   or a checked .theme-pick radio inside a [data-theme] element (:has()).
   Contrast, dark | light, on the worst surface (surface-3): text-1 12.2 | 15.0, text-2 6.6 | 7.3,
   text-3 4.8 | 5.4, accent 5.4 | 5.1, success 7.7 | 5.0, warning 8.4 | 5.2, danger 6.8 | 5.0;
   edge (control boundaries) 3.3 | 3.1 and focus 7.9 | 5.9 against every surface. */
:root{color-scheme:dark}
[data-theme="dark"]{color-scheme:dark}
[data-theme="light"]{color-scheme:light}
[data-theme="system"]{color-scheme:light dark}
[data-theme]:has(.theme-pick[value="dark"]:checked){color-scheme:dark}
[data-theme]:has(.theme-pick[value="light"]:checked){color-scheme:light}
[data-theme]:has(.theme-pick[value="system"]:checked){color-scheme:light dark}
:root{
  --surface-0:light-dark(#eef1f5,#0b0d12);   /* page */
  --surface-1:light-dark(#ffffff,#151821);   /* cards, panels, navbar, sidebar */
  --surface-2:light-dark(#f6f7f9,#1d212c);   /* controls, menus, dialogs, toasts */
  --surface-3:light-dark(#e6e9ef,#262b38);   /* hover, selected rows, tooltips */
  --text-1:light-dark(#12151c,#eceef3);      /* primary text */
  --text-2:light-dark(#434a5a,#aab1bf);      /* secondary text */
  --text-3:light-dark(#555d6e,#8f96a8);      /* captions, placeholders, axis labels */
  --border:light-dark(#dde1e8,#2a2f3c);      /* decorative 1px dividers and card edges */
  --edge:light-dark(#7c8496,#737b90);        /* control boundaries: fields, boxes, tracks */
  --accent:light-dark(#4452d0,#8b97ff);      /* the one vivid colour: links, selected, primary */
  --accent-soft:light-dark(#e6e8ff,#232a4d); /* selected backgrounds; accent text keeps 5.2 | 5.3 on it */
  --on-accent:light-dark(#ffffff,#0b0d12);   /* text on accent fills, 6.2 | 7.4 */
  --success:light-dark(#11713f,#5fd4a0);     /* desaturated for dark, so they do not vibrate */
  --warning:light-dark(#875500,#f0c060);
  --danger:light-dark(#bb2532,#ff9790);
  --focus:light-dark(#3b48c4,#b5bdff);       /* 2px focus ring */
  --highlight:light-dark(rgb(255 255 255 / 0),rgb(255 255 255 / .045)); /* 1px top light on dark surfaces */
  --shadow-color:light-dark(rgb(16 24 40 / .16),rgb(0 0 0 / .55));     /* overlays only */
  --radius:12px;--radius-sm:8px;
  --mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
}
/* No light-dark() (Chrome < 123, Safari < 17.5, Firefox < 120): the same values, chosen by attribute */
@supports not (color:light-dark(#fff,#000)){
  :root,[data-theme="dark"]{--surface-0:#0b0d12;--surface-1:#151821;--surface-2:#1d212c;--surface-3:#262b38;--text-1:#eceef3;--text-2:#aab1bf;--text-3:#8f96a8;--border:#2a2f3c;--edge:#737b90;--accent:#8b97ff;--accent-soft:#232a4d;--on-accent:#0b0d12;--success:#5fd4a0;--warning:#f0c060;--danger:#ff9790;--focus:#b5bdff;--highlight:rgb(255 255 255 / .045);--shadow-color:rgb(0 0 0 / .55)}
  [data-theme="light"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}
  @media (prefers-color-scheme:light){[data-theme="system"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}}
}
@media (prefers-contrast:more){:root{--border:var(--edge);--text-3:var(--text-2)}}
[data-theme]{background:var(--surface-0);color:var(--text-1)}
/* Components */
:where([class^="dk-"],[class*=" dk-"]),:where([class^="dk-"],[class*=" dk-"])::before,:where([class^="dk-"],[class*=" dk-"])::after{box-sizing:border-box}
.dk-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.dk-ico{width:18px;height:18px;flex:none}
.dk-kbd{display:inline-grid;place-items:center;min-width:1.45rem;height:1.35rem;padding:0 .35rem;border:1px solid var(--border);border-bottom-width:2px;
  border-radius:5px;background:var(--surface-2);color:var(--text-2);font:500 .72rem/1 var(--mono)}
.dk-link{color:var(--accent);font-weight:600;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent) 45%,transparent);text-underline-offset:3px}
.dk-link:hover{text-decoration-color:currentColor}
.dk-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:3px}
/* Buttons: one recipe, variants only swap four custom properties */
.dk-btn{--b-bg:var(--surface-2);--b-fg:var(--text-1);--b-bd:var(--border);--b-hover:var(--surface-3);
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:38px;padding:.5rem 1rem;
  border:1px solid var(--b-bd);border-radius:var(--radius-sm);background:var(--b-bg);color:var(--b-fg);
  font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.2;text-decoration:none;white-space:nowrap;cursor:pointer;
  box-shadow:inset 0 1px 0 var(--highlight);transition:background-color .15s,border-color .15s,color .15s}
.dk-btn:hover{background:var(--b-hover)}
.dk-btn:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.dk-btn--primary{--b-bg:var(--accent);--b-fg:var(--on-accent);--b-bd:var(--accent);--b-hover:color-mix(in srgb,var(--accent) 86%,var(--text-1))}
.dk-btn--ghost{--b-bg:transparent;--b-bd:transparent;--b-fg:var(--text-2);box-shadow:none}
.dk-btn--ghost:hover{color:var(--text-1)}
.dk-btn--danger{--b-fg:var(--danger);--b-bd:color-mix(in srgb,var(--danger) 40%,var(--border))}
.dk-btn--sm{min-height:32px;padding:.35rem .75rem;font-size:.8rem}
.dk-btn--lg{min-height:46px;padding:.7rem 1.35rem;font-size:.95rem}
.dk-btn--block{width:100%}
.dk-btn:disabled{opacity:.5;cursor:not-allowed}
.dk-btn[aria-busy="true"]{cursor:progress}
.dk-btn:disabled:hover{background:var(--b-bg)}
.dk-btn--icon{width:38px;padding:0}
.dk-btn--icon.dk-btn--sm{width:32px}
.dk-btn--icon.dk-btn--lg{width:46px}
.dk-btn--round{border-radius:999px}
.dk-spin{width:15px;height:15px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:dk-spin .75s linear infinite}
@keyframes dk-spin{to{transform:rotate(1turn)}}
@media (prefers-reduced-motion:reduce){.dk-btn{transition:none}.dk-spin{animation-duration:2.4s}}
/* Dialog: a native <dialog>. Shown inline here (open); showModal() makes it a centred modal */
.dk-dialog{position:relative;inset:auto;width:100%;max-width:440px;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);color:var(--text-1);
  box-shadow:inset 0 1px 0 var(--highlight),0 24px 64px -16px var(--shadow-color)}
.dk-dialog:modal{position:fixed;inset:0;margin:auto;max-width:min(440px,calc(100vw - 32px));height:fit-content}
.dk-dialog::backdrop{background:rgb(5 6 10 / .66)}
.dk-dialog__body{display:grid;grid-template-columns:auto 1fr;gap:14px;padding:22px 22px 18px}
.dk-dialog__icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--danger)}
.dk-dialog h2{margin:0;font-size:1.05rem;font-weight:650;letter-spacing:-.01em}
.dk-dialog p{margin:6px 0 0;font-size:.88rem;color:var(--text-2)}
.dk-dialog code{font:600 .82rem var(--mono);color:var(--text-1)}
.dk-dialog__foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--border);background:var(--surface-1);border-radius:0 0 var(--radius) var(--radius)}
/* Toasts: surface-2 with a soft shadow, a coloured icon and a close button */
.dk-toasts{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.dk-toast{--t:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:12px 12px 12px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 14px 36px -14px var(--shadow-color)}
.dk-toast>.dk-ico{margin-top:1px;color:var(--t)}
.dk-toast__text{flex:1;min-width:0;margin:0;font-size:.85rem;color:var(--text-2)}
.dk-toast__text b{display:block;color:var(--text-1);font-weight:600}
.dk-toast--success{--t:var(--success)}.dk-toast--danger{--t:var(--danger)}
.dk-x{display:grid;place-items:center;flex:none;width:28px;height:28px;margin:-2px -2px 0 0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--text-2);cursor:pointer}
.dk-x:hover{background:var(--surface-3);color:var(--text-1)}
.dk-x:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.dk-x .dk-ico{width:16px;height:16px}
/* Alerts: a hint of the semantic colour in the fill, the full colour on the icon and edge */
.dk-alert{--a:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:13px 16px;border:1px solid color-mix(in srgb,var(--a) 38%,var(--border));border-radius:var(--radius-sm);
  background:color-mix(in srgb,var(--a) 7%,var(--surface-1));font-size:.86rem;color:var(--text-2)}
.dk-alert>.dk-ico{margin-top:1px;color:var(--a)}
.dk-alert b{display:block;color:var(--text-1);font-weight:600}
.dk-alert--success{--a:var(--success)}.dk-alert--warning{--a:var(--warning)}.dk-alert--danger{--a:var(--danger)}
/* Tooltip: shown on hover and keyboard focus, hidden again with Escape */
.dk-tip-wrap{position:relative;display:inline-flex}
.dk-tip{position:absolute;bottom:calc(100% + 9px);left:50%;z-index:5;padding:5px 9px;border:1px solid var(--border);border-radius:6px;background:var(--surface-3);color:var(--text-1);
  font-size:.75rem;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transform:translate(-50%,4px);transition:opacity .15s,transform .15s,visibility .15s}
.dk-tip::after{content:"";position:absolute;top:100%;left:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border:solid var(--border);border-width:0 1px 1px 0;background:var(--surface-3);transform:rotate(45deg)}
.dk-tip-wrap:is(:hover,:focus-within,[data-open]) .dk-tip{opacity:1;visibility:visible;transform:translate(-50%,0)}
.dk-tip-wrap[data-dismissed] .dk-tip{opacity:0;visibility:hidden}
/* Dropdown: <details> + a menu panel on surface-2 */
.dk-dd{position:relative;display:inline-block}
.dk-dd>summary{list-style:none}
.dk-dd>summary::-webkit-details-marker{display:none}
.dk-dd>summary .dk-ico:last-child{width:16px;height:16px;color:var(--text-3)}
.dk-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:5;min-width:230px;margin:0;padding:5px;border:1px solid var(--border);border-radius:var(--radius-sm);list-style:none;
  background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 16px 40px -12px var(--shadow-color)}
.dk-menu li+.dk-menu__sep{margin-top:5px;padding-top:5px;border-top:1px solid var(--border)}
.dk-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:.35rem .6rem;border:0;border-radius:6px;background:transparent;color:var(--text-1);font-family:inherit;font-size:.85rem;text-align:left;cursor:pointer}
.dk-menu button .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-menu button:hover,.dk-menu button:focus-visible{background:var(--surface-3);outline:none}
.dk-menu button:focus-visible{box-shadow:inset 0 0 0 2px var(--focus)}
.dk-menu .dk-kbd{margin-left:auto}
.dk-menu .dk-danger,.dk-menu .dk-danger .dk-ico{color:var(--danger)}
/* Command menu: a search field over grouped commands */
.dk-cmd{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 24px 64px -16px var(--shadow-color)}
.dk-cmd__search{display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--border);color:var(--text-3)}
.dk-cmd__search input{flex:1;min-width:0;height:50px;border:0;background:transparent;color:var(--text-1);font:inherit;font-size:.95rem}
.dk-cmd__search input::placeholder{color:var(--text-3);opacity:1}
.dk-cmd__search input:focus{outline:none}
.dk-cmd__search:focus-within{box-shadow:inset 0 -2px 0 var(--focus)}
.dk-cmd__list{padding:6px}
.dk-cmd__list h3{margin:0;padding:8px 10px 4px;font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-3)}
.dk-cmd__list ul{margin:0;padding:0;list-style:none}
.dk-cmd__item{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:.4rem .6rem;border:0;border-radius:6px;background:transparent;color:var(--text-1);font-family:inherit;font-size:.87rem;text-align:left;cursor:pointer}
.dk-cmd__item .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-cmd__item:hover,.dk-cmd__item:focus-visible,.dk-cmd__item[data-active]{background:var(--surface-3)}
.dk-cmd__item:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--focus)}
.dk-cmd__item[data-active] .dk-ico{color:var(--accent)}
.dk-cmd__item>.dk-ico:last-child,.dk-cmd__item .dk-cmd__keys{margin-left:auto}
.dk-cmd__keys{display:inline-flex;gap:3px}
.dk-cmd__foot{display:flex;flex-wrap:wrap;gap:14px;padding:9px 14px;border-top:1px solid var(--border);background:var(--surface-1);font-size:.75rem;color:var(--text-3)}
.dk-cmd__foot span{display:inline-flex;align-items:center;gap:6px}
@media (prefers-reduced-motion:reduce){.dk-tip{transition:none}}
JavaScript
// Dialog: opens as a real modal (focus trap, Escape, ::backdrop). Toasts: dismiss. Tooltips and menus: Escape closes them.
document.querySelectorAll('[data-dialog-open]').forEach(btn => btn.addEventListener('click', () => {
  const d = document.getElementById(btn.dataset.dialogOpen); if (!d) return;
  if (d.open) d.close(); d.showModal();
}));
document.querySelectorAll('[data-toast-dismiss]').forEach(btn => btn.addEventListener('click', () => btn.closest('[data-toast]')?.remove()));
document.addEventListener('keydown', e => {
  if (e.key !== 'Escape') return;
  document.querySelectorAll('[data-tip]').forEach(w => w.setAttribute('data-dismissed', ''));
  document.querySelectorAll('details[data-menu][open]').forEach(d => { d.open = false; d.querySelector('summary').focus(); });
});
document.querySelectorAll('[data-tip]').forEach(w => ['mouseleave', 'focusout'].forEach(ev => w.addEventListener(ev, () => { w.removeAttribute('data-dismissed'); w.removeAttribute('data-open'); })));
document.addEventListener('click', e => document.querySelectorAll('details[data-menu][open]').forEach(d => { if (!d.contains(e.target)) d.open = false; }));

Bootstrap 5 code

Requires: Bootstrap 5.3.8 CSS

HTML
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
  <symbol id="dk-i-trash" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 7h15M10 11v6M14 11v6M6.5 7l1 12a1.5 1.5 0 0 0 1.5 1.4h6a1.5 1.5 0 0 0 1.5-1.4l1-12M9.5 7V4.5h5V7"/></symbol>
  <symbol id="dk-i-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m8 12.3 2.7 2.7L16 9.6"/></symbol>
  <symbol id="dk-i-err" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m9 9 6 6M15 9l-6 6"/></symbol>
  <symbol id="dk-i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.75h.01"/></symbol>
  <symbol id="dk-i-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4 2.8 19.5h18.4z"/><path d="M12 10v4.5M12 17.25h.01"/></symbol>
  <symbol id="dk-i-x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"/></symbol>
  <symbol id="dk-i-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="8.5" y="8.5" width="11.5" height="11.5" rx="2"/><path d="M15.5 8.5V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7.5a2 2 0 0 0 2 2h2.5"/></symbol>
  <symbol id="dk-i-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v11M7.5 10.5 12 15l4.5-4.5M5 19.5h14"/></symbol>
  <symbol id="dk-i-users" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8.5" r="3.5"/><path d="M3 19.5c.6-3.3 3-5 6-5s5.4 1.7 6 5"/><path d="M15.5 5.2a3.5 3.5 0 0 1 0 6.6M17.5 14.7c1.8.6 3 2.2 3.5 4.8"/></symbol>
  <symbol id="dk-i-edit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20h4L19 9l-4-4L4 16z"/><path d="m13.5 6.5 4 4"/></symbol>
  <symbol id="dk-i-branch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6.5" cy="5.5" r="2"/><circle cx="6.5" cy="18.5" r="2"/><circle cx="17.5" cy="7.5" r="2"/><path d="M6.5 7.5v9M17.5 9.5c0 4-4 5-11 7"/></symbol>
  <symbol id="dk-i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3L19.5 9"/><path d="M19.5 4.5V9H15"/></symbol>
  <symbol id="dk-i-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></symbol>
  <symbol id="dk-i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2"/></symbol>
  <symbol id="dk-i-rocket" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 15c-1.5 1.3-2 4-2 4s2.7-.5 4-2M14.5 4.5C17.5 3 21 3 21 3s0 3.5-1.5 6.5L13 16l-5-5z"/><path d="m9.5 12.5-3-1L8.5 9h4M11.5 14.5l1 3 2.5-2V11.5"/></symbol>
  <symbol id="dk-i-settings" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></symbol>
  <symbol id="dk-i-terminal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4.5" width="18" height="15" rx="2"/><path d="m7 9.5 3 2.5-3 2.5M12.5 15H17"/></symbol>
  <symbol id="dk-i-key" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="15" r="4"/><path d="m11 12 8.5-8.5M16 7l2.5 2.5M14 9l2 2"/></symbol>
  <symbol id="dk-i-chevr" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></symbol>
</svg>
<div class="cols">
<section><span class="lbl">Dialog · native <dialog>, opens as a modal</span><div class="stack" style="gap:16px">
<div class="hrow"><button class="btn btn-dk btn-dk-danger" type="button" data-dialog-open="dlg-env"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete environment…</button></div>
<dialog class="dk-dialog" id="dlg-env" aria-labelledby="dlg-env-t" aria-describedby="dlg-env-d" open><form method="dialog" class="modal-content"><div class="dk-dialog__body modal-body"><span class="dk-dialog__icon" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg></span><div><h2 id="dlg-env-t" class="modal-title">Delete the staging environment?</h2><p id="dlg-env-d">This removes <code>staging</code>, its 14 environment variables and 3 preview domains. Production is not affected. This cannot be undone.</p></div></div><div class="modal-footer"><button class="btn btn-dk" value="cancel">Cancel</button><button class="btn btn-dk btn-dk-danger" value="delete">Delete environment</button></div></form></dialog>
</div></section>
<section><span class="lbl">Toasts · in a status region</span><div role="status"><ul class="dk-toasts">
<li class="toast show dk-toast dk-toast--success" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p class="dk-toast__text"><b>Deployment ready</b>atlas-api is live on production in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="toast show dk-toast dk-toast--danger" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p class="dk-toast__text"><b>Build failed</b>Step 4 of 7: npm run build exited with code 1.</p><button class="dk-x" type="button" aria-label="Dismiss: Build failed" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="toast show dk-toast dk-toast--accent" data-toast><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p class="dk-toast__text"><b>Invite sent</b>Leo Brandt can join Northwind Labs for 7 days.</p><button class="dk-x" type="button" aria-label="Dismiss: Invite sent" data-toast-dismiss><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
</ul></div></section></div>
<section><span class="lbl">Alerts · info, success, warning, danger</span><div class="cols" style="gap:12px">
<div class="alert dk-alert dk-alert--accent" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p class="mb-0"><b>Scheduled maintenance</b>The EU dashboard is read-only on 21 Oct, 02:00 to 02:30 UTC.</p></div>
<div class="alert dk-alert dk-alert--success" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p class="mb-0"><b>Domain verified</b>api.northwind.dev now serves traffic over HTTPS.</p></div>
<div class="alert dk-alert dk-alert--warning" role="note"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-warn"/></svg><p class="mb-0"><b>You have used 92% of build minutes</b>Builds queue once you reach 6,000 minutes this cycle.</p></div>
<div class="alert dk-alert dk-alert--danger" role="alert"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p class="mb-0"><b>Payment declined</b>Update the card ending 4417 before 24 Oct to keep production online.</p></div>
</div></section>
<div class="cols"><div class="stack" style="gap:44px">
<section><span class="lbl">Tooltips · hover or focus, Escape hides</span><div class="hrow" style="padding-top:34px">
<span class="dk-tip-wrap" data-tip data-open><button class="btn btn-dk btn-dk-icon" type="button" aria-label="Copy deployment URL" aria-describedby="tip-0"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-copy"/></svg></button><span class="dk-tip tooltip bs-tooltip-top" role="tooltip" id="tip-0"><span class="tooltip-inner">Copy URL</span></span></span>
<span class="dk-tip-wrap" data-tip><button class="btn btn-dk btn-dk-icon" type="button" aria-label="Download logs" aria-describedby="tip-1"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-download"/></svg></button><span class="dk-tip tooltip bs-tooltip-top" role="tooltip" id="tip-1"><span class="tooltip-inner">Download logs</span></span></span>
<span class="dk-tip-wrap" data-tip><button class="btn btn-dk btn-dk-icon" type="button" aria-label="Share with team" aria-describedby="tip-2"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg></button><span class="dk-tip tooltip bs-tooltip-top" role="tooltip" id="tip-2"><span class="tooltip-inner">Share</span></span></span>
</div></section>
<section style="min-height:230px"><span class="lbl">Dropdown menu</span><details class="dk-dd dropdown" data-menu open><summary class="btn btn-dk">Deployment actions<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chev"/></svg></summary><ul class="dk-menu dropdown-menu">
<li><button class="dropdown-item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-edit"/></svg>Rename<kbd class="dk-kbd">R</kbd></button></li>
<li><button class="dropdown-item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-branch"/></svg>Change branch<kbd class="dk-kbd">B</kbd></button></li>
<li><button class="dropdown-item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-refresh"/></svg>Redeploy<kbd class="dk-kbd">⇧ R</kbd></button></li>
<li><hr class="dropdown-divider"></li><li><button type="button" class="dropdown-item dk-danger"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete deployment</button></li></ul></details></section>
</div><section><span class="lbl">Command menu</span><div class="dk-cmd">
<label class="dk-cmd__search"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-search"/></svg><span class="visually-hidden">Search commands</span><input type="text" placeholder="Type a command or search" value="dep"></label><div class="dk-cmd__list">
<h3>Suggestions</h3><ul>
<li><button class="dk-cmd__item" type="button" data-active><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy atlas-api to production<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-terminal"/></svg>Open runtime logs<span class="dk-cmd__keys" aria-hidden="true"><kbd class="dk-kbd">G</kbd><kbd class="dk-kbd">L</kbd></span></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-settings"/></svg>Project settings<span class="dk-cmd__keys" aria-hidden="true"><kbd class="dk-kbd">G</kbd><kbd class="dk-kbd">S</kbd></span></button></li>
</ul>
<h3>Actions</h3><ul>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-key"/></svg>Create access token<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="dk-cmd__item" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg>Invite a teammate<svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
</ul>
</div><div class="dk-cmd__foot" aria-hidden="true"><span><kbd class="dk-kbd">↑</kbd><kbd class="dk-kbd">↓</kbd>move</span><span><kbd class="dk-kbd">↵</kbd>run</span><span><kbd class="dk-kbd">esc</kbd>close</span></div></div></section></div>
CSS
/* ── Dark UI kit tokens (uiCookies) — identical in every set ──────────────────────────────
   Dark first. Elevation is a lighter surface, not a shadow: surface-0 is the page, 1 cards and
   panels, 2 controls, menus and dialogs, 3 hover, selected rows and tooltips.
   Every colour is a light-dark() pair, so flipping color-scheme turns the whole kit light:
   data-theme="dark" | "light" | "system" on any wrapper (system follows prefers-color-scheme),
   or a checked .theme-pick radio inside a [data-theme] element (:has()).
   Contrast, dark | light, on the worst surface (surface-3): text-1 12.2 | 15.0, text-2 6.6 | 7.3,
   text-3 4.8 | 5.4, accent 5.4 | 5.1, success 7.7 | 5.0, warning 8.4 | 5.2, danger 6.8 | 5.0;
   edge (control boundaries) 3.3 | 3.1 and focus 7.9 | 5.9 against every surface. */
:root{color-scheme:dark}
[data-theme="dark"]{color-scheme:dark}
[data-theme="light"]{color-scheme:light}
[data-theme="system"]{color-scheme:light dark}
[data-theme]:has(.theme-pick[value="dark"]:checked){color-scheme:dark}
[data-theme]:has(.theme-pick[value="light"]:checked){color-scheme:light}
[data-theme]:has(.theme-pick[value="system"]:checked){color-scheme:light dark}
:root{
  --surface-0:light-dark(#eef1f5,#0b0d12);   /* page */
  --surface-1:light-dark(#ffffff,#151821);   /* cards, panels, navbar, sidebar */
  --surface-2:light-dark(#f6f7f9,#1d212c);   /* controls, menus, dialogs, toasts */
  --surface-3:light-dark(#e6e9ef,#262b38);   /* hover, selected rows, tooltips */
  --text-1:light-dark(#12151c,#eceef3);      /* primary text */
  --text-2:light-dark(#434a5a,#aab1bf);      /* secondary text */
  --text-3:light-dark(#555d6e,#8f96a8);      /* captions, placeholders, axis labels */
  --border:light-dark(#dde1e8,#2a2f3c);      /* decorative 1px dividers and card edges */
  --edge:light-dark(#7c8496,#737b90);        /* control boundaries: fields, boxes, tracks */
  --accent:light-dark(#4452d0,#8b97ff);      /* the one vivid colour: links, selected, primary */
  --accent-soft:light-dark(#e6e8ff,#232a4d); /* selected backgrounds; accent text keeps 5.2 | 5.3 on it */
  --on-accent:light-dark(#ffffff,#0b0d12);   /* text on accent fills, 6.2 | 7.4 */
  --success:light-dark(#11713f,#5fd4a0);     /* desaturated for dark, so they do not vibrate */
  --warning:light-dark(#875500,#f0c060);
  --danger:light-dark(#bb2532,#ff9790);
  --focus:light-dark(#3b48c4,#b5bdff);       /* 2px focus ring */
  --highlight:light-dark(rgb(255 255 255 / 0),rgb(255 255 255 / .045)); /* 1px top light on dark surfaces */
  --shadow-color:light-dark(rgb(16 24 40 / .16),rgb(0 0 0 / .55));     /* overlays only */
  --radius:12px;--radius-sm:8px;
  --mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
}
/* No light-dark() (Chrome < 123, Safari < 17.5, Firefox < 120): the same values, chosen by attribute */
@supports not (color:light-dark(#fff,#000)){
  :root,[data-theme="dark"]{--surface-0:#0b0d12;--surface-1:#151821;--surface-2:#1d212c;--surface-3:#262b38;--text-1:#eceef3;--text-2:#aab1bf;--text-3:#8f96a8;--border:#2a2f3c;--edge:#737b90;--accent:#8b97ff;--accent-soft:#232a4d;--on-accent:#0b0d12;--success:#5fd4a0;--warning:#f0c060;--danger:#ff9790;--focus:#b5bdff;--highlight:rgb(255 255 255 / .045);--shadow-color:rgb(0 0 0 / .55)}
  [data-theme="light"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}
  @media (prefers-color-scheme:light){[data-theme="system"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}}
}
@media (prefers-contrast:more){:root{--border:var(--edge);--text-3:var(--text-2)}}
[data-theme]{background:var(--surface-0);color:var(--text-1)}
/* Bootstrap's own variables mapped onto the kit tokens (identical in every Bootstrap set).
   data-bs-theme="dark" on <html> gives Bootstrap's dark defaults; the tokens then win. */
:root,[data-bs-theme],[data-theme]{
  --bs-body-bg:var(--surface-0);--bs-body-color:var(--text-1);--bs-emphasis-color:var(--text-1);
  --bs-heading-color:var(--text-1);--bs-secondary-color:var(--text-2);--bs-tertiary-color:var(--text-3);
  --bs-secondary-bg:var(--surface-2);--bs-tertiary-bg:var(--surface-3);
  --bs-border-color:var(--border);--bs-border-color-translucent:var(--border);
  --bs-border-radius:var(--radius-sm);--bs-border-radius-lg:var(--radius);--bs-border-radius-sm:6px;
  --bs-link-color:var(--accent);--bs-link-hover-color:var(--accent);
  --bs-focus-ring-color:var(--focus);--bs-code-color:var(--accent);
  --bs-font-monospace:var(--mono);
  --bs-success-text-emphasis:var(--success);--bs-warning-text-emphasis:var(--warning);--bs-danger-text-emphasis:var(--danger)}
/* Bootstrap draws the checkbox tick and select chevron as SVG images, which cannot read CSS
   variables, so each theme gets its own copy */
:root,[data-theme="dark"]{--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230b0d12' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aab1bf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
[data-theme="light"]{--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23434a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
@media (prefers-color-scheme:light){[data-theme="system"]{--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23434a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}}
[data-theme]:has(.theme-pick[value="dark"]:checked){--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230b0d12' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aab1bf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
[data-theme]:has(.theme-pick[value="light"]:checked){--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23434a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}
@media (prefers-color-scheme:light){[data-theme]:has(.theme-pick[value="system"]:checked){--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23434a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}}
@media (prefers-color-scheme:dark){[data-theme]:has(.theme-pick[value="system"]:checked){--dk-check-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230b0d12' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");--dk-select-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aab1bf' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}}
a{color:var(--accent)}
a:hover{color:var(--accent)}
/* Components */
.dk-ico{width:18px;height:18px;flex:none}
.dk-kbd{display:inline-grid;place-items:center;min-width:1.45rem;height:1.35rem;padding:0 .35rem;border:1px solid var(--border);border-bottom-width:2px;
  border-radius:5px;background:var(--surface-2);color:var(--text-2);font:500 .72rem/1 var(--mono)}
.dk-link{color:var(--accent);font-weight:600;text-decoration-color:color-mix(in srgb,var(--accent) 45%,transparent);text-underline-offset:3px}
.dk-link:hover{color:var(--accent);text-decoration-color:currentColor}
.dk-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:3px;box-shadow:none}
/* .btn variants through --bs-btn-* */
.btn-dk{--bs-btn-padding-x:1rem;--bs-btn-padding-y:.5rem;--bs-btn-font-size:.875rem;--bs-btn-font-weight:600;--bs-btn-line-height:1.2;--bs-btn-border-radius:var(--radius-sm);
  --bs-btn-bg:var(--surface-2);--bs-btn-color:var(--text-1);--bs-btn-border-color:var(--border);
  --bs-btn-hover-bg:var(--surface-3);--bs-btn-hover-color:var(--text-1);--bs-btn-hover-border-color:var(--border);
  --bs-btn-active-bg:var(--surface-3);--bs-btn-active-color:var(--text-1);--bs-btn-active-border-color:var(--border);
  --bs-btn-disabled-bg:var(--surface-2);--bs-btn-disabled-color:var(--text-1);--bs-btn-disabled-border-color:var(--border);--bs-btn-disabled-opacity:.5;
  --bs-btn-focus-box-shadow:inset 0 1px 0 var(--highlight);
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:38px;white-space:nowrap;box-shadow:inset 0 1px 0 var(--highlight)}
.btn-dk:focus-visible,.btn-check:focus-visible+.btn-dk{outline:2px solid var(--focus);outline-offset:2px}
.btn-dk-primary{--bs-btn-bg:var(--accent);--bs-btn-color:var(--on-accent);--bs-btn-border-color:var(--accent);
  --bs-btn-hover-bg:color-mix(in srgb,var(--accent) 86%,var(--text-1));--bs-btn-hover-color:var(--on-accent);--bs-btn-hover-border-color:var(--accent);
  --bs-btn-active-bg:color-mix(in srgb,var(--accent) 86%,var(--text-1));--bs-btn-active-color:var(--on-accent);--bs-btn-active-border-color:var(--accent);
  --bs-btn-disabled-bg:var(--accent);--bs-btn-disabled-color:var(--on-accent);--bs-btn-disabled-border-color:var(--accent)}
.btn-dk-ghost{--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-color:var(--text-2);--bs-btn-hover-border-color:transparent;--bs-btn-active-border-color:transparent;box-shadow:none}
.btn-dk-danger{--bs-btn-color:var(--danger);--bs-btn-border-color:color-mix(in srgb,var(--danger) 40%,var(--border));--bs-btn-hover-color:var(--danger);
  --bs-btn-hover-border-color:color-mix(in srgb,var(--danger) 40%,var(--border));--bs-btn-active-color:var(--danger)}
.btn-dk.btn-sm{--bs-btn-padding-x:.75rem;--bs-btn-padding-y:.35rem;--bs-btn-font-size:.8rem;min-height:32px}
.btn-dk.btn-lg{--bs-btn-padding-x:1.35rem;--bs-btn-padding-y:.7rem;--bs-btn-font-size:.95rem;--bs-btn-border-radius:var(--radius-sm);min-height:46px}
.btn-dk-icon{--bs-btn-padding-x:0;--bs-btn-padding-y:0;width:38px}
.btn-dk-icon.btn-sm{width:32px}.btn-dk-icon.btn-lg{width:46px}
.btn-dk.btn-dk-round{--bs-btn-border-radius:999px}
@media (prefers-reduced-motion:reduce){.btn-dk{transition:none}}
/* Dialog: a native <dialog>. Shown inline here (open); showModal() makes it a centred modal */
.dk-dialog{position:relative;inset:auto;width:100%;max-width:440px;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);color:var(--text-1);
  box-shadow:inset 0 1px 0 var(--highlight),0 24px 64px -16px var(--shadow-color)}
.dk-dialog:modal{position:fixed;inset:0;margin:auto;max-width:min(440px,calc(100vw - 32px));height:fit-content}
.dk-dialog::backdrop{background:rgb(5 6 10 / .66)}
.dk-dialog__body{display:grid;grid-template-columns:auto 1fr;gap:14px;padding:22px 22px 18px}
.dk-dialog__icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--danger)}
.dk-dialog h2{margin:0;font-size:1.05rem;font-weight:650;letter-spacing:-.01em}
.dk-dialog p{margin:6px 0 0;font-size:.88rem;color:var(--text-2)}
.dk-dialog code{font:600 .82rem var(--mono);color:var(--text-1)}
.dk-dialog__foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid var(--border);background:var(--surface-1);border-radius:0 0 var(--radius) var(--radius)}
/* Toasts: surface-2 with a soft shadow, a coloured icon and a close button */
.dk-toasts{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.dk-toast{--t:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:12px 12px 12px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 14px 36px -14px var(--shadow-color)}
.dk-toast>.dk-ico{margin-top:1px;color:var(--t)}
.dk-toast__text{flex:1;min-width:0;margin:0;font-size:.85rem;color:var(--text-2)}
.dk-toast__text b{display:block;color:var(--text-1);font-weight:600}
.dk-toast--success{--t:var(--success)}.dk-toast--danger{--t:var(--danger)}
.dk-x{display:grid;place-items:center;flex:none;width:28px;height:28px;margin:-2px -2px 0 0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--text-2);cursor:pointer}
.dk-x:hover{background:var(--surface-3);color:var(--text-1)}
.dk-x:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
.dk-x .dk-ico{width:16px;height:16px}
/* Alerts: a hint of the semantic colour in the fill, the full colour on the icon and edge */
.dk-alert{--a:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:13px 16px;border:1px solid color-mix(in srgb,var(--a) 38%,var(--border));border-radius:var(--radius-sm);
  background:color-mix(in srgb,var(--a) 7%,var(--surface-1));font-size:.86rem;color:var(--text-2)}
.dk-alert>.dk-ico{margin-top:1px;color:var(--a)}
.dk-alert b{display:block;color:var(--text-1);font-weight:600}
.dk-alert--success{--a:var(--success)}.dk-alert--warning{--a:var(--warning)}.dk-alert--danger{--a:var(--danger)}
/* Tooltip: shown on hover and keyboard focus, hidden again with Escape */
.dk-tip-wrap{position:relative;display:inline-flex}
.dk-tip{position:absolute;bottom:calc(100% + 9px);left:50%;z-index:5;padding:5px 9px;border:1px solid var(--border);border-radius:6px;background:var(--surface-3);color:var(--text-1);
  font-size:.75rem;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transform:translate(-50%,4px);transition:opacity .15s,transform .15s,visibility .15s}
.dk-tip::after{content:"";position:absolute;top:100%;left:50%;width:8px;height:8px;margin:-4px 0 0 -4px;border:solid var(--border);border-width:0 1px 1px 0;background:var(--surface-3);transform:rotate(45deg)}
.dk-tip-wrap:is(:hover,:focus-within,[data-open]) .dk-tip{opacity:1;visibility:visible;transform:translate(-50%,0)}
.dk-tip-wrap[data-dismissed] .dk-tip{opacity:0;visibility:hidden}
/* Dropdown: <details> + a menu panel on surface-2 */
.dk-dd{position:relative;display:inline-block}
.dk-dd>summary{list-style:none}
.dk-dd>summary::-webkit-details-marker{display:none}
.dk-dd>summary .dk-ico:last-child{width:16px;height:16px;color:var(--text-3)}
.dk-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:5;min-width:230px;margin:0;padding:5px;border:1px solid var(--border);border-radius:var(--radius-sm);list-style:none;
  background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 16px 40px -12px var(--shadow-color)}
.dk-menu li+.dk-menu__sep{margin-top:5px;padding-top:5px;border-top:1px solid var(--border)}
.dk-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:.35rem .6rem;border:0;border-radius:6px;background:transparent;color:var(--text-1);font-family:inherit;font-size:.85rem;text-align:left;cursor:pointer}
.dk-menu button .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-menu button:hover,.dk-menu button:focus-visible{background:var(--surface-3);outline:none}
.dk-menu button:focus-visible{box-shadow:inset 0 0 0 2px var(--focus)}
.dk-menu .dk-kbd{margin-left:auto}
.dk-menu .dk-danger,.dk-menu .dk-danger .dk-ico{color:var(--danger)}
/* Command menu: a search field over grouped commands */
.dk-cmd{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);box-shadow:inset 0 1px 0 var(--highlight),0 24px 64px -16px var(--shadow-color)}
.dk-cmd__search{display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--border);color:var(--text-3)}
.dk-cmd__search input{flex:1;min-width:0;height:50px;border:0;background:transparent;color:var(--text-1);font:inherit;font-size:.95rem}
.dk-cmd__search input::placeholder{color:var(--text-3);opacity:1}
.dk-cmd__search input:focus{outline:none}
.dk-cmd__search:focus-within{box-shadow:inset 0 -2px 0 var(--focus)}
.dk-cmd__list{padding:6px}
.dk-cmd__list h3{margin:0;padding:8px 10px 4px;font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-3)}
.dk-cmd__list ul{margin:0;padding:0;list-style:none}
.dk-cmd__item{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:.4rem .6rem;border:0;border-radius:6px;background:transparent;color:var(--text-1);font-family:inherit;font-size:.87rem;text-align:left;cursor:pointer}
.dk-cmd__item .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-cmd__item:hover,.dk-cmd__item:focus-visible,.dk-cmd__item[data-active]{background:var(--surface-3)}
.dk-cmd__item:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--focus)}
.dk-cmd__item[data-active] .dk-ico{color:var(--accent)}
.dk-cmd__item>.dk-ico:last-child,.dk-cmd__item .dk-cmd__keys{margin-left:auto}
.dk-cmd__keys{display:inline-flex;gap:3px}
.dk-cmd__foot{display:flex;flex-wrap:wrap;gap:14px;padding:9px 14px;border-top:1px solid var(--border);background:var(--surface-1);font-size:.75rem;color:var(--text-3)}
.dk-cmd__foot span{display:inline-flex;align-items:center;gap:6px}
@media (prefers-reduced-motion:reduce){.dk-tip{transition:none}}
/* Bootstrap pieces recoloured: .modal-content, .toast, .alert, .tooltip, .dropdown-menu */
.dk-dialog .modal-content{--bs-modal-bg:transparent;--bs-modal-border-width:0;--bs-modal-footer-border-color:var(--border);--bs-modal-footer-bg:var(--surface-1)}
.dk-dialog .modal-footer{padding:14px 22px;gap:10px;border-radius:0 0 var(--radius) var(--radius)}
.dk-dialog .modal-footer>*{margin:0}
.dk-toast.toast{--bs-toast-bg:var(--surface-2);--bs-toast-color:var(--text-2);--bs-toast-border-color:var(--border);--bs-toast-border-radius:var(--radius);--bs-toast-max-width:100%;--bs-toast-box-shadow:inset 0 1px 0 var(--highlight),0 14px 36px -14px var(--shadow-color);width:100%;font-size:inherit}
.dk-alert.alert{--bs-alert-padding-x:16px;--bs-alert-padding-y:13px;--bs-alert-margin-bottom:0;--bs-alert-color:var(--text-2);--bs-alert-bg:color-mix(in srgb,var(--a) 7%,var(--surface-1));
  --bs-alert-border-color:color-mix(in srgb,var(--a) 38%,var(--border));--bs-alert-border-radius:var(--radius-sm)}
.dk-tip.tooltip{--bs-tooltip-bg:var(--surface-3);--bs-tooltip-color:var(--text-1);--bs-tooltip-font-size:.75rem;--bs-tooltip-padding-x:9px;--bs-tooltip-padding-y:5px;--bs-tooltip-opacity:1;--bs-tooltip-border-radius:6px;
  display:block;padding:0;margin:0;font-weight:500;white-space:nowrap}
.dk-tip.tooltip .tooltip-inner{border:1px solid var(--border);max-width:none}
.dk-tip.tooltip .tooltip-arrow{display:none}
.dk-menu.dropdown-menu{--bs-dropdown-bg:var(--surface-2);--bs-dropdown-border-color:var(--border);--bs-dropdown-border-radius:var(--radius-sm);--bs-dropdown-padding-x:5px;--bs-dropdown-padding-y:5px;
  --bs-dropdown-link-color:var(--text-1);--bs-dropdown-link-hover-color:var(--text-1);--bs-dropdown-link-hover-bg:var(--surface-3);--bs-dropdown-link-active-bg:var(--surface-3);--bs-dropdown-link-active-color:var(--text-1);
  --bs-dropdown-item-padding-x:.6rem;--bs-dropdown-item-padding-y:.35rem;--bs-dropdown-item-border-radius:6px;--bs-dropdown-divider-bg:var(--border);--bs-dropdown-font-size:.85rem;display:block}
.dk-menu .dropdown-item{display:flex;align-items:center;gap:10px;min-height:34px}
.dk-menu .dropdown-divider{margin:5px 0}
JavaScript
// Dialog: opens as a real modal (focus trap, Escape, ::backdrop). Toasts: dismiss. Tooltips and menus: Escape closes them.
document.querySelectorAll('[data-dialog-open]').forEach(btn => btn.addEventListener('click', () => {
  const d = document.getElementById(btn.dataset.dialogOpen); if (!d) return;
  if (d.open) d.close(); d.showModal();
}));
document.querySelectorAll('[data-toast-dismiss]').forEach(btn => btn.addEventListener('click', () => btn.closest('[data-toast]')?.remove()));
document.addEventListener('keydown', e => {
  if (e.key !== 'Escape') return;
  document.querySelectorAll('[data-tip]').forEach(w => w.setAttribute('data-dismissed', ''));
  document.querySelectorAll('details[data-menu][open]').forEach(d => { d.open = false; d.querySelector('summary').focus(); });
});
document.querySelectorAll('[data-tip]').forEach(w => ['mouseleave', 'focusout'].forEach(ev => w.addEventListener(ev, () => { w.removeAttribute('data-dismissed'); w.removeAttribute('data-open'); })));
document.addEventListener('click', e => document.querySelectorAll('details[data-menu][open]').forEach(d => { if (!d.contains(e.target)) d.open = false; }));

Tailwind 4 code

Requires: Tailwind CSS 4

HTML
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
  <symbol id="dk-i-trash" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 7h15M10 11v6M14 11v6M6.5 7l1 12a1.5 1.5 0 0 0 1.5 1.4h6a1.5 1.5 0 0 0 1.5-1.4l1-12M9.5 7V4.5h5V7"/></symbol>
  <symbol id="dk-i-ok" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m8 12.3 2.7 2.7L16 9.6"/></symbol>
  <symbol id="dk-i-err" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="m9 9 6 6M15 9l-6 6"/></symbol>
  <symbol id="dk-i-info" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.75h.01"/></symbol>
  <symbol id="dk-i-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4 2.8 19.5h18.4z"/><path d="M12 10v4.5M12 17.25h.01"/></symbol>
  <symbol id="dk-i-x" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"/></symbol>
  <symbol id="dk-i-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="8.5" y="8.5" width="11.5" height="11.5" rx="2"/><path d="M15.5 8.5V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7.5a2 2 0 0 0 2 2h2.5"/></symbol>
  <symbol id="dk-i-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v11M7.5 10.5 12 15l4.5-4.5M5 19.5h14"/></symbol>
  <symbol id="dk-i-users" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="8.5" r="3.5"/><path d="M3 19.5c.6-3.3 3-5 6-5s5.4 1.7 6 5"/><path d="M15.5 5.2a3.5 3.5 0 0 1 0 6.6M17.5 14.7c1.8.6 3 2.2 3.5 4.8"/></symbol>
  <symbol id="dk-i-edit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20h4L19 9l-4-4L4 16z"/><path d="m13.5 6.5 4 4"/></symbol>
  <symbol id="dk-i-branch" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6.5" cy="5.5" r="2"/><circle cx="6.5" cy="18.5" r="2"/><circle cx="17.5" cy="7.5" r="2"/><path d="M6.5 7.5v9M17.5 9.5c0 4-4 5-11 7"/></symbol>
  <symbol id="dk-i-refresh" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3L19.5 9"/><path d="M19.5 4.5V9H15"/></symbol>
  <symbol id="dk-i-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></symbol>
  <symbol id="dk-i-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2"/></symbol>
  <symbol id="dk-i-rocket" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 15c-1.5 1.3-2 4-2 4s2.7-.5 4-2M14.5 4.5C17.5 3 21 3 21 3s0 3.5-1.5 6.5L13 16l-5-5z"/><path d="m9.5 12.5-3-1L8.5 9h4M11.5 14.5l1 3 2.5-2V11.5"/></symbol>
  <symbol id="dk-i-settings" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></symbol>
  <symbol id="dk-i-terminal" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4.5" width="18" height="15" rx="2"/><path d="m7 9.5 3 2.5-3 2.5M12.5 15H17"/></symbol>
  <symbol id="dk-i-key" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="15" r="4"/><path d="m11 12 8.5-8.5M16 7l2.5 2.5M14 9l2 2"/></symbol>
  <symbol id="dk-i-chevr" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></symbol>
</svg>
<div class="grid items-start gap-7 md:grid-cols-2">
<section><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Dialog · native <dialog>, opens as a modal</span><div class="flex min-w-0 flex-col gap-4">
<div class="flex flex-wrap items-center gap-3"><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-[color-mix(in_srgb,var(--danger)_40%,var(--border))] bg-surface-2 text-danger inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" type="button" data-dialog-open="dlg-env"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete environment…</button></div>
<dialog class="dialog-dk relative inset-auto m-0 w-full max-w-[440px] rounded-ui border border-line bg-surface-2 p-0 text-ink-1 shadow-[inset_0_1px_0_var(--highlight),0_24px_64px_-16px_var(--shadow-color)]" id="dlg-env" aria-labelledby="dlg-env-t" aria-describedby="dlg-env-d" open><form method="dialog"><div class="grid grid-cols-[auto_1fr] gap-3.5 px-[22px] pt-[22px] pb-[18px]"><span class="grid size-[38px] place-items-center rounded-[10px] bg-[color-mix(in_srgb,var(--danger)_14%,transparent)] text-danger" aria-hidden="true"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg></span><div><h2 class="text-[1.05rem] font-[650] tracking-[-.01em]" id="dlg-env-t">Delete the staging environment?</h2><p class="mt-1.5 text-[.88rem] text-ink-2" id="dlg-env-d">This removes <code class="font-mono text-[.82rem] font-semibold text-ink-1">staging</code>, its 14 environment variables and 3 preview domains. Production is not affected. This cannot be undone.</p></div></div><div class="flex flex-wrap justify-end gap-2.5 rounded-b-ui border-t border-line bg-surface-1 px-[22px] py-3.5"><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" value="cancel">Cancel</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-[color-mix(in_srgb,var(--danger)_40%,var(--border))] bg-surface-2 text-danger inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" value="delete">Delete environment</button></div></form></dialog>
</div></section>
<section><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Toasts · in a status region</span><div role="status"><ul class="grid gap-2.5">
<li class="flex items-start gap-3 rounded-ui border border-line bg-surface-2 py-3 pr-3 pl-3.5 shadow-[inset_0_1px_0_var(--highlight),0_14px_36px_-14px_var(--shadow-color)]" data-toast><svg class="size-[18px] shrink-0 mt-px text-success" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p class="min-w-0 flex-1 text-[.85rem] text-ink-2"><b class="block font-semibold text-ink-1">Deployment ready</b>atlas-api is live on production in 48 s.</p><button class="-mt-0.5 -mr-0.5 grid size-7 flex-none cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-surface-3 hover:text-ink-1 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus" type="button" aria-label="Dismiss: Deployment ready" data-toast-dismiss><svg class="size-4" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="flex items-start gap-3 rounded-ui border border-line bg-surface-2 py-3 pr-3 pl-3.5 shadow-[inset_0_1px_0_var(--highlight),0_14px_36px_-14px_var(--shadow-color)]" data-toast><svg class="size-[18px] shrink-0 mt-px text-danger" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p class="min-w-0 flex-1 text-[.85rem] text-ink-2"><b class="block font-semibold text-ink-1">Build failed</b>Step 4 of 7: npm run build exited with code 1.</p><button class="-mt-0.5 -mr-0.5 grid size-7 flex-none cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-surface-3 hover:text-ink-1 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus" type="button" aria-label="Dismiss: Build failed" data-toast-dismiss><svg class="size-4" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
<li class="flex items-start gap-3 rounded-ui border border-line bg-surface-2 py-3 pr-3 pl-3.5 shadow-[inset_0_1px_0_var(--highlight),0_14px_36px_-14px_var(--shadow-color)]" data-toast><svg class="size-[18px] shrink-0 mt-px text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p class="min-w-0 flex-1 text-[.85rem] text-ink-2"><b class="block font-semibold text-ink-1">Invite sent</b>Leo Brandt can join Northwind Labs for 7 days.</p><button class="-mt-0.5 -mr-0.5 grid size-7 flex-none cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-surface-3 hover:text-ink-1 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus" type="button" aria-label="Dismiss: Invite sent" data-toast-dismiss><svg class="size-4" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></li>
</ul></div></section></div>
<section><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Alerts · info, success, warning, danger</span><div class="grid items-start gap-3 md:grid-cols-2">
<div class="flex items-start gap-3 rounded-ui-sm border border-[color-mix(in_srgb,var(--accent)_38%,var(--border))] bg-[color-mix(in_srgb,var(--accent)_7%,var(--surface-1))] px-4 py-[13px] text-[.86rem] text-ink-2" role="note"><svg class="size-[18px] shrink-0 mt-px text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-info"/></svg><p><b class="block font-semibold text-ink-1">Scheduled maintenance</b>The EU dashboard is read-only on 21 Oct, 02:00 to 02:30 UTC.</p></div>
<div class="flex items-start gap-3 rounded-ui-sm border border-[color-mix(in_srgb,var(--success)_38%,var(--border))] bg-[color-mix(in_srgb,var(--success)_7%,var(--surface-1))] px-4 py-[13px] text-[.86rem] text-ink-2" role="note"><svg class="size-[18px] shrink-0 mt-px text-success" aria-hidden="true" focusable="false"><use href="#dk-i-ok"/></svg><p><b class="block font-semibold text-ink-1">Domain verified</b>api.northwind.dev now serves traffic over HTTPS.</p></div>
<div class="flex items-start gap-3 rounded-ui-sm border border-[color-mix(in_srgb,var(--warning)_38%,var(--border))] bg-[color-mix(in_srgb,var(--warning)_7%,var(--surface-1))] px-4 py-[13px] text-[.86rem] text-ink-2" role="note"><svg class="size-[18px] shrink-0 mt-px text-warning" aria-hidden="true" focusable="false"><use href="#dk-i-warn"/></svg><p><b class="block font-semibold text-ink-1">You have used 92% of build minutes</b>Builds queue once you reach 6,000 minutes this cycle.</p></div>
<div class="flex items-start gap-3 rounded-ui-sm border border-[color-mix(in_srgb,var(--danger)_38%,var(--border))] bg-[color-mix(in_srgb,var(--danger)_7%,var(--surface-1))] px-4 py-[13px] text-[.86rem] text-ink-2" role="alert"><svg class="size-[18px] shrink-0 mt-px text-danger" aria-hidden="true" focusable="false"><use href="#dk-i-err"/></svg><p><b class="block font-semibold text-ink-1">Payment declined</b>Update the card ending 4417 before 24 Oct to keep production online.</p></div>
</div></section>
<div class="grid items-start gap-7 md:grid-cols-2"><div class="flex min-w-0 flex-col gap-11">
<section><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Tooltips · hover or focus, Escape hides</span><div class="flex flex-wrap items-center gap-3 pt-[34px]">
<span class="group relative inline-flex" data-tip data-open><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 size-[38px] p-0" type="button" aria-label="Copy deployment URL" aria-describedby="tip-0"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-copy"/></svg></button><span class="pointer-events-none invisible absolute bottom-[calc(100%+9px)] left-1/2 z-[5] -translate-x-1/2 translate-y-1 rounded-md border border-line bg-surface-3 px-[9px] py-[5px] text-[.75rem] font-medium whitespace-nowrap text-ink-1 opacity-0 transition-[opacity,translate,visibility] duration-150 motion-reduce:transition-none group-hover:visible group-hover:translate-y-0 group-hover:opacity-100 group-focus-within:visible group-focus-within:translate-y-0 group-focus-within:opacity-100 group-data-open:visible group-data-open:translate-y-0 group-data-open:opacity-100 group-data-dismissed:invisible group-data-dismissed:opacity-0 after:absolute after:top-full after:left-1/2 after:-mt-1 after:-ml-1 after:size-2 after:rotate-45 after:border-r after:border-b after:border-line after:bg-surface-3 after:content-['']" role="tooltip" id="tip-0">Copy URL</span></span>
<span class="group relative inline-flex" data-tip><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 size-[38px] p-0" type="button" aria-label="Download logs" aria-describedby="tip-1"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-download"/></svg></button><span class="pointer-events-none invisible absolute bottom-[calc(100%+9px)] left-1/2 z-[5] -translate-x-1/2 translate-y-1 rounded-md border border-line bg-surface-3 px-[9px] py-[5px] text-[.75rem] font-medium whitespace-nowrap text-ink-1 opacity-0 transition-[opacity,translate,visibility] duration-150 motion-reduce:transition-none group-hover:visible group-hover:translate-y-0 group-hover:opacity-100 group-focus-within:visible group-focus-within:translate-y-0 group-focus-within:opacity-100 group-data-open:visible group-data-open:translate-y-0 group-data-open:opacity-100 group-data-dismissed:invisible group-data-dismissed:opacity-0 after:absolute after:top-full after:left-1/2 after:-mt-1 after:-ml-1 after:size-2 after:rotate-45 after:border-r after:border-b after:border-line after:bg-surface-3 after:content-['']" role="tooltip" id="tip-1">Download logs</span></span>
<span class="group relative inline-flex" data-tip><button class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 size-[38px] p-0" type="button" aria-label="Share with team" aria-describedby="tip-2"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg></button><span class="pointer-events-none invisible absolute bottom-[calc(100%+9px)] left-1/2 z-[5] -translate-x-1/2 translate-y-1 rounded-md border border-line bg-surface-3 px-[9px] py-[5px] text-[.75rem] font-medium whitespace-nowrap text-ink-1 opacity-0 transition-[opacity,translate,visibility] duration-150 motion-reduce:transition-none group-hover:visible group-hover:translate-y-0 group-hover:opacity-100 group-focus-within:visible group-focus-within:translate-y-0 group-focus-within:opacity-100 group-data-open:visible group-data-open:translate-y-0 group-data-open:opacity-100 group-data-dismissed:invisible group-data-dismissed:opacity-0 after:absolute after:top-full after:left-1/2 after:-mt-1 after:-ml-1 after:size-2 after:rotate-45 after:border-r after:border-b after:border-line after:bg-surface-3 after:content-['']" role="tooltip" id="tip-2">Share</span></span>
</div></section>
<section class="min-h-[230px]"><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Dropdown menu</span><details class="relative inline-block" data-menu open><summary class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-ui-sm border font-semibold leading-[1.2] whitespace-nowrap no-underline transition-colors duration-150 motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus border-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem] list-none [&::-webkit-details-marker]:hidden">Deployment actions<svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-chev"/></svg></summary><ul class="absolute top-[calc(100%+6px)] left-0 z-[5] min-w-[230px] rounded-ui-sm border border-line bg-surface-2 p-[5px] shadow-[inset_0_1px_0_var(--highlight),0_14px_36px_-14px_var(--shadow-color)]">
<li><button class="flex min-h-[34px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.35rem] text-left text-[.85rem] hover:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none text-ink-1" type="button"><svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-edit"/></svg>Rename<kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2 ml-auto">R</kbd></button></li>
<li><button class="flex min-h-[34px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.35rem] text-left text-[.85rem] hover:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none text-ink-1" type="button"><svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-branch"/></svg>Change branch<kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2 ml-auto">B</kbd></button></li>
<li><button class="flex min-h-[34px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.35rem] text-left text-[.85rem] hover:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none text-ink-1" type="button"><svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-refresh"/></svg>Redeploy<kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2 ml-auto">⇧ R</kbd></button></li>
<li class="mt-[5px] border-t border-line pt-[5px]"><button type="button" class="flex min-h-[34px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.35rem] text-left text-[.85rem] hover:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none text-danger"><svg class="size-4 shrink-0 text-danger" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete deployment</button></li></ul></details></section>
</div><section><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">Command menu</span><div class="overflow-hidden rounded-ui border border-line bg-surface-2 shadow-[inset_0_1px_0_var(--highlight),0_24px_64px_-16px_var(--shadow-color)]">
<label class="flex items-center gap-2.5 border-b border-line px-3.5 text-ink-3 focus-within:shadow-[inset_0_-2px_0_var(--focus)]"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-search"/></svg><span class="sr-only">Search commands</span><input class="h-[50px] min-w-0 flex-1 bg-transparent text-[.95rem] text-ink-1 placeholder:text-ink-3 focus:outline-none" type="text" placeholder="Type a command or search" value="dep"></label><div class="p-1.5">
<h3 class="px-2.5 pt-2 pb-1 text-[.7rem] font-semibold tracking-[.08em] text-ink-3 uppercase">Suggestions</h3><ul>
<li><button class="group flex min-h-[38px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.4rem] text-left text-[.87rem] text-ink-1 hover:bg-surface-3 data-active:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none" type="button" data-active><svg class="size-4 shrink-0 text-ink-3 group-data-active:text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy atlas-api to production<svg class="size-4 shrink-0 text-ink-3 ml-auto" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="group flex min-h-[38px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.4rem] text-left text-[.87rem] text-ink-1 hover:bg-surface-3 data-active:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none" type="button"><svg class="size-4 shrink-0 text-ink-3 group-data-active:text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-terminal"/></svg>Open runtime logs<span class="ml-auto inline-flex gap-[3px]" aria-hidden="true"><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">G</kbd><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">L</kbd></span></button></li>
<li><button class="group flex min-h-[38px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.4rem] text-left text-[.87rem] text-ink-1 hover:bg-surface-3 data-active:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none" type="button"><svg class="size-4 shrink-0 text-ink-3 group-data-active:text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-settings"/></svg>Project settings<span class="ml-auto inline-flex gap-[3px]" aria-hidden="true"><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">G</kbd><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">S</kbd></span></button></li>
</ul>
<h3 class="px-2.5 pt-2 pb-1 text-[.7rem] font-semibold tracking-[.08em] text-ink-3 uppercase">Actions</h3><ul>
<li><button class="group flex min-h-[38px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.4rem] text-left text-[.87rem] text-ink-1 hover:bg-surface-3 data-active:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none" type="button"><svg class="size-4 shrink-0 text-ink-3 group-data-active:text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-key"/></svg>Create access token<svg class="size-4 shrink-0 text-ink-3 ml-auto" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
<li><button class="group flex min-h-[38px] w-full cursor-pointer items-center gap-2.5 rounded-md px-[.6rem] py-[.4rem] text-left text-[.87rem] text-ink-1 hover:bg-surface-3 data-active:bg-surface-3 focus-visible:bg-surface-3 focus-visible:shadow-[inset_0_0_0_2px_var(--focus)] focus-visible:outline-none" type="button"><svg class="size-4 shrink-0 text-ink-3 group-data-active:text-accent" aria-hidden="true" focusable="false"><use href="#dk-i-users"/></svg>Invite a teammate<svg class="size-4 shrink-0 text-ink-3 ml-auto" aria-hidden="true" focusable="false"><use href="#dk-i-chevr"/></svg></button></li>
</ul>
</div><div class="flex flex-wrap gap-3.5 border-t border-line bg-surface-1 px-3.5 py-[9px] text-[.75rem] text-ink-3" aria-hidden="true"><span class="inline-flex items-center gap-1.5"><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">↑</kbd><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">↓</kbd>move</span><span class="inline-flex items-center gap-1.5"><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">↵</kbd>run</span><span class="inline-flex items-center gap-1.5"><kbd class="inline-grid h-[1.35rem] min-w-[1.45rem] place-items-center rounded-[5px] border border-b-2 border-line bg-surface-2 px-[.35rem] font-mono text-[.72rem] leading-none font-medium text-ink-2">esc</kbd>close</span></div></div></section></div>
CSS
/* ── Dark UI kit tokens (uiCookies) — identical in every set ──────────────────────────────
   Dark first. Elevation is a lighter surface, not a shadow: surface-0 is the page, 1 cards and
   panels, 2 controls, menus and dialogs, 3 hover, selected rows and tooltips.
   Every colour is a light-dark() pair, so flipping color-scheme turns the whole kit light:
   data-theme="dark" | "light" | "system" on any wrapper (system follows prefers-color-scheme),
   or a checked .theme-pick radio inside a [data-theme] element (:has()).
   Contrast, dark | light, on the worst surface (surface-3): text-1 12.2 | 15.0, text-2 6.6 | 7.3,
   text-3 4.8 | 5.4, accent 5.4 | 5.1, success 7.7 | 5.0, warning 8.4 | 5.2, danger 6.8 | 5.0;
   edge (control boundaries) 3.3 | 3.1 and focus 7.9 | 5.9 against every surface. */
:root{color-scheme:dark}
[data-theme="dark"]{color-scheme:dark}
[data-theme="light"]{color-scheme:light}
[data-theme="system"]{color-scheme:light dark}
[data-theme]:has(.theme-pick[value="dark"]:checked){color-scheme:dark}
[data-theme]:has(.theme-pick[value="light"]:checked){color-scheme:light}
[data-theme]:has(.theme-pick[value="system"]:checked){color-scheme:light dark}
:root{
  --surface-0:light-dark(#eef1f5,#0b0d12);   /* page */
  --surface-1:light-dark(#ffffff,#151821);   /* cards, panels, navbar, sidebar */
  --surface-2:light-dark(#f6f7f9,#1d212c);   /* controls, menus, dialogs, toasts */
  --surface-3:light-dark(#e6e9ef,#262b38);   /* hover, selected rows, tooltips */
  --text-1:light-dark(#12151c,#eceef3);      /* primary text */
  --text-2:light-dark(#434a5a,#aab1bf);      /* secondary text */
  --text-3:light-dark(#555d6e,#8f96a8);      /* captions, placeholders, axis labels */
  --border:light-dark(#dde1e8,#2a2f3c);      /* decorative 1px dividers and card edges */
  --edge:light-dark(#7c8496,#737b90);        /* control boundaries: fields, boxes, tracks */
  --accent:light-dark(#4452d0,#8b97ff);      /* the one vivid colour: links, selected, primary */
  --accent-soft:light-dark(#e6e8ff,#232a4d); /* selected backgrounds; accent text keeps 5.2 | 5.3 on it */
  --on-accent:light-dark(#ffffff,#0b0d12);   /* text on accent fills, 6.2 | 7.4 */
  --success:light-dark(#11713f,#5fd4a0);     /* desaturated for dark, so they do not vibrate */
  --warning:light-dark(#875500,#f0c060);
  --danger:light-dark(#bb2532,#ff9790);
  --focus:light-dark(#3b48c4,#b5bdff);       /* 2px focus ring */
  --highlight:light-dark(rgb(255 255 255 / 0),rgb(255 255 255 / .045)); /* 1px top light on dark surfaces */
  --shadow-color:light-dark(rgb(16 24 40 / .16),rgb(0 0 0 / .55));     /* overlays only */
  --radius:12px;--radius-sm:8px;
  --mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
}
/* No light-dark() (Chrome < 123, Safari < 17.5, Firefox < 120): the same values, chosen by attribute */
@supports not (color:light-dark(#fff,#000)){
  :root,[data-theme="dark"]{--surface-0:#0b0d12;--surface-1:#151821;--surface-2:#1d212c;--surface-3:#262b38;--text-1:#eceef3;--text-2:#aab1bf;--text-3:#8f96a8;--border:#2a2f3c;--edge:#737b90;--accent:#8b97ff;--accent-soft:#232a4d;--on-accent:#0b0d12;--success:#5fd4a0;--warning:#f0c060;--danger:#ff9790;--focus:#b5bdff;--highlight:rgb(255 255 255 / .045);--shadow-color:rgb(0 0 0 / .55)}
  [data-theme="light"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}
  @media (prefers-color-scheme:light){[data-theme="system"]{--surface-0:#eef1f5;--surface-1:#ffffff;--surface-2:#f6f7f9;--surface-3:#e6e9ef;--text-1:#12151c;--text-2:#434a5a;--text-3:#555d6e;--border:#dde1e8;--edge:#7c8496;--accent:#4452d0;--accent-soft:#e6e8ff;--on-accent:#ffffff;--success:#11713f;--warning:#875500;--danger:#bb2532;--focus:#3b48c4;--highlight:rgb(255 255 255 / 0);--shadow-color:rgb(16 24 40 / .16)}}
}
@media (prefers-contrast:more){:root{--border:var(--edge);--text-3:var(--text-2)}}
[data-theme]{background:var(--surface-0);color:var(--text-1)}
/* The tokens above as Tailwind utilities: bg-surface-0…3, text-ink-1…3, border-line, border-edge,
   bg-accent, bg-accent-soft, text-on-accent, text-success|warning|danger, outline-focus, rounded-ui… */
@theme inline {
  --color-surface-0: var(--surface-0); --color-surface-1: var(--surface-1);
  --color-surface-2: var(--surface-2); --color-surface-3: var(--surface-3);
  --color-ink-1: var(--text-1); --color-ink-2: var(--text-2); --color-ink-3: var(--text-3);
  --color-line: var(--border); --color-edge: var(--edge);
  --color-accent: var(--accent); --color-accent-soft: var(--accent-soft); --color-on-accent: var(--on-accent);
  --color-success: var(--success); --color-warning: var(--warning); --color-danger: var(--danger);
  --color-focus: var(--focus); --color-highlight: var(--highlight);
  --radius-ui: var(--radius); --radius-ui-sm: var(--radius-sm);
  --font-mono: var(--mono);
  --shadow-overlay: 0 18px 48px -12px var(--shadow-color);
  --inset-shadow-hl: inset 0 1px 0 var(--highlight);
}
/* <dialog> sizing when opened with showModal(), and its backdrop */
@utility dialog-dk {
  &:modal { position: fixed; inset: 0; margin: auto; max-width: min(440px, calc(100vw - 32px)); height: fit-content; }
  &::backdrop { background: rgb(5 6 10 / .66); }
}
JavaScript
// Dialog: opens as a real modal (focus trap, Escape, ::backdrop). Toasts: dismiss. Tooltips and menus: Escape closes them.
document.querySelectorAll('[data-dialog-open]').forEach(btn => btn.addEventListener('click', () => {
  const d = document.getElementById(btn.dataset.dialogOpen); if (!d) return;
  if (d.open) d.close(); d.showModal();
}));
document.querySelectorAll('[data-toast-dismiss]').forEach(btn => btn.addEventListener('click', () => btn.closest('[data-toast]')?.remove()));
document.addEventListener('keydown', e => {
  if (e.key !== 'Escape') return;
  document.querySelectorAll('[data-tip]').forEach(w => w.setAttribute('data-dismissed', ''));
  document.querySelectorAll('details[data-menu][open]').forEach(d => { d.open = false; d.querySelector('summary').focus(); });
});
document.querySelectorAll('[data-tip]').forEach(w => ['mouseleave', 'focusout'].forEach(ev => w.addEventListener(ev, () => { w.removeAttribute('data-dismissed'); w.removeAttribute('data-open'); })));
document.addEventListener('click', e => document.querySelectorAll('details[data-menu][open]').forEach(d => { if (!d.contains(e.target)) d.open = false; }));

About this set

Overlays and feedback for the uiCookies dark UI kit. The dialog is a native dialog element for deleting an environment, shown inline on the page and opened as a real modal with showModal(), which brings focus trapping, Escape to close and a dimmed backdrop. Three toasts in a status region report a ready deployment, a failed build and a sent invite, each with a coloured icon and a dismiss button. Four inline alerts cover info, success, warning and danger with a hint of the semantic colour in the fill and the full colour on the icon and edge. Tooltips appear on hover and keyboard focus and hide again with Escape. The dropdown is a details element with icons, keyboard hints and a danger item, and the command menu combines a search field with grouped commands, shortcut keys and a footer of key hints. Overlays are the one place the kit uses shadows, and even there the panel is lifted to surface-2 first so it separates from the page by tone as well. About a dozen lines of vanilla JavaScript open the dialog, dismiss toasts and close tooltips and menus with Escape.

What’s included

  • Native dialog opened with showModal()
  • Success, error and info toasts in a status region
  • Info, success, warning and danger alerts
  • Tooltips on hover and focus that Escape dismisses
  • Dropdown menu and command menu with keyboard hints

Accessibility

The dialog has aria-labelledby and aria-describedby and uses the browser's modal focus handling; toasts sit in a role="status" list and each close button names the toast it dismisses. Tooltips are linked with aria-describedby and close with Escape, the danger alert uses role="alert", menu items are real buttons with visible focus, and the tooltip transition stops under prefers-reduced-motion.

Customise it

Change --surface-2 and --shadow-color for overlay panels, --surface-3 for tooltips and menu hover, and --success, --warning, --danger and --accent for feedback colours. In Bootstrap the tokens feed .modal-content, .toast, .alert, .tooltip and .dropdown-menu variables.