:root {
  --bg: #f3f5f3;
  --surface: #ffffff;
  --surface-muted: #e9eeeb;
  --ink: #17201c;
  --muted: #69736e;
  --line: #d7ded9;
  --green: #166b55;
  --green-soft: #dcebe5;
  --gold: #d59b2d;
  --gold-soft: #f4e9cf;
  --coral: #d0644b;
  --coral-soft: #f5dfda;
  --blue: #287f9b;
  --steel: #485d70;
  --dark: #18221e;
  --radius: 6px;
  --shadow: 0 14px 32px rgba(25, 39, 32, 0.07);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #eef2ef;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green);
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #45504a;
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover,
.nav a.is-active {
  background: var(--surface);
  color: var(--green);
}

.sidebar-status {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
}

.sidebar-status strong,
.sidebar-status small,
.status-line {
  display: block;
}

.status-line {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.status-line i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}

.sidebar-status strong {
  margin-top: 10px;
  font-size: 14px;
}

.sidebar-status small {
  margin-top: 3px;
  color: var(--muted);
}

main {
  margin-left: 248px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 243, 0.95);
  backdrop-filter: blur(12px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 750;
}

.button.primary {
  background: var(--green);
  color: white;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.section {
  padding: 54px clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
}

.overview-section {
  padding-top: 28px;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid #bad2c8;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: #244b3d;
  font-size: 13px;
}

.status-banner > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.as-of {
  white-space: nowrap;
  color: #48665b;
  font-size: 12px;
}

.paper-trial-band {
  margin-top: 18px;
  padding: 24px 0 0;
  border-top: 3px solid var(--green);
}

.paper-trial-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.paper-trial-header h2 {
  margin: 0;
  font-size: 28px;
}

.paper-trial-header p:not(.section-kicker) {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.paper-trial-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 20px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.paper-trial-kpis div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.paper-trial-kpis div:last-child {
  border-right: 0;
}

.paper-trial-kpis dt,
.paper-trial-kpis dd {
  margin: 0;
}

.paper-trial-kpis dt {
  color: var(--muted);
  font-size: 11px;
}

.paper-trial-kpis dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 800;
}

.paper-trial-table {
  min-width: 760px;
}

.paper-trial-table th {
  top: 0;
}

.research-ops-band {
  margin: 28px 0 4px;
  padding: 24px 0 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-ops-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.research-ops-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.judgment-band {
  margin: 28px 0 4px;
  padding: 24px 0 8px;
  border-top: 3px solid #d59b2d;
  border-bottom: 1px solid var(--line);
}

.judgment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.judgment-grid > div {
  min-width: 0;
}

.judgment-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 10px;
}

.judgment-subhead h3,
.judgment-subhead span {
  margin: 0;
}

.judgment-subhead h3 {
  font-size: 17px;
}

.judgment-subhead span {
  color: var(--muted);
  font-size: 11px;
}

.judgment-table {
  min-width: 610px;
}

.judgment-table .tag {
  white-space: normal;
  line-height: 1.35;
}

.judgment-table .positive {
  color: var(--green);
  font-weight: 800;
}

.judgment-table .negative {
  color: var(--red);
  font-weight: 800;
}

#historical-decisions {
  scroll-margin-top: 104px;
}

.historical-decision-table th {
  position: static;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading > p:not(.section-kicker),
.split-heading > div > p:not(.section-kicker) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.split-heading {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
}

.split-heading > div:first-child {
  max-width: 760px;
}

.source-badge {
  min-width: 245px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: var(--surface);
}

.source-badge span,
.source-badge strong {
  display: block;
}

.source-badge span {
  color: var(--muted);
  font-size: 11px;
}

.source-badge strong {
  margin-top: 4px;
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 18px;
}

.metric-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-card strong {
  display: block;
  margin: 12px 0 5px;
  font-size: 27px;
  line-height: 1;
}

.metric-card.accent strong {
  color: var(--coral);
}

.overview-grid,
.simulation-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.panel {
  min-height: 380px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-heading span,
.panel-heading strong {
  display: block;
}

.panel-heading span {
  color: var(--muted);
  font-size: 11px;
}

.panel-heading strong {
  margin-top: 4px;
  font-size: 17px;
}

.panel-heading small {
  color: var(--muted);
  white-space: nowrap;
}

.source-packet-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 28px;
  align-items: center;
  margin-top: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#independentD01SseForwardEvents,
#independentD01SzseHkexForwardEvents,
#independentD03MultiexchangeSettlementGate,
#independentD03PostcloseResponseCandidates,
#independentD03HkexDelayedCompletion {
  grid-template-columns: minmax(360px, 1.15fr) minmax(420px, 1fr);
  align-items: start;
}

#independentD01SseForwardEvents dl,
#independentD01SzseHkexForwardEvents dl,
#independentD03MultiexchangeSettlementGate dl,
#independentD03PostcloseResponseCandidates dl,
#independentD03HkexDelayedCompletion dl {
  width: 100%;
}

.source-packet-strip span,
.source-packet-strip dt {
  color: var(--muted);
  font-size: 11px;
}

.source-packet-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.source-packet-strip p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.source-packet-strip > * {
  min-width: 0;
}

.source-packet-strip dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
  margin: 0;
}

.source-packet-strip dl div {
  min-width: 82px;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
}

.source-packet-strip dt,
.source-packet-strip dd {
  margin: 0;
}

.source-packet-strip dd {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.group-bars {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 54px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.bar-track {
  height: 11px;
  overflow: hidden;
  border-radius: 2px;
  background: #edf0ee;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.signal-visual {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 24px;
}

.donut {
  display: grid;
  width: 176px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 100%);
}

.donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
}

.donut > div {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.donut strong,
.donut span {
  display: block;
}

.donut strong {
  font-size: 23px;
}

.donut span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.lane-legend {
  display: grid;
  gap: 12px;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.legend-row i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-row span {
  color: #4e5b54;
}

.legend-row strong {
  font-variant-numeric: tabular-nums;
}

.search-box {
  display: grid;
  gap: 5px;
  min-width: min(300px, 100%);
}

.search-box span {
  color: var(--muted);
  font-size: 11px;
}

.search-box input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.search-box input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 107, 85, 0.11);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  margin-bottom: 14px;
}

.segment {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #526059;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segment.is-active {
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 1px 3px rgba(20, 36, 28, 0.1);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5e9e6;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

th {
  position: sticky;
  top: 85px;
  z-index: 2;
  background: #f6f8f6;
  color: #59645e;
  font-weight: 750;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f9faf9;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.company-cell strong,
.company-cell small {
  display: block;
}

.company-cell small {
  margin-top: 3px;
  color: var(--muted);
}

.role-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.tag.review {
  background: var(--green-soft);
  color: var(--green);
}

.tag.wait {
  background: var(--coral-soft);
  color: #954331;
}

.tag.data {
  background: var(--gold-soft);
  color: #7e5b16;
}

.tag.hold {
  background: #e4e9ee;
  color: var(--steel);
}

.band-section {
  background: #e9eeeb;
}

.logic-flow {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 0 22px;
}

.logic-flow > div {
  min-width: 130px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.logic-flow span,
.logic-flow strong,
.logic-flow small {
  display: block;
}

.logic-flow span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.logic-flow strong {
  margin-top: 12px;
  font-size: 14px;
}

.logic-flow small {
  margin-top: 5px;
  color: var(--muted);
}

.logic-flow > i {
  color: #7f8c85;
  font-style: normal;
}

.lane-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.lane-card {
  min-height: 154px;
  padding: 15px;
  border-top: 4px solid var(--lane-color);
  border-radius: var(--radius);
  background: var(--surface);
}

.lane-card span,
.lane-card strong,
.lane-card small {
  display: block;
}

.lane-card span {
  color: var(--muted);
  font-size: 11px;
}

.lane-card strong {
  margin-top: 11px;
  font-size: 24px;
}

.lane-card p {
  margin: 10px 0 0;
  color: #56625c;
  font-size: 12px;
  line-height: 1.6;
}

.driver-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.driver-card {
  min-height: 222px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.driver-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.driver-card h3 {
  margin: 18px 0 10px;
  font-size: 18px;
}

.driver-card p {
  min-height: 74px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.driver-card strong {
  display: block;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.driver-card.coal { --accent: var(--steel); }
.driver-card.aluminum { --accent: var(--gold); }
.driver-card.power { --accent: var(--coral); }
.driver-card.oil { --accent: var(--blue); }

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 12px;
}

.subsection-heading span,
.subsection-heading strong {
  display: block;
}

.subsection-heading span {
  color: var(--muted);
  font-size: 11px;
}

.subsection-heading strong {
  margin-top: 4px;
  font-size: 17px;
}

.small-cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.small-cap-card {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.small-cap-card h3 {
  margin: 0;
  font-size: 16px;
}

.small-cap-card .module {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
}

.small-cap-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.small-cap-card p + p {
  margin-top: 7px;
}

.dark-section {
  background: var(--dark);
  color: #eff5f1;
}

.dark-section .section-kicker {
  color: #7fd0b1;
}

.dark-section .section-heading > p:not(.section-kicker),
.dark-section .split-heading > div > p:not(.section-kicker) {
  color: #aab7b0;
}

.lock-badge {
  padding: 8px 10px;
  border: 1px solid #56665e;
  border-radius: 3px;
  color: #f0c36a;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.readiness-panel,
.performance-panel {
  min-height: 330px;
  padding: 20px;
  border: 1px solid #35433c;
  border-radius: var(--radius);
  background: #202c27;
}

.readiness-score span,
.readiness-score strong,
.readiness-score small {
  display: block;
}

.readiness-score span,
.readiness-score small {
  color: #9caaa3;
  font-size: 11px;
}

.readiness-score strong {
  margin: 10px 0 4px;
  font-size: 38px;
}

.readiness-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.readiness-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid #35433c;
  color: #c7d1cc;
  font-size: 12px;
}

.readiness-list strong {
  color: #89958f;
}

.readiness-list .ok {
  color: #7fd0b1;
}

.readiness-list .progress {
  color: #f0c36a;
}

.panel-heading.inverse span,
.panel-heading.inverse small {
  color: #9caaa3;
}

.empty-chart {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid #35433c;
  background: #1a2420;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#2b3933 1px, transparent 1px), linear-gradient(90deg, #2b3933 1px, transparent 1px);
  background-size: 100% 44px, 72px 100%;
}

.pending-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52%;
  height: 2px;
  border-top: 2px dashed #62736a;
}

.empty-chart > span {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 7px 10px;
  transform: translate(-50%, -50%);
  background: #1a2420;
  color: #9caaa3;
  white-space: nowrap;
  font-size: 11px;
}

.benchmark-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
}

.benchmark-row span {
  color: #9caaa3;
}

.benchmark-row strong {
  color: #c7d1cc;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.evidence-card {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.evidence-card span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.evidence-card h3 {
  margin: 22px 0 10px;
  font-size: 17px;
}

.evidence-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.evidence-card.accepted { --accent: var(--green); }
.evidence-card.excluded { --accent: var(--coral); }
.evidence-card.qa { --accent: var(--blue); }

.source-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.source-scale > div {
  min-height: 118px;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.source-scale > div:last-child {
  border-right: 0;
}

.source-scale span,
.source-scale strong,
.source-scale small {
  display: block;
}

.source-scale span {
  color: var(--gold);
  font-size: 20px;
  font-weight: 850;
}

.source-scale strong {
  margin-top: 12px;
  font-size: 12px;
}

.source-scale small {
  margin-top: 5px;
  color: var(--muted);
}

.text-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.roadmap-item {
  min-height: 155px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.roadmap-item .stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roadmap-item .stage span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.roadmap-item .stage b {
  padding: 3px 6px;
  border-radius: 3px;
  background: #e5eae7;
  color: #647069;
  font-size: 10px;
}

.roadmap-item.done .stage b {
  background: var(--green-soft);
  color: var(--green);
}

.roadmap-item.active .stage b {
  background: var(--gold-soft);
  color: #7e5b16;
}

.roadmap-item.locked .stage b {
  background: var(--coral-soft);
  color: #954331;
}

.roadmap-item h3 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.roadmap-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(24px, 4vw, 58px);
  background: #edf1ee;
  color: var(--muted);
  font-size: 11px;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 16px;
}

footer a:hover {
  color: var(--green);
}

@media (max-width: 1180px) {
  #independentD01SseForwardEvents,
  #independentD01SzseHkexForwardEvents,
  #independentD03MultiexchangeSettlementGate,
  #independentD03PostcloseResponseCandidates,
  #independentD03HkexDelayedCompletion {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-grid,
  .simulation-grid {
    grid-template-columns: 1fr;
  }

  .lane-card-grid,
  .driver-grid,
  .roadmap-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logic-flow {
    grid-template-columns: repeat(5, 1fr);
  }

  .logic-flow > i {
    display: none;
  }
}

@media (max-width: 820px) {
  .shell,
  main,
  .topbar,
  .section,
  .split-heading,
  .split-heading > div:first-child,
  .paper-trial-band {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .sidebar {
    position: static;
    width: auto;
    padding: 14px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding-bottom: 12px;
  }

  .nav {
    display: flex;
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .sidebar-status {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .topbar {
    position: static;
    min-height: auto;
    align-items: flex-start;
    padding: 18px 16px;
  }

  .top-actions {
    flex-direction: column;
  }

  .button {
    min-height: 36px;
    padding: 0 11px;
  }

  .section {
    padding: 38px 16px;
  }

  .status-banner,
  .status-banner > div,
  .split-heading,
  .paper-trial-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-badge,
  .search-box {
    width: 100%;
    min-width: 0;
  }

  .section-heading h2,
  .paper-trial-header h2,
  .paper-trial-header p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-trial-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-ops-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-trial-kpis div:nth-child(3) {
    border-right: 0;
  }

  .research-ops-kpis div:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .research-ops-kpis div:nth-child(even) {
    border-right: 0;
  }

  .judgment-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 108px;
  }

  .signal-visual {
    grid-template-columns: 1fr;
  }

  .donut {
    margin: 0 auto;
  }

  .logic-flow {
    grid-template-columns: 1fr 1fr;
  }

  .small-cap-card {
    grid-template-columns: 1fr;
  }

  .source-packet-strip {
    grid-template-columns: 1fr;
  }

  .evidence-grid,
  .source-scale {
    grid-template-columns: 1fr;
  }

  .source-scale > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .source-scale > div:last-child {
    border-bottom: 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .topbar h1 {
    font-size: 19px;
  }

  .top-actions {
    display: none;
  }

  .metric-grid,
  .lane-card-grid,
  .driver-grid,
  .small-cap-grid,
  .roadmap-list,
  .logic-flow {
    grid-template-columns: 1fr;
  }

  .paper-trial-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-trial-kpis div:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .paper-trial-kpis div:nth-child(even) {
    border-right: 0;
  }

  .paper-trial-table {
    min-width: 0;
    table-layout: fixed;
  }

  .paper-trial-table th,
  .paper-trial-table td {
    padding: 10px 7px;
  }

  .paper-trial-table th:nth-child(2),
  .paper-trial-table td:nth-child(2),
  .paper-trial-table th:nth-child(4),
  .paper-trial-table td:nth-child(4) {
    display: none;
  }

  .paper-trial-table th:nth-child(1) {
    width: 36%;
  }

  .paper-trial-table th:nth-child(3) {
    width: 22%;
  }

  .paper-trial-table th:nth-child(5) {
    width: 42%;
  }

  .paper-trial-table .tag {
    min-height: 0;
    padding: 5px 6px;
    line-height: 1.25;
    white-space: normal;
  }

  .metric-card {
    min-height: 94px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .panel {
    min-height: 0;
    padding: 16px;
  }

  .bar-row {
    grid-template-columns: 82px 1fr 48px;
  }

  .segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .source-packet-strip dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .source-packet-strip dl div {
    min-width: 0;
  }

  .source-packet-strip dd {
    overflow-wrap: anywhere;
    font-size: 18px;
  }

  .empty-chart > span {
    width: 80%;
    white-space: normal;
    text-align: center;
  }
}
