@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --navy:       #0D1B2A;
  --navy-card:  #152235;
  --navy-row:   #111e2d;
  --gold:       #C9A84C;
  --gold-dim:   rgba(201,168,76,0.30);
  --gold-mid:   rgba(201,168,76,0.55);
  --text:       #E8E4DC;
  --text-muted: rgba(232,228,220,0.60);
  --text-dim:   rgba(232,228,220,0.40);
  --border:     rgba(232,228,220,0.08);
  --grade-aa:   #1a3a2a; --grade-aa-t: #4ade80;
  --grade-a:    #2a3a1a; --grade-a-t:  #a3e635;
  --grade-bbb:  #3a2a00; --grade-bbb-t:#C9A84C;
  --grade-bb:   #3a1a00; --grade-bb-t: #fb923c;
  --grade-b:    #3a0a0a; --grade-b-t:  #f87171;
  --up:   #4ade80;
  --down: #f87171;
  --steady: rgba(232,228,220,0.45);
}

body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--navy);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px 72px; }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--gold-dim);
}
.site-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { text-decoration: none; }
.brand-sub {
  font-size: 8px; font-weight: 400; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-muted);
  display: block; margin-bottom: 2px;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.brand-name .g { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 10px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: none; padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-cta {
  background: var(--gold); color: var(--navy);
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 7px 18px; border-radius: 3px;
  text-decoration: none;
}
.nav-gold-rule { height: 1px; background: var(--gold-mid); opacity: .4; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 28px 0 20px; border-bottom: 1px solid var(--gold-dim);
}
.page-header-plain { padding: 36px 0 24px; border-bottom: 1px solid var(--gold-dim); }
.brand-line {
  font-size: 10px; font-weight: 400; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 30px; font-weight: 700; color: var(--text);
  line-height: 1.15; letter-spacing: -.01em; margin-bottom: 10px;
}
.page-title-lg { font-size: 34px; max-width: 700px; }
.page-title .g, .page-title-lg .g { color: var(--gold); }
.page-subtitle {
  font-size: 12px; color: var(--text-muted); font-weight: 300;
  line-height: 1.65; max-width: 620px;
}
.page-subtitle-lg { font-size: 14px; max-width: 600px; margin-bottom: 20px; }
.index-meta {
  font-size: 11px; color: var(--text-muted); font-weight: 300;
  margin-top: 8px; letter-spacing: .04em;
}
.index-meta span { color: var(--text); font-weight: 500; }
.classification-stack {
  text-align: right; font-size: 9px; font-weight: 300;
  letter-spacing: .16em; text-transform: uppercase;
  line-height: 1.8; color: var(--text-muted);
}
.classification-stack .g { color: var(--gold); font-weight: 600; }

/* ── RULES ── */
.gold-rule { border: none; border-top: 1px solid var(--gold-mid); margin: 0; }
.section-rule { border: none; border-top: 1px solid var(--gold-dim); margin: 32px 0; }

/* ── DEMO BANNER ── */
.demo-banner {
  margin-top: 24px; padding: 8px 16px;
  background: rgba(201,168,76,.06); border: 1px solid rgba(201,168,76,.20);
  border-radius: 3px; display: flex; align-items: center; gap: 12px;
}
.demo-label {
  font-size: 8px; font-weight: 700; letter-spacing: .20em;
  text-transform: uppercase; color: var(--gold); flex-shrink: 0;
}
.demo-sep { width: 1px; height: 14px; background: var(--gold-dim); flex-shrink: 0; }
.demo-text { font-size: 11px; color: var(--text-muted); font-weight: 300; }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; margin-top: 36px; }
.section-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 3px; flex-shrink: 0;
}
.section-title {
  font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--text);
}
.section-subtitle { margin-left: 12px; font-size: 10px; color: var(--text-muted); font-weight: 300; letter-spacing: .04em; }

/* ── CLARITY NOTE ── */
.clarity-note {
  font-size: 10px; color: var(--text-muted); font-style: italic;
  margin-bottom: 16px; margin-top: -8px; letter-spacing: .02em;
}

/* ── STAT CARDS ── */
.stat-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.stat-card {
  background: var(--navy-card); border: 1px solid var(--gold-dim);
  border-radius: 4px; padding: 18px 16px 16px;
}
.stat-label { font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.stat-value {
  font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700;
  color: var(--text); line-height: 1; margin-bottom: 6px;
}
.stat-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }

/* ── GRADE DIST ── */
.grade-dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.grade-dist-bar-wrap { flex: 1; height: 5px; background: rgba(232,228,220,.08); border-radius: 2px; overflow: hidden; }
.grade-dist-bar { height: 100%; border-radius: 2px; }
.grade-dist-count { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; color: var(--text); min-width: 20px; text-align: right; }

/* ── GRADE BADGES ── */
.gb {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 500;
  padding: 2px 7px; border-radius: 2px; min-width: 36px; letter-spacing: .05em;
}
.gb-aa  { background: var(--grade-aa);  color: var(--grade-aa-t); }
.gb-a   { background: var(--grade-a);   color: var(--grade-a-t); }
.gb-bbb { background: var(--grade-bbb); color: var(--grade-bbb-t); }
.gb-bb  { background: var(--grade-bb);  color: var(--grade-bb-t); }
.gb-b   { background: var(--grade-b);   color: var(--grade-b-t); }

/* ── MOVERS ── */
.movers-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.mover-card {
  background: var(--navy-card); border: 1px solid var(--gold-dim);
  border-radius: 4px; padding: 16px; position: relative;
}
.mover-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; border-radius: 4px 0 0 4px;
}
.mover-card.bad::before  { background: var(--down); }
.mover-card.good::before { background: var(--up); }
.mover-firm { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.3; }
.mover-score-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.mover-score { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.mover-delta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 500; }
.c-up   { color: var(--up); }
.c-down { color: var(--down); }
.c-flat { color: var(--steady); }
.mover-grade-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mover-dir { font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.mover-note { font-size: 10px; color: var(--text-muted); line-height: 1.45; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--gold-dim); border-radius: 4px; }
table.idx { width: 100%; border-collapse: collapse; font-size: 12px; }
.idx thead tr { background: var(--navy-card); border-bottom: 1px solid var(--gold-mid); }
.idx thead th {
  font-size: 8px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted); padding: 12px 14px;
  text-align: left; white-space: nowrap;
}
.idx thead th.r { text-align: right; }
.idx thead th.c { text-align: center; }
.idx tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.idx tbody tr:last-child { border-bottom: none; }
.idx tbody tr:hover { background: rgba(201,168,76,.04); }
.idx tbody tr:nth-child(even) { background: rgba(21,34,53,.5); }
.idx tbody tr:nth-child(even):hover { background: rgba(201,168,76,.04); }
.idx tbody td { padding: 10px 14px; color: var(--text); vertical-align: middle; }
.idx tbody td.r { text-align: right; }
.idx tbody td.c { text-align: center; }
.firm-name { font-weight: 600; font-size: 12px; color: var(--text); border-left: 2px solid transparent; padding-left: 8px; margin-left: -8px; display: inline-block; }
.fn-aa  { border-left-color: var(--grade-aa-t)  !important; }
.fn-a   { border-left-color: var(--grade-a-t)   !important; }
.fn-bbb { border-left-color: var(--grade-bbb-t) !important; }
.fn-bb  { border-left-color: var(--grade-bb-t)  !important; }
.fn-b   { border-left-color: var(--grade-b-t)   !important; }
.mono { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.trend { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ── CALLOUT / ANALYST ── */
.callout {
  background: var(--navy-card); border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0; padding: 18px 22px; margin: 28px 0;
}
.callout-label { font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.callout-body { font-size: 12px; color: var(--text); line-height: 1.6; }
.callout-body p { margin-bottom: 8px; }
.callout-body p:last-child { margin-bottom: 0; }
.callout-body strong { font-weight: 600; color: #fff; }

/* ── METHOD BOX ── */
.method-box {
  background: var(--navy-card); border: 1px solid var(--gold-dim);
  border-radius: 4px; padding: 22px 24px; margin-top: 8px;
}
.method-box h3 { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.method-box p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.method-box p:last-child { margin-bottom: 0; }
.method-link { color: var(--gold); text-decoration: none; font-weight: 500; }
.method-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
.method-item { border-top: 1px solid var(--gold-dim); padding-top: 10px; }
.method-item-label { font-size: 8px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.method-item-text { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* ── DISCLAIMER ── */
.disclaimer {
  background: rgba(58,10,10,.4); border-left: 3px solid #f87171;
  border-radius: 0 4px 4px 0; padding: 14px 20px; margin-top: 16px;
}
.disclaimer-label { font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #f87171; margin-bottom: 8px; }
.disclaimer-text { font-size: 11px; color: var(--text-muted); line-height: 1.55; }

/* ── CTA SECTION ── */
.cta-section {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy-card); border: 1px solid var(--gold-dim);
  border-radius: 4px; padding: 22px 28px; margin-top: 8px; gap: 24px;
}
.cta-section h3 { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.cta-section p { font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 520px; }
.cta-btn {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 28px; border-radius: 3px; text-decoration: none; white-space: nowrap;
  transition: background .15s; flex-shrink: 0;
}
.cta-btn:hover { background: #d4b05a; }
.cta-btn-outline {
  display: inline-block; background: transparent; color: var(--gold);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 24px; border-radius: 3px; border: 1px solid var(--gold-mid);
  text-decoration: none; white-space: nowrap; transition: background .15s;
}
.cta-btn-outline:hover { background: var(--gold-dim); }

/* ── FOOTER ── */
.site-footer {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-top: 1px solid var(--gold-dim); padding: 20px 0 0; margin-top: 48px;
  flex-wrap: wrap; gap: 12px;
}
.footer-l { font-size: 10px; color: var(--text-dim); font-weight: 300; line-height: 1.7; }
.footer-l a { color: var(--gold); text-decoration: none; font-weight: 500; }
.footer-r { font-size: 10px; color: var(--text-dim); text-align: right; letter-spacing: .06em; text-transform: uppercase; line-height: 1.7; }
.footer-r a { color: var(--text-dim); text-decoration: none; margin-right: 14px; }
.footer-r span { color: var(--text-muted); }

/* ── FORM ── */
.atlas-input, .atlas-select, .atlas-textarea {
  background: var(--navy); border: 1px solid rgba(232,228,220,.15); border-radius: 3px;
  padding: 10px 14px; font-size: 12px; color: var(--text); font-family: 'Inter', sans-serif;
  width: 100%; transition: border-color .15s; outline: none;
}
.atlas-input:focus, .atlas-select:focus, .atlas-textarea:focus { border-color: var(--gold-mid); }
.atlas-input::placeholder, .atlas-textarea::placeholder { color: var(--text-dim); }
.atlas-select { appearance: none; cursor: pointer; }
.atlas-select option { background: var(--navy-card); }
.atlas-textarea { resize: vertical; line-height: 1.5; min-height: 80px; }
.field-label { display: block; font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.field { margin-bottom: 12px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.25); border-radius: 3px; }

/* ── RESPONSIVE ── */
@media(max-width:1024px) {
  .stat-cards { grid-template-columns: repeat(3,1fr); }
  .movers-grid { grid-template-columns: repeat(3,1fr); }
  .method-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:768px) {
  .page-wrap { padding: 0 16px 48px; }
  .site-nav-inner { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .stat-cards { grid-template-columns: repeat(2,1fr); }
  .movers-grid { grid-template-columns: repeat(2,1fr); }
  .method-grid { grid-template-columns: 1fr; }
  .cta-section { flex-direction: column; align-items: flex-start; }
  .page-title-lg { font-size: 26px; }
}
@media(max-width:480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .movers-grid { grid-template-columns: 1fr; }
}
