:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #18202a;
  --muted: #64707d;
  --line: #dbe1e8;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 10px 30px rgba(24, 32, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: #101820;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  min-height: 92px;
  padding: 18px clamp(18px, 4vw, 48px);
}

.eyebrow {
  color: #9ed9d4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

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

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

h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

nav a {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 10px;
  text-decoration: none;
}

nav a[aria-current="page"],
nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

main {
  margin: 0 auto;
  max-width: 1440px;
  padding: 24px clamp(14px, 3vw, 40px) 36px;
}

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

.metric,
.panel,
.ad-slot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric span,
.section-head p,
footer,
.muted {
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 7px;
}

.ad-slot {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  margin: 16px 0;
  min-height: 88px;
}

.ad-slot.tall {
  min-height: 260px;
}

.layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.main-column,
.side-column {
  display: grid;
  gap: 18px;
}

.panel {
  overflow: hidden;
  padding: 18px;
}

.section-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 0 34px 0 10px;
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.ticker {
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.ticker:hover {
  color: var(--accent);
  text-decoration: underline;
}

.company {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
  max-width: 220px;
}

.grade {
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.grade-a {
  background: var(--accent);
}

.grade-b {
  background: var(--accent-2);
}

.grade-c {
  background: var(--warning);
}

.score-bar {
  background: #e8eef4;
  border-radius: 999px;
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  width: 112px;
}

.score-bar span,
.theme-bar-fill {
  background: var(--accent);
  display: block;
  height: 100%;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 220px;
}

.chip {
  background: #e9f5f4;
  border: 1px solid #c7e7e2;
  border-radius: 999px;
  color: #0f5f58;
  display: inline-block;
  font-size: 12px;
  padding: 4px 7px;
}

.risk {
  color: var(--danger);
  font-size: 12px;
  margin-top: 5px;
}

.daily-list {
  display: grid;
  gap: 10px;
}

.daily-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.daily-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mini-metrics {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.theme-bars {
  display: grid;
  gap: 12px;
}

.theme-row {
  display: grid;
  gap: 8px;
}

.theme-label {
  display: flex;
  font-size: 13px;
  justify-content: space-between;
}

.theme-bar-track {
  background: #e8eef4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.mover-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.mover-list li {
  padding-left: 4px;
}

.move-up {
  color: var(--accent);
  font-weight: 700;
}

.content-page {
  max-width: 860px;
}

.button-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 36px;
  padding: 8px 10px;
  text-decoration: none;
}

.button-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.setup-summary {
  display: grid;
  gap: 14px;
}

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

.detail-grid div,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid strong {
  margin-top: 5px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  gap: 10px;
}

.timeline-item > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.price-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 8px;
}

.price-chart svg {
  display: block;
  height: auto;
  width: 100%;
}

.axis {
  stroke: #aeb8c4;
  stroke-width: 1;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.price-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.volume-bars rect {
  fill: #b9d9d5;
}

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

.content-page .panel {
  line-height: 1.65;
}

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 18px clamp(14px, 3vw, 40px);
}

@media (max-width: 980px) {
  .summary-grid,
  .layout {
    grid-template-columns: 1fr;
  }

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

  nav,
  .controls {
    justify-content: flex-start;
  }
}

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

  .summary-grid {
    gap: 8px;
  }

  .metric strong {
    font-size: 22px;
  }

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