/* ============================================================
   AI Lab Max Style Pack v2 — "Advisor" direction (Sept 2026)
   Drop-in replacement for css/ask.css. Class names unchanged so every
   page keeps working; tokens re-pointed so inline var(--*) usages follow.
   Shell: slim white icon rail (left) + slim top bar; warm paper background;
   Bricolage Grotesque headings, DM Sans body; pills and 18–24px radii.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  /* Brand tokens — evolved */
  --blue-dark: #0b3a63;
  --blue: #0f4c81;
  --blue-mid: #1a6bbf;
  --blue-light: #9ccdf5;
  --orange: #f0862a;
  --orange-hover: #d9741d;
  --orange-soft: #f7b56b;
  --grey-1: #fbfaf7;          /* page background (warm paper) */
  --grey-2: #e6e3dc;          /* hairline / borders */
  --grey-3: #f1efe9;          /* lane / muted surface */
  --text: #33414f;

  --blue-hover: #0b3a63;
  --blue-tint: #dcecf7;
  --text-strong: #33414f;
  --text-muted: #7a8794;
  --text-faint: #b9c3cc;
  --border: #e6e3dc;
  --row-border: #efece5;
  --th-bg: transparent;
  --green: #1d6a35;
  --green-soft: #8fbf9f;
  --red: #b03a2e;
  --devops-blue: #0078d7;

  --band-blue-bg: #dcecf7;  --band-blue-fg: #0f4c81;
  --band-amber-bg: #fdebd9; --band-amber-fg: #8a4a0f;
  --band-green-bg: #e4efe7; --band-green-fg: #1d6a35;
  --band-red-bg: #fdecea;   --band-red-fg: #8c2f26;
  --band-grey-bg: #f1efe9;  --band-grey-fg: #7a8794;

  --badge-bug-bg: #fdecea;    --badge-bug-fg: #8c2f26;
  --badge-change-bg: #dcecf7; --badge-change-fg: #0f4c81;
  --badge-data-bg: #fdebd9;   --badge-data-fg: #8a4a0f;
  --badge-infra-bg: #e4efe7;  --badge-infra-fg: #1d6a35;
  --badge-app-bg: #efe9fb;    --badge-app-fg: #5b1d9e;
  --badge-bi-bg: #e3f4f0;     --badge-bi-fg: #0d6b5a;
  --badge-ai-bg: #fbf3d9;     --badge-ai-fg: #7d6608;
  --badge-other-bg: #f1efe9;  --badge-other-fg: #7a8794;

  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'DM Sans', sans-serif;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-body: .875rem; --fs-md: .9375rem;
  --fs-lg: 1.125rem; --fs-h1: 1.875rem; --fs-hero: clamp(28px, 3.6vw, 40px);

  --r-sm: 999px; --r-md: 12px; --r-lg: 18px; --r-xl: 22px; --r-pill: 999px;
  --shadow-card: none;
  --shadow-tool: 0 1px 2px rgba(15,76,129,.06);
  --shadow-tool-hover: 0 6px 18px rgba(15,76,129,.12);
  --shadow-menu: 0 12px 32px rgba(15,76,129,.16);
  --shadow-modal: 0 16px 48px rgba(15,76,129,.2);
  --focus-ring: 0 0 0 3px rgba(15,76,129,.12);
  --page-max: 1140px; --page-max-narrow: 1040px; --form-max: 680px;
  --rail-w: 76px; --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }
body { font-family: var(--font); background: var(--grey-1); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; padding-left: var(--rail-w); }
body.no-shell { padding-left: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange); }
[hidden] { display: none !important; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -.01em; }
input, select, textarea, button { font-family: var(--font); }

/* ---------- Shell: icon rail + top bar ---------- */
.site-header { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); background: #fff; border-right: 1px solid var(--grey-2); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 6px; z-index: 300; }
.header-logo { display: flex; flex-direction: column; align-items: center; gap: 0; margin-bottom: 12px; }
.brand-logo { width: 44px; height: auto; display: block; filter: invert(1) hue-rotate(180deg) brightness(.35); }
.brand-logo .cls-6 { fill: #fff; }
.header-divider, .header-product, .header-tenant { display: none; }
.topbar #tenantLogoSlot { display: inline-flex; align-items: center; } .topbar #tenantLogoSlot:empty { display: none; }
.top-nav { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 0; padding: 0; }
.top-nav > a { width: 64px; height: 50px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); font-size: 0; transition: background .15s, color .15s; }
.top-nav > a svg { width: 20px; height: 20px; }
.top-nav .nav-label { font-size: 9px; line-height: 1; font-weight: 600; letter-spacing: 0; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.top-nav > a:hover { background: #eef3f8; color: var(--blue); }
.top-nav > a.active { background: var(--blue); color: #fff; }
.site-header > .row { margin: auto 0 0; flex-direction: column; gap: 6px; }
.tenant-switch { display: none; }
.bell { width: 44px; height: 44px; border-radius: 14px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; font-size: 0; margin: 0; }
.bell svg { width: 21px; height: 21px; }
.bell:hover { background: #eef3f8; color: var(--blue); }
.bell .dot { position: absolute; top: 7px; right: 7px; min-width: 10px; height: 10px; border-radius: 999px; background: var(--orange); border: 2px solid #fff; font-size: 0; padding: 0; }
.notif-menu { display: none; position: fixed; left: calc(var(--rail-w) + 8px); bottom: 64px; top: auto; right: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-menu); border: 1px solid var(--grey-2); width: 340px; z-index: 400; max-height: 60vh; overflow-y: auto; }
.notif-menu.open { display: block; }
.notif { padding: .75rem 1rem; border-bottom: 1px solid var(--row-border); font-size: var(--fs-sm); color: var(--text-strong); display: block; }
.notif.unread { background: var(--blue-tint); }
.notif small { display: block; color: var(--text-muted); margin-top: .15rem; }
.avatar-wrap { position: relative; margin: 0; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; overflow: hidden; cursor: pointer; background: var(--blue-tint); padding: 0; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.avatar-btn:hover { background: var(--blue-light); }
.avatar-initials { font-size: 13px; font-weight: 700; color: var(--blue); }
.avatar-menu { display: none; position: fixed; left: calc(var(--rail-w) + 8px); bottom: 12px; top: auto; right: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-menu); border: 1px solid var(--grey-2); min-width: 240px; z-index: 400; overflow: hidden; }
.avatar-menu.open { display: block; }
.avatar-menu-header { padding: 16px 16px 12px; border-bottom: 1px solid var(--row-border); }
.avatar-menu-name { font-weight: 600; color: var(--blue); font-size: 14px; margin-bottom: 2px; }
.avatar-menu-email { font-size: 12px; color: var(--text-muted); }
.avatar-menu-role { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }
.avatar-item { display: block; width: 100%; padding: 12px 16px; text-align: left; background: none; border: 0; font-size: 13.5px; color: var(--text); cursor: pointer; }
.avatar-item:hover { background: var(--grey-1); color: var(--blue); }
.avatar-menu .tenant-switch { display: block; padding: 10px 16px; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--row-border); margin: 0; }
.avatar-menu .tenant-switch select { width: 100%; margin-top: 4px; padding: .4rem .6rem; font-size: 13px; background: var(--grey-1); color: var(--text); border-color: var(--border); }

.topbar { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; gap: 14px; padding: 14px 32px; min-height: var(--topbar-h); background: rgba(251,250,247,.92); backdrop-filter: blur(8px); }
.topbar-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--blue); }
.topbar-sep { color: var(--text-faint); }
.topbar-product { font-size: 14px; font-weight: 600; color: var(--text); }
.topbar-tenant { font-size: 14px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.topbar-tenant b { color: var(--text); font-weight: 600; }
.topbar .tenant-logo { height: 24px; max-width: 120px; width: auto; object-fit: contain; background: transparent; padding: 0; border-radius: 0; }
.topbar-accent { width: 10px; height: 10px; border-radius: 50%; background: var(--tenant-accent, transparent); }
.topbar .spacer { flex: 1; }
.consultant-chip { display: inline-flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--grey-2); border-radius: 999px; padding: 5px 14px 5px 5px; font-size: 13px; color: var(--text); transition: border-color .15s; }
.consultant-chip:hover { border-color: var(--blue); color: var(--text); }
.consultant-chip .av { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.consultant-chip .on { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.consultant-chip b { font-weight: 600; }
.consultant-chip .muted { color: var(--text-muted); }
.ask-fab { position: static; }
.ask-fab-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 0; background: var(--blue); color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: none; transition: background .15s; }
.ask-fab-btn:hover { background: var(--blue-hover); }
.ask-fab-btn svg { width: 15px; height: 15px; }
.ask-panel { position: fixed; right: 32px; top: calc(var(--topbar-h) + 8px); bottom: auto; width: 400px; max-width: calc(100vw - var(--rail-w) - 48px); background: #fff; border-radius: var(--r-xl); border: 1px solid var(--grey-2); box-shadow: var(--shadow-modal); z-index: 800; overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.ask-panel-head { background: var(--blue); color: #fff; padding: .9rem 1.1rem; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .95rem; font-family: var(--font-display); }
.ask-panel-body { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.ask-panel-foot { padding: .75rem 1rem; border-top: 1px solid var(--row-border); display: flex; gap: .5rem; }
.ask-panel textarea { min-height: 44px; border-radius: 14px; }
.ask-answer { background: var(--grey-3); border-radius: 14px; padding: .75rem 1rem; font-size: .9rem; color: var(--text-strong); white-space: pre-wrap; }

@media (max-width: 800px) {
  body { padding-left: 0; padding-bottom: 64px; }
  .site-header { top: auto; bottom: 0; width: 100%; height: 64px; flex-direction: row; justify-content: space-around; padding: 0 8px; border-right: 0; border-top: 1px solid var(--grey-2); }
  .header-logo, .site-header > .row .bell { display: none; }
  .top-nav { flex-direction: row; gap: 2px; flex: 1; justify-content: space-around; }
  .site-header > .row { margin: 0; flex-direction: row; }
  .notif-menu, .avatar-menu { left: 8px; right: 8px; bottom: 72px; width: auto; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .consultant-chip span:not(.av):not(.on) { display: none; }
}

/* Tenant branding bits used elsewhere */
.tenant-logo { height: 26px; max-width: 140px; width: auto; object-fit: contain; }
.profile-card .fact b { max-width: 60%; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--text-muted); }
.status-dot.done, .status-dot.manual { background: var(--green); } .status-dot.running, .status-dot.pending, .status-dot.queued { background: var(--orange); animation: pulse 1.2s infinite; } .status-dot.failed { background: var(--red); }
@keyframes pulse { 50% { opacity: .3; } }
.logo-preview { height: 56px; max-width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--grey-2); border-radius: 12px; padding: 6px; }
.tag { display: inline-block; background: var(--blue-tint); color: var(--blue); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; margin: 2px 4px 2px 0; }

/* ---------- Hero (rounded navy card) ---------- */
.hero { background: var(--blue); color: #fff; padding: 36px 40px; position: relative; overflow: hidden; border-radius: 24px; margin: 8px auto 20px; max-width: calc(var(--page-max-narrow) - 2rem); }
.hero::before { content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; background: var(--blue-mid); opacity: .6; border-radius: 50%; pointer-events: none; }
.hero::after { content: ""; position: absolute; right: 120px; bottom: -200px; width: 320px; height: 320px; background: var(--orange); opacity: .25; border-radius: 50%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: none; }
.hero-eyebrow { font-size: 13px; font-weight: 600; color: var(--blue-light); margin-bottom: 10px; letter-spacing: 0; text-transform: none; }
.hero-greeting { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 600; line-height: 1.12; margin-bottom: 14px; text-wrap: pretty; }
.hero-greeting em { color: var(--orange-soft); font-style: normal; }
.hero-sub { font-size: 15px; font-weight: 400; color: rgba(255,255,255,.78); max-width: 560px; line-height: 1.6; margin-bottom: 22px; }
#heroStats { gap: 12px 28px; align-items: flex-start; }
#heroStats > div { margin-right: 0 !important; }
#heroStats .hero-eyebrow { color: rgba(255,255,255,.6); font-size: 12.5px; white-space: nowrap; margin-bottom: 4px !important; }
#heroStats > div > div:last-child { font-family: var(--font-display); font-size: 26px !important; font-weight: 600 !important; }
.hero-tagline { font-size: 13px; color: rgba(255,255,255,.55); font-style: normal; }
.hero-tagline strong { color: rgba(255,255,255,.8); }
@media (max-width: 800px) { .hero { margin: 0 16px 16px; padding: 28px 24px; border-radius: 20px; } }

/* ---------- Layout ---------- */
.page-wrap { max-width: var(--page-max); margin: 0 auto; padding: 12px 32px 64px; }
.page-wrap.narrow { max-width: var(--page-max-narrow); }
.page-intro { margin-bottom: 22px; }
.page-intro h1 { font-size: var(--fs-h1); font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.page-intro p { font-size: 14px; color: var(--text-muted); max-width: 680px; text-wrap: pretty; }
.section-label { font-family: var(--font-display); font-size: 19px; font-weight: 600; text-transform: none; letter-spacing: -.01em; color: var(--blue); margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.section-label::after { content: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .page-wrap { padding: 12px 16px 48px; } }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--r-lg); padding: 24px 26px; border: 1px solid var(--grey-2); }
.card.orange, .card.green, .card.flat { border-top: 1px solid var(--grey-2); }
.tool-card { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--grey-2); color: inherit; display: flex; flex-direction: column; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.tool-card:hover { border-color: var(--blue); box-shadow: var(--shadow-tool-hover); color: inherit; }
.tool-card-bar { display: none; }
.tool-card-body { padding: 22px 24px 12px; flex: 1; display: flex; flex-direction: column; }
.tool-card-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-tint); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 14px; line-height: 1; }
.tool-card-name { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--blue); margin-bottom: 6px; }
.tool-card-desc { font-size: 13.5px; color: var(--text); line-height: 1.55; flex: 1; text-wrap: pretty; }
.tool-card-foot { padding: 12px 24px 18px; border-top: 0; display: flex; align-items: center; justify-content: space-between; }
.tool-card-cta { font-size: 13.5px; font-weight: 600; color: var(--blue); white-space: nowrap; }
.tool-card-arrow { font-size: 1rem; color: var(--blue); transition: transform .2s; line-height: 1; }
.tool-card:hover .tool-card-arrow { transform: translateX(5px); }

.kpi { background: #fff; border-radius: var(--r-lg); padding: 16px 18px; border: 1px solid var(--grey-2); }
.kpi.green, .kpi.orange { border-top: 1px solid var(--grey-2); }
.kpi-label { font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.kpi-label::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.kpi.green .kpi-label::before { background: var(--green); } .kpi.orange .kpi-label::before { background: var(--orange); } .kpi.grey .kpi-label::before, .exec-tile.grey .kpi-label::before { background: var(--text-faint); }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--blue); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.green .kpi-value, .kpi.orange .kpi-value { color: var(--blue); }
.kpi-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; border-radius: 999px; padding: 10px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; letter-spacing: 0; white-space: nowrap; transition: background .15s, border-color .15s; line-height: 1.2; }
.btn-primary { background: var(--orange); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--orange-hover); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--blue-hover); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--blue); }
.btn-outline:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-devops { background: var(--devops-blue); color: #fff; }

.seg { display: inline-flex; background: #fff; border-radius: 999px; border: 1px solid var(--grey-2); padding: 3px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); border-radius: 999px; cursor: pointer; }
.seg button.active { background: var(--blue); color: #fff; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: var(--r-xl); padding: 26px 28px; border: 1px solid var(--grey-2); max-width: var(--form-max); margin: 0 auto; }
.form-section-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-transform: none; letter-spacing: -.01em; color: var(--blue); padding-bottom: 0; border-bottom: 0; margin: 22px 0 14px; }
.form-section-title:first-child { margin-top: 0; }
.field { margin-bottom: 12px; }
.field label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.field label .req { color: var(--red); margin-left: 3px; }
.field .hint { font-size: var(--fs-sm); color: var(--text-muted); margin-top: .3rem; }
input:not([type]), input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r-md); font-size: 14px; color: var(--text); background: var(--grey-1); transition: border-color .15s, background .15s; }
input[type=search] { border-radius: 999px; padding-left: 16px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: var(--focus-ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
.radio-row { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: var(--fs-body); }
.radio-row label { font-weight: 400; color: var(--text); display: inline-flex; align-items: center; gap: .4rem; }
.notice { border-left: 0; background: var(--blue-tint); color: var(--blue); padding: 10px 14px; font-size: var(--fs-body); border-radius: 14px; display: inline-block; }
.notice strong { color: var(--blue); }
.error-msg { background: var(--band-red-bg); border: 0; border-radius: 14px; padding: 12px 16px; font-size: var(--fs-body); color: var(--band-red-fg); margin-bottom: 1rem; }
.ok-msg { background: var(--band-green-bg); border: 0; border-radius: 14px; padding: 12px 16px; font-size: var(--fs-body); color: var(--band-green-fg); margin-bottom: 1rem; }

/* ---------- Toolbar, tables (rows as rounded cards) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; border-radius: 999px; background: #fff; }
.search-wrap { flex: 1; min-width: 200px; }
.search-wrap input { width: 100%; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 14px; }
thead th { text-align: left; padding: 0 20px 0; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 0; white-space: nowrap; }
thead th:first-child { padding-left: 20px; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--blue); }
thead th.sorted-asc::after { content: " ↑"; color: var(--orange); }
thead th.sorted-desc::after { content: " ↓"; color: var(--orange); }
tbody tr { border-bottom: 0; }
tbody td { padding: 14px 14px; color: var(--text); vertical-align: middle; background: #fff; border-top: 1px solid var(--grey-2); border-bottom: 1px solid var(--grey-2); transition: border-color .15s; }
tbody td:first-child { border-left: 1px solid var(--grey-2); border-radius: 16px 0 0 16px; padding-left: 20px; }
tbody td:last-child { border-right: 1px solid var(--grey-2); border-radius: 0 16px 16px 0; padding-right: 20px; }
tbody tr:hover td { border-color: var(--blue); background: #fff; }
td.ref, .ref { font-weight: 600; color: var(--blue); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.money-pos { color: var(--blue); font-weight: 700; }
td.date { white-space: nowrap; font-size: 12.5px; color: var(--text-muted); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: .95rem; background: #fff; border: 1.5px dashed var(--grey-2); border-radius: var(--r-lg); }
.result-count { font-size: 13px; color: var(--text-muted); }

.group-head td { background: var(--blue-tint); color: var(--blue); font-weight: 600; border-color: var(--blue-tint); }
.group-head { font-weight: 600; }
.group-sub td { background: #fff; color: var(--blue); font-weight: 600; text-transform: none; font-size: 14px; letter-spacing: 0; }
.count-chip { display: inline-block; background: rgba(15,76,129,.1); color: inherit; border-radius: 999px; padding: 0 8px; font-size: .72rem; margin-left: 6px; }
.group-sub .count-chip { background: var(--grey-3); color: var(--text-muted); }
.progress { display: inline-block; width: 72px; height: 6px; background: var(--row-border); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.progress > span { display: block; height: 100%; background: var(--blue); }

/* ---------- Badges & pills ---------- */
.badge, .status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-bug { background: var(--badge-bug-bg); color: var(--badge-bug-fg); }
.badge-change { background: var(--badge-change-bg); color: var(--badge-change-fg); }
.badge-data { background: var(--badge-data-bg); color: var(--badge-data-fg); }
.badge-infra { background: var(--badge-infra-bg); color: var(--badge-infra-fg); }
.badge-app { background: var(--badge-app-bg); color: var(--badge-app-fg); }
.badge-bi { background: var(--badge-bi-bg); color: var(--badge-bi-fg); }
.badge-ai { background: var(--badge-ai-bg); color: var(--badge-ai-fg); }
.badge-other { background: var(--badge-other-bg); color: var(--badge-other-fg); }
.status-pill { background: var(--band-grey-bg); color: var(--band-grey-fg); }
.band-red { background: var(--band-red-bg); color: var(--band-red-fg); }
.band-amber { background: var(--band-amber-bg); color: var(--band-amber-fg); }
.band-green { background: var(--band-green-bg); color: var(--band-green-fg); }
.band-blue { background: var(--band-blue-bg); color: var(--band-blue-fg); }
.band-grey { background: var(--band-grey-bg); color: var(--band-grey-fg); }
.prio { display: inline-block; background: var(--grey-3); color: var(--text-muted); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.prio.p1 { background: var(--band-red-bg); color: var(--band-red-fg); } .prio.p2 { background: var(--band-amber-bg); color: var(--band-amber-fg); } .prio.p3 { background: var(--grey-3); color: var(--text-muted); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.kcol { flex: 0 0 270px; min-width: 240px; background: var(--grey-3); border-radius: 20px; border-top: 0; padding: 10px; }
.kcol.band-red, .kcol.band-green, .kcol.band-amber, .kcol.band-grey, .kcol.band-blue { border-top: 0; background: var(--grey-3); color: inherit; }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 10px; font-size: 13.5px; font-weight: 600; color: var(--blue); }
.kcol-count { background: transparent; border-radius: 0; padding: 0; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.kcol-body { padding: 0; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.kcol-body.drag-over { background: rgba(15,76,129,.06); border-radius: 14px; }
.kcard { background: #fff; border-radius: 14px; border-left: 0; padding: 14px 16px; box-shadow: var(--shadow-tool); cursor: grab; font-size: 14px; transition: box-shadow .15s; }
.kcard:hover { box-shadow: var(--shadow-tool-hover); }
.kcard.band-red, .kcard.band-green, .kcard.band-amber, .kcard.band-grey, .kcard.band-blue { border-left: 0; background: #fff; color: inherit; }
.kcard-ref { font-weight: 600; color: var(--text-muted); font-size: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.kcard-title { color: var(--text-strong); font-weight: 600; margin-bottom: 12px; line-height: 1.35; text-wrap: pretty; }
.kcard-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kcard-money { font-weight: 700; color: var(--blue); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.owner { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.owner-initials { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Modal ---------- */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(11,58,99,.45); z-index: 1000; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 680px; box-shadow: var(--shadow-modal); overflow: hidden; margin: auto; }
.modal-header { background: var(--blue); color: #fff; padding: 1rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-header h2 { font-size: 1.05rem; font-weight: 600; }
.modal-close { background: none; border: 0; color: rgba(255,255,255,.7); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 1.4rem; }
.modal-section { margin-bottom: 1.25rem; }
.modal-section-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--row-border); }
.modal-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem 1.5rem; }
.modal-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: none; letter-spacing: 0; margin-bottom: .15rem; }
.modal-field .field-val { font-size: var(--fs-body); color: var(--text-strong); word-break: break-word; }
.modal-field.full { grid-column: 1 / -1; }
.modal-footer { padding: .9rem 1.4rem; border-top: 1px solid var(--row-border); background: var(--grey-1); display: flex; align-items: center; gap: .75rem; }

/* ---------- Discovery chat ---------- */
.chat-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,320px); gap: 20px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.chat { background: #fff; border-radius: var(--r-xl); border: 1px solid var(--grey-2); border-top-width: 1px; display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 560px; overflow: hidden; }
.chat-head { padding: 16px 22px; border-bottom: 1px solid var(--row-border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-head strong { color: var(--blue); font-size: 15px; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 76%; padding: 11px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.msg.ai { background: var(--grey-3); color: var(--text-strong); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.sys { background: var(--badge-ai-bg); color: var(--badge-ai-fg); font-size: .8rem; align-self: center; text-align: center; border-radius: 999px; }
.chat-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 22px 12px; }
.chip { border: 1.5px solid var(--blue-tint); background: #fff; color: var(--blue); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--blue-tint); border-color: var(--blue-tint); }
.chat-input { display: flex; gap: 10px; padding: 14px 22px 18px; border-top: 0; }
.chat-input textarea { min-height: 46px; max-height: 140px; border-radius: 22px; padding: 12px 18px; font-size: 15px; }
.side-card { background: #fff; border-radius: 20px; border: 1px solid var(--grey-2); padding: 20px 22px; margin-bottom: 16px; }
.side-card:first-child { background: var(--blue); color: #fff; border-color: var(--blue); }
.side-card:first-child h3 { color: var(--blue-light); }
.side-card:first-child .fact { border-color: rgba(255,255,255,.14); } .side-card:first-child .fact b, .side-card:first-child .conf .lbl b { color: #fff; }
.side-card:first-child .conf .bar { background: rgba(255,255,255,.18); } .side-card:first-child .conf .bar .target { background: #fff; } .side-card:first-child .conf .bar .target::after { color: #fff; }
.side-card:first-child .muted, .side-card:first-child .small { color: rgba(255,255,255,.8); }
.side-card:first-child .weak { background: rgba(255,255,255,.16); color: #fff; }
.side-card:first-child a { color: #fff; text-decoration: underline; }
.side-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: -.01em; color: var(--blue); margin-bottom: 8px; }
.fact { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--row-border); border-bottom: 0; }
.fact b { color: var(--text-strong); text-align: right; font-weight: 600; }
.coverage { height: 6px; background: var(--row-border); border-radius: 3px; overflow: hidden; margin: .5rem 0; }
.coverage > span { display: block; height: 100%; background: var(--blue); }

/* ---------- Misc ---------- */
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-1 { margin-bottom: 1rem; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--grey-2); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.loading { text-align: center; padding: 6rem 1rem; color: var(--text-muted); }
.confidence { display: inline-block; width: 60px; height: 6px; background: var(--row-border); border-radius: 3px; overflow: hidden; vertical-align: middle; position: relative; }
.confidence > span { display: block; height: 100%; background: var(--orange); }
.confidence > span.ok { background: var(--green); }
.confidence::after { content: ''; position: absolute; top: 0; bottom: 0; left: 80%; width: 1.5px; background: var(--blue); }
.idp-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 20px; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--text-strong); cursor: pointer; margin-bottom: 8px; justify-content: center; transition: border-color .15s; }
.idp-btn:hover { border-color: var(--blue); color: var(--text-strong); }
.idp-btn .idp-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; border-radius: 6px; color: #fff; font-size: .7rem; }

/* ---------- Five-stage board ---------- */
.stage-strip { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.stage-tile { flex: 1; min-width: 150px; background: transparent; border-radius: 18px; border: 1.5px solid var(--grey-2); border-top-width: 1.5px; padding: 14px 18px; cursor: pointer; position: relative; transition: border-color .15s, background .15s; color: var(--text); box-shadow: none; }
.stage-tile:hover { border-color: var(--blue); transform: none; box-shadow: none; }
.stage-tile.open { background: #fff; border-color: var(--blue); outline: 0; }
.stage-tile.band-blue, .stage-tile.band-red, .stage-tile.band-amber, .stage-tile.band-green, .stage-tile.band-grey { border-top-color: var(--grey-2); background: transparent; }
.stage-tile.open.band-blue, .stage-tile.open.band-red, .stage-tile.open.band-amber, .stage-tile.open.band-green, .stage-tile.open.band-grey { background: #fff; border-color: var(--blue); }
.stage-tile.drag-over { background: var(--blue-tint); }
.stage-tile-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.stage-tile-name { font-weight: 600; color: var(--blue); font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.stage-tile-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.stage-tile.band-red .stage-tile-name::before { background: var(--orange); } .stage-tile.band-amber .stage-tile-name::before { background: var(--orange-soft); } .stage-tile.band-green .stage-tile-name::before { background: var(--green); } .stage-tile.band-grey .stage-tile-name::before { background: var(--green-soft); }
.stage-tile-prog { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.stage-tile-nums { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.stage-tile-count { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text-strong); line-height: 1; }
.stage-tile-money { font-weight: 500; color: var(--text-muted); font-size: 12.5px; }
.stage-tile-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stage-tile-caret { position: absolute; right: 14px; top: 14px; color: var(--text-faint); font-size: .8rem; }
.stage-board { margin-bottom: 1.5rem; }
.kcol.drag-over { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--blue-tint); }
.kcol-empty { border: 1.5px dashed var(--grey-2); border-radius: 14px; color: var(--text-faint); font-size: .8rem; text-align: center; padding: 1.4rem .5rem; background: rgba(255,255,255,.5); }
.kcard.dragging { opacity: .5; }
.kcard-menu { border: 0; background: transparent; color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 .2rem; border-radius: 6px; }
.kcard-menu:hover { background: var(--grey-3); color: var(--blue); }
.kcard-flag { font-size: .72rem; color: var(--band-red-fg); margin-top: .4rem; }
.qbadge { display: inline-block; background: var(--orange); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .68rem; font-weight: 700; }
.move-menu { position: absolute; z-index: 500; background: #fff; border: 1px solid var(--grey-2); border-radius: 14px; box-shadow: var(--shadow-menu); min-width: 220px; max-height: 70vh; overflow-y: auto; padding: .35rem; }
.move-menu-stage { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: .45rem .6rem .15rem; }
.move-menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: .45rem .75rem; font-size: .875rem; color: var(--text-strong); cursor: pointer; border-radius: 8px; }
.move-menu-item:hover { background: var(--blue-tint); color: var(--blue); }
.move-menu-item.current { font-weight: 600; color: var(--text-muted); cursor: default; }
.toast { position: fixed; bottom: 1.5rem; left: calc(50% + var(--rail-w) / 2); transform: translateX(-50%); background: var(--blue); color: #fff; padding: .75rem 1.25rem; border-radius: 999px; box-shadow: var(--shadow-menu); font-size: .875rem; z-index: 900; max-width: 90vw; }
.toast.bad { background: var(--red); }

.stepper { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stepper span { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--grey-2); color: var(--text-muted); }
.stepper span.done { background: var(--blue-tint); border-color: var(--blue-tint); color: var(--blue); }
.stepper span.here { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Executive summary strip */
.exec-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 28px; }
@media (max-width: 900px) { .exec-strip { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.exec-tile { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--grey-2); padding: 20px 22px; border-left: 1px solid var(--grey-2); transition: border-color .15s; display: block; }
.exec-tile:hover { border-color: var(--blue); }
.exec-tile.green, .exec-tile.orange, .exec-tile.grey { border-left: 1px solid var(--grey-2); }
.exec-tile.green .kpi-label::before { background: var(--green); } .exec-tile.orange .kpi-label::before { background: var(--orange); }
.exec-tile .kpi-value { font-size: 32px; }
.exec-tile .kpi-sub a { color: var(--blue); }

/* Card chat / questions */
.qlist .q { border: 1px solid var(--grey-2); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; background: #fff; }
.qlist .q label { font-weight: 600; color: var(--text-strong); font-size: .875rem; display: block; margin-bottom: .35rem; }
.qlist .q.answered { background: var(--band-green-bg); border-color: transparent; }
.qlist .q .row input { flex: 1; }

/* Tabs → pill segment */
.tabs { display: inline-flex; gap: 4px; border-bottom: 0; margin-bottom: 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--grey-2); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: transparent; padding: 6px 14px; font-weight: 600; font-size: 13px; color: var(--text-muted); cursor: pointer; border-bottom: 0; margin-bottom: 0; border-radius: 999px; }
.tabs button.active { color: #fff; background: var(--blue); border-bottom-color: transparent; }

/* Benchmarks */
.bench { display: flex; align-items: center; gap: .75rem; font-size: .82rem; }
.bench-bar { flex: 1; height: 8px; background: var(--row-border); border-radius: 4px; position: relative; overflow: visible; }
.bench-bar .range { position: absolute; top: 0; height: 100%; background: var(--blue-tint); border-radius: 4px; }
.bench-bar .you { position: absolute; top: -4px; width: 4px; height: 16px; background: var(--orange); border-radius: 2px; }
.bench-bar .med { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--blue); }

/* Demo mode */
body.demo-mode .demo-hide { display: none !important; }
.demo-banner { background: var(--orange); color: #fff; text-align: center; font-size: .8rem; font-weight: 700; padding: .3rem; margin-left: calc(-1 * var(--rail-w)); padding-left: var(--rail-w); }

/* ---------- Discovery journey (chips) + confidence ---------- */
.journey { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.journey .jstep { background: #fff; border-radius: 999px; box-shadow: none; padding: 7px 14px 7px 7px; border: 1px solid var(--grey-2); border-top: 1px solid var(--grey-2); position: relative; min-width: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.journey .jstep .n { width: 22px; height: 22px; border-radius: 50%; background: var(--grey-3); color: var(--text-muted); font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.journey .jstep .t { font-weight: 600; color: inherit; font-size: 13px; white-space: nowrap; }
.journey .jstep .b { display: none; }
.journey .jstep.done { background: var(--blue-tint); border-color: var(--blue-tint); color: var(--blue); } .journey .jstep.done .n { background: var(--blue); color: #fff; }
.journey .jstep.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: none; } .journey .jstep.active .n { background: #fff; color: var(--blue); }
.conf { margin: .5rem 0 .2rem; }
.conf .bar { height: 8px; background: var(--row-border); border-radius: 4px; overflow: visible; position: relative; }
.conf .bar > span { display: block; height: 100%; background: var(--orange); border-radius: 4px; transition: width .4s ease; }
.conf .bar > span.ok { background: var(--green); }
.conf .bar .target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--blue); left: 80%; border-radius: 1px; }
.conf .bar .target::after { content: '80%'; position: absolute; top: -16px; left: -12px; font-size: .62rem; color: var(--blue); font-weight: 700; }
.conf .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; }
.conf .lbl b { color: var(--text-strong); }
.weak { display: inline-block; background: var(--band-amber-bg); color: var(--band-amber-fg); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; margin: 2px 3px 0 0; }
.conf-pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--band-amber-bg); color: var(--band-amber-fg); }
.conf-pill.ok { background: var(--band-green-bg); color: var(--band-green-fg); }
.chat-head .conf-inline { display: flex; align-items: center; gap: .5rem; font-size: 12.5px; color: var(--text-muted); }

/* ---------- Service lifecycle (ITIL) additions — carried over from the 15 Sept release, re-toned to the v2 palette ---------- */
:root { --teal: #0d6b5a; --band-teal-bg: #e3f4f0; --band-teal-fg: #0d6b5a; }
.band-teal { background: var(--band-teal-bg); color: var(--band-teal-fg); }
.kcard.band-teal { border-left-color: var(--teal); }
.stage-tile.band-teal { border-top-color: var(--grey-2); background: transparent; } .stage-tile.open.band-teal { background: #fff; border-color: var(--blue); } .stage-tile.band-teal .stage-tile-name::before { background: var(--teal); }
.kcol.band-teal { border-top: 0; background: var(--grey-3); color: inherit; }
.stage-tile-itil { font-size: .7rem; color: var(--text-faint); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gate-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; color: var(--blue); background: var(--blue-tint); border-radius: var(--r-pill); padding: 3px 10px; margin-left: .5rem; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.gate-chip::before { content: '⛩'; font-size: .8rem; }
.kcard-flags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.kflag { font-size: .7rem; font-weight: 600; border-radius: var(--r-pill); padding: 2px 8px; background: var(--band-grey-bg); color: var(--band-grey-fg); }
.kflag.blocked, .kflag.incident { background: var(--band-red-bg); color: var(--band-red-fg); }
.kflag.security, .kflag.review { background: var(--band-amber-bg); color: var(--band-amber-fg); }
.kflag.els { background: var(--band-teal-bg); color: var(--band-teal-fg); }
.kcard.is-blocked { outline: 2px dashed var(--red); outline-offset: -2px; }
.gate-list { margin: .5rem 0; }
.gate-list .field { margin-bottom: .6rem; }
.gate-list label { font-size: .82rem; }
.gate-action { font-size: .82rem; color: var(--band-amber-fg); background: var(--band-amber-bg); padding: .5rem .8rem; border-radius: var(--r-md); margin-bottom: .5rem; }
.stage-gate-note { font-size: .8rem; color: var(--text-muted); margin: -.3rem 0 .75rem; }
.stage-gate-note b { color: var(--blue); }
.kcol.parked { flex-basis: 200px; min-width: 200px; opacity: .85; }
.kmini { background: #fff; border-radius: var(--r-md); padding: .35rem .6rem; font-size: .76rem; color: var(--text); display: flex; align-items: center; gap: .3rem; border-left: 3px solid var(--text-muted); cursor: pointer; }
.kmini .ref { font-weight: 700; color: var(--blue); font-size: .72rem; }
.kmini .kcard-menu { margin-left: auto; }
.strong { color: var(--text-strong); } .ok-text { color: var(--green); }
.side-card:first-child .strong, .side-card:first-child .small, .side-card:first-child .muted { color: rgba(255,255,255,.85); }
.side-card:first-child .ok-text { color: #bfe6cc; }
.side-card:first-child .weak { background: rgba(255,255,255,.16); color: #fff; }
.side-card:first-child .conf-pill { background: rgba(255,255,255,.16); color: #fff; } .side-card:first-child .conf-pill.ok { background: #bfe6cc; color: var(--green); }
/* A table cell must stay a cell: `.row` on a <td> lays its controls out inline instead of flex. */
td.row { display: table-cell; white-space: nowrap; } td.row > * { display: inline-block; vertical-align: middle; margin-right: .4rem; }
body.demo-mode .site-header { top: 30px; }

/* ---------- 23 Sept planning: votes, tags, projects, approval, payroll provenance ---------- */
.kvote { border: 1px solid var(--line); background: #fff; color: var(--text-muted); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; line-height: 1.35rem; cursor: pointer; font-family: inherit; }
.kvote:hover { border-color: var(--orange); color: var(--orange); }
.kvote.on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.shortlist-pill { font-size: .74rem; font-weight: 700; color: var(--orange); background: rgba(240,134,42,.1); border-radius: 999px; padding: .2rem .6rem; }
.kcard-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.ktag { font-size: .68rem; padding: .05rem .45rem; border-radius: 999px; background: rgba(15,76,129,.08); color: var(--navy, #0f4c81); }
.ktag.project { background: rgba(15,76,129,.14); font-weight: 700; }
.kflag.pending { background: rgba(240,134,42,.14); color: #a5520e; }
.kflag.payroll { background: rgba(46,125,50,.12); color: #2e7d32; font-weight: 700; }
.approval-box { border: 1px solid rgba(240,134,42,.45); background: rgba(240,134,42,.06); border-radius: var(--r-md, 12px); padding: .75rem 1rem; }
td .kvote { pointer-events: none; }
.kmini-title { flex: 1; min-width: 0; line-height: 1.25; }
.kcard-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; align-items: center; }
.knext { font-family: inherit; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .2rem .6rem; border: 1px solid var(--navy, #0f4c81); background: #fff; color: var(--navy, #0f4c81); cursor: pointer; }
.knext:hover { background: var(--navy, #0f4c81); color: #fff; }
.knext.gate { border-color: var(--orange); color: #a5520e; } .knext.gate:hover { background: var(--orange); color: #fff; }
.kjourney { font-size: .7rem; text-decoration: none; color: var(--text-muted); border: 1px dashed var(--line); border-radius: 999px; padding: .15rem .5rem; } .kjourney:hover { color: var(--navy, #0f4c81); border-style: solid; }
.move-menu-item.danger { color: var(--red); } a.move-menu-item { display: block; text-decoration: none; }
.btn-danger { color: var(--red); border-color: var(--red); margin-left: auto; }
.journey-box { border: 1px solid rgba(15,76,129,.25); background: rgba(15,76,129,.05); border-radius: var(--r-md, 12px); padding: .75rem 1rem; }
/* Card modal: header and footer stay put, the body scrolls — so the next step is always one click away. */
.modal-backdrop { align-items: center; overflow: hidden; }
.modal { display: flex; flex-direction: column; max-height: calc(100vh - 3rem); }
.modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-footer { flex: 0 0 auto; flex-wrap: wrap; }
.kjourney.chosen { border-style: solid; border-color: var(--navy, #0f4c81); color: var(--navy, #0f4c81); font-weight: 700; background: rgba(15,76,129,.06); }

/* ---------- Discover: layout (chat + short rail, panels beneath) ---------- */
.disc-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 1rem; }
.disc-top .journey { margin-bottom: 0; flex: 1; }
.disc-coverage { font-size: 13px; color: var(--text-muted); white-space: nowrap; display: inline-flex; align-items: center; }
/* 12 Nov: the chat is a fixed-height window that scrolls inside itself — it no longer stretches to the side rail's
   height and pushes the input off the page. Sized to fit the first screen, so the input is always in view. */
.disc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.disc-layout .chat { height: max(460px, calc(100vh - 320px)); max-height: none; }
.disc-layout .chat-log { min-height: 0; overscroll-behavior: contain; scroll-behavior: smooth; }
.disc-layout .chat-quick { max-height: 30vh; overflow-y: auto; }
.disc-rail { display: flex; flex-direction: column; gap: 0; min-height: 0; }
.disc-rail .side-card:last-child { margin-bottom: 0; flex: 1; }
.disc-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; margin-top: 20px; }
.disc-panels .side-card { margin-bottom: 0; }
.disc-panels .side-card:first-child, .disc-rail .next-card { background: #fff; color: inherit; border-color: var(--grey-2); }
.disc-panels .side-card:first-child h3 { color: var(--blue); } .disc-panels .side-card:first-child .small, .disc-panels .side-card:first-child .muted { color: var(--text-muted); }
.disc-panels .side-card:first-child a { color: var(--blue); }
.next-card { border-left: 4px solid var(--blue) !important; }
.next-step { border-top: 1px solid var(--row-border); padding-top: .8rem; } .next-step .strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--blue); }
.finish-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 22px 10px; padding: 10px 14px; border-radius: 14px; background: var(--blue-tint); font-size: 13.5px; }
.finish-strip.done { background: rgba(46,125,50,.1); }
.done-card { align-self: stretch; max-width: none; background: #fff; border: 2px solid var(--blue); border-radius: 18px; padding: 16px 18px; }
.done-card h4 { margin: 0 0 .3rem; font-family: var(--font-display); color: var(--blue); font-size: 1.1rem; }
.done-card .row { gap: 8px; flex-wrap: wrap; margin-top: .6rem; }
@media (max-width: 960px) { .disc-layout { grid-template-columns: 1fr; } .disc-layout .chat { height: calc(100vh - 120px); min-height: 420px; } }
.stage-pill { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .18rem .6rem; white-space: nowrap; background: var(--grey-3); color: var(--text-strong); border: 1px solid transparent; }
.stage-pill.s-0 { background: rgba(15,76,129,.1); color: var(--blue); } .stage-pill.s-1 { background: rgba(240,134,42,.14); color: #a5520e; } .stage-pill.s-2 { background: rgba(240,134,42,.22); color: #7a3b08; } .stage-pill.s-3 { background: rgba(46,125,50,.12); color: #2e7d32; } .stage-pill.s-4 { background: rgba(46,125,50,.2); color: #1b5e20; }
.idea-cell { min-width: 280px; max-width: 460px; } .idea-cell .ref { font-weight: 700; margin-right: .3rem; } .idea-cell b { font-weight: 600; color: var(--text-strong); }
.demo-banner button { margin-left: .6rem; background: #fff; color: var(--orange); border: 0; border-radius: 999px; padding: .1rem .6rem; font-weight: 700; font-size: .78rem; cursor: pointer; }

/* ---------- Dashboard lenses ---------- */
.lens-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lens-bar .seg { margin: 0; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-card { padding: 1.1rem 1.25rem; min-width: 0; } .dash-card.full { grid-column: 1 / -1; }
.dash-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: .7rem; } .dash-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.02rem; color: var(--blue); } .dash-head a { margin-left: auto; }
.dash-card .grid-3 { gap: 10px; } .dash-card .kpi { padding: .8rem .9rem; } .dash-card .kpi-value { font-size: 1.4rem; }
.dash-card table th, .dash-card table td { padding: .45rem .55rem; font-size: .85rem; }
.stackbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--grey-3); } .stackbar span { display: block; height: 100%; }
.stackkey { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .8rem; margin-top: .5rem; color: var(--text-muted); } .stackkey i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; } .stackkey b { color: var(--text-strong); }
.neg-text { color: var(--red); font-weight: 700; }
.review-pill { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.review-pill.draft { background: var(--grey-3); color: var(--text-muted); } .review-pill.submitted { background: rgba(240,134,42,.15); color: #a5520e; } .review-pill.validated { background: rgba(46,125,50,.14); color: #2e7d32; } .review-pill.rejected { background: rgba(200,40,40,.12); color: var(--red); }
.cust-row { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .5rem .2rem; border-top: 1px solid var(--row-border); cursor: default; }
.cust-move button { border: 1px solid var(--grey-2); background: #fff; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; margin-left: 2px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* Provider buttons follow each brand's sign-in guidance: Microsoft = white, 1px #8c8c8c border, Segoe-style 15px semibold, 4-square mark. */
.idp-btn { position: relative; }
.idp-btn .idp-mark { flex: 0 0 auto; }
.idp-btn .idp-label { flex: 1; text-align: left; white-space: nowrap; }
.idp-btn .idp-note { font-size: .7rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.idp-btn.ms { border: 1px solid #8c8c8c; border-radius: 4px; background: #fff; color: #5e5e5e; font-family: 'Segoe UI', var(--font-body), system-ui, sans-serif; font-weight: 600; font-size: 15px; padding: 0 12px; height: 41px; gap: 12px; }
.idp-btn.ms:hover { background: #f3f3f3; border-color: #8c8c8c; color: #5e5e5e; }
.idp-btn.g { border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font-family: 'Roboto', var(--font-body), system-ui, sans-serif; font-weight: 500; font-size: 14px; height: 40px; padding: 0 12px; gap: 10px; }
.idp-btn.g:hover { background: #f8f9fa; border-color: #747775; }

/* ---------- Hub as a journey ---------- */
.hub-head { margin: 8px 0 1.2rem; } .hub-title { font-family: var(--font-display); font-size: var(--fs-hero); color: var(--blue); margin: .2rem 0 .4rem; letter-spacing: -.01em; }
.rules-strip { display: flex; align-items: center; gap: 14px; background: var(--grey-1); border: 1px dashed var(--grey-2); border-radius: 14px; padding: .7rem 1rem; margin-bottom: 12px; font-size: .9rem; } .rules-strip .rules-k { width: 28px; height: 28px; border-radius: 50%; background: var(--grey-3); color: var(--text-muted); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; } .rules-strip > div { flex: 1; }
.hub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hub-step { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--grey-2); border-radius: 18px; padding: 1rem 1.25rem; position: relative; }
.hub-step .hub-n { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); }
.hub-step.done .hub-n { background: var(--green); }
.hub-step.locked { background: var(--grey-1); border-style: dashed; } .hub-step.locked .hub-n { background: var(--grey-3); color: var(--text-muted); } .hub-step.locked h2, .hub-step.locked p { color: var(--text-muted); }
.hub-step.on:not(.done) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15,76,129,.08); }
.hub-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .hub-title-row h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--blue); }
.hub-step p { margin: .25rem 0 .35rem; font-size: .92rem; max-width: 70ch; }
.hub-status { font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.hub-cta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; min-width: 150px; }
.tag.free { background: rgba(46,125,50,.12); color: #2e7d32; }
@media (max-width: 720px) { .hub-step { grid-template-columns: 40px 1fr; } .hub-cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }
/* Nav groups: journey vs tools */
.top-nav .nav-sep { height: 1px; background: var(--grey-2); margin: 6px 8px; }
.stage-tile-lanes { display: flex; flex-wrap: wrap; gap: 3px 4px; margin-top: .45rem; } .stage-tile-lanes span { font-size: .64rem; font-weight: 600; color: var(--text-muted); background: var(--grey-1); border: 1px solid var(--row-border); border-radius: 999px; padding: .05rem .4rem; white-space: nowrap; }
.stage-tile.open .stage-tile-lanes span { background: rgba(15,76,129,.06); color: var(--blue); }
/* Wheel icons and outer-ring tags */
.stage-ico { vertical-align: -4px; color: var(--blue); }
.hub-ico { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; background: var(--grey-1); align-items: center; justify-content: center; color: var(--blue); margin-right: 2px; } .hub-step.locked .hub-ico { color: var(--text-muted); } .hub-step.done .hub-ico { color: var(--green); }
.stage-tile-name .stage-ico { margin-right: 2px; } .section-label .stage-ico { margin-right: 4px; }
.ring-tag { margin-left: auto; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .15rem .6rem; color: #fff; }
.ring-catalyse { background: #0f5fa8; } .ring-create { background: #7ab51d; } .ring-connect { background: #2a9bd6; } .ring-communicate { background: #f08a1d; }
/* Admin policy grid: labels on one line height, inputs on a shared baseline, hints beneath */
.policy-grid { align-items: start; gap: 8px 16px; margin-bottom: 14px; } .policy-grid .field { display: grid; grid-template-rows: 2.4em auto auto; margin-bottom: 0; }
.policy-grid .field label { align-self: end; margin-bottom: 6px; line-height: 1.15; } .policy-grid .field input, .policy-grid .field select { width: 100%; }
.policy-grid .field .small.muted { margin-top: 4px; min-height: 2.4em; line-height: 1.2; }
/* Price list */
.price-table th, .price-table td { padding: .55rem .6rem; vertical-align: top; } .price-table td.num { white-space: nowrap; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.price-table tr.foc td.num { color: var(--green); } .price-table td:last-child { white-space: nowrap; }
.hub-hero { margin: 4px 0 20px; max-width: none; } .hub-hero .hero-greeting { font-size: var(--fs-hero); }
/* The rail must never cut off: the nav column scrolls if the window is short, the bell and avatar stay pinned at the bottom. */
.site-header { overflow: hidden; }
.site-header .top-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 4px; } .site-header .top-nav::-webkit-scrollbar { display: none; }
@media (max-height: 900px) and (min-width: 801px) { .site-header { padding: 10px 0; gap: 4px; } .top-nav { gap: 3px; } .top-nav > a, .nav-more > a { width: 60px; height: 44px; border-radius: 12px; } .top-nav > a svg, .nav-more > a svg { width: 18px; height: 18px; } .top-nav .nav-sep { margin: 4px 8px; } }
@media (max-height: 760px) and (min-width: 801px) { .top-nav > a, .nav-more > a { width: 60px; height: 40px; } .top-nav > a svg, .nav-more > a svg { width: 17px; height: 17px; } .top-nav .nav-label { font-size: 8.5px; } }
.hub-step.attention { border: 2px solid var(--orange); background: #fff8f1; box-shadow: 0 0 0 4px rgba(240,134,42,.12); } .hub-step.attention .hub-n { background: var(--orange); } .hub-step.attention .hub-ico { color: var(--orange); background: #fff; }
.tag.warn { background: rgba(240,134,42,.16); color: #a5520e; }

/* Simplified idea card: secondary sections fold. */
.modal-fold { border-top: 1px solid var(--row-border); padding: .55rem 0; }
.modal-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.modal-fold > summary::-webkit-details-marker { display: none; }
.modal-fold > summary::before { content: '›'; color: var(--text-muted); font-weight: 700; display: inline-block; transition: transform .15s; }
.modal-fold[open] > summary::before { transform: rotate(90deg); }
.modal-fold > summary .modal-section-title { margin: 0; }
.modal-fold > .modal-section { padding-top: .5rem; }
/* Rail: the few pages that matter, then More. */
.nav-more { position: relative; }
.nav-more-menu { display: none; position: fixed; left: 76px; top: 0; background: #fff; border: 1px solid var(--grey-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; min-width: 170px; z-index: 50; }
.nav-more-menu.open { display: block; }
.nav-more-menu a { display: flex; flex-direction: row; width: auto; height: auto; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: .9rem; color: var(--text-strong); text-decoration: none; white-space: nowrap; }
.nav-more-menu a svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-more { display: flex; justify-content: center; }
.nav-more > a { width: 64px; height: 50px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); }
.nav-more > a svg { width: 20px; height: 20px; }
.nav-more > a:hover { background: #eef3f8; color: var(--blue); }
.nav-more > a.active { background: var(--blue); color: #fff; }
.nav-more-menu a:hover, .nav-more-menu a.active { background: var(--grey-1); color: var(--blue); }
.modal-fold > .modal-section > .modal-section-title, .modal-fold > .modal-section:first-of-type > .modal-section-title { display: none; }

/* Hub: the current step carries the one big call to action */
.hub-cta .hub-start { font-size: 1.05rem; padding: .75rem 1.5rem; white-space: nowrap; }

/* ---------- Customer branding: their logo leads, their colour carries the accents (tenant_branding) ---------- */
body.has-tenant-logo .topbar-tenant { order: -1; font-size: 15px; gap: 10px; }
body.has-tenant-logo .topbar .tenant-logo { height: 32px; max-width: 160px; }
body.has-tenant-logo .topbar-brand { font-size: 14px; font-weight: 600; color: var(--text-muted); }
/* With a logo the logo IS the customer's name: no "cyberlab for cyberlab", no colour dot; a thin divider then "AI Lab Max / Discover". */
body.has-tenant-logo .topbar-tenant-name, body.has-tenant-logo .topbar-accent { display: none; }
body.has-tenant-logo .topbar-brand { padding-left: 14px; border-left: 1px solid var(--border, #d9dde3); line-height: 1.2; }
body.has-tenant-accent .btn-primary { background: var(--tenant-accent); color: var(--tenant-accent-text, #fff); }
body.has-tenant-accent .btn-primary:hover { filter: brightness(.94); }
body.has-tenant-accent .section-label, body.has-tenant-accent .topbar-brand { color: var(--blue); }
body.has-tenant-accent .hub-step .hub-n, body.has-tenant-accent .hub-step.attention .hub-n { background: var(--tenant-accent); color: var(--tenant-accent-text, #fff); }
body.has-tenant-accent .hub-step.attention { border-color: var(--tenant-accent); background: var(--tenant-accent-soft); box-shadow: none; }
body.has-tenant-accent .hub-step.attention .hub-ico { color: var(--tenant-accent); }
body.has-tenant-accent .hero { border-top: 4px solid var(--tenant-accent) !important; }
body.has-tenant-accent .topbar { box-shadow: inset 0 -2px 0 var(--tenant-accent); }
body.has-tenant-accent .ask-fab-btn { background: var(--tenant-accent); color: var(--tenant-accent-text, #fff); }

/* Customer scheme: rail logo and a full colour scheme when the brand colour is dark enough */
.rail-tenant-logo { width: 48px; max-height: 44px; object-fit: contain; display: block; }
body.tenant-scheme .hero { background: var(--blue); }
body.tenant-scheme .top-nav > a.active, body.tenant-scheme .nav-more > a.active { background: var(--blue); }
body.tenant-scheme .btn-blue { background: var(--blue); }

/* Costing source badge (ROI rules): payroll data vs blended tiers */
.pay-src { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.pay-src-payroll { background: #e2f3ea; color: #146c43; }
.pay-src-tiers { background: #fff1dc; color: #9a5a00; }

/* Light / white logos: a dark chip behind them, in the customer's own colour when it is dark enough, else our blue */
.tenant-logo.logo-light, .rail-tenant-logo.logo-light { background: var(--blue); padding: 5px 8px; border-radius: 8px; box-sizing: content-box; }
body.tenant-scheme .tenant-logo.logo-light, body.tenant-scheme .rail-tenant-logo.logo-light { background: var(--tenant-accent); }
.rail-tenant-logo.logo-light { width: 40px; }

/* Company data card — loaded state */
.org-loaded { display: flex; gap: 10px; align-items: flex-start; background: #e8f5ec; color: #1c3b2a; border-radius: 12px; padding: 10px 12px; }
.org-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #1f8a4c; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.org-loaded .muted { color: #4a6355; }

/* Symbol-only logo: show the company name next to it (without the word "for"). */
body.has-tenant-logo.logo-is-icon .topbar-tenant-name { display: inline; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
body.has-tenant-logo.logo-is-icon .topbar-tenant-name b { font-weight: 700; }
body.has-tenant-logo .topbar-for { display: none; }

.tag.tag-warn { background: #fdf0d5; color: #8a5a00; }

/* Discovery depth: how far through the questions for the current challenge */
.depth-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--tenant-accent-soft, #e9eef6); color: var(--blue); margin-right: 6px; }
.depth-pill.ok { background: var(--band-green-bg); color: var(--band-green-fg); }
.depth-bar { display: inline-block; width: 46px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.12); overflow: hidden; } .depth-bar > span { display: block; height: 100%; background: currentColor; }
.depth-hint { padding: 4px 6px 0; }

/* Onboarding research: facts grouped by source, sources one per site, searched as status lines */
.fact-group + .fact-group { margin-top: 14px; }
.fact-group-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { padding: 7px 0; border-bottom: 1px solid var(--border, #e6e8ec); line-height: 1.45; }
.fact-list li:last-child { border-bottom: 0; }
.fact-src { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sys-chip { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--tenant-accent-soft, #eef2f8); color: var(--text); font-weight: 600; font-size: 13px; margin: 0 4px 4px 0; }
.src-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.src-link { text-decoration: none; color: var(--blue); } .src-link:hover { text-decoration: underline; }
.searched { list-style: none; margin: 0; padding: 0; }
.searched li { display: grid; grid-template-columns: 18px minmax(120px, 15rem) 1fr; gap: 8px; padding: 3px 0; align-items: baseline; }
.searched .mk { font-weight: 700; text-align: center; } .searched .k { color: var(--text); } .searched .v { color: var(--text-muted); }
.searched li.ok .mk { color: var(--green, #1f8a4c); } .searched li.warn .mk, .searched li.warn .v { color: #a15c00; } .searched li.none .mk { color: var(--text-muted); }
@media (max-width: 600px) { .searched li { grid-template-columns: 18px 1fr; } .searched .v { grid-column: 2; } }
img[data-logo].logo-light { background: var(--blue); padding: 4px 6px; border-radius: 6px; box-sizing: border-box; }
body.tenant-scheme img[data-logo].logo-light { background: var(--tenant-accent); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.team-card { border: 1px solid var(--border, #e3e6ea); border-radius: 8px; padding: .6rem .75rem; }
.team-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; margin-bottom: .3rem; }
.team-roles { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.team-roles li { display: flex; justify-content: space-between; padding: .12rem 0; border-top: 1px dashed var(--border, #eceff2); }
.addr .addr-item { display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; background: var(--grey-1, #f3f4f6); color: inherit; text-decoration: none; font-size: .8rem; }
.addr .addr-item:hover { text-decoration: underline; }
.prove-first { border: 1px solid var(--blue, #1f6feb); background: var(--blue-tint, #eef4ff); border-radius: 10px; padding: .7rem .9rem; margin: .5rem 0 .8rem; }
.prove-first.slim { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .8rem; }
.prove-first .pf-opt { display: block; margin: .25rem 0; }

/* 11 Nov: ROI working, intention scenarios, bulleted brief */
.working { margin: .25rem 0 .5rem 1.1rem; padding: 0; font-size: .9rem; line-height: 1.5; }
.working li { margin: .15rem 0; }
.scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin: .6rem 0; }
.scenario { border: 1px solid var(--border, #e3e6ea); border-radius: 8px; padding: .6rem .7rem; background: var(--surface, #fff); }
.scenario.chosen { border-color: var(--blue, #1f6feb); box-shadow: 0 0 0 2px rgba(31,111,235,.15); }
.scen-val { font-size: 1.15rem; font-weight: 700; margin: .1rem 0 .2rem; }
.brief-list { margin: .2rem 0 .5rem 1.1rem; padding: 0; }
.brief-list li { margin: .12rem 0; }
.brief-head { margin-top: .5rem; }
.research-steps { list-style: none; margin: .5rem 0; padding: 0; }
.research-steps li { padding: .2rem 0; font-size: .9rem; color: var(--muted, #6b7280); }
.research-steps li.done { color: inherit; }
.research-steps li.done::before { content: '✓ '; color: var(--green, #1a7f37); font-weight: 700; }
.research-steps li.doing::before { content: '… '; font-weight: 700; }
.research-steps li.todo::before { content: '○ '; }
.intro-step { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Step by step: discovery → your journeys → request a quote (18 Nov 2026) */
.flow-steps { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; font-weight: 600; }
.flow-steps span { border: 1px solid var(--grey-2); border-radius: 999px; padding: 4px 12px; color: var(--text-muted); background: #fff; }
.flow-steps .done { color: var(--green); border-color: var(--green-soft); }
.flow-steps .here { background: var(--blue); border-color: var(--blue); color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ROI rules, step 1 (redesign 19 Nov 2026): one drop area for pay data; tiers greyed out when pay data is in use */
.rw-drop { border: 2px dashed var(--blue); border-radius: 16px; background: var(--blue-tint); color: var(--blue); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rw-drop.over { background: #fff; border-style: solid; } .rw-drop-title { font-weight: 700; font-size: 1.05rem; } .rw-drop > div:not(.rw-drop-title) { color: var(--text); }
.rw-chip { background: #fff; color: var(--blue); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 700; }
.rw-file { border: 2px solid var(--green); border-radius: 16px; background: #eef6f0; color: #14502a; padding: 14px 16px; display: flex; align-items: center; gap: 12px; } .rw-file-name { font-weight: 700; overflow-wrap: anywhere; } .rw-file .small { color: var(--text-strong); }
.rw-or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12.5px; font-weight: 700; margin: 14px 0; } .rw-or span { flex: 1; height: 1px; background: var(--grey-2); }
.rw-tiers { margin-top: 14px; } .rw-tiers-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; } .rw-tiers-title { color: var(--blue); font-size: 1.05rem; }
.rw-pill { background: #fdebd3; color: #7a4a06; border-radius: 999px; padding: 2px 12px; font-size: 12.5px; font-weight: 700; } .rw-pill.off { background: var(--grey-2); color: var(--text-strong); }
.rw-tiers.off { border: 1.5px solid var(--grey-2); border-radius: 16px; background: var(--grey-3); padding: 14px 16px; } .rw-tiers.off .rw-tiers-title { color: var(--text-muted); } .rw-tiers.off input:disabled { background: var(--grey-3); color: var(--text-muted); }
.rw-choice { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.rw-card { flex: 1 1 220px; text-align: left; cursor: pointer; background: #fff; border: 1.5px solid var(--grey-2); border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; min-height: 88px; color: var(--text); }
.rw-card.on { border: 2.5px solid var(--blue); background: var(--blue-tint); } .rw-card:hover { border-color: var(--blue); }
.rw-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .rw-card-top b { color: var(--blue); font-size: 1rem; }
.rw-tag { background: #e6f2ea; color: #14502a; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; } .rw-card-state { font-size: 12.5px; font-weight: 700; color: var(--text-muted); } .rw-card.on .rw-card-state { color: var(--blue); }
