/* Capital Markets Simulation, participant app.

   pb.html loads this sheet too (the Prime Brokerage pages use the Capital
   Markets layout and classes, ruling of 2026-11-04), so a change here
   reaches the Prime Brokerage pages.

   The shell takes the hedge fund app's rules from participant-shell.css (the
   workspace, the sidebar, the page panels) and the shared primitives from
   participant-primitives.css (the pause hold, the dialogs, the toasts), both
   loaded before this file, so the participant apps share one design. This
   file holds only what this sim adds, and adds no font size: the scale is
   the one in the owner's rule (13, 15, 16, 17, 19). */

/* The lockup name at the market making size, because the name is the
   longest of the sims (console.css carries the same rule for the trainer
   and admin headers). */
body[data-sim="capitalmarkets"] .header-logo-mount .lockup-led {
  --led-name-size: 19px;
}

/* Every number in the mono face, outside a table heading: the market
   making sheet's global rule (mm-sim.css). participant-shell.css sets the
   face on .num only inside its own panels, so a number this app marked outside
   them read in the interface face. The numbers inside the prose of the
   Sales Memo and the Briefing are not marked and stay in Inter (owner
   ruling 2026-10-22). */
.num:not(th) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* The stage explainer (stage_announce.js): the bank ALM sim's feature
   explainer, alm.css .tm-modal, .tm-title, .tm-actions and the .fa-
   rules, and its .btn-success, copied to the declaration. The overlay
   carries .cm-alm, so the ALM's palette applies inside it. */
.tm-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  /* Square, where the ALM's are rounded: every card on this screen has
     square corners (owner, 2026-10-25). */
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  width: min(520px, 92vw);
  padding: 24px 28px;
  animation: modalSlideIn 200ms ease;
}
.tm-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-accent); margin-bottom: 12px; }
.tm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.fa-name { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.fa-summary { margin-bottom: 18px; }
.fa-text { font-size: 15px; line-height: 1.55; color: var(--text); word-break: break-word; }
.fa-section { margin-bottom: 14px; }
.fa-section-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary); margin-bottom: 4px; }
.fa-sections { margin-bottom: 22px; }
.cm-alm .btn-success {
  background: var(--positive-bg);
  color: var(--positive);
  border: 1px solid color-mix(in srgb, var(--positive) 35%, transparent);
}
.cm-alm .btn-success:hover { background: color-mix(in srgb, var(--positive) 22%, transparent); }

/* ── Shell: the bank ALM sim's ─────────────────────────────────────── */

/* The sidebar navigation, the disclaimer footer and the header's team
   name, round pill and connection are the bank ALM sim's participant
   shell, copied verbatim (its index.html and css/alm.css; owner rulings
   2026-10-22). This page's foundation is the platform's, whose tokens
   differ from the ALM's, so the copied pieces carry the ALM's palette on
   .cm-alm (alm.css :root and [data-theme="light"]) and every rule below
   is the ALM's to the declaration.

   The ALM's colours reach the whole workspace too (the ALM look design 2,
   owner 2026-10-25): .cm-alm-palette on #pm-workspace carries the colour
   tokens alone, so every page reads the ALM's page, card, border, text,
   accent, green and red, while the pages keep their own fonts and
   corners. */
.cm-alm,
.cm-alm-palette {
  --bg: #0D1117;
  --bg-surface: #161B22;
  --bg-header: #1A1F26;
  --bg-elevated: #1C232C;
  --bg-input: #20262F;
  --bg-hover: #262C36;
  --border: #252830;
  --border-subtle: #1a1c22;
  --text: #e8eaf0;
  --text-secondary: #c8ccdc;
  --text-muted: #9da3b8;
  --color-accent: #4f8cff;
  --color-accent-light: #6da0ff;
  --color-accent-bg: rgba(79, 140, 255, 0.15);
  --positive: #34d399;
  --positive-bg: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --negative: #f87171;
  --negative-bg: rgba(248, 113, 113, 0.15);
}
.cm-alm {
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --transition: 150ms ease;
}
[data-theme="light"] .cm-alm,
[data-theme="light"] .cm-alm-palette {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-surface: #ffffff;
  --bg-header: #ffffff;
  --bg-hover: #f0f0f2;
  --bg-input: #f8f8fa;
  --border: #e0e0e4;
  --border-subtle: #eaeaee;
  --text: #1a1a1e;
  --text-secondary: #404048;
  --text-muted: #5a5a64;
  --color-accent: #2563eb;
  --color-accent-light: #1d4ed8;
  --color-accent-bg: rgba(37, 99, 235, 0.1);
  --positive: #047857;
  --positive-bg: rgba(4, 120, 87, 0.12);
  --negative: #dc2626;
  --negative-bg: rgba(220, 38, 38, 0.10);
  --warning: #b45309;
  --warning-bg: rgba(180, 83, 9, 0.12);
}
/* The page on the ALM's page colour, every page. */
#pm-workspace.cm-alm-palette .workspace-content { background: var(--bg); }
/* The decision pages' tiles keep a shade inside them: the ALM's light
   elevated colour is white, the tile's own, so in the light theme the
   caption bars, the row hovers and the call cards inside a tile take the
   ALM's page grey (the ALM look design, owner decision 8). The Debrief's
   tiles are ALM cards and keep the ALM's elevated white. */
[data-theme="light"] #pm-workspace.cm-alm-palette .tab-panel:not(#tab-debrief, #tab-performance) .pm-frame { --bg-elevated: #f5f5f7; }

/* The two shells' containers. The ALM's .app-body gutter is this
   workspace's own (--workspace-gutter, 28px in both); the line between
   the sidebar and the page is the sidebar's border, as in the ALM, so the
   platform's divider on the page is taken off. The ALM's header centres
   its items where the platform's stretches them, and the ALM's logo does
   not take the sidebar's width. */
#pm-workspace .workspace-content { border-left: 0; }
body[data-sim="capitalmarkets"] .header-logo { width: auto; }
.cm-header-team,
.header-round-info,
.header-status { align-self: center; }
.cm-header-team[hidden],
.header-round-info[hidden],
.header-status[hidden] { display: none; }

/* alm.css .sidebar, .sidebar-nav, .nav-item, .nav-divider, .sidebar-footer. */
.sidebar {
  width: 200px;
  padding-bottom: 20px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--color-accent-bg); color: var(--color-accent); }
.nav-item[hidden] { display: none; }
.nav-item.nav-disabled { opacity: 0.35; cursor: default; }
.nav-item.nav-disabled:hover { background: transparent; color: var(--text-muted); }
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}
.sidebar-footer {
  flex-shrink: 0;
  box-sizing: border-box;
  background: var(--bg-surface);
}

/* alm.css .app-logo (the row), .header-team-name, .header-rename-input,
   .header-online and .online-avatar-sm. */
.cm-header-team {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-team-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  padding-left: 20px;
  border-left: 1px solid var(--border);
  margin-left: 8px;
  letter-spacing: -0.3px;
  cursor: pointer;
}
.header-team-name:hover { color: var(--color-accent); }
.header-rename-input { font-size: 16px; font-weight: 600; width: 220px; padding: 4px 8px; }
.header-online { display: flex; gap: 4px; margin-left: 4px; }
.online-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* alm.css .header-round-info, its label, status and timer. */
.header-round-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 16px;
  padding: 6px 14px;
  background: var(--color-accent-bg);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: 0 0 8px rgba(79, 140, 255, 0.15);
}
.header-round-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-accent);
  white-space: nowrap;
}
.header-round-status {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.header-round-timer {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.header-round-timer.warning {
  color: var(--warning);
  animation: timer-pulse 1.5s infinite;
}
.header-round-timer.urgent {
  color: var(--negative);
  animation: timer-pulse 0.8s infinite;
}
.header-round-timer.expired {
  color: var(--negative);
  font-size: 12px;
  letter-spacing: 0.5px;
  animation: timer-pulse 0.5s infinite;
}
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* alm.css .header-status (the dot itself is participant-primitives.css's
   .status-dot). */
.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Company ───────────────────────────────────────────────────────── */

/* The platform's Company Snapshot (equities.css, "Company Snapshot Tab";
   owner ruling 2026-10-22), with sentence-case panel titles, as every
   title on the participant pages. A row opens no card here: its label has
   a tooltip.

   The Company and Terms pages have three sizes, one job each (owner
   ruling 2026-10-22, after the first copy left headings smaller than
   their content): 19px bold for the page title and the large numbers,
   16px bold for a panel title, 15px for everything else. Inside 15px the
   weight and the ink set the order: a sub-heading or a column heading
   600 in the secondary ink, a label 500 in the secondary ink, a value
   600 in the text ink, a note 400 in the muted ink. */
#pm-workspace .cs-wrap { padding: 0 0 12px; font-size: 15px; }
#pm-workspace .cs-header {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 18px;
  margin-bottom: 8px;
}
#pm-workspace .cs-header-main {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; flex-wrap: wrap;
}
#pm-workspace .cs-ticker-block { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
#pm-workspace .cs-ticker { font-size: 19px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
#pm-workspace .cs-legalname { font-size: 15px; color: var(--text-secondary); font-weight: 500; }
#pm-workspace .cs-price-block { display: flex; align-items: baseline; gap: 12px; }
#pm-workspace .cs-price { font-size: 19px; font-weight: 700; color: var(--text); }
#pm-workspace .cs-change { font-size: 15px; color: var(--text-secondary); }
#pm-workspace .cs-header-meta {
  margin-top: 4px; color: var(--text-secondary);
  font-size: 15px; display: flex; gap: 10px; flex-wrap: wrap;
}
#pm-workspace .cs-dot { opacity: 0.5; }
#pm-workspace .cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#pm-workspace .cs-panel {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 0; padding: 8px 12px 6px;
}
#pm-workspace .cs-panel--wide { grid-column: span 2; }
#pm-workspace .cs-panel-title {
  font-size: 16px; font-weight: 700; color: var(--sidebar-accent);
  margin: 0 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
#pm-workspace .cs-panel-body { display: flex; flex-direction: column; }
#pm-workspace .cs-field { border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent); }
#pm-workspace .cs-field:last-child { border-bottom: none; }
#pm-workspace .cs-field-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 4px 4px;
}
#pm-workspace .cs-label { font-size: 15px; color: var(--text-secondary); flex: 0 0 auto; font-weight: 500; }
#pm-workspace .cs-value {
  font-size: 15px; font-weight: 600; color: var(--text);
  text-align: right; overflow-wrap: anywhere;
}
/* The heading over each block of the revenue split. */
#pm-workspace .cs-subhead { font-size: 15px; font-weight: 600; color: var(--text-secondary); padding: 8px 4px 2px; }
#pm-workspace .cs-subhead:first-child { padding-top: 0; }
/* The two tables the snapshot does not have, in its row style: the
   label in the secondary ink, the value in the text ink, dashed rules. */
#pm-workspace .cs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
#pm-workspace .cs-table th {
  font-size: 15px; font-weight: 600; color: var(--text-secondary);
  text-align: left; padding: 4px;
}
#pm-workspace .cs-table th.right,
#pm-workspace .cs-table td.right { text-align: right; }
#pm-workspace .cs-table td {
  padding: 4px; color: var(--text); font-weight: 600;
  border-top: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
}
#pm-workspace .cs-table td:first-child { color: var(--text-secondary); font-weight: 500; }
@media (max-width: 1100px) {
  #pm-workspace .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Terms ─────────────────────────────────────────────────────────── */

/* The Company page's panels (above), a panel across the grid, and the
   structure and the fees as three stacked bars side by side. */
#pm-workspace .cs-panel--full { grid-column: 1 / -1; }
#pm-workspace .cm-tm-stacks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
/* The platform's stacked bar (lifecycle.css, "Margin simulator stacked
   bar"), on the two pages' three sizes; side by side in the grid, so
   without its margin above. The segment colours are its own three
   mixes. */
#pm-workspace .lc-coll-stack {
  margin-top: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0;
}
#pm-workspace .lc-coll-stack-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
#pm-workspace .lc-coll-stack-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
#pm-workspace .lc-coll-stack-total {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
#pm-workspace .lc-coll-stack-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
#pm-workspace .lc-coll-stack-seg { height: 100%; }
#pm-workspace .lc-coll-stack-seg--accent,
#pm-workspace .lc-coll-stack-leg--accent .lc-coll-stack-leg-dot { background: color-mix(in srgb, var(--color-accent) 70%, transparent); }
#pm-workspace .lc-coll-stack-seg--warning,
#pm-workspace .lc-coll-stack-leg--warning .lc-coll-stack-leg-dot { background: color-mix(in srgb, var(--warning) 75%, transparent); }
#pm-workspace .lc-coll-stack-seg--muted,
#pm-workspace .lc-coll-stack-leg--muted .lc-coll-stack-leg-dot { background: color-mix(in srgb, var(--text-muted) 40%, transparent); }
#pm-workspace .lc-coll-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  margin-top: 0.7rem;
  font-size: 15px;
}
#pm-workspace .lc-coll-stack-leg { display: inline-flex; align-items: center; gap: 0.4rem; }
#pm-workspace .lc-coll-stack-leg-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
#pm-workspace .lc-coll-stack-leg-label { color: var(--text-secondary); font-weight: 500; }
#pm-workspace .lc-coll-stack-leg-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
#pm-workspace .lc-coll-stack-sub { margin-top: 0.6rem; font-size: 15px; color: var(--text-muted); }

/* The equities module's timeline (equities.css .eq-timeline), on the
   two pages' 15px and with its labels in sentence case, as every label on
   the participant pages: the event as the heading, its date and its note
   under it. A stop the session has reached is active. */
#pm-workspace .eq-timeline { display: flex; align-items: flex-start; gap: 0; margin: 8px 0 4px; padding: 16px 0 8px; overflow-x: auto; }
#pm-workspace .eq-timeline-event { flex: 1; min-width: 150px; text-align: center; position: relative; padding: 40px 6px 0; }
#pm-workspace .eq-timeline-event::before { content: ''; position: absolute; top: 16px; left: 0; right: 0; height: 2px; background: var(--border); }
#pm-workspace .eq-timeline-event::after { content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--bg-elevated); border: 2px solid var(--border); z-index: 1; }
#pm-workspace .eq-timeline-event.active::after { background: var(--sidebar-accent); border-color: var(--sidebar-accent); }
#pm-workspace .eq-timeline-label { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
#pm-workspace .eq-timeline-date { font-size: 15px; color: var(--text-secondary); margin-bottom: 6px; }
#pm-workspace .eq-timeline-desc { font-size: 15px; color: var(--text-muted); line-height: 1.4; }

/* The rules: the readouts' large numbers, the rule in the page's text,
   and the regulation under it in the platform's source line. */
#pm-workspace .cm-tm-rule-stats { margin: 4px 4px 10px; }
#pm-workspace .cm-tm-rule-stats .cm-stat-label { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
#pm-workspace .cm-tm-rule-stats .cm-stat-value { font-weight: 700; }
#pm-workspace .cs-wrap .data-source-footer { font-size: 15px; }
#pm-workspace .cm-tm-rule-text { font-size: 15px; line-height: 1.5; color: var(--text); margin: 4px 4px 0; }

/* ── Order Book ────────────────────────────────────────────────────── */

/* The Order Book, Pricing and Allocation pages fill the window like the
   hedge fund Trading Desk: app.js sets pm-desk-active on the workspace
   while one shows, and the content host is the flex column the page
   stretches into (the desk's #pm-desk-content rule, for these hosts). */
#pm-workspace.pm-desk-active #cm-book-content,
#pm-workspace.pm-desk-active #cm-pricing-content,
#pm-workspace.pm-desk-active #cm-allocation-content,
#pm-workspace.pm-desk-active #cm-market-content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* The replay bar, the chart and the activity beside it, and the book,
   tiled on the desk's 1px seams. The chart row is a fixed height and the
   book takes what is left, scrolling inside itself. */
#pm-workspace .cm-book {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 300px minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-book-row {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-replay {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
}
/* The readouts over the replay controls (owner ruling 2026-10-22: the
   page's hierarchy starts with the book's time and its coverage). */
#pm-workspace .cm-book-stats { padding: 8px 10px 2px; }
#pm-workspace .cm-replay-play { min-width: 72px; }
#pm-workspace .cm-replay-slider { flex: 1 1 auto; min-width: 120px; }

/* The coverage chart under its legend, clear of the enlarge button. */
#pm-workspace .cm-coverage-frame .pm-frame-head { padding-right: 40px; }
#pm-workspace .cm-coverage-chart { flex: 1 1 0; min-height: 0; }
/* The charts' colours (owner, 2026-10-29, the chart colours brainstorm in
   docs, capital markets sim): the dataviz reference palette's blue, aqua
   and yellow for each theme, the platform's meter grey, the lines in the
   text colour, reference lines muted, the surface the charts sit on
   (.cm-alm-palette). js/cm/chart_colours.js reads them. */
:root {
  --cm-chart-blue: #3987e5;
  --cm-chart-aqua: #199e70;
  --cm-chart-yellow: #c98500;
  --cm-chart-grey: #64748b;
  --cm-chart-ink: #e8eaf0;
  --cm-chart-muted: #9da3b8;
  --cm-chart-surface: #161B22;
}
[data-theme="light"] {
  --cm-chart-blue: #2a78d6;
  --cm-chart-aqua: #1baf7a;
  --cm-chart-yellow: #eda100;
  --cm-chart-grey: #94a3b8;
  --cm-chart-ink: #1a1a1e;
  --cm-chart-muted: #5a5a64;
  --cm-chart-surface: #ffffff;
}
/* The keys of the lines: the cleaned book, the real demand and the team's
   own price and offering in the text colour, a single series in blue. */
#pm-workspace .cm-key-line { width: 14px; border-top: 2px solid var(--cm-chart-ink); }
#pm-workspace .cm-key-dm-real { width: 14px; border-top: 2px dotted var(--cm-chart-ink); }
#pm-workspace .cm-key-dm-price { width: 2px; height: 10px; background: var(--cm-chart-ink); }
#pm-workspace .cm-key-dm-deal { width: 14px; border-top: 2px dashed var(--cm-chart-ink); }
#pm-workspace .cm-key-blue-line { width: 14px; border-top: 2px solid var(--cm-chart-blue); }

/* The activity feed: the sales note under its order. */
#pm-workspace .cm-feed-note { display: block; color: var(--text-muted); }

/* The book: the grouping control beside the count in the caption bar. */
#pm-workspace .cm-orders-frame { min-height: 0; }
#pm-workspace .cm-orders-frame .pm-frame-head { align-items: center; }
#pm-workspace .cm-orders-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Every column declared, as the desk's tables are under fixed layout. */
#pm-workspace .cm-orders th:nth-child(1) { width: 22%; }
#pm-workspace .cm-orders th:nth-child(2) { width: 14%; }
#pm-workspace .cm-orders th:nth-child(3) { width: 5%; }
#pm-workspace .cm-orders th:nth-child(4) { width: 13%; }
#pm-workspace .cm-orders th:nth-child(5) { width: 11%; }
#pm-workspace .cm-orders th:nth-child(6) { width: 12%; }
#pm-workspace .cm-orders th:nth-child(7) { width: 12%; }
#pm-workspace .cm-orders th:nth-child(8) { width: 11%; }
/* The order type beside its prices, one price a line. */
#pm-workspace .cm-order-cell {
  display: inline-grid;
  grid-template-columns: max-content max-content;
  gap: 0 6px;
}
#pm-workspace .cm-orders th.is-sorted { color: var(--text); }
/* The table's order (owner ruling 2026-10-22): the account and the
   order's size in bold in the text ink, the other columns in the
   secondary ink, a firmer line under the column headings, and the count
   on a group heading in the heading's own weight. */
#pm-workspace .cm-orders td { color: var(--text-secondary); }
#pm-workspace .cm-orders td.pm-sym,
#pm-workspace .cm-orders td[data-cell="size"] { color: var(--text); font-weight: 600; }
#pm-workspace .cm-orders th { border-bottom-color: var(--text-muted); }
/* A step order prints one price and one size a line, so the row's cells
   start at the top. */
#pm-workspace .cm-orders td { vertical-align: top; }
#pm-workspace .cm-orders tbody tr[data-id] { cursor: pointer; }
#pm-workspace .cm-orders tbody tr[data-id]:hover { background: var(--bg-elevated); }
#pm-workspace .cm-orders tbody tr.pm-row-selected {
  background: var(--bg-elevated);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
}
#pm-workspace .cm-amended { color: var(--text-muted); }
/* The group heading between blocks of the book: the market grid's region
   heading (.pm-market .pm-market-block td in portfolio-sim.css). */
#pm-workspace .cm-orders .cm-orders-block td {
  position: sticky;
  top: 23px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  padding-top: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
#pm-workspace .cm-orders .cm-block-count { color: var(--text-muted); font-weight: 600; }
/* The sales note row under an order. */
#pm-workspace .cm-orders .cm-note-row td {
  white-space: normal;
  padding: 6px 10px 10px;
}
#pm-workspace .cm-note-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 16px;
}
#pm-workspace .cm-note-label { color: var(--text-muted); }

/* The deal news, as the market making desk's news feed (mm-sim.css
   .mkm-feed-item, #mkm-news and its mkm-news-flash; owner ruling
   2026-10-23): the newest item on top, a new arrival in the accent for
   ten seconds and then fading; one log, the source with the book time or
   the trading day under it; the order flow in the secondary ink. */
#pm-workspace .cm-news-row {
  display: flex;
  gap: 10px;
  padding: 4px 12px;
  font-size: 15px;
  line-height: 1.5;
}
/* The source column has one width, so every item's text starts on the
   same edge (owner, 2026-10-25); a longer source wraps inside it. */
#pm-workspace .cm-news-src {
  color: var(--text-muted);
  flex: 0 0 112px;
  width: 112px;
}
/* The deal news as one log (decisions 25, 34, 37, 38; the IPO's from
   2026-10-29): the source with the book time or the trading day under it
   (owner, 2026-10-29: no column of its own), and the text at about ninety
   characters a line. */
#pm-workspace .cm-news-time { display: block; }
#pm-workspace .cm-news-text { flex: 0 1 680px; min-width: 0; }
#pm-workspace .cm-news-text { color: var(--text); font-weight: 600; }
#pm-workspace .cm-news-row--flow .cm-news-text { color: var(--text-secondary); font-weight: 400; }
@keyframes cm-news-flash {
  0% { background: color-mix(in srgb, var(--color-accent) 50%, transparent); }
  80% { background: color-mix(in srgb, var(--color-accent) 35%, transparent); }
  100% { background: transparent; }
}
#pm-workspace .cm-news-row--new { animation: cm-news-flash 10s ease-out 1; }
/* The day's order flow so far, over the aftermarket's news. */
#pm-workspace .cm-flow-today {
  display: flex;
  gap: 10px;
  padding: 6px 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
#pm-workspace .cm-flow-today:empty { display: none; }
#pm-workspace .cm-flow-today .cm-news-text { color: var(--text-secondary); font-weight: 400; }

/* The Order Book's activity items: each under its kind and its time, the
   items apart on a hairline (the feed's own .pm-feed-next hairline). */
#pm-workspace .cm-news-item {
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
#pm-workspace .cm-news-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
#pm-workspace .cm-news-source { color: var(--text); font-weight: 600; }
#pm-workspace .cm-news-when { color: var(--text-muted); }
#pm-workspace .cm-news-item .pm-feed-text { color: var(--text); }
/* The book's activity in the same items: the text in the secondary ink,
   the account in bold, a bookrunner message in the text ink. */
#pm-workspace .cm-act-item .pm-feed-text { color: var(--text-secondary); }
#pm-workspace .cm-feed-account { font-weight: 600; color: var(--text); }
#pm-workspace .cm-act-message { color: var(--text); }

/* ── Pricing ───────────────────────────────────────────────────────── */

/* The chart over the deal at the chosen price on the left, the form over
   the deal news on the right, tiled on the desk's seams. */
/* The IPO's decision pages take the bond pages' base size (.cm-bp, the
   owner's scale: 15 every text), so a line without a size of its own, such
   as a form's note or status, is not left at the browser's 16px (owner,
   2026-10-29). */
#pm-workspace :is(.cm-book, .cm-alloc, .cm-after) { font-size: 15px; }
/* The Pricing page on the bond pages' skeleton (.cm-bp; audit 2026-10-28,
   L-3): the strip across the top, then the two columns. */
#pm-workspace .cm-pricing { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); }
/* The form's fields, which give way to the terms line once frozen, flow
   in the form's own column and gaps. */
#pm-workspace .cm-pr-fields { display: contents; }
/* The chart takes about 55% of its column, so the deal at the chosen
   price sits higher (owner ruling 2026-10-22). */
#pm-workspace .cm-pricing-left { grid-template-rows: minmax(0, 55fr) minmax(0, 45fr); }
#pm-workspace .cm-pricing-right { grid-template-rows: auto minmax(0, 1fr); }
#pm-workspace .cm-pr-at {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
  padding: 2px 0 6px;
}
#pm-workspace .cm-kv td:first-child { width: 62%; color: var(--text-secondary); }
#pm-workspace .cm-key-deal { width: 12px; border-top: 2px dashed var(--color-accent-text); }

/* The decision forms: the trade ticket's fields and labels. */
#pm-workspace .cm-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 10px;
}
#pm-workspace .cm-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  /* The fields on one line when a label wraps to a second line (owner,
     2026-10-29: Initial price thoughts (bp) pushed its field down). */
  align-items: end;
}
#pm-workspace .cm-form-note,
#pm-workspace .cm-form-status { color: var(--text-muted); }
/* The rationale and its submit button on one row (owner, 2026-10-29): the
   field takes the width the button leaves, and the two share a height. */
#pm-workspace .cm-input-row { display: flex; align-items: stretch; gap: 8px; }
#pm-workspace .cm-input-row .sidebar-input { flex: 1 1 auto; min-width: 0; }
#pm-workspace .cm-input-row .btn { flex: 0 0 auto; }
/* Every chart key wraps to a second row where the chart is narrower than
   the key (owner, 2026-10-29: the last key ran off the Pricing chart). */
#pm-workspace :is(.pm-ec-legend, .cm-bam-keys) { flex-wrap: wrap; row-gap: 4px; }

/* ── Allocation ────────────────────────────────────────────────────── */

/* The bond Allocation page's layout (the bond design 21; owner,
   2026-10-29): Your allocation across the top, the tier percentages under
   it, the final book across the page at about two thirds of the height
   left, over the deal news. */
#pm-workspace .cm-alloc {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 2fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-alloc-head { padding: 8px 10px; }
#pm-workspace .cm-alloc-bar { display: flex; align-items: center; gap: 16px; }
/* The readouts, on this page, the Aftermarket and the Debrief: the label
   over the number, the number set large. */
#pm-workspace .cm-stats {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
#pm-workspace .cm-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}
#pm-workspace .cm-stat-label { color: var(--text-muted); font-size: 13px; }
#pm-workspace .cm-stat-value { color: var(--text); font-size: 19px; font-weight: 600; }
/* Shares still to allocate, until none are left. */
#pm-workspace .cm-stat-value.is-open { color: var(--warning); }
#pm-workspace .cm-alloc-status { margin-top: 6px; }
#pm-workspace .cm-alloc-book { min-height: 0; }

/* The allocation counter: the shares allocated against the shares to
   allocate, the share of them, and a bar to 100% (owner ruling
   2026-10-23). The bar is in the accent below 100%, green at exactly
   100%, red above it. */
#pm-workspace .cm-al-counter {
  flex: 0 0 auto;
  width: 420px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#pm-workspace .cm-al-counter-head { display: flex; align-items: baseline; gap: 10px; }
#pm-workspace .cm-al-counter-value { font-size: 19px; font-weight: 600; color: var(--text); white-space: nowrap; }
#pm-workspace .cm-al-counter-pct { margin-left: auto; font-size: 19px; font-weight: 700; color: var(--color-accent-text); }
#pm-workspace .cm-al-counter-pct.is-full { color: var(--positive); }
#pm-workspace .cm-al-counter-pct.is-over { color: var(--negative); }
#pm-workspace .cm-al-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
#pm-workspace .cm-al-bar-fill { height: 100%; background: var(--color-accent); }
#pm-workspace .cm-al-bar-fill.is-full { background: var(--positive); }
#pm-workspace .cm-al-bar-fill.is-over { background: var(--negative); }
#pm-workspace .cm-al-counter-left { color: var(--text-secondary); }

/* An account's roadshow and record on a grey second line under its name
   (the Debriefs); a group's count beside its name. */
#pm-workspace .cm-al-sub {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
#pm-workspace .cm-group-count { color: var(--text-muted); margin-left: 4px; }

/* The fill fields as the page's main controls: the rows' size in bold
   with a clear edge; a fill from a group as the grey placeholder; a fill
   the team set itself in full ink with an accent edge. */
#pm-workspace .cm-fill-input {
  width: 100%;
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
#pm-workspace .cm-fill-input::placeholder { color: var(--text-muted); font-weight: 400; opacity: 1; }
#pm-workspace .cm-fill-input.is-set {
  border-color: var(--color-accent);
  color: var(--text);
}
#pm-workspace .cm-al-head-end { display: inline-flex; align-items: center; gap: 10px; }
/* A code menu only where a code is needed, and the need in the warning
   ink until a code is chosen. */
#pm-workspace .cm-cell-select[hidden] { display: none; }
#pm-workspace .cm-cell-select.is-missing { color: var(--warning); border-color: var(--warning); }
#pm-workspace .cm-alloc-bar .btn[hidden] { display: none; }
/* A field inside a table row: the row's own type and a tight box, so the
   rows keep the book's density. */
#pm-workspace .cm-cell-select {
  padding: 1px 6px;
  font-size: inherit;
}
#pm-workspace .cm-penalty { flex: 0 0 auto; }
#pm-workspace .cm-alloc-closed { padding: 10px 0; }


/* ── Aftermarket ───────────────────────────────────────────────────── */

/* The clock and the readouts across the top; on the left the share price
   at about 40% of the column over the deal news at full width; on the
   right the stabilisation panel over the day-by-day record (owner ruling
   2026-10-23: the news matters more than the chart). */
#pm-workspace.pm-desk-active #cm-aftermarket-content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#pm-workspace .cm-after {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 440px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-after-head { grid-column: 1 / -1; padding: 8px 10px; }
#pm-workspace .cm-after-left,
#pm-workspace .cm-after-right {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-after-left { grid-template-rows: minmax(0, 2fr) minmax(0, 3fr); }
/* The investor calls over the stabilisation panel (the aftermarket rethink,
   design section 10), and Your desk under them when the bank took unsold
   shares onto its book. The calls take the column's remaining height and
   scroll inside it; the day-by-day record with the bid and the exercise
   sits beside the deal news (owner, 2026-10-29). */
#pm-workspace .cm-after-right { grid-template-rows: minmax(0, 1fr) auto; }
#pm-workspace .cm-after-right--desk { grid-template-rows: minmax(0, 1fr) auto auto; }
#pm-workspace .cm-after-calls .cm-calls { flex: 1 1 0; min-height: 0; overflow-y: auto; }
#pm-workspace .cm-after-lower {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
#pm-workspace .cm-after-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* The three scorecards as of the last close, at the bar's right end, level
   with the first row of readouts when the readouts wrap to a second row
   (owner, 2026-10-29: the bar centred them between the two rows). */
#pm-workspace .cm-am-scores { flex: 0 0 auto; }
/* The readouts on one row at the bond Aftermarket's spacing and its 15px
   values (owner, 2026-10-29: at 19px they wrapped to a second row). */
#pm-workspace .cm-after-head .cm-stats { gap: 6px 20px; }
#pm-workspace .cm-after-head .cm-stat-value { font-size: 15px; }
#pm-workspace .cm-after-head .cm-alloc-bar { align-items: flex-start; }

/* ── Investor calls: the market making desk's call cards (mm-sim.css
   .mkm-calls and .mkm-ticket*, the declarations copied). One column: the
   panel is the right column's width, and a moment has at most two calls. */
#pm-workspace .cm-calls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 8px 10px;
}
#pm-workspace .cm-placeholder {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 2px;
}
#pm-workspace .cm-ticket {
  background: var(--bg-elevated);
  border: 1px solid transparent;
  padding: 8px 14px 10px;
}
#pm-workspace .cm-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
#pm-workspace .cm-ticket-client {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1.02rem;
}
#pm-workspace .cm-ticket-timer {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-secondary);
}
#pm-workspace .cm-ticket-urgent .cm-ticket-timer {
  color: var(--warning);
}
#pm-workspace .cm-ticket-type {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-meta);
  color: var(--text-muted);
  margin-top: 1px;
}
#pm-workspace .cm-ticket-who {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
#pm-workspace .cm-ticket-who > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#pm-workspace .cm-ticket-outcome {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#pm-workspace .cm-outcome--sold   { color: var(--positive); }
#pm-workspace .cm-outcome--none    { color: var(--text-muted); }
#pm-workspace .cm-ticket-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 5px;
  margin: 6px 0 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
#pm-workspace .cm-ticket-facts--pairs {
  grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
}
#pm-workspace .cm-ticket-facts--line {
  grid-template-columns: 1fr max-content 1fr;
  column-gap: 12px;
}
#pm-workspace .cm-ticket-facts--line .cm-fact-req {
  justify-self: end;
}
#pm-workspace .cm-fact-label {
  font-size: var(--text-meta);
  color: var(--text-muted);
}
#pm-workspace .cm-fact-req {
  font-weight: 600;
}
#pm-workspace .cm-ticket-facts .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
#pm-workspace .cm-ticket-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
#pm-workspace .cm-ticket-done { opacity: 1; }
#pm-workspace .cm-ticket-done--buy {
  border-color: var(--positive);
}
#pm-workspace .cm-ticket-done--none {
  border-color: var(--text-muted);
}
/* The stabilisation form: one two-column grid, every field and button on
   the same column edges, the buttons as tall as the fields. */
#pm-workspace .cm-stab-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}
#pm-workspace .cm-stab-form .btn { width: 100%; }
#pm-workspace .cm-after-chart-frame .pm-frame-head { padding-right: 40px; }
#pm-workspace .cm-after-closed { padding: 10px 0; }
#pm-workspace .cm-key-price-line { width: 12px; border-top: 2px solid var(--pm-line); }
#pm-workspace .cm-key-offer { width: 12px; border-top: 2px dotted var(--text-muted); }
#pm-workspace .cm-ledger th:nth-child(1) { width: 16%; }
#pm-workspace .cm-ledger th:nth-child(2) { width: 26%; }
#pm-workspace .cm-ledger th:nth-child(3) { width: 32%; }
#pm-workspace .cm-ledger th:nth-child(4) { width: 26%; }
#pm-workspace .cm-ledger-empty { color: var(--text-muted); }

/* ── Debrief ───────────────────────────────────────────────────────── */

/* A page that scrolls: the panels stacked at the hedge fund debrief's
   width, apart by its 8px (portfolio-sim.css .pm-db-grid). One size for
   the text and the tables, as on the Company and Terms pages (owner
   ruling 2026-10-22): 15px, with the column headings at the scale's
   13px in sentence case as on the Allocation page, the frame titles at
   the desk's 13px and the readouts' numbers at 19px (owner, 2026-10-23:
   the Debrief at the console's standard). */
#pm-workspace .cm-debrief {
  max-width: 1170px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  font-size: 15px;
}
#pm-workspace .cm-db-body { padding: 10px 12px 12px; }
#pm-workspace .cm-debrief .data-table-wrap {
  border: 0;
  border-radius: 0;
  overflow-x: visible;
}
#pm-workspace .cm-db-table { font-size: 15px; }
#pm-workspace .cm-db-table thead th {
  font-size: 13px;
  white-space: normal;
  vertical-align: bottom;
}
#pm-workspace .cm-db-table tbody td { vertical-align: top; }
#pm-workspace .cm-db-table tbody td.cm-db-val { white-space: normal; }
#pm-workspace .cm-db-card .pm-frame-note { font-size: 13px; color: var(--text-secondary); }
#pm-workspace .cm-db-flags { font-size: 15px; }
#pm-workspace .cm-db-flags .cm-note-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
/* The three cards in two columns, the issuer over the investors on the
   left and the bank on the right, so no reading needs a scrollbar (owner,
   2026-10-23: a table that scrolls sideways is bad to use; the platform's
   tables keep every cell on one line). */
#pm-workspace .cm-db-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: var(--bg);
}
#pm-workspace .cm-db-card--bank { grid-column: 2; grid-row: 1 / span 2; }
/* A reading's name and a text value may run onto a second line; the
   numbers stay on one. */
#pm-workspace .cm-db-table tbody td:first-child,
#pm-workspace .cm-db-table tbody td.cm-db-text { white-space: normal; }
#pm-workspace .cm-db-card .data-table-wrap { margin: 10px 12px; }
#pm-workspace .cm-db-table td:first-child { color: var(--text-secondary); }
#pm-workspace .cm-db-flags { padding: 0 12px 12px; }
#pm-workspace .cm-db-note,
#pm-workspace .cm-db-lead { font-size: 15px; line-height: 1.5; }
#pm-workspace .cm-db-note { margin: 10px 0 0; color: var(--text-muted); }
#pm-workspace .cm-db-lead { margin: 0 0 10px; color: var(--text); }
#pm-workspace .cm-db-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  align-items: start;
}
#pm-workspace .cm-db-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#pm-workspace .cm-db-chart { min-height: 220px; }
#pm-workspace .cm-db-chart--tall { min-height: 280px; }
#pm-workspace .cm-db-scroll { max-height: 360px; overflow-y: auto; }
#pm-workspace .cm-db-own td { font-weight: 600; }
#pm-workspace .cm-key-real { width: 12px; border-top: 2px dotted var(--positive); }

/* ── Bond new issue: the buttons of the decision pages ────────────── */

/* The buttons in the language of the caption bars' segmented control
   (owner, 2026-10-25: the buttons beside the forms read apart from the
   order table's): its square corners and type, the main action in the
   accent as the control's active option, the others outlined on the
   panel's ground; the fields beside them take the same corners. */
#pm-workspace :is(.cm-bb, .cm-pt, .cm-ba, .cm-bam, .cm-pricing) .btn {
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
}
#pm-workspace :is(.cm-bb, .cm-pt, .cm-ba, .cm-bam, .cm-pricing) .btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text);
}
#pm-workspace :is(.cm-bb, .cm-pt, .cm-ba, .cm-bam, .cm-pricing) .btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface);
  border-color: var(--color-accent);
  box-shadow: none;
}
#pm-workspace :is(.cm-bb, .cm-pt, .cm-ba, .cm-bam, .cm-pricing) .btn-primary:hover:not(:disabled) { box-shadow: none; }
#pm-workspace :is(.cm-bb, .cm-pt, .cm-ba, .cm-bam, .cm-pricing) :is(.sidebar-input, .sidebar-select) { border-radius: 3px; }

/* ── Bond new issue: the Bookbuild page (the bond design 8.1) ─────── */

/* The statements as rows (owner, 2026-10-25): the label, the fields and
   the button on three shared columns, every button as wide as the widest;
   the updates span the fields and the button column, and Close the books
   takes the button column on the last row. */
#pm-workspace .cm-bb-rows {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px 10px;
}
#pm-workspace .cm-bb-row { display: contents; }
#pm-workspace .cm-bb-rows .sb-label { margin: 0; }
#pm-workspace .cm-bb-rows > .cm-bb-row > .btn,
#pm-workspace .cm-bb-last { width: 100%; }
#pm-workspace .cm-bb-last { grid-column: 3; }
#pm-workspace .cm-bb-fields { display: flex; align-items: center; gap: 6px; min-width: 0; }
#pm-workspace .cm-bb-fields .sidebar-input,
#pm-workspace .cm-bb-fields .sidebar-select { flex: 1 1 0; min-width: 0; }
#pm-workspace .cm-bb-span { grid-column: 2 / -1; }
#pm-workspace .cm-bb-span .btn { flex: 1 1 0; }
#pm-workspace .cm-bb-to { color: var(--text-muted); }
#pm-workspace .cm-bb-rule { grid-column: 1 / -1; border-top: 1px solid var(--border); }
#pm-workspace .cm-bb-note { grid-column: 1 / -1; }

/* The bookbuild's calls, newest first, scrolling inside the Calls card. */
#pm-workspace .cm-bb-calls {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg);
}
#pm-workspace .cm-ticket-text { margin: 4px 0 8px; line-height: 1.45; color: var(--text); }
/* The bond's call card: the desk's bid or offer beside its label (the
   bond design 18.2). */
#pm-workspace .cm-ticket-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 2px;
}
#pm-workspace .cm-ticket-price .sidebar-input { width: 84px; text-align: right; }
#pm-workspace .cm-row-muted td { color: var(--text-muted); }
/* A [hidden] control of the bond pages stays hidden whatever display its
   class gives it. */
#pm-workspace .cm-bb [hidden],
#pm-workspace .cm-alloc [hidden] { display: none !important; }

/* ── Bond new issue: the visual pass (owner, 2026-10-25) ──────────── */

/* The owner's ideas of 2026-10-25, for a screen where the information is
   efficient: the deal news folded by day with the order flow as a compact
   block, a frozen decision as one line, tables one line a row with every
   column declared, the Market page tiled as the decision pages are, the
   legends beside the charts, the distribution as two stacked bars, and
   the Aftermarket page's trading result beside the scorecards. Only the
   scale's sizes (13, 15, 19). */

/* A [hidden] element of the bond pages stays hidden whatever display its
   class gives it (the .cm-bb rule above, for the other pages). */
#pm-workspace .cm-pt [hidden],
#pm-workspace .cm-bam [hidden],
#pm-workspace .cm-mk [hidden],
#pm-workspace .cm-news-row[hidden] { display: none !important; }

/* The bond pages' tables: the Allocation page's sentence-case headings at
   the scale's 13px, allowed a second line; the cells' gutters cut to 6px,
   so the columns, not the gutters, take the width. */
#pm-workspace .pm-table.cm-table th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  white-space: normal;
  vertical-align: bottom;
  line-height: 1.2;
}
#pm-workspace .pm-table.cm-table th,
#pm-workspace .pm-table.cm-table td { padding-left: 6px; padding-right: 6px; }

/* Label-value pairs on one line (common.js termsLine): a frozen decision,
   the bond's terms, the desk's result. */
#pm-workspace .cm-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  font-size: 15px;
}
#pm-workspace .cm-term { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
#pm-workspace .cm-term-label { color: var(--text-muted); white-space: nowrap; }
#pm-workspace .cm-term-value { color: var(--text); font-weight: 600; }

/* A panel's heading that folds the panel's content under it (the Price
   Thoughts page's recent new issues): the chevron the deal news folded
   with before it became one log. */
#pm-workspace .cm-fold-head {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
#pm-workspace .cm-fold-head::before {
  content: '\25BE';
  display: inline-block;
  width: 14px;
  color: var(--text-muted);
}
#pm-workspace .cm-fold-head.is-folded::before { content: '\25B8'; }
/* A folded panel of the Debrief (js/cm/fold.js, the bond design 24.6):
   only its heading shows. */
#pm-workspace .pm-frame.cm-folded > :not(.pm-frame-head) { display: none; }
/* The deal news' order flow: the groups' net amounts on one line and the
   largest sellers and buyers on a line each. */
#pm-workspace .cm-flow { display: flex; flex-direction: column; gap: 1px; }
#pm-workspace .cm-flow-line { display: flex; flex-wrap: wrap; gap: 0 14px; }
#pm-workspace .cm-flow-cell { white-space: nowrap; }
#pm-workspace .cm-flow-cell .num { color: var(--text); }
#pm-workspace .cm-flow-label { color: var(--text-muted); }
/* From the aftermarket on, the order flow and the investor calls are
   tables of their own, picked in the caption bar (news.js). */
#pm-workspace .cm-news-views[hidden] { display: none; }
#pm-workspace .cm-flow-table th:nth-child(1) { width: 18%; }
#pm-workspace .cm-flow-table th:nth-child(2),
#pm-workspace .cm-flow-table th:nth-child(3),
#pm-workspace .cm-flow-table th:nth-child(4) { width: 13%; }
#pm-workspace .cm-flow-table th:nth-child(5),
#pm-workspace .cm-flow-table th:nth-child(6) { width: 21.5%; }
#pm-workspace .cm-calls-table th:nth-child(1) { width: 17%; }
#pm-workspace .cm-calls-table th:nth-child(2) { width: 30%; }
#pm-workspace .cm-calls-table th:nth-child(3) { width: 19%; }
#pm-workspace .cm-calls-table th:nth-child(4) { width: 10%; }
#pm-workspace .cm-calls-table th:nth-child(5) { width: 24%; }
/* The bond's Terms page as a termsheet (owner, 2026-10-25): each panel's
   labels in a column as wide as its longest label, every value
   left-aligned beside them, so a value over several lines reads as a
   paragraph. The rows' dashed rules move onto the two cells. */
#pm-workspace .cm-termsheet .cs-panel-body {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
}
#pm-workspace .cm-termsheet .cs-field,
#pm-workspace .cm-termsheet .cs-field-row { display: contents; }
#pm-workspace .cm-termsheet .cs-label,
#pm-workspace .cm-termsheet .cs-value {
  padding: 4px;
  border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
}
#pm-workspace .cm-termsheet .cs-label { padding-right: 16px; }
#pm-workspace .cm-termsheet .cs-value { text-align: left; }
#pm-workspace .cm-termsheet .cs-field:last-child .cs-label,
#pm-workspace .cm-termsheet .cs-field:last-child .cs-value { border-bottom: none; }
/* ── Bond decision pages: the visual hierarchy (2026-10-26) ──────────── */

/* The five bond decision pages on one skeleton (record
   cm-visual-hierarchy-brainstorm-2026-10-26.md, decisions 2, 16 and 22 to
   41): the readouts in a strip across the top, the work and the deal news
   in the left column, the decision panels in the right; three panel
   weights; the owner's scale only, one size per role (decision 18): 13
   every label, 15 every text and control, 16 a call card's caller and
   countdown, 17 a decision card's title, 19 the two or three readouts a
   page turns on. */
#pm-workspace .cm-bp {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
  font-size: 15px;
}
#pm-workspace .cm-bp [hidden] { display: none !important; }
#pm-workspace .cm-bp-strip { grid-column: 1 / -1; padding: 8px 10px; }
#pm-workspace .cm-bp-col {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--bg);
}
/* The readouts: the value at 15px, a page's picks at 19px, a wider space
   after them (decisions 22, 30, 40). */
#pm-workspace .cm-bp .cm-stats { align-items: flex-end; }
#pm-workspace .cm-bp .cm-stat-value { font-size: 15px; }
#pm-workspace .cm-bp .cm-stat-value.is-big { font-size: 19px; }
#pm-workspace .cm-bp .cm-stat.is-after { margin-left: 12px; }
/* Type on the scale (decision 18). */
#pm-workspace .cm-bp .pm-table { font-size: 15px; }
/* A panel's heading at the tables' size in the text colour, so it reads
   above its content (owner, 2026-10-30), on the bond's pages and on the
   IPO's Order Book, Allocation and Aftermarket, whose text is on the same
   scale (owner, 2026-10-31); a decision card's title keeps its 17px. */
#pm-workspace :is(.cm-bp, .cm-book, .cm-alloc, .cm-after) .pm-frame-title {
  font-size: 15px; font-weight: 600; color: var(--text);
}
#pm-workspace .cm-bp .pm-frame-note { font-size: 13px; }
#pm-workspace .cm-bp .sb-label { font-size: 13px; }
#pm-workspace .cm-bp :is(.sidebar-input, .sidebar-select) { font-size: 15px; }
#pm-workspace .cm-bp .pm-seg-opt { font-size: 15px; }
#pm-workspace .cm-bp :is(.pm-placeholder, .cm-placeholder) { font-size: 15px; }
#pm-workspace .cm-bp :is(.cm-ticket-client, .cm-ticket-timer) { font-size: 16px; }
#pm-workspace .cm-bp :is(.cm-ticket-type, .cm-fact-label) { font-size: 13px; }

/* The decision panel: the Debrief's ALM card (decisions 3, 5, 23). */
#pm-workspace .cm-bp .pm-frame.cm-dcard {
  border: 1px solid var(--border);
  padding: 20px;
}
#pm-workspace .cm-bp .cm-dcard > .pm-frame-head {
  align-items: center;
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
}
#pm-workspace .cm-bp .cm-dcard > .pm-frame-head .pm-frame-title { font-size: 17px; font-weight: 600; color: var(--text); }
#pm-workspace .cm-bp .cm-dcard .cm-form { padding: 0; }

/* The reference panel: on the page colour with no tile and no caption bar,
   a 13px heading, quiet rows (decisions 3, 23, 36, 39). */
#pm-workspace .cm-bp .pm-frame.cm-ref { background: var(--bg); padding: 10px 10px 6px; }
#pm-workspace .cm-bp .cm-ref > .pm-frame-head {
  padding: 0 0 6px;
  background: transparent;
  border-bottom: 0;
}
#pm-workspace .cm-bp .cm-ref .pm-table th { background: var(--bg); }
#pm-workspace .cm-bp .cm-ref .pm-table td {
  color: var(--text-secondary);
  line-height: 1.45;
  padding-top: 1px;
  padding-bottom: 1px;
  border-bottom-color: var(--border);
}
#pm-workspace .cm-bp .cm-ref .pm-sym { font-weight: 500; color: var(--text-secondary); }
/* A row picked in a table, and its point on the chart (decision 31). */
#pm-workspace .cm-bp .pm-table tr.is-linked td { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }

/* Market (decisions 9, 11, 16, 31): the comparables' chart over the deal
   news on the left; the euro rates and the comparables' bonds as reference
   on the right; the recent new issues across both columns at the bottom
   (owner, 2026-10-26), since their twelve headings need about 1,000px. */
#pm-workspace .cm-mk {
  grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#pm-workspace .cm-mk-left { grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
#pm-workspace .cm-mk-recent-frame { grid-column: 1 / -1; }
#pm-workspace .cm-mk-right { grid-template-rows: auto minmax(0, 1fr); }
#pm-workspace .cm-mk-chart { flex: 1 1 0; min-height: 0; }
#pm-workspace .cm-mk-scroll { min-height: 0; overflow: auto; }
#pm-workspace .cm-mk-rates { height: 210px; }
/* The comparables' bonds: Issuer (with its rating), Coupon, Years to
   maturity, Size (EUR m), Spread; an issuer's name wraps to a second line
   rather than being cut (owner, 2026-10-29). */
#pm-workspace .cm-mk-bonds th:nth-child(1) { width: 38%; }
#pm-workspace .cm-mk-bonds th:nth-child(2) { width: 15%; }
#pm-workspace .cm-mk-bonds th:nth-child(3) { width: 16%; }
#pm-workspace .cm-mk-bonds th:nth-child(4) { width: 15%; }
#pm-workspace .cm-mk-bonds th:nth-child(5) { width: 16%; }
#pm-workspace .cm-mk-bonds td:first-child { white-space: normal; overflow-wrap: break-word; }
/* Each column's share of its measured need: the heading on at most two
   lines at 13px bold, or the widest cell at 15px, plus the gutters. The
   needs sum to about 1,000px, the table's width on a 1280px screen. */
#pm-workspace .cm-mk-recent th:nth-child(1) { width: 22%; }
#pm-workspace .cm-mk-recent th:nth-child(2) { width: 6%; }
#pm-workspace .cm-mk-recent th:nth-child(3) { width: 5.8%; }
#pm-workspace .cm-mk-recent th:nth-child(4) { width: 6.2%; }
#pm-workspace .cm-mk-recent th:nth-child(5) { width: 8.2%; }
#pm-workspace .cm-mk-recent th:nth-child(6) { width: 7.2%; }
#pm-workspace .cm-mk-recent th:nth-child(7) { width: 8%; }
#pm-workspace .cm-mk-recent th:nth-child(8) { width: 8.7%; }
#pm-workspace .cm-mk-recent th:nth-child(9),
#pm-workspace .cm-mk-recent th:nth-child(10) { width: 7.7%; }
#pm-workspace .cm-mk-recent th:nth-child(11) { width: 5%; }
#pm-workspace .cm-mk-recent th:nth-child(12) { width: 7.5%; }
#pm-workspace .cm-mk-bonds tbody tr { cursor: default; }
/* The comparables' bonds enlarge as the hedge fund sim's cards do
   (participant-shell.css .pm-card-max, owner 2026-10-30): the card fills the
   column it lives in, so the right column is its positioned ancestor.
   While a card in it is enlarged, the column also spans the bottom row,
   and the card runs from the readout strip to the foot of the page, over
   the euro rates and the right part of the recent new issues. The column
   and the recent new issues are placed explicitly, so the spanning column
   neither moves to the left nor pushes the recent new issues down. */
#pm-workspace .cm-mk-right { position: relative; }
#pm-workspace .cm-mk-recent-frame { grid-row: 3; }
#pm-workspace .cm-mk-right:has(> .pm-card-max) { grid-column: 2; grid-row: 2 / -1; z-index: 6; }
/* The button on a reference panel, which has no caption bar: the 22px
   button centred on the 15px heading's 24px line (line-height 1.6) under
   the panel's 10px top padding, where participant-shell.css centres it on
   a 28px caption bar. */
#pm-workspace .cm-bp .cm-ref > .chart-fullscreen-btn { top: 11px; }
#pm-workspace .cm-bp .cm-mk-bonds-frame > .pm-frame-head { padding-right: 40px; }

/* Price Thoughts (decisions 10, 16, 17, 19, 28): the comparables' chart at
   a fixed height over the recent new issues over the deal news on the
   left; the price thoughts and the investor sounding on the right. */
#pm-workspace .cm-pt { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); }
#pm-workspace .cm-pt-left { grid-template-rows: auto auto minmax(0, 1fr); }
#pm-workspace .cm-pt-right { grid-template-rows: auto minmax(0, 1fr); }
#pm-workspace .cm-pt-chart-frame { height: 300px; }
#pm-workspace .cm-pt-sound-form { display: flex; gap: 8px; margin-bottom: 8px; }
#pm-workspace .cm-pt-sound-form .sidebar-select { flex: 1 1 0; min-width: 0; }
#pm-workspace .cm-pt-sounds th:nth-child(1) { width: 31%; }
#pm-workspace .cm-pt-sounds th:nth-child(2) { width: 15%; }
#pm-workspace .cm-pt-sounds th:nth-child(n+3) { width: 18%; }
#pm-workspace .cm-pt-sounds td { white-space: normal; vertical-align: top; }
#pm-workspace .cm-pt-sounds .cm-sub { display: block; color: var(--text-secondary); }
#pm-workspace .cm-pt-sounds tr.cm-total td { border-top: 1px solid var(--border); border-bottom: 0; font-weight: 600; }
/* The recent new issues take their table's height in their auto row: the
   frame's default scroller (flex: 1 1 0) resolves to nothing there and the
   frame showed its heading only (owner, 2026-10-26). */
#pm-workspace .cm-pt-recent-frame .pm-scroll { flex: 0 1 auto; }
#pm-workspace .cm-pt-recent th:nth-child(1) { width: 34%; }
#pm-workspace .cm-pt-recent th:nth-child(2) { width: 9%; }
#pm-workspace .cm-pt-recent th:nth-child(3) { width: 15%; }
#pm-workspace .cm-pt-recent th:nth-child(4),
#pm-workspace .cm-pt-recent th:nth-child(5),
#pm-workspace .cm-pt-recent th:nth-child(6) { width: 14%; }

/* Bookbuild (decisions 11, 16, 24, 26, 27): the book chart at a fixed
   height over the orders over the deal news on the left; Your book and the
   calls on the right. */
#pm-workspace .cm-bb { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); }
#pm-workspace .cm-bb-left { grid-template-rows: auto minmax(0, 3fr) minmax(0, 2fr); }
#pm-workspace .cm-bb-right { grid-template-rows: auto minmax(0, 1fr); }
#pm-workspace .cm-bb-chart-frame { height: 244px; }
#pm-workspace .cm-bb-calls-frame .cm-bb-calls { flex: 1 1 0; min-height: 0; max-height: none; }
#pm-workspace .cm-bb-orders th:nth-child(1) { width: 36%; }
#pm-workspace .cm-bb-orders th:nth-child(2) { width: 10%; }
#pm-workspace .cm-bb-orders th:nth-child(3) { width: 14%; }
#pm-workspace .cm-bb-orders th:nth-child(4) { width: 11%; }
#pm-workspace .cm-bb-orders th:nth-child(5) { width: 29%; }

/* The Allocation pages, rebuilt (the bond design 21, owner 2026-10-29;
   the IPO page on the same layout): Your allocation across the top; on the
   IPO the tier percentages under it; the final book across the page,
   about two thirds of the height, over the deal news, each scrolling in
   its own panel. */
#pm-workspace .cm-ba {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 2fr) minmax(0, 1fr);
}
#pm-workspace .cm-fb-left-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
/* The final book: a row per investor type, its investors under it when
   open; the type rows on the panel's raised ground in a heading's weight. */
#pm-workspace .cm-fb-table td { vertical-align: middle; }
#pm-workspace .cm-fb-table :is(th, td):first-child { padding-left: 10px; }
#pm-workspace .cm-fb-table :is(th, td):last-child { padding-right: 10px; }
#pm-workspace .cm-fb-table th[data-sort] { cursor: pointer; }
#pm-workspace .cm-fb-table th.is-sorted { color: var(--text); }
#pm-workspace .cm-fb-table tr.cm-fb-type td { background: var(--bg-elevated); font-weight: 600; }
#pm-workspace .cm-fb-table tr.cm-fb-type.is-folding { cursor: pointer; }
#pm-workspace .cm-fb-table tr.cm-fb-type.is-folding:hover td { background: color-mix(in srgb, var(--color-accent) 8%, var(--bg-elevated)); }
#pm-workspace .cm-fb-caret::before { content: '\25B8'; display: inline-block; width: 1.1em; color: var(--text-muted); }
#pm-workspace .cm-fb-table tr.cm-fb-type.is-open .cm-fb-caret::before { content: '\25BE'; }
#pm-workspace .cm-fb-table td.cm-fb-name { padding-left: calc(10px + 1.1em); white-space: nowrap; text-overflow: ellipsis; }
#pm-workspace .cm-fb-table tr.cm-total td { border-top: 1px solid var(--border); border-bottom: 0; font-weight: 600; }
/* The bond's columns: Investor, Region, Roadshow, Filled / sold, Orders,
   % of order, Allocation, Reason. */
#pm-workspace .cm-fb-table--bond th:nth-child(1) { width: 24%; }
#pm-workspace .cm-fb-table--bond th:nth-child(2) { width: 11%; }
#pm-workspace .cm-fb-table--bond th:nth-child(3) { width: 9%; }
#pm-workspace .cm-fb-table--bond th:nth-child(4) { width: 11%; }
#pm-workspace .cm-fb-table--bond th:nth-child(5) { width: 9%; }
#pm-workspace .cm-fb-table--bond th:nth-child(6) { width: 9%; }
#pm-workspace .cm-fb-table--bond th:nth-child(7) { width: 12%; }
#pm-workspace .cm-fb-table--bond th:nth-child(8) { width: 15%; }
/* The IPO's columns: Investor, Tier, Roadshow, Filled / sold, Orders,
   % of order, Allocation, Reason; the By tier block takes the same
   columns, so its fields sit over the final book's. */
#pm-workspace .cm-fb-table--ipo th:nth-child(1) { width: 23%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(2) { width: 6%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(3) { width: 14%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(4) { width: 10%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(5) { width: 11%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(6) { width: 8%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(7) { width: 13%; }
#pm-workspace .cm-fb-table--ipo th:nth-child(8) { width: 15%; }
/* The distribution: a bar for the types and one for the regions, each with
   its key under it, side by side in the top strip (the bond design 21.3). */
#pm-workspace .cm-ba-dist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  padding: 8px 0 4px;
}
#pm-workspace .cm-dist-bar {
  display: flex;
  height: 10px;
  margin: 3px 0 4px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
}
#pm-workspace .cm-dist-bar > span { height: 100%; }
#pm-workspace .cm-dist-key {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
#pm-workspace .cm-dist-key > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#pm-workspace .cm-dist-key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }

/* Aftermarket: the readouts and the scorecards on one row with the bond's
   terms under them at the scale's 13px; the chart's key in its caption
   bar; the calls over the desk at a fixed split, so a call arriving or
   leaving resizes no panel, the calls scrolling inside their own panel as
   the market making desk's do (owner, 2026-10-25); the desk's result a
   grid of two columns with the position across, and its offer one row. */
#pm-workspace .cm-bam .cm-stats { gap: 6px 20px; }
#pm-workspace .cm-bam-terms { margin-top: 6px; font-size: 13px; gap: 2px 16px; }
#pm-workspace .cm-bam-keys {
  display: inline-flex;
  gap: 12px;
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}
/* The Aftermarket on the skeleton (decisions 7 as changed by 16, 22, 30):
   the chart at a fixed height over the deal news on the left; the calls
   over Your desk, at a fixed split, on the right, as wide as the left
   (owner, 2026-10-26: the chart smaller, the desk wider and taller). The
   call cards side by side, two to a row where they fit 300px each. */
#pm-workspace .cm-bam { grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr); }
#pm-workspace .cm-bam-left { grid-template-rows: 280px minmax(0, 1fr); }
#pm-workspace .cm-bam-right { grid-template-rows: minmax(0, 2fr) minmax(0, 3fr); }
#pm-workspace .cm-bam-groups { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
#pm-workspace .cm-bam .cm-stats { flex: 0 1 auto; }
#pm-workspace .cm-bam .cm-calls {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
/* The blotter: a reference heading over the desk's trades and the bank's
   crosses, the day and the trade allowed a second line. */
#pm-workspace .cm-bam-blotter-head {
  margin-top: 12px;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
#pm-workspace .cm-bam .cm-ledger td { color: var(--text-secondary); line-height: 1.45; padding-top: 1px; padding-bottom: 1px; }
#pm-workspace .cm-bam .cm-ledger td:nth-child(-n+2) { white-space: normal; }
#pm-workspace .cm-bam .cm-bam-desk { padding: 0; }
#pm-workspace .cm-bam .cm-ledger th:nth-child(1) { width: 14%; }
#pm-workspace .cm-bam .cm-ledger th:nth-child(2) { width: 42%; }
#pm-workspace .cm-bam .cm-ledger th:nth-child(3),
#pm-workspace .cm-bam .cm-ledger th:nth-child(4) { width: 14%; }
#pm-workspace .cm-bam .cm-ledger th:nth-child(5) { width: 16%; }
/* A call's bid or offer and its buttons on one row, as on the market
   making desk's tickets, so two calls fit in the half of the column. */
#pm-workspace .cm-ticket-form { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
#pm-workspace .cm-ticket-form .cm-ticket-price { margin: 0; justify-content: flex-start; }
#pm-workspace .cm-ticket-form .cm-ticket-price .sidebar-input { width: 72px; }
#pm-workspace .cm-ticket-form .cm-ticket-actions { margin-left: auto; }
#pm-workspace .cm-bam-desk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 16px;
  padding: 6px 10px 2px;
}
#pm-workspace .cm-bam-desk .cm-term { justify-content: space-between; }
#pm-workspace .cm-bam-desk .cm-term:first-child { grid-column: 1 / -1; }
#pm-workspace .cm-bam-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

/* ── Glossary (the trainer reference design 4) ────────────────────── */

/* The bank ALM sim's Glossary page as it renders (owner, 2026-10-25: a
   verbatim copy). Every declaration is the ALM's own: alm.css .glossary-*
   with the sizes its .ts-scale main content gives them (terms 15px at 600,
   definitions 15px, the count 13px), its .form-input for the search field
   (15px under .ts-scale), html/body's font and line height, the main
   content's 24px padding and the Reference's 760px content width (the
   reading pages' rules below). The classes are cm-glossary-*, since this
   repo's .glossary-* are the platform handbook's. The palette, fonts and
   corners are the ALM's through .cm-alm on the page. */
#pm-workspace .cm-glossary {
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
#pm-workspace .cm-glossary > * { max-width: 760px; }
#pm-workspace .cm-glossary-controls { margin-bottom: 16px; }
#pm-workspace .cm-glossary-search-row { display: flex; align-items: center; gap: 12px; }
#pm-workspace .cm-glossary-search {
  flex: 1;
  max-width: 400px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-base);
  transition: var(--transition);
}
#pm-workspace .cm-glossary-search:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-bg);
}
#pm-workspace .cm-glossary-count { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
#pm-workspace .cm-glossary-cards { display: flex; flex-direction: column; gap: 6px; }
#pm-workspace .cm-glossary-card { padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
#pm-workspace .cm-glossary-card:first-child { padding-top: 0; }
#pm-workspace .cm-glossary-card-term {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  text-transform: none;
  letter-spacing: 0;
}
#pm-workspace .cm-glossary-card-def { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ── The reading pages in the bank ALM sim's look (the ALM look design 3) ── */

/* The reading pages (owner, 2026-10-25): the bond's Mandate, Debrief,
   Briefing and Glossary, and the IPO's Sales Memo, Debrief, Briefing and
   Glossary. Each is the ALM sim's page as it renders: alm.css's rules
   resolved with the .ts-scale its main content carries, each value below
   naming its source. The page is the ALM main content's 24px padding on
   the page colour (above). Credit, Company and Terms keep their own
   sheets of panels in the ALM's colours: the owner found them better as
   they were (2026-10-25). The Briefing is read in the Briefing window
   since 2026-10-31 (owner), with the Briefing page's look (below). */
#pm-workspace :is(#tab-debrief, #tab-performance, #tab-glossary) > .tab-content-area { padding: 24px; }

/* The documents, Mandate (Sales Memo) and Briefing: the ALM's Simulation
   Logic page, its prose and contents list on the page colour with no
   card. alm.css .ref-panel-content > .ref-mech-layout (1040px),
   .ref-mech-layout, .ref-toc, .ref-toc-link, .ref-mechanics,
   .ref-mechanics p, .ref-section, .doc-part, and .ts-scale's
   p at 15px, .ref-section at 17px and .doc-part at 22px,
   all at 600. The hedge fund document rules this page inherits
   (participant-shell.css) are undone where the ALM sets nothing: the
   centring, the reading measure, the numbered contents. The Briefing
   window (css/briefing-window.css) is outside the workspace, so it
   takes these rules, the ALM's colours (.cm-alm-palette) and the hedge
   fund rules the Briefing page inherited (the tables' measure and
   margins) here, and its text column is the Briefing page's width. */
/* The memo has no section index (owner, 2026-10-29): one column, the
   prose at the width it has beside the Briefing's index (1040px less the
   210px index and the 28px gap). */
#pm-workspace #tab-memo .ref-mech-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  justify-content: normal;
  margin: 0;
  max-width: 802px;
}
.briefing-window { --briefing-measure: 802px; }
.briefing-window .ref-toc { gap: 1px; }
.briefing-window .ref-toc-link {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  counter-increment: none;
}
.briefing-window .ref-toc-link::before { content: none; }
.briefing-window .ref-toc-link:hover { background: var(--bg-elevated); color: var(--text); }
.briefing-window .ref-toc-link.active {
  background: var(--bg-elevated);
  color: var(--color-accent);
  font-weight: 600;
}
:is(#pm-workspace #tab-memo, .briefing-window) .ref-mechanics {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}
:is(#pm-workspace #tab-memo, .briefing-window) .ref-mechanics p { margin: 0 0 12px; font-size: 15px; }
:is(#pm-workspace #tab-memo, .briefing-window) .ref-mechanics > :is(p, .doc-part, .ref-section) { max-width: none; }
:is(#pm-workspace #tab-memo, .briefing-window) .ref-mechanics .ref-section {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: inherit;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
#pm-workspace #tab-memo .doc-part {
  font-size: 22px;
  font-weight: 600;
  line-height: inherit;
  margin: 32px 0 2px;
  color: var(--text);
}
/* The memo starts where the Company page starts (owner, 2026-10-29): the
   content area's own padding (base.css .tab-content-area, 16px 20px 48px)
   and no space above the company name; a part in the Briefing window
   opens on its first heading, with no space above it. */
:is(#pm-workspace #tab-memo, .briefing-window) .ref-mechanics > :first-child { margin-top: 0; }
/* The Briefing's tables: alm.css .data-table, th, td and row hover, at
   .ts-scale's 15px for the cells and the column headings, the headings
   at 600 in the secondary colour with no capitals or tracking. The ALM's
   cells wrap and sit left; the platform's table kept them on one line,
   right-aligned, and the prose columns ran the tables wider than the page
   (owner, 2026-10-26: no sideways scrolling). */
.briefing-window .ref-mechanics .data-table { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: auto; }
.briefing-window .ref-mechanics .data-table :is(th, td) { white-space: normal; text-align: left; }
.briefing-window .ref-mechanics .data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.briefing-window .ref-mechanics .data-table td {
  padding: 10px 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.briefing-window .ref-mechanics .data-table tr:hover td { background: var(--bg-hover); }
/* The table's box square, as every card and box on this screen (owner,
   2026-10-25), at the reading measure with the air above and below that
   the hedge fund document gives it (participant-shell.css). */
.briefing-window .ref-mechanics .data-table-wrap {
  border-radius: 0;
  max-width: var(--measure-prose, 46rem);
  margin: var(--space-subsection, 32px) 0;
}

/* The Debrief: each panel an ALM card with an ALM card title (alm.css
   .card, .card-header and .card-title, with .ts-scale's 17px title),
   16px apart on the page colour. The corners are square, as on the sim's
   other pages, where the ALM's are rounded (owner, 2026-10-25). The Prime
   Brokerage Performance page is on the same cards. */
#pm-workspace :is(#tab-debrief, #tab-performance) .cm-debrief { gap: 16px; padding: 0; background: transparent; }
#pm-workspace :is(#tab-debrief, #tab-performance) .cm-db-cards { gap: 16px; background: transparent; }
#pm-workspace :is(#tab-debrief, #tab-performance) .pm-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
}
#pm-workspace :is(#tab-debrief, #tab-performance) .pm-frame-head {
  align-items: center;
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
}
/* A folded panel shows its heading alone, so the heading's gap to the body
   goes too and the heading sits in the middle of its card (owner,
   2026-11-08: the folded headings sat high, here and on the Prime
   Brokerage Debrief). */
#pm-workspace :is(#tab-debrief, #tab-performance) .pm-frame.cm-folded > .pm-frame-head { margin-bottom: 0; }
#pm-workspace :is(#tab-debrief, #tab-performance) .pm-frame-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
#pm-workspace :is(#tab-debrief, #tab-performance) .cm-db-body { padding: 0; }
#pm-workspace :is(#tab-debrief, #tab-performance) .cm-db-card .data-table-wrap { margin: 0; }
#pm-workspace :is(#tab-debrief, #tab-performance) .cm-db-flags { padding: 0; margin-top: 16px; }
