:root {
  --bg: #f3f7fb;
  --panel: #ffffff;
  --ink: #0a1729;
  --muted: #587086;
  --line: #d6e2ee;
  --green: #087a60;
  --green-soft: #e9fff7;
  --blue: #1166d8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, #eef7fb 0%, var(--bg) 42%, #fff 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
.history-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 14px 0 44px; }
.history-hero, .summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(18, 44, 72, .08);
}
.history-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #092d4b, #087a60);
}
.history-hero a { color: #dff8ff; font-weight: 900; text-decoration: none; }
.history-hero .hero-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 8px 10px 0;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  color: #083047;
  background: #e8fff7;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.history-hero span, .section-head span, .hero-stats span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.history-hero h1 { margin: 8px 0; font-size: clamp(34px, 5vw, 58px); line-height: .95; }
.history-hero p { max-width: 700px; margin: 0; color: #e8f9ff; font-size: 17px; line-height: 1.4; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 10px; min-width: 500px; }
.hero-stats div { padding: 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(255,255,255,.12); }
.hero-stats strong { display: block; margin-top: 5px; font-size: 24px; }
.summary-panel { margin-top: 14px; padding: 16px; }
.section-head h2 { margin: 4px 0 12px; font-size: 26px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1040px; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: #f8fbfe; }
td { font-size: 14px; font-weight: 800; }
tbody tr.buy { background: var(--green-soft); }
tbody tr.buy td:first-child { border-left: 5px solid var(--green); }
.rank-pill, .state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}
.state-pill { min-width: 86px; }
.contract-symbol { display: block; margin-bottom: 4px; }
.option-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.option-link-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #b8cce0;
  border-radius: 7px;
  background: #f8fbff;
  color: #064e8a;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.option-link-row a:hover { background: #eaf5ff; border-color: #7db3e8; }
.muted { color: var(--muted); }
.up { color: #047857; }
.down { color: #b91c1c; }
@media (max-width: 820px) {
  .history-hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; min-width: 0; }
}
