/* ==========================================================================
   ASRIX AI DIGITAL TWIN — design system
   Royal Blue primary · Emerald secondary · light / dark / system themes
   ========================================================================== */

:root {
  --blue-50: #eef3ff; --blue-100: #dbe5ff; --blue-200: #b9ccff; --blue-400: #5b82f5;
  --blue-500: #3461ea; --blue-600: #2149d3; --blue-700: #1b3aa8; --blue-800: #172f82; --blue-900: #0f2a66;
  --green-50: #ecfdf5; --green-100: #d1fae5; --green-400: #34d399; --green-500: #10b981; --green-600: #059669; --green-700: #047857;
  --amber-500: #f59e0b; --red-500: #ef4444; --red-600: #dc2626;

  --bg: #f4f6fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-3: #eef2f9;
  --border: #e2e7f1;
  --border-strong: #cbd3e3;
  --text: #0e1730;
  --text-2: #3d4865;
  --muted: #6b7591;
  --primary: var(--blue-600);
  --primary-hover: var(--blue-700);
  --primary-soft: var(--blue-50);
  --accent: var(--green-600);
  --accent-soft: var(--green-50);
  --danger: var(--red-600);
  --danger-soft: #fef2f2;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --ring: rgba(52, 97, 234, .35);
  --shadow-sm: 0 1px 2px rgba(16, 24, 48, .06);
  --shadow: 0 1px 3px rgba(16, 24, 48, .06), 0 8px 24px -12px rgba(16, 24, 48, .12);
  --shadow-lg: 0 24px 60px -20px rgba(15, 42, 102, .35);
  --grad: linear-gradient(120deg, #0b1230 0%, #1b3aa8 40%, #4d74f0 100%);
  --grad-soft: linear-gradient(120deg, rgba(33, 73, 211, .10), rgba(91, 130, 245, .06));
  --glass: rgba(255, 255, 255, .72);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 264px;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans CJK SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #070d1b;
  --bg-elev: #0c1428;
  --surface: #0f1830;
  --surface-2: #121d39;
  --surface-3: #18254a;
  --border: #1f2c50;
  --border-strong: #2c3c69;
  --text: #e8eeff;
  --text-2: #b9c4e4;
  --muted: #8592b8;
  --primary: #4f7cff;
  --primary-hover: #6c92ff;
  --primary-soft: rgba(79, 124, 255, .14);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, .12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .12);
  --ring: rgba(108, 146, 255, .45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -16px rgba(0, 0, 0, .6);
  --glass: rgba(15, 24, 48, .72);
  --grad-soft: linear-gradient(120deg, rgba(79, 124, 255, .18), rgba(125, 155, 255, .08));
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #070d1b; --bg-elev: #0c1428; --surface: #0f1830; --surface-2: #121d39; --surface-3: #18254a;
    --border: #1f2c50; --border-strong: #2c3c69; --text: #e8eeff; --text-2: #b9c4e4; --muted: #8592b8;
    --primary: #4f7cff; --primary-hover: #6c92ff; --primary-soft: rgba(79, 124, 255, .14);
    --accent: #34d399; --accent-soft: rgba(52, 211, 153, .12); --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12);
    --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, .12); --ring: rgba(108, 146, 255, .45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -16px rgba(0, 0, 0, .6);
    --glass: rgba(15, 24, 48, .72); --grad-soft: linear-gradient(120deg, rgba(79, 124, 255, .18), rgba(125, 155, 255, .08));
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 .8em; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-3); padding: .1em .4em; border-radius: 6px; }
pre { background: var(--surface-3); padding: 14px; border-radius: var(--radius-sm); overflow: auto; border: 1px solid var(--border); }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--surface); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
[x-cloak], [hidden] { display: none !important; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .2s ease; }
.shell.collapsed { grid-template-columns: 76px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-elev); border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; z-index: 30; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.brand b { display: block; font-size: .95rem; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted); font-size: .72rem; margin-top: -2px; }
.nav-group { margin: 10px 0 4px; padding: 0 10px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: .9rem; position: relative;
}
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a.active::before { content: ""; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav .count { margin-inline-start: auto; font-size: .72rem; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; font-weight: 700; }
.shell.collapsed .brand div, .shell.collapsed .nav-group, .shell.collapsed .nav a span, .shell.collapsed .nav .count, .shell.collapsed .sidebar-foot span { display: none; }
.shell.collapsed .nav a { justify-content: center; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--border); font-size: .76rem; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 24px;
  background: var(--glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border);
}
.topbar .search-trigger {
  flex: 0 1 420px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; text-align: start;
}
.topbar .search-trigger:hover { border-color: var(--border-strong); }
.topbar .search-trigger kbd { margin-inline-start: auto; }
.topbar .spacer { flex: 1; }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 2px 0 0; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Buttons & inputs ---------- */
.btn {
  --b: var(--surface); --c: var(--text); --bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; min-height: 38px; border-radius: 10px;
  background: var(--b); color: var(--c); border: 1px solid var(--bd); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--primary); color: var(--c); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { --b: var(--grad); --c: #fff; --bd: transparent; background: var(--grad); box-shadow: 0 6px 18px -8px rgba(33, 73, 211, .7); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px -10px rgba(33, 73, 211, .9); filter: brightness(1.05); }
.btn-accent { --b: var(--green-600); --c: #fff; --bd: transparent; }
.btn-accent:hover { color: #fff; filter: brightness(1.06); }
.btn-danger { --b: var(--danger-soft); --c: var(--danger); --bd: transparent; }
.btn-danger:hover { --bd: var(--danger); color: var(--danger); }
.btn-ghost { --b: transparent; --bd: transparent; --c: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-sm { padding: 5px 10px; min-height: 30px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 12px 22px; min-height: 48px; font-size: .98rem; border-radius: 12px; }
.btn-icon { padding: 0; width: 38px; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn.loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite; }

label, .label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; color: var(--text-2); }
.hint { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.input, select, textarea, input:not([type]), input[type=text], input[type=tel], input[type=date], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local] {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, select:focus, textarea:focus, input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
input[type=file] { font: inherit; font-size: .85rem; color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.field { margin-bottom: 16px; }
.field-error { color: var(--danger); font-size: .8rem; margin-top: 5px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; color: var(--text); }
.check input { margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.input-group { display: flex; gap: 8px; }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.glass { background: var(--glass); backdrop-filter: blur(14px); }
.card.hero { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.card.hero::after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); }
.card.hero p, .card.hero small { color: rgba(255,255,255,.82); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny { font-size: .74rem; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .85em; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Stats ---------- */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.stat .value { font-size: 1.85rem; font-weight: 760; letter-spacing: -.02em; margin-top: 6px; }
.stat .delta { font-size: .78rem; color: var(--muted); }
.stat .icon { position: absolute; inset-inline-end: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); }
.stat .icon svg { width: 20px; height: 20px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }
.badge.mock { background: repeating-linear-gradient(45deg, var(--warning-soft), var(--warning-soft) 6px, transparent 6px, transparent 12px); color: var(--warning); border: 1px dashed var(--warning); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.ok { background: var(--green-500); box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.dot.bad { background: var(--red-500); box-shadow: 0 0 0 4px rgba(239, 68, 68, .16); }
.dot.warn { background: var(--amber-500); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.alert.info { background: var(--primary-soft); border-color: transparent; color: var(--text); }
.alert.success { background: var(--accent-soft); border-color: transparent; }
.alert.warning { background: var(--warning-soft); border-color: transparent; }
.alert.error { background: var(--danger-soft); border-color: transparent; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: start; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { text-align: end; white-space: nowrap; }
.table-tools { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.table-tools .input { max-width: 280px; }
.pagination { display: flex; gap: 6px; justify-content: flex-end; padding: 12px 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border); font-size: .82rem; color: var(--text-2); }
.pagination .active span, .pagination span[aria-current] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .88rem; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs a.active, .tabs button.active, .tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel:not(.active) { display: none; }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ill { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 20px; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); }
.empty .ill svg { width: 34px; height: 34px; }
.empty h3 { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; min-height: 14px; }

/* ---------- Twin cards ---------- */
.twin-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.twin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.twin-card .cover { aspect-ratio: 16 / 10; background: var(--grad-soft); position: relative; display: grid; place-items: center; overflow: hidden; }
.twin-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.twin-card .cover .initials { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff; background: var(--grad); }
.twin-card .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.twin-card .body { padding: 14px 16px; flex: 1; }
.twin-card .foot { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 750; font-size: .8rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Dropdowns, dialogs, toasts ---------- */
.dropdown { position: relative; }
.menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; display: none;
}
.dropdown.open .menu { display: block; animation: pop .14s ease; }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .88rem; cursor: pointer; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--surface-3); }
.menu .sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu .head { padding: 8px 10px; font-size: .78rem; color: var(--muted); }

dialog { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(7, 13, 27, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .16s ease; }
.dialog-body { padding: 22px; }
.dialog-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }

.toasts { position: fixed; z-index: 100; inset-block-end: 18px; inset-inline-end: 18px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: slide-in .2s ease; font-size: .88rem; }
.toast.success { border-inline-start: 4px solid var(--green-500); }
.toast.error { border-inline-start: 4px solid var(--red-500); }
.toast.info { border-inline-start: 4px solid var(--blue-500); }
.toast button { margin-inline-start: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; }

/* Command palette */
.cmdk { width: min(640px, calc(100vw - 32px)); margin-top: 10vh; }
.cmdk input { border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; padding: 16px 18px !important; font-size: 1rem !important; box-shadow: none !important; }
.cmdk-list { max-height: 54vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--text); cursor: pointer; }
.cmdk-item small { color: var(--muted); margin-inline-start: auto; font-size: .74rem; }
.cmdk-item.active, .cmdk-item:hover { background: var(--primary-soft); color: var(--primary); }
.cmdk-group { padding: 8px 12px 4px; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .4s ease; }
.progress.indeterminate > span { width: 40% !important; animation: indet 1.2s ease-in-out infinite; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.processing-dots span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite ease-in-out; }
.processing-dots span:nth-child(2) { animation-delay: .15s; } .processing-dots span:nth-child(3) { animation-delay: .3s; }

/* ---------- Charts (pure CSS/SVG) ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--grad); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; opacity: .9; }
.bars .bar:hover { opacity: 1; }
.bars .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; margin-bottom: 3px; opacity: 0; }
.bars .bar:hover span { opacity: 1; }
.bar-labels { display: flex; gap: 6px; font-size: .66rem; color: var(--muted); margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; overflow: hidden; }
.meter { display: grid; gap: 4px; }
.meter .top { display: flex; justify-content: space-between; font-size: .82rem; }

/* ---------- Studio & live conversation ---------- */
.stage {
  position: relative; border-radius: 18px; overflow: hidden; background: #050b18 var(--stage-bg, none) center / cover no-repeat;
  aspect-ratio: var(--stage-ratio, 16 / 9); display: grid; place-items: center; box-shadow: var(--shadow-lg); isolation: isolate;
}
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 120%, rgba(91, 130, 245, .35), transparent 60%), radial-gradient(ellipse at 50% -20%, rgba(33, 73, 211, .4), transparent 60%); z-index: -1; }
.stage canvas, .stage video { width: 100%; height: 100%; object-fit: contain; }
.stage .stage-badge { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.stage .stage-badge .badge { background: rgba(5, 11, 24, .6); color: #fff; backdrop-filter: blur(8px); }
.stage .captions { position: absolute; left: 6%; right: 6%; bottom: 5%; text-align: center; font-size: clamp(.9rem, 1.6vw, 1.15rem); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.7); font-weight: 600; z-index: 2; pointer-events: none; }
.stage .captions span { background: rgba(5, 11, 24, .55); padding: 4px 10px; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: 1.8; }
.stage .placeholder { color: rgba(255,255,255,.7); text-align: center; }
.mouth-picker { position: relative; cursor: crosshair; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); max-width: 360px; }
.mouth-picker .marker { position: absolute; border: 2px solid var(--green-400); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); }
.live-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 18px; align-items: start; }
.chat { display: flex; flex-direction: column; height: min(72vh, 760px); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-end-end-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-3); border-end-start-radius: 4px; }
.msg .meta { display: flex; gap: 8px; margin-top: 6px; font-size: .7rem; opacity: .75; flex-wrap: wrap; }
.msg .cites { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.msg .cite { font-size: .76rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; color: var(--text-2); white-space: normal; }
.msg .cite b { color: var(--primary); }
.composer { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; border-radius: 12px; }
.mic { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 8px 20px -8px rgba(33, 73, 211, .8); }
.mic svg { width: 22px; height: 22px; }
.mic.recording { background: var(--red-500); animation: pulse-ring 1.4s infinite; }
.mic.muted { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.vu { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.vu span { display: block; height: 100%; width: 0; background: var(--green-500); transition: width .08s linear; }
.cap-list { display: grid; gap: 8px; }
.cap-item { display: flex; gap: 10px; align-items: center; font-size: .84rem; }

/* ---------- Workflow builder ---------- */
.wf { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wf-palette button { width: 100%; justify-content: flex-start; margin-bottom: 6px; }
.wf-canvas { background: var(--surface-2) radial-gradient(var(--border) 1px, transparent 1px) 0 0 / 18px 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; min-height: 520px; }
.wf-node { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 0 auto; max-width: 420px; box-shadow: var(--shadow-sm); cursor: pointer; position: relative; display: flex; gap: 10px; align-items: center; }
.wf-node.selected { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.wf-node .kind { width: 32px; height: 32px; border-radius: 9px; background: var(--grad-soft); color: var(--primary); display: grid; place-items: center; font-size: .7rem; font-weight: 800; flex: none; }
.wf-node .branch { font-size: .72rem; color: var(--muted); }
.wf-edge { height: 26px; width: 2px; background: var(--border-strong); margin: 0 auto; position: relative; }
.wf-edge::after { content: ""; position: absolute; bottom: -2px; left: -4px; border: 5px solid transparent; border-top-color: var(--border-strong); }

/* ---------- Auth / installer ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -140px; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%); }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { font-size: 2.3rem; max-width: 14ch; }
.auth-art ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; opacity: .92; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.installer { max-width: 1060px; margin: 0 auto; padding: 32px 20px 60px; display: grid; grid-template-columns: 250px 1fr; gap: 24px; }
.steps { list-style: none; padding: 0; margin: 0; position: sticky; top: 24px; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; font-size: .84rem; color: var(--muted); border-radius: 8px; }
.steps li .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; background: var(--surface-3); flex: none; }
.steps li.done .n { background: var(--green-500); color: #fff; }
.steps li.current { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.steps li.current .n { background: var(--primary); color: #fff; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.check-list li:last-child { border-bottom: 0; }
.check-list li .v { margin-inline-start: auto; color: var(--muted); font-size: .8rem; text-align: end; }

/* ---------- Public twin page ---------- */
.public-top { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.public-main { max-width: 1280px; margin: 0 auto; padding: 22px; }
.disclosure { font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 100% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf { grid-template-columns: 1fr; }
  .live-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .shell.mobile-open .sidebar { transform: none; }
  .shell.collapsed .brand div, .shell.collapsed .nav-group, .shell.collapsed .nav a span { display: initial; }
  .grid-2, .grid-3, .grid-main, .form-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 10px 14px; }
  .topbar .search-trigger span, .topbar .search-trigger kbd { display: none; }
  .topbar .search-trigger { flex: 0 0 auto; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .installer { grid-template-columns: 1fr; }
  .steps { display: flex; overflow-x: auto; position: static; gap: 4px; }
  .steps li span.t { display: none; }
}
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } .msg { max-width: 96%; } }
@media print { .sidebar, .topbar, .toasts { display: none !important; } .shell { display: block; } }

/* ==========================================================================
   Public website (landing, CMS pages, contact)
   ========================================================================== */
.center { text-align: center; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
body.site { background: var(--bg); }
.site-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.site-wrap.narrow { max-width: 860px; }
.site-top { position: sticky; top: 0; z-index: 30; background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.site-nav { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.site-brand img { border-radius: 10px; }
.site-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.site-brand small { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.site-links { display: flex; gap: 4px; margin-inline-start: 12px; }
.site-links a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.site-links a:hover { background: var(--surface-3); color: var(--text); }
.site-actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.site-burger { display: none; }
[data-theme-cycle] .i-dark { display: none; }
:root[data-theme="dark"] [data-theme-cycle] .i-light { display: none; }
:root[data-theme="dark"] [data-theme-cycle] .i-dark { display: inline; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .78rem; letter-spacing: .02em; }
.lead { font-size: 1.12rem; color: var(--text-2); line-height: 1.65; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 70px; }
.hero-bg { position: absolute; inset: -20% -10% auto; height: 120%; background:
  radial-gradient(40% 50% at 15% 20%, rgba(52, 97, 234, .22), transparent 70%),
  radial-gradient(35% 45% at 85% 30%, rgba(91, 130, 245, .22), transparent 70%),
  radial-gradient(30% 40% at 60% 90%, rgba(33, 73, 211, .12), transparent 70%); pointer-events: none; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 46px 46px; opacity: .45; mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.07; letter-spacing: -.025em; margin: 18px 0 16px; }
.hero-cta { margin-top: 26px; gap: 12px; }
.hero-visual { display: flex; justify-content: center; }
.device { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); }
[dir="rtl"] .device { transform: perspective(1200px) rotateY(6deg) rotateX(2deg); }
.device-top { display: flex; gap: 6px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.device-top > .dot { width: 9px; height: 9px; background: var(--border-strong); }
.ok-badge { margin-inline-start: auto; }
.device-stage { position: relative; display: grid; place-items: center; padding: 26px 20px 18px; background: var(--grad-soft); }
.twin-face { width: 150px; height: 150px; border-radius: 50%; background: var(--surface); box-shadow: 0 18px 40px -18px rgba(15, 42, 102, .5); display: grid; place-items: center; }
.face-svg { width: 132px; height: 132px; }
.face-svg .mouth { transform-origin: 60px 57.5px; animation: talk 1.6s ease-in-out infinite; }
@keyframes talk { 0%, 100% { transform: scaleY(1); } 20% { transform: scaleY(2.2); } 40% { transform: scaleY(1.2); } 60% { transform: scaleY(2.6); } 80% { transform: scaleY(1.4); } }
.eq { display: flex; gap: 4px; align-items: flex-end; height: 26px; margin-top: 14px; }
.eq i { width: 4px; border-radius: 4px; background: var(--grad); height: 30%; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .1s } .eq i:nth-child(3) { animation-delay: .25s } .eq i:nth-child(4) { animation-delay: .05s } .eq i:nth-child(5) { animation-delay: .3s } .eq i:nth-child(6) { animation-delay: .15s } .eq i:nth-child(7) { animation-delay: .2s }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.device-name { margin-top: 10px; font-weight: 700; font-size: .86rem; }
.device-chat { padding: 16px; display: grid; gap: 10px; }
.bubble { padding: 10px 14px; border-radius: 16px; font-size: .86rem; max-width: 88%; line-height: 1.5; }
.bubble.me { justify-self: end; background: var(--grad); color: #fff; border-end-end-radius: 6px; }
.bubble.twin { background: var(--surface-3); border-end-start-radius: 6px; }
.bubble small { display: flex; gap: 5px; align-items: center; margin-top: 6px; color: var(--muted); font-size: .72rem; }
.device-meta { display: flex; gap: 6px; align-items: center; font-size: .72rem; color: var(--muted); }

/* Sections */
.site-section { padding: 84px 0; }
.site-section.tight { padding: 36px 0 84px; }
.site-section.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.02em; margin: 14px 0 10px; line-height: 1.15; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.feature p { color: var(--text-2); font-size: .92rem; line-height: 1.6; margin: 0; }
.feature-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(33, 73, 211, .9); }
.feature-icon svg { width: 22px; height: 22px; }
.steps-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.step-card h3 { margin: 14px 0 6px; font-size: 1.08rem; }
.step-card p { color: var(--text-2); margin: 0; line-height: 1.6; }
.step-no { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--blue-200); }
.usecase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.usecase { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.usecase > svg { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 2px; }
.usecase h3 { margin: 0 0 6px; font-size: 1.02rem; }
.usecase p { margin: 0; color: var(--text-2); line-height: 1.6; font-size: .93rem; }

/* Plans */
.plan-grid { display: grid; gap: 18px; align-items: stretch; }
.plan-grid.plans-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.plan-grid.plans-2 { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
.plan-grid.plans-3 { grid-template-columns: repeat(3, 1fr); }
.plan-grid.plans-4 { grid-template-columns: repeat(4, 1fr); }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px; }
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.plan-flag { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .72rem; font-weight: 750; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
[dir="rtl"] .plan-flag { transform: translateX(50%); }
.plan h3 { margin: 0 0 4px; font-size: 1.15rem; }
.price { display: flex; align-items: baseline; gap: 5px; margin: 16px 0 18px; }
.price b { font-size: 2.3rem; letter-spacing: -.02em; }
.price small, .price span { color: var(--muted); font-weight: 600; }
.plan-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; flex: 1; }
.plan-list li { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.plan-list svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 2px; }
.plan-btn { width: 100%; justify-content: center; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex: none; transition: transform .2s ease; color: var(--muted); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin: 0 0 16px; color: var(--text-2); line-height: 1.65; }

/* CTA band */
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 40px; border-radius: 24px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -180px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-band p { margin: 0; opacity: .9; max-width: 560px; }
.cta-light { --b: #fff; --c: var(--blue-800); --bd: #fff; background: #fff; color: var(--blue-800); }
.cta-ghost { --b: transparent; --c: #fff; --bd: rgba(255,255,255,.55); background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }

/* CMS pages */
.page-hero { padding: 64px 0 18px; background: var(--grad-soft); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 10px; letter-spacing: -.02em; }
.prose { font-size: 1rem; line-height: 1.75; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 1.35rem; margin: 2em 0 .6em; }
.prose h3 { color: var(--text); font-size: 1.1rem; margin: 1.6em 0 .5em; }
.prose a { color: var(--primary); }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); }
.prose code { background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.contact-aside p { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }
.contact-aside svg { flex: none; margin-top: 3px; color: var(--primary); }

/* Footer */
.site-foot { border-top: 1px solid var(--border); background: var(--surface); padding: 54px 0 24px; }
.site-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.site-foot h4 { margin: 4px 0 12px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.site-foot-grid > div > a { display: block; padding: 4px 0; color: var(--text-2); font-size: .9rem; text-decoration: none; }
.site-foot-grid > div > a:hover { color: var(--primary); }
.site-foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .8rem; }
.site-foot-bottom span { display: inline-flex; gap: 6px; align-items: center; }

/* Reveal-on-scroll (progressive: content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .plan-grid.plans-4 { grid-template-columns: repeat(2, 1fr); }
  .site-foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero { padding: 52px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .device { transform: none !important; }
  .steps-row, .usecase-grid, .plan-grid.plans-2, .plan-grid.plans-3, .contact-grid { grid-template-columns: 1fr; }
  .site-section { padding: 60px 0; }
  .site-burger { display: inline-flex; }
  .site-links { display: none; position: absolute; top: 66px; inset-inline: 0; flex-direction: column; padding: 10px 16px 16px; margin: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .site-links.open { display: flex; }
  .hide-sm { display: none; }
  .cta-band { padding: 28px; }
}
@media (max-width: 560px) {
  .plan-grid.plans-4, .site-foot-grid { grid-template-columns: 1fr; }
  .site-wrap { padding: 0 16px; }
}
/* website refinements */
.site-brand small { white-space: nowrap; }
:root[data-theme="dark"] body.site .gradient-text { background-image: linear-gradient(120deg, #7aa0ff 0%, #5b82f5 40%, #34d399 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.site .gradient-text { background-image: linear-gradient(120deg, #7aa0ff 0%, #5b82f5 40%, #34d399 100%); } }
@media (max-width: 560px) { .site-brand small { display: none; } .site-actions { gap: 2px; } }
.site-address { font-style: normal; display: grid; gap: 3px; color: var(--text-2); margin-top: 12px; }
.site-address a { color: var(--text-2); }
.site-address a:hover { color: var(--primary); }

/* ---------- Podcast AI ---------- */
.spacer { flex: 1; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; font-variant-numeric: tabular-nums; }
.linklike:hover { text-decoration: underline; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.pod-cover { border-radius: 14px; object-fit: cover; flex: none; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.pod-cover-empty { display: grid; place-items: center; background: var(--grad); color: #fff; }
.pod-cover-empty svg { width: 42%; height: 42%; }
.pod-hero { display: flex; gap: 18px; align-items: center; }
.pod-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pod-host { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.pod-host-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.pod-host-icon.human { background: var(--warning-soft); color: var(--warning); }
.pod-host-icon svg { width: 20px; height: 20px; }
.pod-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pod-source { position: relative; cursor: pointer; }
.pod-source input { position: absolute; opacity: 0; pointer-events: none; }
.pod-source > span { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; row-gap: 2px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); height: 100%; transition: border-color .15s, background .15s; }
.pod-source svg { width: 20px; height: 20px; color: var(--primary); grid-row: span 2; margin-top: 2px; }
.pod-source small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.pod-source input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.pod-source input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.pod-script { list-style: none; margin: 0; padding: 8px 16px 4px; }
.pod-line { padding: 12px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.pod-line:last-child { border-bottom: 0; }
.pod-line:target { background: var(--primary-soft); border-radius: 10px; }
.pod-line-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pod-line-no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: .74rem; font-weight: 700; flex: none; }
.pod-line.is-human .pod-line-no { background: var(--warning-soft); color: var(--warning); }
.pod-speaker { width: auto !important; min-width: 150px; font-weight: 650; padding-block: 5px !important; }
.pod-line-meta { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.pod-line textarea { width: 100%; resize: vertical; line-height: 1.55; }
.pod-line-tools { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.pod-save-bar { position: sticky; bottom: 0; background: var(--surface); z-index: 2; border-top: 1px solid var(--border); }
.pod-add { gap: 8px; border-top: 1px solid var(--border); }
.pod-player audio { width: 100%; }
.pod-chapters { margin: 10px 0 0; padding-inline-start: 0; list-style: none; }
.pod-chapters li { padding: 4px 0; display: flex; gap: 10px; }
.pod-source-text { white-space: pre-wrap; max-height: 420px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: .82rem; }
.pub-pod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.pub-pod-card { display: flex; flex-direction: column; gap: 6px; color: inherit; }
.pub-pod-card .pod-cover { width: 100% !important; height: auto !important; aspect-ratio: 1; }
.pub-pod-card:hover b { color: var(--primary); }
.pub-pod-head { display: flex; gap: 28px; align-items: center; }
.pub-ep { padding: 20px 0; border-bottom: 1px solid var(--border); }
.pub-ep h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.pub-ep h3 a { color: inherit; }
.pub-ep audio { width: 100%; max-width: 560px; margin-top: 6px; }
.pub-transcript summary { cursor: pointer; padding: 10px 0; }
.pub-transcript p { line-height: 1.7; color: var(--text-2); }
@media (max-width: 900px) {
  .pod-hero, .pub-pod-head { flex-direction: column; align-items: flex-start; }
  .pod-host { flex-direction: column; }
  .pod-line-meta { margin-inline-start: 0; }
}
.pod-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.pod-aside { position: sticky; top: 84px; }
@media (max-width: 1100px) { .pod-layout { grid-template-columns: 1fr; } .pod-aside { position: static; } }
@media (max-width: 560px) {
  .topbar { gap: 6px; }
  .topbar .dropdown > .btn > .truncate, .topbar .dropdown > .btn > svg:last-child:not(:first-child) { display: none; }
  .topbar .search-trigger span, .topbar .search-trigger kbd { display: none; }
}
.grid > * { min-width: 0; }

/* ---------- Chat widget (iframe) ---------- */
.cw-body { margin: 0; background: var(--surface); height: 100vh; overflow: hidden; }
.cw { display: flex; flex-direction: column; height: 100vh; font-size: .93rem; }
.cw-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--cw, var(--primary)); color: #fff; }
.cw-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: rgba(255,255,255,.2); }
.cw-avatar-txt { display: grid; place-items: center; font-weight: 700; }
.cw-title { flex: 1; min-width: 0; line-height: 1.25; }
.cw-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-title small { opacity: .85; font-size: .78rem; }
.cw-iconbtn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cw-iconbtn:hover { background: rgba(255,255,255,.26); }
.cw-iconbtn svg { width: 18px; height: 18px; }
.cw-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.cw-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.cw-msg.bot { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.cw-msg.agent { background: var(--accent-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.cw-msg.agent small { display: block; font-weight: 700; font-size: .72rem; color: var(--accent); margin-bottom: 2px; }
.cw-msg.me { background: var(--cw, var(--primary)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.cw-msg.sys { font-size: .86rem; background: var(--surface-2); }
.cw-typing { display: flex; gap: 4px; }
.cw-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cwdot 1s infinite ease-in-out; }
.cw-typing span:nth-child(2) { animation-delay: .15s } .cw-typing span:nth-child(3) { animation-delay: .3s }
@keyframes cwdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0) } 40% { opacity: 1; transform: translateY(-3px) } }
.cw-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; background: var(--bg); }
.cw-quick button { border: 1px solid var(--cw, var(--primary)); color: var(--cw, var(--primary)); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; cursor: pointer; }
.cw-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.cw-input textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; font: inherit; background: var(--surface-2); color: var(--text); max-height: 120px; }
.cw-send { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--cw, var(--primary)); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.cw-send svg { width: 18px; height: 18px; }
.cw-lead, .cw-rate { padding: 14px; border-top: 1px solid var(--border); background: var(--surface); display: grid; gap: 8px; }
.cw-lead p, .cw-rate p { margin: 0; font-size: .86rem; color: var(--text-2); }
.cw-lead input { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font: inherit; background: var(--surface-2); color: var(--text); }
.cw-lead-row { display: flex; gap: 10px; align-items: center; }
.cw-btn { border: 0; border-radius: 10px; padding: 9px 16px; background: var(--cw, var(--primary)); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.cw-link { border: 0; background: none; color: var(--muted); font: inherit; font-size: .84rem; cursor: pointer; text-decoration: underline; }
.cw-stars { display: flex; gap: 4px; }
.cw-stars button { border: 0; background: none; font-size: 1.7rem; color: #f5b301; cursor: pointer; line-height: 1; }
.cw-brand { text-align: center; font-size: .7rem; color: var(--muted); padding: 4px 0 8px; background: var(--surface); }

/* ---------- Live support inbox ---------- */
.sp { display: grid; grid-template-columns: 320px minmax(0, 1fr) 280px; gap: 14px; height: calc(100vh - 120px); min-height: 520px; }
.sp > .card { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.sp-empty { grid-column: span 2; justify-content: center; }
.sp-list-head { padding: 14px; border-bottom: 1px solid var(--border); }
.sp-list-head h2 { font-size: 1.1rem; }
.sp-filters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.sp-filters a { font-size: .78rem; padding: 4px 9px; border-radius: 999px; color: var(--text-2); background: var(--surface-2); display: inline-flex; gap: 5px; align-items: center; }
.sp-filters a.active { background: var(--primary); color: #fff; }
.sp-filters em { font-style: normal; font-weight: 700; font-size: .7rem; }
.sp-items { overflow-y: auto; flex: 1; }
.sp-item { display: block; padding: 11px 14px; border-bottom: 1px solid var(--border); color: inherit; }
.sp-item:hover { background: var(--surface-2); }
.sp-item.active { background: var(--primary-soft); }
.sp-item.unread b { color: var(--primary); }
.sp-unread { font-style: normal; margin-inline-start: auto; background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; font-weight: 700; }
.sp-thread-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sp-thread-head h2 { font-size: 1.05rem; }
.sp-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.sp-msg { max-width: 78%; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.sp-msg.cust { align-self: flex-start; }
.sp-msg.ai { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }
.sp-msg.agent { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.sp-msg.note { align-self: center; background: var(--warning-soft); border: 1px dashed var(--warning); max-width: 90%; }
.sp-meta { font-size: .74rem; display: flex; gap: 6px; align-items: center; margin-bottom: 3px; flex-wrap: wrap; }
.sp-text { white-space: pre-wrap; line-height: 1.5; font-size: .9rem; }
.sp-cites { margin-top: 4px; }
.sp-reply { padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.sp-reply textarea { width: 100%; resize: vertical; }
.sp-reply.is-note textarea { background: var(--warning-soft); }
.sp-side { overflow-y: auto; }
.sp-side h3 { font-size: .9rem; }
.sp-hist { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); color: inherit; }
@media (max-width: 1280px) { .sp { grid-template-columns: 280px minmax(0, 1fr); } .sp-side { display: none; } .sp-empty { grid-column: auto; } }
@media (max-width: 860px) {
  .sp { grid-template-columns: 1fr; height: auto; }
  .sp-thread { height: calc(100vh - 110px); }
  .sp:has(.sp-thread) .sp-list { display: none; }
  .sp-empty { display: none; }
  .sp-msg { max-width: 92%; }
}
.sp-back { display: none; }
@media (max-width: 860px) { .sp-back { display: inline-block; margin-bottom: 4px; } }
.cw-input textarea { min-height: 42px; height: 42px; line-height: 1.4; }

/* ---------- Brand wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; line-height: 0; }
.wordmark img { height: var(--wm-h, 28px) !important; width: auto !important; border-radius: 0 !important; display: block; }
.wordmark .wm-on-dark { display: none; }
:root[data-theme="dark"] .wordmark .wm-on-light { display: none; }
:root[data-theme="dark"] .wordmark .wm-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark .wm-on-light { display: none; }
  :root:not([data-theme="light"]) .wordmark .wm-on-dark { display: block; }
}
.brand .brand-mark { display: block; }
.brand > div { display: flex; flex-direction: column; gap: 5px; }
.shell.collapsed .brand .brand-mark { display: block; }
.site-brand .brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.site-brand .brand-text small { color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .04em; }

/* ---------- Solutions ---------- */
.solution-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.solution-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.solution-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.solution-card h3 { font-size: 1.08rem; margin: 8px 0 0; }
.solution-card p { color: var(--text-2); font-size: .92rem; line-height: 1.6; margin: 0; flex: 1; }
.solution-more { color: var(--primary); font-weight: 650; font-size: .88rem; margin-top: 6px; }
.solution-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: center; }
.solution-hero-grid > div:only-child { grid-column: 1 / -1; max-width: 860px; }
.solution-image { width: 100%; border-radius: 18px; box-shadow: var(--shadow-lg); }
.solution-highlights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.solution-highlights li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-weight: 550; }
.solution-highlights svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.center { text-align: center; }
@media (max-width: 900px) { .solution-hero-grid { grid-template-columns: 1fr; } }
.site-links a { white-space: nowrap; padding-inline: 10px; }
@media (max-width: 1320px) and (min-width: 1101px) { .site-links .nav-wide { display: none; } .site-links a { padding-inline: 8px; } }
@media (max-width: 1100px) {
  .site-burger { display: inline-flex; }
  .site-links { display: none; position: absolute; top: 66px; inset-inline: 0; flex-direction: column; padding: 10px 16px 16px; margin: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .site-links.open { display: flex; }
}

/* ---------- AI Studio ---------- */
.studio-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1100px) { .studio-layout { grid-template-columns: 1fr; } }
.studio-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.studio-template { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; row-gap: 2px; text-align: start; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.studio-template:hover { border-color: var(--primary); transform: translateY(-2px); }
.studio-template .feature-icon { width: 42px; height: 42px; border-radius: 12px; grid-row: span 2; }
.studio-template .feature-icon svg { width: 20px; height: 20px; }
.studio-template small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.studio-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.studio-title-input { flex: 1; min-width: 200px; font-weight: 700; font-size: 1.05rem; border-color: transparent !important; background: transparent !important; padding-inline: 4px !important; }
.studio-title-input:focus { border-color: var(--border) !important; background: var(--surface) !important; }
.studio-ai-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.studio-ai-bar.busy { opacity: .6; pointer-events: none; }
.studio-editor { width: 100%; min-height: 62vh; border: 0 !important; border-radius: 0 !important; padding: 20px 22px !important; font-family: var(--mono); font-size: .9rem !important; line-height: 1.7; resize: vertical; background: var(--surface) !important; box-shadow: none !important; }
.studio-preview { width: 100%; height: 72vh; border: 0; background: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.code-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; min-height: 60vh; }
.code-tree { border-inline-end: 1px solid var(--border); padding: 10px 0; overflow: auto; max-height: 70vh; font-size: .84rem; }
.code-tree a { display: block; padding: 5px 14px; color: var(--text-2); text-decoration: none; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-tree a.active, .code-tree a:hover { background: var(--primary-soft); color: var(--primary); }
.code-view { overflow: auto; max-height: 70vh; }
.code-view pre { margin: 0; padding: 14px 0; font-family: var(--mono); font-size: .82rem; line-height: 1.6; counter-reset: ln; }
.code-view pre span.l { display: block; padding: 0 16px 0 0; white-space: pre; }
.code-view pre span.l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 46px; padding-inline-end: 12px; text-align: end; color: var(--muted); opacity: .6; user-select: none; }
.code-edit { width: 100%; min-height: 60vh; border: 0 !important; border-radius: 0 !important; font-family: var(--mono); font-size: .84rem !important; line-height: 1.6; padding: 14px 16px !important; white-space: pre; resize: vertical; tab-size: 4; }
.code-chat { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow: auto; padding: 14px; }
.code-msg { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; white-space: pre-wrap; }
.code-msg.user { background: var(--primary-soft); align-self: flex-end; max-width: 90%; }
.code-msg .changes { margin-top: 6px; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.mkt-calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mkt-asset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.mkt-asset .content { white-space: pre-wrap; font-size: .88rem; color: var(--text-2); max-height: 180px; overflow: hidden; }
.chart-box { width: 100%; overflow-x: auto; }
.chart-box svg { display: block; max-width: 100%; height: auto; }
.chart-box text { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.chart-box .grid-line { stroke: var(--border); }
.data-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.data-col { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: .82rem; background: var(--surface); }
.data-col b { font-family: var(--mono); font-size: .8rem; }
.sql-box { font-family: var(--mono); font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; color: var(--text-2); }

/* AI provider API keys panel */
.key-grid { align-items: stretch; }
.key-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2, var(--surface)); min-width: 0; }
.key-card .field { margin: 0; }
.card-foot.code-composer { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.code-composer textarea { width: 100%; min-height: 96px; }
.code-composer .btn { align-self: flex-end; }

/* Admin → Integrations & API keys */
.int-ai { display: flex; flex-wrap: wrap; gap: 8px; }
.int-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: inherit; text-decoration: none; background: var(--surface); }
.int-chip:hover { border-color: var(--primary); }
.int-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft, rgba(37,99,235,.1)); color: var(--primary); }
.int-icon svg { width: 20px; height: 20px; }

/* Billing */
.plan-row.is-current { border-color: var(--accent); }
.plan-feat { margin: 6px 0 0; padding-inline-start: 1.1em; color: var(--muted); }

/* AI Image / Video / Music */
.media-layout { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: start; }
.media-layout > * { min-width: 0; }
.media-form { position: sticky; top: 84px; }
@media (max-width: 980px) { .media-layout { grid-template-columns: 1fr; } .media-form { position: static; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; background: var(--surface); }
.chip input:checked + span { border-color: var(--primary); background: var(--primary-soft, rgba(37,99,235,.1)); color: var(--primary); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ar { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.ar-1x1 { width: 11px; height: 11px; } .ar-16x9 { width: 16px; height: 9px; } .ar-9x16 { width: 9px; height: 16px; }
.ar-4x5 { width: 10px; height: 12px; } .ar-3x2 { width: 15px; height: 10px; } .ar-2x3 { width: 10px; height: 15px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-grid.audio { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.media-card { overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { background: var(--surface-3); display: flex; align-items: center; justify-content: center; }
.media-thumb.image img, .media-thumb.video video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.media-thumb.video video { object-fit: contain; }
.media-audio { width: 100%; padding: 22px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--primary); }
.media-audio svg { width: 34px; height: 34px; }
.media-audio audio { width: 100%; }
.media-actions .btn { padding-inline: 8px; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
pre.lyrics { white-space: pre-wrap; font-family: inherit; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.thumb-sm { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 240px; overflow: auto; padding: 2px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; top: 4px; left: 4px; z-index: 1; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid transparent; display: block; }
.pick input:checked + img { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft, rgba(37,99,235,.2)); }
.lyric-writer { background: var(--surface-2, var(--surface)); }
.media-gen .progress { margin-top: 10px; }

/* AI Influencer */
.infl-layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 18px; align-items: start; }
.infl-layout > * { min-width: 0; }
@media (max-width: 980px) { .infl-layout { grid-template-columns: 1fr; } }
.infl-face { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none; }
.infl-face.lg { width: 84px; height: 84px; }
.infl-face.placeholder { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.infl-day { margin: 18px 0 8px; font-size: .9rem; color: var(--muted); }
.infl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.infl-post { overflow: hidden; }
.infl-post-media img, .infl-post-media video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #000; }
.infl-post-media video { object-fit: contain; }
.infl-placeholder { aspect-ratio: 4 / 5; display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); font-size: .85rem; }
.infl-placeholder svg { width: 34px; height: 34px; }
.look-btn { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; width: 100%; }
.look-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.look-btn.is-face { border-color: var(--accent); }
dialog.wide { width: min(760px, 96vw); }
.d-block { display: block; }

/* Plan-locked module */
.module-locked { max-width: 560px; margin: 40px auto; text-align: center; }
.module-locked h1 { font-size: 1.5rem; margin: 14px 0 6px; }
.module-locked-icon { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft, rgba(37,99,235,.1)); color: var(--primary); }
.module-locked-icon svg { width: 30px; height: 30px; }
.module-locked-icon .lock { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.module-locked-icon .lock svg { width: 14px; height: 14px; }
.nav-item.is-locked { opacity: .55; }
.nav-item .nav-lock { margin-inline-start: auto; width: 14px; height: 14px; opacity: .8; }
.module-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.module-chips .badge { font-weight: 500; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.plan-modules { margin: -8px 0 18px; display: flex; flex-direction: column; gap: 4px; }
p.plan-modules { flex-direction: row; align-items: center; gap: 6px; }
.plan-list-sm { gap: 4px; margin: 0; flex: none; }
.plan-list-sm li { font-size: .82rem; }
.plan-list-sm svg { width: 14px; height: 14px; }

/* ================================================================ Stock photography (Unsplash) */
img.stock-img { display: block; width: 100%; height: 100%; object-fit: cover; }
img.stock-img.is-broken { visibility: hidden; }

/* Hero: photo behind the product preview, floating chips */
.hero-visual.has-photo { position: relative; min-height: 520px; align-items: flex-end; justify-content: flex-end; padding: 0 0 10px 0; }
.hero-photo { position: absolute; left: 0; top: 0; width: 74%; aspect-ratio: 4 / 5; max-height: 470px; border-radius: 28px; overflow: hidden;
  background: var(--grad); box-shadow: var(--shadow-lg); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(33,73,211,.10), rgba(16,185,129,.18) 60%, rgba(11,18,32,.35)); }
.hero-visual.has-photo .device { position: relative; z-index: 2; width: min(360px, 82%); margin-top: 120px; }
.hero-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); white-space: nowrap; }
.hero-chip svg { width: 16px; height: 16px; color: var(--primary); }
.hero-chip-a { left: -14px; top: 38px; }
.hero-chip-b { left: -10px; top: 410px; }
@media (max-width: 1000px) {
  .hero-visual.has-photo { min-height: 0; justify-content: center; }
  .hero-photo, .hero-chip { display: none; }
  .hero-visual.has-photo .device { margin-top: 0; width: min(440px, 100%); }
}

/* Use cases with photos */
.usecase.has-photo { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; }
.usecase-photo { height: 170px; background: var(--grad-soft); overflow: hidden; }
.usecase-photo img { transition: transform .6s ease; }
.usecase.has-photo:hover .usecase-photo img { transform: scale(1.04); }
.usecase-body { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px 22px; }
.usecase-body > svg { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 2px; }

/* Solution cards with a picture */
.solution-card.has-media { padding: 0 0 20px; overflow: hidden; }
.solution-card.has-media > :not(.solution-media) { margin-left: 22px; margin-right: 22px; }
.solution-media { position: relative; height: 150px; margin-bottom: 26px; background: var(--grad); }
.solution-media > img { position: absolute; inset: 0; }
.solution-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,18,32,0) 40%, rgba(11,18,32,.38)); }
.solution-media .feature-icon { position: absolute; left: 22px; bottom: -20px; z-index: 2; border: 3px solid var(--surface); }
.solution-media .badge { position: absolute; right: 12px; top: 12px; z-index: 2; }
.solution-card.has-media img { transition: transform .6s ease; }
.solution-card.has-media:hover img { transform: scale(1.05); }
.solution-image-stock { aspect-ratio: 4 / 3; overflow: hidden; background: var(--grad); }

/* Full-width photo band (Kuala Lumpur) */
.photo-band { position: relative; overflow: hidden; color: #fff; padding: 110px 0; background: #0b1220; }
.photo-band-img { position: absolute !important; inset: 0; }
.photo-band-shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,14,32,.92) 0%, rgba(13,35,94,.78) 45%, rgba(16,185,129,.25) 100%); }
.photo-band-inner { position: relative; z-index: 1; max-width: 1200px; }
.photo-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 14px 0 12px; max-width: 18ch; color: #fff; letter-spacing: -.02em; }
.photo-band p { max-width: 58ch; color: rgba(255,255,255,.85); line-height: 1.7; margin: 0 0 30px; }
.eyebrow.light { background: rgba(255,255,255,.14); color: #fff; }
.band-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.band-stats li { padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.band-stats b { display: block; font-size: 1.8rem; line-height: 1.1; }
.band-stats span { font-size: .85rem; color: rgba(255,255,255,.78); }
@media (max-width: 760px) { .photo-band { padding: 70px 0; } .band-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Page hero with photo (contact) */
.page-hero-photo { position: relative; overflow: hidden; color: #fff; border-bottom: 0; padding: 90px 0 46px; background: #0b1220; }
.page-hero-photo .page-hero-img { position: absolute; inset: 0; }
.page-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,32,.9), rgba(13,35,94,.6)); }
.page-hero-photo .site-wrap { position: relative; z-index: 1; }
.page-hero-photo h1 { color: #fff; }
.page-hero-photo .lead { color: rgba(255,255,255,.86); }

/* Sign-in panel */
.auth-art.has-photo .auth-art-img { position: absolute; inset: 0; z-index: 0; opacity: .38; mix-blend-mode: luminosity; }
.auth-art.has-photo::before, .auth-art.has-photo::after { z-index: 0; }

/* Credits page */
.credits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.credit-card { display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: .85rem; text-decoration: none; }
.credit-thumb { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--grad-soft); }
.credit-card:hover span { color: var(--primary); }

/* ================================================================ AI Social Media Posting */
.pf { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: .68rem; font-weight: 800; color: #fff; letter-spacing: .02em; flex: none; }
.pf-facebook { background: #1877f2; } .pf-instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); } .pf-linkedin { background: #0a66c2; text-transform: none; }
.pf-x { background: #111; } .pf-tiktok { background: #111; box-shadow: inset -2px 0 0 #25f4ee, inset 2px 0 0 #fe2c55; } .pf-telegram { background: #229ed9; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-dow { padding: 8px 10px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--border); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--surface-2, rgba(0,0,0,.02)); color: var(--muted); }
.cal-day.today .cal-no { background: var(--primary); color: #fff; }
.cal-no { align-self: flex-start; font-size: .78rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.cal-item { display: flex; align-items: center; gap: 4px; font-size: .72rem; padding: 3px 5px; border-radius: 7px; background: var(--primary-soft); color: inherit; text-decoration: none; min-width: 0; }
.cal-item .pf { min-width: 16px; height: 16px; font-size: .55rem; padding: 0 3px; }
.cal-item.status-published { background: rgba(16,185,129,.12); } .cal-item.status-failed, .cal-item.status-partial { background: rgba(239,68,68,.12); } .cal-item.status-draft { background: var(--surface-2, rgba(0,0,0,.04)); }
.target-dot { display: inline-flex; margin-inline-end: 3px; border-radius: 7px; padding: 1px; }
.target-dot.t-failed { box-shadow: 0 0 0 2px var(--danger); } .target-dot.t-published { box-shadow: 0 0 0 2px var(--accent); } .target-dot.t-pending, .target-dot.t-processing, .target-dot.t-publishing { opacity: .55; }
.social-account .sa-avatar { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2, rgba(0,0,0,.04)); flex: none; }
.btn.is-disabled { opacity: .5; cursor: not-allowed; }
.social-compose { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .social-compose { grid-template-columns: 1fr; } }
.account-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.account-pick { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; max-width: 260px; font-size: .88rem; }
.account-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.ai-box { border: 1px dashed var(--primary); }
.ai-box h3 svg { width: 18px; height: 18px; color: var(--primary); vertical-align: -3px; }
[data-counters] .over, [data-count-for].over { color: var(--danger); font-weight: 700; }
.variant { margin-top: 12px; }
.media-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.media-pick-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-2, rgba(0,0,0,.04)); }
.media-pick-item img, .media-pick-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-pick-item input { position: absolute; top: 6px; left: 6px; z-index: 2; }
.media-pick-item:has(input:checked) { border-color: var(--primary); }
.media-pick-item .badge { position: absolute; right: 6px; bottom: 6px; }
.media-pick.readonly { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.social-preview .sp-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-top: 8px; }
.sp-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.sp-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); }
.social-preview [data-preview] { white-space: pre-line; font-size: .88rem; margin: 10px 0; max-height: 260px; overflow: auto; }
.sp-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; border-radius: 10px; overflow: hidden; }
.sp-media img, .sp-media video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.target-list { list-style: none; margin: 0; padding: 0; }
.target-list li { padding: 12px 18px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- AI Website Builder */
.btn-xs { padding: 3px 7px; min-height: 26px; font-size: .75rem; border-radius: 7px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-block { width: 100%; justify-content: center; }
.grow { flex: 1 1 auto; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.seg label:has(input:checked) { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg svg { width: 16px; height: 16px; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: .88rem; }
.chip-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.site-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.site-card { display: block; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.site-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.site-thumb { height: 140px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; background: linear-gradient(135deg, var(--p), var(--a)); color: #fff; }
.site-thumb-name { font-weight: 800; font-size: 1.15rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.site-thumb-bar { display: block; height: 7px; width: 70%; background: rgba(255, 255, 255, .55); border-radius: 99px; }
.site-thumb-bar.short { width: 40%; background: rgba(255, 255, 255, .35); }
.site-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.site-status-row form { display: inline; }
.site-progress { margin-bottom: 14px; }
.site-editor { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.site-pages, .site-sections { list-style: none; margin: 0; padding: 6px; }
.site-pages li { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-radius: 10px; padding: 2px 4px 2px 0; }
.site-pages li a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; min-width: 0; flex: 1; }
.site-pages li a svg { width: 16px; height: 16px; color: var(--muted); }
.site-pages li.on { background: var(--primary-soft); }
.site-pages li.on a { color: var(--primary); }
.site-pages form, .site-sections form { display: inline; }
.site-sections li { padding: 10px 10px 12px; border-bottom: 1px solid var(--border); }
.site-sections li:last-child { border-bottom: 0; }
.site-sections li:target { background: var(--primary-soft); border-radius: 10px; }
.sec-type { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sec-type svg { width: 14px; height: 14px; }
.sec-title { display: block; margin: 4px 0 8px; font-weight: 600; color: var(--text); text-decoration: none; font-size: .92rem; }
.sec-ai { display: flex !important; gap: 6px; }
.sec-ai input { flex: 1; min-width: 0; font-size: .8rem; padding: 5px 9px; min-height: 28px; }
.site-frame-card { position: sticky; top: 80px; overflow: hidden; }
.site-frame-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.site-frame-bar .dots { display: inline-flex; gap: 5px; }
.site-frame-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.site-frame-bar .truncate { flex: 1; }
.site-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 0; background: #fff; }
.item-row { display: grid; gap: 8px; padding: 12px; margin-bottom: 10px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.img-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 420px; overflow: auto; padding: 2px; }
.img-opt { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-3); }
.img-opt img { width: 100%; height: 100%; object-fit: cover; }
.img-opt input { position: absolute; top: 6px; left: 6px; z-index: 1; }
.img-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.img-opt.none { display: grid; place-items: center; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 8px; }
.img-opt small { position: absolute; right: 5px; bottom: 5px; font-size: .62rem; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; }
.submission.unread { border-left: 4px solid var(--primary); }
.steps-list { padding-left: 20px; display: grid; gap: 8px; }
@media (max-width: 980px) { .site-editor { grid-template-columns: 1fr; } .site-frame-card { position: static; } .site-frame { height: 70vh; } }

/* ---------------------------------------------------------------- AI Meeting: studio pages */
.meet-list { display: grid; gap: 12px; }
.meet-item { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.meet-item a { color: var(--text); text-decoration: none; }
.meet-date { width: 52px; height: 56px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; align-content: center; line-height: 1.05; flex: none; }
.meet-date b { font-size: 1.35rem; }
.meet-date span { font-size: .7rem; text-transform: uppercase; font-weight: 700; }
.action-list { list-style: none; margin: 0; padding: 4px 8px; }
.action-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.action-list li:last-child { border-bottom: 0; }
.action-list li.done .grow > div:first-child { text-decoration: line-through; color: var(--muted); }
.action-list form { display: inline; }
.action-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; margin-top: 1px; color: #fff; }
.action-check:hover { border-color: var(--accent); }
.action-check.on { background: var(--accent); border-color: var(--accent); }
.action-check svg { width: 14px; height: 14px; }
.overdue { color: var(--danger); font-weight: 600; }
.action-add { display: grid; grid-template-columns: minmax(0, 1fr) 140px 150px auto; gap: 8px; border-top: 1px solid var(--border); }
.meet-hero { background: var(--grad-soft); }
.meet-hero-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.copy-field { display: flex; gap: 6px; margin-top: 6px; }
.copy-field input { flex: 1; min-width: 0; font-size: .85rem; }
.meet-player { width: 100%; border-radius: 12px; background: #000; }
audio.meet-player { background: transparent; }
.decision-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.decision-list li { display: flex; gap: 8px; align-items: flex-start; }
.decision-list svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 3px; }
.topic { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-top: 8px; }
.topic summary { font-weight: 650; cursor: pointer; }
.topic > div { margin-top: 8px; }
.email-draft { white-space: pre-wrap; font-family: inherit; font-size: .9rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 10px 0 0; }
.transcript { list-style: none; margin: 0; padding: 8px 16px 14px; max-height: 70vh; overflow: auto; }
.transcript li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.transcript li:last-child { border-bottom: 0; }
.transcript .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; padding-top: 2px; }
.meta-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .88rem; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; }
.ask-answers { display: grid; gap: 10px; margin-top: 12px; }
.ask-item { border-left: 3px solid var(--primary); padding: 2px 0 2px 12px; }
.ask-q { font-weight: 650; margin: 0 0 4px; }
.ask-a { margin: 0; white-space: pre-line; font-size: .92rem; }
.meet-join { min-height: 100vh; display: grid; place-content: center; gap: 16px; padding: 24px 16px; background: var(--grad-soft); }
.meet-join-card { width: min(480px, calc(100vw - 32px)); }
.meet-join-card h1 { font-size: 1.5rem; margin: 0 0 6px; }
@media (max-width: 700px) { .action-add { grid-template-columns: 1fr 1fr; } .action-add input[name="text"] { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- AI Meeting: room */
.meet-body { margin: 0; background: #0b1020; color: #e8ecf6; min-height: 100vh; }
.meet-app { min-height: 100vh; display: flex; flex-direction: column; }
.meet-app .muted { color: #9aa6c0; }
.mbtn { display: inline-grid; grid-auto-flow: column; place-items: center; gap: 6px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; position: relative; transition: background .15s; }
.mbtn:hover { background: rgba(255, 255, 255, .18); }
.mbtn svg { width: 20px; height: 20px; }
.mbtn.sm { width: 38px; height: 38px; }
.mbtn.sm svg { width: 18px; height: 18px; }
.mbtn.lg { width: 54px; height: 54px; }
.mbtn.off { background: #ef4444; }
.mbtn.on { background: var(--blue-500); }
.mbtn.danger { background: #dc2626; }
.mbtn.danger:hover { background: #b91c1c; }
.mbtn:disabled { opacity: .4; cursor: not-allowed; }
.mbtn .mcount { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--blue-500); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.mbtn .mdot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; }
.meet-prejoin { flex: 1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px clamp(16px, 5vw, 72px); }
.meet-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #151d35; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.meet-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.meet-avatar, .tile-avatar { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff; }
.meet-preview-ctrls { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 12px; }
.meet-prejoin-side h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 6px 0 8px; color: #fff; }
.meet-consent { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 12px 14px; margin: 14px 0; color: #e8ecf6; font-size: .9rem; }
.meet-call { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.meet-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.meet-rec { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(239, 68, 68, .18); color: #fca5a5; }
.meet-rec i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: pulse 1.6s infinite; }
.meet-stage { flex: 1; display: flex; gap: 12px; padding: 0 12px; min-height: 0; }
.meet-grid { flex: 1; display: grid; gap: 10px; align-content: center; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.meet-grid[data-count="1"] { grid-template-columns: minmax(0, 960px); justify-content: center; }
.meet-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #151d35; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.me video { transform: scaleX(-1); }
.tile.me.sharing video { transform: none; object-fit: contain; }
.tile .tile-avatar { display: none; width: 72px; height: 72px; font-size: 1.8rem; }
.tile.cam-off video { visibility: hidden; }
.tile.cam-off .tile-avatar { display: grid; }
.tile-name { position: absolute; left: 10px; bottom: 10px; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: rgba(0, 0, 0, .55); max-width: calc(100% - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-mute { position: absolute; right: 10px; bottom: 10px; font-size: .8rem; padding: 2px 6px; border-radius: 8px; background: rgba(239, 68, 68, .85); display: none; }
.tile.mic-off .tile-mute { display: block; }
.tile.connecting:not(.me)::after { content: ''; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; animation: pulse 1.2s infinite; }
.meet-panel { width: 340px; flex: none; display: flex; flex-direction: column; background: #121a30; border-radius: 16px; overflow: hidden; }
.meet-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.meet-panel-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; gap: 10px; overflow: auto; }
.meet-panel .copy-field input { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .12); }
.meet-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.meet-people li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.meet-chat { list-style: none; margin: 0; padding: 0; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.meet-chat li div { color: #cfd6e6; white-space: pre-line; }
.meet-chat-form { display: flex; gap: 8px; }
.meet-chat-form input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 9px 12px; }
.meet-controls { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px; position: relative; }
.meet-end { position: absolute; right: 18px; background: #dc2626 !important; color: #fff !important; border: 0 !important; }
.meet-ended { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 24px; }
.meet-ended > svg { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--grad); color: #fff; }
@media (max-width: 900px) {
  .meet-prejoin { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
  .meet-panel { position: fixed; inset: 60px 10px 90px; width: auto; z-index: 10; }
  .meet-grid, .meet-grid[data-count="2"] { grid-template-columns: 1fr; align-content: start; }
  .meet-end { position: static; }
  .meet-controls { flex-wrap: wrap; gap: 10px; }
}
h2 > svg, h3 > svg, h4 > svg, .site-progress b > svg { width: 18px; height: 18px; vertical-align: -3px; flex: none; }

/* Echo mark next to the wordmark (v1.6.1 brand) */
.site-brand .brand-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.site-foot .site-brand .brand-mark { width: 36px; height: 36px; }
