/* ───────────────────────── base ───────────────────────── */
:root {
  /* Deliberately neutral chrome: the only real color on screen should be the palette. */
  --bg: #141414;
  --panel: #1b1b1b;
  --panel-2: #232323;
  --border: #2c2c2c;
  --border-strong: #3d3d3d;
  --text: #d9d9d9;
  --muted: #8a8a8a;
  --control: #e4e4e4;      /* primary buttons / active segments */
  --on-control: #141414;
  --focus: #6f6f6f;
  --ok: #9fc49f;
  --warn: #c9b78a;
  --bad: #c99a9a;
  --radius: 12px;
  /* role colors, filled in by JS */
  --c60: #2a2a2a;
  --c30: #363636;
  --c10: #8a8a8a;
  --on60: #ffffff;
  --on30: #ffffff;
  --on10: #111111;
  --letterbox: #0e0e0e;
  --shadow: rgba(0,0,0,.25);
  color-scheme: dark;
}

/* Light chrome: same neutrality, inverted. Used when Mode = Light, or when
   Mode = Auto and the OS prefers light. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ececec; --panel: #f7f7f7; --panel-2: #e9e9e9; --border: #d8d8d8; --border-strong: #b9b9b9;
    --text: #222222; --muted: #6e6e6e; --control: #2b2b2b; --on-control: #f5f5f5; --focus: #8d8d8d;
    --ok: #4e7a4e; --warn: #8a7340; --bad: #9a5a5a; --letterbox: #dcdcdc; --shadow: rgba(0,0,0,.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ececec; --panel: #f7f7f7; --panel-2: #e9e9e9; --border: #d8d8d8; --border-strong: #b9b9b9;
  --text: #222222; --muted: #6e6e6e; --control: #2b2b2b; --on-control: #f5f5f5; --focus: #8d8d8d;
  --ok: #4e7a4e; --warn: #8a7340; --bad: #9a5a5a; --letterbox: #dcdcdc; --shadow: rgba(0,0,0,.12);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141414; --panel: #1b1b1b; --panel-2: #232323; --border: #2c2c2c; --border-strong: #3d3d3d;
  --text: #d9d9d9; --muted: #8a8a8a; --control: #e4e4e4; --on-control: #141414; --focus: #6f6f6f;
  --ok: #9fc49f; --warn: #c9b78a; --bad: #c99a9a; --letterbox: #0e0e0e; --shadow: rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  transition: background-color .2s, color .2s;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1, h2 { margin: 0; font-weight: 600; }
h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
code, pre, kbd { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
kbd { background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
button { font: inherit; cursor: pointer; }

/* ───────────────────────── header ───────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 18px; }
.logo { display: inline-flex; gap: 2px; height: 22px; width: 36px; border-radius: 6px; overflow: hidden; }
.logo i:nth-child(1) { flex: 6; background: var(--c60); }
.logo i:nth-child(2) { flex: 3; background: var(--c30); }
.logo i:nth-child(3) { flex: 1; background: var(--c10); }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }

/* ───────────────────────── layout ───────────────────────── */
.layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 20px;
  padding: 20px 24px; max-width: 1500px; margin: 0 auto;
}
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.input-panel { align-self: start; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }

/* ───────────────────────── input ───────────────────────── */
.dropzone {
  position: relative; min-height: 170px; border: 2px dashed var(--border); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  cursor: pointer; overflow: hidden; background: var(--panel-2); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: var(--border-strong); outline: none; }
.dropzone.over { background: var(--border); }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--letterbox); }
.dropzone img:not([hidden]) + .dz-empty { display: none; }
.dz-empty { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 20px; }
.dz-empty strong { color: var(--text); }
.dz-empty span { font-size: 12px; }

.btn {
  background: var(--control); color: var(--on-control); border: 1px solid transparent; border-radius: 8px;
  padding: 8px 14px; font-weight: 600; transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
textarea, input[type=text] {
  width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical;
}
textarea:focus, input[type=text]:focus { outline: 1px solid var(--focus); outline-offset: -1px; }
input[type=text] { flex: 1; min-width: 120px; }

.segmented { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button {
  background: transparent; border: 0; color: var(--muted); border-radius: 6px; padding: 5px 14px; font-weight: 600;
}
.segmented button.active { background: var(--control); color: var(--on-control); }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.saved { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.saved li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); cursor: pointer; }
.saved li:hover { outline: 1px solid var(--border); }
.saved .mini { display: inline-flex; height: 18px; width: 48px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.saved .mini i { display: block; }
.saved .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.saved .del { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.saved .del:hover { color: var(--text); background: var(--border); }
.saved .none { color: var(--muted); font-size: 12px; cursor: default; background: none; }

/* ───────────────────────── results ───────────────────────── */
.status { padding: 10px 14px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); margin-bottom: 14px; }
.status.error { color: var(--bad); }
.status.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; margin-right: 8px; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 60px 20px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { margin: 4px 0; }

.strip { display: flex; height: 56px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.strip i { display: block; min-width: 6px; transition: flex .3s; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.swatch {
  display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px 6px 6px; cursor: pointer; font-size: 12px;
}
.swatch:hover { border-color: var(--border-strong); }
.swatch i { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); }
.swatch code { color: var(--text); }
.swatch .pct { color: var(--muted); }
.swatch .badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--control); color: var(--on-control); }
.swatch .derived { font-size: 10px; padding: 1px 6px; border-radius: 999px; border: 1px dashed var(--border-strong); color: var(--muted); }
.swatch.is-derived i { outline: 1px dashed var(--border-strong); outline-offset: 2px; }

.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 1100px) { .roles { grid-template-columns: 1fr; } }
.role { display: grid; grid-template-rows: 120px auto; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.role-swatch { display: grid; place-items: center; font-weight: 700; font-size: 26px; letter-spacing: .02em; }
.role-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.role-title { font-size: 15px; }
.role-title b { font-size: 18px; margin-right: 6px; }
.role-body p { margin: 0; font-size: 12px; }
.role-hex { display: flex; align-items: center; gap: 6px; }
.role-hex code { font-size: 15px; }
.copy { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 1px 7px; }
.copy:hover { color: var(--text); border-color: var(--text); }
select.override {
  margin-top: 4px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px;
}
select.override:disabled { opacity: .55; cursor: not-allowed; }
.role .choices { font-size: 11px; color: var(--muted); }

.proportion { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 14px; border: 1px solid var(--border); }
.proportion i:nth-child(1) { flex: 60; background: var(--c60); }
.proportion i:nth-child(2) { flex: 30; background: var(--c30); }
.proportion i:nth-child(3) { flex: 10; background: var(--c10); }

.theme-line { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.theme-line i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); }
.theme-line code, .theme-line b { color: var(--text); }
.adjustments { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.adjustments div::before { content: "↳ "; }
.adjustments code { color: var(--text); }

.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
@media (max-width: 1100px) { .rules { grid-template-columns: 1fr; } }
.rule { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); }
.rule .mark { font-weight: 700; text-align: center; line-height: 1.3; }
.rule.pass .mark { color: var(--ok); }
.rule.fail .mark { color: var(--bad); }
.rule .name { font-weight: 600; font-size: 13px; }
.rule .why { font-size: 12px; color: var(--muted); margin: 2px 0; }
.rule .detail { font-size: 12px; color: var(--text); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; opacity: .85; }

/* ───────────────────────── status colors ───────────────────────── */
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .status-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .status-grid { grid-template-columns: 1fr; } }
.status-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column; }
.status-card .solid { padding: 10px 12px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.status-card .sample { margin: 10px 12px 0; padding: 8px 10px; border-radius: 8px; font-size: 12px; border-left: 3px solid; }
.status-card .meta { padding: 8px 12px 10px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.status-card .meta code { color: var(--text); cursor: pointer; }
.status-card .meta .why { font-size: 11px; }

/* ───────────────────────── preview ───────────────────────── */
/* Preview colors: roles (--c60/30/10), supporting colors (--x1..4), status (--s-*) */
.pv-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: -4px 0 12px; font-size: 12px; color: var(--muted); }
.pv-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pv-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); }
.pv-legend code { color: var(--text); }
#pvkind { flex-wrap: wrap; }

.preview { color: var(--on60); }
.pv-scene[hidden] { display: none !important; }
.x1 { --x: var(--x1); } .x2 { --x: var(--x2); } .x3 { --x: var(--x3); } .x4 { --x: var(--x4); } .xa { --x: var(--c10); }
.x1-t { color: var(--s-success-fg-30); } .xa-t { color: var(--s-error-fg-30); }  /* code tokens: guaranteed 4.5:1 on the 30 */
.st-success { --st: var(--s-success); --st-on: var(--s-success-on); --st-bg: var(--s-success-bg); --st-fg: var(--s-success-fg); }
.st-warning { --st: var(--s-warning); --st-on: var(--s-warning-on); --st-bg: var(--s-warning-bg); --st-fg: var(--s-warning-fg); }
.st-error   { --st: var(--s-error);   --st-on: var(--s-error-on);   --st-bg: var(--s-error-bg);   --st-fg: var(--s-error-fg); }
.st-info    { --st: var(--s-info);    --st-on: var(--s-info-on);    --st-bg: var(--s-info-bg);    --st-fg: var(--s-info-fg); }
.st-text-success { color: var(--s-success-fg-60); } .st-text-error { color: var(--s-error-fg-60); }

.pv-window {
  display: grid; grid-template-columns: 150px 1fr; min-height: 360px; border-radius: 12px; overflow: hidden;
  background: var(--c60); color: var(--on60); border: 1px solid var(--border); box-shadow: 0 12px 30px var(--shadow);
}
.pv-side { background: var(--c30); color: var(--on30); padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.pv-side .pv-k { margin-top: 6px; font-weight: 700; }
.pv-logo { width: 32px; height: 32px; border-radius: 8px; background: var(--c10); margin-bottom: 10px; flex-shrink: 0; }
.pv-logo.sm { width: 22px; height: 22px; border-radius: 6px; margin: 0; }
.pv-nav { height: 10px; border-radius: 5px; background: var(--on30); opacity: .35; }
.pv-nav.active { opacity: 1; background: var(--c10); }
.pv-main { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-top { display: flex; align-items: center; justify-content: space-between; }
.pv-title { font-size: 20px; font-weight: 700; }
.pv-btn { background: var(--c10); color: var(--on10); font-weight: 600; font-size: 12px; padding: 8px 14px; border-radius: 8px; display: inline-block; white-space: nowrap; text-align: center; }
.pv-btn.sm { padding: 5px 10px; font-size: 11px; }
.pv-btn.ghost { background: transparent; color: var(--on60); box-shadow: inset 0 0 0 1.5px var(--c30); }
.pv-btn.wide { display: block; margin: 6px 16px 0; }
.pv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-card { background: var(--c30); color: var(--on30); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-k { font-size: 11px; opacity: .75; }
.pv-v { font-size: 20px; font-weight: 700; }
.pv-delta { font-size: 12px; font-weight: 700; }
.pv-card .st-text-success { color: var(--s-success-fg-30); } .pv-card .st-text-error { color: var(--s-error-fg-30); }
.pv-spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.pv-spark i { flex: 1; background: var(--on30); opacity: .35; border-radius: 2px 2px 0 0; }
.pv-spark i:last-child { background: var(--c10); opacity: 1; }
.pv-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.pv-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 4px 0; }
.pv-stack i { background: var(--x); }
.pv-keys { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; }
.pv-keys span { display: inline-flex; align-items: center; gap: 4px; }
.pv-keys i { width: 9px; height: 9px; border-radius: 3px; background: var(--x); }
.pv-table { gap: 8px; font-size: 12px; }
.pv-row { display: flex; justify-content: space-between; align-items: center; }
.pv-badge { background: var(--st); color: var(--st-on); font-style: normal; font-weight: 700; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pv-alert, .pv-callout, .pv-banner { background: var(--st-bg); color: var(--st-fg); border-left: 4px solid var(--st); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; }
.pv-banner { border-left: 0; border-radius: 0; text-align: center; padding: 7px; }
.pv-callout b { margin-right: 6px; }
.pv-callout code { font-size: 11.5px; background: rgba(127,127,127,.18); padding: 0 4px; border-radius: 4px; }
.pv-text { height: 8px; border-radius: 4px; background: currentColor; opacity: .3; }
.w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; } .w50 { width: 50%; }
.pv-link { color: var(--c10); font-weight: 600; font-size: 13px; }

/* website shell (landing + storefront) */
.pv-site { border-radius: 12px; overflow: hidden; background: var(--c60); color: var(--on60); border: 1px solid var(--border); box-shadow: 0 12px 30px var(--shadow); min-height: 360px; display: flex; flex-direction: column; }
.pv-sitenav { display: flex; align-items: center; gap: 16px; padding: 12px 18px; background: var(--c30); color: var(--on30); font-size: 12px; font-weight: 600; }
.pv-sitenav > :last-child { margin-left: auto; }
.pv-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; padding: 26px 24px 18px; align-items: center; }
.pv-hero > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.pv-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-on-60, var(--c10)); }
.pv-h1 { font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.pv-h1 em, .pv-m-h1 em { color: var(--c10); font-style: normal; }
.pv-ctas { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pv-art { position: relative; height: 150px; }
.pv-art i { position: absolute; border-radius: 50%; background: var(--x); }
.pv-art i:nth-child(1) { width: 110px; height: 110px; left: 10%; top: 8%; }
.pv-art i:nth-child(2) { width: 80px; height: 80px; right: 8%; top: 0; opacity: .9; }
.pv-art i:nth-child(3) { width: 70px; height: 70px; left: 45%; bottom: 0; opacity: .9; }
.pv-art i:nth-child(4) { width: 34px; height: 34px; right: 22%; bottom: 18%; }
.pv-art i:nth-child(5) { width: 22px; height: 22px; left: 4%; bottom: 6%; }
.pv-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 24px 16px; }
.pv-feature { background: var(--c30); color: var(--on30); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pv-feature i { width: 26px; height: 26px; border-radius: 8px; background: var(--x); }
.pv-signup { display: flex; gap: 10px; align-items: center; padding: 0 24px 20px; font-size: 12px; flex-wrap: wrap; }
.pv-signup .st-text-success { font-weight: 700; }
.pv-input { background: var(--c30); color: var(--on30); padding: 7px 12px; border-radius: 8px; font-size: 12px; opacity: .9; }

.pv-cart b { background: var(--c10); color: var(--on10); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.pv-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 18px; }
.pv-product { display: flex; flex-direction: column; gap: 5px; font-size: 12px; align-items: flex-start; }
.pv-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: linear-gradient(160deg, var(--x), color-mix(in srgb, var(--x) 70%, var(--c30))); }
.pv-price { font-weight: 700; }
.pv-price s { opacity: .55; font-weight: 400; }
.pv-price em { color: var(--accent-on-60, var(--c10)); font-style: normal; }
.pv-dots { display: flex; gap: 4px; }
.pv-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--x); box-shadow: 0 0 0 1px rgba(127,127,127,.35); }
.pv-checkout { margin-top: auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 0 18px 18px; flex-wrap: wrap; }
.pv-checkout .pv-alert { flex: 1; min-width: 200px; }

/* docs */
.pv-window.docs .pv-main { gap: 10px; }
.pv-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-tags span { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--x) 22%, var(--c60)); color: var(--on60); box-shadow: inset 0 0 0 1px var(--x); }
.pv-code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; background: var(--c30); color: var(--on30); padding: 8px 12px; border-radius: 8px; }
.pv-code span { font-weight: 700; }

/* mobile */
.pv-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 240px)); gap: 16px; justify-content: center; }
@media (max-width: 900px) { .pv-phones { grid-template-columns: minmax(0, 260px); } }
.pv-mobile {
  border-radius: 24px; background: var(--c60); color: var(--on60); border: 6px solid var(--c30); overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; min-height: 380px; box-shadow: 0 12px 30px var(--shadow); padding-bottom: 0;
}
.pv-mobile.alt { background: var(--c30); color: var(--on30); border-color: var(--c60); }
.pv-mobile.alt .pv-input { background: var(--c60); color: var(--on60); }
.pv-mobile.alt .st-text-error { color: var(--s-error-fg-30); }
.pv-m-top { height: 24px; display: grid; place-items: center; flex-shrink: 0; }
.pv-m-top span { width: 60px; height: 6px; border-radius: 3px; background: var(--c30); }
.pv-mobile.alt .pv-m-top span { background: var(--c60); }
.pv-m-head { font-weight: 800; font-size: 17px; padding: 0 16px 4px; }
.pv-m-hero { padding: 6px 18px; display: flex; flex-direction: column; gap: 8px; }
.pv-m-h1 { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.pv-m-hero .pv-btn { align-self: flex-start; margin-top: 6px; }
.pv-m-list { margin: 4px 12px; background: var(--c30); color: var(--on30); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pv-m-row { display: flex; align-items: center; gap: 10px; }
.pv-m-row i { width: 22px; height: 22px; border-radius: 6px; background: var(--x); flex-shrink: 0; }
.pv-m-tab { display: flex; justify-content: space-around; padding: 10px; background: var(--c30); margin-top: auto; }
.pv-m-tab span, .pv-m-tab b { width: 18px; height: 18px; border-radius: 5px; background: var(--on30); opacity: .3; }
.pv-m-tab b { background: var(--c10); opacity: 1; }
.pv-toast { margin: 0 12px; background: var(--st-bg); color: var(--st-fg); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; font-size: 11.5px; position: relative; padding-left: 26px; }
.pv-toast::before { content: ""; position: absolute; left: 10px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.pv-toast b { font-size: 12.5px; }
.pv-m-rings { display: flex; justify-content: center; gap: 10px; padding: 8px; }
.pv-m-rings i { width: 34px; height: 34px; border-radius: 50%; border: 5px solid var(--x); }
.pv-field { display: flex; flex-direction: column; gap: 4px; padding: 0 16px; font-size: 11.5px; }
.pv-field .pv-input { opacity: 1; }
.pv-field.bad .pv-input { box-shadow: inset 0 0 0 2px var(--s-error); }
.pv-field em { font-style: normal; font-weight: 700; }
.pv-mobile .pv-link { padding: 0 16px; font-size: 12px; text-align: center; }
.pv-mobile.alt .pv-link { color: var(--accent-on-30, var(--c10)); }

@media (max-width: 900px) {
  .pv-cards, .pv-features { grid-template-columns: 1fr 1fr; }
  .pv-split, .pv-hero { grid-template-columns: 1fr; }
  .pv-products { grid-template-columns: 1fr 1fr; }
  .pv-window { grid-template-columns: 1fr; }
  .pv-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .pv-nav { width: 40px; }
}

/* ───────────────────────── export ───────────────────────── */
pre#export {
  margin: 0 0 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-size: 12.5px; overflow: auto; max-height: 260px;
}

/* ───────────────────────── toast ───────────────────────── */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border-strong); padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 13px;
  box-shadow: 0 10px 30px var(--shadow); animation: pop .2s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }
