/* Kandari dashboard. One accent, neutral greys, 4/8 px spacing grid, soft depth. */
/* Fonts: same stack as the school app. Jonaki Numerals = Noto Sans Bengali digits, Bengali digits at full size and Latin digits at 91%. */
@font-face { font-family: "Hind Siliguri"; font-weight: 400; font-display: swap; src: url(/fonts/HindSiliguri-Regular.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Hind Siliguri"; font-weight: 500; font-display: swap; src: url(/fonts/HindSiliguri-Medium.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Hind Siliguri"; font-weight: 600; font-display: swap; src: url(/fonts/HindSiliguri-SemiBold.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Hind Siliguri"; font-weight: 700; font-display: swap; src: url(/fonts/HindSiliguri-Bold.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Baloo Da 2"; font-weight: 400 800; font-display: swap; src: url(/fonts/BalooDa2-VF.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Noto Sans Bengali"; font-weight: 400 700; font-display: swap; src: url(/fonts/NotoSansBengali-VF.ttf) format("truetype"); unicode-range: U+20-7E, U+A0-FF, U+980-9FF, U+200C-200D, U+2010-2027, U+2212, U+25CC; }
@font-face { font-family: "Jonaki Numerals"; font-weight: 100 900; font-display: swap; src: url(/fonts/NotoSansBengali-VF.ttf) format("truetype"); unicode-range: U+9E6-9EF; }
@font-face { font-family: "Jonaki Numerals"; font-weight: 100 900; font-display: swap; size-adjust: 91%; src: url(/fonts/NotoSansBengali-VF.ttf) format("truetype"); unicode-range: U+30-39; }
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #e9ebef;
  --line-2: #f1f2f5;
  --text: #0e1116;
  --text-2: #4a5160;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79, 70, 229, .18);
  --ok: #047857;   --ok-soft: #e7f7f0;
  --warn: #b45309; --warn-soft: #fdf3e2;
  --bad: #e11d48;  --bad-soft: #fdecf0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 1px rgba(16, 24, 40, .03);
  --shadow-2: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 30px -12px rgba(16, 24, 40, .14);
  --shadow-3: 0 24px 60px -20px rgba(16, 24, 40, .35), 0 2px 6px rgba(16, 24, 40, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 248px;
  --font: "Jonaki Numerals", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Jonaki Numerals", "Baloo Da 2", "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px 14px;
  background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; letter-spacing: -.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; box-shadow: 0 6px 16px -6px var(--accent); overflow: hidden; }
.brand .logo img { width: 30px; height: 30px; display: block; }
.brand .logo svg { width: 17px; height: 17px; stroke: #fff; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: -2px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; opacity: .85; }
.nav a:hover { background: var(--line-2); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a .badge { margin-left: auto; }
.nav .ws-link { padding-left: 12px; font-size: 13.5px; }
.nav .ws-link .dot { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: rgba(246, 247, 249, .82); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs svg { width: 14px; height: 14px; stroke: currentColor; }
.top .grow { flex: 1; }
.search-btn {
  display: flex; align-items: center; gap: 10px; min-width: 260px; padding: 8px 10px 8px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); cursor: pointer; box-shadow: var(--shadow-1);
  transition: border-color .2s, box-shadow .2s;
}
.search-btn:hover { border-color: #d9dce3; box-shadow: var(--shadow-2); }
.search-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.search-btn kbd { margin-left: auto; }
kbd { font: 500 11px/1 var(--font); padding: 4px 6px; border-radius: 6px; background: var(--line-2); color: var(--text-2); border: 1px solid var(--line); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.btn.menu-btn { display: none; }

.page { padding: 8px 28px 48px; max-width: 1360px; width: 100%; animation: rise .45s var(--ease) both; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 10px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.025em; margin: 0; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card.pad { padding: 18px 20px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .tools { margin-left: auto; display: flex; gap: 6px; }
.card-b { padding: 0 20px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
hr.sep { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1);
  transition: transform .12s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { border-color: #d9dce3; box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(79, 70, 229, .3), 0 8px 18px -10px var(--accent); }
.btn.primary:hover { background: #4338ca; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .spin { width: 15px; height: 15px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--text-2); }
.badge.accent { background: var(--accent); color: #fff; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.soft { background: var(--accent-soft); color: var(--accent); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: #c7cbd3; flex: none; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.warn { background: #f59e0b; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); animation: pulse 2s infinite; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi .label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .label svg { width: 15px; height: 15px; stroke: currentColor; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; line-height: 1.1; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

/* business cards */
.biz { padding: 18px 20px 14px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; position: relative; overflow: hidden; }
.biz:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #dfe2e8; }
.biz .head { display: flex; align-items: center; gap: 10px; }
.biz .avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; }
.biz h3 { margin: 0; font-size: 15.5px; letter-spacing: -.01em; }
.biz .site { color: var(--muted); font-size: 12.5px; }
.biz .metrics { display: flex; gap: 22px; margin: 16px 0 6px; }
.biz .metrics .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.biz .metrics .k { font-size: 12px; color: var(--muted); }
.biz .spark { height: 54px; margin: 0 -4px; }
.biz .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); transition: border-color .2s, color .2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.biz .warnline { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 11px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500; }
.biz .warnline svg, .note svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }

/* charts */
.chart { position: relative; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .area-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease) forwards; }
.fade-area { opacity: 0; animation: fadein .9s .25s var(--ease) forwards; }
.tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); padding: 7px 10px; border-radius: 9px; background: var(--text); color: #fff; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow-3); opacity: 0; transition: opacity .12s; margin-top: -10px; }
.tip.on { opacity: 1; }
.cross { stroke: #d4d7de; stroke-dasharray: 3 3; }

/* lists + tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-2); min-width: 0; }
.list li:first-child { border-top: 0; }
.list li.click { cursor: pointer; transition: background .15s; }
.list li.click:hover { background: var(--surface-2); }
.bar { position: relative; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; flex: none; width: 90px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: left; animation: grow .9s var(--ease) both; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
table.t td { padding: 11px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; transition: background .15s; }
table.t tr.click:hover td { background: var(--surface-2); }
.scroll-x { overflow-x: auto; }

/* empty + skeleton + notes */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; display: grid; place-items: center; background: var(--line-2); }
.empty .ico svg { width: 20px; height: 20px; stroke: var(--muted); }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.sk { border-radius: 8px; background: linear-gradient(90deg, #eef0f3 0%, #f6f7f9 50%, #eef0f3 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: #3730a3; font-size: 13px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note code, .md code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 5px; }

/* approvals */
.approval { padding: 18px 20px; animation: rise .35s var(--ease) both; }
.approval h4 { margin: 0 0 4px; font-size: 15px; }
.approval .body { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 13.5px; color: var(--text-2); max-height: 260px; overflow: auto; }
.approval textarea { width: 100%; min-height: 120px; }
.approval.leave { animation: leave .35s var(--ease) forwards; }

/* events feed */
.feed li { align-items: flex-start; }
.feed .icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--line-2); }
.feed .icon svg { width: 15px; height: 15px; stroke: var(--text-2); }
.feed .icon.bad { background: var(--bad-soft); } .feed .icon.bad svg { stroke: var(--bad); }
.feed .icon.ok { background: var(--ok-soft); } .feed .icon.ok svg { stroke: var(--ok); }
.feed .icon.warn { background: var(--warn-soft); } .feed .icon.warn svg { stroke: var(--warn); }
.feed li.new { animation: slidein .5s var(--ease) both; background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }

/* workflow pipeline */
.pipe { list-style: none; margin: 0; padding: 4px 20px 18px; position: relative; }
.pipe li { position: relative; display: flex; gap: 12px; padding: 8px 0; animation: rise .4s var(--ease) both; }
.pipe li::before { content: ""; position: absolute; left: 15px; top: 38px; bottom: -8px; width: 2px; background: var(--line); }
.pipe li:last-child::before { display: none; }
.pipe .node { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); z-index: 1; }
.pipe .node svg { width: 15px; height: 15px; stroke: var(--text-2); }
.pipe .node.ai { background: linear-gradient(135deg, #eef0ff, #f5edff); border-color: #dcd9fb; } .pipe .node.ai svg { stroke: var(--accent); }
.pipe .node.approve { background: var(--warn-soft); border-color: #f6dfb4; } .pipe .node.approve svg { stroke: var(--warn); }
.pipe .node.send { background: var(--ok-soft); border-color: #c9ecdc; } .pipe .node.send svg { stroke: var(--ok); }
.pipe .what { min-width: 0; padding-top: 5px; }
.pipe .what b { font-weight: 600; font-size: 13.5px; }
.pipe .what div { color: var(--muted); font-size: 12.5px; }
.pipe .nest { margin: 6px 0 0 6px; padding-left: 14px; border-left: 2px dashed var(--line); }
.pipe .nest .pipe { padding: 0; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #d7dae1; cursor: pointer; transition: background .2s var(--ease); flex: none; border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }
.seg { display: inline-flex; padding: 3px; background: var(--line-2); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* memory */
.mem { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.tree a { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.tree a svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }
.tree a:hover { background: var(--line-2); }
.tree a.on { background: var(--accent-soft); color: var(--accent); }
.md { line-height: 1.7; color: var(--text-2); }
.md h1, .md h2, .md h3 { color: var(--text); letter-spacing: -.015em; margin: 1.1em 0 .4em; line-height: 1.3; }
.md h1 { font-size: 21px; margin-top: 0; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md ul { padding-left: 20px; } .md li { margin: 3px 0; }
.md pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; }

/* overlays: palette, modal, toasts */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 25, .28); backdrop-filter: blur(3px); display: grid; place-items: start center; padding-top: 12vh; animation: fadein .18s ease both; }
.palette, .modal { width: min(640px, calc(100vw - 32px)); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-3); border: 1px solid var(--line); overflow: hidden; animation: pop .22s var(--ease) both; }
.palette .q { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette .q svg { width: 18px; height: 18px; stroke: var(--muted); }
.palette .q input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.palette li .k { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.palette li.sel { background: var(--accent-soft); }
.palette li svg { width: 16px; height: 16px; stroke: var(--text-2); }
.palette .out { border-top: 1px solid var(--line); max-height: 40vh; overflow: auto; padding: 12px 16px; background: var(--surface-2); }
.palette .group { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.modal .mh { padding: 18px 20px 6px; } .modal .mh h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.modal .mb { padding: 10px 20px; max-height: 62vh; overflow: auto; }
.modal .mf { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--text); color: #fff; box-shadow: var(--shadow-3); animation: toastin .35s var(--ease) both; font-size: 13.5px; }
.toast svg { width: 16px; height: 16px; stroke: #a5f3c9; flex: none; }
.toast.bad svg { stroke: #fda4af; }
.toast.out { animation: toastout .3s var(--ease) forwards; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 20% -10%, #e8e9ff 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, #f1e9ff 0%, transparent 55%), var(--bg); }
.login .card { width: min(420px, 100%); padding: 30px; box-shadow: var(--shadow-2); animation: pop .4s var(--ease) both; }
.login h1 { font-size: 22px; letter-spacing: -.02em; margin: 18px 0 6px; }

.spin { animation: spin 1s linear infinite; }
.boot-spin { width: 28px; height: 28px; margin: 20px auto 14px; border-radius: 50%; border: 3px solid var(--line, rgba(128,128,128,.25)); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(5,150,105,.45); } 70% { box-shadow: 0 0 0 7px rgba(5,150,105,0); } 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } }
@keyframes leave { to { opacity: 0; transform: translateX(24px); height: 0; padding: 0; margin: 0; } }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.stagger > * { animation: rise .45s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; } .stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(n+6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .draw { stroke-dashoffset: 0; } .fade-area { opacity: 1; } }

/* responsive */
@media (max-width: 1100px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-3); }
  .shell.menu .side { transform: none; }
  .shell.menu::after { content: ""; position: fixed; inset: 0; z-index: 65; background: rgba(15,18,25,.3); }
  .btn.menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; }
  .page { padding: 4px 16px 40px; }
  .search-btn { min-width: 0; } .search-btn span, .search-btn kbd { display: none; }
  .g2, .g3, .mem { grid-template-columns: 1fr; }
  .live .txt { display: none; }
}

/* ---------- assistant (chat) ---------- */
.page.chatpage { max-width: none; padding: 0; height: calc(100dvh - 67px); display: flex; flex-direction: column; }
.page.chatpage > .page-head { padding: 8px 28px 0; }
.page.chatpage > .card { margin: 0 28px; }
.chat-mbar { display: none; }
.chat-wrap { position: relative; flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: 260px minmax(0, 1fr); border-top: 1px solid var(--line); }
.chat-wrap.with-right { grid-template-columns: 260px minmax(0, 1fr) 300px; }
.chat-side { border-right: 1px solid var(--line); background: var(--surface); padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chat-side .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chat-side .seg svg { width: 14px; height: 14px; stroke: currentColor; }
.chat-side > .btn.primary { height: auto; padding: 12px 16px; border-radius: 11px; }
.chat-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.chat-list-bar { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.chat-list-bar:empty { display: none; }
.chat-list-bar .btn.sm { padding: 4px 8px; }
.chat-list-bar .btn.danger { color: var(--bad); }
.chat-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; transition: background .15s; cursor: pointer; }
.chat-item:hover { background: var(--line-2); }
.chat-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.chat-item.picked { background: var(--accent-soft); color: var(--accent); }
.chat-item .chk { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 5px; color: #fff; }
.chat-item .chk.on { background: var(--accent); border-color: var(--accent); }
.chat-item .chk svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 3; }
.chat-del { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: -4px; border-radius: 6px; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.chat-item:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { background: var(--line); color: var(--bad); }
.chat-del svg { width: 14px; height: 14px; stroke: currentColor; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px); }
.chat-head h3 { margin: 0; font-size: 15px; cursor: text; min-width: 0; }
.chat-head .badge svg { width: 12px; height: 12px; stroke: currentColor; }
.chat-head .grow, .row .grow { flex: 1; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px 20px 12px; }
.thread { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; animation: rise .35s var(--ease) both; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { max-width: 78%; background: var(--accent); color: #fff; padding: 11px 15px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; box-shadow: 0 6px 18px -10px var(--accent); line-height: 1.55; }
.msg.ai .abody { flex: 1; min-width: 0; }
.orb-sm, .orb-lg { flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #7c3aed); box-shadow: 0 6px 16px -8px var(--accent); }
.orb-sm { width: 30px; height: 30px; border-radius: 10px; }
.orb-sm svg { width: 16px; height: 16px; stroke: #fff; }
.orb-lg { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 16px; animation: pop .5s var(--ease) both; }
.orb-lg svg { width: 26px; height: 26px; stroke: #fff; }
.chat-md { color: var(--text); line-height: 1.65; }
.chat-md > :first-child { margin-top: 0; }
.chat-md p { margin: .5em 0; }
.chat-md h2, .chat-md h3, .chat-md h4 { font-size: 15px; margin: 1em 0 .3em; }
.chat-md pre { background: #0f1220; color: #e7e9f3; border: 0; border-radius: 12px; padding: 14px 16px; font-size: 12.5px; }
.chat-md table.t { font-size: 13px; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.chat-md table.t th, .chat-md table.t td { padding: 7px 12px; }
.chat-md blockquote { margin: .6em 0; padding: 6px 12px; border-left: 3px solid var(--accent-2); color: var(--text-2); background: var(--surface); border-radius: 0 8px 8px 0; }
.chat-md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md ol { padding-left: 22px; }
.typing { display: inline-flex; align-items: center; gap: 5px; padding: 10px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b9bcc7; animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.steps { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.steps summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); list-style: none; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary svg { width: 14px; height: 14px; stroke: var(--ok); }
.steps ul { list-style: none; margin: 0; padding: 4px 12px 10px; border-top: 1px solid var(--line-2); }
.steps li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; min-width: 0; flex-wrap: wrap; }
.steps li .st svg { width: 13px; height: 13px; stroke: var(--ok); }
.steps li.err .st svg { stroke: var(--bad); }
.steps li.run .st svg { stroke: var(--accent); }
.steps li .ell { flex: 1; min-width: 0; }
.err { color: var(--bad); width: 100%; }
.meta { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.chat-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-align: center; animation: rise .35s var(--ease) both; }
.chat-note svg { width: 13px; height: 13px; stroke: currentColor; }
.action-card { padding: 14px 16px; border-left: 3px solid #f59e0b; animation: pop .3s var(--ease) both; }
.action-card.done { border-left-color: var(--ok); }
.action-card.rejected, .action-card.failed { border-left-color: var(--bad); }
.action-card .row svg { width: 16px; height: 16px; stroke: currentColor; }
.action-card .asum { white-space: pre-wrap; font: 13px/1.55 var(--font); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0; max-height: 220px; overflow: auto; }
.changes { padding: 12px 14px; margin-top: 10px; }
.changes .row svg { width: 15px; height: 15px; stroke: currentColor; }
.changes ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.changes li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.composer { padding: 10px 20px 16px; }
.composer-box { max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow-2); transition: border-color .2s, box-shadow .2s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-2); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; line-height: 1.5; padding: 6px 0; max-height: 220px; }
.composer .send { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--accent); display: grid; place-items: center; cursor: pointer; transition: transform .12s var(--ease), background .2s; flex: none; }
.composer .send:hover { background: #4338ca; }
.composer .send:active { transform: scale(.94); }
.composer .send svg { width: 17px; height: 17px; stroke: #fff; }
.composer .send.stop { background: var(--text); }
.composer .mic { position: relative; width: 38px; height: 38px; border-radius: 11px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s, color .2s; }
.composer .mic:hover { background: var(--accent-ring); color: var(--accent); }
.composer .mic svg { width: 18px; height: 18px; stroke: currentColor; }
.composer .mic.listening { background: #dc2626; color: #fff; animation: mic-pulse 1.4s ease-out infinite; }
.composer .mic.listening svg { fill: currentColor; width: 14px; height: 14px; }
.composer .mic.busy { color: var(--accent); cursor: pointer; }
.composer .mic.busy svg { animation: spin .9s linear infinite; }
.composer .mic.speaking { background: var(--accent); color: #fff; }
.composer .mic.live-btn.on { background: var(--ok, #047857); color: #fff; animation: mic-pulse 1.4s ease-out infinite; }
.live-bar .live-line { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-bar .live-line.ai { color: var(--muted); }
.live-bar .live-line:empty { display: none; }
.talk-bar { max-width: 820px; margin: 0 auto 8px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); cursor: default; }
.talk-bar.speaking { cursor: pointer; border-color: var(--accent); }
.talk-bar[hidden] { display: none; }
.talk-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.talk-mid b { font-size: 12.5px; }
.talk-text { font-size: 14px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.talk-orb { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; grid-auto-flow: column; place-content: center; gap: 3px; background: var(--accent-ring); }
.talk-orb i { width: 4px; height: 8px; border-radius: 2px; background: var(--accent); }
.talk-bar.listening .talk-orb, .talk-bar.hearing .talk-orb { background: rgba(220, 38, 38, .12); }
.talk-bar.listening .talk-orb i, .talk-bar.hearing .talk-orb i { background: #dc2626; }
.talk-bar.hearing .talk-orb i, .talk-bar.speaking .talk-orb i { animation: talk-wave .9s ease-in-out infinite; }
.talk-orb i:nth-child(2) { animation-delay: .15s !important; }
.talk-orb i:nth-child(3) { animation-delay: .3s !important; }
.talk-bar.thinking .talk-orb i, .talk-bar.working .talk-orb i { animation: talk-dot 1.2s ease-in-out infinite; height: 4px; }
@keyframes talk-wave { 0%, 100% { height: 6px; } 50% { height: 20px; } }
@keyframes talk-dot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.spoken { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-ring); font-size: 14.5px; line-height: 1.5; }
.spoken svg { width: 15px; height: 15px; stroke: var(--accent); flex: none; margin-top: 3px; }
.msg.user .said svg { width: 12px; height: 12px; stroke: currentColor; opacity: .7; margin-right: 6px; vertical-align: -1px; }
.choices { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-width: 560px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.choice:active:not(:disabled) { transform: scale(.995); }
.choice .cnum { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.choice .ctext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.choice > svg { width: 16px; height: 16px; flex: none; opacity: .4; }
.choice.other { background: transparent; border-style: dashed; }
.choices.locked .choice { cursor: default; opacity: .5; }
.choices.locked .choice.other { display: none; }
.choices.locked .choice.chosen { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.choices.locked .choice.chosen .cnum { color: #fff; background: var(--accent); }
.say-btn { width: 26px; height: 26px; padding: 0; margin-right: 6px; }
.say-btn.on { color: var(--accent); background: var(--accent-ring); }
.say-btn svg { width: 14px; height: 14px; }
@keyframes mic-pulse { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 100% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }
.composer-hint { max-width: 820px; margin: 7px auto 0; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.composer-hint svg { width: 12px; height: 12px; stroke: currentColor; }
/* Permission mode: the amber chip is the loud one, Normal stays quiet */
.perm-wrap { position: relative; }
.perm-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; }
.perm-chip:hover { border-color: #d9dce3; box-shadow: var(--shadow-2); }
.perm-chip b { font-weight: 600; color: var(--text); }
.perm-chip svg { width: 12px; height: 12px; stroke: currentColor; flex: none; }
.perm-chip.on { background: linear-gradient(135deg, #fff4d6, #ffe7b0); border-color: #f0b43c; color: #92400e; box-shadow: 0 0 0 3px rgba(240, 180, 60, .18); animation: permPulse 2.4s ease-in-out infinite; }
.perm-chip.on b { color: #7c2d12; }
.perm-left { font-size: 10.5px; opacity: .8; }
.perm-pop[hidden], .perm-banner[hidden] { display: none; }
@keyframes permPulse { 50% { box-shadow: 0 0 0 5px rgba(240, 180, 60, .08); } }
.perm-panel { display: grid; gap: 6px; max-width: 520px; }
.perm-pop { position: absolute; left: 0; bottom: 34px; z-index: 30; width: 330px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-3, 0 18px 40px -12px rgba(16, 24, 40, .3)); display: grid; gap: 6px; }
.perm-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.perm-opt:hover { background: var(--bg-soft, #f6f7fb); }
.perm-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.perm-opt.bp { border-color: #f0b43c; background: #fffaf0; }
.perm-opt.bp.sel { background: linear-gradient(135deg, #fff4d6, #ffe7b0); box-shadow: 0 0 0 2px rgba(240, 180, 60, .35); }
.perm-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.perm-opt.bp .perm-ic { background: #ffe7b0; color: #b45309; }
.perm-ic svg { width: 14px; height: 14px; stroke: currentColor; }
.perm-tx { display: grid; gap: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.perm-tx b { font-size: 13px; color: var(--text); }
.perm-dur { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 4px 2px; font-size: 11.5px; color: var(--muted); }
.perm-d { height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 11.5px; cursor: pointer; color: var(--text); }
.perm-d.sel { border-color: #f0b43c; background: #fff4d6; color: #7c2d12; font-weight: 600; }
.perm-banner { max-width: 820px; margin: 0 auto 8px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid #f0b43c; background: linear-gradient(135deg, #fff4d6, #ffe7b0); color: #7c2d12; font-size: 12.5px; }
.perm-banner svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.perm-banner span { flex: 1; }
.ai-pick { position: relative; }
.ai-pick-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; box-shadow: var(--shadow-1); transition: border-color .2s, box-shadow .2s; }
.ai-pick-btn:hover { border-color: #d9dce3; box-shadow: var(--shadow-2); }
.ai-pick-btn b { font-weight: 600; color: var(--text); }
.composer-hint .ai-pick-btn svg { flex: none; }
.ai-pick-btn svg:last-child { transform: rotate(-90deg); }
.ai-pop { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 40; width: 270px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text); }
.ai-pop[hidden] { display: none; }
.ai-pop-h { font-weight: 600; padding: 2px 6px 6px; }
.ai-pop-l { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 6px 2px; }
.ai-opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ai-opt:hover { background: var(--line-2); }
.ai-radio { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c7cbd4; flex: none; }
.ai-opt.on .ai-radio { border: 4px solid var(--accent); }
.ai-pop .input { width: 100%; height: 32px; }
.ai-pop-f { padding: 8px 6px 2px; }
.chat-hero { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.chat-hero h2 { font-size: 26px; letter-spacing: -.025em; margin: 0 0 6px; }
.ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; text-align: left; }
.idea { text-align: left; line-height: 1.45; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 13.5px; color: var(--text-2); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.idea:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.chat-right { border-left: 1px solid var(--line); background: var(--surface); padding: 14px 12px; overflow-y: auto; }
.bk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-list li { display: flex; align-items: center; gap: 4px; padding: 7px 6px; border-radius: 9px; }
.bk-list li:hover { background: var(--line-2); }
pre.diff { background: #0f1220; color: #c9cddc; border-radius: 12px; padding: 12px 0; font-size: 12px; max-height: 60vh; overflow: auto; margin: 0; }
pre.diff div { padding: 0 14px; white-space: pre; }
pre.diff .add { background: rgba(16, 185, 129, .16); color: #a7f3d0; }
pre.diff .del { background: rgba(244, 63, 94, .16); color: #fecdd3; }
pre.diff .hunk { color: #a5b4fc; }
@media (max-width: 1100px) { .chat-wrap.with-right { grid-template-columns: 240px minmax(0, 1fr); } .chat-right { display: none; } }
@media (max-width: 900px) {
  .page.chatpage { height: calc(100dvh - 59px); }
  .chat-wrap, .chat-wrap.with-right { grid-template-columns: 1fr; }
  .chat-side { display: none; }
  .chat-mbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px solid var(--line); background: var(--surface); }
  .chat-mbar .btn svg { width: 15px; height: 15px; stroke: currentColor; }
  .chat-wrap.show-list .chat-side { display: flex; position: absolute; inset: 0; z-index: 6; border-right: 0; }
  .chat-wrap.show-list .chat-list { flex: 1; }
  .ideas { grid-template-columns: 1fr; }
  .msg.user .bubble { max-width: 90%; }
}
.chat-right .card-h svg { width: 16px; height: 16px; stroke: var(--text-2); flex: none; }
.chat-right .card-h .tools svg { stroke: currentColor; }

/* ---------- tools ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 0 20px 18px; }
.tool-tile { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); min-width: 0; }
.tool-tile:hover { border-color: #d6d9e0; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tool-tile > svg { width: 16px; height: 16px; stroke: var(--muted); flex: none; }
.tool-tile .badge svg { display: none; }
.tool-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #0ea5e9, var(--accent)); box-shadow: 0 8px 18px -10px var(--accent); }
.tool-ico svg { width: 20px; height: 20px; stroke: #fff; }
.steps-setup { display: flex; flex-direction: column; gap: 10px; }
.setup-step { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.setup-step .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.auto-setup { margin-top: 10px; }
.auto-setup .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); }
.auto-setup .ico svg { width: 17px; height: 17px; stroke: var(--accent); }
.auto-setup > .btn { flex: none; white-space: nowrap; }
.auto-setup code, .dl-steps code { white-space: nowrap; }
@media (max-width: 600px) { .auto-setup { flex-wrap: wrap; } .auto-setup > .btn { width: 100%; justify-content: center; } }
.setup-step code, .field code { font-size: 12px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.keybox { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; padding: 9px 12px; border-radius: 10px; background: #0f1220; color: #c7d2fe; letter-spacing: .02em; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dl-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 0; }
.dl-card > .btn { align-self: flex-start; margin-top: auto; }
.dl-card code { font-size: 12px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.dl-head { display: flex; align-items: center; gap: 12px; }
.dl-logo { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.dl-logo.chrome { background: conic-gradient(from -60deg, #ea4335 0 120deg, #fbbc05 0 240deg, #34a853 0); box-shadow: inset 0 0 0 8px transparent; position: relative; }
.dl-logo.chrome::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #4285f4; box-shadow: 0 0 0 3px #fff; }
.dl-logo.firefox { background: radial-gradient(circle at 60% 40%, #ffbd4f 0 25%, #ff7139 45%, #e31587 75%, #9059ff 100%); }
.dl-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
@media (max-width: 700px) { .dl-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; padding: 0 14px 14px; } }

/* ---------- AI board (Overview): size = importance, chosen by the AI ---------- */
.board-headline { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 10px; font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; max-width: 980px; }
.board-sec { margin-bottom: 26px; }
.board-sec > h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.board-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.bcard { position: relative; grid-column: span 4; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
  animation: rise .35s var(--ease) both; transition: box-shadow .2s, transform .2s, border-color .2s; }
.bcard.click { cursor: pointer; }
.bcard.click:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.bcard.wide { grid-column: span 6; }
.bcard.hero { grid-column: span 12; padding: 22px 26px; gap: 10px; box-shadow: var(--shadow-2); }
.bcard::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.bcard.tone-urgent { border-color: #f6c9d4; background: linear-gradient(180deg, var(--bad-soft), var(--surface) 70%); }
.bcard.tone-urgent::before { background: var(--bad); }
.bcard.tone-warn::before { background: #f59e0b; }
.bcard.tone-good::before { background: var(--ok); }
.bcard.tone-good.hero { background: linear-gradient(180deg, var(--ok-soft), var(--surface) 70%); }
.bcard.tone-quiet { background: var(--surface-2); box-shadow: none; }
.bc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--line-2); color: var(--text-2); flex: none; }
.bc-ico svg { width: 15px; height: 15px; stroke: currentColor; }
.tone-urgent .bc-ico { background: var(--bad); color: #fff; }
.tone-warn .bc-ico { background: var(--warn-soft); color: var(--warn); }
.tone-good .bc-ico { background: var(--ok-soft); color: var(--ok); }
.bc-title { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; overflow-wrap: anywhere; }
.hero .bc-title { font-size: 21px; line-height: 1.3; }
.bc-note { margin: 0; color: var(--text-2); font-size: 13.5px; }
.hero .bc-note { font-size: 15px; color: var(--text); }
.bc-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.hero .bc-value { font-size: 30px; }
.bc-detail { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.bc-detail.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.bc-act svg { width: 14px; height: 14px; }
.bc-tools { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 4px; }
.bc-t { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.bc-t:hover { background: var(--line-2); color: var(--text); }
.bc-t.on { color: var(--accent); opacity: 1; }
.bc-t svg { width: 14px; height: 14px; stroke: currentColor; }
.bc-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bc-metrics .v { font-size: 20px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 4px; }
.hero .bc-metrics .v { font-size: 30px; }
.bc-metrics .k { font-size: 11.5px; color: var(--muted); }
.bc-metrics .up { color: var(--ok); } .bc-metrics .down { color: var(--bad); }
.bc-biz .spark { margin-top: 6px; }
.bc-prog { display: flex; align-items: center; gap: 12px; }
.bc-prog .bar { flex: 1; height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bc-prog .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7c3aed); transition: width .6s var(--ease); }
.bc-task { display: flex; flex-direction: column; gap: 8px; }
.bc-list { list-style: none; margin: 0; padding: 0; }
.bc-list li { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.bc-list li:first-child { border-top: 0; }
.board-also { display: flex; flex-wrap: wrap; gap: 8px; }
.also-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 360px; padding: 6px 6px 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); transition: border-color .2s, color .2s; }
.also-chip:hover { border-color: var(--accent); color: var(--text); }
.also-chip svg { width: 13px; height: 13px; stroke: currentColor; flex: none; }
.also-chip b { font-weight: 600; color: var(--text); }
.chip-x { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--line-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.chip-x:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.nav-urgent { color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .bcard { grid-column: span 6; } .bcard.wide { grid-column: span 12; } }
@media (max-width: 700px) {
  .board-grid { gap: 10px; }
  .bcard, .bcard.wide, .bcard.hero { grid-column: span 12; }
  .bcard.hero { padding: 18px; }
  .board-headline { font-size: 21px; }
  .hero .bc-title { font-size: 18px; }
  .bc-metrics .v, .hero .bc-metrics .v { font-size: 18px; }
  .bc-list li { grid-template-columns: minmax(0, 1fr) auto; } .bc-list li .muted.ell { display: none; }
}
.bcard.hero.half { grid-column: span 6; }
.bc-detail.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { .bcard.hero.half { grid-column: span 12; } }

/* ---------- board v2: language, ask bar, card chat, drawer ---------- */
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 28px 0 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--text-2); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.lang-pick:hover { border-color: #d9dce3; box-shadow: var(--shadow-2); }
.lang-pick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.lang-pick svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.lang-pick select { appearance: none; border: 0; background: transparent; font-weight: 500; font-size: 13px; color: var(--text); cursor: pointer; outline: none; padding: 0; }
.lang-pick .lang-chev { position: absolute; right: 9px; width: 13px; height: 13px; transform: rotate(90deg); pointer-events: none; color: var(--muted); }

.lang-seg { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 3px 3px 3px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--muted); }
.lang-seg svg { width: 16px; height: 16px; stroke: currentColor; flex: none; margin-right: 4px; }
.lang-seg button { height: 100%; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 500; font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.lang-seg button:hover { color: var(--text); }
.lang-seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.board-head { margin: 2px 0 26px; }
.board-kicker { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.board-kicker .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.board-headline { gap: 14px; margin: 10px 0 12px; font-size: 28px; line-height: 1.22; letter-spacing: -.025em; text-wrap: balance; }
.mood-dot { flex: none; position: relative; margin-top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.mood-dot.busy { background: #f59e0b; } .mood-dot.urgent { background: var(--bad); }
.mood-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: inherit; opacity: .25; animation: halo 2.4s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.8); opacity: 0; } }
.board-meta { display: flex; align-items: center; gap: 6px; }
.meta-ai { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.meta-ai svg { width: 14px; height: 14px; stroke: var(--accent); }

.home-chat { margin-top: 18px; }
.hc-bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .2s var(--ease), box-shadow .25s var(--ease); }
.hc-bar:hover { box-shadow: var(--shadow-2); }
.hc-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-2); }
.hc-ico svg { width: 18px; height: 18px; stroke: var(--accent); display: block; }
.hc-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--text); }
.hc-input::placeholder { color: var(--muted); }
.hc-kbd { opacity: .8; }
.hc-bar:focus-within .hc-kbd { display: none; }
.hc-send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 11px; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c3aed); box-shadow: 0 6px 16px -8px var(--accent); transition: transform .15s var(--ease), box-shadow .2s; }
.hc-send:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px var(--accent); }
.hc-send:active { transform: scale(.96); }
.hc-send svg { width: 16px; height: 16px; stroke: currentColor; }
.hc-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hc-idea { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.hc-idea:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* card tools: chat always there, teaching tools on hover */
.bc-teach { display: flex; gap: 2px; opacity: 0; transform: translateX(6px); transition: opacity .18s var(--ease), transform .18s var(--ease); }
.bcard:hover .bc-teach, .bcard:focus-within .bc-teach { opacity: 1; transform: none; }
.bc-chat { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-1); transition: background .18s, color .18s, transform .15s var(--ease), box-shadow .2s; }
.bc-chat:hover { background: var(--accent); color: #fff; border-color: transparent; transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--accent); }
.bc-chat svg { width: 16px; height: 16px; stroke: currentColor; }
.bc-top { padding-right: 132px; }
.bcard.pinned { box-shadow: 0 0 0 1px var(--accent-ring), var(--shadow-2); }
.bcard.pinned .bc-teach { opacity: 1; transform: none; }
.bcard .bc-act { padding-top: 6px; }

/* drawer */
.dock-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 30, .12); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
body.dock-open .dock-scrim { opacity: 1; pointer-events: auto; }
.dock { position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3);
  transform: translateX(calc(100% + 24px)); transition: transform .32s var(--ease); }
.dock.open { transform: none; }
.dock-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line-2); }
.dock-head b { font-size: 14.5px; display: block; }
.dock-av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; }
.dock-av svg { width: 17px; height: 17px; stroke: currentColor; }
.dock-ctx { display: flex; gap: 6px; padding: 10px 16px 0; }
.dock-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.dock-chip svg { width: 13px; height: 13px; stroke: currentColor; }
.dock-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.dm { max-width: 92%; font-size: 14px; line-height: 1.55; animation: rise .25s var(--ease) both; overflow-wrap: anywhere; }
.dm.user { align-self: flex-end; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; }
.dm.ai { align-self: flex-start; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dm.ai.err { color: var(--bad); background: var(--bad-soft); }
.dm .md > :first-child { margin-top: 0; } .dm .md > :last-child { margin-bottom: 0; }
.dm-step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.spin-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
.typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.typing span { margin-right: 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.dock-empty { margin: auto; text-align: center; display: grid; gap: 6px; justify-items: center; color: var(--text-2); }
.dock-empty .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dock-empty .ico svg { width: 20px; height: 20px; stroke: currentColor; }
.dock-foot { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); }
.dock-input { flex: 1; resize: none; min-height: 40px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; outline: none; font-size: 14px; line-height: 1.4; background: var(--surface-2); transition: border-color .2s, box-shadow .2s, background .2s; }
.dock-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-ring); }

@media (max-width: 700px) {
  .top .search-btn { min-width: 0; }
  .top .search-btn span, .top .search-btn kbd { display: none; }
  .lang-seg { height: 40px; }
  .board-headline { font-size: 22px; }
  .hc-bar { height: 50px; }
  .hc-kbd { display: none; }
  .bc-teach { opacity: 1; transform: none; }
  .bc-t { width: 36px; height: 36px; }
  .bc-chat { width: 40px; height: 40px; }
  .bc-top { padding-right: 168px; }
  .dock { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 86vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .dock.open { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mood-dot::after { display: none; } }
.main { overflow-x: clip; }
@media (max-width: 700px) {
  .page .btn.sm, .hc-idea, .also-chip { min-height: 40px; }
  .bc-t { width: 40px; height: 40px; }
  .chip-x { width: 32px; height: 32px; }
  .hc-send { width: 40px; height: 40px; }
  .bc-top { padding-right: 180px; }
}
.board.calm .bcard, .board.calm .dm { animation: none; }
.section-label { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- Tasks page: everything that runs on its own ---------- */
.tk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.tk-stat .value { font-size: 24px; }
.tk-stat.bad .value { color: var(--bad); }
.tk-stat .label .dot { margin-right: 1px; }
.tk-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tk-search { flex: 1; max-width: 360px; height: 38px; }
.tk-group { margin-bottom: 22px; animation: rise .35s var(--ease) both; }
.tk-gh { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 0 4px 9px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; text-align: left; }
.tk-gh .grow { flex: 1; }
.tk-gh .badge { letter-spacing: 0; text-transform: none; }
.tk-n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--line-2); color: var(--text-2); letter-spacing: 0; }
.tk-chev { width: 15px; height: 15px; stroke: currentColor; transform: rotate(90deg); transition: transform .2s var(--ease); }
.tk-group.closed .tk-chev { transform: rotate(0deg); }
.tk-group.closed .tk-rows { display: none; }
.tk-rows { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); overflow: hidden; }
.tk-group.attn .tk-rows { border-color: #f6c9d4; }
.tk-row { display: grid; grid-template-columns: 34px minmax(180px, 1fr) 150px 190px 132px 160px; gap: 16px; align-items: center;
  padding: 13px 16px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background .15s; outline: none; }
.tk-row:first-child { border-top: 0; }
.tk-row:hover, .tk-row:focus-visible { background: var(--surface-2); }
.tk-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.tk-row.attn { box-shadow: inset 3px 0 0 var(--bad); }
.tk-row.running { box-shadow: inset 3px 0 0 var(--ok); }
.tk-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tk-ico svg { width: 16px; height: 16px; stroke: currentColor; }
.tk-ico.task { background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; box-shadow: 0 6px 14px -8px var(--accent); }
.tk-ico.workflow { background: var(--accent-soft); color: var(--accent); }
.tk-ico.system { background: var(--line-2); color: var(--text-2); }
.tk-ico.big { width: 46px; height: 46px; border-radius: 14px; }
.tk-ico.big svg { width: 21px; height: 21px; }
.tk-name { min-width: 0; }
.tk-name b { display: block; font-size: 14px; }
.tk-sub { display: flex; gap: 6px; align-items: center; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.tk-sub .badge { height: 19px; }
.tk-fix { margin-top: 5px; font-size: 12.5px; color: var(--bad); max-width: 100%; }
.tk-when b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tk-tick { font-weight: 600; color: var(--accent); }
.tk-live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.tk-hist { display: flex; gap: 2px; align-items: flex-end; }
.tk-hist i { width: 6px; height: 18px; border-radius: 2px; background: var(--ok); opacity: .85; transition: transform .15s var(--ease), opacity .15s; transform-origin: bottom; }
.tk-hist i:hover { transform: scaleY(1.3); opacity: 1; }
.tk-hist i.f { background: var(--bad); } .tk-hist i.s { background: #c7cbd3; } .tk-hist i.e { background: var(--line-2); }
.tk-mini { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.tk-mini .bar { flex: 1; min-width: 70px; height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.tk-mini .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7c3aed); transition: width .6s var(--ease); }
.tk-acts { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.tk-ib { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateX(4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease), background .15s, color .15s, border-color .15s; }
.tk-ib svg { width: 14px; height: 14px; stroke: currentColor; }
.tk-row:hover .tk-ib, .tk-row:focus-within .tk-ib { opacity: 1; transform: none; }
.tk-ib:hover { background: var(--accent); color: #fff; border-color: transparent; }
.tk-go { color: var(--muted); display: grid; place-items: center; width: 20px; }
.tk-go svg { width: 16px; height: 16px; stroke: currentColor; }

/* inspector */
.insp-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(15, 18, 30, .12); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
body.insp-open .insp-scrim { opacity: 1; pointer-events: auto; }
.insp { position: fixed; z-index: 56; top: 12px; right: 12px; bottom: 12px; width: min(620px, calc(100vw - 24px)); overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-3); transform: translateX(calc(100% + 24px)); transition: transform .32s var(--ease); }
.insp.open { transform: none; }
.insp-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 16px; animation: rise .3s var(--ease) both; }
.insp-body.calm { animation: none; }
.insp-h { display: flex; gap: 14px; align-items: flex-start; }
.insp-h h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; line-height: 1.3; }
.insp-h p { margin: 4px 0 8px; font-size: 13px; }
.insp-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.insp-acts svg { width: 14px; height: 14px; }
.tk-err { align-items: flex-start; }
.insp-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.insp-panel { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); min-width: 0; }
.insp-panel h4 { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tk-dial { position: relative; display: grid; place-items: center; }
.tk-dial-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tk-dial-c b { font-size: 16px; }
.tk-dial-c .tk-tick { color: var(--text); }
.tk-kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 12px 0 0; font-size: 12.5px; }
.tk-kv dt { color: var(--muted); } .tk-kv dd { margin: 0; overflow-wrap: anywhere; }
.tk-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.tk-p { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); font-size: 12.5px; min-width: 0; }
.tk-p .badge { margin-left: auto; height: 20px; }
.tk-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; flex: none; }
.tk-runs { list-style: none; margin: 10px 0 0; padding: 0; }
.tk-runs li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; min-width: 0; }
.tk-runs li:first-child { border-top: 0; }
.tk-runs time { color: var(--muted); white-space: nowrap; width: 92px; flex: none; }
.tk-runs .ell { flex: 1; }

@media (max-width: 1100px) {
  .tk-row { grid-template-columns: 34px minmax(0, 1fr) 150px 160px; }
  .tk-trend, .tk-state { display: none; }
}
@media (max-width: 700px) {
  .tk-stats { grid-template-columns: 1fr 1fr; }
  .tk-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; }
  .tk-when { grid-column: 2; grid-row: 2; }
  .tk-acts { grid-row: 1 / span 2; grid-column: 3; }
  .tk-ib { opacity: 1; transform: none; width: 40px; height: 40px; }
  .tk-acts .tk-ib:not(:first-child) { display: none; }
  .insp { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 90vh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .insp-grid { grid-template-columns: 1fr; }
}

/* language pill: the select itself covers the whole pill, icons never take the click */
.lang-pick { padding: 0; gap: 0; }
.lang-pick > svg { position: absolute; left: 10px; pointer-events: none; }
.lang-pick select { height: 100%; padding: 0 30px 0 34px; border-radius: 10px; }
.lang-pick select:focus-visible { outline: none; }
/* approve in place: paste field(s) + actions */
.bc-paste-row { display: flex; gap: 6px; flex: 1 1 100%; min-width: 0; }
.bc-paste { flex: 1; min-width: 0; height: 32px; font-size: 13px; }
.dock-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; max-width: 340px; }

/* Entrance animations run only in a visible window: a background tab pauses them on their first, invisible frame. */
html:not(.anim) :is(.page, .approval, .pipe li, .stagger > *, .msg, .orb-lg, .action-card, .bcard, .dm, .tk-group, .insp-body, .login .card, .feed li.new) { animation: none; }
html:not(.anim) .fade-area { opacity: 1; animation: none; }
html:not(.anim) .draw { stroke-dashoffset: 0; animation: none; }
.tk-today { margin-top: 6px; gap: 4px; align-items: center; }
.tk-today .badge { height: 20px; }
.tk-tech { margin-top: 8px; font-size: 12px; color: var(--muted); }
.tk-tech summary { cursor: pointer; }
.tk-tech code { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

.tk-dial-c b { font-size: 22px; }
.tk-dial-c .small { color: var(--accent); font-weight: 600; max-width: 110px; line-height: 1.3; }
.tk-dial-c .small .tk-tick { color: inherit; }
.tk-p.why { flex-wrap: wrap; grid-column: 1 / -1; }
.tk-why { flex: 1 1 100%; padding-left: 30px; font-size: 12px; color: var(--text-2); line-height: 1.45; }

/* Inside the Android app: its native bar opens the menu and runs search-free navigation. */
.in-app .menu-btn, .in-app .search-btn { display: none; }
.qr { width: 220px; max-width: 100%; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }

/* Secure/approval cards, pinned over every page including the live call. */
.tray { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); z-index: 300; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 24px); overflow: auto; }
.tray[hidden] { display: none; }
.tray-card { background: var(--surface); box-shadow: 0 18px 50px rgba(0, 0, 0, .35), 0 0 0 1px rgba(245, 158, 11, .35); }
.tray-more { text-align: center; padding: 2px; }
.key-multi { min-height: 92px; resize: vertical; white-space: pre; font-size: 12px; }

/* Capability requests from the instances, top of the vendor's Overview */
.feature-asks:not(:empty) { margin-bottom: 18px; }
.feature-asks .card { border-left: 3px solid var(--accent); }
.asks { list-style: none; margin: 0; padding: 0 20px 6px; }
.asks .ask { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); }
.asks .ask:first-child { border-top: 0; }
.ask-main { flex: 1; min-width: 0; }
.ask-main p { margin: 2px 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ask-main .sub { font-size: 12px; color: var(--muted); }

/* Attachments: picked, pasted or dropped files above the box; thumbnails in the message. */
.composer-box .clip { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 10px; display: grid; place-items: center; align-self: flex-end; }
.composer-box .clip:hover { color: var(--text); background: var(--surface-2); }
.composer-box .clip svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.att-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 8px; }
.att { display: flex; align-items: center; gap: 8px; max-width: 240px; padding: 6px 8px 6px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.att img, .att .att-ico { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); }
.att .att-ico svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.att-meta { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.att.up { opacity: .7; } .att.err { border-color: var(--bad); }
.att-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
.att-x svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.msg-files { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.msg-photo { max-width: 220px; max-height: 180px; border-radius: 10px; cursor: zoom-in; display: block; background: var(--surface-2); min-width: 60px; min-height: 40px; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: inherit; cursor: pointer; font: inherit; font-size: 13px; }
.msg-file svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
body.drop-on::after { content: 'Drop photos or files to attach'; position: fixed; inset: 12px; z-index: 400; display: grid; place-items: center; border: 2px dashed var(--accent, #6366F1); border-radius: 18px; background: rgba(99,102,241,.08); color: var(--text); font-size: 20px; font-weight: 600; pointer-events: none; }

.tray-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(245,158,11,.45); box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; }
.tray-head svg { width: 16px; height: 16px; stroke: #f59e0b; fill: none; stroke-width: 2; }
.tray-head .btn { margin-left: auto; }
.tray-cards { display: flex; flex-direction: column; gap: 10px; }
.tray.min { width: auto; }
.tray.min .tray-cards { display: none; }
.tray-card .asum.clamp { max-height: 4.8em; overflow: hidden; cursor: pointer; mask-image: linear-gradient(#000 60%, transparent); }

/* ---------- Tokens page (web/tokens.js) ---------- */
:root { --k-chat: #5b5bd6; --k-voice: #0f9d8a; --k-flow: #d98a1c; --k-task: #8e5bd8; --k-fast: #2f8fd1; --k-bg: #9aa3b2; }
.tn { display: flex; flex-direction: column; gap: 20px; }
.tn-row { display: grid; gap: 20px; align-items: stretch; }
.tn-r1 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.tn-r2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.tn-r3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.tn-row > div { display: flex; min-width: 0; }
.tn-row > div > .card { flex: 1; min-width: 0; }
.tn-card { padding: 24px; }
.tn-card-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.tn-card-h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.tn-card-h.sub2 { margin: 26px 0 8px; }
.tn-card-h.sub2 h3 { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tn-sub { color: var(--muted); font-size: 12.5px; }
.tn-tools { margin-left: auto; }
.tn-stamp { margin-right: 4px; align-self: center; }
.tn-soon { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.btn:disabled { opacity: .62; cursor: not-allowed; box-shadow: none; transform: none; }

.tn-eyebrow-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tn-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tn-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tn-chip svg { width: 13px; height: 13px; stroke: currentColor; }
.tn-chip.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tn-chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); margin-left: 8px; }
.tn-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 22px; }
.tn-count { font-size: clamp(46px, 6.2vw, 68px); line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--text); }
.tn-count.warn { color: var(--warn); } .tn-count.bad { color: var(--bad); }
.tn-unit { color: var(--muted); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tn-lede { margin: 0; max-width: 56ch; color: var(--text-2); line-height: 1.6; }

.tn-track { height: 12px; border-radius: 999px; background: var(--line-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.tn-track.thin { height: 6px; box-shadow: none; }
.tn-track > i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; animation: grow .9s var(--ease) both; }
.tn-track.warn > i, .tn-track > i.warn { background: var(--warn); } .tn-track.bad > i { background: var(--bad); }
.tn-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.tn-meter { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tn-meter-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.tn-meter-h b { font-size: 14px; font-weight: 600; color: var(--text); }
.tn-meter-h .muted { font-weight: 400; }

.tn-vstats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tn-vstat { display: flex; gap: 10px; align-items: flex-start; }
.tn-vstat > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-vl { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tn-vn { font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.tn-vt { font-size: 14px; font-weight: 600; color: var(--k-voice); }
.tn-vt.zero { color: var(--ok); }
.tn-dotk { flex: none; width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; display: inline-block; }
.tn-dotk.hatch { background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 5px); opacity: .55; }
.tn-vbar { display: flex; gap: 3px; height: 12px; margin: 20px 0 16px; }
.tn-vbar i { display: block; height: 100%; border-radius: 999px; }
.tn-vbar .talk { background: var(--k-voice); min-width: 4px; transform-origin: left; animation: grow .9s var(--ease) both; }
.tn-vbar .quiet { flex: 1; background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 7px); box-shadow: inset 0 0 0 1px var(--line); }
.tn-note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; line-height: 1.55; }
.tn-note svg { flex: none; width: 17px; height: 17px; margin-top: 2px; stroke: var(--k-voice); }

.tn-stack { display: flex; gap: 3px; height: 14px; }
.tn-stack i { display: block; flex-basis: 0; min-width: 5px; border-radius: 4px; transform-origin: left; animation: grow .8s var(--ease) both; }
.tn-stack i:first-child { border-radius: 999px 4px 4px 999px; } .tn-stack i:last-child { border-radius: 4px 999px 999px 4px; } .tn-stack i:only-child { border-radius: 999px; }
.tn-legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.tn-legend li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 44px; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.tn-legend li:last-child { border-bottom: 0; }
.tn-legend .tn-dotk { margin-top: 3px; }
.tn-pct { text-align: right; }

.tn-days { position: relative; height: 176px; margin-top: 6px; }
.tn-grid-lines { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.tn-grid-lines span { display: block; font-size: 10.5px; color: var(--muted); line-height: 1; border-top: 1px dashed var(--line); padding-top: 3px; }
.tn-grid-lines span:last-child { border-top-style: solid; }
.tn-cols { position: absolute; inset: 0 0 0 38px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }
.tn-col { display: flex; flex-direction: column; border-radius: 8px; outline: none; cursor: default; }
.tn-col:hover, .tn-col:focus-visible { background: var(--line-2); }
.tn-col:focus-visible { box-shadow: 0 0 0 2px var(--accent-ring); }
.tn-bar { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0; margin-bottom: 22px; }
.tn-stk { width: 100%; max-width: 24px; display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 6px 6px 2px 2px; overflow: hidden; transform-origin: bottom; animation: tn-up .7s var(--ease) both; animation-delay: calc(var(--i) * 28ms); }
.tn-stk i { display: block; flex-basis: 0; min-height: 2px; }
@keyframes tn-up { from { transform: scaleY(0); } }
.tn-dl { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--muted); }
.tn-col { position: relative; }
.tn-col.today .tn-dl { color: var(--accent); font-weight: 700; }
.tn-tip { position: absolute; z-index: 5; top: -8px; width: 160px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); font-size: 12px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.tn-tip[hidden] { display: none; }
.tn-tip b { font-size: 12.5px; } .tn-tip > span:nth-child(2) { color: var(--text-2); margin-bottom: 3px; }
.tn-tip-r { display: flex; align-items: center; gap: 6px; color: var(--text-2); } .tn-tip-r i { width: 8px; height: 8px; border-radius: 2px; flex: none; } .tn-tip-r em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; color: var(--text); }

.tn-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.tn-rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.tn-n { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.tn-rk { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.tn-rk-h { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.tn-rk-name { font-weight: 500; }
.tn-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; background: var(--line-2); color: var(--text-2); white-space: nowrap; }
.tn-tag.ok { background: var(--ok-soft); color: var(--ok); } .tn-tag.soft { background: var(--accent-soft); color: var(--accent); }
.tn-tag.voice { background: color-mix(in srgb, var(--k-voice) 14%, transparent); color: var(--k-voice); }

.tn-learn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tn-learn li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.tn-learn li:first-child { padding-top: 0; } .tn-learn li:last-child { border-bottom: 0; padding-bottom: 0; }
.tn-lh { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-transform: capitalize; font-weight: 500; }
.tn-lh .muted { text-transform: none; font-weight: 400; }
.tn-delta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--ok-soft); flex: none; font-size: 14px; }
.tn-delta svg { width: 14px; height: 14px; stroke: var(--ok); }
.tn-delta .was { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.tn-delta .now { color: var(--ok); font-weight: 700; }

.tn-rates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.tn-rates li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.tn-rates li > div:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tn-rates b { font-weight: 600; font-size: 13.5px; }
.tn-rv { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.tn-rv > b { font-size: 14px; }
.tn-foot { margin: 16px 0 0; line-height: 1.55; }
.tn-unm { margin: 10px 0 0; }
.tn-models { margin-top: 16px; font-size: 13px; }
.tn-models summary { cursor: pointer; color: var(--text-2); font-weight: 500; }
.tn-models table { width: 100%; border-collapse: collapse; }
.tn-models th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12px; padding: 4px 0; } .tn-models th:first-child, .tn-models td:first-child { text-align: left; }
.tn-models td { text-align: right; padding: 5px 0; border-top: 1px solid var(--line-2); }

.tn-tx { padding: 24px 24px 18px; }
.tn-chipbar { overflow-x: auto; margin: 0 -24px 6px; padding: 0 24px 8px; scrollbar-width: none; }
.tn-chipbar::-webkit-scrollbar { display: none; }
.tn-chips { display: flex; gap: 6px; width: max-content; }
.tn-fchip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 13px; cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease); }
.tn-fchip:hover { background: var(--line-2); color: var(--text); }
.tn-fchip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tn-fchip:focus-visible, .btn:focus-visible, .tn-search:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--accent-ring); }
.tn-search { width: 240px; height: 34px; }
.tn-dayh { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 20px 0 4px; }
.tn-dayh:first-child { padding-top: 10px; }
.tn-tr { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto 76px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.tn-t { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tn-w { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tn-what { font-weight: 500; }
.tn-sub2 { font-size: 12.5px; color: var(--muted); } .tn-sub2.bad { color: var(--bad); }
.tn-tok { text-align: right; font-weight: 600; font-size: 14px; } .tn-tok.zero { color: var(--muted); font-weight: 500; }
.tn-tr.bad .tn-what { color: var(--text-2); }
.tn-morebar { display: flex; justify-content: center; padding-top: 14px; } .tn-more[hidden] { display: none; }
.tn-fail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 40px 20px; }
.tn-fail svg { width: 22px; height: 22px; stroke: var(--bad); }
.tn-fail.inline { flex-direction: row; justify-content: center; padding: 28px 0; }
.tn-sk-lines { display: flex; flex-direction: column; gap: 12px; }
.tn-hero-slot, .tn-voice-slot { }

@media (max-width: 1100px) { .tn-r1, .tn-r2, .tn-r3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .tn, .tn-row { gap: 16px; }
  .tn-card, .tn-tx { padding: 18px 16px; }
  .tn-chipbar { margin: 0 -16px 6px; padding: 0 16px 8px; }
  .tn-meters { grid-template-columns: 1fr; gap: 18px; }
  .tn-vstats { gap: 12px; } .tn-vn { font-size: 22px; }
  .tn-rates { grid-template-columns: 1fr; }
  .tn-search { width: 100%; }
  .tn-tools { margin-left: 0; flex: 1; } .tn-card-h:has(.tn-tools) { flex-wrap: wrap; }
  .tn-tr { grid-template-columns: 66px minmax(0, 1fr) 62px; grid-template-areas: "t w tok" "t tag tok"; gap: 2px 10px; align-items: start; }
  .tn-tr > :nth-child(1) { grid-area: t; padding-top: 2px; } .tn-tr > :nth-child(2) { grid-area: w; } .tn-tr > :nth-child(3) { grid-area: tag; justify-self: start; margin-top: 4px; } .tn-tr > :nth-child(4) { grid-area: tok; }
  .tn-days { height: 150px; } .tn-cols { gap: 3px; left: 34px; }
  .page-head .actions .tn-stamp { display: none; }
  .page-head .actions { width: 100%; margin-left: 0; }
  .page-head .actions .btn.primary { order: -1; flex: 1 1 100%; justify-content: center; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .tn-track > i, .tn-stk, .tn-stack i, .tn-vbar .talk { animation: none !important; } }

/* ---------- dark theme: opt-in with the moon button (rc_theme); the light look is untouched ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e13; --surface: #14171e; --surface-2: #181c24; --line: #262b36; --line-2: #1d212a;
  --text: #eceff4; --text-2: #b6bdca; --muted: #8791a3;
  --accent: #9a9bfa; --accent-2: #b0b1fc; --accent-soft: rgba(154, 155, 250, .14); --accent-ring: rgba(154, 155, 250, .3);
  --ok: #3fd9a0; --ok-soft: rgba(63, 217, 160, .12); --warn: #f6bd4b; --warn-soft: rgba(246, 189, 75, .12); --bad: #fb7a90; --bad-soft: rgba(251, 122, 144, .12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35); --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .65); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
  --k-chat: #8f90f4; --k-voice: #2fc7b0; --k-flow: #efae4a; --k-task: #b390f0; --k-fast: #5bb3ec; --k-bg: #6c7589;
}
html[data-theme="dark"] .top { background: rgba(12, 14, 19, .8); }
html[data-theme="dark"] .btn:hover, html[data-theme="dark"] .search-btn:hover { border-color: #353c4b; }
html[data-theme="dark"] .btn.primary { background: #5d5fe6; color: #fff; }
html[data-theme="dark"] .btn.primary:hover { background: #6e70ee; }
html[data-theme="dark"] .sk { background: linear-gradient(90deg, #1b1f28 0%, #232834 50%, #1b1f28 100%); background-size: 200% 100%; }
html[data-theme="dark"] .tn-soon { background: rgba(255, 255, 255, .2); }
html[data-theme="dark"] .tn-track > i { background: linear-gradient(90deg, #6f71ee, var(--accent-2)); }
html[data-theme="dark"] .shell.menu::after { background: rgba(0, 0, 0, .55); }

/* Phase 1: Get started + "More" in the sidebar. Targets are >= 44px and everything uses the theme variables (light and dark). */
.nav-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin: 4px 0 2px; padding: 8px 12px; border-radius: 10px; border: 1.5px dashed var(--accent); background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; transition: background .18s var(--ease); }
.nav-add:hover { background: var(--accent-soft); }
.nav-add svg { width: 18px; height: 18px; stroke: currentColor; }
.nav-more { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin-top: 6px; padding: 8px 10px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; text-align: left; }
.nav-more:hover { background: var(--line-2); color: var(--text); }
.nav-more svg { width: 18px; height: 18px; flex: none; stroke: currentColor; opacity: .85; }
.nav-more .more-chev { margin-left: auto; transition: transform .2s var(--ease); }
.nav-more.open .more-chev { transform: rotate(90deg); }
.nav-more .badge { margin-left: auto; } .nav-more .badge + .more-chev { margin-left: 8px; }
.more-body[hidden] { display: none; }
.more-body a { min-height: 40px; }
.gs-head h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.025em; margin: 8px 0 6px; font-weight: 700; }
.gs-head p { margin: 0 0 20px; color: var(--text-2); font-size: 15px; max-width: 60ch; }
.gs-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gs-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.gs-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }
.gs-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.gs-ico svg { width: 24px; height: 24px; stroke: currentColor; }
.gs-main { flex: 1; }
.gs-main h3 { margin: 0 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.gs-main p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.gs-main .gs-eg { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.gs-main .gs-eg span { font-weight: 600; }
.gs-go { width: 100%; min-height: 48px; justify-content: center; font-size: 15px; }
.gs-go svg { width: 16px; height: 16px; }
.gs-or { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.gs-or::before, .gs-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gs .home-chat { margin-top: 12px; }
.gs .hc-idea { height: 38px; font-size: 13.5px; }
@media (max-width: 600px) {
  .gs-head h1 { font-size: 22px; }
  .gs-grid { grid-template-columns: 1fr; }
  .gs .hc-bar { height: 56px; }
}

/* Guided flows: the preview, a safe Test and one big switch (Assistant drawer and chat page) */
.dm-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; align-self: stretch; min-width: 0; }
.flow-card { align-self: stretch; width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-color: var(--accent); box-sizing: border-box; }
.fc-kicker { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--accent); }
.fc-kicker svg, .fc-reach svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }
.fc-when { margin: 0; font-size: 20px; line-height: 1.25; }
.fc-plain { margin: 0; font-size: 15px; line-height: 1.5; }
.fc-reach { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13.5px; color: var(--text-2); }
.fc-need { flex-wrap: wrap; align-items: center; }
.fc-need > .grow { flex: 1 1 100%; }
.fc-test { min-height: 44px; justify-content: center; }
.fc-steps { font-size: 13px; }
.fc-steps ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fc-steps li { display: flex; align-items: center; gap: 6px; }
.fc-steps li svg { width: 14px; height: 14px; stroke: var(--good, #16a34a); flex: none; }
.fc-steps li.bad svg { stroke: var(--bad); }
.fc-switch { display: flex; align-items: center; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.fc-switch b { font-size: 15px; }
.switch.big { width: 68px; height: 38px; }
.switch.big::after { top: 4px; left: 4px; width: 30px; height: 30px; }
.switch.big.on::after { transform: translateX(30px); }
.note.good { background: var(--good-soft, #dcfce7); color: var(--good, #15803d); }

/* Phase 3: set-up checklist, voice-first home, example cards, schedule in plain words */
.setup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 18px; margin-bottom: 20px; }
.setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.setup-head h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.setup-head b { color: var(--accent); font-size: 15px; white-space: nowrap; }
.setup-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 6px; }
.setup-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s var(--ease); }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.setup-item:first-child { border-top: 0; }
.setup-tick { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.setup-tick svg { width: 20px; height: 20px; stroke: currentColor; }
.setup-item.done .setup-tick { background: var(--ok-soft); color: var(--ok); }
.setup-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setup-txt b { font-size: 15.5px; font-weight: 650; }
.setup-txt span { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.setup-item.done .setup-txt { opacity: .65; }
.setup-item .btn { min-height: 44px; flex: none; }
@media (max-width: 600px) {
  .setup { padding: 14px; }
  .setup-item { flex-wrap: wrap; }
  .setup-txt { flex-basis: calc(100% - 58px); }
  .setup-item .btn, .setup-item .badge { margin-left: 56px; }
  .setup-item .btn { width: calc(100% - 56px); justify-content: center; }
}

.vh { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin: 4px 0 16px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); }
.vh-mic { width: 76px; height: 76px; flex: none; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px -8px var(--accent); transition: transform .15s var(--ease), background .2s; }
.vh-mic:hover { transform: scale(1.05); }
.vh-mic svg { width: 34px; height: 34px; stroke: currentColor; }
.vh-mic.listening, .vh-mic.hearing { background: var(--bad); animation: vh-pulse 1.4s infinite; }
.vh-mic.thinking, .vh-mic.working { background: var(--muted); }
.vh-mic.speaking { background: var(--ok); }
@keyframes vh-pulse { from { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); } to { box-shadow: 0 0 0 22px rgba(225, 29, 72, 0); } }
.vh-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vh-txt b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.vh-txt span { color: var(--text-2); font-size: 14.5px; line-height: 1.4; }
@media (max-width: 600px) { .vh { gap: 14px; padding: 14px; } .vh-mic { width: 64px; height: 64px; } .vh-mic svg { width: 28px; height: 28px; } .vh-txt b { font-size: 18px; } }

.gs-act { display: flex; gap: 8px; }
.gs-act .gs-go { flex: 1; width: auto; }
.gs-say { width: 48px; min-height: 48px; padding: 0; justify-content: center; flex: none; }
.gs-say svg { width: 20px; height: 20px; }
.gs-say.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.ex { margin-top: 28px; }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.ex-head b { font-size: 15px; }
.ex-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ex-grid .bcard { grid-column: auto; }
.ex-card { position: relative; opacity: .75; border: 2px dashed var(--line); background: transparent; box-shadow: none; pointer-events: none; user-select: none; animation: none; }
.ex-tag { position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--warn-soft); color: var(--warn); }
.ex-card .bc-value { font-size: 20px; font-weight: 700; }

.tk-plan { display: grid; gap: 14px; margin-bottom: 16px; }
.tk-plan:empty { display: none; }
.tk-next { display: flex; align-items: center; gap: 14px; padding: 16px 18px; font-size: 15.5px; }
.tk-next > svg { width: 28px; height: 28px; flex: none; color: var(--accent); stroke: currentColor; }
.tk-next-when { font-size: 17px; font-weight: 650; margin-top: 2px; }
.tk-week { position: relative; padding: 16px 18px; }
.tk-week h4 { margin: 0 0 12px; font-size: 16px; }
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk-day { display: flex; flex-direction: column; gap: 6px; min-height: 72px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; }
.wk-day.today { border-color: var(--accent); background: var(--accent-soft); }
.wk-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.wk-chip { display: flex; flex-direction: column; min-width: 0; padding: 4px 6px; font-size: 12px; line-height: 1.3; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.wk-chip b { font-size: 12.5px; color: var(--accent); }
.wk-none { color: var(--muted); }
.wk-more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.wk-more ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.wk-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
@media (max-width: 900px) {
  .wk-grid { grid-template-columns: 1fr; }
  .wk-day { flex-direction: row; flex-wrap: wrap; align-items: flex-start; min-height: 0; }
  .wk-name { width: 110px; flex: none; }
  .wk-chip { flex: 1 1 140px; }
}
.tk-row { grid-template-columns: 34px minmax(180px, 1fr) 150px 190px 132px 230px; }
.tk-sw { display: flex; align-items: center; gap: 8px; order: -1; }
.tk-sw-l { font-size: 13px; min-width: 22px; color: var(--text-2); }
@media (max-width: 1100px) { .tk-row { grid-template-columns: 34px minmax(0, 1fr) 150px 220px; } }
@media (max-width: 700px) {
  .tk-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .tk-sw { flex-direction: column; gap: 2px; }
  .tk-next { padding: 14px; }
  .tk-week { padding: 14px; }
}
@media (max-width: 700px) {
  .tk-acts { grid-row: 1; grid-column: 3; }
  .tk-when { grid-column: 2 / -1; }
  .tk-when b { white-space: normal; }
  .tk-name b.ell { white-space: normal; overflow: visible; text-overflow: clip; }
  .tk-go { display: none; }
}

/* ---------- floating action dock: Live + Assistant (bottom-right), Live window, Assistant window ---------- */
:root {
  --fab-g1: #5b54e8; --fab-g2: #7c3aed; --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fab-r: calc(16px + env(safe-area-inset-right, 0px));
  --fab-b: calc(16px + env(safe-area-inset-bottom, 0px) + var(--fab-lift, 0px));
}
html[data-theme="dark"] { --fab-g1: #6e68f0; --fab-g2: #8b5cf6; }
.fab-dock { position: fixed; z-index: 59; right: var(--fab-r); bottom: var(--fab-b); display: flex; align-items: flex-end; gap: 12px;
  transition: transform .45s var(--spring), opacity .2s ease, bottom .25s var(--ease); }
body.kb-up .fab-dock { transform: translateY(24px); opacity: 0; pointer-events: none; }
body.fab-on .toasts { right: var(--fab-r); bottom: calc(var(--fab-b) + 72px); }
body.fab-on .page:not(.chatpage) { padding-bottom: 108px; }
.fab { position: relative; flex: none; height: 56px; min-width: 56px; padding: 0; border-radius: 28px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 14px/1.15 inherit; letter-spacing: .01em; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .35s var(--spring), box-shadow .25s ease, filter .2s ease, background .25s ease, color .25s ease; }
.fab[hidden], .fab-badge[hidden], .fab-time[hidden] { display: none; }
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: scale(.94); transition-duration: .1s; }
.fab:focus-visible, .lw-call:focus-visible, .lw-round:focus-visible, .lw-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fab-ico { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.fab-ico svg { width: 24px; height: 24px; stroke: currentColor; }
.fab-txt { display: none; flex-direction: column; align-items: flex-start; }
.fab-txt small { font-size: 11px; font-weight: 500; opacity: .75; }
.fab-live { color: var(--accent); background: rgba(255, 255, 255, .74); border-color: rgba(16, 24, 40, .08);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 8px 20px -6px rgba(16, 24, 40, .2), 0 22px 40px -18px rgba(16, 24, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .85); }
html[data-theme="dark"] .fab-live { background: rgba(30, 34, 46, .72); border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -8px rgba(0, 0, 0, .7), 0 24px 44px -18px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08); }
.fab-live.open { border-color: var(--accent); }
.fab-asst { color: #fff; background: linear-gradient(135deg, var(--fab-g1), var(--fab-g2)); border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 1px 2px rgba(79, 70, 229, .35), 0 10px 22px -6px rgba(99, 70, 229, .55), 0 24px 44px -16px rgba(99, 70, 229, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.fab-asst:hover { filter: brightness(1.07); }
.fab-asst.open { filter: brightness(.94); }
.fab-badge { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(225, 29, 72, .4); }
html[data-theme="dark"] .fab-badge { color: #1a0a10; }
.fab-dot { display: none; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.fab-live.is-live { color: var(--ok); }
.fab-live.is-live .fab-dot { display: block; animation: fab-pulse 1.6s ease-out infinite; }
.fab-live.is-live::after { content: ""; position: absolute; inset: -5px; border-radius: inherit; border: 2px solid var(--ok); opacity: 0; animation: fab-ring 2.2s ease-out infinite; pointer-events: none; }
.fab-live.is-live .fab-ico > svg { display: none; }
.fab-bars { display: none; align-items: center; gap: 3px; height: 24px; }
.fab-live.is-live .fab-bars { display: flex; }
.fab-bars i { width: 3.5px; height: 16px; border-radius: 2px; background: currentColor; transform: scaleY(.3); animation: fab-bar 1.5s ease-in-out infinite; }
.fab-bars i:nth-child(2) { animation-delay: .15s; } .fab-bars i:nth-child(3) { animation-delay: .3s; } .fab-bars i:nth-child(4) { animation-delay: .45s; }
.fab-live[data-phase="hearing"] .fab-bars i, .fab-live[data-phase="speaking"] .fab-bars i { animation-duration: .8s; }
.fab-live[data-phase="speaking"] { color: var(--accent); }
@keyframes fab-ring { 0% { transform: scale(.94); opacity: .55; } 100% { transform: scale(1.22); opacity: 0; } }
@keyframes fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(4, 120, 87, .55); } 100% { box-shadow: 0 0 0 9px rgba(4, 120, 87, 0); } }
@keyframes fab-bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.fab::before { content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); right: 0; white-space: nowrap; padding: 8px 11px; border-radius: 10px; background: rgba(15, 18, 30, .94); color: #fff;
  font: 500 12px/1 inherit; letter-spacing: 0; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .18s ease, transform .25s var(--spring); }
@media (hover: hover) { .fab:hover::before, .fab:focus-visible::before { opacity: 1; transform: none; } .fab.open::before { opacity: 0; } }
@media (min-width: 1024px) {
  .fab { width: auto; padding: 0 22px 0 18px; }
  .fab-txt { display: flex; }
}

/* the windows: a floating panel above the buttons on desktop, a bottom sheet on a phone */
.lw, .dock { z-index: 61; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); overflow: hidden; }
.lw { position: fixed; right: var(--fab-r); bottom: calc(var(--fab-b) + 68px); width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100dvh - var(--fab-b) - 84px));
  display: flex; flex-direction: column; border-radius: 22px; transform-origin: 100% 100%; transform: translateY(14px) scale(.92); opacity: 0; visibility: hidden;
  transition: transform .5s var(--spring), opacity .18s ease, visibility 0s .5s; }
.lw.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.lw [hidden] { display: none !important; }
.lw-grab, .dock-grab { display: none; }
@media (min-width: 701px) {
  .dock { top: auto; left: auto; right: var(--fab-r); bottom: calc(var(--fab-b) + 68px); width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100dvh - var(--fab-b) - 84px));
    border-radius: 22px; transform-origin: 100% 100%; transform: translateY(14px) scale(.92); opacity: 0; visibility: hidden; transition: transform .5s var(--spring), opacity .18s ease, visibility 0s .5s; }
  .dock.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  body.dock-open .dock-scrim { opacity: 0; pointer-events: none; }
}
.fab-scrim { display: none; }
@media (max-width: 700px) {
  .lw, .dock { left: 0; right: 0; top: auto; bottom: var(--kb, 0px); width: auto; height: min(88dvh, calc(100dvh - var(--kb, 0px) - 8px)); border-radius: 24px 24px 0 0; border-bottom: 0;
    transform-origin: 50% 100%; transform: translateY(100%); opacity: 1; visibility: hidden; padding-bottom: env(safe-area-inset-bottom, 0px); transition: transform .5s var(--spring), visibility 0s .5s; }
  .lw.open, .dock.open { transform: none; visibility: visible; transition-delay: 0s; }
  .lw-grab, .dock-grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
  .fab-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 30, .3); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
  body.live-open .fab-scrim { opacity: 1; pointer-events: auto; }
  body.dock-open .fab-dock, body.live-open .fab-dock { opacity: 0; pointer-events: none; transform: translateY(16px) scale(.9); }
  .dock-full span { display: none; }
}

/* Live window */
.lw-head { display: flex; align-items: center; gap: 4px; padding: 14px 10px 10px 18px; background: linear-gradient(180deg, var(--accent-soft), transparent); flex: none; }
.lw-av { width: 42px; height: 42px; margin-right: 8px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--fab-g1), var(--fab-g2)); box-shadow: 0 6px 16px -6px rgba(99, 70, 229, .6); }
.lw-av svg { width: 20px; height: 20px; stroke: currentColor; }
.lw[data-phase="listening"] .lw-av, .lw[data-phase="speaking"] .lw-av { animation: lw-glow 1.6s ease-out infinite; }
@keyframes lw-glow { 0% { box-shadow: 0 0 0 0 rgba(99, 70, 229, .45); } 100% { box-shadow: 0 0 0 14px rgba(99, 70, 229, 0); } }
.lw-title { flex: 1; min-width: 0; line-height: 1.3; }
.lw-title b { font-size: 15px; display: block; }
.lw-state { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.lw-state > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9aa3b2; }
.lw-dot.ok { background: var(--ok); animation: fab-pulse 1.8s ease-out infinite; }
.lw-dot.warn { background: var(--warn); animation: lw-blink 1s ease-in-out infinite; }
@keyframes lw-blink { 50% { opacity: .3; } }
.lw-time { margin-left: auto; font-weight: 600; color: var(--text-2); }
.lw-round { flex: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--spring); }
.lw-round:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.lw-round:active:not(:disabled) { transform: scale(.92); }
.lw-round:disabled { opacity: .4; cursor: default; }
.lw-round.on { background: var(--accent-soft); color: var(--accent); }
.lw-round.send { color: var(--accent); }
.lw-round svg { width: 20px; height: 20px; stroke: currentColor; }
.lw-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lw-wave { flex: none; height: 64px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lw-wave i { width: 5px; height: 26px; border-radius: 3px; background: linear-gradient(180deg, var(--fab-g1), var(--fab-g2)); transform: scaleY(.18); opacity: .35; transition: opacity .3s; }
.lw[data-phase="listening"] .lw-wave i { background: linear-gradient(180deg, #34d399, var(--ok)); }
.lw[data-phase="listening"] .lw-wave i, .lw[data-phase="speaking"] .lw-wave i { opacity: 1; animation: fab-bar .9s ease-in-out infinite; }
.lw[data-phase="working"] .lw-wave i, .lw[data-phase="connecting"] .lw-wave i, .lw[data-phase="reconnecting"] .lw-wave i { opacity: .8; animation: fab-bar 1.8s ease-in-out infinite; }
.lw-wave i:nth-child(2) { animation-delay: .1s; } .lw-wave i:nth-child(3) { animation-delay: .2s; } .lw-wave i:nth-child(4) { animation-delay: .3s; }
.lw-wave i:nth-child(5) { animation-delay: .2s; } .lw-wave i:nth-child(6) { animation-delay: .1s; }
.lw-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.lw-line { max-width: 88%; padding: 8px 12px; border-radius: 16px 16px 16px 5px; font-size: 14px; line-height: 1.5; background: var(--accent-soft); align-self: flex-start; overflow-wrap: anywhere; animation: rise .25s var(--ease) both; }
.lw-line.you { align-self: flex-end; border-radius: 16px 16px 5px 16px; background: linear-gradient(135deg, var(--fab-g1), var(--fab-g2)); color: #fff; }
.lw-line.note { max-width: 100%; align-self: stretch; background: none; padding: 0 2px; color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: flex-start; }
.lw-line.note svg { width: 13px; height: 13px; stroke: currentColor; flex: none; margin-top: 3px; }
.lw-empty { margin: auto; text-align: center; display: grid; gap: 4px; max-width: 270px; color: var(--muted); font-size: 13.5px; }
.lw-empty b { font-size: 16px; color: var(--text); }
.lw-type { flex: none; display: flex; gap: 6px; padding: 0 14px 10px; }
.lw-input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; font-size: 14px; background: var(--surface-2); color: var(--text); }
.lw-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); background: var(--surface); }
.lw-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line-2); }
.lw-foot .lw-round { background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; width: 52px; height: 52px; }
.lw-foot .lw-round.on { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.lw-call { flex: 1; height: 52px; border: 0; border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; color: #fff; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--fab-g1), var(--fab-g2)); box-shadow: 0 10px 22px -8px rgba(99, 70, 229, .6), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .3s var(--spring), filter .2s; }
.lw-call:hover { filter: brightness(1.07); transform: translateY(-1px); }
.lw-call:active { transform: scale(.97); }
.lw-call.end { background: linear-gradient(135deg, #f43f5e, #dc2626); box-shadow: 0 10px 22px -8px rgba(220, 38, 38, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.lw-call svg { width: 20px; height: 20px; stroke: currentColor; }
.lw-setbox { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 8px 18px 14px; }
.lw.settings .lw-setbox { display: block; }
.lw.settings .lw-wave, .lw.settings .lw-list, .lw.settings .lw-type { display: none; }
.lw-field { margin-bottom: 18px; }
.lw-field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.lw-seg { display: flex; gap: 3px; padding: 3px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 6px; }
.lw-seg button { flex: 1; height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.lw-seg button.on { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.lw-voice { display: flex; gap: 8px; align-items: center; }
.lw-voice .input { flex: 1; min-width: 0; height: 44px; }
.lw-spd { display: flex; justify-content: space-between; }
.lw-field input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.lw-more { width: 100%; justify-content: center; }

/* Assistant window (the drawer, now a floating panel / sheet) */
.dock-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; width: 100%; }
.dh-hero { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 8px 0 6px; }
.dh-hero .ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--fab-g1), var(--fab-g2)); box-shadow: 0 8px 18px -8px rgba(99, 70, 229, .6); }
.dh-hero .ico svg { width: 22px; height: 22px; stroke: currentColor; }
.dh-hero b { font-size: 17px; }
.dh-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.dh-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.dh-ideas .hc-idea { height: 38px; white-space: normal; text-align: left; }
.dh-recent { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.dh-chat { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface-2); font-size: 13.5px; transition: border-color .2s, background .2s; }
.dh-chat:hover { border-color: var(--accent); background: var(--accent-soft); }
.dh-chat svg { width: 16px; height: 16px; stroke: var(--muted); flex: none; }
.dh-chat .ell { flex: 1; min-width: 0; }
.dh-appr { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 13px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 13.5px; }
.dh-appr svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.dh-appr span { flex: 1; }
.dock-tool { flex: none; width: 44px; height: 44px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.dock-tool:hover { background: var(--accent-soft); color: var(--accent); }
.dock-tool.rec { background: #dc2626; color: #fff; animation: mic-pulse 1.4s ease-out infinite; }
.dock-tool svg { width: 19px; height: 19px; stroke: currentColor; }
.dock-tool.rec svg { fill: currentColor; width: 14px; height: 14px; }
.dock-foot .hc-send { width: 44px; height: 44px; }
.dock-input { min-height: 44px; }
.dock-atts { padding: 8px 12px 0; margin: 0; border-top: 1px solid var(--line-2); }
.dock-atts[hidden] { display: none; }
.dm-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; opacity: .9; }
.dm-files span { display: inline-flex; align-items: center; gap: 4px; }
.dm-files svg { width: 12px; height: 12px; stroke: currentColor; }
.dock-full { gap: 6px; }
.dock-head { padding-top: 12px; }

/* ---------- Phase 10: announcements — bell, panel, popup, composer ---------- */
:root {
  --ann-badge: #e11d48; --ann-unread: #f6f6ff;
  --ak: var(--accent); --ak-soft: var(--accent-soft); --ak-1: #5b54e8; --ak-2: #7c3aed;
}
html[data-theme="dark"] { --ann-badge: #f43f5e; --ann-unread: rgba(154, 155, 250, .08); }
.ak-news { --ak: var(--accent); --ak-soft: var(--accent-soft); --ak-1: #5b54e8; --ak-2: #7c3aed; }
.ak-update { --ak: var(--k-fast); --ak-soft: rgba(47, 143, 209, .13); --ak-1: #2f8fd1; --ak-2: #4f46e5; }
.ak-fix { --ak: var(--ok); --ak-soft: var(--ok-soft); --ak-1: #059669; --ak-2: #0e9f8a; }
.ak-warning { --ak: var(--warn); --ak-soft: var(--warn-soft); --ak-1: #f59e0b; --ak-2: #ea580c; }
[data-ann-badge][hidden] { display: none !important; }
.nav .nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 500; cursor: pointer; text-align: left; transition: background .18s var(--ease), color .18s var(--ease); }
.nav .nav-btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; opacity: .85; }
.nav .nav-btn:hover { background: var(--line-2); color: var(--text); }
.nav .nav-btn .badge { margin-left: auto; }
.nav .nav-btn:focus-visible, .ann-row:focus-visible, .ac-kind:focus-visible, .ac-ic:focus-visible, .ann-card .btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--accent-ring); }

.ann-bell { position: relative; }
.ann-bell svg { width: 18px; height: 18px; }
.ann-bell[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.ann-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ann-badge); color: #fff; font: 700 10.5px/17px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.ann-bell.ring svg { transform-origin: 50% 0; animation: annring .9s var(--ease) 1; }
@keyframes annring { 0% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-13deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } 100% { transform: rotate(0); } }

/* panel: a popover under the bell on desktop, a bottom sheet on a phone */
.ann-scrim { position: fixed; inset: 0; z-index: 74; background: transparent; }
.ann-panel { position: fixed; z-index: 75; top: 62px; right: 24px; width: min(412px, calc(100vw - 24px)); max-height: min(660px, calc(100vh - 86px)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); animation: annpop .22s var(--ease) both; transform-origin: 90% 0; outline: 0; }
.ann-panel.out, .ann-scrim.out { animation: annout .18s ease both; }
@keyframes annpop { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes annout { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
.ann-grab { display: none; width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
.ann-head { display: flex; align-items: center; gap: 8px; padding: 16px 12px 12px 18px; border-bottom: 1px solid var(--line-2); flex: none; }
.ann-ht { flex: 1; min-width: 0; }
.ann-head h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.ann-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ann-head .btn.sm { flex: none; }
.ann-list { overflow-y: auto; overscroll-behavior: contain; padding: 6px; min-height: 120px; }
.ann-list .empty { padding: 34px 20px 38px; }
.ann-skel { display: grid; gap: 8px; padding: 6px; }
.ann-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ann-item { border-radius: 13px; transition: background .18s var(--ease); }
.ann-item:hover { background: var(--surface-2); }
.ann-item.unread { background: var(--ann-unread); }
.ann-item.open { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.ann-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: transparent; border-radius: 13px; text-align: left; cursor: pointer; color: inherit; min-height: 62px; }
.ann-row:disabled { cursor: default; opacity: 1; color: inherit; }
.ann-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ak-soft); color: var(--ak); }
.ann-ico svg { width: 18px; height: 18px; stroke: currentColor; }
.ann-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ann-title { font-size: 14px; font-weight: 500; color: var(--text-2); line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-item.unread .ann-title, .ann-item.open .ann-title { font-weight: 650; color: var(--text); }
.ann-item.open .ann-title { -webkit-line-clamp: unset; display: block; }
.ann-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.ann-meta span:first-child { color: var(--ak); font-weight: 600; }
.ann-meta i { font-style: normal; opacity: .6; }
.ann-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ak); box-shadow: 0 0 0 3px var(--ak-soft); }
.ann-chev { flex: none; color: var(--muted); display: grid; transition: transform .22s var(--ease); }
.ann-chev svg { width: 15px; height: 15px; stroke: currentColor; }
.ann-item.open .ann-chev { transform: rotate(90deg); }
.ann-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ease); }
.ann-item.open .ann-more, .ann-panel.static .ann-more { grid-template-rows: 1fr; }
.ann-more-in { overflow: hidden; min-height: 0; padding: 0 14px 0 62px; display: grid; gap: 10px; }
.ann-item.open .ann-more-in { padding-bottom: 14px; }
.ann-body { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); background: var(--line-2); }
.ann-act { justify-self: start; }
.ann-act svg { width: 14px; height: 14px; }
.ann-panel.static { position: static; width: 100%; max-height: none; animation: none; box-shadow: var(--shadow-2); }
.ann-panel.static .ann-list { overflow: visible; }

/* popup */
.ann-ov { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; background: rgba(12, 14, 22, .5); backdrop-filter: blur(6px); animation: fadein .2s ease both; }
.ann-ov.out { animation: annfade .18s ease both; }
@keyframes annfade { to { opacity: 0; } }
.ann-ov.static { position: static; z-index: auto; padding: 18px 12px; border-radius: 14px; background: var(--line-2); backdrop-filter: none; animation: none; }
.ann-card { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-3); animation: anncard .42s cubic-bezier(.34, 1.56, .64, 1) both; }
.ann-ov.static .ann-card { animation: none; margin: 0 auto; }
@keyframes anncard { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.ann-hero { position: relative; height: 156px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--ak-1), var(--ak-2)); }
.ann-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .28), transparent 55%), radial-gradient(80% 80% at 100% 100%, rgba(0, 0, 0, .22), transparent 60%); }
.ann-halo { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); animation: annhalo 3.2s ease-out infinite; }
.ann-halo.b { animation-delay: 1.6s; }
@keyframes annhalo { from { transform: scale(.7); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
.ann-bigico { position: relative; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .42); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .4); backdrop-filter: blur(8px); animation: annfloat 4.5s ease-in-out infinite; }
.ann-bigico svg { width: 36px; height: 36px; stroke: #fff; }
@keyframes annfloat { 50% { transform: translateY(-5px) rotate(-3deg); } }
.ann-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ann-hero.has-img .ann-bigico, .ann-hero.has-img .ann-halo, .ann-hero.has-img::before { display: none; }
.ann-card-b { padding: 22px 26px 6px; }
.ann-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ak-soft); color: var(--ak); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.ann-chip time { font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .85; }
.ann-chip i { font-style: normal; opacity: .6; }
.ann-card-t { margin: 12px 0 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ann-card-p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 38vh; overflow: auto; }
.ann-card-f { display: grid; gap: 4px; padding: 18px 26px 22px; }
.ann-card-f .btn { justify-content: center; height: 46px; border-radius: 13px; font-size: 14.5px; }
.ann-card-f .ann-go { background: linear-gradient(135deg, var(--ak-1), var(--ak-2)); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px var(--ak-1); }
.ann-card-f .ann-go:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--ak-1), var(--ak-2)); }
.ann-card-f .ann-go svg { width: 16px; height: 16px; }
.ann-card-f .ann-later, .ann-card-f .ann-sec { height: 40px; color: var(--text-2); }

/* composer */
.ac-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ac-prev { position: sticky; top: 76px; padding: 16px; display: grid; gap: 12px; }
.ac-prev-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-prev-h .grow { flex: 1; }
.ac-prev-l { display: flex; }
.ac-prev-body > * { pointer-events: none; }
.ac-form .field:last-child { margin-bottom: 0; }
.ac-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ac-in { position: relative; display: grid; }
.ac-count { position: absolute; right: 10px; bottom: 6px; font-size: 11px; color: var(--muted); pointer-events: none; background: var(--surface); padding: 0 4px; border-radius: 4px; }
.ac-in input.input { padding-right: 62px; }
.ac-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ac-kind { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text-2); transition: border-color .18s, background .18s, box-shadow .18s, transform .18s var(--ease); min-height: 44px; }
.ac-kind:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.ac-kind[aria-checked="true"] { border-color: var(--ak); background: var(--ak-soft); color: var(--ak); box-shadow: 0 0 0 3px var(--ak-soft); }
.ac-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-ic { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); transition: border-color .18s, background .18s; }
.ac-ic svg { width: 17px; height: 17px; stroke: currentColor; }
.ac-ic:hover { background: var(--line-2); }
.ac-ic[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ac-auto { font-weight: 700; font-size: 13px; }
.ac-aud { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.ac-aud:has(input[hidden]) { grid-template-columns: 1fr; }
.ac-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; margin-bottom: 14px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.ac-sub[hidden] { display: none; }
.ac-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ac-sent { list-style: none; margin: 0; padding: 0; }
.ac-sent li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.ac-sent li:first-child { border-top: 0; }
.ac-sent-m { flex: 1; min-width: 0; }
.ac-sent-m b { display: block; overflow-wrap: anywhere; }
.ac-sent-s, .ac-sent-a { display: flex; gap: 6px; flex: none; }
.ac-sent .badge svg { width: 12px; height: 12px; stroke: currentColor; }
@media (max-width: 1000px) { .ac-grid { grid-template-columns: 1fr; } .ac-prev { position: static; } }
@media (max-width: 700px) {
  .ann-scrim { background: rgba(12, 14, 22, .4); }
  .ann-panel { top: auto; right: 0; left: 0; bottom: 0; width: auto; max-height: 86vh; max-height: 86dvh; border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: annsheet .3s var(--ease) both; }
  .ann-panel.static { border-radius: 16px; border: 1px solid var(--line); padding-bottom: 0; }
  .ann-panel.out { animation: annsheetout .2s ease both; }
  .ann-grab { display: block; }
  .ann-panel.static .ann-grab { display: none; }
  .ann-head { padding-top: 10px; }
  .ann-head .btn.sm, .ann-head .btn.icon { min-height: 40px; }
  .ann-row { min-height: 68px; }
  .ann-ov:not(.static) { place-items: end center; padding: 0; }
  .ann-ov:not(.static) .ann-card { width: 100%; border-radius: 26px 26px 0 0; border-bottom: 0; max-height: 92vh; max-height: 92dvh; animation: annsheet .38s var(--ease) both; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .ann-card-b { padding: 20px 20px 4px; } .ann-card-f { padding: 16px 20px 20px; }
  .ac-two, .ac-aud { grid-template-columns: 1fr; }
  .ac-kinds { grid-template-columns: repeat(2, 1fr); }
  .ac-sent li { flex-wrap: wrap; padding: 12px 14px; } .ac-sent-m { flex-basis: calc(100% - 60px); } .ac-sent-s, .ac-sent-a { margin-left: 50px; }
  .ac-actions .btn { flex: 1; justify-content: center; height: 44px; }
}
@keyframes annsheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes annsheetout { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .ann-halo, .ann-bigico, .ann-bell.ring svg { animation: none !important; } .ann-more { transition: none; } }

.pause-strip { display: flex; align-items: center; gap: 10px; margin: 0 16px 8px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.pause-strip[hidden] { display: none; }
.pause-strip svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.pause-strip span { flex: 1; }

/* Headline type uses the display face */
.page-head h1, .chat-hero h2, .board-headline, .login h1, .md h1, .md h2, .insp-h h2, .kpi .value, .bc-value, .bc-title, .brand { font-family: var(--font-display); }

/* first-run welcome path (welcomeWizard in app.js): big targets, one question per screen, short motion */
.overlay.wiz { place-items: center; padding: 16px; background: radial-gradient(900px 500px at 50% 0%, rgba(99, 102, 241, .35), transparent 70%), rgba(15, 18, 25, .6); backdrop-filter: blur(6px); }
.wiz-card { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-3); padding: 22px 24px 20px; animation: pop .28s var(--ease) both; }
.wiz-bar { display: flex; gap: 6px; margin-bottom: 22px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wiz-orb { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, #8b8cf8, var(--accent) 60%, #3730a3); box-shadow: 0 10px 24px -10px var(--accent); animation: wizfloat 3.2s ease-in-out infinite; }
.wiz-orb svg { width: 20px; height: 20px; stroke: #fff; }
.wiz-count { font-size: 14px; font-weight: 600; color: var(--muted); }
@keyframes wizfloat { 50% { transform: translateY(-3px); box-shadow: 0 14px 26px -10px var(--accent); } }
.wiz-bar i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.wiz-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.wiz-bar i.on::after { transform: scaleX(1); }
.wiz-step { animation: wizfwd .28s var(--ease) both; }
.wiz-step.back { animation-name: wizback; }
@keyframes wizfwd { from { opacity: 0; transform: translateX(24px); } }
@keyframes wizback { from { opacity: 0; transform: translateX(-24px); } }
.wiz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wiz-head h2 { margin: 0; font-size: clamp(22px, 5vw, 28px); line-height: 1.25; letter-spacing: -.01em; }
.wiz-sub { margin: 8px 0 0; font-size: 16px; color: var(--muted, #667085); }
.wiz-step > :last-child { margin-top: 18px; }
.wiz-lang { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wiz-big { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 84px; font-size: 26px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface-2, var(--surface)); color: inherit; cursor: pointer; transition: transform .15s var(--ease), border-color .15s, background .15s; }
.wiz-big:hover { border-color: var(--accent); transform: translateY(-2px); }
.wiz-big.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.wiz-big svg { width: 24px; height: 24px; stroke: currentColor; }
.wiz-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wiz-tile { position: relative; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px; text-align: left; font-size: 17px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2, var(--surface)); color: inherit; cursor: pointer; animation: rise .4s var(--ease) both; transition: transform .15s var(--ease), border-color .15s, background .15s; }
.wiz-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.wiz-tile .em { font-size: 28px; line-height: 1; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.wiz-tile .tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transform: scale(0); transition: transform .2s var(--ease); }
.wiz-tile .tick svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; }
.wiz-tile.on { border-color: var(--accent); background: var(--accent-soft); }
.wiz-tile.on .tick { transform: scale(1); }
.wiz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wiz-chip { min-height: 48px; padding: 8px 18px; font-size: 18px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface-2, var(--surface)); color: inherit; cursor: pointer; }
.wiz-chip:hover { border-color: var(--accent); color: var(--accent); }
.wiz-name { min-height: 56px; font-size: 20px; }
.wiz-done { display: grid; justify-items: center; gap: 18px; padding: 6px 0; }
.wiz-check { width: 96px; height: 96px; fill: none; stroke: #059669; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wiz-check circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s var(--ease) .05s forwards; }
.wiz-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s var(--ease) .55s forwards; }
.wiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.wiz-foot .btn { min-height: 52px; padding: 0 22px; font-size: 17px; border-radius: 14px; }
.wiz-next svg { width: 18px; height: 18px; }
.wiz-head .gs-say { flex: none; }
.wiz-foot { position: sticky; bottom: -20px; z-index: 1; background: var(--surface); padding: 10px 0 2px; }
@media (max-width: 520px) { .wiz-card { padding: 18px 16px 16px; } .wiz-tiles { gap: 8px; } .wiz-tile { flex-direction: column; justify-content: center; text-align: center; gap: 8px; min-height: 104px; padding: 12px 8px; font-size: 15px; } .wiz-big { font-size: 22px; min-height: 72px; } .wiz-lang { grid-template-columns: 1fr; } }
.note[hidden] { display: none; }
