/* Design tokens (ported from the wireframes): design tokens + components. Brand colors come from CSS variables so whitelabel re-skins every page. */
:root {
  --primary: #0f766e;
  --primary-fg: var(--primary);
  --primary-contrast: #ffffff;
  --primary-hover: color-mix(in srgb, var(--primary) 86%, black);
  --primary-soft: color-mix(in srgb, var(--primary) 10%, var(--surface));
  --primary-soft-2: color-mix(in srgb, var(--primary) 18%, var(--surface));
  --ring: color-mix(in srgb, var(--primary) 32%, transparent);
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --border: #e3e6ee;
  --border-strong: #cfd4e0;
  --text: #12141c;
  --muted: #565d70;
  --faint: #5f677b;
  --success: #0f7b57;
  --success-soft: #e3f6ee;
  --success-solid: #0f7b57;  /* fill behind white text (the dark theme's --success is a pale tint) */
  --warn: #a8530a;
  --warn-soft: #fdf0dc;
  --danger: #c4283b;
  --danger-soft: #fde8eb;
  --danger-solid: #c4283b;   /* fill behind white text: the dark theme's --danger is a light tint for text, too pale to hold white */
  --info: #1f5fd6;
  --info-soft: #e6eefc;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 6px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .16);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --primary-fg: color-mix(in srgb, var(--primary) 55%, white);
  --bg: #0d0f16;
  --surface: #151822;
  --surface-2: #1c202c;
  --border: #272c3b;
  --border-strong: #363d52;
  --text: #eceef6;
  --muted: #a4abbe;
  --faint: #8e95aa;
  --success: #3ccf9a;
  --success-soft: #11332a;
  --warn: #f0a24a;
  --warn-soft: #3a2a12;
  --danger: #ff6b7d;
  --danger-soft: #3d1a20;
  --info: #6ea0ff;
  --info-soft: #14284d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--primary-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
main a:not([class]):not([role]), :where(p, .small, .muted, .center, .pad, .card-b, .mt-16, li, .xs) > a:not([class]) { text-decoration: underline; text-underline-offset: 2px; } /* a link inside a sentence is not told apart by colour alone */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .xs { font-size: 12px; }
.mono { font-family: var(--mono); } .center { text-align: center; } .right { text-align: right; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 12px; } .grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.grid { display: grid; gap: 16px; } .grid > *, .row > .grow { min-width: 0; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.g-main-l { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-logo { width: 15px; height: 15px; flex: none; }
.ico.sm { width: 15px; height: 15px; } .ico.lg { width: 24px; height: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--primary); color: var(--primary-contrast); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soft { background: var(--primary-soft); color: var(--primary-fg); }
.btn.soft:hover { background: var(--primary-soft-2); }
.btn.danger { background: var(--danger-solid); color: #fff; }
.btn.danger.outline { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.success { background: var(--success-solid); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.icon { width: 36px; padding: 0; } .btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12px; color: var(--faint); }
.input, .select, .textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px; height: 40px; transition: border-color .15s, box-shadow .15s; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23565d70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
[data-theme="dark"] .select { color-scheme: dark; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a4abbe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.select:disabled { opacity: .6; cursor: not-allowed; }
.textarea { height: auto; min-height: 120px; resize: vertical; line-height: 1.55; }
.textarea.mono, .input.mono { font-family: var(--mono); font-size: 13.5px; }
.mention-wrap { position: relative; }
.mention-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 100; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.mention-list.open { display: block; }
.mention-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mention-list li.on, .mention-list li:hover { background: var(--surface-2); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-group { position: relative; } .input-group .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; } .input-group .input { padding-left: 38px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; } .switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 22px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--primary); } .switch input:checked + span::before { transform: translateX(18px); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; } .swatch.active { box-shadow: 0 0 0 2px var(--text); }

/* Cards & surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card.pad, .pad { padding: 20px; } .card.pad-lg { padding: 28px; } .card.flat { box-shadow: none; }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; } .card-h h3 { margin: 0; }
.card-b { padding: 20px; } .card-f { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.link { cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; } .card.link:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }
[data-href] { cursor: pointer; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: 14px; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .callout.ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); } .callout.brand { background: var(--primary-soft); border-color: var(--primary-soft-2); }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.stat-strip { display: flex; flex-wrap: wrap; margin: 0; } .stat-strip .stat { flex: 1 1 150px; } .stat-strip dd { margin: 0; }
.row-link { color: inherit; text-decoration: none; } .avatar-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skel { height: 14px; border-radius: 6px; background: var(--surface-2); } .skel.w60 { width: 60%; } .skel.w35 { width: 35%; margin-top: 8px; height: 11px; }
.stat { padding: 18px 20px; } .stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; } .stat .l { font-size: 13px; color: var(--muted); } .stat .d { font-size: 12px; font-weight: 600; color: var(--success); }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }

/* Badges, chips, avatars */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--success-soft); color: var(--success); } .badge.amber { background: var(--warn-soft); color: var(--warn); } .badge.red { background: var(--danger-soft); color: var(--danger); } .badge.blue { background: var(--info-soft); color: var(--info); } .badge.brand { background: var(--primary-soft); color: var(--primary-fg); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.chip:hover { background: var(--surface-2); } .chip.active { background: var(--primary-soft); color: var(--primary-fg); border-color: var(--primary-soft-2); font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; background: #4f46e5; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; } .avatar.lg { width: 48px; height: 48px; font-size: 16px; } .avatar.c2 { background: #0e7490; } .avatar.c3 { background: #c2410c; } .avatar.c4 { background: #7e22ce; } .avatar.c5 { background: #276749; } .avatar.c6 { background: #be185d; } /* each 4.5:1 or better under white text */
.avatars { display: inline-flex; } .avatars .avatar { border: 2px solid var(--surface); margin-left: -8px; } .avatars .avatar:first-child { margin-left: 0; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--surface); }
.stars { color: #f5a524; letter-spacing: 1px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--primary); border-radius: 8px; }

/* Tables & lists */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; 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.tight th, .table.tight td { padding-left: 10px; padding-right: 10px; } /* many narrow columns (Folders & rules) fit without a horizontal scrollbar */
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table-wrap { overflow-x: auto; position: relative; } /* relative: absolutely placed .sr-only text inside the table must not widen the page */
.list > * { padding: 14px 20px; border-bottom: 1px solid var(--border); } .list > *:last-child { border-bottom: 0; }
.list-row { display: flex; align-items: center; gap: 14px; }
.list-row.hover:hover { background: var(--surface-2); cursor: pointer; }
.title-link { font-weight: 600; color: var(--text); } .title-link:hover { color: var(--primary-fg); text-decoration: none; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tab { padding: 10px 14px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; text-decoration: none; }
.tab:hover { color: var(--text); text-decoration: none; } .tab.active { color: var(--primary-fg); border-bottom-color: var(--primary); }
.panel { display: none; } .panel.active { display: block; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; } .seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; } .seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Overlays */
.modal { position: fixed; inset: 0; background: rgba(10, 12, 20, .55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; backdrop-filter: blur(2px); }
.modal.open { display: flex; }
.modal-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; border: 1px solid var(--border); }
.modal-card.wide { max-width: 760px; } .modal-h { padding: 20px 24px 0; display: flex; justify-content: space-between; gap: 12px; } .modal-b { padding: 16px 24px; } .modal-f { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.dd { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 100; display: none; text-align: left; }
.menu.left { right: auto; left: 0; } .dd.open > .menu { display: block; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text); border-radius: 8px; cursor: pointer; text-decoration: none; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; } .menu hr { border: 0; height: 1px; background: var(--border); margin: 6px 0; } .menu .mh { padding: 6px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.session-banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 310; display: flex; align-items: center; gap: 12px; max-width: min(94vw, 680px); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); }
.session-banner .btn { flex: none; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 300; }
.toast { background: #151822; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: tin .2s ease; border: 1px solid #2c3142; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 150; transform: translateX(105%); transition: transform .25s; display: flex; flex-direction: column; }
.drawer.open { transform: none; } .drawer-h { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; } .drawer-b { padding: 20px; overflow: auto; flex: 1; }

/* App shell */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
a.brand, div.brand:not(.callout) { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--text); padding: 4px 8px 14px; text-decoration: none; } a.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--primary-contrast); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: none; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; } .nav a.active { background: var(--primary-soft); color: var(--primary-fg); font-weight: 600; }
.nav a .badge { margin-left: auto; }
.sidebar-f { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.sidebar-top .brand { min-width: 0; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.nav-toggle:hover { background: var(--surface-2); color: var(--text); }
/* sidebar reduced to icons (desktop only; labels stay available as tooltips and to screen readers via title/aria) */
@media (min-width: 861px) {
  .app.mini { grid-template-columns: 68px minmax(0, 1fr); }
  .app.mini .sidebar { padding: 16px 10px; overflow-x: hidden; scrollbar-width: none; }  /* a scrollbar would eat a quarter of the width; it still scrolls */
  .app.mini .sidebar::-webkit-scrollbar { display: none; }
  .app.mini .brand { justify-content: center; padding: 4px 0 14px; }
  .app.mini .brand-name, .app.mini .nav a > span:not(.badge), .app.mini .ws-label { display: none; }
  .app.mini .sidebar-top { flex-direction: column; align-items: center; align-self: stretch; gap: 6px; padding-bottom: 6px; }
  .app.mini .sidebar-top .brand { padding: 4px 0 0; }
  .app.mini .nav-h { font-size: 0; padding: 0; height: 1px; margin: 10px 8px; background: var(--border); }
  .app.mini .nav a { justify-content: center; padding: 10px 0; position: relative; }
  .app.mini .nav a .badge { position: absolute; top: 2px; right: 4px; margin: 0; font-size: 10px; padding: 0 5px; line-height: 16px; }
}
@media (max-width: 860px) { .nav-toggle { display: none; } }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .search { flex: 1; max-width: 460px; }
.content { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; } .page-h h1 { margin-bottom: 4px; overflow-wrap: anywhere; } .page-h p { margin: 0; color: var(--muted); }
/* A long title wraps inside its own column; the actions keep their place on the right instead of dropping below it */
.page-h > :first-child { flex: 1 1 320px; min-width: 0; } .page-h > :last-child:not(:first-child) { flex: 0 1 auto; justify-content: flex-end; margin-left: auto; }
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; } .crumbs a { color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.menu-btn { display: none; }
.powered { font-size: 12px; color: var(--faint); text-align: center; padding: 10px 0 0; }
.role-sw { font-size: 12px; } .role-sw .select { height: 34px; font-size: 13px; }

/* Public site */
.pubnav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.pubnav .in { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 12px 24px; }
.pubnav a.brand { padding: 0; } .pubnav nav { display: flex; gap: 22px; flex: 1; } .pubnav nav a { color: var(--muted); font-weight: 500; font-size: 14px; } .pubnav nav a:hover, .pubnav nav a.active { color: var(--text); text-decoration: none; }
.pubnav .actions { display: flex; align-items: center; gap: 8px; }
/* `.wrap` is the page container; `.row.wrap` / `.col.wrap` mean flex-wrap and must not inherit it */
.wrap:not(.row):not(.col) { max-width: 1160px; margin: 0 auto; padding: 0 24px; } .wrap.narrow:not(.row):not(.col) { max-width: 860px; }
.section { padding: 72px 0; } .section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary-fg); margin-bottom: 10px; }
.section-h { max-width: 680px; margin: 0 auto 40px; text-align: center; } .section-h h2 { font-size: 32px; } .section-h p { color: var(--muted); font-size: 17px; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 84px 0 56px; text-align: center; background:
  radial-gradient(1100px 520px at 50% -14%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%),
  radial-gradient(640px 420px at 6% 34%, color-mix(in srgb, #06b6d4 16%, transparent), transparent 70%),
  radial-gradient(640px 420px at 94% 24%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
  linear-gradient(180deg, color-mix(in srgb, var(--primary) 8%, var(--bg)) 0%, var(--bg) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(color-mix(in srgb, var(--primary) 30%, transparent) 1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 18%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 75% 55% at 50% 18%, #000 25%, transparent 75%); }
.hero h1 { font-size: 54px; max-width: 820px; margin: 0 auto 18px; letter-spacing: -.03em; } .hero .lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.grad { background: linear-gradient(90deg, var(--primary-fg), color-mix(in srgb, var(--primary-fg) 50%, #06b6d4)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 5px 14px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-fg); font-weight: 600; font-size: 13px; margin-bottom: 20px; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); } .mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.cat-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-fg); display: flex; align-items: center; justify-content: center; flex: none; }
.feature { padding: 24px; } .feature .fi { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-fg); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; } .feature p { color: var(--muted); margin: 0; font-size: 14.5px; }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.price { padding: 28px; position: relative; } .price.pop { border: 2px solid var(--primary); box-shadow: var(--shadow); } .price .amt { font-size: 40px; font-weight: 800; letter-spacing: -.03em; } .price .amt small { font-size: 15px; font-weight: 500; color: var(--muted); }
.price ul { list-style: none; padding: 0; margin: 18px 0 24px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; } .price li { display: flex; gap: 10px; align-items: flex-start; } .price li .ico { color: var(--success); margin-top: 2px; }
.ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-contrast); font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; } .faq summary { font-weight: 600; cursor: pointer; margin: -16px -20px; padding: 16px 20px; } .faq details[open] summary { margin-bottom: -6px; } /* the whole row is the tap target */ .faq details p { margin: 10px 0 0; color: var(--muted); }
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 28px; margin-top: 0; } .footer .cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; } .footer h4, .footer .fh { margin: 0 0 .5em; font-weight: 700; line-height: 1.2; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); } .footer a { display: block; color: var(--muted); padding: 7px 0; font-size: 14px; } .footer .base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--faint); font-size: 13px; gap: 12px; flex-wrap: wrap; }
.footer a.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; padding: 0 0 10px; } /* the logo and name stay on one line, unlike the column links */
.footer .base a { display: inline; padding: 0; font-size: inherit; } /* the legal links sit in one line, unlike the column links above */
.logos { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; color: var(--faint); font-weight: 700; letter-spacing: -.02em; font-size: 18px; opacity: .85; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); } .auth-box { width: 100%; max-width: 400px; }
.auth-art { background: linear-gradient(150deg, var(--primary), color-mix(in srgb, var(--primary) 50%, #111)); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 24px; } .auth-art h2 { font-size: 32px; color: #fff; } .auth-art p { color: rgba(255,255,255,.82); } .auth-art .quote { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 20px; }
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Prompt-specific */
.about-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 14.5px; line-height: 1.55; }
.prompt-card p.about-clamp { -webkit-line-clamp: 3; white-space: pre-line; }
.title-desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a table cell that takes the spare width and lets long one-line text shorten with an ellipsis instead of widening the table */
.table td.cell-fill { width: 100%; max-width: 0; } .table td.cell-fill .title-desc { max-width: 100%; }
.table td.cell-nowrap { white-space: nowrap; }
.prompt-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; height: 100%; } .prompt-card h3 { margin: 0; font-size: 15.5px; } .prompt-card p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-card .meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--faint); }
.var { background: var(--primary-soft); color: var(--primary-fg); border-radius: 5px; padding: 0 5px; font-family: var(--mono); font-size: .92em; font-weight: 600; }
.var.skipped { background: var(--surface-2); color: var(--faint); font-weight: 400; text-decoration: line-through; }
.var.section { background: var(--surface-2); color: var(--muted); }
.skipped-section { color: var(--faint); text-decoration: line-through; }
.promptbox { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; } .promptbox mark { background: var(--primary-soft-2); color: var(--text); border-radius: 4px; padding: 0 3px; }
.diff { font-family: var(--mono); font-size: 13px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; } .diff div { padding: 4px 14px; white-space: pre-wrap; } .diff .add { background: var(--success-soft); color: var(--success); } .diff .del { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 40%, transparent); } .diff .ctx { color: var(--muted); }
.timeline { position: relative; padding-left: 22px; } .timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); } .timeline .ev { position: relative; padding-bottom: 18px; } .timeline .ev::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--primary); }
.compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } .compare .out { background: var(--surface-2); border-radius: 10px; padding: 14px; font-size: 14px; min-height: 140px; overflow-wrap: anywhere; }
.model-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); } .model-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); } .model-card input { accent-color: var(--primary); width: 16px; height: 16px; margin-top: 3px; } .model-card.off { opacity: .75; cursor: default; }
.logo-drop { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); cursor: pointer; } .logo-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.step { display: flex; gap: 12px; align-items: flex-start; } .step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; } .step.done .n { background: var(--success-solid); color: #fff; }
.code { background: #0f1220; color: #dfe3f2; border-radius: 10px; padding: 16px; font-family: var(--mono); font-size: 13px; overflow: auto; line-height: 1.6; white-space: pre; } .code .k { color: #a5b4fc; } .code .s { color: #86efac; } .code .c { color: #7c849c; }
.sticky { position: sticky; top: 76px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .board .colm { background: var(--surface-2); border-radius: 12px; padding: 12px; } .board .colm h4 { display: flex; justify-content: space-between; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; } .bars i { flex: 1; background: var(--primary-soft-2); border-radius: 6px 6px 0 0; position: relative; } .bars i.hi { background: var(--primary); }
.bars-l { display: flex; gap: 10px; color: var(--faint); font-size: 11px; margin-top: 6px; } .bars-l span { flex: 1; text-align: center; }

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main, .g-main-l { grid-template-columns: minmax(0, 1fr) !important; } .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer .cols { grid-template-columns: 1fr 1fr; } .footer .cols > :first-child { grid-column: 1 / -1; } .hero h1 { font-size: 40px; } .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 120; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; } body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 110; }
  .menu-btn { display: inline-flex; } .topbar { padding: 10px 16px; } .content { padding: 20px 16px; }
  .pubnav nav { display: none; } .pubnav .in { gap: 12px; } .pubnav .in a.brand { flex: 1; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .compare, .board { grid-template-columns: minmax(0, 1fr) !important; } .hero { padding: 56px 0 40px; } .hero h1 { font-size: 32px; } .section { padding: 48px 0; } .section-h h2 { font-size: 26px; }
  .footer .cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; } .drawer { width: 100%; } .topbar .search { display: none; } .oauth { grid-template-columns: 1fr; } .pubnav .actions .btn.ghost { display: none; }
  h1 { font-size: 24px; } .page-h .row { width: 100%; }
}

/* Library filter row: controls share one height so they line up on a single baseline */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .select { width: auto; min-width: 190px; height: 38px; }
.filters .chip { height: 38px; padding: 0 14px; font-size: 14px; }

/* Top bar: keep everything on screen at phone widths */
.ws-select { width: auto; max-width: 220px; }
@media (max-width: 560px) { .hide-sm { display: none; } .ws-select { max-width: 130px; } .topbar { gap: 8px; padding-left: 14px; padding-right: 14px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); font-weight: 600; }
.skip-link:focus { left: 12px; } .content:focus, .modal:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.navmenu { display: none; position: relative; }
.navmenu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong); color: var(--text); }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu[open] summary { background: var(--surface-2); }
.navmenu-list { position: absolute; right: 0; top: 44px; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 70; }
.navmenu-list a { padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px; } .navmenu-list a:hover { background: var(--surface-2); text-decoration: none; }
@media (max-width: 860px) { .navmenu { display: block; } }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.usermenu { position: relative; } .usermenu summary { list-style: none; cursor: pointer; } .usermenu summary::-webkit-details-marker { display: none; }
.navmenu-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; } .navmenu-list button:hover { background: var(--surface-2); }
.usermenu .navmenu-list a { display: block; }
.usermenu .navmenu-list .mi { display: flex; align-items: center; gap: 10px; } .navmenu-list .mi .ico { color: var(--muted); flex: none; } .navmenu-list .mi.danger, .navmenu-list .mi.danger .ico { color: var(--danger); }
.topbar .usermenu .navmenu-list { z-index: 120; }
.navmenu-list .menu-sep { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; } .navmenu-list .menu-label { padding: 6px 12px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.starpick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; position: relative; }
.starpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.starpick label { font-size: 30px; line-height: 1; cursor: pointer; color: var(--border-strong); padding: 0 2px; }
.starpick input:checked ~ label, .starpick label:hover, .starpick label:hover ~ label { color: #f5a524; }
.starpick input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 4px; }

/* The hidden attribute must win over component display rules (e.g. .btn). */
[hidden] { display: none !important; }
.field-error { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--danger, #b42318); } .field > .field-error { margin-top: 0; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger, #b42318); }
.later > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; } .later > summary::-webkit-details-marker { display: none; } .later > summary::before { content: "+"; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted); } .later[open] > summary::before { content: "-"; }

/* ---------- support conversation (in-app requests, staff inbox, the guest's private link) ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.msg .msg-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; } .msg .msg-h .grow { flex: 1; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; }
.msg.staff { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.msg.note { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); border-style: dashed; }
.msg.sys { background: none; border: 0; padding: 0 4px; font-size: 13px; color: var(--faint); text-align: center; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: 16px; }
/* Notifications: plain rows; unread ones get an accent bar on the left, a bold title and a dot (no filled background) */
.notif { position: relative; padding: 16px 20px; transition: background .12s; }
.notif.unread::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.notif-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); }
.notif-ico.brand { background: var(--primary-soft); color: var(--primary-fg); } .notif-ico.amber { background: var(--warn-soft); color: var(--warn); }
.notif-ico.green { background: var(--success-soft); color: var(--success); } .notif-ico.blue { background: var(--info-soft); color: var(--info); } .notif-ico.red { background: var(--danger-soft); color: var(--danger); }
.notif-title { font-size: 14.5px; color: var(--muted); } .notif.unread .notif-title { font-weight: 700; color: var(--text); }
.notif-body { margin-top: 2px; overflow-wrap: anywhere; } .notif-meta { margin-top: 4px; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: none; }

/* Markdown results (apps): a model's Text and Document answers, rendered */
.md { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h1 { font-size: 22px; margin: 18px 0 10px; } .md h2 { font-size: 18px; margin: 16px 0 8px; } .md h3 { font-size: 15.5px; margin: 14px 0 6px; } .md h4 { font-size: 14.5px; }
.md p { margin: 0 0 10px; } .md ul, .md ol { margin: 0 0 10px; padding-left: 22px; } .md li { margin: 2px 0; }
.md code { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--surface-2); padding: 12px 14px; border-radius: 8px; overflow: auto; } .md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 10px; padding: 2px 14px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.md table { border-collapse: collapse; margin: 0 0 12px; max-width: 100%; display: block; overflow-x: auto; } .md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; } .md th { background: var(--surface-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* Apps folder panel: a ⋯ menu on each folder row, shown on hover or focus (owners and admins). */
.nav-row { display: flex; align-items: center; gap: 4px; position: relative; }
.nav-row > a { flex: 1; min-width: 0; }
.nav-row .nav-more { opacity: 0; }
.nav-row:hover .nav-more, .nav-row:focus-within .nav-more, .nav-row .nav-more[open] { opacity: 1; }
@media (hover: none) { .nav-row .nav-more { opacity: 1; } }

/* Model picker (components/ModelPicker.tsx): a searchable list instead of a long select or a wall of checkboxes */
.mp { position: relative; }
.mp-btn { width: 100%; text-align: left; cursor: pointer; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-panel { position: absolute; z-index: 30; left: 0; right: 0; min-width: 280px; max-width: 520px; margin-top: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px; }
.mp-search { margin-bottom: 6px; }
.mp-list, .mp-list ul { list-style: none; margin: 0; padding: 0; }
.mp-list { max-height: 300px; overflow-y: auto; }
.mp-grp { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint, var(--muted)); padding: 8px 8px 4px; }
.mp-opt { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.mp-opt.active { background: var(--primary-soft); }
.mp-opt.off { opacity: .6; cursor: default; }
.mp-opt[aria-selected="true"] strong { color: var(--primary-fg, var(--primary)); }
.mp-check { width: 16px; flex: none; color: var(--primary); }
.mp-none { padding: 10px 8px; }
.mp-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: text; }
.mp-field.open, .mp-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--primary-soft); font-size: 14px; }
.mp-x { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); display: inline-flex; border-radius: 50%; }
.mp-x:hover { color: var(--text); background: var(--surface-2); }
.mp-in { flex: 1 1 90px; min-width: 80px; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 4px 0; }
.mp-count { padding: 0 4px; }

/* Option tiles: a hidden checkbox and a card that shows whether it is ticked (starter apps in onboarding and Starter templates). From wireframes/onboarding.html. */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt .box { display: flex; flex-direction: column; gap: 6px; height: 100%; border: 1.5px solid var(--border-strong); border-radius: 12px; padding: 16px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.opt:hover .box { background: var(--surface-2); }
.opt input:checked + .box { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--ring); }
.opt input:focus-visible + .box { box-shadow: 0 0 0 3px var(--ring); }
.opt input:disabled + .box { cursor: default; }
.opt:has(input:disabled) { cursor: default; }
.opt:has(input:disabled):hover .box { background: var(--surface); }
.opt .nm { font-weight: 700; } .opt .ds { font-size: 13px; color: var(--muted); }
