/* ============================================================
   BondGov Issuer Center — redesign prototype
   Tokens mirror @munipro/shell tokens.css; component layer is
   a reworked, operational evolution of issuer-center base.css.
   ============================================================ */

:root {
  /* Brand / semantic */
  --mp-primary: #176b52;
  --mp-primary-light: #2a8a6e;
  --mp-primary-dark: #0f4a3a;
  --mp-accent: #d4a64a;
  --mp-accent-soft: #ecc97a;
  --mp-accent-600: #b7791f;
  --mp-brand-deep: #0a3326;
  --mp-danger: #9a2b2b;
  --mp-warning: #b7791f;
  --mp-success: #2f6b3f;

  /* Chart palette */
  --mp-chart-1: #176b52;
  --mp-chart-2: #115b98;
  --mp-chart-3: #d4a64a;
  --mp-chart-4: #6772e4;
  --mp-chart-5: #b76bc4;

  /* Warm neutrals */
  --mp-gray-50: #faf8f0;
  --mp-gray-100: #f3eee0;
  --mp-gray-200: #ebe5d2;
  --mp-gray-300: #d8d2bf;
  --mp-gray-400: #9aa0ac;
  --mp-gray-500: #6b7384;
  --mp-gray-600: #3a4456;
  --mp-gray-700: #2a3242;
  --mp-gray-800: #1a2230;
  --mp-gray-900: #111827;

  /* Surfaces / text */
  --mp-bg-page: #fbf7ec;
  --mp-bg-card: #ffffff;
  --mp-bg-sidebar: #0a3326;
  --mp-border: #d8d2bf;
  --mp-border-soft: #ede8da;
  --mp-text: #111827;
  --mp-text-muted: #6b7384;
  --mp-text-inverse: #ffffff;

  /* Type */
  --mp-font-serif: 'Source Serif 4', Georgia, serif;
  --mp-font-sans: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
  --mp-font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --mp-line-height: 1.5;

  /* Radius — operational, <= 8px per brief */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgb(15 74 58 / 6%);
  --sh-md: 0 4px 10px -3px rgb(15 74 58 / 12%), 0 2px 4px -2px rgb(15 74 58 / 8%);
  --sh-lg: 0 16px 40px -12px rgb(12 40 30 / 26%);

  --t-fast: 130ms ease;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  font-family: var(--mp-font-sans);
  font-size: 14px;
  line-height: var(--mp-line-height);
  color: var(--mp-text);
  background: var(--mp-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--mp-primary); outline-offset: 1px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfc8b4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b9b199; }

#root { min-height: 100vh; }

/* ---- App frame ------------------------------------------------ */
.app {
  display: flex;
  min-height: 100vh;
}
.app__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app__main {
  flex: 1;
  min-width: 0;
}
.app__frame {
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 22px 60px;
}

/* ---- Slim product sidebar (single Issuer Center tile) --------- */
.sidebar {
  width: 64px;
  flex: 0 0 64px;
  background: var(--mp-bg-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 11px 0 14px;
  border-right: 1px solid rgba(255,255,255,0.07);
  z-index: 40;
}
.sidebar__brand {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.sidebar__brand svg { display: block; }
.sidebar__tile {
  position: relative;
  width: 50px; padding: 9px 4px;
  border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.62);
}
.sidebar__tile span {
  font-size: 9px; font-weight: 700; line-height: 1.12;
  text-align: center; letter-spacing: 0.02em;
}
.sidebar__tile.is-active { background: rgba(255,255,255,0.10); color: #fff; }
.sidebar__tile.is-active::before {
  content: ""; position: absolute;
  left: -11px; top: 7px; bottom: 7px; width: 3px;
  background: var(--mp-accent); border-radius: 0 2px 2px 0;
}
.sidebar__foot { margin-top: auto; }
.sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a8a6e, #0f4a3a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.18);
}

/* ---- Topbar --------------------------------------------------- */
.topbar {
  background: var(--mp-bg-card);
  border-bottom: 1px solid var(--mp-border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__row {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 22px;
}
.tabs { display: flex; align-self: stretch; gap: 1px; }
.tab {
  position: relative;
  border: none; background: transparent;
  color: var(--mp-text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0 12px; min-width: 54px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  border-bottom: 2.5px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--mp-text); }
.tab.is-active { color: var(--mp-primary); border-bottom-color: var(--mp-primary); }
.topbar__title {
  font-family: var(--mp-font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--mp-primary-dark);
  line-height: 1;
  white-space: nowrap;
  padding-left: 2px;
}
.topbar__spacer { flex: 1; min-width: 8px; }
.search {
  position: relative;
  width: 178px;
}
.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--mp-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  background: var(--mp-gray-50);
}
.search input::placeholder { color: #9aa0ac; }
.search .icon { position: absolute; left: 9px; top: 9px; color: #9aa0ac; }
.search__menu {
  position: absolute; top: 40px; left: 0; right: 0;
  background: #fff; border: 1px solid var(--mp-border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  overflow: hidden; z-index: 60;
}
.search__menu button {
  display: flex; width: 100%; text-align: left;
  gap: 8px; align-items: center;
  padding: 9px 12px; border: none; background: #fff;
  border-bottom: 1px solid var(--mp-gray-100); font-size: 13px;
}
.search__menu button:last-child { border-bottom: none; }
.search__menu button:hover { background: var(--mp-gray-50); }

/* ---- Scope / context strip (persistent) ----------------------- */
.scope {
  background: var(--mp-bg-card);
  border-bottom: 1px solid var(--mp-border);
  position: sticky; top: 60px; z-index: 25;
}
.scope__row {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px;
}
.scope__swatch {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--mp-primary-light), var(--mp-primary-dark));
  border: 1px solid var(--mp-primary-dark);
}
.scope__id { min-width: 0; }
.scope__name {
  font-size: 13.5px; font-weight: 700; color: var(--mp-primary-dark);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.2;
}
.scope__role {
  font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px;
}
.scope__role--edit {
  color: var(--mp-accent-600);
  background: color-mix(in srgb, var(--mp-accent) 20%, #fff);
  border: 1px solid color-mix(in srgb, var(--mp-accent) 45%, #fff);
}
.scope__role--view { color: var(--mp-text-muted); background: var(--mp-gray-100); border: 1px solid var(--mp-border); }
.scope__acting { font-size: 11.5px; color: var(--mp-text-muted); margin-top: 2px; }
.scope__acting .dot { margin: 0 6px; opacity: 0.5; }
.scope__spacer { flex: 1; min-width: 8px; }

.scope__ready {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--mp-border); background: var(--mp-gray-50);
  border-radius: var(--r-sm); padding: 5px 11px; cursor: pointer; white-space: nowrap;
}
.scope__ready:hover { border-color: #c7bfa8; }
.scope__ready strong { font-size: 13px; font-family: var(--mp-font-mono); font-weight: 700; }
.scope__ready-lbl { font-size: 11px; color: var(--mp-text-muted); font-weight: 600; }
.scope__ready-bar { width: 44px; height: 5px; border-radius: 3px; background: var(--mp-gray-200); overflow: hidden; }
.scope__ready-bar i { display: block; height: 100%; border-radius: 3px; }
.scope__ready--ok .scope__ready-bar i { background: var(--mp-success); }
.scope__ready--ok strong { color: var(--mp-success); }
.scope__ready--warn .scope__ready-bar i { background: var(--mp-accent-600); }
.scope__ready--warn strong { color: var(--mp-accent-600); }
.scope__ready--bad .scope__ready-bar i { background: var(--mp-danger); }
.scope__ready--bad strong { color: var(--mp-danger); }

.scope__sync { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mp-text-muted); font-weight: 600; white-space: nowrap; }
.scope__sync-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mp-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mp-success) 20%, transparent);
}
.scope__btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: var(--r-sm);
  border: 1px solid var(--mp-border); background: #fff; color: var(--mp-text);
  font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.scope__btn:hover { background: var(--mp-gray-50); border-color: #c7bfa8; color: var(--mp-primary); }
.scope__btn--toggle.is-on { background: var(--mp-primary); color: #fff; border-color: var(--mp-primary); }
.scope__btn--toggle svg { transition: transform var(--t-fast); }
.scope__btn--toggle.is-on svg { transform: rotate(180deg); }

.scope__detail {
  max-width: 1320px; margin: 0 auto; padding: 12px 22px 15px;
  display: grid; grid-template-columns: 1.25fr 1fr 1.1fr; gap: 26px;
  border-top: 1px dashed var(--mp-border);
}
.scope__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; align-content: start; }
.scope__fact { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.scope__fact-k { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mp-text-muted); }
.scope__fact-v { font-size: 12.5px; font-weight: 600; color: var(--mp-text); font-family: var(--mp-font-mono); overflow: hidden; text-overflow: ellipsis; }
.scope__caps-lbl { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mp-text-muted); margin-bottom: 8px; }
.scope__cap { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--mp-success); margin: 0 8px 7px 0; }
.scope__cap.is-off { color: var(--mp-text-muted); }
.scope__others-row { display: flex; flex-wrap: wrap; gap: 6px; }
.scope__other { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--mp-border); border-radius: var(--r-sm); background: #fff; }
.scope__other:hover { background: var(--mp-gray-50); border-color: #c7bfa8; }
.scope__other > span { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; text-align: left; color: var(--mp-text); }
.scope__other small { font-size: 10.5px; color: var(--mp-text-muted); font-weight: 500; }
.iconbtn {
  position: relative;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent;
  color: var(--mp-text-muted); border-radius: var(--r-sm);
}
.iconbtn:hover { background: var(--mp-gray-100); color: var(--mp-text); }
.iconbtn__dot {
  position: absolute; top: 4px; right: 4px;
  min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--mp-danger); color: #fff;
  border: 2px solid #fff; border-radius: 999px;
  font-size: 9px; font-weight: 700; font-family: var(--mp-font-mono);
  display: flex; align-items: center; justify-content: center;
}
.notif {
  position: absolute; top: 42px; right: 0; width: 340px;
  background: #fff; border: 1px solid var(--mp-border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  overflow: hidden; z-index: 60;
}
.notif__head {
  padding: 9px 13px; background: var(--mp-bg-sidebar); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700;
}
.notif__item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 13px; border-bottom: 1px solid var(--mp-gray-100);
  border-left: 3px solid var(--mp-primary); text-align: left;
  width: 100%; background: #fff; border-top: none; border-right: none;
}
.notif__item:hover { background: var(--mp-gray-50); }
.notif__item strong { font-size: 12.5px; font-weight: 600; display: block; }
.notif__item small { font-size: 11.5px; color: var(--mp-text-muted); }

/* ---- Demo bar ------------------------------------------------- */
.demobar {
  background: var(--mp-brand-deep);
  color: rgba(255,255,255,0.92);
  font-family: var(--mp-font-sans);
}
.demobar__row {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 7px 22px;
  flex-wrap: wrap;
}
.demobar__tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--mp-accent-soft);
}
.demobar__group {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: rgba(255,255,255,0.62);
  font-weight: 600;
}
.seg {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-sm);
  overflow: hidden; background: rgba(255,255,255,0.04);
}
.seg button {
  border: none; background: transparent;
  color: rgba(255,255,255,0.66);
  font-size: 11.5px; font-weight: 700;
  padding: 4px 11px;
  border-right: 1px solid rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; gap: 5px;
}
.seg button:last-child { border-right: none; }
.seg button.is-on { background: var(--mp-primary); color: #fff; }
.seg button.is-on.seg--accent { background: var(--mp-accent); color: #1a1304; }
.demobar__spacer { flex: 1; }
.demobar__hint { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ---- Console scaffolding -------------------------------------- */
.console { display: flex; flex-direction: column; gap: 16px; }
.console__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.eyebrow {
  display: block; margin-bottom: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mp-text-muted);
}
.console__head h1 {
  font-family: var(--mp-font-serif);
  font-size: 30px; font-weight: 600; line-height: 1.04;
  color: #142235; letter-spacing: -0.01em;
}
.console__head p.sub { color: var(--mp-text-muted); font-size: 13.5px; margin-top: 5px; max-width: 60ch; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 13px;
  border: 1px solid var(--mp-primary); background: var(--mp-primary); color: #fff;
  border-radius: var(--r-sm); font-weight: 700; font-size: 13px;
  text-decoration: none; transition: background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { background: var(--mp-primary-dark); border-color: var(--mp-primary-dark); }
.btn--ghost { background: #fff; color: var(--mp-primary-dark); border-color: var(--mp-border); }
.btn--ghost:hover { background: var(--mp-gray-50); border-color: #c7bfa8; }
.btn--accent { background: var(--mp-accent); border-color: var(--mp-accent); color: #1a1304; }
.btn--accent:hover { background: var(--mp-accent-600); border-color: var(--mp-accent-600); color: #fff; }
.btn--sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn--danger { background: #fff; color: var(--mp-danger); border-color: color-mix(in srgb, var(--mp-danger) 35%, var(--mp-border)); }
.btn--danger:hover { background: color-mix(in srgb, var(--mp-danger) 8%, #fff); }
.btn:disabled, .iconbtn2:disabled { opacity: 0.45; cursor: not-allowed; }
.iconbtn2 {
  width: 34px; height: 34px; flex: 0 0 34px;
  border: 1px solid var(--mp-border); background: #fff; color: var(--mp-gray-600);
  border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center;
}
.iconbtn2:hover:not(:disabled) { background: var(--mp-gray-50); color: var(--mp-primary); border-color: #c7bfa8; }

/* Cards / panels */
.panel {
  background: var(--mp-bg-card);
  border: 1px solid var(--mp-border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.panel__head--pad { padding: 14px 16px 0; margin-bottom: 12px; }
.panel__head h2 {
  font-size: 14.5px; font-weight: 700; color: #172033; letter-spacing: 0;
}
.panel__head .meta { font-size: 12px; font-weight: 700; color: var(--mp-text-muted); }

.grid { display: grid; gap: 14px; }
.grid--stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--cmd { grid-template-columns: minmax(0,1.55fr) minmax(300px,0.85fr); align-items: start; }
.grid--doc { grid-template-columns: minmax(0,1fr) minmax(300px,0.5fr); align-items: start; }

/* Stat tile */
.stat {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; background: #fff;
  border: 1px solid var(--mp-border); border-radius: var(--r-md);
}
.stat__icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--mp-primary) 10%, #fff);
  color: var(--mp-primary);
}
.stat__label { font-size: 11.5px; font-weight: 700; color: var(--mp-text-muted); }
.stat strong {
  display: block; margin-top: 2px;
  font-family: var(--mp-font-serif);
  font-size: 24px; line-height: 1.05; color: #0f172a; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat__meta { display: block; margin-top: 3px; font-size: 12px; color: var(--mp-text-muted); }
.stat__meta.is-bad { color: var(--mp-danger); font-weight: 700; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 22px; padding: 2px 8px;
  border-radius: 999px; background: var(--mp-gray-100);
  color: var(--mp-gray-600); font-size: 11px; font-weight: 800;
  white-space: nowrap; letter-spacing: 0.01em;
}
.pill--good { background: #e6f4ed; color: #176b52; }
.pill--warn { background: #fbf0d4; color: #8a5b00; }
.pill--bad  { background: #fbe6e6; color: #9a2b2b; }
.pill--info { background: #e3eefb; color: #115b98; }
.pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Tag (square) */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--mp-border-soft); background: var(--mp-gray-50); color: var(--mp-gray-600);
}
.tag--future {
  border-color: color-mix(in srgb, var(--mp-accent) 45%, #fff);
  background: color-mix(in srgb, var(--mp-accent) 14%, #fff);
  color: var(--mp-accent-600);
}

/* Tables */
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--mp-border-soft); }
.tbl thead th {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--mp-text-muted); background: var(--mp-gray-50); white-space: nowrap;
}
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr.is-click { cursor: pointer; }
.tbl tbody tr.is-click:hover { background: var(--mp-gray-50); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl strong { font-weight: 700; }
.tbl small { display: block; color: var(--mp-text-muted); font-size: 12px; margin-top: 2px; }
.mono { font-family: var(--mp-font-mono); font-size: 12.5px; }

/* Work queue items */
.queue { display: flex; flex-direction: column; gap: 9px; }
.qitem {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  border: 1px solid var(--mp-border); border-radius: var(--r-md);
  background: #fff; padding: 11px 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.qitem:hover { border-color: color-mix(in srgb, var(--mp-primary) 40%, var(--mp-border)); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.qitem__sev { width: 4px; align-self: stretch; border-radius: 2px; flex: 0 0 4px; }
.qitem__sev--bad { background: var(--mp-danger); }
.qitem__sev--warn { background: var(--mp-accent-600); }
.qitem__sev--info { background: var(--mp-primary); }
.qitem__body { flex: 1; min-width: 0; }
.qitem__body strong { display: block; font-size: 13.5px; color: #172033; }
.qitem__body small { color: var(--mp-text-muted); font-size: 12px; }
.qitem__meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qitem__next { font-size: 12px; font-weight: 700; color: var(--mp-primary); white-space: nowrap; }

/* Readiness list */
.ready { display: flex; flex-direction: column; gap: 8px; }
.ready__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 11px; border: 1px solid var(--mp-border); border-radius: var(--r-md);
  background: #fff;
}
.ready__item:hover { background: var(--mp-gray-50); }
.ready__ic {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.ready__ic.is-ok { background: #e6f4ed; color: var(--mp-success); }
.ready__ic.is-no { background: var(--mp-gray-100); color: var(--mp-gray-500); }
.ready__txt { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.ready__txt small { display: block; color: var(--mp-text-muted); font-weight: 500; font-size: 11.5px; }

.readbar { height: 7px; border-radius: 999px; background: var(--mp-gray-100); overflow: hidden; }
.readbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mp-primary), var(--mp-primary-light)); border-radius: 999px; }

/* Definition list */
.deflist { display: grid; gap: 0; }
.deflist > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--mp-border-soft); }
.deflist > div:last-child { border-bottom: none; }
.deflist dt { font-size: 12px; font-weight: 700; color: var(--mp-text-muted); }
.deflist dd { font-size: 13.5px; overflow-wrap: anywhere; }

/* Forms */
.field { display: grid; gap: 5px; margin-bottom: 11px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--mp-gray-600); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--mp-border); border-radius: var(--r-sm);
  background: #fff; padding: 9px 10px; font-size: 13px;
}
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--mp-gray-50); color: var(--mp-gray-500); }
.field textarea { resize: vertical; }
.statusselect {
  border: 1px solid var(--mp-border); border-radius: var(--r-sm);
  padding: 6px 8px; font-size: 12.5px; font-weight: 700; background: #fff; min-width: 130px;
}
.statusselect:disabled { background: var(--mp-gray-50); color: var(--mp-gray-500); }

/* Empty state */
.empty {
  min-height: 120px; border: 1px dashed #cbc3aa; border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--mp-text-muted); background: var(--mp-gray-50); padding: 24px; text-align: center;
}
.empty strong { color: var(--mp-gray-600); font-size: 14px; }
.empty small { font-size: 12.5px; }

/* Toolbar (filters) */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--mp-border); border-radius: 999px;
  background: #fff; padding: 5px 11px; font-size: 12px; font-weight: 700; color: var(--mp-gray-600);
}
.chip:hover { border-color: #c7bfa8; }
.chip.is-on { background: var(--mp-primary); color: #fff; border-color: var(--mp-primary); }

/* Source/evidence stack */
.stack { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* Row cards (documents) */
.rowcard {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  border: 1px solid var(--mp-border); border-radius: var(--r-md);
  background: #fff; padding: 13px 14px;
}
.rowcard:hover { border-color: #c7bfa8; }
.rowcard__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.rowcard__title strong { font-size: 14px; }
.rowcard p { font-size: 13px; color: var(--mp-gray-600); margin-bottom: 5px; overflow-wrap: anywhere; }
.rowcard__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mp-text-muted); }
.rowcard__meta b { color: var(--mp-gray-600); font-variant-numeric: tabular-nums; }
.rowcard__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(12,30,24,0.42);
  z-index: 90; display: flex; justify-content: flex-end;
  animation: fade var(--t-fast);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: min(520px, 94vw); background: var(--mp-bg-page);
  height: 100%; overflow-y: auto;
  box-shadow: var(--sh-lg);
  animation: slidein 200ms ease;
  display: flex; flex-direction: column;
}
@keyframes slidein { from { transform: translateX(28px); opacity: 0.4; } to { transform: translateX(0); opacity: 1; } }
.drawer__head {
  position: sticky; top: 0; z-index: 2;
  background: var(--mp-bg-card); border-bottom: 1px solid var(--mp-border);
  padding: 16px 18px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer__head h2 { font-family: var(--mp-font-serif); font-size: 19px; font-weight: 600; color: #142235; }
.drawer__body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }

/* Progression stepper */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  position: relative; display: flex; gap: 12px; padding-bottom: 18px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: -4px; width: 2px; background: var(--mp-border);
}
.step:last-child::before { display: none; }
.step__dot {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--mp-border); color: var(--mp-gray-400);
  z-index: 1; font-weight: 800; font-size: 12px;
}
.step.is-done .step__dot { background: var(--mp-success); border-color: var(--mp-success); color: #fff; }
.step.is-active .step__dot { background: #fff; border-color: var(--mp-primary); color: var(--mp-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mp-primary) 14%, transparent); }
.step__body { flex: 1; min-width: 0; padding-top: 2px; }
.step__body strong { font-size: 13.5px; display: block; }
.step__body small { color: var(--mp-text-muted); font-size: 12px; display: block; margin-bottom: 7px; }
.step.is-done .step__body strong { color: var(--mp-success); }

/* Charts */
.chartcard { display: flex; flex-direction: column; gap: 12px; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bar__track { height: 22px; background: var(--mp-gray-100); border-radius: var(--r-sm); overflow: hidden; }
.bar__fill { height: 100%; border-radius: var(--r-sm); transition: width 400ms ease; }
.bar__val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mp-gray-700); }
.bar.is-click { cursor: pointer; }
.bar.is-click:hover .bar__track { outline: 2px solid color-mix(in srgb, var(--mp-primary) 40%, transparent); outline-offset: 1px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mp-text-muted); }
.crumbs button { border: none; background: none; color: var(--mp-primary); font-weight: 700; padding: 0; }
.crumbs button:hover { text-decoration: underline; }

.spark { width: 100%; height: 150px; display: block; }
.spark__row { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; font-size: 12px; color: var(--mp-text-muted); }

/* Banner */
.banner {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid; font-size: 13px;
}
.banner--info { background: #e9f1fb; border-color: #bcd6f0; color: #14507f; }
.banner--warn { background: #fbf3df; border-color: #ecd9a3; color: #7c5300; }
.banner--read { background: var(--mp-gray-50); border-color: var(--mp-border); color: var(--mp-gray-600); }
.banner strong { font-weight: 700; }

/* Onboarding */
.onb { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px,0.5fr); gap: 16px; align-items: start; }
.onb__hero {
  border: 1px solid var(--mp-border); border-top: 3px solid var(--mp-accent);
  border-radius: var(--r-lg); background: #fff; padding: 28px;
}
.onb__hero h1 { font-family: var(--mp-font-serif); font-size: 30px; font-weight: 600; color: var(--mp-primary-dark); line-height: 1.1; margin: 12px 0 10px; }
.onb__hero h1 em { color: var(--mp-accent-600); font-style: italic; }
.onb__hero p { color: var(--mp-text-muted); font-size: 14px; max-width: 54ch; }
.onb__steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.onb__step { border: 1px solid var(--mp-border); border-radius: var(--r-md); padding: 14px; background: var(--mp-gray-50); }
.onb__step .n { font-family: var(--mp-font-mono); font-size: 11px; font-weight: 800; color: var(--mp-accent-600); }
.onb__step strong { display: block; margin: 7px 0 4px; font-size: 13.5px; }
.onb__step small { color: var(--mp-text-muted); font-size: 12px; }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  width: 260px; background: #fff; border: 1px solid var(--mp-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden;
  font-size: 13px;
}
.tweaks__head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; background: var(--mp-bg-sidebar); color: #fff; }
.tweaks__head strong { font-size: 13px; }
.tweaks__body { padding: 13px; display: flex; flex-direction: column; gap: 14px; }
.tweaks__row > span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mp-text-muted); margin-bottom: 7px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; }
.swatch.is-on { border-color: #142235; box-shadow: 0 0 0 2px #fff inset; }

/* Mobile bottom nav (rendered inside phone frame) */
.mobnav {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; background: var(--mp-bg-sidebar);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobnav button {
  flex: 1; border: none; background: transparent; color: rgba(255,255,255,0.6);
  padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mobnav button span { font-size: 9px; font-weight: 600; }
.mobnav button.is-active { color: #fff; }
.mobnav button.is-active svg { color: var(--mp-accent-soft); }
.mobnav__more { font-size: 9px; }

/* Mobile sheet for overflow nav */
.sheet { position: absolute; inset: 0; background: rgba(10,30,24,0.5); z-index: 50; display: flex; align-items: flex-end; }
.sheet__panel { width: 100%; background: #fff; border-radius: 14px 14px 0 0; padding: 14px; }
.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet__btn { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--mp-border); border-radius: var(--r-md); background: #fff; font-weight: 600; font-size: 13px; }
.sheet__btn.is-active { border-color: var(--mp-primary); background: var(--mp-gray-50); color: var(--mp-primary); }

/* Phone frame */
.phonewrap { display: flex; justify-content: center; padding: 28px 16px 48px; }
.phone {
  width: 390px; max-width: 100%;
  border: 12px solid #11140f; border-radius: 44px;
  background: var(--mp-bg-page); overflow: hidden;
  box-shadow: var(--sh-lg);
  height: 800px; display: flex; flex-direction: column; position: relative;
}
.phone__status {
  height: 36px; background: var(--mp-bg-sidebar); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; font-size: 12px; font-weight: 700; flex: 0 0 36px;
}
.phone__scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.phone__topbar {
  position: sticky; top: 0; z-index: 10; background: #fff;
  border-bottom: 1px solid var(--mp-border); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.phone__topbar h1 { font-family: var(--mp-font-serif); font-size: 20px; color: var(--mp-primary-dark); }
.phone__body { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.phone__chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--mp-accent) 14%, #fff); color: var(--mp-accent-600); border: 1px solid color-mix(in srgb, var(--mp-accent) 35%, #fff); }

/* mobile stat row */
.mstat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mstat .stat { padding: 12px; }
.mstat .stat strong { font-size: 20px; }

/* utility */
.muted { color: var(--mp-text-muted); }
.nowrap { white-space: nowrap; }
.flexrow { display: flex; align-items: center; gap: 8px; }
.flexcol { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.divider { height: 1px; background: var(--mp-border-soft); margin: 2px 0; }

/* Responsive: tablet */
@media (max-width: 1080px) {
  .grid--stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--cmd, .grid--doc, .grid--2 { grid-template-columns: 1fr; }
  .onb { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app__frame { padding: 16px 14px 48px; }
  .topbar__title { font-size: 22px; }
  .console__head h1 { font-size: 24px; }
  .grid--stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .deflist > div { grid-template-columns: 1fr; gap: 3px; }
  .onb__steps { grid-template-columns: 1fr; }
}

/* ============================================================
   MA-style chrome — BondGov product rail + two-tier top bar
   ============================================================ */
.rail {
  width: 94px; flex: 0 0 94px;
  background: var(--mp-bg-sidebar); color: #fff;
  display: flex; flex-direction: column; align-items: center;
  position: sticky; top: 0; height: 100vh;
  padding: 16px 6px 14px;
  border-right: 1px solid rgba(255,255,255,0.07);
  z-index: 40;
}
.rail__brand { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 20px; }
.rail__brand svg { display: block; }
.rail__wordmark {
  font-family: var(--mp-font-serif); font-weight: 600;
  font-size: 12px; letter-spacing: 0.11em; text-transform: uppercase;
  color: rgba(255,255,255,0.82);
}
.rail__products { width: 100%; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.rail__tile {
  position: relative; width: 100%;
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 13px 4px; border-radius: var(--r-md);
  color: rgba(255,255,255,0.6);
  transition: background var(--t-fast), color var(--t-fast);
}
.rail__tile span { font-size: 10.5px; font-weight: 700; line-height: 1.16; text-align: center; letter-spacing: 0.01em; }
.rail__tile:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
.rail__tile.is-active { background: rgba(255,255,255,0.10); color: #fff; }
.rail__tile.is-active::before {
  content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3px;
  background: var(--mp-accent); border-radius: 0 2px 2px 0;
}
.rail__foot { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.rail__foot-item {
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 4px; border-radius: var(--r-sm);
  color: rgba(255,255,255,0.5); font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em;
  transition: background var(--t-fast), color var(--t-fast);
}
.rail__foot-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }

/* Area tabs (row 1) — plain text, brand underline */
.areatabs { display: flex; align-self: stretch; gap: 2px; }
.areatab {
  position: relative; border: none; background: transparent;
  color: var(--mp-text-muted); font-size: 14px; font-weight: 600; letter-spacing: 0.004em;
  padding: 0 14px; display: inline-flex; align-items: center;
  border-bottom: 2.5px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.areatab:hover { color: var(--mp-text); }
.areatab.is-active { color: var(--mp-primary); border-bottom-color: var(--mp-primary); }

/* Demo / Live segmented toggle */
.modeseg { display: inline-flex; align-items: center; border: 1px solid var(--mp-border); border-radius: var(--r-sm); overflow: hidden; background: var(--mp-gray-50); }
.modeseg__btn {
  border: none; background: transparent; color: var(--mp-text-muted);
  font-size: 12px; font-weight: 700; padding: 5px 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t-fast), color var(--t-fast);
}
.modeseg__btn .modeseg__dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.modeseg__btn.is-on .modeseg__dot { display: inline-block; }
.modeseg__btn.is-on.is-demo { background: var(--mp-accent); color: #2a1f06; }
.modeseg__btn.is-on.is-live { background: var(--mp-primary); color: #fff; }

/* Console sub-tabs (row 2) */
.subbar { border-top: 1px solid var(--mp-border-soft); background: var(--mp-gray-50); }
.subbar__row { max-width: 1320px; margin: 0 auto; padding: 0 22px; display: flex; gap: 4px; }
.subtab {
  position: relative; border: none; background: transparent;
  color: var(--mp-text-muted); font-size: 13px; font-weight: 600;
  padding: 11px 12px 10px; border-bottom: 2.5px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.subtab:hover { color: var(--mp-text); }
.subtab.is-active { color: var(--mp-primary); border-bottom-color: var(--mp-primary); }

/* Scope strip flows under the two-row top bar (no sticky overlap) */
.scope { position: static; top: auto; }

/* ============================================================
   Live (no source connected) onboarding surface
   ============================================================ */
.live { display: flex; justify-content: center; padding-top: 4px; }
.live__card {
  width: 100%; max-width: 880px;
  background: #fff; border: 1px solid var(--mp-border);
  border-top: 3px solid var(--mp-accent); border-radius: var(--r-lg);
  padding: 34px 38px 26px; box-shadow: var(--sh-sm);
}
.live__brandrow { display: flex; align-items: center; gap: 10px; }
.live__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mp-text-muted); }
.live__status { display: inline-flex; align-items: center; gap: 8px; margin: 15px 0 13px; font-size: 12.5px; font-weight: 600; color: var(--mp-accent-600); }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mp-accent) 22%, transparent); }
.live__hero h1 { font-family: var(--mp-font-serif); font-size: 35px; font-weight: 600; line-height: 1.12; color: var(--mp-primary-dark); letter-spacing: -0.01em; max-width: 17ch; }
.live__hero h1 em { color: var(--mp-accent-600); font-style: italic; }
.live__hero p { margin-top: 13px; color: var(--mp-text-muted); font-size: 14.5px; line-height: 1.55; max-width: 62ch; }
.live__steps-lbl { margin: 26px 0 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mp-text-muted); }
.live__steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live__step {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px;
  text-align: left; border: 1px solid var(--mp-border); border-radius: var(--r-md);
  padding: 15px 16px; background: var(--mp-gray-50);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.live__step:hover { border-color: var(--mp-accent-soft); background: #fff; }
.live__step-n { font-family: var(--mp-font-mono); font-size: 12px; font-weight: 800; color: var(--mp-accent-600); padding-top: 1px; }
.live__step strong { display: block; font-size: 14px; font-weight: 700; color: var(--mp-text); }
.live__step small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--mp-text-muted); }
.live__step svg { margin-top: 2px; }
.live__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--mp-border-soft); }
.live__trust { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--mp-text-muted); font-weight: 500; margin-left: auto; }
@media (max-width: 760px) { .live__steps { grid-template-columns: 1fr; } .live__hero h1 { font-size: 27px; } .live__card { padding: 26px 22px 22px; } }

/* ============================================================
   Investors — engagement table + bondholders history
   ============================================================ */
.schips { display: flex; flex-wrap: wrap; gap: 4px; }
.schip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--mp-border-soft); background: var(--mp-gray-50); color: var(--mp-gray-600); white-space: nowrap; }
.schip--debt { border-color: color-mix(in srgb, var(--mp-accent) 40%, #fff); background: color-mix(in srgb, var(--mp-accent) 12%, #fff); color: var(--mp-accent-600); }

.tbl tbody tr.is-sel { background: color-mix(in srgb, var(--mp-primary) 8%, #fff); box-shadow: inset 3px 0 0 var(--mp-primary); }

.chgbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chgbadge b { font-family: var(--mp-font-mono); font-weight: 700; font-size: 11.5px; }
.chgbadge--new  { background: color-mix(in srgb, var(--mp-accent) 16%, #fff); color: var(--mp-accent-600); }
.chgbadge--up   { background: #e6f4ed; color: #176b52; }
.chgbadge--down { background: #fbf0d4; color: #8a5b00; }
.chgbadge--exit { background: #fbe6e6; color: #9a2b2b; }
.chgbadge--flat { background: var(--mp-gray-100); color: var(--mp-text-muted); }

/* Investor detail panel */
.idetail { display: flex; flex-direction: column; gap: 15px; }
.idetail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.idetail__id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.idetail__name { font-family: var(--mp-font-serif); font-size: 18px; font-weight: 600; color: #142235; line-height: 1.15; }
.idetail__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.idetail__stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--mp-border-soft); border-radius: var(--r-sm); background: var(--mp-gray-50); }
.idetail__stat .k { font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mp-text-muted); }
.idetail__stat .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.idetail__lbl { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mp-text-muted); margin-bottom: 8px; }

/* Activity timeline */
.tline { display: flex; flex-direction: column; }
.tline__item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--mp-border-soft); }
.tline__item:last-child { border-bottom: none; }
.tline__ic { width: 26px; height: 26px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; background: var(--mp-gray-100); color: var(--mp-text-muted); }
.tline__ic--debt { background: color-mix(in srgb, var(--mp-accent) 16%, #fff); color: var(--mp-accent-600); }
.tline__ic--doc { background: #e3eefb; color: #115b98; }
.tline__ic--disclosure { background: #e6f4ed; color: #176b52; }
.tline__txt { font-size: 13px; line-height: 1.35; }
.tline__when { font-size: 11.5px; color: var(--mp-text-muted); font-family: var(--mp-font-mono); margin-top: 1px; }

/* Holdings history */
.holdhist { display: flex; flex-direction: column; }
.histperiod { padding: 15px 0; border-bottom: 1px solid var(--mp-border-soft); }
.histperiod:first-child { padding-top: 3px; }
.histperiod:last-child { border-bottom: none; padding-bottom: 3px; }
.histperiod__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.histperiod__period { font-family: var(--mp-font-mono); font-size: 14px; font-weight: 700; color: #142235; }
.histperiod__meta { font-size: 12px; color: var(--mp-text-muted); }
.histevents { display: flex; flex-direction: column; gap: 9px; }
.histevent { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: baseline; }
.histevent__holder { font-size: 13px; font-weight: 700; }
.histevent__note { font-size: 12px; color: var(--mp-text-muted); margin-top: 1px; }
@media (max-width: 720px) { .histevent { grid-template-columns: 1fr; gap: 3px; } }
