/* Workspace layout: readable controls, labelled mobile navigation and compact evidence. */
:root { --muted: #596b80; --paper: #f4f6f8; }
body { text-rendering: optimizeLegibility; }
.sidebar { overflow: hidden; padding-top: 28px; }
.sidebar .brand { margin-bottom: 30px; }
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.sidebar .nav-item { min-height: 48px; margin-bottom: 3px; }
.sidebar .nav-item > span:first-child { flex: 0 0 20px; }
.sidebar-note { margin-top: 24px; }
.workspace-menu, .reading-toggle { display: none; }
.workspace-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.workspace-shortcuts button { min-height: 46px; border: 1px solid #cdd6e0; border-radius: 8px; padding: 8px 16px; background: white; color: #44576d; font-size: .9375rem; }
.workspace-shortcuts button[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #f3dfb8; }
.topbar .top-right { flex-wrap: wrap; gap: 8px; justify-content: end; }
.private-pill { white-space: nowrap; background: #e9f3ee; color: #286147; border-color: #c8dfd1; }
.private-pill svg { height: 14px; width: 14px; }
.workspace-badge { display: none; }
.heading { padding-bottom: 24px; border-bottom: 1px solid #dce3eb; }
.heading-meta { color: #52677d; line-height: 1.7; }
.heading-meta small { color: #61758a; }
.stat { border-radius: 12px; box-shadow: 0 2px 3px #11243a03; }
.stat > span, .stat small { color: #5d6f83; }
.ipo-row { border-radius: 12px; box-shadow: 0 3px 12px #172b4004; align-items: start; }
.ipo-row .date-cell small, .company-cell small, .price-cell small { color: #607187; }
.ipo-row .save-button, .ipo-row .open-button { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.ipo-row .save-button svg, .ipo-row .open-button svg { width: 19px; height: 19px; }
.ipo-row .company-cell { min-height: 48px; }
.offer-snapshot { grid-column: 1 / -1; border: 1px solid #dce3eb; border-radius: 8px; background: #f8fafc; font-size: .9375rem; }
.offer-snapshot summary { min-height: 48px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; color: #365069; }
.offer-snapshot summary::-webkit-details-marker { display: none; }
.offer-snapshot summary span { float: right; color: #7d6335; }
.offer-snapshot[open] summary span { transform: rotate(45deg); }
.offer-snapshot dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid #dce3eb; }
.offer-snapshot dl > div { padding: 12px 14px; min-width: 0; }
.offer-snapshot dt { font-size: .8125rem; color: #5c6d7e; }
.offer-snapshot dd { margin: 5px 0 0; font-size: 1rem; font-weight: 600; color: #253d54; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.offer-snapshot dd small { display: block; font-size: .8125rem; color: #5a6f84; font-weight: 400; line-height: 1.65; margin-top: 3px; }
.offer-snapshot .snapshot-pending { font-size: .875rem; color: #756035; font-weight: 500; }
.offer-snapshot > button { margin: 0 14px 8px; min-height: 44px; text-align: left; }
.detail-sections { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: 5px 10px; background: #f9fafc; border-block: 1px solid #dde5ed; padding: 10px 24px; z-index: 3; }
.detail-sections button { padding: 6px 10px; min-height: 44px; font-size: .875rem; border-radius: 6px; color: #405b74; }
.detail-sections button:hover { background: #e8edf3; }
#ipo-offer-structure, #ipo-research, #research-notes, #detail-overview-section { scroll-margin-top: 150px; }
.calendar-dot.calendar-ballot { background: #8b69a6; }
.calendar-chip.calendar-ballot { color: #6b467d; background: #f0e9f7; border-color: #ded0ec; }
.calendar-legend { flex-wrap: wrap; gap: 10px 18px; }
body:not([data-view="directory"]) .heading, body:not([data-view="directory"]) .desk-launchpad { display: none; }
body:not([data-view="directory"]) main { padding-top: 24px; }
.desk-table-wrap, .analysis-table-wrap { overscroll-behavior-x: contain; }
.market-filters label, .market-preset-save label, .scenario-fields label { min-width: 0; }
input, textarea, select { font-size: max(16px, 1rem); }
.search-field input { font-size: 1rem; }
.filter-bar select { min-height: 48px; }
@media (max-height: 1050px) { .sidebar-note { display: none; } }
@container ipo-directory (min-width: 56rem) {
  body[data-view="directory"] #ipo-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
  body[data-view="directory"] .table-labels { display: none; }
  body[data-view="directory"] .ipo-row { margin: 0; }
}
@media (max-width: 1400px) {
  .workspace-badge { display: inline-flex; align-items: center; gap: 6px; background: #e9f3ee; color: #286147; font-size: .8125rem; padding: 4px 9px; border-radius: 6px; margin-top: 14px; }
  .workspace-badge svg { width: 14px; height: 14px; }
}
@media (max-width: 1020px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; min-height: 72px; padding: 12px 24px; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; overflow: visible; }
  .sidebar .brand { margin: 0; gap: 10px; }
  .sidebar .brand > span:last-child { display: block; font-size: 1.5rem; white-space: nowrap; }
  .sidebar .brand small, .sidebar .profile, .sidebar .source-nav, .nav-label { display: none; }
  .sidebar .brand-mark { flex-shrink: 0; }
  .workspace { margin-left: 0; }
  .workspace-menu { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px; border: 1px solid #52647b; border-radius: 8px; color: #ead4af; font-size: .9375rem; }
  .sidebar nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: #14263e; padding: 12px 18px 20px; max-height: 72dvh; overflow: auto; border-top: 1px solid #3f526b; box-shadow: 0 14px 20px #10233b30; }
  .sidebar[data-menu-open="true"] nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .sidebar nav .nav-item { display: flex; justify-content: flex-start; align-items: center; gap: 10px; font-size: .9375rem; line-height: 1.5; width: 100%; height: auto; min-height: 50px; padding: 10px 12px; margin: 0; }
  .sidebar nav .nav-count { display: none; }
  .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 12px 24px; gap: 12px; }
  .topbar .reading-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #cbd5df; border-radius: 8px; padding: 7px 10px; font-size: .875rem; }
  .reading-toggle > span:first-child { font-size: 1.0625rem; font-family: Georgia,serif; }
  .reading-toggle > span:last-child { max-width: 10rem; }
  .topbar .reading-controls { display: none; grid-column: 1 / -1; max-width: none; padding: 12px 0 4px; border-top: 1px solid #e0e5eb; }
  .topbar[data-reading-open="true"] .reading-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar .top-right { display: none; }
  .breadcrumb { font-size: .875rem; }
  .breadcrumb > span { padding: 0 6px; }
  .desk-launchpad { margin-bottom: 20px; }
}
@media (max-width: 650px) {
  .sidebar { padding: 10px 16px; min-height: 68px; }
  .sidebar .brand > span:last-child { font-size: 1.25rem; letter-spacing: -.5px; }
  .workspace-menu { flex-shrink: 0; }
  .sidebar[data-menu-open="true"] nav { grid-template-columns: 1fr; }
  .topbar { padding: 10px 16px; grid-template-columns: minmax(0,1fr) auto; }
  .reading-toggle > span:last-child { display: none; }
  .topbar[data-reading-open="true"] .reading-controls { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .heading { padding-bottom: 20px; margin-bottom: 20px; gap: 16px; }
  .heading h1 { font-size: 2.1rem; }
  .heading-meta { margin: 0; }
  .heading p { font-size: 1rem; }
  .workspace-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 20px; }
  .workspace-shortcuts button { font-size: .8125rem; padding: 8px 5px; line-height: 1.45; min-height: 52px; overflow-wrap: anywhere; }
  .desk-launchpad { display: none; }
  .stat small { line-height: 1.5; display: block; }
  .stat > span { font-size: .875rem; }
  .deadline-banner { align-items: start; flex-wrap: wrap; }
  .deadline-copy { flex: 1; min-width: 0; }
  .deadline-banner button { margin-top: 2px; padding: 8px 0; min-height: 44px; }
  .section-heading { flex-wrap: wrap; align-items: start; }
  .directory-actions { width: 100%; justify-content: flex-start; gap: 8px 20px; }
  .directory-actions .text-button, .list-meta .text-button { min-height: 44px; }
  .status-tabs { display: flex; gap: 6px; border: 0; margin-bottom: 12px; }
  .status-tabs button { border: 1px solid #d6dee7; background: white; border-radius: 6px; padding: 8px 10px; min-height: 44px; font-size: .875rem; flex: 0 1 auto; }
  .status-tabs .selected { border-color: #9c7d42; background: #f7f0e3; color: #70521f; }
  .filter-bar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .filter-bar .search-field { grid-column: 1 / -1; min-width: 0; }
  .filter-bar select { width: 100%; max-width: none; font-size: .9375rem; }
  #sort { grid-column: 1 / -1; }
  .ipo-row .company-cell { grid-column: 1 / -1; grid-row: 1; padding: 0; }
  .ipo-row .price-cell { grid-column: 1; grid-row: 2; text-align: left; }
  .ipo-row .status-cell { grid-column: 2 / -1; grid-row: 2; justify-self: end; }
  .ipo-row .row-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-end; border-top: 1px solid #e5eaf0; padding-top: 8px; }
  .ipo-row .debut-cell { grid-row: 5; }
  .ipo-row .date-cell { font-size: .9375rem; }
  .ipo-row .date-cell::before { font-size: .8125rem; }
  .ipo-row .research-summary, .ipo-row .analysis-summary { padding: 12px; }
  .detail-sections { padding: 8px 12px; gap: 4px; }
  .detail-sections button { flex: 1 1 40%; font-size: .8125rem; }
  .detail-dismiss { top: 8px; min-width: 44px; min-height: 44px; }
  .offer-snapshot dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scenario-fields, .calc-fields { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 360px) {
  .ipo-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ipo-row .close-cell { grid-column: 1; grid-row: 3; }
  .ipo-row .ballot-cell { grid-column: 2; grid-row: 3; }
  .ipo-row .listing-cell { grid-column: 1; grid-row: 4; }
  .ipo-row .row-actions { grid-column: 2; grid-row: 4; border: 0; padding: 0; }
  .offer-snapshot dl { grid-template-columns: minmax(0,1fr); }
}

/* Readable public directory before the interactive app loads, also without JS. */
.catalogue-preview { min-width: 0; }
.catalogue-preview > p { color: var(--muted); font-size: .9375rem; }
.catalogue-preview-card { padding: 20px; margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; background: white; overflow-wrap: anywhere; }
.catalogue-preview-card h3 { margin: 0 0 8px; font-size: 1.125rem; }
.catalogue-preview-card p { margin: 8px 0; font-size: .9375rem; }
.catalogue-preview-card dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 16px; }
.catalogue-preview-card dl > div { min-width: 0; }
.catalogue-preview-card dt { color: var(--muted); font-size: .875rem; }
.catalogue-preview-card dd { margin: 4px 0 0; }
.catalogue-preview-card ul { padding-left: 20px; font-size: .875rem; }
.catalogue-preview-card a { text-decoration: underline; text-underline-offset: 3px; }
