:root {
  --paper: #0b0e11;
  --paper-deep: #151b20;
  --ink: #f4f5f1;
  --muted: #93a0aa;
  --line: #283139;
  --accent: #ff6b4a;
  --accent-soft: #2c1916;
  --signal: #59d69c;
  --blue: #58bde9;
  --white: #11161a;
  --surface-strong: #182027;
  --warning: #e6c667;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: clip;
}

body { margin: 0; background: var(--paper); overflow-x: clip; }
a { color: inherit; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 58px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 28px;
}

.site-header nav a,
.site-header .nav-tab {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a.active,
.site-header .nav-tab.active { border-color: var(--ink); color: var(--ink); }

main {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.page-heading {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 23px;
  font-weight: 400;
}

h1 span { font-style: normal; }

.page-period {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.feed-status {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex: 0 0 auto;
}

.feed-status.error .status-dot { background: #b64335; }

.feed-controls {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.search-control { flex: 1; max-width: 620px; }

.search-control input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cfc8bc;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.search-control input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(83, 111, 131, 0.15);
}

.sort-control select {
  height: 38px;
  min-width: 142px;
  padding: 0 30px 0 11px;
  border: 1px solid #cfc8bc;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.refresh-button {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
}

.refresh-button:disabled { cursor: wait; opacity: 0.65; }
.refresh-button[hidden] { display: none; }

.refresh-mark {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
}

.refresh-mark::before {
  content: "\21BB";
  position: absolute;
  inset: 0;
  font-size: 20px;
  line-height: 14px;
  text-align: center;
}

.refresh-button.is-refreshing .refresh-mark { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.database-stats {
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.database-stats[hidden] { display: none; }

.database-stats > div {
  padding: 17px 14px 13px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.database-stats > div:first-child { padding-left: 4px; }
.database-stats > div:last-child { border-right: 0; }

.database-stats strong {
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  font-weight: 700;
}

.database-stats span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.filter-panel {
  padding: 9px 0 10px;
  border-bottom: 1px solid var(--line);
}

.category-tabs,
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-tabs { margin-bottom: 10px; }

.filter-line {
  min-height: 31px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.filter-title {
  padding-top: 7px;
  color: #876f5b;
  font-size: 9px;
  font-weight: 700;
}

.filter-button {
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid #d2ccc0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
}

.filter-button:hover { border-color: #9f978b; }
.filter-button.active { border-color: var(--ink); background: var(--ink); color: var(--white); }

.database-columns {
  min-height: 34px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  display: grid;
  grid-template-columns: minmax(210px, 0.95fr) 50px minmax(300px, 2fr) 105px 132px;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  font-weight: 700;
}

.database-columns[hidden] { display: none; }

.database-row {
  width: 100%;
  min-height: 52px;
  padding: 5px 8px 5px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(210px, 0.95fr) 50px minmax(300px, 2fr) 105px 132px 16px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.database-row:hover,
.database-row[aria-expanded="true"] { background: var(--paper-deep); }

.company-cell { min-width: 0; }
.company-name {
  overflow: hidden;
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-ticker,
.location-cell,
.cap-cell {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
}

.situation-cell {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-cell { color: var(--ink); font-size: 10px; font-weight: 700; }
.database-row .category-label { justify-self: end; }
.database-row[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-1px, -1px); }

.load-more {
  min-height: 38px;
  margin: 16px auto 0;
  padding: 0 18px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  display: block;
  font-size: 10px;
  font-weight: 700;
}

.load-more[hidden] { display: none; }

.section-rule {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-rule h2 { margin: 0; color: var(--accent); font-size: 10px; }

.section-rule span {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.feed-item { border-bottom: 1px solid var(--line); }

.feed-row {
  width: 100%;
  min-height: 45px;
  padding: 0 8px 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: 58px 70px minmax(145px, 0.7fr) minmax(260px, 2fr) 130px 18px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.feed-row:hover, .feed-row[aria-expanded="true"] { background: var(--paper-deep); }

.event-time, .event-ticker {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.event-ticker { font-weight: 700; }

.event-issuer {
  overflow: hidden;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-headline {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-label {
  justify-self: end;
  padding: 4px 7px;
  border-radius: 2px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.category-label[data-category="m_and_a"] { background: #dce8f3; color: #285f91; }
.category-label[data-category="divestiture"] { background: #dce9e8; color: #3c6c70; }
.category-label[data-category="strategic_review"] { background: #e2e4f4; color: #4f5fab; }
.category-label[data-category="guidance_outlook"] { background: #e7e2cf; color: #66551d; }
.category-label[data-category="tender_offer"] { background: #f3dce3; color: #a53d59; }
.category-label[data-category="insolvency"] { background: #eadcdc; color: #813b42; }
.category-label[data-category="liquidation"] { background: #e3e2df; color: #5a5852; }
.category-label[data-category="capital_return"] { background: #dcebe3; color: #2f7758; }
.category-label[data-category="rights_issue"] { background: #dce9ec; color: #26718a; }
.category-label[data-category="restructuring"] { background: #f0dfd6; color: #a9502e; }

.chevron {
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.feed-row[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-1px, -1px); }

.event-detail {
  padding: 20px 20px 24px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.detail-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-ticker {
  font-family: Consolas, "Courier New", monospace;
  font-size: 16px;
  font-weight: 700;
}

.detail-company {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
}

.detail-divider { color: var(--muted); }

.detail-form {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.detail-summary {
  max-width: 1030px;
  margin: 17px 0 16px;
  font-size: 14px;
  line-height: 1.6;
}

.detail-section { padding: 15px 0; border-top: 1px dotted var(--line); }

.detail-section h3 { margin: 0 0 10px; color: #9c8068; font-size: 10px; }

.term-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line);
}

.term { min-height: 62px; padding: 11px 12px; background: var(--white); }
.term dt { margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 700; }

.term dd {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.filing-note {
  max-width: 1050px;
  margin: 0;
  color: #4f4b45;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}

.reporting-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.reporting-list li { font-size: 12px; }

.sec-link {
  min-height: 37px;
  padding: 0 14px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.sec-link::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.loading-state, .empty-state, .error-state {
  min-height: 160px;
  padding: 42px 12px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
}

.error-state { color: #9c3429; }

.research-dashboard[hidden],
.feed-controls[hidden],
.filter-panel[hidden],
.feed-section[hidden] { display: none; }

.research-stats {
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.research-stats > div {
  padding: 17px 14px 13px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-stats > div:first-child { padding-left: 4px; }
.research-stats > div:last-child { border-right: 0; }

.research-stats strong {
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
}

.research-stats span,
.research-toolbar label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.research-band {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
}

.company-research { padding-top: 20px; }

.company-research-toolbar { align-items: end; }

.company-search-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.company-search-form > label {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.company-search-form > div { display: flex; }

.company-search-form input {
  width: min(390px, 34vw);
  height: 38px;
  padding: 0 11px;
  border: 1px solid #cfc8bc;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: var(--white);
  color: var(--ink);
}

.company-search-form button {
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 0 3px 3px 0;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.company-search-results {
  margin: -3px 0 16px;
  border-top: 1px solid var(--ink);
}

.company-search-results[hidden] { display: none; }

.company-match {
  width: 100%;
  min-height: 50px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.company-match:hover { background: var(--paper-deep); }
.company-match > span:first-child { min-width: 0; }
.company-match strong, .company-match small { display: block; }
.company-match strong { overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.company-match small { margin-top: 4px; color: var(--muted); font-family: Consolas, "Courier New", monospace; font-size: 9px; }
.company-match > span:last-child { color: var(--muted); font-family: Consolas, "Courier New", monospace; font-size: 9px; white-space: nowrap; }
.company-match-empty { min-height: 50px; padding: 17px 4px; color: var(--muted); font-size: 12px; }

.company-dossier {
  border-top: 1px solid var(--ink);
  scroll-margin-top: 14px;
}

.company-dossier[hidden] { display: none; }

.dossier-heading {
  min-height: 102px;
  padding: 19px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.dossier-heading > div { min-width: 0; }
.dossier-ticker { color: var(--accent); font-family: Consolas, "Courier New", monospace; font-size: 12px; font-weight: 700; }
.dossier-heading h3 { margin: 3px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-style: italic; font-weight: 400; }
.dossier-heading p { margin: 0; color: var(--muted); font-family: Consolas, "Courier New", monospace; font-size: 9px; }

.dossier-verdict {
  padding: 7px 9px;
  border: 1px solid #a9a39a;
  color: #5d5952;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.dossier-verdict[data-tone="positive"] { border-color: #8eb9a4; background: #e0eee7; color: #267657; }
.dossier-verdict[data-tone="negative"] { border-color: #d3a39d; background: #f2e2df; color: #983c33; }
.dossier-verdict[data-tone="mixed"] { border-color: #c9b57f; background: #eee8d5; color: #6b581f; }

.storyline-copy {
  max-width: 1040px;
  padding: 17px 4px 20px;
}

.storyline-copy p { margin: 0 0 11px; font-size: 13px; line-height: 1.65; }
.storyline-summary { font-size: 15px !important; }
.storyline-context { padding-left: 13px; border-left: 3px solid #c5a561; color: #514b42; }
.storyline-copy .research-footnote { margin: 17px 0 0; font-size: 9px; line-height: 1.5; }
.dossier-rule { min-height: 39px; }

.dossier-outcome-table th:first-child,
.dossier-outcome-table td:first-child { text-align: left; }
.dossier-outcome-table td { vertical-align: middle; }
.dossier-outcome-table td strong,
.dossier-outcome-table td span { display: block; }
.dossier-outcome-table td span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.dossier-outcome-table td:first-child { max-width: 330px; overflow: hidden; text-overflow: ellipsis; }
.dossier-outcome-table tr.selected-campaign { background: #f1ede4; }

.dossier-fundamentals-table { min-width: 1040px; }
.dossier-fundamentals-table th:first-child,
.dossier-fundamentals-table th:nth-child(2),
.dossier-fundamentals-table td:first-child,
.dossier-fundamentals-table td:nth-child(2) { text-align: left; }
.dossier-fundamentals-table td strong,
.dossier-fundamentals-table td span { display: block; }
.dossier-fundamentals-table td span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.dossier-fundamentals-table tr.selected-campaign { background: #f1ede4; }
.dossier-fundamentals-table a { color: var(--ink); font-size: 9px; font-weight: 700; text-decoration: none; }
.fundamental-notes { padding: 13px 4px 2px; }
.fundamental-notes p { margin: 0 0 8px; color: #514b42; font-size: 11px; line-height: 1.55; }
.fundamental-notes strong { color: var(--ink); }
.fundamental-caveat { margin: 5px 4px 16px; }

.research-timeline {
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}

.timeline-item {
  min-height: 92px;
  display: grid;
  grid-template-columns: 108px 17px minmax(0, 1fr);
  gap: 12px;
}

.timeline-item > time {
  padding-top: 19px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  text-align: right;
}

.timeline-marker {
  position: relative;
  border-left: 1px solid #c9c2b7;
}

.timeline-marker::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-result .timeline-marker::before { background: var(--blue); }

.timeline-item > div {
  padding: 14px 4px 15px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item.selected-campaign > div { background: #f1ede4; }
.timeline-label { color: var(--accent); font-size: 9px; font-weight: 700; }
.timeline-label[data-category="market_result"] { color: var(--blue); }
.timeline-item h4 { margin: 5px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 14px; font-weight: 400; }
.timeline-item p { max-width: 950px; margin: 0; color: #57534c; font-size: 11px; line-height: 1.5; }
.timeline-item a { margin-top: 7px; color: var(--ink); display: inline-block; font-size: 9px; font-weight: 700; text-decoration: none; }

.case-library { padding-top: 0; }
.case-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.case-columns h3 { margin: 15px 0 7px; color: var(--muted); font-size: 9px; }
.case-list { border-top: 1px solid var(--ink); }

.case-row {
  width: 100%;
  min-height: 61px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.case-row:hover { background: var(--paper-deep); }
.case-row strong, .case-row small { display: block; }
.case-row strong { overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-style: italic; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.case-row small { overflow: hidden; margin-top: 4px; color: var(--muted); font-family: Consolas, "Courier New", monospace; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.case-row > span:last-child { font-family: Consolas, "Courier New", monospace; font-size: 12px; font-weight: 700; text-align: right; }
.case-row > span:last-child small { color: currentColor; font-size: 8px; }

.trajectory-analysis { padding-top: 0; }

.cluster-insights {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}

.cluster-insight {
  min-height: 92px;
  padding: 15px 18px 13px 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}

.cluster-insight:nth-child(odd) { border-right: 1px solid var(--line); }
.cluster-insight:nth-child(even) { padding-left: 17px; }
.cluster-insight > span { color: var(--accent); font-family: Consolas, "Courier New", monospace; font-size: 10px; font-weight: 700; }
.cluster-insight p { margin: 0; font-size: 12px; line-height: 1.55; }

.cluster-table th:first-child,
.cluster-table td:first-child { text-align: left; }
.cluster-table th:last-child,
.cluster-table td:last-child { text-align: left; }
.cluster-table td { min-height: 72px; }
.cluster-table td:first-child { border-left: 3px solid transparent; }
.cluster-table tr[data-band="good"] td:first-child { border-left-color: #4f8e70; }
.cluster-table tr[data-band="middle"] td:first-child { border-left-color: #b89b4e; }
.cluster-table tr[data-band="bad"] td:first-child { border-left-color: #b25449; }
.cluster-table td:first-child strong,
.cluster-table td:first-child span,
.cluster-table td:first-child small,
.cluster-table td:nth-child(2) span { display: block; }
.cluster-table td:first-child strong { font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 400; }
.cluster-table td:first-child span,
.cluster-table td:nth-child(2) span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.cluster-context { margin-top: 5px; color: #6f6a62; font-family: Consolas, "Courier New", monospace; font-size: 8px; font-weight: 400; line-height: 1.4; }

.cluster-examples { display: flex; flex-wrap: wrap; gap: 4px; }
.cluster-example {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #cfc8bc;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
}
.cluster-example:hover { border-color: var(--ink); background: var(--paper-deep); }

.research-toolbar {
  margin-bottom: 13px;
  display: flex;
  align-items: end;
  gap: 10px;
}

.research-toolbar > div { flex: 1; }
.research-toolbar h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
.research-toolbar label { display: flex; flex-direction: column; gap: 5px; }

.research-toolbar select,
.research-toolbar input {
  height: 36px;
  min-width: 152px;
  padding: 0 10px;
  border: 1px solid #cfc8bc;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.research-search input { width: min(290px, 28vw); }
.research-table-wrap { width: 100%; overflow-x: auto; }

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.research-table th {
  padding: 9px 10px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.research-table th:first-child,
.research-table td:first-child { padding-left: 4px; text-align: left; }

.research-table td {
  height: 43px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-family: Consolas, "Courier New", monospace;
  text-align: right;
  white-space: nowrap;
}

.factor-table td:first-child,
.campaign-performance-table td:first-child,
.campaign-performance-table td:nth-child(2) {
  max-width: 300px;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  text-overflow: ellipsis;
}

.campaign-performance-table td:first-child strong,
.campaign-performance-table td:first-child span { display: block; }
.campaign-performance-table td:first-child span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.metric-positive { color: #267657; }
.metric-negative { color: #a23d32; }
.metric-muted { color: var(--muted); }

.research-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .feed-row {
    grid-template-columns: 52px 62px minmax(120px, 0.75fr) minmax(180px, 1.6fr) 18px;
  }
  .feed-row .category-label { display: none; }
  .term-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .database-columns,
  .database-row {
    grid-template-columns: minmax(180px, 0.9fr) 44px minmax(240px, 1.7fr) 105px 16px;
  }
  .database-columns span:nth-child(4),
  .database-row .cap-cell { display: none; }
  .database-row .category-label { display: block; }
}

@media (max-width: 640px) {
  .site-header { min-height: 48px; padding: 0 16px; }
  .brand { font-size: 14px; }
  .site-header nav { gap: 8px; }
  .site-header .nav-tab { font-size: 9px; }
  .site-header nav a { display: none; }
  main { width: calc(100% - 24px); padding-top: 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 8px 0 14px; }
  h1 { font-size: 20px; }
  .feed-controls { align-items: stretch; flex-wrap: wrap; }
  .search-control { flex-basis: calc(100% - 50px); }
  .sort-control { order: 3; width: 100%; }
  .sort-control select { width: 100%; }
  .refresh-button { width: 42px; padding: 0; justify-content: center; font-size: 0; }
  .filter-line { grid-template-columns: 1fr; padding-top: 5px; }
  .filter-title { padding-top: 0; }
  .database-stats { grid-template-columns: 1fr 1fr; }
  .database-stats > div:nth-child(2) { border-right: 0; }
  .database-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feed-row {
    min-height: 61px;
    padding: 8px 4px;
    grid-template-columns: 48px 55px minmax(0, 1fr) 16px;
    grid-template-rows: 20px 25px;
    gap: 0 7px;
  }
  .event-time, .event-ticker, .event-issuer { align-self: end; }
  .event-issuer { font-size: 12px; }
  .event-headline { grid-column: 2 / 4; align-self: start; font-size: 12px; }
  .chevron { grid-column: 4; grid-row: 1 / 3; }
  .event-detail { padding: 17px 12px 20px; }
  .detail-summary { font-size: 13px; }
  .term-grid { grid-template-columns: 1fr 1fr; }
  .database-columns { display: none; }
  .database-row {
    min-height: 65px;
    padding: 8px 4px;
    grid-template-columns: minmax(0, 1fr) 88px 16px;
    grid-template-rows: 24px 25px;
    gap: 0 8px;
  }
  .database-row .company-cell { grid-column: 1; grid-row: 1; }
  .database-row .location-cell { display: none; }
  .database-row .situation-cell { grid-column: 1 / 3; grid-row: 2; }
  .database-row .category-label { grid-column: 2; grid-row: 1; }
  .database-row .chevron { grid-column: 3; grid-row: 1 / 3; }
  .research-stats { grid-template-columns: 1fr 1fr; }
  .research-stats > div:nth-child(2) { border-right: 0; }
  .research-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .research-toolbar { align-items: stretch; flex-direction: column; }
  .research-toolbar > div { margin-bottom: 4px; }
  .research-toolbar select,
  .research-toolbar input,
  .research-search input { width: 100%; }
  .research-table { min-width: 720px; }
  .company-research-toolbar { align-items: stretch; }
  .company-search-form { align-items: stretch; flex-direction: column; }
  .company-search-form > label { align-self: auto; }
  .company-search-form input { width: 100%; }
  .company-search-form > div { width: 100%; }
  .company-search-form > div input { flex: 1; min-width: 0; }
  .dossier-heading { align-items: flex-start; flex-direction: column; }
  .case-columns { grid-template-columns: 1fr; gap: 10px; }
  .cluster-insights { grid-template-columns: 1fr; }
  .cluster-insight:nth-child(odd) { border-right: 0; }
  .cluster-insight:nth-child(even) { padding-left: 4px; }
  .cluster-table { min-width: 980px; }
  .timeline-item { grid-template-columns: 82px 13px minmax(0, 1fr); gap: 8px; }
  .timeline-item > time { font-size: 9px; }
}

/* Dark product system */
input,
select {
  color-scheme: dark;
}

input::placeholder { color: #697680; }

.search-control input,
.sort-control select,
.company-search-form input,
.research-toolbar select,
.research-toolbar input {
  border-color: var(--line);
  background: #0f1418;
}

.search-control input:focus,
.company-search-form input:focus,
.research-toolbar select:focus,
.research-toolbar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(88, 189, 233, 0.16);
  outline: none;
}

.refresh-button,
.company-search-form button,
.sec-link {
  border-color: var(--accent);
  background: var(--accent);
  color: #0b0e11;
}

.filter-title,
.detail-section h3 { color: var(--accent); }

.filter-button,
.cluster-example { border-color: var(--line); }
.filter-button:hover,
.cluster-example:hover { border-color: #5b6872; }
.filter-button.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.company-name,
.event-issuer,
.event-headline,
.detail-company,
.filing-note,
.loading-state,
.empty-state,
.error-state,
.company-match strong,
.dossier-heading h3,
.timeline-item h4,
.case-row strong,
.cluster-table td:first-child strong,
.research-toolbar h2 {
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

.company-name,
.detail-company,
.filing-note,
.dossier-heading h3,
.case-row strong { font-style: normal; }

.feed-row,
.database-row,
.company-match,
.case-row {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.feed-row:hover,
.feed-row[aria-expanded="true"],
.database-row:hover,
.database-row[aria-expanded="true"],
.company-match:hover,
.case-row:hover {
  background: var(--paper-deep);
  box-shadow: inset 2px 0 0 var(--accent);
}

.event-detail { background: #0f1418; }
.filing-note,
.fundamental-notes p,
.timeline-item p,
.storyline-context { color: #b5bec5; }

.term { background: #11171b; }
.dossier-verdict { border-color: #51606a; color: var(--muted); }
.dossier-verdict[data-tone="positive"] { border-color: #286c51; background: #10291f; color: #69dea7; }
.dossier-verdict[data-tone="negative"] { border-color: #82423c; background: #2b1715; color: #ff8a7d; }
.dossier-verdict[data-tone="mixed"] { border-color: #78672f; background: #29230f; color: #e6c667; }
.dossier-outcome-table tr.selected-campaign,
.dossier-fundamentals-table tr.selected-campaign,
.timeline-item.selected-campaign > div { background: #172026; }
.timeline-marker { border-left-color: #3d4850; }
.cluster-context { color: #7f8b94; }
.metric-positive { color: #65dca5; }
.metric-negative { color: #ff8172; }
.error-state { color: #ff8172; }

.category-label { border: 1px solid #573127; background: #2c1916; color: #ff876c; }
.category-label[data-category="m_and_a"] { border-color: #284a5d; background: #122631; color: #70c8ef; }
.category-label[data-category="divestiture"] { border-color: #28564b; background: #112a24; color: #6ddbb8; }
.category-label[data-category="strategic_review"] { border-color: #454376; background: #201f3b; color: #a6a5ff; }
.category-label[data-category="guidance_outlook"] { border-color: #71602b; background: #28220e; color: #e6c667; }
.category-label[data-category="tender_offer"] { border-color: #71334b; background: #2c1720; color: #f294b5; }
.category-label[data-category="insolvency"] { border-color: #6f3838; background: #2a1718; color: #ef8d8d; }
.category-label[data-category="liquidation"] { border-color: #4c555c; background: #20262a; color: #b9c2c8; }
.category-label[data-category="capital_return"] { border-color: #296348; background: #10281d; color: #66d99d; }
.category-label[data-category="rights_issue"] { border-color: #285a68; background: #112a31; color: #72d0e5; }
.category-label[data-category="restructuring"] { border-color: #744631; background: #2c1c14; color: #efa078; }

/* Landing page */
.landing-page {
  margin-top: -22px;
}

.landing-hero {
  position: relative;
  min-height: min(700px, calc(100svh - 82px));
  padding: 78px 0 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-right: 1px solid rgba(88, 189, 233, 0.08);
  border-left: 1px solid rgba(255, 107, 74, 0.08);
  box-shadow: inset 330px 0 0 rgba(255, 255, 255, 0.008), inset -330px 0 0 rgba(255, 255, 255, 0.008);
}

.hero-scanlines::before,
.hero-scanlines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(147, 160, 170, 0.08);
}

.hero-scanlines::before { top: 34%; }
.hero-scanlines::after { top: 68%; }

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--signal);
}

.hero-copy h1 {
  max-width: 820px;
  margin-top: 20px;
  font-size: 64px;
  font-weight: 660;
  line-height: 1.02;
}

.hero-lede {
  max-width: 790px;
  margin: 24px 0 0;
  color: #b6c0c7;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 31px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action,
.text-action {
  min-height: 43px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.primary-action {
  padding: 0 17px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b0e11;
}

.primary-action span,
.text-action span { margin-left: 9px; font-size: 14px; }

.secondary-action {
  padding: 0 17px;
  border: 1px solid #53616b;
  background: transparent;
  color: var(--ink);
}

.primary-action:hover { background: #ff8166; }
.secondary-action:hover { border-color: var(--ink); background: var(--paper-deep); }

.hero-metrics {
  position: relative;
  z-index: 1;
  margin-top: 54px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero-metrics > div {
  min-height: 92px;
  padding: 18px 18px 15px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-metrics > div:not(:first-child) { padding-left: 18px; }
.hero-metrics > div:last-child { border-right: 0; }
.hero-metrics strong { font-family: "Cascadia Code", Consolas, monospace; font-size: 25px; }
.hero-metrics span { color: var(--muted); font-size: 9px; font-weight: 700; }

.landing-signal-strip {
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.signal-strip-heading {
  min-height: 28px;
  border-bottom: 1px solid #4b565f;
  color: var(--muted);
  display: flex;
  align-items: start;
  justify-content: space-between;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
}

.signal-strip-heading span:first-child { color: var(--signal); font-family: inherit; font-weight: 700; }
.landing-live-list { min-height: 92px; }

.landing-signal {
  width: 100%;
  min-height: 43px;
  padding: 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: 58px 68px minmax(160px, 0.75fr) minmax(280px, 2fr) 145px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.landing-signal:hover { background: var(--paper-deep); }
.landing-signal-time,
.landing-signal-ticker,
.landing-signal-category { font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; }
.landing-signal-ticker { color: var(--signal); font-weight: 700; }
.landing-signal-company,
.landing-signal-headline { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.landing-signal-company { color: var(--blue); }
.landing-signal-category { color: var(--accent); text-align: right; }
.landing-signal-loading { padding: 28px 0; color: var(--muted); font-size: 11px; }

.landing-band {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.band-heading { max-width: 760px; }
.band-heading.compact { max-width: 660px; }
.band-heading h2,
.research-home-copy h2 {
  margin: 8px 0 0;
  font-size: 34px;
  font-weight: 620;
  line-height: 1.18;
}
.band-heading > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.capability-grid {
  margin-top: 48px;
  border-top: 1px solid #4b565f;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.capability-grid article {
  min-height: 220px;
  padding: 24px 24px 24px 0;
  border-right: 1px solid var(--line);
}
.capability-grid article:not(:first-child) { padding-left: 24px; }
.capability-grid article:last-child { border-right: 0; }
.capability-index { color: var(--accent); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; }
.capability-grid h3 { margin: 54px 0 12px; font-size: 17px; }
.capability-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.taxonomy-list {
  margin-top: 42px;
  border-top: 1px solid #4b565f;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.taxonomy-list span {
  min-height: 48px;
  padding: 0 14px 0 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #bec6cb;
  display: flex;
  align-items: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
}
.taxonomy-list span:nth-child(3n + 2),
.taxonomy-list span:nth-child(3n + 3) { padding-left: 14px; }
.taxonomy-list span:nth-child(3n) { border-right: 0; }

.research-band-home {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  gap: 72px;
}
.research-home-copy p:not(.eyebrow) { max-width: 680px; margin: 22px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.text-action { margin-top: 28px; padding: 0; border: 0; background: transparent; color: var(--accent); }
.text-action:hover { color: #ff947e; }
.research-home-methods { margin: 0; border-top: 1px solid #4b565f; }
.research-home-methods div { min-height: 72px; padding: 15px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 100px 1fr; gap: 18px; }
.research-home-methods dt { color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; }
.research-home-methods dd { margin: 0; color: #bec6cb; font-size: 12px; line-height: 1.5; }

.landing-cta {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.landing-cta p { margin: 0; font-size: 21px; font-weight: 550; }

@media (max-width: 900px) {
  .hero-copy h1 { font-size: 52px; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .capability-grid article:nth-child(2) { border-right: 0; }
  .capability-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .research-band-home { grid-template-columns: 1fr; gap: 44px; }
  .landing-signal { grid-template-columns: 52px 62px minmax(130px, 0.8fr) minmax(220px, 1.7fr); }
  .landing-signal-category { display: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 0 12px; }
  .brand { max-width: none; white-space: nowrap; font-size: 10px; line-height: 1; }
  .site-header nav { gap: 5px; }
  .site-header .nav-tab { padding: 0 3px; font-size: 8px; }
  main { width: calc(100% - 28px); }
  .landing-page { margin-top: -14px; }
  .landing-hero { min-height: calc(100svh - 72px); padding-top: 48px; }
  .hero-copy h1 { margin-top: 16px; font-size: 42px; line-height: 1.04; }
  .hero-lede { margin-top: 18px; font-size: 15px; line-height: 1.55; }
  .hero-actions { margin-top: 24px; }
  .primary-action,
  .secondary-action { min-height: 40px; }
  .hero-metrics { margin-top: 34px; grid-template-columns: 1fr 1fr; }
  .hero-metrics > div { min-height: 74px; padding: 13px 12px 12px 0; }
  .hero-metrics > div:nth-child(2) { border-right: 0; }
  .hero-metrics > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .hero-metrics > div:nth-child(3) { padding-left: 0; }
  .hero-metrics strong { font-size: 19px; }
  .landing-signal-strip { margin-top: 22px; }
  .landing-signal { min-height: 52px; grid-template-columns: 44px 48px minmax(0, 1fr); grid-template-rows: 20px 20px; gap: 0 7px; }
  .landing-signal-company { grid-column: 3; }
  .landing-signal-headline { grid-column: 2 / 4; grid-row: 2; font-size: 10px; }
  .landing-signal-category { display: none; }
  .landing-live-list .landing-signal:nth-child(n + 3) { display: none; }
  .landing-band { padding: 58px 0; }
  .band-heading h2,
  .research-home-copy h2 { font-size: 28px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-grid article,
  .capability-grid article:not(:first-child) { min-height: 154px; padding: 20px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .capability-grid h3 { margin-top: 28px; }
  .taxonomy-list { grid-template-columns: 1fr 1fr; }
  .taxonomy-list span,
  .taxonomy-list span:nth-child(3n + 2),
  .taxonomy-list span:nth-child(3n + 3) { padding: 0 9px; border-right: 1px solid var(--line); }
  .taxonomy-list span:nth-child(even) { border-right: 0; }
  .research-home-methods div { grid-template-columns: 78px 1fr; }
  .landing-cta { min-height: 210px; align-items: flex-start; flex-direction: column; justify-content: center; }
  .landing-cta p { font-size: 18px; }
}

