/* Base elements and shared components. Depends on tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: var(--violet); color: #fff; border-radius: var(--r-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
.mono { font-family: var(--font-mono); }

/* icons */
.i {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 1em; height: 1em; }
.i-lg { width: 1.6em; height: 1.6em; }

/* logo */
.logo { height: 100%; width: auto; }
.logo-word { fill: var(--logo-text); }
.brand { display: inline-flex; align-items: center; height: 44px; text-decoration: none; }

/* buttons */
.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--btn-h); padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 15px/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn .i { width: 1.15em; height: 1.15em; stroke-width: 2; }
.btn-primary {
  background: linear-gradient(180deg, #7a3af0 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--glow-strong), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { background: linear-gradient(180deg, #8547f5 0%, #7433e9 100%); box-shadow: 0 10px 30px -8px var(--glow-strong), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--accent-border); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-success { background: linear-gradient(180deg, #2fd16b, #1fae55); color: #fff; box-shadow: 0 8px 22px -12px rgba(34,197,94,.7); }
.btn-lg { --btn-h: 50px; padding: 0 26px; font-size: 16.5px; border-radius: 10px; }
.btn-sm { --btn-h: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn .i { width: 18px; height: 18px; }

/* theme toggle swaps its icon via tokens-free selectors */
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: block; }
}

/* pills / badges */
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px;
  border-radius: 8px; font: 500 14.5px/1.2 var(--font-ui); white-space: nowrap;
  background: var(--accent-soft); color: var(--text); border: 1px solid transparent;
}
.pill .i { width: 16px; height: 16px; stroke-width: 2; }
.pill-exploring { background: var(--accent-soft-2); color: var(--text); }
.pill-exploring .dots { display: inline-flex; gap: 4px; }
.pill-exploring .dots i { width: 7px; height: 7px; border-radius: 50%; background: #8ea2ff; animation: pulse 1.2s infinite var(--ease); }
.pill-exploring .dots i:nth-child(2) { animation-delay: .15s; }
.pill-exploring .dots i:nth-child(3) { animation-delay: .3s; }
.pill-approval { background: var(--violet); color: #fff; white-space: normal; max-width: 240px; font-weight: 600; padding: 6px 14px; }
.pill-recording { background: var(--coral-soft); color: var(--coral-text); border-color: var(--coral-border); }
.pill-recording .rec { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255,107,91,.6); animation: rec 1.6s infinite; }
.pill-rendering { background: var(--neutral-soft); color: var(--text); }
.pill-rendering .i { animation: spin 1.6s linear infinite; }
.pill-delivered { background: var(--success-soft); color: var(--success-text); border-color: var(--success-border); }
.pill-scheduled { background: var(--accent-soft-2); color: var(--text); white-space: normal; max-width: 240px; }
.pill-neutral { background: var(--neutral-soft); color: var(--text-2); }
.pill-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.pill-failed { background: transparent; border-color: var(--border-strong); color: var(--text); }
.pill-ready { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.pill-sm { min-height: 24px; padding: 2px 9px; font-size: 12.5px; border-radius: 6px; }
.badge {
  display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 8px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text); font: 600 14px/1 var(--font-ui);
}
.tag { display: inline-flex; padding: 3px 10px; border-radius: 6px; background: var(--accent-soft-2); color: var(--text); font: 500 13.5px/1.3 var(--font-ui); }
.eyebrow { font: 700 15px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.step-num { font: 700 13px/1 var(--font-head); color: var(--accent-text); letter-spacing: .02em; }

@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(255,107,91,.55); } 70% { box-shadow: 0 0 0 7px rgba(255,107,91,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,91,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.icon-tile {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; flex: none;
  background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-text);
}
.icon-tile .i { width: 26px; height: 26px; stroke-width: 1.6; }
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: -12% -8%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow-strong), transparent 72%);
  filter: blur(30px); opacity: .9;
}

/* forms */
/* minmax(0, 1fr): a field never grows wider than its form, whatever the input's intrinsic size */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.label { font: 600 15px/1.3 var(--font-ui); color: var(--text); }
.hint { font-size: 14px; color: var(--muted); }
.input {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--accent-border); box-shadow: var(--focus); }
.input > .i { color: var(--muted); width: 19px; height: 19px; }
.input input, .input select {
  /* 16px: iOS Safari zooms the whole page into any field set smaller */
  flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none; font-size: 16px;
  appearance: none;
}
.input input::placeholder { color: var(--subtle); }
.input .chev { color: var(--muted); pointer-events: none; }
.input .reveal { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; }
.input .reveal:hover { color: var(--text); }
select.native { color: var(--text); }
select.native option { background: var(--surface); color: var(--text); }

/* toggle switch */
.switch { position: relative; display: inline-flex; flex: none; width: 52px; height: 30px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track {
  width: 100%; height: 100%; border-radius: var(--r-pill); background: var(--border-strong); transition: background .2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease);
}
.switch input:checked + .track { background: var(--violet); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.switch-sm { width: 40px; height: 24px; }
.switch-sm .track::after { width: 18px; height: 18px; top: 3px; left: 3px; }
.switch-sm input:checked + .track::after { transform: translateX(16px); }

/* checkbox */
.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.check input:checked { background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--violet); }
.check input:focus-visible { box-shadow: var(--focus); }

/* stepper (numbered circles + connectors) */
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper .s { display: inline-flex; align-items: center; gap: 12px; font: 500 16px/1 var(--font-ui); color: var(--muted); white-space: nowrap; }
.stepper .dot {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); font: 600 14px/1 var(--font-ui); color: var(--muted);
}
.stepper .done .dot { background: var(--accent-soft-2); border-color: transparent; color: var(--accent-text); }
.stepper .done .dot .i { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper .done, .stepper .current { color: var(--text); }
.stepper .current .dot { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper .current { font-weight: 600; }
.stepper .bar { flex: 1; height: 2px; min-width: 24px; background: var(--border-strong); border-radius: 2px; }
.stepper .bar.on { background: var(--violet-400); }

/* accordion */
.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.acc details { border-top: 1px solid var(--border); }
.acc details:first-child { border-top: 0; }
.acc details[open] { background: var(--surface-2); }
.acc summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; cursor: pointer; font: 700 16.5px/1.3 var(--font-head); color: var(--text);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .i { width: 22px; height: 22px; stroke-width: 2; }
.acc summary .i-minus { display: none; }
.acc details[open] summary .i-minus { display: block; }
.acc details[open] summary .i-plus { display: none; }
.acc .acc-body { padding: 0 20px 16px; color: var(--muted); font-size: 15.5px; margin-top: -6px; }

/* tables */
.table { width: 100%; font-size: 15px; }
.table th { text-align: left; font: 600 15px/1.3 var(--font-ui); color: var(--text); padding: 11px 16px; }
.table td { padding: 10px 16px; border-top: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }

/* avatars */
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--surface-3); color: var(--text); font: 700 14px/1 var(--font-ui); border: 1px solid var(--border);
}
.avatar-photo { background: linear-gradient(140deg, #f3c9a9, #b9744e 55%, #3b2418); border: 2px solid var(--surface); color: transparent; position: relative; overflow: hidden; }
.avatar-photo::after { content: ""; position: absolute; left: 22%; right: 22%; top: 16%; height: 55%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #f6d3b8 0 45%, transparent 47%); }
.avatar-violet { background: var(--accent-soft-2); color: var(--accent-text); border-color: transparent; }
.avatar-face {
  background: radial-gradient(circle at 50% 38%, #f2c4a2 0 26%, transparent 27%), radial-gradient(circle at 50% 110%, #6f2de3 0 45%, transparent 46%), linear-gradient(160deg, #3b2418, #6a3b22);
  color: transparent; border: 2px solid var(--surface);
}

/* progress */
.meter { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b18cff, var(--violet-400)); }

/* preview ribbon for non-functional app screens */
.preview-ribbon {
  display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px dashed var(--accent-border); background: var(--accent-soft); color: var(--accent-text);
  font: 700 12px/1 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.preview-ribbon .i { width: 15px; height: 15px; }
@media (max-width: 640px) { .preview-ribbon .pr-extra { display: none; } }

/* ---------------------------------------------------------------
   Product mockups. Everything is sized in em so a single font-size
   on the root scales the whole fake UI (container query units). */
.player {
  container-type: inline-size; position: relative; border-radius: 18px; background: var(--player-bg);
  border: 1px solid var(--accent-border); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.player-inner { font-size: calc(100cqw / 60); }
.ns { display: grid; grid-template-columns: 14em 1fr; min-height: 34em; border-radius: 18px 18px 0 0; overflow: hidden; }
.ns-side { padding: 1.6em 1em; border-right: 1px solid var(--border); background: var(--player-chrome); }
.ns-brand { display: flex; align-items: center; gap: .5em; font: 700 1.35em/1 var(--font-head); margin: 0 0 1.4em .4em; color: var(--text); }
.ns-brand .i { color: var(--violet-400); width: 1.1em; height: 1.1em; }
.ns-nav { display: grid; gap: .3em; }
.ns-nav span { display: flex; align-items: center; gap: .9em; padding: .65em .8em; border-radius: .6em; font: 500 1em/1 var(--font-ui); color: var(--text-2); }
.ns-nav span .i { width: 1.35em; height: 1.35em; color: var(--muted); }
.ns-nav .on { background: var(--accent-soft-2); color: var(--text); }
.ns-main { padding: 1.2em 1.4em 0; position: relative; }
.ns-rec { display: flex; align-items: center; gap: .5em; font: 500 1em/1 var(--font-ui); color: var(--text-2); }
.ns-rec i { width: .8em; height: .8em; border-radius: 50%; background: var(--coral); animation: rec 1.6s infinite; }
.ns-head { display: flex; align-items: center; justify-content: space-between; margin: 1em 0 .9em; }
.ns-head h4 { font: 700 1.75em/1 var(--font-head); letter-spacing: -.01em; color: var(--text); }
.ns-new { position: relative; padding: .55em 1.1em; border-radius: var(--r-pill); background: var(--violet); color: #fff; font: 600 1em/1 var(--font-ui); box-shadow: 0 0 0 .35em var(--accent-soft), 0 0 2em var(--glow-strong); }
.ns-new .cursor { position: absolute; right: -1.1em; bottom: -1.5em; width: 2.2em; height: 2.2em; }
.ns-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9em; }
.ns-stat { display: flex; align-items: center; gap: .9em; padding: .8em 1em; border-radius: .7em; background: var(--surface-2); border: 1px solid var(--border); }
.ns-stat .i { width: 2em; height: 2em; color: var(--accent-text); padding: .3em; }
.ns-stat small { display: block; font: 500 .8em/1.2 var(--font-ui); color: var(--muted); }
.ns-stat b { display: block; font: 700 1.5em/1.15 var(--font-head); color: var(--text); }
.ns-chart { margin-top: .9em; padding: .9em 1em .4em; border-radius: .7em; background: var(--surface-2); border: 1px solid var(--border); }
.ns-chart small { font: 600 .9em/1 var(--font-ui); color: var(--text); }
.ns-chart svg { width: 100%; height: 6.6em; margin-top: .3em; }
.ns-table { margin-top: .9em; font: 500 .82em/1 var(--font-ui); width: 100%; }
.ns-table th { color: var(--muted); font-weight: 500; text-align: left; padding: 0 0 .7em; }
.ns-table td { padding: .55em 0; color: var(--text); white-space: nowrap; }
.ns-table td .i { width: 1.4em; height: 1.4em; color: var(--accent-text); display: inline-block; vertical-align: middle; margin-right: .7em; }
.ns-faces { display: inline-flex; align-items: center; gap: .2em; color: var(--muted); }
.ns-faces i { width: 1.5em; height: 1.5em; border-radius: 50%; background: linear-gradient(140deg, #f1c3a0, #8a5236); border: .12em solid var(--player-bg); margin-left: -.45em; }
.ns-faces i:first-child { margin-left: 0; }
.ns-prog { display: inline-block; width: 6em; height: .5em; border-radius: 1em; background: var(--surface-3); vertical-align: middle; margin-right: .8em; overflow: hidden; }
.ns-prog b { display: block; height: 100%; background: linear-gradient(90deg, #8b55f0, var(--violet)); border-radius: inherit; }
.ns-ok { display: inline-block; padding: .35em .7em; border-radius: .4em; background: var(--success-soft); color: var(--success-text); font-size: .95em; }
.caption {
  display: inline-block; padding: .45em .9em; border-radius: .5em; background: var(--caption-bg); color: var(--caption-text);
  font: 500 1.3em/1.2 var(--font-ui); border: 1px solid rgba(255,255,255,.12); white-space: nowrap;
}
.caption mark { background: var(--violet); color: #fff; padding: 0 .2em; border-radius: .2em; }
.ns-caption { position: absolute; left: 50%; bottom: .9em; transform: translateX(-35%); }
.controls { display: flex; align-items: center; gap: 1.2em; padding: 1.1em 1.6em; border-top: 1px solid var(--border); color: var(--text); font-size: 1em; }
.controls .i { width: 1.6em; height: 1.6em; }
.controls .t { font: 500 1em/1 var(--font-ui); white-space: nowrap; color: var(--text-2); }
.scrub { position: relative; flex: 1; height: .45em; border-radius: 1em; background: var(--surface-3); }
.scrub b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #8b55f0, var(--violet)); }
.scrub i { position: absolute; top: 50%; width: 1.2em; height: 1.2em; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 .3em var(--accent-soft-2); }
.narrating {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .9em; padding: .75em 1.4em;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--accent-border);
  font: 600 1.35em/1 var(--font-ui); color: var(--text); box-shadow: var(--shadow-md), 0 0 2em var(--glow);
}
.wave { display: inline-flex; align-items: center; gap: .14em; height: 1.2em; }
.wave i { width: .14em; border-radius: .1em; background: var(--accent-text); height: 40%; animation: wave 1.1s infinite ease-in-out; }
.wave i:nth-child(3n) { animation-delay: -.3s; }
.wave i:nth-child(3n+1) { animation-delay: -.6s; }
.wave i:nth-child(4n) { animation-delay: -.8s; height: 80%; }
@keyframes wave { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.sb-card {
  position: absolute; z-index: 2; padding: 1.3em 1.2em 1.1em; border-radius: 1em; background: var(--surface);
  border: 1px solid var(--accent-border); box-shadow: var(--shadow-lg), 0 0 3em var(--glow);
}
.sb-card h5 { margin: 0; font: 700 1.75em/1.1 var(--font-head); color: var(--text); }
.sb-card .sub { font-size: 1.15em; color: var(--muted); margin-top: .25em; }
.sb-card .appr { position: absolute; right: 1.1em; top: 1.3em; display: inline-flex; gap: .3em; align-items: center; padding: .4em .8em; border-radius: .5em; background: var(--accent-soft-2); color: var(--text); font: 500 1.05em/1 var(--font-ui); }
.sb-card .appr .i { width: 1em; height: 1em; stroke-width: 2.5; }
.sb-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; margin-top: 1.1em; }
.sb-thumbs figure { margin: 0; }
.sb-thumbs .th { height: 5.5em; border-radius: .6em; border: 1px solid var(--border-strong); background: var(--surface-2); padding: .55em; position: relative; overflow: hidden; }
.sb-thumbs figcaption { font: 500 1.05em/1.2 var(--font-ui); margin-top: .55em; color: var(--text); white-space: nowrap; }
.th .ln { display: block; height: .4em; border-radius: .2em; background: var(--border-strong); margin: .35em 0; }
.th .tb { font: 700 .7em/1 var(--font-ui); color: var(--text); display: flex; align-items: center; gap: .3em; }
.th .np { display: inline-block; margin: 1em auto 0; padding: .45em .8em; border-radius: 1em; background: var(--violet); color: #fff; font: 600 .75em/1 var(--font-ui); }
.th .cursor { position: absolute; width: 1.6em; height: 1.6em; right: 1.2em; bottom: .6em; }

/* Generic mini app ("Acme"-style) used for thumbnails and previews. */
.mini { container-type: inline-size; border-radius: 10px; background: var(--player-bg); border: 1px solid var(--border-strong); overflow: hidden; position: relative; }
.mini-in { font-size: calc(100cqw / 26); display: grid; grid-template-columns: 7.6em 1fr; height: 100%; min-height: 9.6em; }
.mini-side { padding: .9em .6em; border-right: 1px solid var(--border); background: var(--player-chrome); }
.mini-side b { display: flex; align-items: center; gap: .35em; font: 700 .8em/1 var(--font-ui); color: var(--text); margin: 0 0 .9em .2em; }
.mini-side b .i { width: 1.1em; height: 1.1em; color: var(--violet-400); }
.mini-side span { display: flex; align-items: center; gap: .45em; padding: .4em .45em; border-radius: .35em; font: 500 .62em/1 var(--font-ui); color: var(--text-2); }
.mini-side span .i { width: 1.25em; height: 1.25em; color: var(--muted); }
.mini-side span.on { background: var(--accent-soft-2); color: var(--text); }
.mini-main { padding: .9em .9em .5em; position: relative; min-width: 0; }
.mini-main h6 { margin: 0 0 .6em; font: 700 .85em/1 var(--font-ui); color: var(--text); }
.mini-main svg { width: 100%; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; margin-bottom: .4em; }
.mini-kpis div { padding: .45em .5em; border-radius: .35em; background: var(--surface-2); border: 1px solid var(--border); font: 500 .55em/1.3 var(--font-ui); color: var(--muted); }
.mini-kpis b { display: block; font: 700 1.6em/1.1 var(--font-ui); color: var(--text); }
.mini-kpis em { font-style: normal; color: var(--success-text); }
.mini-bars { display: flex; align-items: flex-end; gap: .45em; height: 5.2em; padding: 0 .3em; }
.mini-bars i { flex: 1; border-radius: .2em .2em 0 0; background: linear-gradient(180deg, var(--violet-400), var(--violet)); }
.mini-flow { display: flex; align-items: center; gap: .3em; margin-top: 1.4em; color: var(--muted); }
.mini-flow span { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: .4em; border: 1px solid var(--accent-border); background: var(--accent-soft); color: var(--accent-text); }
.mini-flow span.ok { border-color: var(--success-border); background: var(--success-soft); color: var(--success-text); }
.mini-flow .i { width: 1.2em; height: 1.2em; }
.mini-donut { display: flex; align-items: center; gap: 1.2em; margin-top: .6em; }
.mini-donut .ring { width: 4.6em; height: 4.6em; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--violet-400) 0 68%, var(--surface-3) 68% 100%); }
.mini-donut .ring b { display: grid; place-items: center; width: 3.4em; height: 3.4em; border-radius: 50%; background: var(--player-bg); font: 700 .8em/1 var(--font-ui); color: var(--text); }
.mini-lines { flex: 1; display: grid; gap: .6em; }
.mini-lines i { display: flex; align-items: center; gap: .4em; }
.mini-lines i::before { content: ""; width: .35em; height: .35em; border-radius: 50%; background: var(--accent-border); }
.mini-lines i::after { content: ""; flex: 1; height: .3em; border-radius: .2em; background: var(--border-strong); }
.mini-check { display: grid; gap: .65em; margin-top: .4em; }
.mini-check i { display: flex; align-items: center; gap: .5em; }
.mini-check i .i { width: 1em; height: 1em; color: var(--success-text); stroke-width: 3; }
.mini-check i::after { content: ""; flex: 1; height: .3em; border-radius: .2em; background: var(--border-strong); max-width: 7em; }
.mini-table { width: 100%; font: 500 .55em/1 var(--font-ui); color: var(--text-2); }
.mini-table td { padding: .5em .2em; border-top: 1px solid var(--border); white-space: nowrap; }
.mini-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; }
.mini-cols > div { display: grid; gap: .35em; align-content: start; font: 600 .5em/1 var(--font-ui); color: var(--muted); }
.mini-cols i { display: block; height: 1.6em; border-radius: .3em; background: var(--surface-2); border: 1px solid var(--border); }
.mini-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 3.2em; height: 3.2em; border-radius: 50%; background: rgba(10, 12, 30, .55); border: 2px solid rgba(255,255,255,.9); color: #fff;
  backdrop-filter: blur(4px);
}
.mini-play .i { width: 1.3em; height: 1.3em; margin-left: .15em; }
.mini-dur { position: absolute; right: .6em; bottom: .5em; padding: .25em .45em; border-radius: .3em; background: rgba(10,12,30,.75); color: #fff; font: 600 .75em/1 var(--font-ui); }
.mini .cursor { position: absolute; width: 1.6em; height: 1.6em; }

/* Acme workspace (large mock used in storyboard, delivered video, QA) */
.acme { container-type: inline-size; position: relative; border-radius: 12px; background: var(--player-bg); border: 1px solid var(--border-strong); overflow: hidden; }
.acme-in { font-size: calc(100cqw / 56); display: grid; grid-template-columns: 11em 1fr; min-height: 30em; }
.acme-side { padding: 1.4em .9em; border-right: 1px solid var(--border); background: var(--player-chrome); }
.acme-side b { display: flex; align-items: center; gap: .55em; font: 700 .85em/1 var(--font-ui); color: var(--text); margin: 0 0 1.4em .3em; white-space: nowrap; }
.acme-side b .tri { width: 0; height: 0; border-left: .6em solid transparent; border-right: .6em solid transparent; border-bottom: 1.05em solid var(--violet-400); }
.acme-side span { display: flex; align-items: center; gap: .7em; padding: .6em .7em; border-radius: .45em; font: 500 .85em/1 var(--font-ui); color: var(--text-2); margin-bottom: .25em; }
.acme-side span .i { width: 1.3em; height: 1.3em; color: var(--muted); }
.acme-side span.on { background: var(--accent-soft-2); color: var(--text); }
.acme-main { padding: 1.4em 1.5em 1em; position: relative; min-width: 0; }
.acme-top { display: flex; justify-content: flex-end; align-items: center; gap: .9em; color: var(--muted); position: absolute; right: 1.5em; top: 1.3em; }
.acme-top .i { width: 1.4em; height: 1.4em; }
.acme-top .av { width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--accent-soft-2); color: var(--accent-text); display: grid; place-items: center; font: 700 .7em/1 var(--font-ui); }
.acme-main h6 { margin: 0 0 1em; font: 700 1.45em/1 var(--font-head); color: var(--text); }
.acme-kpis { display: flex; gap: .7em; }
.acme-kpis div { padding: .55em .8em; border-radius: .5em; background: var(--surface-2); border: 1px solid var(--border); font: 500 .7em/1.3 var(--font-ui); color: var(--muted); min-width: 7.5em; }
.acme-kpis b { font: 700 1.9em/1.2 var(--font-ui); color: var(--text); margin-right: .4em; }
.acme-kpis em { font-style: normal; color: var(--success-text); font-size: .9em; }
.acme-chart { margin-top: .6em; }
.acme-chart svg { width: 100%; height: 9.5em; overflow: visible; }
.acme-chart text { font: 500 7px var(--font-ui); fill: var(--muted); }
.acme-recent { margin-top: .7em; }
.acme-recent h6 { font: 700 .85em/1 var(--font-ui); margin: 0 0 .5em; }
.acme-recent table { width: 100%; font: 500 .72em/1 var(--font-ui); color: var(--text-2); }
.acme-recent th { text-align: left; color: var(--muted); font-weight: 500; padding: .4em .3em; }
.acme-recent td { padding: .55em .3em; border-top: 1px solid var(--border); white-space: nowrap; }
.acme-recent td .fd { display: inline-block; width: 1.1em; height: .85em; border-radius: .15em; background: var(--violet-400); margin-right: .6em; vertical-align: -.1em; }
.acme-modal {
  position: absolute; right: 1.2em; top: 4.2em; width: 21em; padding: 1em 1.1em; border-radius: .8em; background: var(--surface);
  border: 1.5px solid var(--accent-border); box-shadow: var(--shadow-lg), 0 0 2.5em var(--glow);
}
.acme-modal h6 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .9em; font: 700 1.1em/1 var(--font-ui); }
.acme-modal h6 .i { width: 1.1em; height: 1.1em; color: var(--muted); }
.acme-modal label { display: block; font: 500 .75em/1 var(--font-ui); color: var(--text-2); margin: .7em 0 .45em; }
.acme-modal .in { padding: .6em .7em; border-radius: .4em; border: 1px solid var(--border-strong); background: var(--surface-2); font: 500 .8em/1 var(--font-ui); color: var(--text); }
.acme-modal .tpl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45em; }
.acme-modal .tpl span { position: relative; padding: .6em .5em; border-radius: .45em; border: 1px solid var(--border-strong); background: var(--surface-2); font: 500 .68em/1.3 var(--font-ui); color: var(--text-2); display: grid; gap: .4em; }
.acme-modal .tpl span .i { width: 1.6em; height: 1.6em; color: var(--text); }
.acme-modal .tpl span.on { border-color: var(--accent-border); background: var(--accent-soft-2); color: var(--text); }
.acme-modal .tpl span.on::after { content: ""; position: absolute; right: .45em; top: .45em; width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--violet-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/65% no-repeat; }
.acme-modal .acts { display: flex; justify-content: flex-end; gap: .6em; margin-top: 1em; }
.acme-modal .acts span { padding: .65em 1.1em; border-radius: .45em; border: 1px solid var(--border-strong); font: 600 .75em/1 var(--font-ui); }
.acme-modal .acts span.pri { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 0 1.5em var(--glow-strong); position: relative; }
.acme-modal .acts .cursor { position: absolute; right: -1.1em; bottom: -1.6em; width: 2.2em; height: 2.2em; }
.acme .caption { position: absolute; left: 50%; bottom: 1.2em; transform: translateX(-50%); font-size: 2.1cqw; }
.hl-box { position: absolute; border: 2px solid var(--coral); border-radius: .5em; box-shadow: 0 0 0 1px rgba(255,107,91,.15); }
.hl-box::before, .hl-box::after { content: ""; position: absolute; width: .6em; height: .6em; background: var(--coral); border-radius: .1em; }
.hl-box::before { left: -.35em; top: -.35em; box-shadow: calc(100cqw * 0) 0 0 0; }
.hl-box::after { right: -.35em; bottom: -.35em; }
.zoom-tag { position: absolute; padding: .3em .6em; border-radius: .35em; background: var(--coral-soft); border: 1px solid var(--coral); color: var(--coral-text); font: 600 .8em/1 var(--font-ui); }
.path-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* Touch screens: every tap target at least 44x44 (Apple HIG). Desktop keeps the compact sizes. */
@media (pointer: coarse), (max-width: 640px) {
  .icon-btn { width: 44px; height: 44px; }
  .btn-sm { --btn-h: 44px; }
  .input .reveal { min-width: 44px; min-height: 44px; place-items: center; margin-right: -10px; }
  .check { min-height: 44px; }
}

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