/* ═══════════════════════════════════════════════════════════════════
   AZM INSIDERS  ·  Shared Design System  ·  v3
   Single stylesheet for all 82 screen pages + index
   ═══════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design tokens ────────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:       #1B3A6B;
  --navy2:      #2C4E8A;
  --navy3:      #152C55;
  --teal:       #0E7C7B;
  --teal-lt:    #E0F4F4;
  --teal-md:    #26A9A8;
  --gold:       #C9A84C;
  --gold-lt:    #FDF8EC;
  --gold-dk:    #8a6a10;

  /* Semantic */
  --green:      #2E7D52;
  --green-lt:   #E8F5EE;
  --amber:      #D97706;
  --amber-lt:   #FEF3C7;
  --red:        #C0392B;
  --red-lt:     #FDECEA;
  --blue:       #1565C0;
  --blue-lt:    #E3F0FD;
  --purple:     #6B21A8;
  --purple-lt:  #F3E8FF;

  /* Neutrals */
  --n900:       #1A1A2E;
  --n700:       #3D4456;
  --n500:       #6B7280;
  --n400:       #9CA3AF;
  --n300:       #D1D5DB;
  --n100:       #F3F4F6;
  --white:      #FFFFFF;
  --bg:         #EEF1F6;

  /* Surfaces */
  --border:     #E2E8F0;
  --border2:    #CBD5E1;

  /* Typography */
  --font:       'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:       'JetBrains Mono', monospace;

  /* Shadows */
  --sh1:        0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --sh2:        0 2px 8px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.06);
  --sh3:        0 8px 24px rgba(0,0,0,0.10), 0 24px 56px rgba(0,0,0,0.08);

  /* Radii */
  --r-sm:       6px;
  --r:          10px;
  --r-lg:       14px;
  --r-xl:       20px;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--n700);
  margin: 0;
}

/* Page shell: flex column holding layout row + scenario bar */
.page-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 52px);  /* 52px = top-bar height */
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }


/* ══════════════════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════════════════ */
.top-bar {
  background: var(--navy);
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Logo mark */
.tb-logo {
  width: 34px;
  height: 34px;
  background: var(--teal);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Brand name */
.tb-brand {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.tb-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Module label */
.tb-module {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right cluster */
.tb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Role chips */
.role-chip {
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.role-chip:not(.active) {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.12);
}
.role-chip:not(.active):hover {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
}
.role-chip.active.rc-ba    { background: var(--teal-lt);   color: var(--teal);   border-color: var(--teal); }
.role-chip.active.rc-lead  { background: var(--blue-lt);   color: var(--blue);   border-color: var(--blue); }
.role-chip.active.rc-admin { background: var(--purple-lt); color: var(--purple); border-color: var(--purple); }
.role-chip.active.rc-ceo   { background: var(--gold-lt);   color: var(--gold-dk);border-color: var(--gold); }


/* ══════════════════════════════════════════════════════════════════
   LAYOUT  (sidebar + main)
   ══════════════════════════════════════════════════════════════════ */
.layout {
  display: flex;
  flex: 1;               /* takes all space in page-shell except scenario-bar */
  overflow: hidden;      /* clips sidebar + main scroll independently */
  min-height: 0;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  /* height fills from .layout overflow:hidden — no explicit height needed */
}

/* Role filter strip */
.sb-role-filter {
  display: flex;
  gap: 4px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-role-btn {
  flex: 1;
  padding: 4px 0;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--n100);
  font-size: 10px;
  font-weight: 700;
  color: var(--n500);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.sb-role-btn:hover { border-color: var(--teal); color: var(--teal); }
.sb-role-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Accordion modules */
.sb-modules { flex: 1; padding: 8px 0 16px; }

.sb-mod-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 0;
  transition: background 0.12s;
  position: relative;
}
.sb-mod-header:hover { background: var(--n100); }
.sb-mod-header.open  { background: var(--teal-lt); }
.sb-mod-header.has-active { background: var(--teal-lt); }

.sb-mod-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sb-mod-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-mod-header.open .sb-mod-name,
.sb-mod-header.has-active .sb-mod-name { color: var(--teal); }

.sb-mod-chevron {
  font-size: 9px;
  color: var(--n400);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sb-mod-header.open .sb-mod-chevron { transform: rotate(180deg); color: var(--teal); }

/* Screen list inside expanded module */
.sb-screen-list {
  display: none;
  padding: 2px 0 4px 0;
  background: #FAFBFD;
  border-bottom: 1px solid var(--border);
}
.sb-screen-list.open { display: block; }

.sb-screen-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 32px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--n500);
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-screen-item:hover { background: var(--teal-lt); color: var(--teal); }
.sb-screen-item.active {
  background: var(--teal-lt);
  color: var(--teal);
  font-weight: 700;
  border-right: 2px solid var(--teal);
}
.sb-screen-num {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--n400);
  width: 16px;
  flex-shrink: 0;
  text-align: right;
}
.sb-screen-item.active .sb-screen-num { color: var(--teal); }


/* ── Main content ───────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px 28px 40px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--n400);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--teal);
  font-weight: 600;
  transition: opacity 0.15s;
}
.breadcrumb a:hover { opacity: 0.75; }
.breadcrumb .bc-sep { color: var(--n300); }
.breadcrumb .bc-current { color: var(--n700); font-weight: 600; }

/* Page title block */
.page-header { margin-bottom: 20px; }
.page-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.page-sub {
  font-size: 12.5px;
  color: var(--n500);
  line-height: 1.6;
}


/* ══════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh1);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title .ct-icon { font-size: 15px; }

/* Card accent variants */
.card-teal  { border-top: 3px solid var(--teal); }
.card-blue  { border-top: 3px solid var(--blue); }
.card-green { border-top: 3px solid var(--green); }
.card-amber { border-top: 3px solid var(--amber); }
.card-red   { border-top: 3px solid var(--red); }
.card-navy  { border-top: 3px solid var(--navy); }


/* ══════════════════════════════════════════════════════════════════
   GRIDS
   ══════════════════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* Stat tiles */
.stat-tile {
  background: var(--n100);
  border-radius: var(--r);
  padding: 14px 16px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  font-family: var(--mono);
}
.stat-lbl {
  font-size: 10.5px;
  color: var(--n500);
  margin-top: 4px;
  letter-spacing: 0.03em;
}


/* ══════════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  padding: 9px 12px;
  background: var(--n100);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--n500);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F4F8;
  color: var(--n700);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #F7F9FC; }


/* ══════════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-green  { background: var(--green-lt);  color: var(--green); }
.badge-amber  { background: var(--amber-lt);  color: var(--amber); }
.badge-red    { background: var(--red-lt);    color: var(--red); }
.badge-blue   { background: var(--blue-lt);   color: var(--blue); }
.badge-teal   { background: var(--teal-lt);   color: var(--teal); }
.badge-purple { background: var(--purple-lt); color: var(--purple); }
.badge-navy   { background: var(--navy3);     color: #fff; }
.badge-grey   { background: var(--n100);      color: var(--n500); }


/* ══════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }

.form-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--n700);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.form-req { color: var(--red); font-size: 10px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--n900);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,124,123,0.10);
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-hint { font-size: 11px; color: var(--n400); margin-top: 4px; }

/* Hint (?) icon */
.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--n300);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
}
.hint::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--n900);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  font-family: var(--font);
  padding: 7px 11px;
  border-radius: 7px;
  width: 220px;
  white-space: normal;
  line-height: 1.55;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.hint::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--n900);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.hint:hover::after,
.hint:hover::before { opacity: 1; }


/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r);
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--teal);  color: #fff; }
.btn-primary:hover { background: var(--teal-md); }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy2); }

.btn-ghost {
  background: var(--n100);
  color: var(--n700);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: #EAECF0; border-color: var(--border2); }

.btn-danger { background: var(--red-lt); color: var(--red); border: 1.5px solid #FECACA; }
.btn-danger:hover { background: #FEE2E2; }

.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 11px 24px; font-size: 13.5px; }

.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}


/* ══════════════════════════════════════════════════════════════════
   INFO / STATUS BOXES
   ══════════════════════════════════════════════════════════════════ */
.info-box  { background: var(--teal-lt);  border: 1px solid #9AD8D7; border-radius: var(--r); padding: 12px 15px; font-size: 12.5px; color: #0a5958; margin-bottom: 14px; line-height: 1.6; }
.warn-box  { background: var(--amber-lt); border: 1px solid #FCD34D; border-radius: var(--r); padding: 12px 15px; font-size: 12.5px; color: #92400E; margin-bottom: 14px; line-height: 1.6; }
.success-box { background: var(--green-lt); border: 1px solid #6EE7B7; border-radius: var(--r); padding: 12px 15px; font-size: 12.5px; color: #065F46; margin-bottom: 14px; line-height: 1.6; }
.error-box { background: var(--red-lt);   border: 1px solid #FCA5A5; border-radius: var(--r); padding: 12px 15px; font-size: 12.5px; color: #7F1D1D; margin-bottom: 14px; line-height: 1.6; }


/* ══════════════════════════════════════════════════════════════════
   LIST ITEMS
   ══════════════════════════════════════════════════════════════════ */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #F0F4F8;
}
.list-item:last-child { border-bottom: none; }
.li-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.li-body { flex: 1; min-width: 0; }
.li-title { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.li-sub   { font-size: 11.5px; color: var(--n500); line-height: 1.5; }
.li-right { flex-shrink: 0; text-align: right; }

/* Progress bar */
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--teal);
  transition: width 0.4s ease;
}


/* ══════════════════════════════════════════════════════════════════
   SCENARIO BAR  (sticky bottom, collapsed by default)
   ══════════════════════════════════════════════════════════════════ */
.scenario-bar {
  flex-shrink: 0;        /* always visible at bottom of page-shell */
  background: var(--white);
  border-top: 2px solid var(--border);
  z-index: 50;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

/* Toggle strip (always visible) */
.sc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  cursor: pointer;
  user-select: none;
}
.sc-toggle:hover { background: var(--n100); }

.sc-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--n500);
  flex-shrink: 0;
}

/* Tab strip */
.sc-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}
.sc-tab {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--n100);
  color: var(--n500);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sc-tab:hover { border-color: var(--teal); color: var(--teal); }
.sc-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.sc-chevron {
  font-size: 9px;
  color: var(--n400);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sc-chevron.open { transform: rotate(180deg); }

/* Panels (hidden by default) */
.sc-body {
  display: none;
  padding: 10px 20px 14px;
  border-top: 1px solid var(--border);
  max-height: 140px;
  overflow-y: auto;
}
/* sc-body.open removed — JS handles display */

/* Main panel */
.sc-main-text {
  font-size: 12.5px;
  color: var(--n700);
  line-height: 1.65;
  padding: 9px 13px;
  background: var(--n100);
  border-radius: var(--r);
  border-left: 3px solid var(--green);
}

/* Bubble panels (Alternatives / Exceptional / What if) */
.sc-bubble-wrap { display: flex; flex-direction: column; gap: 6px; }

.sc-bubbles {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.sc-bubble {
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid;
  transition: all 0.15s;
  font-family: var(--font);
  letter-spacing: 0.03em;
}
.sc-bubble:hover { filter: brightness(0.92); }
.sc-bubble.sel   { box-shadow: 0 0 0 3px rgba(0,0,0,0.12); }

/* Blue (Alternatives) */
.sc-alt  .sc-bubble { background: var(--blue-lt);  color: var(--blue);  border-color: #93C5FD; }
/* Red (Exceptional) */
.sc-exc  .sc-bubble { background: var(--red-lt);   color: var(--red);   border-color: #FCA5A5; }
/* Amber (What if) */
.sc-wif  .sc-bubble { background: var(--amber-lt); color: var(--amber); border-color: #FCD34D; }

/* Detail lane */
.sc-detail-lane {
  min-height: 26px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--n700);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.025);
  display: none;
}
.sc-detail-lane.visible { display: block; }


/* ══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════ */
.tag-row  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--blue-lt);
  color: var(--blue);
}
.tag-x { cursor: pointer; opacity: 0.6; font-size: 12px; }
.tag-x:hover { opacity: 1; }

.text-muted  { color: var(--n500); }
.text-navy   { color: var(--navy); }
.text-teal   { color: var(--teal); }
.text-mono   { font-family: var(--mono); }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }
.mb-8        { margin-bottom: 8px; }
.mb-12       { margin-bottom: 12px; }
.mb-16       { margin-bottom: 16px; }

/* Decision / question highlight items */
.decision-item {
  background: var(--green-lt);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 9px 13px;
  margin-bottom: 7px;
}
.question-item {
  background: var(--amber-lt);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 9px 13px;
  margin-bottom: 7px;
}
.qi-title { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.qi-meta  { font-size: 11px; color: var(--n500); }

/* KA ring */
.ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--n500);
  flex-shrink: 0;
}
.ring.complete     { border-color: var(--teal);  color: var(--teal); }
.ring.in-progress  { border-color: var(--amber); color: var(--amber); }

/* Prompt preview (dark) */
.prompt-preview {
  background: var(--n900);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #CBD5E1;
  line-height: 1.8;
}
.pp-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-md);
  margin-bottom: 3px;
}
.pp-value { color: #F1F5F9; margin-bottom: 12px; }
.pp-empty { color: #475569; font-style: italic; margin-bottom: 12px; }


/* ══════════════════════════════════════════════════════════════════
   MISSING PAGE-SPECIFIC CLASSES  (v2 content classes not in base)
   ══════════════════════════════════════════════════════════════════ */

/* Query type selector */
.qt-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-bottom:18px; }
.qt-btn { padding:13px 12px; border-radius:var(--r); border:1.5px solid var(--border); background:var(--n100); cursor:pointer; transition:all .15s; text-align:left; font-family:var(--font); }
.qt-btn:hover, .qt-btn.selected { border-color:var(--teal); background:var(--teal-lt); box-shadow:0 0 0 3px rgba(14,124,123,.10); }
.qt-icon { font-size:20px; margin-bottom:6px; }
.qt-name { font-size:12px; font-weight:700; color:var(--n900); margin-bottom:2px; }
.qt-desc { font-size:11px; color:var(--n500); }

/* Form extras */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.fl-req { color:var(--red); font-size:10px; }

/* Routing preview */
.routing-preview { background:var(--gold-lt); border:1px solid #E8C47A; border-radius:var(--r); padding:13px 15px; display:flex; align-items:center; gap:11px; margin-bottom:14px; }
.rp-icon { font-size:20px; }
.rp-text { font-size:12.5px; color:var(--gold-dk); font-weight:500; }

/* Result header (LocalResult / AIResult) */
.result-header { display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--n100); border-radius:var(--r); margin-bottom:14px; }
.rh-icon { font-size:22px; flex-shrink:0; }
.rh-badge { font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; }
.rh-cost { font-size:11px; color:var(--n500); margin-left:auto; }
.result-body { font-size:13px; line-height:1.75; color:var(--n700); }

/* Confidence bar */
.conf-bar-wrap { background:var(--n100); border-radius:8px; overflow:hidden; height:8px; margin:6px 0; }
.conf-bar-fill { height:100%; border-radius:8px; background:var(--teal); transition:width .4s ease; }
.conf-row { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.conf-pct { font-size:16px; font-weight:800; font-family:var(--mono); color:var(--navy); width:44px; flex-shrink:0; }
.conf-display { font-size:13px; color:var(--n500); }

/* Routing display steps */
.step-num { width:26px; height:26px; border-radius:50%; background:var(--navy); color:#fff; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.step-title { font-size:13px; font-weight:700; color:var(--navy); }
.step-body, .step-detail { font-size:12.5px; color:var(--n500); }
.step-pill { display:inline-flex; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.db-icon { font-size:18px; flex-shrink:0; }
.db-title { font-size:13px; font-weight:700; color:var(--navy); margin-bottom:2px; }
.db-sub { font-size:12px; color:var(--n500); }
.db-local { font-size:12px; font-weight:700; color:var(--green); }
.decision-box { background:var(--green-lt); border:1px solid #86C8A4; border-radius:var(--r); padding:13px 15px; }
.pill-green { background:var(--green-lt); color:var(--green); padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }

/* Source drawer */
.drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:400; }
.drawer-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.drawer-title { font-size:16px; font-weight:800; color:var(--navy); }
.drawer-body { flex:1; overflow-y:auto; }
.drawer-foot { margin-top:14px; display:flex; gap:8px; }
.source-chip { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:20px; font-size:11px; background:var(--n100); border:1px solid var(--border); color:var(--n700); }
.ctx-chip { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:20px; font-size:11px; background:var(--blue-lt); color:var(--blue); border:1px solid #93C5FD; }
.ctx-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ai-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.meta-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; color:var(--n500); margin-bottom:10px; }
.meta-pill { padding:2px 8px; border-radius:20px; font-size:11px; background:var(--n100); color:var(--n700); }
.section-tag { font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--n400); margin-bottom:4px; }
.query-echo { font-size:12.5px; color:var(--n700); background:var(--n100); border-radius:var(--r); padding:10px 13px; margin-bottom:12px; font-style:italic; }
.lead-note { font-size:12px; color:var(--amber); background:var(--amber-lt); border-radius:var(--r); padding:8px 12px; }
.sc-desc { font-size:12px; color:var(--n500); font-style:italic; }

/* Hint icon (alias for .hint already defined, but old pages use .hint-icon) */
.hint-icon { display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; border-radius:50%; background:var(--n300); color:#fff; font-size:8.5px; font-weight:800; cursor:help; position:relative; flex-shrink:0; vertical-align:middle; margin-left:3px; }
.hint-icon:hover::after { content:attr(data-hint); position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:var(--n900); color:#fff; font-size:11px; font-weight:400; padding:6px 10px; border-radius:6px; width:220px; white-space:normal; z-index:300; line-height:1.5; pointer-events:none; }

/* KA cards (BABOK hub) */
.ka-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.ka-card { background:var(--white); border:1.5px solid var(--border); border-radius:var(--r-lg); padding:16px; cursor:pointer; transition:all .2s; text-decoration:none; color:inherit; display:block; }
.ka-card:hover { border-color:var(--teal); box-shadow:var(--sh2); transform:translateY(-2px); }
.ka-card.active { border-color:var(--teal); background:var(--teal-lt); }
.ka-icon { font-size:22px; margin-bottom:8px; }
.ka-name { font-size:13px; font-weight:700; color:var(--navy); margin-bottom:3px; }
.ka-desc { font-size:11.5px; color:var(--n500); line-height:1.5; }
.ka-meta { display:flex; align-items:center; gap:8px; margin-top:10px; }

/* Session capture (Comms) */
.session-meta { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:16px; }
.qi-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }

/* Prompt builder */
.builder-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
.pp-section { margin-bottom:12px; }

/* Button variant */
.btn-success { background:var(--green); color:#fff; border:none; }
.btn-success:hover { background:#256644; }


.sc-all-details { display: none; }  /* hidden details store */


/* ══════════════════════════════════════════════════════════════════
   HELP BUTTON + POPUP
   ══════════════════════════════════════════════════════════════════ */
.help-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}
.help-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  transform: scale(1.05);
}

/* Overlay */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
}
.help-overlay.open { display: flex; }

/* Panel */
.help-panel {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh3);
  width: 100%;
  max-width: 560px;
  padding: 28px 30px 26px;
  position: relative;
  animation: helpPop 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes helpPop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--n100);
  color: var(--n500);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.help-close:hover { background: var(--n300); color: var(--n900); }

.help-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.help-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.help-lede {
  font-size: 13px;
  color: var(--n500);
  line-height: 1.65;
  margin-bottom: 18px;
}

/* Who / When meta row */
.help-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: var(--n100);
  border-radius: var(--r);
  margin-bottom: 18px;
}
.hm-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n400);
  margin-bottom: 3px;
}
.hm-value {
  font-size: 12px;
  color: var(--n700);
  line-height: 1.5;
}

/* Sections */
.help-section { margin-bottom: 16px; }
.help-section:last-child { margin-bottom: 0; }
.help-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 7px;
}
.help-section-body {
  font-size: 12.5px;
  color: var(--n700);
  line-height: 1.65;
}

.help-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--n700);
  line-height: 1.65;
}
.help-steps li { margin-bottom: 5px; }
.help-steps li:last-child { margin-bottom: 0; }

.help-related {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.help-related-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--teal-lt);
  color: var(--teal);
  border: 1px solid #9AD8D7;
  text-decoration: none;
  transition: all 0.15s;
}
.help-related-chip:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
