/* Chase - KOL Tracker — website styles
   Identity: dark-only field, one saturated accent reserved for positive value and
   the primary action, shadow-free surface stepping with hairlines, filled-chip
   selection, display-numeral + muted-unit pairing, tabular figures.
   Tokens mirror docs/ui-design-spec.md §6 (frozen identity). */

:root {
  --screen: #070e17;
  --surface: #0e1a28;
  --input: #152438;
  --active: #1b2e45;
  --border: #24384e;
  --border-subtle: #16273a;
  --text: #f1f6fa;
  --text-2: #a6bacc;
  --text-3: #7b91a5;
  --accent: #3fe0b0;
  --on-accent: #04140f;
  --coral: #ff7a6a;
  --tabbar: #0a1523;

  --radius-card: 16px;
  --radius-control: 10px;
  --radius-pill: 999px;

  --maxw: 1120px;
  --edge: 20px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--screen);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-control) 0;
  font-weight: 600;
}

.skip:focus {
  left: 0;
}

/* ---------- micro type ---------- */

.eyebrow,
.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-2);
}

.dim {
  color: var(--text-3);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Opaque bar: the identity has no glass, no blur and no shadows. */
  background: var(--screen);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 224, 176, 0.16);
  flex: none;
}

.brand-text {
  font-size: 14px;
}

.brand-text small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.navlinks a {
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-2);
}

.navlinks a:hover {
  color: var(--text);
  background: var(--input);
}

.navlinks a[aria-current="page"] {
  color: var(--text);
  background: var(--input);
}

.nav-download {
  background: var(--accent);
  color: var(--on-accent) !important;
  font-weight: 650;
  padding: 9px 16px !important;
}

.nav-download:hover {
  filter: brightness(1.06);
  background: var(--accent) !important;
  color: var(--on-accent) !important;
}

.nav-x {
  border: 1px solid var(--border);
  color: var(--text) !important;
}

/* ---------- hero ---------- */

.hero {
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 56px 48px;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(34px, 6.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 16px 0 0;
  max-width: 15ch;
}

.hero-lede {
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--text-2);
  max-width: 46ch;
  margin: 22px 0 0;
}

.hero-sub {
  color: var(--text-3);
  max-width: 46ch;
  margin: 12px 0 0;
  font-size: 15px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 650;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  color: var(--on-accent);
  filter: brightness(1.06);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--input);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--active);
}

.btn[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.85;
}

.hero-meta {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-3);
  max-width: 52ch;
}

.hero-meta strong {
  color: var(--text-2);
  font-weight: 600;
}

/* ---------- specimen tape ---------- */

.specimen {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.specimen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--tabbar);
}

.specimen-head .title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--input);
  white-space: nowrap;
}

.tape {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tape li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
}

.tape li:first-child {
  border-top: 0;
}

.badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--active);
  border: 1px solid var(--border);
}

.tape .row-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tape .row-meta {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.tape .row-trader {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 7px;
}

.avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  background: var(--active);
  border: 1px solid var(--border);
  color: var(--text);
  flex: none;
}

.side {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 2px;
}

.side.buy {
  color: var(--accent);
}

.side.sell {
  color: var(--coral);
}

.specimen-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-3);
  background: var(--tabbar);
}

/* ---------- sections ---------- */

section {
  padding-block: 64px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 750;
  margin: 0;
  max-width: 22ch;
}

.section-head p {
  margin: 0;
  color: var(--text-2);
  max-width: 62ch;
  font-size: 15px;
}

.section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

/* tab cards */

.tabs-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-card .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

.tab-card h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.tab-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  white-space: nowrap;
}

/* screens */

.screens {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shot-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 8px;
  overflow: hidden;
}

.shot-frame img {
  width: 100%;
  border-radius: 10px;
}

.shot figcaption {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

.shot figcaption b {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

/* limits */

.limits {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.limit {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  background: var(--screen);
}

.limit h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.limit p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

/* download panel */

.download-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 26px;
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.download-panel h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.download-panel p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14px;
  max-width: 56ch;
}

.dl-facts {
  display: grid;
  gap: 10px;
  font-size: 13px;
  margin: 0;
}

.dl-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.dl-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dl-facts dt {
  color: var(--text-3);
}

.dl-facts dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  color: var(--text-2);
  background: var(--input);
}

.status-pill.warn {
  color: #f2c466;
  border-color: rgba(242, 196, 102, 0.35);
  background: rgba(242, 196, 102, 0.1);
}

/* ---------- footer ---------- */

.footer {
  padding-block: 40px 48px;
  background: var(--screen);
}

.footer-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.footer h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
}

.footer p {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
  max-width: 46ch;
  line-height: 1.6;
}

.fineprint {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}

.fineprint a {
  color: var(--text-2);
}

.bsa-link {
  color: var(--text-2);
  font-weight: 600;
}

/* ---------- legal pages ---------- */

.legal-hero {
  padding-block: 44px 26px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4.6vw, 42px);
  letter-spacing: -0.03em;
  font-weight: 780;
  line-height: 1.05;
}

.legal-meta {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.legal-layout {
  display: grid;
  gap: 34px;
  padding-block: 34px 64px;
  align-items: start;
}

.legal-toc {
  display: grid;
  gap: 2px;
  font-size: 13px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 14px;
}

.legal-toc a {
  color: var(--text-2);
  padding: 3px 0;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-body article {
  max-width: 68ch;
}

.legal-body h2 {
  font-size: 17px;
  letter-spacing: -0.015em;
  margin: 34px 0 10px;
  font-weight: 700;
  scroll-margin-top: 90px;
}

.legal-body h2:first-of-type {
  margin-top: 0;
}

.legal-body p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 15px;
}

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 15px;
}

.legal-body li {
  margin-bottom: 7px;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-control);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 26px;
}

/* ---------- responsive ---------- */

@media (min-width: 860px) {
  :root {
    --edge: 32px;
  }

  .hero {
    padding-block: 76px 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 52px;
    align-items: start;
  }

  .legal-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 48px;
  }

  .legal-toc {
    position: sticky;
    top: 88px;
  }

  .download-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
    padding: 32px;
  }
}

@media (min-width: 1080px) {
  .hero h1 {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
