Open demo

CSS code

HTML
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
  <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-eye" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/></symbol>
  <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-tick" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12.5 4.5 4.5L19 7.5" stroke-width="3"/></symbol>
  <symbol id="dk-i-activity" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h4l2.5-6.5 5 13L17 12h4"/></symbol>
  <symbol id="dk-i-arrowup" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M9 7h8v8"/></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-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-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-sun" 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.75"/><path d="M12 3v1.75M12 19.25V21M3 12h1.75M19.25 12H21M5.6 5.6l1.25 1.25M17.15 17.15l1.25 1.25M5.6 18.4l1.25-1.25M17.15 6.85l1.25-1.25"/></symbol>
  <symbol id="dk-i-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></symbol>
  <symbol id="dk-i-monitor" 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="12" rx="2"/><path d="M8.5 20h7M12 16.5V20"/></symbol>
</svg>
<div><span class="lbl">One component set, two themes · only data-theme differs</span><div class="cols">
<section class="panel" data-theme="dark" aria-label="Dark theme">
<div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-moon"/></svg></span><div><h2>Dark</h2><p>The default. Surfaces get lighter as they rise.</p></div><code>data-theme="dark"</code></div>
<div class="hrow"><button class="dk-btn dk-btn--primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="dk-btn" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</button><button class="dk-btn dk-btn--ghost" type="button">Cancel</button><button class="dk-btn dk-btn--danger" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="dk-card"><div class="two"><div class="dk-field"><label for="name-d">Project name</label><input class="dk-input" id="name-d" value="atlas-api"></div><fieldset class="dk-seg"><legend>Environment</legend><div class="dk-seg__opts"><label class="dk-seg__opt"><input class="dk-sr" type="radio" name="env-d" value="production" checked><span>Production</span></label><label class="dk-seg__opt"><input class="dk-sr" type="radio" name="env-d" value="preview"><span>Preview</span></label></div></fieldset></div><div class="two" style="margin-top:16px"><label class="dk-switch"><span class="dk-switch__text">Preview deployments</span><input class="dk-sr" type="checkbox" role="switch" checked><span class="dk-switch__track" aria-hidden="true"></span></label><label class="dk-check"><input class="dk-sr" type="checkbox" checked><span class="dk-check__box" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-tick"/></svg></span><span>Notify on failure</span></label></div></div>
<div class="two"><article class="dk-card"><div class="dk-stat__head"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3 style="font:inherit">Requests · 24 h</h3></div><div class="dk-stat__row"><p class="dk-stat__value">1.84M</p><span class="dk-badge dk-badge--success"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="dk-sr">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, dark theme"><ul class="dk-tabs"><li><a class="dk-tab" href="#build">Build</a></li><li><a class="dk-tab" href="#logs" aria-current="page">Logs</a></li><li><a class="dk-tab" href="#functions">Functions</a></li></ul></nav></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>92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div class="dk-toast" 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 in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
<section class="panel" data-theme="light" aria-label="Light theme">
<div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-sun"/></svg></span><div><h2>Light</h2><p>Same markup, same classes. Only color-scheme changed.</p></div><code>data-theme="light"</code></div>
<div class="hrow"><button class="dk-btn dk-btn--primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="dk-btn" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</button><button class="dk-btn dk-btn--ghost" type="button">Cancel</button><button class="dk-btn dk-btn--danger" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="dk-card"><div class="two"><div class="dk-field"><label for="name-l">Project name</label><input class="dk-input" id="name-l" value="atlas-api"></div><fieldset class="dk-seg"><legend>Environment</legend><div class="dk-seg__opts"><label class="dk-seg__opt"><input class="dk-sr" type="radio" name="env-l" value="production" checked><span>Production</span></label><label class="dk-seg__opt"><input class="dk-sr" type="radio" name="env-l" value="preview"><span>Preview</span></label></div></fieldset></div><div class="two" style="margin-top:16px"><label class="dk-switch"><span class="dk-switch__text">Preview deployments</span><input class="dk-sr" type="checkbox" role="switch" checked><span class="dk-switch__track" aria-hidden="true"></span></label><label class="dk-check"><input class="dk-sr" type="checkbox" checked><span class="dk-check__box" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-tick"/></svg></span><span>Notify on failure</span></label></div></div>
<div class="two"><article class="dk-card"><div class="dk-stat__head"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3 style="font:inherit">Requests · 24 h</h3></div><div class="dk-stat__row"><p class="dk-stat__value">1.84M</p><span class="dk-badge dk-badge--success"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="dk-sr">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, light theme"><ul class="dk-tabs"><li><a class="dk-tab" href="#build">Build</a></li><li><a class="dk-tab" href="#logs" aria-current="page">Logs</a></li><li><a class="dk-tab" href="#functions">Functions</a></li></ul></nav></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>92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div class="dk-toast" 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 in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
</div></div>
<section class="panel" data-theme="system" aria-label="System theme"><div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-monitor"/></svg></span><div><h2>System</h2><p>color-scheme: light dark, so every light-dark() token follows your operating system setting.</p></div><code>data-theme="system"</code></div><div class="hrow"><button class="dk-btn dk-btn--primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="dk-btn" type="button">Preview</button><span class="dk-badge dk-badge--success dk-badge--dot">Healthy</span><span class="dk-badge dk-badge--warning dk-badge--dot">Degraded</span><span class="dk-badge dk-badge--danger dk-badge--dot">Down</span></div></section>
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}
/* Card: surface-1 with a 1px border and a 1px top highlight (dark only); no shadow */
.dk-card{padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-1);color:var(--text-1);box-shadow:inset 0 1px 0 var(--highlight)}
.dk-card h2,.dk-card h3,.dk-card p{margin:0}
.dk-card__title{font-size:1rem;font-weight:650;letter-spacing:-.01em}
.dk-card__sub{margin-top:2px;font-size:.85rem;color:var(--text-2)}
/* 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}}
/* Fields: surface-2 well, 1px edge at 3:1, accent border and focus ring on focus */
.dk-field{display:grid;gap:6px;min-width:0}
.dk-field>label,.dk-label{font-size:.82rem;font-weight:600;color:var(--text-1)}
.dk-hint{font-size:.78rem;color:var(--text-3)}
.dk-hint--error{display:flex;align-items:center;gap:.35rem;color:var(--danger)}
.dk-hint--error .dk-ico{width:15px;height:15px}
.dk-input{width:100%;min-height:40px;padding:.55rem .8rem;border:1px solid var(--edge);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text-1);
  font-family:inherit;font-size:.9rem;line-height:1.4;transition:border-color .15s,background-color .15s}
.dk-input::placeholder{color:var(--text-3);opacity:1}
.dk-input:hover{border-color:var(--text-3)}
.dk-input:focus{outline:2px solid var(--focus);outline-offset:1px;border-color:var(--accent)}
.dk-input[aria-invalid="true"]{border-color:var(--danger)}
textarea.dk-input{min-height:92px;resize:vertical}
select.dk-input{appearance:none;padding-right:2.4rem;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--text-2) 50%),linear-gradient(135deg,var(--text-2) 50%,transparent 50%);
  background-position:calc(100% - 18px) 52%,calc(100% - 13px) 52%;background-size:5px 5px;background-repeat:no-repeat}
.dk-input-wrap{position:relative;display:flex;align-items:center}
.dk-input-wrap>.dk-ico{position:absolute;left:.75rem;color:var(--text-3);pointer-events:none}
.dk-input-wrap>.dk-input{padding-left:2.35rem}
.dk-input-wrap>.dk-kbd{position:absolute;right:.6rem}
.dk-input-wrap>.dk-input--kbd{padding-right:3rem}
@media (prefers-reduced-motion:reduce){.dk-input{transition:none}}
/* Switch: a checkbox with role="switch" and a drawn track. On = accent track, knob moves right */
.dk-switch{display:flex;align-items:center;gap:1rem;cursor:pointer}
.dk-switch__text{flex:1;min-width:0;font-size:.9rem;font-weight:600;line-height:1.35}
.dk-switch__text small{display:block;margin-top:2px;font-size:.8rem;font-weight:400;color:var(--text-2)}
.dk-switch__track{position:relative;flex:none;width:40px;height:22px;border:1px solid var(--edge);border-radius:999px;background:var(--surface-3);transition:background-color .18s,border-color .18s}
.dk-switch__track::before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--text-2);transition:transform .18s,background-color .18s}
.dk-switch input:checked+.dk-switch__track{background:var(--accent);border-color:var(--accent)}
.dk-switch input:checked+.dk-switch__track::before{transform:translateX(18px);background:var(--on-accent)}
.dk-switch input:focus-visible+.dk-switch__track{outline:2px solid var(--focus);outline-offset:2px}
.dk-switch input:disabled+.dk-switch__track{opacity:.5}
.dk-switch:has(input:disabled){cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.dk-switch__track,.dk-switch__track::before{transition:none}}
/* Segmented control: radios in a fieldset. Selected = accent-soft fill, accent text and edge */
.dk-seg{min-width:0;margin:0;padding:0;border:0}
.dk-seg legend{margin-bottom:8px;padding:0;font-size:.8rem;font-weight:600;color:var(--text-2)}
.dk-seg__opts{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-0)}
.dk-seg__opt{position:relative}
.dk-seg__opt span{display:inline-flex;align-items:center;gap:.4rem;min-height:30px;padding:.3rem .8rem;border:1px solid transparent;border-radius:6px;
  color:var(--text-2);font-size:.82rem;font-weight:600;cursor:pointer;transition:background-color .15s,color .15s}
.dk-seg__opt span:hover{color:var(--text-1);background:var(--surface-2)}
.dk-seg__opt input:checked+span{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 55%,transparent);color:var(--accent)}
.dk-seg__opt input:focus-visible+span{outline:2px solid var(--focus);outline-offset:1px}
@media (prefers-reduced-motion:reduce){.dk-seg__opt span{transition:none}}
/* Checkbox and radio: a visually hidden input and a drawn box; the tick is an inline SVG */
.dk-check{display:flex;align-items:flex-start;gap:.65rem;font-size:.88rem;line-height:1.4;cursor:pointer}
.dk-check small{display:block;font-size:.78rem;color:var(--text-2)}
.dk-check__box{display:grid;place-items:center;flex:none;width:18px;height:18px;margin-top:1px;border:1.5px solid var(--edge);border-radius:5px;background:var(--surface-2);color:var(--on-accent);transition:background-color .15s,border-color .15s}
.dk-check__box .dk-ico{width:13px;height:13px;opacity:0}
.dk-check input:checked+.dk-check__box{background:var(--accent);border-color:var(--accent)}
.dk-check input:checked+.dk-check__box .dk-ico{opacity:1}
.dk-check--radio .dk-check__box{border-radius:50%}
.dk-check--radio .dk-check__box::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--on-accent);transform:scale(0);transition:transform .15s}
.dk-check--radio input:checked+.dk-check__box::after{transform:scale(1)}
.dk-check input:focus-visible+.dk-check__box{outline:2px solid var(--focus);outline-offset:2px}
.dk-fieldset{min-width:0;margin:0;padding:0;border:0;display:grid;gap:10px}
.dk-fieldset legend{margin-bottom:10px;padding:0;font-size:.82rem;font-weight:600}
@media (prefers-reduced-motion:reduce){.dk-check__box,.dk-check--radio .dk-check__box::after{transition:none}}
/* Badges: tinted with color-mix so the text colour keeps 4.5:1 on its own fill */
.dk-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .5rem;border:1px solid color-mix(in srgb,var(--b,var(--text-2)) 32%,transparent);border-radius:999px;
  background:color-mix(in srgb,var(--b,var(--text-2)) 12%,transparent);color:var(--b,var(--text-2));font-size:.72rem;font-weight:650;line-height:1.4;white-space:nowrap}
.dk-badge--dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.dk-badge--accent{--b:var(--accent)}.dk-badge--success{--b:var(--success)}.dk-badge--warning{--b:var(--warning)}.dk-badge--danger{--b:var(--danger)}
/* Tabs, alert, toast (as in sets 04 and 05) */
.dk-tabs{display:flex;gap:4px;margin:0;padding:0;border-bottom:1px solid var(--border);list-style:none;overflow-x:auto}
.dk-tab{display:inline-flex;align-items:center;gap:8px;margin-bottom:-1px;padding:.6rem .75rem;border-bottom:2px solid transparent;color:var(--text-2);font-size:.85rem;font-weight:500;text-decoration:none;white-space:nowrap}
.dk-tab:hover{color:var(--text-1);border-bottom-color:var(--edge)}
.dk-tab[aria-current="page"]{border-bottom-color:var(--accent);color:var(--text-1);font-weight:600}
.dk-tab:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:6px 6px 0 0}
.dk-alert{--a:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:12px 14px;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:.84rem;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--warning{--a:var(--warning)}
.dk-toast{--t:var(--success);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:.84rem;color:var(--text-2)}
.dk-toast__text b{display:block;color:var(--text-1);font-weight:600}
.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}
.dk-stat__head{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:500;color:var(--text-2)}
.dk-stat__head .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-stat__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 12px}
.dk-stat__value{font-size:1.6rem;font-weight:650;letter-spacing:-.02em;line-height:1.1}
.dk-badge .dk-ico{width:12px;height:12px}

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-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-eye" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/></symbol>
  <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-tick" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12.5 4.5 4.5L19 7.5" stroke-width="3"/></symbol>
  <symbol id="dk-i-activity" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h4l2.5-6.5 5 13L17 12h4"/></symbol>
  <symbol id="dk-i-arrowup" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M9 7h8v8"/></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-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-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-sun" 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.75"/><path d="M12 3v1.75M12 19.25V21M3 12h1.75M19.25 12H21M5.6 5.6l1.25 1.25M17.15 17.15l1.25 1.25M5.6 18.4l1.25-1.25M17.15 6.85l1.25-1.25"/></symbol>
  <symbol id="dk-i-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></symbol>
  <symbol id="dk-i-monitor" 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="12" rx="2"/><path d="M8.5 20h7M12 16.5V20"/></symbol>
</svg>
<div><span class="lbl">One component set, two themes · only data-theme differs</span><div class="cols">
<section class="panel" data-theme="dark" data-bs-theme="dark" aria-label="Dark theme">
<div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-moon"/></svg></span><div><h2>Dark</h2><p>The default. Surfaces get lighter as they rise.</p></div><code>data-theme="dark"</code></div>
<div class="hrow"><button class="btn btn-dk btn-dk-primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="btn btn-dk" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</button><button class="btn btn-dk btn-dk-ghost" type="button">Cancel</button><button class="btn btn-dk btn-dk-danger" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="card dk-card dk-form"><div class="card-body"><div class="two"><div><label class="form-label" for="name-d">Project name</label><input class="form-control" id="name-d" value="atlas-api"></div><fieldset class="dk-seg"><legend>Environment</legend><div class="btn-group"><input class="btn-check" type="radio" name="env-d" id="env-d-p" value="production" autocomplete="off" checked><label class="btn" for="env-d-p">Production</label><input class="btn-check" type="radio" name="env-d" id="env-d-v" value="preview" autocomplete="off"><label class="btn" for="env-d-v">Preview</label></div></fieldset></div><div class="two" style="margin-top:16px"><div class="form-check form-switch dk-switch"><input class="form-check-input" type="checkbox" role="switch" id="sw-d" checked><label class="form-check-label" for="sw-d">Preview deployments</label></div><div class="form-check dk-check"><input class="form-check-input" type="checkbox" id="cb-d" checked><label class="form-check-label" for="cb-d">Notify on failure</label></div></div></div></div>
<div class="two"><article class="card dk-card card-body"><div class="dk-stat__head"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3 class="m-0" style="font:inherit">Requests · 24 h</h3></div><div class="dk-stat__row"><p class="dk-stat__value m-0">1.84M</p><span class="badge dk-badge dk-badge-success"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="visually-hidden">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, dark theme"><ul class="nav nav-underline dk-tabs"><li class="nav-item"><a class="nav-link" href="#build">Build</a></li><li class="nav-item"><a class="nav-link active" href="#logs" aria-current="page">Logs</a></li><li class="nav-item"><a class="nav-link" href="#functions">Functions</a></li></ul></nav></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>92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div class="toast show dk-toast" 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 in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
<section class="panel" data-theme="light" data-bs-theme="light" aria-label="Light theme">
<div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-sun"/></svg></span><div><h2>Light</h2><p>Same markup, same classes. Only color-scheme changed.</p></div><code>data-theme="light"</code></div>
<div class="hrow"><button class="btn btn-dk btn-dk-primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="btn btn-dk" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</button><button class="btn btn-dk btn-dk-ghost" type="button">Cancel</button><button class="btn btn-dk btn-dk-danger" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="card dk-card dk-form"><div class="card-body"><div class="two"><div><label class="form-label" for="name-l">Project name</label><input class="form-control" id="name-l" value="atlas-api"></div><fieldset class="dk-seg"><legend>Environment</legend><div class="btn-group"><input class="btn-check" type="radio" name="env-l" id="env-l-p" value="production" autocomplete="off" checked><label class="btn" for="env-l-p">Production</label><input class="btn-check" type="radio" name="env-l" id="env-l-v" value="preview" autocomplete="off"><label class="btn" for="env-l-v">Preview</label></div></fieldset></div><div class="two" style="margin-top:16px"><div class="form-check form-switch dk-switch"><input class="form-check-input" type="checkbox" role="switch" id="sw-l" checked><label class="form-check-label" for="sw-l">Preview deployments</label></div><div class="form-check dk-check"><input class="form-check-input" type="checkbox" id="cb-l" checked><label class="form-check-label" for="cb-l">Notify on failure</label></div></div></div></div>
<div class="two"><article class="card dk-card card-body"><div class="dk-stat__head"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3 class="m-0" style="font:inherit">Requests · 24 h</h3></div><div class="dk-stat__row"><p class="dk-stat__value m-0">1.84M</p><span class="badge dk-badge dk-badge-success"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="visually-hidden">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, light theme"><ul class="nav nav-underline dk-tabs"><li class="nav-item"><a class="nav-link" href="#build">Build</a></li><li class="nav-item"><a class="nav-link active" href="#logs" aria-current="page">Logs</a></li><li class="nav-item"><a class="nav-link" href="#functions">Functions</a></li></ul></nav></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>92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div class="toast show dk-toast" 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 in 48 s.</p><button class="dk-x" type="button" aria-label="Dismiss: Deployment ready"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
</div></div>
<section class="panel" data-theme="system" data-bs-theme="light" aria-label="System theme"><div class="panel__head"><span class="panel__ico" aria-hidden="true"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-monitor"/></svg></span><div><h2>System</h2><p>color-scheme: light dark, so every light-dark() token follows your operating system setting.</p></div><code>data-theme="system"</code></div><div class="hrow"><button class="btn btn-dk btn-dk-primary" type="button"><svg class="dk-ico" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</button><button class="btn btn-dk" type="button">Preview</button><span class="badge dk-badge dk-badge-success dk-badge-dot">Healthy</span><span class="badge dk-badge dk-badge-warning dk-badge-dot">Degraded</span><span class="badge dk-badge dk-badge-danger dk-badge-dot">Down</span></div></section>
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}
/* .card through --bs-card-* */
.card.dk-card{--bs-card-bg:var(--surface-1);--bs-card-color:var(--text-1);--bs-card-border-color:var(--border);--bs-card-border-radius:var(--radius);
  --bs-card-inner-border-radius:calc(var(--radius) - 1px);--bs-card-spacer-x:20px;--bs-card-spacer-y:20px;--bs-card-cap-bg:transparent;--bs-card-title-color:var(--text-1);
  --bs-card-subtitle-color:var(--text-2);box-shadow:inset 0 1px 0 var(--highlight)}
.dk-card h2,.dk-card h3,.dk-card p{margin:0}
.dk-card .card-title{font-size:1rem;font-weight:650;letter-spacing:-.01em;margin:0}
.dk-card .card-subtitle{margin-top:2px;font-size:.85rem}
/* .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}}
/* .form-control and .form-select through --bs-* and a few rules */
.dk-form{--bs-body-bg:var(--surface-2);--bs-border-color:var(--edge)}
.dk-form .form-label{margin-bottom:6px;font-size:.82rem;font-weight:600;color:var(--text-1)}
.dk-form .form-text{margin-top:6px;font-size:.78rem;color:var(--text-3)}
.dk-form .invalid-feedback{display:flex;align-items:center;gap:.35rem;margin-top:6px;font-size:.78rem;color:var(--danger)}
.dk-form .invalid-feedback .dk-ico{width:15px;height:15px}
.dk-form .form-control,.dk-form .form-select{min-height:40px;padding:.55rem .8rem;border-color:var(--edge);background-color:var(--surface-2);color:var(--text-1);font-size:.9rem;line-height:1.4}
.dk-form .form-select{--bs-form-select-bg-img:var(--dk-select-img);padding-right:2.4rem}
.dk-form .form-control::placeholder{color:var(--text-3);opacity:1}
.dk-form .form-control:hover,.dk-form .form-select:hover{border-color:var(--text-3)}
.dk-form .form-control:focus,.dk-form .form-select:focus{border-color:var(--accent);background-color:var(--surface-2);color:var(--text-1);box-shadow:none;outline:2px solid var(--focus);outline-offset:1px}
.dk-form .form-control.is-invalid{border-color:var(--danger);background-image:none;padding-right:.8rem}
.dk-form textarea.form-control{min-height:92px}
.dk-form .input-group-text{border-color:var(--edge);background:var(--surface-2);color:var(--text-3)}
.dk-form .dk-iconfield{position:relative}
.dk-form .dk-iconfield>.dk-ico{position:absolute;left:.75rem;top:50%;margin-top:-9px;color:var(--text-3);pointer-events:none;z-index:5}
.dk-form .dk-iconfield>.form-control{padding-left:2.35rem}
.dk-form .dk-iconfield>.dk-kbd{position:absolute;right:.6rem;top:50%;margin-top:-.7rem}
.dk-form .dk-iconfield>.dk-pad-kbd{padding-right:3rem}
@media (prefers-reduced-motion:reduce){.dk-form .form-control,.dk-form .form-select{transition:none}}
/* .form-switch: the knob is a radial-gradient of a token colour, so it follows the theme */
.dk-switch{display:flex;align-items:center;gap:1rem;min-height:0;margin:0;padding:0}
.dk-switch .form-check-label{flex:1;min-width:0;font-size:.9rem;font-weight:600;line-height:1.35;cursor:pointer}
.dk-switch .form-check-label small{display:block;margin-top:2px;font-size:.8rem;font-weight:400;color:var(--text-2)}
.dk-switch .form-check-input{--dk-knob:var(--text-2);order:2;flex:none;float:none;width:40px;height:22px;margin:0;border:1px solid var(--edge);border-radius:999px;
  background-color:var(--surface-3);background-image:radial-gradient(circle,var(--dk-knob) 0 7.5px,transparent 8px);background-size:20px 20px;
  background-position:left center;cursor:pointer;transition:background-position .18s,background-color .18s,border-color .18s}
.dk-switch .form-check-input:focus{border-color:var(--edge);box-shadow:none}
.dk-switch .form-check-input:checked{--dk-knob:var(--on-accent);background-color:var(--accent);border-color:var(--accent);background-position:right center}
.dk-switch .form-check-input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.dk-switch .form-check-input:disabled{opacity:.5}
@media (prefers-reduced-motion:reduce){.dk-switch .form-check-input{transition:none}}
/* Segmented control: a .btn-group of .btn-check radios */
.dk-seg{min-width:0;margin:0;padding:0;border:0}
.dk-seg legend{float:none;width:auto;margin-bottom:8px;padding:0;font-size:.8rem;font-weight:600;color:var(--text-2)}
.dk-seg .btn-group{flex-wrap:wrap;gap:2px;padding:3px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-0)}
.dk-seg .btn{--bs-btn-padding-x:.8rem;--bs-btn-padding-y:.3rem;--bs-btn-font-size:.82rem;--bs-btn-font-weight:600;--bs-btn-color:var(--text-2);--bs-btn-border-color:transparent;
  --bs-btn-hover-color:var(--text-1);--bs-btn-hover-bg:var(--surface-2);--bs-btn-hover-border-color:transparent;
  --bs-btn-active-color:var(--accent);--bs-btn-active-bg:var(--accent-soft);--bs-btn-active-border-color:color-mix(in srgb,var(--accent) 55%,transparent);
  display:inline-flex;align-items:center;gap:.4rem;min-height:30px;flex:none;border-radius:6px!important;margin:0!important}
.dk-seg .btn-check:focus-visible+.btn{outline:2px solid var(--focus);outline-offset:1px;box-shadow:none}
/* .form-check-input: drawn box, the tick image comes from the theme (see --dk-check-img) */
.dk-check{display:flex;align-items:flex-start;gap:.65rem;min-height:0;margin:0;padding:0;font-size:.88rem;line-height:1.4}
.dk-check .form-check-label{cursor:pointer}
.dk-check .form-check-label small{display:block;font-size:.78rem;color:var(--text-2)}
.dk-check .form-check-input{flex:none;float:none;width:18px;height:18px;margin:1px 0 0;border:1.5px solid var(--edge);border-radius:5px;background-color:var(--surface-2);cursor:pointer}
.dk-check .form-check-input[type=radio]{border-radius:50%}
.dk-check .form-check-input:focus{border-color:var(--edge);box-shadow:none}
.dk-check .form-check-input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.dk-check .form-check-input:checked{background-color:var(--accent);border-color:var(--accent)}
.dk-check .form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:var(--dk-check-img)}
.dk-check .form-check-input:checked[type=radio]{background-image:radial-gradient(circle,var(--on-accent) 0 3.5px,transparent 4px)}
.dk-fieldset{min-width:0;margin:0;padding:0;border:0;display:grid;gap:10px}
.dk-fieldset legend{float:none;width:auto;margin-bottom:10px;padding:0;font-size:.82rem;font-weight:600}
/* .badge tinted with color-mix */
.badge.dk-badge{--b:var(--text-2);--bs-badge-padding-x:.5rem;--bs-badge-padding-y:.15rem;--bs-badge-font-size:.72rem;--bs-badge-font-weight:650;--bs-badge-color:var(--b);--bs-badge-border-radius:999px;
  display:inline-flex;align-items:center;gap:.35rem;line-height:1.4;border:1px solid color-mix(in srgb,var(--b) 32%,transparent);background:color-mix(in srgb,var(--b) 12%,transparent)}
.dk-badge-dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.dk-badge.dk-badge-accent{--b:var(--accent)}.dk-badge.dk-badge-success{--b:var(--success)}.dk-badge.dk-badge-warning{--b:var(--warning)}.dk-badge.dk-badge-danger{--b:var(--danger)}
/* Tabs, alert, toast (as in sets 04 and 05) */
.dk-tabs{display:flex;gap:4px;margin:0;padding:0;border-bottom:1px solid var(--border);list-style:none;overflow-x:auto}
.dk-tab{display:inline-flex;align-items:center;gap:8px;margin-bottom:-1px;padding:.6rem .75rem;border-bottom:2px solid transparent;color:var(--text-2);font-size:.85rem;font-weight:500;text-decoration:none;white-space:nowrap}
.dk-tab:hover{color:var(--text-1);border-bottom-color:var(--edge)}
.dk-tab[aria-current="page"]{border-bottom-color:var(--accent);color:var(--text-1);font-weight:600}
.dk-tab:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:6px 6px 0 0}
.dk-alert{--a:var(--accent);display:flex;align-items:flex-start;gap:12px;padding:12px 14px;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:.84rem;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--warning{--a:var(--warning)}
.dk-toast{--t:var(--success);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:.84rem;color:var(--text-2)}
.dk-toast__text b{display:block;color:var(--text-1);font-weight:600}
.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}
.dk-stat__head{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:500;color:var(--text-2)}
.dk-stat__head .dk-ico{width:16px;height:16px;color:var(--text-3)}
.dk-stat__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 12px}
.dk-stat__value{font-size:1.6rem;font-weight:650;letter-spacing:-.02em;line-height:1.1}
.dk-badge .dk-ico{width:12px;height:12px}
.nav-underline.dk-tabs{--bs-nav-underline-gap:4px;--bs-nav-underline-border-width:2px;--bs-nav-underline-link-active-color:var(--text-1);--bs-nav-link-color:var(--text-2);--bs-nav-link-hover-color:var(--text-1);--bs-nav-link-font-weight:500;flex-wrap:nowrap}
.nav-underline.dk-tabs .nav-link{padding:.6rem .75rem;margin-bottom:-1px;font-size:.85rem;white-space:nowrap}
.nav-underline.dk-tabs .nav-link:hover{border-bottom-color:var(--edge)}
.nav-underline.dk-tabs .nav-link.active{border-bottom-color:var(--accent);font-weight:600}
.nav-underline.dk-tabs .nav-link:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;box-shadow:none}
.dk-alert.alert{--bs-alert-padding-x:14px;--bs-alert-padding-y:12px;--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-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}

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-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-eye" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/></symbol>
  <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-tick" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12.5 4.5 4.5L19 7.5" stroke-width="3"/></symbol>
  <symbol id="dk-i-activity" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h4l2.5-6.5 5 13L17 12h4"/></symbol>
  <symbol id="dk-i-arrowup" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M9 7h8v8"/></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-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-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-sun" 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.75"/><path d="M12 3v1.75M12 19.25V21M3 12h1.75M19.25 12H21M5.6 5.6l1.25 1.25M17.15 17.15l1.25 1.25M5.6 18.4l1.25-1.25M17.15 6.85l1.25-1.25"/></symbol>
  <symbol id="dk-i-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></symbol>
  <symbol id="dk-i-monitor" 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="12" rx="2"/><path d="M8.5 20h7M12 16.5V20"/></symbol>
</svg>
<div><span class="mb-3.5 block text-[.72rem] font-semibold tracking-[.12em] text-ink-3 uppercase">One component set, two themes · only data-theme differs</span><div class="grid items-stretch gap-5 min-[861px]:grid-cols-2">
<section class="flex flex-col gap-5 rounded-2xl border border-line bg-surface-0 p-6 text-ink-1" data-theme="dark" aria-label="Dark theme">
<div class="flex items-center gap-2.5"><span class="grid size-[34px] place-items-center rounded-[9px] bg-accent-soft text-accent" aria-hidden="true"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-moon"/></svg></span><div><h2 class="text-base font-[650]">Dark</h2><p class="text-[.8rem] text-ink-2">The default. Surfaces get lighter as they rise.</p></div><code class="ml-auto rounded-md border border-line bg-surface-1 px-2 py-[3px] font-mono text-[.72rem] font-medium whitespace-nowrap text-ink-2">data-theme="dark"</code></div>
<div class="flex flex-wrap items-center gap-2.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-accent bg-accent text-on-accent inset-shadow-hl hover:bg-[color-mix(in_srgb,var(--accent)_86%,var(--text-1))] min-h-[38px] px-4 py-2 text-[.875rem]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</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-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</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-transparent bg-transparent text-ink-2 hover:bg-surface-3 hover:text-ink-1 min-h-[38px] px-4 py-2 text-[.875rem]" type="button">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]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="rounded-ui border border-line bg-surface-1 text-ink-1 inset-shadow-hl p-5"><div class="grid items-start gap-3.5 min-[481px]:grid-cols-2"><div class="grid min-w-0 gap-1.5"><label class="text-[.82rem] font-semibold text-ink-1" for="name-d">Project name</label><input class="w-full min-h-10 rounded-ui-sm border border-edge bg-surface-2 px-[.8rem] py-[.55rem] text-[.9rem] leading-[1.4] text-ink-1 placeholder:text-ink-3 transition-colors duration-150 hover:border-ink-3 focus:border-accent focus:outline-2 focus:outline-offset-1 focus:outline-focus motion-reduce:transition-none" id="name-d" value="atlas-api"></div><fieldset class="m-0 min-w-0 border-0 p-0"><legend class="mb-2 p-0 text-[.8rem] font-semibold text-ink-2">Environment</legend><div class="inline-flex flex-wrap gap-0.5 rounded-ui-sm border border-line bg-surface-0 p-[3px]"><label class="relative"><input class="peer sr-only" type="radio" name="env-d" value="production" checked><span class="inline-flex min-h-[30px] cursor-pointer items-center gap-[.4rem] rounded-md border border-transparent px-[.8rem] py-[.3rem] text-[.82rem] font-semibold text-ink-2 transition-colors duration-150 hover:bg-surface-2 hover:text-ink-1 motion-reduce:transition-none peer-checked:border-[color-mix(in_srgb,var(--accent)_55%,transparent)] peer-checked:bg-accent-soft peer-checked:text-accent peer-focus-visible:outline-2 peer-focus-visible:outline-offset-1 peer-focus-visible:outline-focus">Production</span></label><label class="relative"><input class="peer sr-only" type="radio" name="env-d" value="preview"><span class="inline-flex min-h-[30px] cursor-pointer items-center gap-[.4rem] rounded-md border border-transparent px-[.8rem] py-[.3rem] text-[.82rem] font-semibold text-ink-2 transition-colors duration-150 hover:bg-surface-2 hover:text-ink-1 motion-reduce:transition-none peer-checked:border-[color-mix(in_srgb,var(--accent)_55%,transparent)] peer-checked:bg-accent-soft peer-checked:text-accent peer-focus-visible:outline-2 peer-focus-visible:outline-offset-1 peer-focus-visible:outline-focus">Preview</span></label></div></fieldset></div><div class="grid items-start gap-3.5 min-[481px]:grid-cols-2 mt-4"><label class="flex cursor-pointer items-center gap-4 has-disabled:cursor-not-allowed"><span class="min-w-0 flex-1 text-[.9rem] leading-[1.35] font-semibold">Preview deployments</span><input class="peer sr-only" type="checkbox" role="switch" checked><span class="relative h-[22px] w-10 flex-none rounded-full border border-edge bg-surface-3 transition-colors duration-[180ms] before:absolute before:top-[2px] before:left-[2px] before:size-4 before:rounded-full before:bg-ink-2 before:transition-[translate,background-color] before:duration-[180ms] before:content-[''] peer-checked:border-accent peer-checked:bg-accent peer-checked:before:translate-x-[18px] peer-checked:before:bg-on-accent peer-disabled:opacity-50 motion-reduce:transition-none motion-reduce:before:transition-none peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus" aria-hidden="true"></span></label><label class="group flex cursor-pointer items-start gap-[.65rem] text-[.88rem] leading-[1.4]"><input class="peer sr-only" type="checkbox" checked><span class="mt-px grid size-[18px] flex-none place-items-center rounded-[5px] border-[1.5px] border-edge bg-surface-2 text-on-accent transition-colors duration-150 peer-checked:border-accent peer-checked:bg-accent motion-reduce:transition-none peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus" aria-hidden="true"><svg class="size-[13px] opacity-0 group-has-checked:opacity-100" aria-hidden="true" focusable="false"><use href="#dk-i-tick"/></svg></span><span>Notify on failure</span></label></div></div>
<div class="grid items-start gap-3.5 min-[481px]:grid-cols-2"><article class="rounded-ui border border-line bg-surface-1 text-ink-1 inset-shadow-hl p-5"><div class="flex items-center gap-2 text-[.82rem] font-medium text-ink-2"><svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3>Requests · 24 h</h3></div><div class="mt-2 mb-3 flex flex-wrap items-center justify-between gap-2"><p class="text-[1.6rem] leading-[1.1] font-[650] tracking-[-.02em]">1.84M</p><span class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--success)_32%,transparent)] bg-[color-mix(in_srgb,var(--success)_12%,transparent)] px-2 py-[.15rem] text-[.72rem] leading-[1.4] font-[650] whitespace-nowrap text-success"><svg class="size-3 shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="sr-only">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, dark theme"><ul class="flex gap-1 overflow-x-auto border-b border-line"><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#build">Build</a></li><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#logs" aria-current="page">Logs</a></li><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#functions">Functions</a></li></ul></nav></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-3.5 py-3 text-[.84rem] 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">92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div 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-[.84rem] text-ink-2"><b class="block font-semibold text-ink-1">Deployment ready</b>atlas-api is live 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"><svg class="size-4" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
<section class="flex flex-col gap-5 rounded-2xl border border-line bg-surface-0 p-6 text-ink-1" data-theme="light" aria-label="Light theme">
<div class="flex items-center gap-2.5"><span class="grid size-[34px] place-items-center rounded-[9px] bg-accent-soft text-accent" aria-hidden="true"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-sun"/></svg></span><div><h2 class="text-base font-[650]">Light</h2><p class="text-[.8rem] text-ink-2">Same markup, same classes. Only color-scheme changed.</p></div><code class="ml-auto rounded-md border border-line bg-surface-1 px-2 py-[3px] font-mono text-[.72rem] font-medium whitespace-nowrap text-ink-2">data-theme="light"</code></div>
<div class="flex flex-wrap items-center gap-2.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-accent bg-accent text-on-accent inset-shadow-hl hover:bg-[color-mix(in_srgb,var(--accent)_86%,var(--text-1))] min-h-[38px] px-4 py-2 text-[.875rem]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</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-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-eye"/></svg>Preview</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-transparent bg-transparent text-ink-2 hover:bg-surface-3 hover:text-ink-1 min-h-[38px] px-4 py-2 text-[.875rem]" type="button">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]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-trash"/></svg>Delete</button></div>
<div class="rounded-ui border border-line bg-surface-1 text-ink-1 inset-shadow-hl p-5"><div class="grid items-start gap-3.5 min-[481px]:grid-cols-2"><div class="grid min-w-0 gap-1.5"><label class="text-[.82rem] font-semibold text-ink-1" for="name-l">Project name</label><input class="w-full min-h-10 rounded-ui-sm border border-edge bg-surface-2 px-[.8rem] py-[.55rem] text-[.9rem] leading-[1.4] text-ink-1 placeholder:text-ink-3 transition-colors duration-150 hover:border-ink-3 focus:border-accent focus:outline-2 focus:outline-offset-1 focus:outline-focus motion-reduce:transition-none" id="name-l" value="atlas-api"></div><fieldset class="m-0 min-w-0 border-0 p-0"><legend class="mb-2 p-0 text-[.8rem] font-semibold text-ink-2">Environment</legend><div class="inline-flex flex-wrap gap-0.5 rounded-ui-sm border border-line bg-surface-0 p-[3px]"><label class="relative"><input class="peer sr-only" type="radio" name="env-l" value="production" checked><span class="inline-flex min-h-[30px] cursor-pointer items-center gap-[.4rem] rounded-md border border-transparent px-[.8rem] py-[.3rem] text-[.82rem] font-semibold text-ink-2 transition-colors duration-150 hover:bg-surface-2 hover:text-ink-1 motion-reduce:transition-none peer-checked:border-[color-mix(in_srgb,var(--accent)_55%,transparent)] peer-checked:bg-accent-soft peer-checked:text-accent peer-focus-visible:outline-2 peer-focus-visible:outline-offset-1 peer-focus-visible:outline-focus">Production</span></label><label class="relative"><input class="peer sr-only" type="radio" name="env-l" value="preview"><span class="inline-flex min-h-[30px] cursor-pointer items-center gap-[.4rem] rounded-md border border-transparent px-[.8rem] py-[.3rem] text-[.82rem] font-semibold text-ink-2 transition-colors duration-150 hover:bg-surface-2 hover:text-ink-1 motion-reduce:transition-none peer-checked:border-[color-mix(in_srgb,var(--accent)_55%,transparent)] peer-checked:bg-accent-soft peer-checked:text-accent peer-focus-visible:outline-2 peer-focus-visible:outline-offset-1 peer-focus-visible:outline-focus">Preview</span></label></div></fieldset></div><div class="grid items-start gap-3.5 min-[481px]:grid-cols-2 mt-4"><label class="flex cursor-pointer items-center gap-4 has-disabled:cursor-not-allowed"><span class="min-w-0 flex-1 text-[.9rem] leading-[1.35] font-semibold">Preview deployments</span><input class="peer sr-only" type="checkbox" role="switch" checked><span class="relative h-[22px] w-10 flex-none rounded-full border border-edge bg-surface-3 transition-colors duration-[180ms] before:absolute before:top-[2px] before:left-[2px] before:size-4 before:rounded-full before:bg-ink-2 before:transition-[translate,background-color] before:duration-[180ms] before:content-[''] peer-checked:border-accent peer-checked:bg-accent peer-checked:before:translate-x-[18px] peer-checked:before:bg-on-accent peer-disabled:opacity-50 motion-reduce:transition-none motion-reduce:before:transition-none peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus" aria-hidden="true"></span></label><label class="group flex cursor-pointer items-start gap-[.65rem] text-[.88rem] leading-[1.4]"><input class="peer sr-only" type="checkbox" checked><span class="mt-px grid size-[18px] flex-none place-items-center rounded-[5px] border-[1.5px] border-edge bg-surface-2 text-on-accent transition-colors duration-150 peer-checked:border-accent peer-checked:bg-accent motion-reduce:transition-none peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus" aria-hidden="true"><svg class="size-[13px] opacity-0 group-has-checked:opacity-100" aria-hidden="true" focusable="false"><use href="#dk-i-tick"/></svg></span><span>Notify on failure</span></label></div></div>
<div class="grid items-start gap-3.5 min-[481px]:grid-cols-2"><article class="rounded-ui border border-line bg-surface-1 text-ink-1 inset-shadow-hl p-5"><div class="flex items-center gap-2 text-[.82rem] font-medium text-ink-2"><svg class="size-4 shrink-0 text-ink-3" aria-hidden="true" focusable="false"><use href="#dk-i-activity"/></svg><h3>Requests · 24 h</h3></div><div class="mt-2 mb-3 flex flex-wrap items-center justify-between gap-2"><p class="text-[1.6rem] leading-[1.1] font-[650] tracking-[-.02em]">1.84M</p><span class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--success)_32%,transparent)] bg-[color-mix(in_srgb,var(--success)_12%,transparent)] px-2 py-[.15rem] text-[.72rem] leading-[1.4] font-[650] whitespace-nowrap text-success"><svg class="size-3 shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-arrowup"/></svg><span class="sr-only">up </span>12.4%</span></div><svg viewBox="0 0 240 40" preserveAspectRatio="none" style="display:block;width:100%;height:40px" aria-hidden="true" focusable="false"><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0 L240 40 L0 40 Z" style="fill:color-mix(in srgb,var(--accent) 16%,transparent)"/><path d="M0.0 37.0 L21.8 32.7 L43.6 34.9 L65.5 26.3 L87.3 28.5 L109.1 22.1 L130.9 24.2 L152.7 15.7 L174.5 17.8 L196.4 11.4 L218.2 13.5 L240.0 5.0" style="fill:none;stroke:var(--accent);stroke-width:1.75;vector-effect:non-scaling-stroke;stroke-linejoin:round"/></svg></article><nav aria-label="Deployment, light theme"><ul class="flex gap-1 overflow-x-auto border-b border-line"><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#build">Build</a></li><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#logs" aria-current="page">Logs</a></li><li><a class="-mb-px inline-flex items-center gap-2 border-b-2 border-transparent px-3 py-[.6rem] text-[.85rem] font-medium whitespace-nowrap text-ink-2 no-underline hover:border-edge hover:text-ink-1 aria-[current=page]:border-accent aria-[current=page]:font-semibold aria-[current=page]:text-ink-1 focus-visible:rounded-t-md focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus" href="#functions">Functions</a></li></ul></nav></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-3.5 py-3 text-[.84rem] 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">92% of build minutes used</b>Builds queue at 6,000 minutes.</p></div>
<div 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-[.84rem] text-ink-2"><b class="block font-semibold text-ink-1">Deployment ready</b>atlas-api is live 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"><svg class="size-4" aria-hidden="true" focusable="false"><use href="#dk-i-x"/></svg></button></div>
</section>
</div></div>
<section class="flex flex-col gap-5 rounded-2xl border border-line bg-surface-0 p-6 text-ink-1" data-theme="system" aria-label="System theme">
<div class="flex items-center gap-2.5"><span class="grid size-[34px] place-items-center rounded-[9px] bg-accent-soft text-accent" aria-hidden="true"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-monitor"/></svg></span><div><h2 class="text-base font-[650]">System</h2><p class="text-[.8rem] text-ink-2">color-scheme: light dark, so every light-dark() token follows your operating system setting.</p></div><code class="ml-auto rounded-md border border-line bg-surface-1 px-2 py-[3px] font-mono text-[.72rem] font-medium whitespace-nowrap text-ink-2">data-theme="system"</code></div>
<div class="flex flex-wrap items-center gap-2.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-accent bg-accent text-on-accent inset-shadow-hl hover:bg-[color-mix(in_srgb,var(--accent)_86%,var(--text-1))] min-h-[38px] px-4 py-2 text-[.875rem]" type="button"><svg class="size-[18px] shrink-0" aria-hidden="true" focusable="false"><use href="#dk-i-rocket"/></svg>Deploy</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-line bg-surface-2 text-ink-1 inset-shadow-hl hover:bg-surface-3 min-h-[38px] px-4 py-2 text-[.875rem]" type="button">Preview</button><span class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--success)_32%,transparent)] bg-[color-mix(in_srgb,var(--success)_12%,transparent)] px-2 py-[.15rem] text-[.72rem] leading-[1.4] font-[650] whitespace-nowrap text-success before:size-1.5 before:rounded-full before:bg-current before:content-['']">Healthy</span><span class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--warning)_32%,transparent)] bg-[color-mix(in_srgb,var(--warning)_12%,transparent)] px-2 py-[.15rem] text-[.72rem] leading-[1.4] font-[650] whitespace-nowrap text-warning before:size-1.5 before:rounded-full before:bg-current before:content-['']">Degraded</span><span class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--danger)_32%,transparent)] bg-[color-mix(in_srgb,var(--danger)_12%,transparent)] px-2 py-[.15rem] text-[.72rem] leading-[1.4] font-[650] whitespace-nowrap text-danger before:size-1.5 before:rounded-full before:bg-current before:content-['']">Down</span></div></section>
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);
}

About this set

The set that proves the system: the same components rendered twice, side by side, once under data-theme=”dark” and once under data-theme=”light”, plus a third panel under data-theme=”system” that follows the operating system. Each panel holds primary, secondary, ghost and danger buttons, a field, a segmented control, a switch, a checkbox, a stat card with a sparkline, underline tabs, a warning alert and a toast, with identical markup and classes. Nothing is overridden per theme. Every colour token is a light-dark() pair, and the data-theme attribute only sets color-scheme on its element, so each token resolves to its light or dark value wherever it is used. The dark values use a slightly desaturated accent and pastel semantic colours so they do not vibrate on near-black, the light values use deeper versions of the same hues, and both sets were measured for 4.5:1 text and 3:1 control edges on every surface level. Browsers without light-dark() get a fallback block that sets the same values by attribute. In Bootstrap the panels also carry data-bs-theme so Bootstrap’s own defaults follow along.

What’s included

  • Identical markup under data-theme="dark", "light" and "system"
  • Every colour token is a light-dark() pair
  • Fallback values for browsers without light-dark()
  • Bootstrap data-bs-theme kept in step
  • Contrast measured on every surface in both themes

Accessibility

Both themes were checked for 4.5:1 text and 3:1 control edges on all four surface levels, and focus uses a separate --focus colour tuned for each theme. Controls keep their native semantics in both panels, the segmented control and checkbox are real inputs with labels, and transitions stop under prefers-reduced-motion.

Customise it

Edit the light-dark(light, dark) pairs in the token block to change either theme, and set data-theme="dark", "light" or "system" on any wrapper. In Bootstrap also set data-bs-theme on the same element; in Tailwind the bg-surface-*, text-ink-* and bg-accent utilities follow automatically.