:root {
  --bg: #f5f7f4;
  --panel: #ffffff;
  --ink: #18201d;
  --muted: #64706b;
  --line: #d8ded7;
  --green: #167a5b;
  --blue: #1e5b9a;
  --red: #a53e34;
  --amber: #9a6b17;
  --green-soft: #e0f2e9;
  --blue-soft: #e2ecf7;
  --red-soft: #f4e3e1;
  --amber-soft: #f5ecd9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

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

.daily-topbar,
.summary-band,
.mover-layout,
.toolbar,
.section-head,
.mover-row,
.ticker-cell,
.status-pill {
  display: flex;
  align-items: center;
}

.daily-topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
}

.daily-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-links a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  text-decoration: none;
  color: #34443d;
}

.daily-links a[aria-current="page"] {
  color: #fff;
  background: #1d5f49;
  border-color: #1d5f49;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.summary-item,
.mover-panel,
.toolbar,
.table-section,
.risk-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-item {
  min-height: 92px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.summary-item span,
.section-head span,
.market-note,
th,
.muted {
  color: var(--muted);
}

.summary-item strong {
  font-size: 20px;
  line-height: 1.15;
}

.mover-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mover-panel {
  min-width: 0;
  padding: 14px;
}

.section-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mover-list {
  display: grid;
  gap: 8px;
}

.mover-row {
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #edf1eb;
  border-radius: 6px;
  background: #fbfcfa;
}

.mover-row strong {
  font-size: 14px;
}

.mover-row span {
  white-space: nowrap;
  font-weight: 800;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.neutral {
  color: var(--blue);
}

.toolbar {
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(360px, 100%);
}

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

.search-box input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.table-section {
  overflow: hidden;
}

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

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1eb;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

th {
  background: #fbfcfa;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfcfa;
}

.ticker-cell {
  gap: 10px;
}

.ticker-badge {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf6;
  font-weight: 900;
}

.ticker-meta {
  display: grid;
  gap: 2px;
}

.ticker-meta span {
  color: var(--muted);
  font-size: 12px;
}

.range-bar {
  width: 120px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eee8;
}

.range-bar i {
  display: block;
  height: 100%;
  width: var(--range-width, 0%);
  background: var(--blue);
}

.status-pill {
  justify-content: center;
  min-width: 68px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.up {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.down {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.flat {
  color: var(--blue);
  background: var(--blue-soft);
}

.risk-note {
  margin-top: 14px;
  padding: 14px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 920px) {
  .summary-band,
  .mover-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .daily-shell {
    width: min(100vw - 20px, 560px);
    padding-top: 16px;
  }

  .daily-topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 24px;
  }

  .summary-band,
  .mover-layout {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 74px;
  }

  .daily-links a {
    flex: 1;
    text-align: center;
  }
}
