:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
  color: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0d1117;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #263140;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.site-nav a,
.text-link,
.trust-strip a {
  color: #79d2c0;
  text-decoration: none;
  font-weight: 700;
}

.site-nav a {
  border: 1px solid #263140;
  border-radius: 6px;
  padding: 8px 10px;
  color: #dbe4ef;
  background: #151b23;
  font-size: 13px;
}

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

.trust-strip article,
.method-band,
.content-card {
  background: #151b23;
  border: 1px solid #263140;
  border-radius: 8px;
}

.trust-strip article {
  min-height: 132px;
  padding: 18px;
}

.trust-strip span,
.trust-strip em {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  font-style: normal;
}

.trust-strip strong {
  display: block;
  margin: 10px 0;
  font-size: 24px;
}

.method-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 24px;
}

.method-band p {
  margin: 8px 0 0;
  color: #dbe4ef;
}

.daily-brief {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  background: #101722;
  border: 1px solid #35506a;
  border-radius: 8px;
}

.daily-brief span {
  display: block;
  color: #79d2c0;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.daily-brief strong {
  display: block;
  font-size: 22px;
}

.daily-brief p {
  margin: 8px 0 0;
  color: #b9c4d1;
  line-height: 1.5;
}

.brief-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.brief-actions a {
  color: #eef2f7;
  border: 1px solid #3b4758;
  border-radius: 6px;
  padding: 9px 11px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.content-page .topbar {
  margin-bottom: 24px;
}

.content-card {
  padding: 20px;
  margin-bottom: 14px;
}

.content-card h2 {
  margin-bottom: 12px;
}

.content-card p,
.content-card li {
  color: #dbe4ef;
  line-height: 1.65;
}

.formula {
  font-size: 20px;
  font-weight: 800;
  color: #eef2f7;
}

.report-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.report-list span {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  margin-top: 4px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #79d2c0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
}

.tagline {
  margin: 10px 0 0;
  color: #b9c4d1;
  font-size: 15px;
}

h2 {
  font-size: 20px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 132px;
  justify-content: flex-end;
  color: #b9c4d1;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f2b84b;
}

.dot.ok {
  background: #39d98a;
}

.dot.err {
  background: #ff6170;
}

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

.metrics article,
.board {
  background: #151b23;
  border: 1px solid #263140;
  border-radius: 8px;
}

.metrics article {
  min-height: 106px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metrics span {
  color: #93a4b7;
  font-size: 13px;
}

.metrics strong {
  font-size: 28px;
}

.board {
  overflow: hidden;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  margin-top: 24px;
}

.ops-panel {
  background: #151b23;
  border: 1px solid #263140;
  border-radius: 8px;
  overflow: hidden;
}

.compact {
  padding: 16px 18px;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #263140;
}

.ops-metrics div,
.best-route div {
  background: #151b23;
  padding: 16px;
}

.ops-metrics span,
.best-route span {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  margin-bottom: 8px;
}

.ops-metrics strong,
.best-route strong {
  font-size: 22px;
}

.best-route,
.chain-breakdown,
.replay-panel,
.event-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #263140;
  color: #dbe4ef;
}

.chain-breakdown div,
.replay-panel div,
.event-panel div {
  background: #151b23;
  padding: 16px;
}

.chain-breakdown em,
.replay-panel em,
.event-panel em {
  display: block;
  margin-top: 6px;
  color: #93a4b7;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  white-space: normal;
}

.replay-panel span,
.event-panel span {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  margin-bottom: 8px;
}

.replay-panel strong,
.event-panel strong {
  display: block;
  font-size: 18px;
}

.recommendations {
  padding: 16px 18px;
}

.recommendations p {
  margin: 0 0 12px;
  color: #dbe4ef;
  line-height: 1.5;
}

.recommendations p:last-child {
  margin-bottom: 0;
}

.market-pulse {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1px;
  background: #263140;
}

.sentiment,
.trend-list,
.traffic-panel div {
  background: #151b23;
  padding: 16px;
}

.sentiment span,
.traffic-panel span {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  margin-bottom: 8px;
}

.sentiment strong,
.traffic-panel strong {
  display: block;
  font-size: 26px;
}

.sentiment em {
  color: #79d2c0;
  font-style: normal;
  font-size: 12px;
}

.trend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.trend-list span {
  border: 1px solid #3b4758;
  border-radius: 999px;
  padding: 7px 10px;
  color: #dbe4ef;
  font-size: 12px;
  font-weight: 700;
}

.trend-list em {
  color: #93a4b7;
  font-style: normal;
}

.traffic-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #263140;
}

.strategy-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.3fr) minmax(260px, 0.9fr);
  gap: 1px;
  background: #263140;
}

.strategy-verdict,
.cost-stack,
.strategy-playbook {
  background: #151b23;
  padding: 18px;
}

.strategy-verdict span,
.cost-stack span {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  margin-bottom: 8px;
}

.strategy-verdict strong {
  display: block;
  font-size: 26px;
  margin-bottom: 12px;
}

.strategy-verdict p,
.strategy-playbook p {
  margin: 0 0 10px;
  color: #dbe4ef;
  line-height: 1.5;
}

.strategy-playbook p:last-child {
  margin-bottom: 0;
}

.cost-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: #263140;
}

.cost-stack div {
  min-height: 84px;
  background: #151b23;
  padding: 16px;
}

.cost-stack strong {
  display: block;
  font-size: 16px;
  white-space: normal;
}

.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid #263140;
}

.subtle {
  margin: 6px 0 0;
  color: #93a4b7;
  font-size: 13px;
}

button {
  border: 1px solid #3b4758;
  border-radius: 6px;
  background: #1f6feb;
  color: white;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

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

.compact-table {
  min-width: 1120px;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #263140;
  white-space: nowrap;
}

th {
  color: #93a4b7;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  color: #dbe4ef;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.watch {
  color: #062b19;
  background: #39d98a;
}

.pill.idle {
  color: #d9e2ef;
  background: #303b4c;
}

.source {
  display: block;
  color: #93a4b7;
  font-size: 12px;
  line-height: 1.45;
}

.risk {
  display: inline-flex;
  min-width: 36px;
  justify-content: center;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.risk.high {
  color: #21070a;
  background: #ff6170;
}

.risk.medium {
  color: #10220d;
  background: #9be36d;
}

.risk.low {
  color: #2c2100;
  background: #f2b84b;
}

.risk.none {
  color: #d9e2ef;
  background: #303b4c;
}

.positive {
  color: #39d98a;
  font-weight: 800;
}

.negative {
  color: #ff9c66;
  font-weight: 800;
}

.alert {
  margin: 0;
  padding: 12px 18px;
  color: #ffd8de;
  background: #38151c;
  border-bottom: 1px solid #6e2a36;
  font-size: 13px;
}

.hidden {
  display: none;
}

.empty {
  color: #93a4b7;
  text-align: center;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding: 22px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status {
    justify-content: flex-start;
  }

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

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

  .method-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-brief {
    align-items: flex-start;
    flex-direction: column;
  }

  .brief-actions {
    flex-wrap: wrap;
  }

  .ops-grid,
  .ops-metrics,
  .best-route,
  .market-pulse,
  .traffic-panel,
  .chain-breakdown,
  .replay-panel,
  .event-panel,
  .strategy-grid,
  .cost-stack {
    grid-template-columns: 1fr;
  }
}
