/* Hello Pixel design system. Brand: Chef Pixel (black, white, #FF9800, pixel grid). */
/* Dark = matte graphite, not pure black: layers you can tell apart, softer white (less glare),
   and grey text that stays readable (every text colour is at least 4.5:1 on panels). */
:root, [data-theme="dark"] {
  --bg: #17181b;
  --bg-grid: rgba(255, 255, 255, .022);
  --panel: #1f2024;
  --panel-2: #24252a;
  --panel-3: #2b2c32;
  --raise: #303137;
  --border: #2f3036;
  --border-strong: #3e3f46;
  --text: #ececef;
  --text-2: #d3d3d9;
  --muted: #b0b0ba;
  --faint: #8a8a95;
  --accent: #ff9800;
  --accent-hi: #ffb340;
  --accent-soft: rgba(255, 152, 0, .12);
  --accent-line: rgba(255, 152, 0, .4);
  --accent-text: #ffb547;
  --on-accent: #0a0a0a;
  --ink: #f4f4f5;          /* the "black squares" color of the logo in this theme */
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --err: #f87171; --err-soft: rgba(248, 113, 113, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 10px 28px rgba(0, 0, 0, .28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px var(--accent-line), 0 0 28px rgba(255, 152, 0, .14);
  --code-bg: #1a1b1e;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f6f4;
  --bg-grid: rgba(10, 10, 10, .045);
  --panel: #ffffff;
  --panel-2: #fafaf9;
  --panel-3: #f2f2ef;
  --raise: #ffffff;
  --border: #e6e6e2;
  --border-strong: #d4d4cf;
  --text: #0a0a0a;
  --text-2: #27272a;
  --muted: #5c5c57;
  --faint: #91918b;
  --accent: #ff9800;
  --accent-hi: #f08c00;
  --accent-soft: #fff3e0;
  --accent-line: rgba(255, 152, 0, .55);
  --accent-text: #a85700;
  --on-accent: #0a0a0a;
  --ink: #0a0a0a;
  --ok: #0c7a4a; --ok-soft: #e4f6ec;
  --warn: #935b00; --warn-soft: #fff4d6;
  --err: #b42318; --err-soft: #fdeceb;
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 8px 24px rgba(10, 10, 10, .06);
  --shadow-lg: 0 30px 80px rgba(10, 10, 10, .18);
  --glow: 0 0 0 1px var(--accent-line), 0 0 0 4px rgba(255, 152, 0, .12);
  --code-bg: #fbfbfa;
  color-scheme: light;
}
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Display", "Segoe UI Variable Display", "SF Pro Display", "Segoe UI", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.55 var(--font); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 100% -10%, rgba(255, 152, 0, .07), transparent 60%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
}
::selection { background: rgba(255, 152, 0, .35); color: var(--text); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-family: var(--display); letter-spacing: -.018em; }
h1 { font-size: 26px; font-weight: 650; }
h2 { font-size: 16.5px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 620; letter-spacing: -.005em; }
p { margin: 0; }
code, pre, kbd, .mono, textarea.code { font-family: var(--mono); font-size: 12.5px; }
kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; color: var(--muted); background: var(--panel-2); }
svg { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px rgba(255, 152, 0, .6); }
.eyebrow.plain::before { display: none; }

/* ------------------------------------------------------------------ brand */
.mark { display: inline-block; width: 28px; height: 28px; color: var(--ink); flex: none; }
.mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mark .k { fill: currentColor; }
.mark .o { fill: var(--accent); }
.mark.thinking .k { animation: pix 1.4s var(--ease) infinite; }
.mark.thinking .k:nth-child(2) { animation-delay: .08s; } .mark.thinking .k:nth-child(3) { animation-delay: .16s; }
.mark.thinking .k:nth-child(4) { animation-delay: .24s; } .mark.thinking .k:nth-child(5) { animation-delay: .32s; }
.mark.thinking .k:nth-child(6) { animation-delay: .40s; } .mark.thinking .k:nth-child(7) { animation-delay: .48s; }
.mark.thinking .k:nth-child(8) { animation-delay: .56s; }
.mark.thinking .o { animation: pixo 1.4s var(--ease) infinite; }
@keyframes pix { 0%, 100% { opacity: .22; } 40% { opacity: 1; fill: var(--accent); } 60% { opacity: 1; } }
@keyframes pixo { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -8px); } }
.wordmark { font-family: var(--display); font-weight: 680; letter-spacing: -.03em; display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--text); }
.pi { position: relative; display: inline-block; line-height: 1; }
.pi::before { content: ""; position: absolute; left: 50%; bottom: .78em; width: .21em; height: .21em; transform: translateX(-50%); border-radius: .045em; background: var(--accent); box-shadow: 0 0 .3em rgba(255, 152, 0, .55); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 12px; flex: none; color: var(--text); font-size: 18px; text-decoration: none !important; }
.brand .mark { width: 30px; height: 30px; }
.powered { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; color: var(--faint); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--mono); text-decoration: none !important; }
.powered img { height: 17px; width: auto; max-width: 100%; display: block; opacity: .9; }
.powered:hover img { opacity: 1; }
.powered .light-only { display: none; }
[data-theme="light"] .powered .dark-only { display: none; }
[data-theme="light"] .powered .light-only { display: block; }
.boot { display: grid; place-items: center; height: 100vh; }
.boot-mark { width: 14px; height: 14px; border-radius: 3px; background: #ff9800; animation: bootp 1s ease-in-out infinite; }
@keyframes bootp { 50% { transform: scale(.55); opacity: .5; } }

/* ------------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
/* The side bar always fits the window: it never makes the page taller. If the window is very short,
   only the menu list scrolls, inside the bar. */
.side { background: color-mix(in srgb, var(--panel) 84%, transparent); backdrop-filter: blur(12px); border-right: 1px solid var(--border); padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 20; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -12px; padding: 0 12px 8px; scrollbar-width: thin; }
.nav-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 5px; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-weight: 520; transition: background .15s, color .15s; flex: none; }
.nav a:hover { background: var(--panel-3); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--panel-3); color: var(--text); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 16px; margin-top: -8px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px rgba(255, 152, 0, .7); }
.nav a.active svg { color: var(--accent); }
.nav .badge { margin-left: auto; }
.side-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 10px 2px 0; border-top: 1px solid var(--border); }
.me-wrap { position: relative; }
.me { width: 100%; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 13px; min-width: 0; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 6px; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.me:hover, .me.open { background: var(--panel-3); border-color: var(--border); }
.me > svg { width: 14px; height: 14px; color: var(--faint); transform: rotate(-90deg); flex: none; }
.ws-menu.me-menu { top: auto; bottom: calc(100% + 6px); padding: 10px; gap: 6px; overflow: visible; max-height: none; }
.me-menu .seg { width: 100%; }
.me-menu .seg button { flex: 1; justify-content: center; padding: 5px 4px; font-size: 12px; gap: 4px; }
.me-menu .seg svg { width: 14px; height: 14px; }
.me-label { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 2px 2px 0; }
.side-foot .powered { padding: 0 6px; }
.side-foot .powered img { height: 14px; }
.me > div { min-width: 0; }
.me .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--border-strong); font-weight: 650; font-size: 12px; color: var(--text); flex: none; }
.main { padding: 32px 40px 72px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 10px 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head p { margin-top: 6px; max-width: 680px; }
section + section { margin-top: 36px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 580; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, transform .08s, box-shadow .15s; }
.btn { flex-shrink: 0; } /* a button never squeezes its own label; the row wraps instead */
.btn:hover { border-color: var(--faint); background: var(--panel-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible { outline: none; box-shadow: var(--glow); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(255, 152, 0, .25), 0 6px 18px rgba(255, 152, 0, .18); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-3); }
.btn.danger { color: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn svg { width: 16px; height: 16px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
label.f { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 13px; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 520; cursor: pointer; }
.check input { width: auto; }
.form { display: grid; gap: 16px; }
.form.two { grid-template-columns: 1fr 1fr; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 560; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raise); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 0 0 1px var(--border-strong); }
.seg svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ surfaces */
.card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.click { cursor: pointer; transition: border-color .18s, transform .18s var(--ease), box-shadow .18s; }
.card.click::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: 0; transform: scale(.4); transition: opacity .18s, transform .18s var(--ease); box-shadow: 0 0 14px rgba(255, 152, 0, .7); }
.card.click:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--border-strong); }
.card.click:hover::after { opacity: 1; transform: scale(1); }
.app-card { display: flex; flex-direction: column; gap: 12px; min-height: 150px; }
.app-card .top { display: flex; gap: 12px; align-items: center; }
.icon-tile { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--text); flex: none; }
.icon-tile::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); }
.icon-tile svg { width: 19px; height: 19px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.callout { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 520; border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.info { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.callout .btn { margin-left: auto; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 50%, transparent); }

/* ------------------------------------------------------------------ home */
.hero { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; padding: 40px 40px 30px; background:
  radial-gradient(600px 260px at 92% 0%, rgba(255, 152, 0, .16), transparent 70%),
  linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), var(--panel)); box-shadow: var(--shadow); }
.hero-mark { position: absolute; right: 40px; top: 34px; width: 104px; height: 104px; }
.hero h1 { font-size: 38px; font-weight: 680; letter-spacing: -.035em; max-width: 640px; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 600px; }
.command { margin-top: 24px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--panel-2); padding: 12px; transition: border-color .2s, box-shadow .2s; }
.command:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.command textarea { border: 0; min-height: 84px; padding: 6px; outline: none; resize: none; background: transparent; font-size: 15.5px; box-shadow: none !important; }
.command .bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.command select { width: auto; max-width: 280px; height: 34px; padding: 0 30px 0 10px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { border: 1px solid var(--border); background: var(--panel-2); border-radius: 99px; padding: 6px 13px; cursor: pointer; color: var(--muted); font: inherit; font-size: 13px; transition: color .15s, border-color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--panel); text-decoration: none !important; color: var(--text); transition: border-color .15s; }
.stat:hover { border-color: var(--border-strong); }
.stat .n { font-family: var(--display); font-size: 24px; font-weight: 680; letter-spacing: -.03em; }
.stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.stat.hot .n { color: var(--accent); }

/* ------------------------------------------------------------------ tables & misc */
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.t th { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 500; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: color-mix(in srgb, var(--panel-3) 60%, transparent); }
table.t td.c, table.t th.c { text-align: center; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
pre.json { background: var(--code-bg); border: 1px solid var(--border); border-radius: 9px; padding: 12px; overflow: auto; max-height: 260px; margin: 0; white-space: pre-wrap; color: var(--text-2); }
.list-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ builder */
.builder { display: grid; grid-template-rows: 56px 1fr; height: 100vh; background: var(--bg); }
.btop { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.btop .mark { width: 24px; height: 24px; }
.btop .sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 4px; }
.btop .title { font-family: var(--display); font-weight: 640; font-size: 15px; border: 1px solid transparent; background: transparent; width: auto; min-width: 140px; max-width: 360px; padding: 5px 8px; }
.btop .title:hover { border-color: var(--border); }
.bbody { display: grid; grid-template-columns: minmax(360px, 440px) 1fr; min-height: 0; }

/* chat column */
.chat { display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--panel); min-height: 0; position: relative; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-head .mark { width: 22px; height: 22px; }
.chat-head .who { font-weight: 650; font-family: var(--display); }
.chat-head .model { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 7px; background: var(--panel-2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status-dot.busy { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: bootp 1s infinite; }
.status-dot.off { background: var(--faint); box-shadow: none; }
.pixbar { display: flex; gap: 3px; padding: 0 16px; height: 0; overflow: hidden; transition: height .2s, padding .2s; }
.pixbar.on { height: 12px; padding-top: 8px; }
.pixbar i { flex: 1; height: 4px; border-radius: 1px; background: var(--border-strong); }
.pixbar.on i { animation: pixfill 1.8s linear infinite; }
@keyframes pixfill { 0%, 100% { background: var(--border-strong); box-shadow: none; } 10% { background: var(--accent); box-shadow: 0 0 8px rgba(255, 152, 0, .8); } 30% { background: color-mix(in srgb, var(--accent) 40%, var(--border-strong)); } }
.msgs { flex: 1; overflow-y: auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 20px; }
.msgs::-webkit-scrollbar, .tab-body::-webkit-scrollbar { width: 10px; }
.msgs::-webkit-scrollbar-thumb, .tab-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid var(--panel); }
.turn { display: flex; flex-direction: column; gap: 9px; animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.turn-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.turn-head .mark { width: 18px; height: 18px; }
.turn-head .name { font-weight: 650; color: var(--text); }
.turn-head .time { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.turn.user { align-items: flex-end; }
.turn.user .bubble { background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--text); padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 92%; white-space: pre-wrap; word-wrap: break-word; }
.turn.user .turn-head { flex-direction: row-reverse; }
.you { width: 18px; height: 18px; border-radius: 5px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.answer { color: var(--text-2); white-space: pre-wrap; word-wrap: break-word; line-height: 1.62; }
.answer strong { color: var(--text); font-weight: 650; }
.answer .li { display: block; padding-left: 16px; position: relative; }
.answer .li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.answer code { background: var(--panel-3); border: 1px solid var(--border); padding: 0 5px; border-radius: 5px; color: var(--accent-text); }
.answer.err { color: var(--err); }
.cursor { display: inline-block; width: 8px; height: 1.05em; vertical-align: -.15em; margin-left: 2px; background: var(--accent); border-radius: 1px; animation: blink 1s steps(1) infinite; box-shadow: 0 0 10px rgba(255, 152, 0, .7); }
@keyframes blink { 50% { opacity: 0; } }
.thinking-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.thinking-line .mark { width: 20px; height: 20px; }
.shimmer { background: linear-gradient(90deg, var(--faint) 0%, var(--text) 45%, var(--faint) 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* run trace */
.trace { border: 1px solid var(--border); border-radius: 12px; background: var(--code-bg); overflow: hidden; font-family: var(--mono); font-size: 12px; }
.trace-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; color: var(--muted); user-select: none; border-bottom: 1px solid transparent; }
.trace.open .trace-head { border-bottom-color: var(--border); }
.trace-head .chev { width: 14px; height: 14px; transition: transform .2s; }
.trace.open .trace-head .chev { transform: rotate(90deg); }
.trace-head .count { color: var(--text-2); }
.trace-body { display: none; padding: 6px 0; }
.trace.open .trace-body { display: block; }
.step { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 5px 12px; color: var(--text-2); position: relative; }
.step + .step::before { content: ""; position: absolute; left: 19px; top: -6px; height: 10px; width: 1px; background: var(--border-strong); }
.step .ic { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--faint); display: grid; place-items: center; }
.step.run .ic { border-color: var(--accent); background: var(--accent-soft); animation: bootp 1s infinite; }
.step.ok .ic { border-color: var(--ok); background: var(--ok-soft); }
.step.ok .ic::after { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--ok); }
.step.err .ic { border-color: var(--err); background: var(--err-soft); }
.step.err .ic::after { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--err); }
.step .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .tool { color: var(--muted); }
.step .target { color: var(--accent-text); }
.step .dur { color: var(--faint); font-size: 11px; }
.step .note { grid-column: 2 / 4; color: var(--err); font-size: 11.5px; white-space: normal; }

/* version card in chat */
.vcard { display: flex; align-items: center; gap: 12px; border: 1px solid var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), transparent); border-radius: 12px; padding: 10px 12px; animation: rise .35s var(--ease); }
.vcard .vn { font-family: var(--mono); font-size: 11px; color: var(--on-accent); background: var(--accent); border-radius: 5px; padding: 2px 7px; font-weight: 700; }
.vcard .vs { flex: 1; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chat empty state */
.chat-empty { display: flex; flex-direction: column; gap: 14px; padding: 6px 2px; }
.chat-empty .mark { width: 44px; height: 44px; }
.chat-empty h2 { font-size: 19px; }
.sugg { display: grid; gap: 8px; }
.sugg button { text-align: left; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); background: var(--panel-2); border-radius: 11px; padding: 10px 12px; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.sugg button:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.sugg button i { width: 7px; height: 7px; margin-top: 6px; border-radius: 2px; background: var(--accent); flex: none; }

/* composer */
.composer { padding: 12px 14px 14px; border-top: 1px solid var(--border); background: var(--panel); }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { padding: 4px 11px; font-size: 12px; white-space: nowrap; }
.cbox { border: 1px solid var(--border-strong); border-radius: 14px; background: var(--panel-2); transition: border-color .2s, box-shadow .2s; }
.cbox:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.cbox textarea { border: 0; background: transparent; resize: none; min-height: 52px; max-height: 220px; padding: 12px 14px 4px; font-size: 14px; box-shadow: none !important; }
.cbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 12px; }
.cbar .hint { font-size: 11.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.send { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 152, 0, .3), 0 4px 14px rgba(255, 152, 0, .3); transition: transform .1s, background .15s; }
.send:hover { background: var(--accent-hi); }
.send:active { transform: scale(.95); }
.send:disabled { opacity: .45; cursor: default; box-shadow: none; }
.send svg { width: 17px; height: 17px; }
.send.stop { background: var(--ink); color: var(--bg); box-shadow: none; }
.err-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--err); background: var(--err-soft); border-radius: 99px; padding: 2px 9px; }

/* stage */
.stage { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--panel); align-items: stretch; height: 46px; flex: none; }
.tabs button { border: 0; background: transparent; padding: 0 12px; font: inherit; font-weight: 580; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button.on svg { color: var(--accent); }
.tab-body { flex: 1; overflow: auto; min-height: 0; }
.preview-wrap { display: flex; flex-direction: column; height: 100%; }
.ptools { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); flex-wrap: wrap; }
.urlbar { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.urlbar svg { width: 13px; height: 13px; color: var(--faint); }
.pframe-outer { flex: 1; display: flex; justify-content: center; overflow: auto; min-height: 0; background-color: var(--bg); background-image: radial-gradient(var(--bg-grid) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.pframe { background: #fff; border: 0; width: 100%; height: 100%; display: block; transition: width .3s var(--ease); }
.pframe.tablet { width: 820px; margin: 18px; height: calc(100% - 36px); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-strong); }
.pframe.phone { width: 390px; margin: 18px; height: calc(100% - 36px); border-radius: 30px; box-shadow: var(--shadow-lg); border: 8px solid #050505; outline: 1px solid var(--border-strong); }
.errbar { display: flex; gap: 10px; align-items: center; padding: 8px 14px; background: var(--err-soft); color: var(--err); font-size: 13px; border-bottom: 1px solid var(--border); }
.errbar .btn { margin-left: auto; }
.pad { padding: 22px; }
.code-editor { width: 100%; height: calc(100% - 50px); border: 0; border-radius: 0; resize: none; padding: 16px 18px; background: var(--code-bg); color: var(--text-2); line-height: 1.6; tab-size: 2; box-shadow: none !important; }
.placeholder { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; }
.placeholder .mark { width: 72px; height: 72px; margin-bottom: 18px; }
.placeholder h2 { color: var(--text); margin-bottom: 6px; font-size: 19px; }

/* ------------------------------------------------------------------ modal + toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 5, 6, .6); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 40; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--border-strong); border-radius: 16px; width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal.wide { width: min(1000px, 100%); }
.modal .mh { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal .mb { padding: 20px; overflow: auto; }
.modal .mf { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--raise); color: var(--text); border: 1px solid var(--border-strong); padding: 10px 14px; border-radius: 11px; max-width: 420px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .2s var(--ease); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.toast.ok::before { background: var(--ok); } .toast.err::before { background: var(--err); }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; padding: 40px; background: radial-gradient(700px 400px at 80% 10%, rgba(255, 152, 0, .14), transparent 70%), var(--panel); }
.auth-art .big { width: 150px; height: 150px; }
.auth-art h1 { font-size: 40px; letter-spacing: -.04em; max-width: 460px; margin-top: 34px; font-weight: 680; }
.auth-art h1 em { font-style: normal; color: var(--accent); }
.auth-art p { color: var(--muted); max-width: 440px; margin-top: 12px; font-size: 15px; }
/* sign-in pitch: "Build anything" + a line alternating "on top of your Odoo." / "inside your Odoo." */
.auth-pitch h1 { display: flex; flex-direction: column; margin-top: 0; }
.rot { display: inline-grid; overflow: hidden; padding-bottom: .08em; }
.rot > span { grid-area: 1 / 1; white-space: nowrap; animation: rotA 7s cubic-bezier(.7, 0, .2, 1) infinite; }
.rot > span + span { animation-name: rotB; }
@keyframes rotA { 0%, 44% { transform: none; opacity: 1; } 50% { transform: translateY(-105%); opacity: 0; } 50.01%, 94% { transform: translateY(105%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rotB { 0%, 44% { transform: translateY(105%); opacity: 0; } 50%, 94% { transform: none; opacity: 1; } 100% { transform: translateY(-105%); opacity: 0; } }
.auth-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 460px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .ap-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); }
.auth-points .ap-ic svg { width: 16px; height: 16px; }
.auth-points strong { display: block; font-size: 14px; }
.auth-points span:not(.ap-ic) { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .rot > span + span { display: none; } }

/* two-step sign-in */
.code-in { font: 600 22px var(--mono); letter-spacing: .32em; text-align: center; max-width: 220px; height: 48px; }
.tf-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; color: var(--text-2); }
.tf-steps li::marker { color: var(--accent-text); font-weight: 700; }
.tf-qr-row { display: flex; gap: 18px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.tf-qr { width: 176px; height: 176px; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--border-strong); flex: none; }
.tf-qr svg { width: 100%; height: 100%; display: block; }
.tf-key { font-size: 14px; letter-spacing: .06em; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); word-break: break-all; user-select: all; }
.rc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.rc-grid code { font-size: 14px; letter-spacing: .08em; }

/* animated Chef Pixel signature at the bottom of the sign-in brand panel */
.cp-reveal-wrap { display: flex; flex-direction: column; gap: 6px; }
.powered-label { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cp-frame { position: relative; width: min(360px, 100%); aspect-ratio: 3.2 / 1; overflow: hidden; }
.cp-reveal { position: absolute; top: 50%; height: auto; transform: translateY(-50%); cursor: pointer; background: transparent; }
/* sized and shifted so the finished logo starts exactly at the panel's left edge, like the text above */
.cp-reveal.dark { width: 178%; left: -51.5%; mix-blend-mode: screen; }   /* black background disappears on the dark panel */
.cp-reveal.light { width: 96%; left: -9.6%; mix-blend-mode: multiply; }  /* white background disappears on the light panel */
.auth-form { display: grid; place-items: center; padding: 30px; }
.auth-form .inner { width: min(380px, 100%); }
.auth-form h2 { font-size: 22px; margin: 22px 0 4px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: flex-start; padding: 10px 12px; overflow: visible; }
  .side .brand { padding: 4px 8px; font-size: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; flex-basis: 100%; order: 3; }
  .nav-label, .side-foot .powered, .me > div, .me > svg { display: none; }
  .side-foot { border: 0; padding: 0; margin-left: auto; order: 2; }
  .me { padding: 2px; }
  .ws-menu.me-menu { left: auto; right: 0; top: calc(100% + 6px); bottom: auto; width: 240px; }
  .nav a.active::before { display: none; }
  .main { padding: 20px 16px 48px; }
  .bbody { grid-template-columns: 1fr; grid-template-rows: 52vh 1fr; }
  .chat { border-right: 0; border-bottom: 1px solid var(--border); }
  .form.two, .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 26px 20px; } .hero h1 { font-size: 28px; } .hero-mark { display: none; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
}
@media (max-width: 560px) { .form.two, .stats { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.stats + section { margin-top: 34px; }
.side-foot .seg button { padding: 5px 4px; font-size: 12px; gap: 4px; } .side-foot .seg svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ workspaces */
.ws-wrap { position: relative; margin: 0 2px 6px; }
.ws-switch { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.ws-switch:hover { border-color: var(--border-strong); background: var(--panel-3); }
.ws-switch.static { cursor: default; }
.ws-switch .wsn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-switch .wsn strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-switch .wsn span { font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.ws-switch > svg { width: 14px; height: 14px; color: var(--faint); transform: rotate(90deg); flex: none; }
.ws-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; font: 700 12px var(--display); color: #fff; background: var(--ws, #3a3a40); overflow: hidden; }
/* an uploaded logo keeps its own shape (often wide) and has no colour behind it */
.ws-logo.has-logo { background: transparent; width: auto; min-width: 28px; max-width: 72px; border-radius: 6px; }
.ws-logo.has-logo.ws-lg { width: auto; max-width: 180px; min-width: 46px; }
.ws-logo img { display: block; height: 100%; width: auto; max-width: none; object-fit: contain; }
/* fixed heights: a percentage height would let wide logos collapse to nothing */
.ws-logo.has-logo img { height: 22px; max-width: 62px; }
.ws-logo.has-logo.ws-lg img { height: 40px; max-width: 170px; }
.ws-menu .ws-logo.has-logo img { height: 18px; max-width: 48px; }
[data-theme="dark"] .ws-logo.has-logo { background: #fff; padding: 0 5px; } /* dark logos stay readable */
.ws-menu .ws-logo.has-logo { width: auto; }
.brand-row > span { flex: none; display: flex; }
.ws-logo.ws-lg { width: 46px; height: 46px; border-radius: 12px; font-size: 18px; }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow), 0 18px 40px rgba(0, 0, 0, .35); padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; animation: rise .18s var(--ease); }
.ws-menu > button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ws-menu > button:hover { background: var(--panel-3); color: var(--text); }
.ws-menu > button.on { color: var(--text); }
.ws-menu > button.on::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.ws-menu .ws-logo { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.ws-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }
.ws-menu > button > svg { width: 15px; height: 15px; margin: 0 3px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 560; padding: 9px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 7px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button svg { width: 15px; height: 15px; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.color-in { width: 46px; height: 38px; padding: 3px; border-radius: 9px; cursor: pointer; }
.ws-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.ws-card .wsc { flex: 1; min-width: 0; }
.ws-card .wsc .small { font-family: var(--mono); }
@media (max-width: 980px) { .ws-wrap { margin: 0; flex: 1 1 200px; } .ws-menu { right: auto; width: 260px; } }

/* ------------------------------------------------------------------ dashboards */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dash-item.full { grid-column: 1 / -1; }
.dash-item .view-body { min-height: 120px; }
.dash-tools { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.dash-item:hover .dash-tools { opacity: 1; }
.more-wrap { position: relative; }
.more-menu { left: auto; right: 0; width: 210px; }
.more-wrap > button svg { stroke-width: 3.2; }
.dash-tools { opacity: 1; }
.dash-item .view-head .small.mono { white-space: nowrap; }
.dash-item:not(.full) .view-head > .small.mono { display: none; }
.dash-loading { display: flex; align-items: center; gap: 10px; padding: 26px 4px; }
.page-head .conn-sel { width: auto; height: 36px; font-size: 13px; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
@media print {
  .side, .page-head .btn, .page-head select, .dash-tools, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0 !important; max-width: none; }
  body { background: #fff !important; color: #000; }
  .dash-grid { gap: 10px; }
  .view-card { break-inside: avoid; box-shadow: none; animation: none; }
  .table-wrap { max-height: none; overflow: visible; }
}

/* ------------------------------------------------------------------ getting started */
.onb { border: 1px solid var(--accent-line); border-radius: 16px; background: linear-gradient(120deg, var(--accent-soft), transparent 60%), var(--panel); padding: 18px 20px; margin-bottom: 20px; }
.onb-head { display: flex; align-items: center; gap: 12px; }
.onb-bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin: 12px 0 14px; }
.onb-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 3px; transition: width .4s var(--ease); }
.onb-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.onb-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); color: var(--text-2); text-decoration: none !important; transition: border-color .15s, transform .15s var(--ease); }
a.onb-step:hover { border-color: var(--accent-line); transform: translateY(-1px); color: var(--text); }
.onb-step .num { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: 600 12px var(--mono); background: var(--panel-3); border: 1px solid var(--border-strong); flex: none; }
.onb-step.done .num { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.onb-step.done strong { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.onb-step strong { display: block; font-size: 13.5px; color: var(--text); }
.onb-step span.small { color: var(--muted); }
.welcome { max-width: 920px; margin: 0 auto; }
.welcome .hero { margin-bottom: 18px; }
.wstep { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); margin-bottom: 12px; }
.wstep.done { opacity: .78; }
.wstep.current { border-color: var(--accent-line); box-shadow: var(--glow); }
.wstep .wn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 650 17px var(--display); background: var(--panel-3); border: 1px solid var(--border-strong); }
.wstep.done .wn { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.wstep.current .wn { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.wstep h3 { font-size: 16px; }
.wstep p { margin: 4px 0 12px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tpl-card { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); cursor: pointer; text-align: left; font: inherit; color: var(--text-2); transition: border-color .15s, transform .15s var(--ease), background .15s; }
.tpl-card:hover:not(.off) { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); color: var(--text); }
.tpl-card.off { opacity: .45; cursor: not-allowed; }
.tpl-card .tt { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); font-size: 13.5px; }
.tpl-card .tt svg { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.tpl-card .td { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.tpl-card .tg { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }
@media (max-width: 980px) { .onb-steps { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ ask mode */
.nav .new-tag { font-size: 10px; padding: 1px 6px; }
.main.ask-main { max-width: none; padding: 0; height: 100vh; display: grid; grid-template-columns: 272px 1fr; }
/* the conversations / changes list can be hidden; a button in the top bar brings it back */
.main.ask-main.panel-collapsed { grid-template-columns: 1fr; }
.main.ask-main.panel-collapsed .threads { display: none; }
.panel-show { display: none !important; }
.main.ask-main.panel-collapsed .panel-show { display: inline-flex !important; margin-left: -8px; }
.panel-hide { margin-right: -4px; }
.threads { border-right: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 70%, transparent); display: flex; flex-direction: column; min-height: 0; }
.threads-head { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 56px; border-bottom: 1px solid var(--border); flex: none; }
.thread-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.thread-item { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 9px 34px 9px 12px; border-radius: 9px; color: var(--text-2); text-decoration: none !important; border: 1px solid transparent; }
.thread-item:hover { background: var(--panel-3); }
.thread-item.on { background: var(--panel-3); border-color: var(--border-strong); color: var(--text); }
.thread-item.on::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.thread-item .tt { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .tm { font-size: 11px; color: var(--faint); font-family: var(--mono); }
.thread-item .del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--faint); cursor: pointer; opacity: 0; padding: 4px; border-radius: 6px; display: grid; place-items: center; }
.thread-item:hover .del { opacity: 1; }
.thread-item .del:hover { color: var(--err); background: var(--err-soft); }
.thread-item .del svg { width: 14px; height: 14px; }
.ask-col { display: flex; flex-direction: column; min-height: 0; height: 100vh; min-width: 0; }
.ask-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(10px); flex: none; }
.ask-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ask-title strong { font-family: var(--display); font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.ask-inner { max-width: 920px; margin: 0 auto; padding: 26px 28px 40px; display: flex; flex-direction: column; gap: 24px; }
.ask-composer { padding: 0 28px 22px; flex: none; }
.ask-composer .cbox { max-width: 864px; margin: 0 auto; box-shadow: var(--shadow); }
.ask-composer .conn-sel { width: auto; max-width: 220px; height: 32px; font-size: 12px; padding: 0 28px 0 10px; }
.ask-composer .hint svg { width: 13px; height: 13px; }
.ask-empty { max-width: 780px; margin: 7vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ask-empty .ask-mark { width: 76px; height: 76px; margin-bottom: 10px; }
.ask-empty h1 { font-size: 36px; font-weight: 680; letter-spacing: -.035em; }
.ask-empty h1 em { font-style: normal; color: var(--accent); }
.ask-empty > p { max-width: 600px; font-size: 15px; }
.sugg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; margin-top: 18px; text-align: left; }
.sugg-grid button { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); background: var(--panel); border-radius: 13px; color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .15s, transform .15s var(--ease), background .15s; text-align: left; }
.sugg-grid button:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); transform: translateY(-1px); }
.sugg-grid .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.views { display: flex; flex-direction: column; gap: 12px; }
.views:empty { display: none; }
.view-card { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow); animation: rise .35s var(--ease); }
.view-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.view-head .vic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.view-head .vic svg { width: 15px; height: 15px; }
.view-head .vt { display: flex; flex-direction: column; min-width: 0; }
.view-head .vt strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-head .vm { font-family: var(--mono); font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-body { padding: 14px 16px; }
.table-wrap { max-height: 380px; overflow: auto; margin: -14px -16px; }
.table-wrap table.t th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.table-wrap table.t td, .table-wrap table.t th { padding: 8px 14px; white-space: nowrap; font-size: 13px; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 32%) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.hbar .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .track { height: 10px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.hbar .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 3px; box-shadow: 0 0 10px rgba(255, 152, 0, .35); animation: grow .6s var(--ease); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.hbar .hv { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; color: var(--text); }
.cols { display: flex; align-items: stretch; height: 230px; gap: 6px; padding-top: 6px; }
.colw { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; gap: 5px; }
.colbar { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-radius: 4px 4px 1px 1px; box-shadow: 0 0 12px rgba(255, 152, 0, .25); animation: rise2 .6s var(--ease); transform-origin: bottom; }
@keyframes rise2 { from { transform: scaleY(0); } }
.cv { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.cl { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cols.dense .cl { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 70px; }
.cols.dense .cv { display: none; }
svg.line { width: 100%; height: 220px; display: block; }
svg.line .grid { stroke: var(--border); stroke-width: 1; }
svg.line .dot { fill: var(--panel); stroke: #ff9800; stroke-width: 2; }
.lx { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 20px; gap: 4px; }
.lx span { white-space: nowrap; }
.pie { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pie svg { flex: none; width: 180px; height: 180px; }
.pie .pt { font: 700 20px var(--display); fill: var(--text); }
.pie .ps { font: 10px var(--mono); fill: var(--faint); letter-spacing: .1em; text-transform: uppercase; }
.legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 200px; }
.lg { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; }
.lg .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.lg .lv { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.metric { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--panel-2); overflow: hidden; }
.metric::after { content: ""; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.metric .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.metric .v { font-family: var(--display); font-size: 28px; font-weight: 680; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.metric .m { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-top: 2px; }
@media (max-width: 980px) {
  .main.ask-main { grid-template-columns: 1fr; height: auto; }
  .main.ask-main .panel-show, .main.ask-main .panel-hide { display: none !important; } /* the list is already hidden on small screens */
  .threads { display: none; }
  .ask-col { height: calc(100vh - 110px); }
  .sugg-grid { grid-template-columns: 1fr; }
  .ask-composer .hint { display: none; }
}

/* ------------------------------------------------------------------ inside odoo */
.toolbox { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.toolbox .chip { cursor: default; font-size: 12px; padding: 4px 11px; }
.toolbox .chip:hover { background: var(--panel-2); border-color: var(--border); color: var(--muted); }
.plan-card { border: 1px solid var(--accent-line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow), 0 0 0 4px rgba(255, 152, 0, .05); overflow: hidden; animation: rise .35s var(--ease); }
.plan-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border-bottom: 1px solid var(--border); }
.plan-head h2 { font-size: 17px; margin-top: 6px; }
.plan-summary { padding: 14px 18px 4px; color: var(--text-2); white-space: pre-wrap; line-height: 1.6; }
.plan-summary .li, .plan-note .li { display: block; padding-left: 16px; position: relative; }
.plan-summary .li::before, .plan-note .li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.psteps { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pstep { border: 1px solid var(--border); border-radius: 11px; background: var(--panel-2); overflow: hidden; }
.pstep-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; cursor: pointer; }
.pstep-row:hover { background: var(--panel-3); }
.pnum { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 600 11px var(--mono); background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--muted); flex: none; }
.pic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.pic svg { width: 15px; height: 15px; }
.pmain { flex: 1; min-width: 0; }
.ptitle { font-weight: 600; font-size: 13.5px; }
.pwhy { font-size: 12.5px; color: var(--muted); }
.pchev svg { width: 14px; height: 14px; color: var(--faint); transition: transform .2s; }
.step-detail { padding: 4px 12px 12px 72px; display: flex; flex-direction: column; gap: 8px; }
.codeblock { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--code-bg); }
.codeblock .cbh { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 6px 10px; border-bottom: 1px solid var(--border); }
.codeblock pre { margin: 0; padding: 10px 12px; font: 12px/1.55 var(--mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.kvline { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.plan-note { margin: 4px 18px 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--text-2); font-size: 13px; white-space: pre-wrap; }
.plan-note strong { display: block; color: var(--warn); margin-bottom: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.plan-note.test { background: var(--ok-soft); }
.plan-note.test strong { color: var(--ok); }
.apply-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--panel-2); flex-wrap: wrap; }
.apply-bar select { width: auto; max-width: 300px; height: 34px; padding: 0 30px 0 10px; font-size: 13px; }
.applies { border-top: 1px solid var(--border); padding: 6px 18px 10px; }
.apply-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; font-size: 13px; border-bottom: 1px dashed var(--border); }
.apply-row:last-child { border-bottom: 0; }
.apply-err { flex-basis: 100%; font: 12px/1.5 var(--mono); color: var(--err); background: var(--err-soft); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }

/* ------------------------------------------------------------------ agents v2 */
.agent-section { gap: 14px; }
.agent-section h2 { font-size: 15px; }
.dest-row { gap: 8px; }
.dest-row select { width: auto; }
.block-row { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.channel-card { gap: 12px; }
.chat-row { padding: 6px 0; border-bottom: 1px dashed var(--border); gap: 8px; }
.chat-row:last-child { border-bottom: 0; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }

/* ================================================================== motion
   Techy, but calm: everything below is switched off when the system asks for reduced motion
   (see the prefers-reduced-motion rule), and only transform / opacity are animated. */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* ambient: a slow glow drifting behind the pixel grid, and a scan line crossing it now and then */
body::before { content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background: radial-gradient(38% 32% at 22% 28%, rgba(255, 152, 0, .075), transparent 70%), radial-gradient(30% 28% at 78% 72%, rgba(255, 152, 0, .05), transparent 70%);
  animation: fxDrift 32s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 160px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 152, 0, .045) 55%, transparent); animation: fxScan 14s linear infinite; }
[data-theme="light"] body::before { opacity: .55; }
[data-theme="light"] body::after { opacity: .5; }
@keyframes fxDrift { to { transform: translate3d(7%, -6%, 0) rotate(10deg); } }
@keyframes fxScan { 0% { transform: translateY(-180px); } 55%, 100% { transform: translateY(110vh); } }
.side { backdrop-filter: none; background: color-mix(in srgb, var(--panel) 94%, transparent); } /* no re-blur while the glow moves */

/* page changes (View Transitions): the side bar stays still, the page glides out and in */
.side { view-transition-name: side; }
.main { view-transition-name: page; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(side), ::view-transition-old(side), ::view-transition-new(side) { animation: none; }
::view-transition-group(page) { animation-duration: .42s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(page) { animation: fxPageOut .2s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(page) { animation: fxPageIn .46s cubic-bezier(.2, .7, .2, 1) .06s both; }
@keyframes fxPageOut { to { opacity: 0; transform: translateY(-8px) scale(.992); filter: blur(2px); } }
@keyframes fxPageIn { from { opacity: 0; transform: translateY(14px) scale(.992); filter: blur(3px); } }
/* theme change: only the whole page, revealed in a circle from the click (see fx.js) */
.vt-theme .side, .vt-theme .main { view-transition-name: none; }
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* cards rise one after another */
.fx-in { animation: fxUp .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 34ms + 80ms); }
@keyframes fxUp { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* titles wipe in through a soft mask (no reflow, unlike changing letters) */
.fx-wipe { -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%); mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; animation: fxWipe .75s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fxWipe { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; transform: translateX(-6px); } to { -webkit-mask-position: 0 0; mask-position: 0 0; transform: none; } }

/* cards: a soft light glides after the cursor; it is its own GPU layer, moved with transform only */
.card, .view-card, .tpl-card, .stat, .wstep, .onb-step, .sugg-grid button, .metric, .ws-card { position: relative; }
.fx-host { isolation: isolate; }
.fx-light { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .35s ease; }
.fx-light i { position: absolute; left: 0; top: 0; width: 520px; height: 520px; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, rgba(255, 152, 0, .13), rgba(255, 152, 0, .045) 55%, transparent); }
[data-theme="light"] .fx-light i { background: radial-gradient(closest-side, rgba(255, 152, 0, .16), rgba(255, 152, 0, .05) 55%, transparent); }
.fx-hot > .fx-light { opacity: 1; }
.fx-hot { border-color: var(--border-strong); will-change: transform; } /* a GPU layer only while hovered, so text stays crisp */

/* dialogs close softly */
.modal-bg.closing { animation: fxFadeOut .17s ease forwards; }
.modal-bg.closing .modal { animation: fxPopOut .17s ease forwards; }
@keyframes fxFadeOut { to { opacity: 0; } }
@keyframes fxPopOut { to { opacity: 0; transform: translateY(6px) scale(.985); } }

/* buttons: light sweep on hover, ripple on click */
.btn, .chip, .seg button, .tpl-card, .sugg-grid button, .onb-step, .ws-switch, .me { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, .5) 48%, transparent 68%); transform: translateX(-130%); }
.btn.primary:hover::after { transform: translateX(130%); transition: transform .75s var(--ease); }
.fx-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: fxRipple .65s var(--ease) forwards; }
.btn.primary .fx-ripple { background: #fff; opacity: .35; }
@keyframes fxRipple { to { transform: scale(1); opacity: 0; } }

/* prompt boxes: an orbiting light border while you type */
.command, .cbox { position: relative; }
.command::before, .cbox::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, rgba(255, 152, 0, .9) 75%, #ffd28a 84%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s; animation: fxSpin 3.2s linear infinite; }
.command:focus-within::before, .cbox:focus-within::before { opacity: 1; }
@keyframes fxSpin { to { --ang: 360deg; } }

/* headline accent: a slow shine across "Odoo" */
.hero h1 em, .ask-empty h1 em, .auth-art h1 em { background: linear-gradient(100deg, var(--accent) 20%, #ffe0a8 45%, var(--accent) 70%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: fxShine 5s ease-in-out infinite; }
@keyframes fxShine { 0%, 15% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

/* the pixel logo: assembles on arrival, ripples on hover */
.mark rect { transform-box: fill-box; transform-origin: center; }
.fx-boot .brand .mark .k, .fx-boot .hero-mark .k { animation: fxPixIn .5s var(--ease) both; }
.fx-boot .brand .mark .o, .fx-boot .hero-mark .o { animation: fxPixO .7s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
.brand:hover .mark .k { animation: fxPixWave .6s var(--ease) both; }
.mark .k:nth-of-type(2) { animation-delay: 40ms; } .mark .k:nth-of-type(3) { animation-delay: 80ms; } .mark .k:nth-of-type(4) { animation-delay: 120ms; }
.mark .k:nth-of-type(5) { animation-delay: 160ms; } .mark .k:nth-of-type(6) { animation-delay: 200ms; } .mark .k:nth-of-type(7) { animation-delay: 240ms; } .mark .k:nth-of-type(8) { animation-delay: 280ms; }
@keyframes fxPixIn { from { opacity: 0; transform: scale(.2); } }
@keyframes fxPixO { from { opacity: 0; transform: translate(40%, -40%) scale(.3); } }
@keyframes fxPixWave { 40% { transform: scale(.72); opacity: .6; } }

/* menu: icons lean in, the active marker breathes, live badges pulse */
.nav a svg { transition: transform .2s var(--ease), color .2s; }
.nav a:hover svg { transform: translateX(2px) scale(1.08); }
.nav a.active::before { animation: fxBreath 2.6s ease-in-out infinite; }
@keyframes fxBreath { 50% { box-shadow: 0 0 18px rgba(255, 152, 0, .95); } }
.badge.live::before { animation: fxPulse 1.9s ease-out infinite; }
@keyframes fxPulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }

/* toasts: a countdown line */
.toast { position: relative; overflow: hidden; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: fxLife var(--life, 3.5s) linear forwards; }
.toast.ok::after { background: var(--ok); } .toast.err::after { background: var(--err); }
@keyframes fxLife { to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .command::before, .cbox::before, .btn.primary::after, .fx-ripple, .fx-light { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .hero h1 em, .ask-empty h1 em, .auth-art h1 em { color: var(--accent); background: none; }
}

/* Themed open list for every <select> (public/js/dropdown.js) */
select.dd-open { border-color: var(--accent); box-shadow: var(--glow); }
.dd-menu { position: fixed; z-index: 70; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow), 0 18px 40px rgba(0, 0, 0, .28); padding: 6px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overscroll-behavior: contain; transform-origin: top center; animation: dd-in .16s var(--ease); }
.dd-menu.up { transform-origin: bottom center; }
.dd-menu.closing { animation: dd-out .12s ease forwards; pointer-events: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dd-menu.up { animation-name: dd-in-up; }
@keyframes dd-in-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes dd-out { to { opacity: 0; transform: scale(.98); } }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; line-height: 1.35; cursor: pointer; user-select: none; }
.dd-opt.active { background: var(--panel-3); color: var(--text); }
.dd-opt.sel { color: var(--text); font-weight: 600; }
.dd-opt.sel::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.dd-opt.off { opacity: .45; cursor: default; }
.dd-opt.off.active { background: transparent; }
.dd-group { padding: 8px 10px 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .dd-menu, .dd-menu.closing { animation: none; } }

/* Invite link pop-up */
.link-box { display: flex; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--panel-2); }
.link-box input.link-out { border: 0; background: transparent; box-shadow: none; font-family: var(--mono); font-size: 12.5px; color: var(--text); padding: 6px 8px; min-width: 0; flex: 1; text-overflow: ellipsis; }
.link-box input.link-out:focus { box-shadow: none; }
.link-box .btn { flex: none; }
.msg-out { font-size: 13.5px; line-height: 1.55; resize: vertical; min-height: 220px; background: var(--panel-2); white-space: pre-wrap; }
