:root {
  --ink: #171717;
  --muted: #666666;
  --brand: #f56b29;
  --brand-2: #c84f18;
  --accent: #f56b29;
  --gold: #f56b29;
  --paper: #f5f5f5;
  --line: #dedede;
  --white: #ffffff;
  --good: #0b8f62;
  --bad: #b83b3b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 20px 48px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  padding: 28px 0 18px;
}

.brand-logo {
  display: block;
  height: auto;
  margin-bottom: 28px;
  max-width: 340px;
  width: min(100%, 340px);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  color: var(--brand);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  max-width: 760px;
}

h2 {
  color: var(--brand);
  font-size: 22px;
}

.market-insight {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  margin: 18px 0 0;
  max-width: 680px;
}

.hero-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 6px 0 0;
  max-width: 680px;
}

.status-card,
.panel,
.toolbar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.status-card {
  align-items: center;
  display: flex;
  gap: 14px;
  padding: 18px;
}

.status-card strong,
.status-card span {
  display: block;
}

.status-card span:last-child {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.status-dot {
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(245, 107, 41, 0.16);
  display: block;
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

.status-dot.changed {
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(11, 143, 98, 0.14);
}

.status-dot.error {
  background: var(--bad);
  box-shadow: 0 0 0 8px rgba(184, 59, 59, 0.14);
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  padding: 12px;
}

button,
.button-link {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  border-color: var(--accent);
}

button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.weekly-panel {
  margin-bottom: 18px;
}

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric > span:first-child {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.metric strong {
  color: var(--brand);
  display: block;
  font-size: 26px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric .trend-chart {
  margin-top: 10px;
  max-width: 100%;
  width: 100%;
}

.metric small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

.metric small.positive {
  color: var(--good);
}

.metric small.negative {
  color: var(--bad);
}

.workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 330px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.panel-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.badge {
  background: #fff0e8;
  border-radius: 8px;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

th {
  background: var(--brand);
  color: var(--white);
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

td {
  color: var(--ink);
  font-weight: 650;
}

.trend-chart {
  display: block;
  height: 24px;
  width: 76px;
}

.sparkline {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.sparkline polyline {
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.sparkline.positive polyline {
  stroke: var(--good);
}

.sparkline.negative polyline {
  stroke: var(--bad);
}

.trend-empty {
  color: var(--muted);
  font-weight: 500;
}

.positive {
  color: var(--good);
}

.negative {
  color: var(--bad);
}

.monitor-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.timeline {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  margin: 24px 0;
}

.timeline div {
  background: #e3e3e3;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.timeline i {
  background: var(--brand);
  display: block;
  height: 100%;
  width: 60%;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  color: var(--ink);
  font-weight: 700;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

@media (max-width: 920px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 22px 12px 36px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .toolbar > * {
    width: 100%;
  }
}
