/* ============================================================================
   CETREAL · demo chrome (v3)
   One control surface shared by every portfolio demo. It restyles the primitives the demos already use (.btn,
   .pill, .card, .chip, select, checkbox, range) and adds opt-in layout classes (.dui-bar, .dui-rail, .dui-group,
   .dui-sheet, .dui-cluster). v3 reads the design tokens of /world/chrome.css: the look of the day sets type and
   shape, the demo's palette sets the colours. Cosmetics only: no ids change, no state classes change.
   ========================================================================== */

/* The AR engines (8th Wall, MindAR) inject `* { box-sizing: inherit }` into <head> at runtime, after every page
   stylesheet, which cancels a page's border-box reset and makes each control grow by its padding. Specificity beats
   source order, so pin the box model on the primitives. */
.btn, .chip, .chip-btn, .mode-btn, .pill, select, input, textarea,
.dui-bar, .dui-brand, .dui-brand__text, .dui-rail, .dui-group, .dui-cluster,
.dui-panel, .dui-sheet, .dui-row, .dui-chips, .dui-field, .dui-ib { box-sizing: border-box; }

:root {
  /* aliases kept for pages written against v2 */
  --d-ink: var(--c-ink, #0A0A0A);
  --d-paper: var(--c-surface, #FAF8F3);
  --d-line: var(--c-line, rgba(10, 10, 10, .12));
  --d-line-soft: var(--c-line2, rgba(10, 10, 10, .07));
  --d-muted: var(--c-ink3, #6B6B6B);
  --d-accent: var(--c-accent, #2E5BFF);
  --d-live: var(--c-ok, #00D4AA);
  --d-warn: var(--c-warn, #F5C400);
  --d-danger: var(--c-danger, #E23B3B);
  --d-glass: var(--c-glass, rgba(255, 255, 255, .86));
  --d-glass-solid: var(--c-surface, #fff);
  --d-blur: var(--s-blur, saturate(180%) blur(14px));
  --d-r: var(--s-r, 14px);
  --d-r-sm: var(--s-r-sm, 10px);
  --d-pill: var(--s-pill, 999px);
  --d-tap: 38px;
  --d-gap: 8px;
  --d-shadow: var(--s-shadow, 0 2px 10px rgba(10, 10, 10, .07), 0 12px 34px rgba(10, 10, 10, .09));
  --d-shadow-sm: var(--s-shadow-sm, 0 1px 4px rgba(10, 10, 10, .08));
  --d-ease: var(--s-ease, cubic-bezier(.2, .7, .3, 1));
  --d-accent-soft: color-mix(in srgb, var(--d-accent) 13%, transparent);
  --d-hover: color-mix(in srgb, var(--d-ink) 6%, transparent);
}

/* ---------------------------------------------------------------- buttons */
.btn, .chip, .chip-btn, .mode-btn {
  font-family: var(--f-body, inherit);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--d-ink);
  background: var(--d-glass-solid);
  border: var(--s-bw, 1px) solid var(--d-line);
  border-radius: var(--d-pill);
  padding: 0 14px;
  min-height: var(--d-tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--d-shadow-sm);
  transition: background .16s var(--d-ease), color .16s var(--d-ease), border-color .16s var(--d-ease), transform .12s var(--d-ease), box-shadow .16s var(--d-ease), filter .16s;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover, .chip:hover, .chip-btn:hover, .mode-btn:hover { border-color: color-mix(in srgb, var(--d-ink) 32%, transparent); }
.btn:active, .chip:active, .chip-btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--d-accent); outline-offset: 2px;
}
.btn:disabled, .btn[disabled] { opacity: .42; cursor: default; box-shadow: none; transform: none; }

/* the states the demos' scripts toggle */
.btn.primary { background: var(--d-accent); border-color: var(--d-accent); color: var(--c-on-accent, #fff); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--d-accent) 75%, transparent); }
.btn.primary:hover { border-color: var(--d-accent); filter: brightness(1.07); }
.btn.on, .chip.on, .chip-btn.on, .mode-btn.on {
  background: var(--d-accent-soft); border-color: var(--d-accent); color: var(--d-accent);
  box-shadow: inset 0 0 0 1px var(--d-accent);
}
.btn.on:hover, .chip.on:hover { border-color: var(--d-accent); }
.btn.live, .btn.rec { background: var(--d-live); border-color: var(--d-live); color: #0A0A0A; }
.btn.danger { background: var(--d-danger); border-color: var(--d-danger); color: #fff; }
.btn.warn { background: var(--d-warn); border-color: var(--d-warn); color: #0A0A0A; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { font-size: 12px; min-height: 30px; padding: 0 11px; gap: 5px; }
.btn.lg { font-size: 15px; min-height: 46px; padding: 0 22px; }

/* square icon button: keeps a real tap target without stretching the row */
.btn.ib, .btn.icon, .dui-ib {
  width: var(--d-tap); min-width: var(--d-tap); padding: 0; font-size: 16px; gap: 0; line-height: 1;
}
/* an emoji or symbol carries the meaning here, so give it room to read */
.dui-glyph, .btn.glyph { font-size: 16px; letter-spacing: 0; }
.dui-group > .btn.glyph, .dui-cluster > .btn.glyph { font-size: 15px; }
.btn.lg.ib { width: 46px; min-width: 46px; }

/* ------------------------------------------------------------ readouts */
.pill, .mono, .meta, .code {
  font-family: var(--f-mono, 'Fira Code'), ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-ligatures: none;
}
.pill {
  font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--d-ink);
  background: var(--d-glass); -webkit-backdrop-filter: var(--d-blur); backdrop-filter: var(--d-blur);
  border: var(--s-bw, 1px) solid var(--d-line); border-radius: var(--d-pill);
  padding: 7px 11px; min-height: 30px; display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; box-shadow: var(--d-shadow-sm);
}
.pill.on, .pill.live { background: var(--d-live); border-color: var(--d-live); color: #0A0A0A; }
.pill.warn { background: var(--d-warn); border-color: var(--d-warn); color: #0A0A0A; }

/* -------------------------------------------------------- form controls */
select, input:not([type]), input[type="text"], input[type="search"], input[type="number"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], textarea {
  font-family: var(--f-body, inherit); font-size: 13px; color: var(--d-ink);
  background: var(--d-glass-solid); border: var(--s-bw, 1px) solid var(--d-line);
  border-radius: var(--d-pill); padding: 0 12px; min-height: var(--d-tap);
  box-shadow: var(--d-shadow-sm); -webkit-tap-highlight-color: transparent;
}
textarea { border-radius: var(--d-r-sm); padding: 10px 12px; min-height: 72px; line-height: 1.5; resize: vertical; }
select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23777' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 11px 7px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--d-accent); width: 17px; height: 17px; cursor: pointer; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; background: transparent; height: 26px; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--d-line); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--d-line); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--d-accent); border: 2px solid #fff; box-shadow: var(--d-shadow-sm); margin-top: -7px;
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: var(--d-accent); box-shadow: var(--d-shadow-sm);
}

/* =========================================================== layout: bar */
/* The top bar: brand stays put, everything else rides a rail that scrolls sideways on a phone instead of wrapping
   into four tall rows. */
.dui-bar {
  display: flex; align-items: center; gap: var(--d-gap);
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-left: calc(12px + env(safe-area-inset-left));
  padding-right: calc(12px + env(safe-area-inset-right));
  min-width: 0;
  font-family: var(--f-body, inherit);
}
.dui-bar > * { flex: 0 0 auto; }
.dui-bar.glass {
  background: var(--d-glass); -webkit-backdrop-filter: var(--d-blur); backdrop-filter: var(--d-blur);
  border-bottom: var(--s-bw, 1px) solid var(--d-line-soft);
}
:root[data-look="swiss"] .dui-bar.glass { border-bottom-color: var(--d-ink); }
.dui-brand {
  display: flex; align-items: center; gap: 9px; min-width: 0; flex: 0 0 auto;
}
.dui-brand__text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dui-brand__text b, .dui-brand b {
  font-family: var(--f-display, inherit); font-weight: var(--s-display-weight, 700); letter-spacing: var(--s-display-track, 0); text-transform: var(--s-display-case, none);
  font-size: 14px; line-height: 1.15; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
:root[data-look="paramo"] .dui-brand__text b, :root[data-look="cinema"] .dui-brand__text b { font-size: 16px; }
.dui-brand__text .mono, .dui-brand .mono { font-size: 10px; color: var(--d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the scrolling rail */
.dui-rail {
  display: flex; align-items: center; gap: var(--d-gap);
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 3px 1px;
  margin: -3px -1px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
}
.dui-rail::-webkit-scrollbar { display: none; }
.dui-rail > * { flex: 0 0 auto; scroll-snap-align: start; }
.dui-rail.end { justify-content: flex-end; }
/* wide screens: no scrolling, let it breathe and wrap */
@media (min-width: 860px) {
  .dui-rail { overflow: visible; flex-wrap: wrap; row-gap: var(--d-gap); -webkit-mask-image: none; mask-image: none; }
}

/* --------------------------------------------------- segmented control */
/* mutually exclusive options read as ONE instrument, not as loose buttons */
.dui-group {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px; border: var(--s-bw, 1px) solid var(--d-line); border-radius: var(--d-pill);
  background: var(--d-glass); -webkit-backdrop-filter: var(--d-blur); backdrop-filter: var(--d-blur);
  box-shadow: var(--d-shadow-sm);
}
.dui-group > .btn, .dui-group > .chip, .dui-group > button {
  border: 0; background: transparent; box-shadow: none; min-height: 30px; padding: 0 12px; font-size: 12.5px;
}
.dui-group > .btn.ib, .dui-group > .dui-ib { width: 30px; min-width: 30px; }
.dui-group > .btn:hover { background: var(--d-hover); }
.dui-group > .btn.on {
  background: var(--d-glass-solid); color: var(--d-accent);
  box-shadow: 0 1px 3px rgba(10, 10, 10, .16), inset 0 0 0 1px color-mix(in srgb, var(--d-accent) 40%, transparent);
}
.dui-group > .btn.primary { background: var(--d-accent); color: var(--c-on-accent, #fff); box-shadow: none; }
.dui-group__label {
  font-family: var(--f-mono, 'Fira Code'), ui-monospace, monospace; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--d-muted); padding: 0 8px 0 10px;
}

/* ------------------------------------------------ floating control cluster */
.dui-cluster {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px; border-radius: var(--d-pill);
  background: var(--d-glass); -webkit-backdrop-filter: var(--d-blur); backdrop-filter: var(--d-blur);
  border: var(--s-bw, 1px) solid var(--d-line); box-shadow: var(--d-shadow);
}
.dui-cluster > .btn { box-shadow: none; border-color: transparent; background: transparent; min-height: 30px; }
.dui-cluster > .btn.ib, .dui-cluster > .dui-ib { width: 30px; min-width: 30px; }
.dui-cluster > .btn:hover { background: var(--d-hover); }
.dui-cluster > .btn.on { background: var(--d-glass-solid); color: var(--d-accent); box-shadow: 0 1px 3px rgba(10, 10, 10, .16), inset 0 0 0 1px color-mix(in srgb, var(--d-accent) 40%, transparent); }

/* ------------------------------------------------------------- surfaces */
.dui-panel, .dui-sheet {
  background: var(--d-glass); -webkit-backdrop-filter: var(--d-blur); backdrop-filter: var(--d-blur);
  border: var(--s-bw, 1px) solid var(--d-line); border-radius: var(--d-r);
  box-shadow: var(--d-shadow);
}
.dui-sheet { border-radius: var(--d-r) var(--d-r) 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.dui-sheet__grip { width: 38px; height: 4px; border-radius: 2px; background: var(--d-line); margin: 8px auto 4px; }
.dui-section {
  font-family: var(--f-mono, 'Fira Code'), ui-monospace, monospace; font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--d-muted);
  margin: 14px 0 6px;
}
.dui-section:first-child { margin-top: 0; }
.dui-row { display: flex; align-items: center; gap: var(--d-gap); flex-wrap: wrap; }
.dui-spacer { flex: 1 1 auto; min-width: 0; }

/* a row of option chips that scrolls instead of stacking */
.dui-chips {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.dui-chips::-webkit-scrollbar { display: none; }
.dui-chips > * { flex: 0 0 auto; }
@media (min-width: 860px) { .dui-chips { flex-wrap: wrap; overflow: visible; } }

/* ------------------------------------------------ look-specific details */
/* Swiss Lab: hard black rules and offset shadows instead of glass */
:root[data-look="swiss"] .btn, :root[data-look="swiss"] .pill, :root[data-look="swiss"] .dui-group,
:root[data-look="swiss"] .dui-cluster, :root[data-look="swiss"] select, :root[data-look="swiss"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { border-color: var(--d-ink); }
:root[data-look="swiss"] .btn.primary { box-shadow: 3px 3px 0 var(--d-ink); }
:root[data-look="swiss"] .dui-panel, :root[data-look="swiss"] .dui-sheet { border-color: var(--d-ink); background: var(--d-glass-solid); }
/* Terminal and Blueprint: technical readouts in capitals */
:root[data-look="terminal"] .btn, :root[data-look="blueprint"] .btn { letter-spacing: .02em; }
:root[data-look="terminal"] .dui-brand__text b { letter-spacing: -.02em; }

/* ------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .chip-btn, .mode-btn { transition: none; }
  .btn:active { transform: none; }
}

/* --------------------------------------------------- phone refinements */
@media (max-width: 520px) {
  :root { --d-gap: 7px; }
  .dui-bar { padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .dui-brand__text .mono, .dui-brand .mono { display: none; }
  .btn { font-size: 12.5px; padding: 0 12px; }
  .dui-brand__text b, .dui-brand b { font-size: 13px; max-width: 40vw; min-width: 64px; }
}

/* ------------------------------------------------- defensive overrides */
/* some demos put .pill on interactive controls; keep them a real tap target */
select.pill, button.pill, a.pill, input.pill {
  min-height: var(--d-tap); font-size: 12.5px; font-weight: 600;
  font-family: var(--f-body, inherit); padding: 0 13px;
}
select.pill { padding-right: 30px; }
.btn.pill { border-radius: var(--d-pill); }
a.btn { text-decoration: none; }
/* labels that wrap a control read as one unit */
label.dui-field {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--d-muted); white-space: nowrap;
}
label.dui-field > select, label.dui-field > input { flex: 0 1 auto; min-width: 0; }
/* keep long status text from blowing a row apart */
.pill.ellip, .dui-ellip { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; }

/* ==========================================================================
   Product pages in the landing's language (opt-in classes, nothing above changes):
     .dui-bg       fixed background: the landing's drifting brand glows + a fine blueprint grid
     .dui-hero     kicker (mono, rule before it) · display title with an .acc highlight · lead · stats row
     .dui-search   pill search field with a magnifier
     .dui-tabs     segmented pill tabs (button.on = active)
     .dui-cards    responsive grid of .dui-card: icon tile, title, text, arrow on hover, optional .tag
     .dui-surface  the white working panel (rounded, shadowed) used once a tool is open
   Colours, fonts and shapes are the chrome tokens, so they follow the look of the day.
   ========================================================================== */
.dui-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--c-bg); }
.dui-bg::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--c-line2) 1px, transparent 1px), linear-gradient(90deg, var(--c-line2) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }
.dui-bg i { position: absolute; width: 56vmax; height: 56vmax; border-radius: 50%; filter: blur(90px); opacity: .28; }
.dui-bg i:nth-child(1) { top: -30vmax; left: -18vmax; background: radial-gradient(circle, var(--c-accent), transparent 65%); animation: dui-drift 30s var(--s-ease) infinite alternate; }
.dui-bg i:nth-child(2) { top: 20vh; right: -30vmax; background: radial-gradient(circle, var(--c-accent2), transparent 65%); animation: dui-drift 38s var(--s-ease) infinite alternate-reverse; }
@keyframes dui-drift { to { transform: translate(10vw, 8vh) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .dui-bg i { animation: none; } }

.dui-hero { padding: clamp(18px, 4vw, 44px) 0 clamp(14px, 3vw, 26px); display: grid; gap: 14px; }
.dui-kicker { display: inline-flex; align-items: center; gap: 12px; margin: 0; font: 500 11.5px/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c-hi); }
.dui-kicker::before { content: ''; width: 26px; height: 1px; background: currentColor; flex: none; }
.dui-title { margin: 0; font-family: var(--f-display); font-weight: var(--s-display-weight); letter-spacing: var(--s-display-track); text-transform: var(--s-display-case);
  font-size: clamp(32px, 5.2vw, 64px); line-height: 1.02; max-width: 20ch; text-wrap: balance; color: var(--c-ink); }
.dui-title .acc { color: var(--c-hi); }
.dui-lead { margin: 0; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; color: var(--c-ink2); max-width: 62ch; text-wrap: pretty; }
.dui-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 6px; border-top: var(--s-bw) solid var(--c-line); }
.dui-stats > div { padding: 14px 26px 4px 0; margin-right: 26px; border-right: var(--s-bw) solid var(--c-line2); }
.dui-stats > div:last-child { border-right: 0; }
.dui-stats b { display: block; font: var(--s-display-weight) clamp(24px, 2.6vw, 34px)/1 var(--f-display); letter-spacing: var(--s-display-track); color: var(--c-ink); }
.dui-stats small { display: block; margin-top: 6px; font: 500 10.5px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink3); }

.dui-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.dui-search input { width: 100%; min-height: 44px; padding: 0 16px 0 42px; border-radius: var(--s-pill); border: var(--s-bw) solid var(--c-line); background: var(--c-glass);
  -webkit-backdrop-filter: var(--s-blur); backdrop-filter: var(--s-blur); box-shadow: var(--s-shadow-sm); font-size: 14px; color: var(--c-ink); }
.dui-search input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.dui-search svg { position: absolute; z-index: 1; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--c-ink3); fill: none; stroke-width: 2; stroke-linecap: round; }

.dui-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--s-pill); background: var(--c-glass); border: var(--s-bw) solid var(--c-line);
  -webkit-backdrop-filter: var(--s-blur); backdrop-filter: var(--s-blur); box-shadow: var(--s-shadow-sm); flex-wrap: wrap; }
.dui-tabs > button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--c-ink2); border-radius: var(--s-pill);
  padding: 9px 16px; font: 600 13.5px/1 var(--f-body); cursor: pointer; transition: background .25s var(--s-ease), color .25s; min-height: 0; box-shadow: none; }
.dui-tabs > button:hover { color: var(--c-ink); background: var(--c-line2); }
.dui-tabs > button.on { background: var(--c-ink); color: var(--c-bg); }
.dui-tabs > button .n { font: 500 11px var(--f-mono); opacity: .6; }

.dui-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.dui-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding: 18px 18px 16px; border-radius: var(--s-r);
  background: var(--c-surface); border: var(--s-bw) solid var(--c-line); box-shadow: var(--s-shadow-sm); cursor: pointer; text-align: left; color: var(--c-ink);
  transition: transform .35s var(--s-ease), box-shadow .35s var(--s-ease), border-color .25s; overflow: hidden; isolation: isolate; font: inherit; }
.dui-card::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s var(--s-ease);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--tint, var(--c-accent)) 12%, transparent), transparent 60%); }
.dui-card:hover { transform: translateY(-3px); box-shadow: var(--s-shadow); border-color: color-mix(in srgb, var(--tint, var(--c-accent)) 45%, var(--c-line)); }
.dui-card:hover::after { opacity: 1; }
.dui-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.dui-card .ic { width: 44px; height: 44px; border-radius: var(--s-r-sm); display: grid; place-items: center; color: var(--tint, var(--c-accent));
  background: color-mix(in srgb, var(--tint, var(--c-accent)) 12%, transparent); border: var(--s-bw) solid color-mix(in srgb, var(--tint, var(--c-accent)) 22%, transparent); }
.dui-card .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dui-card b { font: 700 15px/1.25 var(--f-body); letter-spacing: -.01em; }
.dui-card span { font-size: 12.5px; line-height: 1.45; color: var(--c-ink3); }
.dui-card .go { position: absolute; right: 16px; top: 18px; width: 18px; height: 18px; color: var(--c-ink3); opacity: 0; transform: translateX(-6px);
  transition: opacity .3s var(--s-ease), transform .3s var(--s-ease); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dui-card:hover .go { opacity: 1; transform: none; color: var(--tint, var(--c-accent)); }
.dui-card .tag { position: absolute; right: 14px; bottom: 14px; font: 600 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px;
  border-radius: var(--s-pill); background: color-mix(in srgb, var(--tint, var(--c-accent)) 14%, transparent); color: var(--tint, var(--c-accent)); }
.dui-empty { padding: 34px; text-align: center; color: var(--c-ink3); border: var(--s-bw) dashed var(--c-line); border-radius: var(--s-r); }
.dui-surface { background: var(--c-surface); border: var(--s-bw) solid var(--c-line); border-radius: calc(var(--s-r) + 4px); box-shadow: var(--s-shadow); padding: clamp(14px, 2.4vw, 26px); }
@media (max-width: 640px) { .dui-cards { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; } .dui-card { min-height: 128px; padding: 14px; } .dui-card .ic { width: 38px; height: 38px; } .dui-stats > div { padding-right: 16px; margin-right: 16px; } }
