/* Fahad AI Office — UX & Workflow V2.
   Design tokens first; every component below uses only these variables.
   The final visual identity (V3) replaces the token values, not the rules. */

/* ---------------------------------------------------------------- V4 tokens
   Premium, calm, neutral. Dark is deep graphite (never pure black); light is
   a real light design (off-white canvas, white surfaces), not an inversion.
   Colour, type, spacing, radii, depth, blur, motion, z-index and status all
   live here; components use only these variables. */
:root {
  /* colour — dark (default) */
  --bg: #0f1012;
  --bg-elevated: #131417;
  --surface: #17181b;
  --surface-2: #1d1e22;
  --surface-3: #25262b;
  --surface-glass: rgba(29, 30, 34, .9);
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #f2f2f4;
  --text-muted: #a1a1aa;
  --text-faint: #8f8f96;
  --accent: #5e98ff;
  --accent-strong: #2458c4;
  --accent-fill: #2a66dc;
  --accent-soft: rgba(76, 141, 255, .14);
  --on-accent: #ffffff;
  --success: #34c77b;
  --success-soft: rgba(52, 199, 123, .13);
  --warning: #f2b544;
  --warning-soft: rgba(242, 181, 68, .13);
  --danger: #f36f68;
  --danger-soft: rgba(242, 102, 94, .13);
  --info: #5ab0f2;
  --info-soft: rgba(90, 176, 242, .12);
  --code-bg: #0c0d0f;
  --scrim: rgba(6, 7, 9, .56);
  --floor-a: #16171a;
  --floor-b: #1b1c20;
  --floor-line: rgba(255, 255, 255, .045);
  --desk-top: #22242a;
  --desk-edge: #2c2e35;
  --screen: #0b0c0e;
  --screen-line: rgba(255, 255, 255, .16);
  --glow: rgba(76, 141, 255, .28);
  --focus: 0 0 0 3px rgba(76, 141, 255, .5);

  /* status (visual state of employees and work) */
  --st-available: #909ca8;
  --st-thinking: #9b8cff;
  --st-working: #5e98ff;
  --st-testing: #36b3c9;
  --st-waiting: #c9a24a;
  --st-reviewing: #8393ff;
  --st-needs: #ff9f43;
  --st-blocked: #f36f68;
  --st-completed: #34c77b;

  /* spacing (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* typography — Inter for Latin, IBM Plex Sans Arabic for Arabic */
  --font: "Inter", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Arabic", Arial, sans-serif;
  --font-display: "Inter", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 11.5px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 30px; --fs-3xl: 40px;
  --lh: 1.55; --lh-tight: 1.2;
  --tracking-tight: -.02em; --tracking-caps: .08em;

  /* shape, depth, blur */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-2xl: 28px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --blur: saturate(160%) blur(18px);

  /* motion — start, handoff, processing, waiting, completion, attention */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  --t-fast: 120ms; --t-base: 200ms; --t-slow: 320ms; --t-scene: 600ms; --t-handoff: 1800ms;

  /* layers */
  --z-base: 1; --z-sticky: 10; --z-overlay: 30; --z-drawer: 40; --z-modal: 50; --z-toast: 60;

  /* layout */
  --sidebar-w: 256px;
  --content-w: 880px;
}

/* Light — follows the system unless Fahad picks one in Settings. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f5f7; --bg-elevated: #fbfbfd; --surface: #ffffff; --surface-2: #f2f2f5; --surface-3: #e8e8ed; --surface-glass: rgba(255, 255, 255, .92);
    --border: rgba(0, 0, 0, .07); --border-strong: rgba(0, 0, 0, .13); --text: #1d1d1f; --text-muted: #5f5f65; --text-faint: #646469;
    --accent: #0856b2; --accent-strong: #06458f; --accent-fill: #0a6cdf; --accent-soft: rgba(10, 108, 223, .1);
    --success: #16673d; --success-soft: rgba(31, 143, 85, .1); --warning: #7a4d00; --warning-soft: rgba(200, 130, 0, .12);
    --danger: #a42e28; --danger-soft: rgba(210, 59, 51, .09); --info: #155e90; --info-soft: rgba(27, 120, 184, .09);
    --code-bg: #f4f4f7; --scrim: rgba(20, 20, 25, .28);
    --floor-a: #eeeef2; --floor-b: #e7e7ec; --floor-line: rgba(0, 0, 0, .05); --desk-top: #ffffff; --desk-edge: #dcdce2; --screen: #1c1d21; --screen-line: rgba(255, 255, 255, .22); --glow: rgba(10, 108, 223, .18);
    --st-available: #5b5e64; --st-thinking: #574aba; --st-working: #0856b2; --st-testing: #0a6374; --st-waiting: #725715; --st-reviewing: #4250b5; --st-needs: #9a4f00; --st-blocked: #a42e28; --st-completed: #16673d;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06); --shadow-2: 0 8px 24px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05); --shadow-3: 0 24px 56px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
    --focus: 0 0 0 3px rgba(10, 108, 223, .35);
  }
}
:root[data-theme="light"] {
    --bg: #f5f5f7; --bg-elevated: #fbfbfd; --surface: #ffffff; --surface-2: #f2f2f5; --surface-3: #e8e8ed; --surface-glass: rgba(255, 255, 255, .92);
    --border: rgba(0, 0, 0, .07); --border-strong: rgba(0, 0, 0, .13); --text: #1d1d1f; --text-muted: #5f5f65; --text-faint: #646469;
    --accent: #0856b2; --accent-strong: #06458f; --accent-fill: #0a6cdf; --accent-soft: rgba(10, 108, 223, .1);
    --success: #16673d; --success-soft: rgba(31, 143, 85, .1); --warning: #7a4d00; --warning-soft: rgba(200, 130, 0, .12);
    --danger: #a42e28; --danger-soft: rgba(210, 59, 51, .09); --info: #155e90; --info-soft: rgba(27, 120, 184, .09);
    --code-bg: #f4f4f7; --scrim: rgba(20, 20, 25, .28);
    --floor-a: #eeeef2; --floor-b: #e7e7ec; --floor-line: rgba(0, 0, 0, .05); --desk-top: #ffffff; --desk-edge: #dcdce2; --screen: #1c1d21; --screen-line: rgba(255, 255, 255, .22); --glow: rgba(10, 108, 223, .18);
    --st-available: #5b5e64; --st-thinking: #574aba; --st-working: #0856b2; --st-testing: #0a6374; --st-waiting: #725715; --st-reviewing: #4250b5; --st-needs: #9a4f00; --st-blocked: #a42e28; --st-completed: #16673d;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06); --shadow-2: 0 8px 24px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05); --shadow-3: 0 24px 56px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
    --focus: 0 0 0 3px rgba(10, 108, 223, .35);
}

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("./fonts/inter-latin-var.woff2?v=b4ef2db4c564") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("./fonts/plex-arabic-400.woff2?v=b4ef2db4c564") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("./fonts/plex-arabic-500.woff2?v=b4ef2db4c564") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("./fonts/plex-arabic-600.woff2?v=b4ef2db4c564") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("./fonts/plex-arabic-700.woff2?v=b4ef2db4c564") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-md)/var(--lh) var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
.num, .tabular { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); }
[dir="rtl"], :lang(ar) { letter-spacing: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); }
.row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: var(--s-3); }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-success { background: var(--success); border-color: var(--success); color: var(--bg); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 30px; padding: 0 var(--s-3); font-size: var(--fs-xs); }
.btn-lg { min-height: 44px; padding: 0 var(--s-6); font-size: var(--fs-md); }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 16px; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.input { width: 100%; min-height: 40px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input-sm { min-height: 34px; font-size: var(--fs-sm); }
textarea.input { resize: vertical; line-height: var(--lh); }
.field-label { display: block; margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; }
.form-error { color: var(--danger); font-size: var(--fs-sm); margin: var(--s-2) 0; }

/* ---------------------------------------------------------------- badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.running, .pill.active, .pill.queued { background: var(--info-soft); color: var(--info); }
.pill.attention, .pill.awaiting_approval, .pill.blocked, .pill.cooldown { background: var(--warning-soft); color: var(--warning); }
.pill.completed, .pill.available { background: var(--success-soft); color: var(--success); }
.pill.failed, .pill.account { background: var(--danger-soft); color: var(--danger); }
.pill.cancelled, .pill.unavailable { background: var(--surface-3); color: var(--text-faint); }
.count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; text-align: center; line-height: 20px; }
.count-alert { background: var(--warning); color: #1a1204; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); box-shadow: var(--shadow-1); }
.card + .card { margin-top: var(--s-4); }
.card-title { margin: 0 0 var(--s-3); font-size: var(--fs-md); font-weight: 700; }
.section-title { margin: var(--s-6) 0 var(--s-3); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.empty { padding: var(--s-8) var(--s-4); text-align: center; color: var(--text-muted); }
.empty h3 { margin: 0 0 var(--s-2); color: var(--text); font-size: var(--fs-lg); }
.list-item { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.list-item + .list-item { margin-top: var(--s-2); }
.list-item:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.list-item .title { font-weight: 600; overflow-wrap: anywhere; }
.list-item .sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-3); }
.kv div { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); min-width: 0; }
.kv dt { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.tabs { display: flex; gap: var(--s-1); overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: var(--s-4); scrollbar-width: none; }
.tab { padding: var(--s-2) var(--s-3); border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
details.disclosure { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
details.disclosure + details.disclosure { margin-top: var(--s-2); }
details.disclosure > summary { cursor: pointer; padding: var(--s-3) var(--s-4); font-weight: 600; font-size: var(--fs-sm); color: var(--text-muted); list-style: none; }
details.disclosure > summary::before { content: "▸ "; }
details.disclosure[open] > summary::before { content: "▾ "; }
details.disclosure > .disclosure-body { padding: 0 var(--s-4) var(--s-4); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--text-faint); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.toast { position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: var(--s-2) var(--s-4); border-radius: var(--r-md); box-shadow: var(--shadow-2); z-index: 50; max-width: calc(100vw - 32px); }

/* ---------------------------------------------------------------- login */
.login { min-height: 100%; display: grid; place-items: center; padding: var(--s-4); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--shadow-2); }
.login-card h1 { margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-xl); }
.login-card .btn { margin-top: var(--s-5); }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4) var(--s-3); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; min-height: 0; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: var(--s-2); color: var(--text); font-weight: 700; text-decoration: none; padding: var(--s-1) var(--s-2); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; font-weight: 800; }
.project-select { margin-top: var(--s-1); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: var(--s-4) var(--s-2) var(--s-1); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.nav-item { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-ico { width: 18px; text-align: center; }
.recent-chats { display: flex; flex-direction: column; gap: 1px; margin: 0 0 var(--s-1) var(--s-5); }
.recent-chats a { display: block; padding: 5px var(--s-2); border-radius: var(--r-sm); color: var(--text-muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.recent-chats a:hover { background: var(--surface-2); color: var(--text); }
.recent-chats a.active { color: var(--text); background: var(--surface-2); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.view { flex: 1 1 auto; overflow-y: auto; min-height: 0; outline: none; }
.view:focus, .view:focus-visible { box-shadow: none; }
.page { max-width: var(--content-w); margin: 0 auto; padding: var(--s-8) var(--s-6) var(--s-10); }
.page-wide { max-width: 1120px; }
.page-head { display: flex; gap: var(--s-3); align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--s-5); }
.page-head h1 { margin: 0; font-size: var(--fs-2xl); line-height: 1.2; overflow-wrap: anywhere; }
.page-head p { margin: var(--s-1) 0 0; color: var(--text-muted); }
.topbar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-title { font-weight: 700; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attention-dot { color: var(--warning); }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 19; }
.only-mobile { display: none; }
.show-sm { display: none; }

/* ---------------------------------------------------------------- chat */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-6); border-bottom: 1px solid var(--border); min-height: 56px; }
.chat-title { margin: 0; font-size: var(--fs-md); flex: 1; min-width: 0; font-weight: 700; font-size: var(--fs-md); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.messages { max-width: var(--content-w); margin: 0 auto; padding: var(--s-6) var(--s-6) var(--s-4); }
.msg { display: flex; margin-bottom: var(--s-5); }
.msg-user { justify-content: flex-end; }
.bubble { max-width: 82%; min-width: 0; }
.msg-user .bubble { background: var(--accent-soft); border: 1px solid var(--border); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-office .bubble { max-width: 100%; width: 100%; }
.msg-meta { margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--text-faint); display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.msg-user .msg-meta { justify-content: flex-end; }
.msg-actions { display: flex; gap: var(--s-1); margin-top: var(--s-1); }
.thinking { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-muted); font-size: var(--fs-sm); padding: var(--s-2) 0; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .8; } }
.composer-wrap { border-top: 1px solid var(--border); background: var(--bg); padding: var(--s-3) var(--s-6) var(--s-4); }
.composer { max-width: var(--content-w); margin: 0 auto; display: flex; gap: var(--s-2); align-items: flex-end; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: var(--s-2); }
.composer:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; max-height: 240px; min-height: 40px; padding: var(--s-2); outline: none; line-height: var(--lh); }
.composer-hint { max-width: var(--content-w); margin: var(--s-1) auto 0; font-size: var(--fs-xs); color: var(--text-faint); text-align: center; }
.welcome { max-width: 640px; margin: 12vh auto 0; padding: 0 var(--s-6); text-align: center; }
.welcome h1 { font-size: var(--fs-2xl); margin: var(--s-4) 0 var(--s-2); }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-2); margin-top: var(--s-6); text-align: left; }
.suggestion { padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: var(--fs-sm); color: var(--text-muted); }
.suggestion:hover { border-color: var(--accent); color: var(--text); }
.task-chip { display: flex; gap: var(--s-3); align-items: center; margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; }
.task-chip:hover { background: var(--surface-2); text-decoration: none; }
.error-note { color: var(--danger); background: var(--danger-soft); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
.error-details { margin-top: var(--s-2); color: var(--text-muted); } .error-details summary { cursor: pointer; font-size: var(--fs-xs); } .error-details code { display: block; white-space: pre-wrap; word-break: break-word; margin-top: var(--s-1); font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- markdown */
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .table-wrap { margin: 0 0 var(--s-3); }
.md h1, .md h2, .md h3, .md h4 { margin: var(--s-5) 0 var(--s-2); line-height: 1.3; }
.md h1 { font-size: var(--fs-xl); } .md h2 { font-size: var(--fs-lg); } .md h3, .md h4 { font-size: var(--fs-md); }
.md ul, .md ol { padding-inline-start: var(--s-6); }
.md li + li { margin-top: 2px; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.md pre { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-8) var(--s-4) var(--s-3); overflow-x: auto; }
.md pre[data-lang]::before { content: attr(data-lang); position: absolute; top: var(--s-2); left: var(--s-4); font-size: var(--fs-xs); color: var(--text-faint); font-family: var(--mono); }
.md pre code { background: none; padding: 0; font-size: var(--fs-sm); white-space: pre; }
.md pre .copy { position: absolute; top: var(--s-1); right: var(--s-1); }
.md blockquote { border-inline-start: 3px solid var(--border-strong); padding-inline-start: var(--s-3); color: var(--text-muted); }
.md table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.md th, .md td { border-bottom: 1px solid var(--border); padding: var(--s-2) var(--s-3); text-align: start; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-4) 0; }

/* ---------------------------------------------------------------- tasks */
.task-head { display: grid; gap: var(--s-3); }
.task-head h1 { margin: 0; font-size: var(--fs-xl); line-height: 1.25; overflow-wrap: anywhere; }
.now { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); font-weight: 600; }
.now .dots { flex: none; }
.timeline { display: flex; gap: 0; overflow-x: auto; padding: var(--s-2) 0 var(--s-1); scrollbar-width: thin; }
.step { flex: 1 0 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; font-size: var(--fs-xs); color: var(--text-faint); padding: 0 2px; }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--border); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-3); border: 2px solid var(--border-strong); color: var(--text-faint); }
.step.passed .dot { background: var(--success); border-color: var(--success); color: #06140e; }
.step.passed::before, .step.active::before, .step.failed::before, .step.needs_input::before { background: var(--success); }
.step.active .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.step.failed .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.step.needs_input .dot { background: var(--warning); border-color: var(--warning); color: #1a1204; }
.step.skipped { opacity: .45; }
.step.active, .step.needs_input, .step.failed { color: var(--text); font-weight: 700; }
.owner-card { border: 1px solid var(--warning); background: linear-gradient(0deg, var(--warning-soft), var(--warning-soft)), var(--surface); border-radius: var(--r-lg); padding: var(--s-5); }
.owner-card h2 { margin: 0 0 var(--s-2); font-size: var(--fs-lg); }
.owner-card .what { font-weight: 700; }
.owner-card .resources { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-2) 0; }
.owner-card .resources code { font-family: var(--mono); font-size: var(--fs-xs); background: var(--surface-3); padding: 2px 8px; border-radius: var(--r-sm); overflow-wrap: anywhere; }
.owner-item + .owner-item { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.risk { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.risk.high, .risk.critical { color: var(--danger); } .risk.medium { color: var(--warning); } .risk.low { color: var(--success); }
.events { max-height: 420px; overflow: auto; font-family: var(--mono); font-size: var(--fs-xs); }
.events div { padding: 5px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; white-space: pre-wrap; }
.events .warning { color: var(--warning); } .events .error { color: var(--danger); } .events .success { color: var(--success); }
.report { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.files { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.files code { font-family: var(--mono); font-size: var(--fs-xs); background: var(--surface-2); padding: 2px 8px; border-radius: var(--r-sm); overflow-wrap: anywhere; }
.big-input { min-height: 160px; font-size: var(--fs-md); }

/* ---------------------------------------------------------------- office */
.pill.st-available { background: var(--surface-3); color: var(--text-muted); }
.pill.st-working { background: var(--info-soft); color: var(--info); }
.pill.st-waiting { background: var(--surface-3); color: var(--text-faint); }
.pill.st-blocked { background: var(--danger-soft); color: var(--danger); }
.pill.st-needs { background: var(--warning-soft); color: var(--warning); }
.pill.st-completed { background: var(--success-soft); color: var(--success); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--text); font-weight: 800; border: 2px solid var(--agent, var(--accent)); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-xl); }
.welcome .avatar-lg { margin: 0 auto; }
.chat-who { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-6); border-bottom: 1px solid var(--border); background: var(--surface); }
.who-name { font-weight: 700; }
.who-role { font-size: var(--fs-sm); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s-3); }
.office-grid-1 { grid-template-columns: minmax(0, 460px); }
.agent-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.agent-card:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.agent-card .title { font-weight: 700; }
.agent-card.st-working { border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.agent-card.st-needs { border-color: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.agent-card.st-blocked { border-color: var(--danger); }
.agent-card.st-working .avatar { animation: pulse 1.6s infinite ease-in-out; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--info-soft); } 50% { box-shadow: 0 0 0 6px var(--info-soft); } }
@media (prefers-reduced-motion: reduce) { .agent-card.st-working .avatar { animation: none; } }
.agent-detail { overflow-wrap: anywhere; }
.agent-head { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.agent-head h1 { margin: 0; font-size: var(--fs-2xl); }
.flow-card { display: block; margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; }
.flow-card:hover { background: var(--surface-2); text-decoration: none; }
.flow-row { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--fs-sm); padding: 2px 0; min-width: 0; }
.flow-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-icon { width: 16px; flex: none; text-align: center; font-weight: 800; color: var(--text-faint); }
.st-done > .flow-icon { color: var(--success); }
.st-working > .flow-icon { color: var(--info); }
.st-failed > .flow-icon, .st-blocked > .flow-icon { color: var(--danger); }
.flow-node { display: flex; gap: var(--s-3); padding: var(--s-2) 0; }
.flow-node + .flow-node, .flow-branch + .flow-node { border-top: 1px dashed var(--border); }
.flow-branch { margin-left: var(--s-5); padding-left: var(--s-4); border-left: 2px solid var(--border); }
.flow-branch .flow-node.st-working { background: var(--info-soft); border-radius: var(--r-sm); padding-left: var(--s-2); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 20; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-2); }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .topbar.only-mobile { display: flex; }
  .page { padding: var(--s-5) var(--s-4) var(--s-8); }
  .page-head h1 { font-size: var(--fs-xl); }
  .messages { padding: var(--s-4); }
  .chat-head { padding: var(--s-1) var(--s-3); min-height: 44px; justify-content: flex-end; }
  .chat-head .chat-title { display: none; }
  .composer-wrap { padding: var(--s-2) var(--s-3) calc(var(--s-3) + env(safe-area-inset-bottom)); }
  .bubble { max-width: 92%; }
  .welcome { margin-top: 6vh; padding: 0 var(--s-4); }
  .owner-card { padding: var(--s-4); }
  .owner-card .row .btn { flex: 1 1 auto; }
  .chat-who { padding: var(--s-2) var(--s-3); }
  .flow-branch { margin-left: var(--s-2); padding-left: var(--s-3); }
}
@media (max-width: 520px) {
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { flex-basis: 72px; }
  .hide-sm { display: none; }
  .show-sm { display: block; }
}

/* ---------------------------------------------------------------- living office */

/* ---------------------------------------------------------------- chips, tags */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.chip { padding: 4px 12px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: var(--fs-sm); cursor: pointer; text-decoration: none; }
.chip.active, .chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); text-decoration: none; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tag.ok { background: var(--success-soft); color: var(--success); } .tag.warn { background: var(--warning-soft); color: var(--warning); }
.tag.bad { background: var(--danger-soft); color: var(--danger); } .tag.muted { background: var(--surface-3); color: var(--text-muted); }

/* ---------------------------------------------------------------- artifacts */
.artifact { margin: var(--s-4) 0; padding: var(--s-4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.artifact figcaption { display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; margin-bottom: var(--s-3); }
.art-type { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 800; }
.artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--s-4); align-items: start; }
.artifact-grid .artifact { margin: 0; }
.artifact-meta { margin-top: 4px; }
.art-scroll { overflow-x: auto; }
.art-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.art-table th { text-align: start; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); padding: 6px 8px; }
.art-table td { border-bottom: 1px solid var(--border); padding: 6px 8px; vertical-align: top; }
.art-chart svg { width: 100%; height: auto; display: block; }
.art-chart .grid line { stroke: var(--border); } .art-chart text { fill: var(--text-faint); font-size: 11px; }
.art-pie { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; } .art-pie svg { width: 180px; flex: none; }
.art-legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--s-2); }
.art-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }
.art-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.art-kpis div { padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); } .art-kpis span { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.art-timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--border-strong); }
.art-timeline li { display: flex; gap: var(--s-3); padding: 0 0 var(--s-3) var(--s-3); position: relative; }
.tl-dot { position: absolute; inset-inline-start: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.art-check { list-style: none; margin: 0; padding: 0; } .art-check li { display: flex; gap: var(--s-2); align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ck-box { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ck-done .ck-box, .ck-pass .ck-box { background: var(--success); border-color: var(--success); color: #fff; } .ck-fail .ck-box { background: var(--danger); border-color: var(--danger); color: #fff; } .ck-blocked .ck-box { border-color: var(--warning); color: var(--warning); }
.art-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: var(--s-3); overflow-x: auto; }
.kb-col { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-2); } .kb-head { font-weight: 700; font-size: var(--fs-sm); padding: 4px; }
.kb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s-2); margin-top: var(--s-2); font-size: var(--fs-sm); }
.art-flow { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.fl-step { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-2) var(--s-3); border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); max-width: 240px; }
.fl-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.fl-arrow { color: var(--text-faint); }
.mb-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s-3); }
.mb-chip { height: 72px; border-radius: var(--r-md); border: 1px solid var(--border); margin-bottom: 6px; }
.mb-type { display: grid; gap: var(--s-2); margin-top: var(--s-4); } .mb-sample { font-size: var(--fs-xl); line-height: 1.3; }
.mb-concepts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); margin: var(--s-4) 0 var(--s-3); }
.mb-concept { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.audit-verdict { display: inline-block; padding: 4px 14px; border-radius: var(--r-full); font-weight: 800; letter-spacing: .06em; font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.v-pass { background: var(--success-soft); color: var(--success); } .v-needs-work { background: var(--warning-soft); color: var(--warning); } .v-blocked { background: var(--danger-soft); color: var(--danger); }
.cc-kpi .audit-verdict { margin: 0; }
.issue { padding: var(--s-2) var(--s-3); border-inline-start: 3px solid var(--border-strong); background: var(--surface-2); border-radius: var(--r-sm); margin-bottom: var(--s-2); }
.issue.sev-critical, .issue.sev-high { border-color: var(--danger); } .issue.sev-medium, .issue.sev-review { border-color: var(--warning); }
.art-evidence { list-style: none; margin: 0; padding: 0; } .art-evidence li { display: flex; gap: var(--s-2); align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); }
.art-list { margin: var(--s-3) 0 0; padding-inline-start: 20px; } .art-list li { margin-bottom: var(--s-2); }
.rm { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px; max-width: 360px; }
.rm-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--fs-xs); color: var(--text-faint); text-align: center; }
.rm-x { grid-column: 2; font-size: var(--fs-xs); color: var(--text-faint); text-align: center; }
.rm-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.rm-cell { aspect-ratio: 1; border-radius: 4px; display: flex; flex-wrap: wrap; gap: 2px; align-content: center; justify-content: center; }
.rm-lo { background: var(--success-soft); } .rm-mid { background: var(--warning-soft); } .rm-hi { background: var(--danger-soft); }
.rm-cell b { font-size: 10px; background: var(--surface); border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; }

/* ---------------------------------------------------------------- command center */
.command-center > * + * { margin-top: var(--s-3); }
.cc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.cc-kpi { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.cc-kpi span { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; } .cc-kpi strong { font-size: var(--fs-xl); } .cc-kpi em { font-style: normal; font-size: var(--fs-xs); color: var(--text-faint); }
.cc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); } .cc-grid .card { margin: 0; }
.progress i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 720px) { .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-grid { grid-template-columns: minmax(0, 1fr); } .art-kpis { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- shared V4 components (state chips, role marks, progress, sheets) */
.state-chip { --c: var(--st-available); display: inline-flex; align-items: center; gap: 5px; padding: 1px var(--s-2); border-radius: var(--r-full); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.state-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-chip[data-state="THINKING"] { --c: var(--st-thinking); } .state-chip[data-state="WORKING"] { --c: var(--st-working); } .state-chip[data-state="TESTING"] { --c: var(--st-testing); }
.state-chip[data-state="REVIEWING"] { --c: var(--st-reviewing); } .state-chip[data-state="WAITING"], .state-chip[data-state="QUEUED"] { --c: var(--st-waiting); }
.state-chip[data-state="NEEDS FAHAD"] { --c: var(--st-needs); } .state-chip[data-state="BLOCKED"], .state-chip[data-state="FAILED"] { --c: var(--st-blocked); } .state-chip[data-state="COMPLETED"] { --c: var(--st-completed); }

.progress { display: block; height: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--t-scene) var(--ease-out); }
/* ---------------------------------------------------------------- role mark */
.role-mark { --agent: var(--accent); position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; }
.role-mark svg { width: 100%; height: 100%; }
.rm-bg { fill: color-mix(in srgb, var(--agent) 16%, var(--surface-2)); } .rm-torso { fill: var(--agent); } .rm-head { fill: color-mix(in oklab, var(--agent) 42%, var(--surface)); }
.rm-letter { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.role-mark[data-role="chief"] { --agent: var(--st-working); } .role-mark[data-role="research"] { --agent: var(--st-thinking); }
.role-mark[data-role="finance"], .role-mark[data-role="social"] { --agent: var(--st-completed); } .role-mark[data-role="audit"] { --agent: var(--st-waiting); }
.role-mark[data-role="creative"] { --agent: var(--danger); } .role-mark[data-role="coding"], .role-mark[data-role="product"] { --agent: var(--st-testing); } .role-mark[data-role="legal"] { --agent: var(--st-available); }

/* ---------------------------------------------------------------- sheet (drawer / dialog) */
.sheet { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; justify-content: flex-end; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--t-slow) var(--ease-out); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet-panel { position: relative; width: min(600px, 100vw); height: 100%; overflow: auto; background: var(--bg-elevated); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow-3); transform: translateX(28px); opacity: 0; transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow) var(--ease-out); outline: none; }
.sheet-xl .sheet-panel { width: min(980px, 100vw); }
.sheet-sm { align-items: center; justify-content: center; }
.sheet-sm .sheet-panel { width: min(460px, calc(100vw - 32px)); height: auto; max-height: calc(100vh - 48px); border-radius: var(--r-2xl); border: 1px solid var(--border); transform: translateY(12px) scale(.98); }
.sheet.open .sheet-scrim { opacity: 1; } .sheet.open .sheet-panel { transform: none; opacity: 1; }
.sheet.closing .sheet-scrim, .sheet.closing .sheet-panel { opacity: 0; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-6); background: var(--surface-glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--border); }
.sheet-title { margin: 0; font-size: var(--fs-lg); font-weight: 700; letter-spacing: var(--tracking-caps); }
.sheet-body { padding: var(--s-5) var(--s-6) var(--s-8); }
.drawer-loading { height: 240px; border-radius: var(--r-xl); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.drawer-head { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-5); align-items: center; margin-bottom: var(--s-5); }
.drawer-art .station-art { max-width: 220px; }
.drawer-art .screen-content { opacity: 1; }
.drawer-art .badge-done, .drawer-art .badge-wait, .drawer-art .badge-alert { opacity: 0; }
.drawer-id { display: flex; flex-direction: column; gap: var(--s-2); }
.drawer-role { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.drawer-id p { margin: 0; }
.drawer-chat { display: flex; gap: var(--s-2); }
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); margin-bottom: var(--s-4); overflow-x: auto; }
.tab { border: 0; background: transparent; color: var(--text-muted); padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab:focus-visible { box-shadow: var(--focus); }
.pane-title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-faint); margin: var(--s-5) 0 var(--s-2); }
.now-card { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.now-title { font-size: var(--fs-md); font-weight: 650; color: var(--text); }
.capacity-note { color: var(--st-waiting); }
.list-row { display: flex; gap: var(--s-3); align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; width: 100%; background: none; border-inline: 0; border-top: 0; font: inherit; text-align: start; cursor: pointer; }
.list-row:hover { text-decoration: none; } .list-row:hover .grow { color: var(--accent); }
.block { display: block; }
.attention-row { display: block; padding: var(--s-3); border-radius: var(--r-md); margin-bottom: var(--s-2); background: color-mix(in srgb, var(--st-needs) 12%, transparent); color: var(--text); }
.attention-failed { background: color-mix(in srgb, var(--st-blocked) 12%, transparent); }
.drawer-artifacts { display: grid; gap: var(--s-3); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.tool { display: flex; justify-content: space-between; gap: var(--s-2); align-items: center; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); }
.conn { font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.conn-ok { color: var(--success); } .conn-configured { color: var(--info); } .conn-account { color: var(--warning); } .conn-off { color: var(--text-faint); } .conn-unavailable { color: var(--danger); }

@media (max-width: 900px) { .drawer-head { grid-template-columns: 1fr; } .drawer-art { display: none; } }
@media (max-width: 480px) { .sheet-body { padding: var(--s-4); } .sheet-head { padding: var(--s-3) var(--s-4); } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- V4 deliverables */
.fin-basis { display: flex; height: 10px; border-radius: var(--r-full); overflow: hidden; margin: var(--s-3) 0 var(--s-2); background: var(--surface-3); }
.fin-basis span { display: block; height: 100%; }
.fb-known { background: var(--success); } .fb-estimated { background: var(--warning); } .fb-assumption { background: var(--text-faint); }
.fin-basis-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--s-3); }
.fin-basis-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; }
.fin-cats { display: grid; gap: 6px; margin: var(--s-2) 0 var(--s-4); }
.fin-cat { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); }
.fin-bar { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.fin-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.fin-sens { margin: var(--s-3) 0 var(--s-1); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.fin-validation { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.fin-validation.fv-inconsistent { box-shadow: inset 3px 0 0 var(--danger); }
.fin-validation.fv-verified { box-shadow: inset 3px 0 0 var(--success); }
.fin-issues { margin: var(--s-2) 0; padding-inline-start: var(--s-5); color: var(--danger); }
.legal-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.legal-summary div { display: flex; flex-direction: column; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.legal-summary strong { font-size: var(--fs-lg); } .legal-summary span { font-size: var(--fs-xs); color: var(--text-muted); }
.legal-summary .ls-flag { background: var(--danger-soft); } .legal-summary .ls-review { background: var(--warning-soft); }
.legal-note { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); border-inline-start: 3px solid var(--warning); background: var(--warning-soft); border-radius: var(--r-sm); color: var(--text); }
.audit-head { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3); }
.audit-head .audit-verdict { margin: 0; }
.audit-counts { display: flex; gap: var(--s-3); font-size: var(--fs-xs); color: var(--text-muted); text-transform: capitalize; }
.audit-counts .ac-critical strong, .audit-counts .ac-high strong { color: var(--danger); } .audit-counts .ac-medium strong { color: var(--warning); }
.owner-cell { display: inline-flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.cal-day { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); }
.cal-date { font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-post { display: flex; flex-direction: column; gap: 4px; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); }
.cal-hook { font-weight: 600; font-size: var(--fs-sm); }
.mb-preview { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: var(--s-3); margin-bottom: var(--s-4); }
.mbp-wordmark, .mbp-phone, .mbp-post { border-radius: var(--r-lg); min-height: 190px; position: relative; overflow: hidden; box-shadow: var(--shadow-1); }
.mbp-wordmark { display: grid; place-items: center; font-size: clamp(22px, 3vw, 36px); font-weight: 700; letter-spacing: -.01em; }
.mbp-wordmark i { position: absolute; bottom: 18%; width: 34px; height: 4px; border-radius: 4px; }
.mbp-phone { padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); border: 6px solid var(--desk-edge); border-radius: 26px; }
.mbp-bar { height: 6px; width: 40%; border-radius: 6px; opacity: .8; }
.mbp-title { font-weight: 700; font-size: var(--fs-md); }
.mbp-card { border: 1.5px solid; border-radius: var(--r-md); padding: var(--s-2); font-size: var(--fs-xs); }
.mbp-cta { margin-top: auto; text-align: center; border-radius: var(--r-full); padding: 6px; font-size: var(--fs-xs); font-weight: 700; }
.mbp-post { padding: var(--s-4); display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-2); font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; }
.mbp-post-kicker { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; }
/* library */
.lib-filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); margin-top: var(--s-3); }
.lib-card { display: flex; flex-direction: column; gap: var(--s-2); text-align: start; padding: var(--s-4); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; min-width: 0; transition: transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
.lib-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.lib-card:focus-visible { outline: none; box-shadow: var(--focus); }
.lib-head { display: flex; align-items: center; gap: var(--s-2); }
.lib-type { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-flag { font-size: 10.5px; font-weight: 700; color: var(--warning); background: var(--warning-soft); border-radius: var(--r-full); padding: 1px 8px; white-space: nowrap; }
.lib-title { font-weight: 650; font-size: var(--fs-md); line-height: 1.3; }
.lib-preview { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.lib-meta { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-muted); }
.lib-objective { font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-line { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-swatches { display: flex; height: 38px; border-radius: var(--r-sm); overflow: hidden; }
.pv-swatches span { flex: 1; }
.pv-kpis { display: flex; gap: var(--s-4); font-size: var(--fs-xs); color: var(--text-muted); } .pv-kpis b { font-size: var(--fs-md); color: var(--text); }
.pv-cols { display: flex; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); } .pv-cols span { padding: 2px 8px; border-radius: var(--r-sm); background: var(--surface-3); }
.pv-verdict { font-size: var(--fs-xs) !important; padding: 2px 10px !important; margin: 0 0 4px !important; align-self: flex-start; }
.pv-chart svg { max-height: 90px; }
.viewer-meta { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.viewer-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0 var(--s-4); }
.viewer-body .artifact { margin: 0; }
.print-only { display: none; }
@media print {
  body.printing > *:not(.print-only) { display: none !important; }
  body.printing .print-only { display: block; padding: 24px; color: var(--text); }
  body.printing .print-title { font-size: 22px; margin: 0 0 16px; }
  body.printing .art-scroll { overflow: visible; }
}
@media (max-width: 1100px) { .lib-filters { grid-template-columns: 1fr 1fr 1fr; } .lib-filters input { grid-column: 1 / -1; } .mb-preview { grid-template-columns: 1fr 1fr; } .legal-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lib-filters { grid-template-columns: 1fr 1fr; } .mb-preview { grid-template-columns: 1fr; } .legal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fin-cat { grid-template-columns: 1fr auto; } .fin-cat .fin-bar { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .lib-card, .member, .station { transition: none !important; } }

/* CHIEF home */
.chief-home { max-width: 1080px; margin: 0 auto; padding: var(--s-10) var(--s-6) var(--s-6); }
.ch-hero { text-align: center; max-width: 720px; margin: 0 auto var(--s-8); }
.ch-hero h1 { font-size: var(--fs-3xl); margin: 0 0 var(--s-2); font-weight: 700; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4); text-align: start; align-items: start; }
.ch-card { padding: var(--s-5); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.ch-alert { border-color: color-mix(in srgb, var(--st-needs) 50%, transparent); background: color-mix(in srgb, var(--st-needs) 7%, var(--surface)); }
.ch-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.ch-card h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-faint); margin: 0; font-weight: 650; }
.ch-row { display: flex; gap: var(--s-2); align-items: center; padding: 6px 0; color: var(--text); text-decoration: none; font-size: var(--fs-sm); min-width: 0; }
.ch-row:hover { text-decoration: none; } .ch-row:hover .grow { color: var(--accent); }
.ch-row .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-kind { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 8px; border-radius: var(--r-full); color: var(--st-needs); background: color-mix(in srgb, var(--st-needs) 9%, transparent); }
.ch-kind.k-failed { color: var(--st-blocked); background: color-mix(in srgb, var(--st-blocked) 14%, transparent); }
.ch-kind.k-completed { color: var(--st-completed); background: color-mix(in srgb, var(--st-completed) 14%, transparent); }
.ch-pct { font-size: var(--fs-xs); color: var(--text-muted); }
.ch-team { display: flex; flex-direction: column; gap: 2px; }
.ch-member { display: grid; grid-template-columns: 10px 80px 1fr; gap: var(--s-2); align-items: center; text-align: start; background: none; border: 0; padding: 6px 0; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.ch-member span.xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-member:hover strong { color: var(--accent); }
.ch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-available); }
.st-dot-working, .st-dot-thinking, .st-dot-reviewing { background: var(--st-working); } .st-dot-testing { background: var(--st-testing); } .st-dot-waiting, .st-dot-queued { background: var(--st-waiting); }
.st-dot-needs-fahad { background: var(--st-needs); } .st-dot-blocked, .st-dot-failed { background: var(--st-blocked); } .st-dot-completed { background: var(--st-completed); }
.ch-decision { padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); }
.chief-home .suggestions { margin-top: var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .chief-home .suggestions { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .chief-home { padding: var(--s-6) var(--s-4); } .ch-hero h1 { font-size: var(--fs-2xl); } }

/* Needs Fahad */
.nf-group { margin-bottom: var(--s-6); }
.nf-group h2 { display: flex; align-items: baseline; gap: var(--s-3); font-size: var(--fs-md); margin: 0 0 var(--s-3); }
.nf-level { font-size: var(--fs-xs); font-weight: 800; letter-spacing: var(--tracking-caps); padding: 3px 10px; border-radius: var(--r-full); color: var(--text-muted); background: var(--surface-3); }
.nf-urgent .nf-level { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger); }
.nf-action-needed .nf-level { color: var(--st-needs); background: color-mix(in srgb, var(--st-needs) 9%, transparent); }
.nf-item { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); margin-bottom: var(--s-2); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.nf-item:hover { text-decoration: none; border-color: var(--border-strong); }
.nf-urgent .nf-item { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.nf-cat { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-muted); margin-top: 2px; }
.nf-title { display: block; font-weight: 600; } .nf-detail { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }
.nf-clear { padding: var(--s-5); border-radius: var(--r-xl); background: var(--success-soft); margin-bottom: var(--s-6); }

/* Integrations & models */
.conn-legend { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); }
.conn-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 9px; border-radius: var(--r-full); white-space: nowrap; }
.conn-badge.conn-ok { color: var(--success); background: var(--success-soft); } .conn-badge.conn-configured { color: var(--info); background: var(--info-soft); }
.conn-badge.conn-off { color: var(--text-muted); background: var(--surface-3); } .conn-badge.conn-account { color: var(--warning); background: var(--warning-soft); } .conn-badge.conn-unavailable { color: var(--danger); background: var(--danger-soft); }
.int-group { margin-bottom: var(--s-6); }
.int-title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-faint); margin: 0 0 var(--s-3); }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
.int-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.int-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.capacity-banner { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: color-mix(in srgb, var(--st-waiting) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--st-waiting) 40%, transparent); margin-bottom: var(--s-4); font-size: var(--fs-sm); }

/* search palette */
.search-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: var(--s-2); padding: 8px var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text); }
.search-trigger kbd { font-family: var(--font); font-size: var(--fs-xs); color: var(--text-faint); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }
.palette { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette-scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.palette-panel { position: relative; width: min(640px, calc(100vw - 32px)); border-radius: var(--r-xl); background: var(--bg-elevated); border: 1px solid var(--border-strong); box-shadow: var(--shadow-3); overflow: hidden; }
.palette-input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-lg); padding: var(--s-4) var(--s-5); outline: none; }
.palette-list { list-style: none; margin: 0; padding: var(--s-2); max-height: 50vh; overflow: auto; }
.palette-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); cursor: pointer; font-size: var(--fs-sm); }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--surface-3); }
.palette-kind { flex: none; width: 76px; font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.palette-hint { padding: var(--s-3); color: var(--text-faint); font-size: var(--fs-sm); }

/* accessibility: links inside text are underlined; scroll regions are reachable */
p a, li a, .small a, .xs a, .sub a, .composer-hint a { text-decoration: underline; text-underline-offset: 2px; }
.art-scroll:focus-visible, .art-kanban:focus-visible { outline: none; box-shadow: var(--focus); }
.fahad-mark { background: var(--accent-fill); }
.decision-open .faint, .need .faint, .verdict + .faint { color: var(--text-muted); }
