:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --bg-elev: #1c1c1c;
  --line: #262626;
  --line-strong: #3a3a3a;
  --ink: #ffffff;
  --ink-dim: #a3a3a3;
  --ink-dimmer: #666666;

  /* Brand accent (chrome): warm bone — logo, CTAs, hero accent, hover */
  --brand: #e8e2d1;
  --brand-hover: #f5f1e4;
  --brand-ink: #0a0a0a;

  /* Data accent (only inside the screen table): fragility red */
  --accent: #ff3b30;
  --accent-hover: #ff1a0f;
  --accent-ink: #ffffff;

  --critical: #ff3b30;
  --high:     #ff8c00;
  --elevated: #ffcc00;
  --moderate: #4caf50;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--brand); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------- Header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1280px; margin: 0 auto;
}

/* -------- Brand / Logo -------- */
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 11px; line-height: 1;
  font-family: var(--display);
}
.brand .mark svg { width: 11px; height: 11px; display: block; }
.brand .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand .sub {
  color: var(--ink-dimmer);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-left: 0.5rem;
  border-left: 1px solid var(--line-strong);
  margin-left: 0.2rem;
}

/* -------- Nav -------- */
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: var(--ink-dim);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); }
.site-nav .cta {
  background: var(--brand); color: var(--brand-ink);
  padding: 0.5rem 0.9rem;
  font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav .cta:hover { background: var(--brand-hover); color: var(--brand-ink); }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  font-family: var(--sans);
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* -------- Hero -------- */
.hero {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.hero .label {
  display: inline-block;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding: 0.25rem 0.5rem;
  background: rgba(232,226,209,0.06);
  border: 1px solid rgba(232,226,209,0.25);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.hero h1 .accent { color: var(--brand); }
.hero .lede {
  color: var(--ink-dim);
  font-size: 1.1rem;
  max-width: 56ch;
  margin: 0 0 1.8rem;
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* -------- Stat strip -------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.stat-strip > div {
  padding: 1.3rem 1.5rem;
  border-right: 1px solid var(--line);
}
.stat-strip > div:last-child { border-right: none; }
.stat-strip .num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-strip .num.crit { color: var(--critical); }
.stat-strip .num.high { color: var(--high); }
.stat-strip .num.elev { color: var(--elevated); }
.stat-strip .num.mod  { color: var(--moderate); }
.stat-strip .lbl {
  color: var(--ink-dimmer);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2,1fr); }
  .stat-strip > div:nth-child(2) { border-right: none; }
}

/* -------- Sections -------- */
section.block {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}
section.block h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
}
section.block h2 .num-pre {
  font-family: var(--mono);
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 0.4rem;
}

/* -------- Inputs strip (compact) -------- */
.inputs-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
}
.inputs-strip .cell {
  padding: 1.3rem 1.2rem;
  border-right: 1px solid var(--line);
}
.inputs-strip .cell:last-child { border-right: none; }
.inputs-strip .letter {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.inputs-strip .label {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  margin: 0.6rem 0 0.2rem;
}
.inputs-strip .wt {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-dimmer);
  letter-spacing: 0.1em;
}
@media (max-width: 820px) { .inputs-strip { grid-template-columns: repeat(5,1fr); font-size: 0.8rem; }
  .inputs-strip .cell { padding: 0.9rem 0.5rem; }
  .inputs-strip .letter { font-size: 1.5rem; }
  .inputs-strip .label { font-size: 0.75rem; }
}

/* -------- Pricing -------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.plan {
  padding: 1.8rem 1.6rem;
  border-right: 1px solid var(--line);
  position: relative;
}
.plan:last-child { border-right: none; }
.plan.featured { background: #0f0f0f; }
.plan .plan-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dimmer);
  margin: 0;
}
.plan .plan-price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.4rem;
  margin: 0.5rem 0 0.1rem;
  line-height: 1;
}
.plan .plan-price small {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-dim);
}
.plan .plan-tag {
  color: var(--ink-dim);
  font-size: 0.88rem;
  margin: 0.6rem 0 1.3rem;
  min-height: 2.6em;
}
.plan ul { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.plan li {
  padding: 0.4rem 0;
  color: var(--ink);
  font-size: 0.88rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.plan li.dim { color: var(--ink-dimmer); }
.plan li::before { content: "+"; color: var(--brand); font-weight: 700; }
.plan li.dim::before { content: "—"; color: var(--ink-dimmer); }
.plan .plan-cta {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
}
.plan .plan-cta.primary {
  background: var(--brand); color: var(--brand-ink);
  border-color: var(--brand);
}
.plan .plan-cta.primary:hover { background: var(--brand-hover); color: var(--brand-ink); border-color: var(--brand-hover); }
.plan .plan-cta.secondary:hover { border-color: var(--ink); color: var(--ink); }
.plan .ribbon {
  position: absolute; top: 0; right: 1rem; transform: translateY(-50%);
  background: var(--brand); color: var(--brand-ink);
  padding: 0.25rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } .plan { border-right: none; border-bottom: 1px solid var(--line); } .plan:last-child { border-bottom: none; } }

/* -------- Waitlist -------- */
.waitlist {
  border: 1px solid var(--line);
  padding: 2.5rem 2rem;
  text-align: center;
}
.waitlist h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.waitlist p { color: var(--ink-dim); max-width: 48ch; margin: 0 auto 1.5rem; }
.waitlist form {
  display: flex; gap: 0; max-width: 520px; margin: 0 auto;
  border: 1px solid var(--line-strong);
}
.waitlist input[type=email] {
  flex: 1 1 auto;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--sans);
}
.waitlist input[type=email]:focus { outline: none; }
.waitlist select {
  padding: 0.85rem 0.8rem;
  background: var(--bg-soft);
  border: none;
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: var(--sans);
}
.waitlist button {
  padding: 0.85rem 1.3rem;
  background: var(--brand);
  color: var(--brand-ink);
  border: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.waitlist button:hover { background: var(--brand-hover); }
.waitlist .success { color: var(--moderate); margin-top: 1rem; font-size: 0.9rem; }

/* -------- Toolbar -------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 0.9rem 0;
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.toolbar label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-dimmer);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.toolbar select, .toolbar input[type=text] {
  padding: 0.45rem 0.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: var(--sans);
}
.toolbar select:focus, .toolbar input[type=text]:focus { outline: none; border-color: var(--brand); }
.toolbar .count {
  margin-left: auto;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------- Table -------- */
.screen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.screen-table thead th {
  background: var(--bg);
  text-align: left;
  padding: 0.7rem 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dimmer);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.screen-table thead th.num { text-align: right; }
.screen-table thead th.locked {
  color: var(--ink-dimmer);
  cursor: not-allowed;
  opacity: 0.6;
}
.screen-table thead th.locked::after { content: " ×"; color: var(--accent); font-weight: 700; }
.screen-table thead th .arrow { opacity: 0.5; margin-left: 0.3rem; }
.screen-table thead th.sort-active { color: var(--ink); }
.screen-table thead th.sort-active .arrow { opacity: 1; color: var(--accent); }

.screen-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.06s;
}
.screen-table tbody tr:hover { background: var(--bg-soft); }
.screen-table tbody td { padding: 0.65rem 0.7rem; color: var(--ink); }
.screen-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.screen-table tbody td.rank { color: var(--ink-dimmer); font-family: var(--mono); font-size: 0.78rem; width: 2.5rem; }
.screen-table tbody td.ticker {
  font-family: var(--mono); font-weight: 700;
  color: var(--ink);
}
.screen-table tbody td.company { color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-table tbody td.locked {
  color: var(--ink-dimmer);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
  background: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,0.02) 4px 8px);
  position: relative;
}
/* Padlock icon inline-SVG via background — scales crisply, no network cost */
.screen-table tbody td.locked::before {
  content: "";
  display: inline-block;
  width: 10px; height: 12px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12' fill='none' stroke='%23666666' stroke-width='1.1'%3E%3Crect x='1.2' y='5.5' width='7.6' height='5.5' rx='0.6'/%3E%3Cpath d='M2.5 5.5 V3.6 a2.5 2.5 0 0 1 5 0 V5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  opacity: 0.6;
}
.screen-table tbody tr:hover td.locked::before { opacity: 0.9; }

/* Week-over-week caret beside the score */
.score-cell .delta {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  margin-left: 0.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.score-cell .delta.up   { color: var(--accent); }           /* up = more fragile */
.score-cell .delta.down { color: var(--moderate); }         /* down = healthier */
.score-cell .delta.flat { color: var(--ink-dimmer); }

.tier-pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}
.tier-pill.critical { background: var(--critical); color: #fff; }
.tier-pill.high     { background: var(--high); color: #000; }
.tier-pill.elevated { background: var(--elevated); color: #000; }
.tier-pill.moderate { background: var(--line-strong); color: var(--ink); }

.sector-chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-cell { font-family: var(--mono); font-weight: 700; text-align: right; }
.score-cell .bar-wrap {
  display: inline-block;
  width: 42px; height: 3px;
  background: var(--bg-elev);
  margin-right: 0.5rem;
  vertical-align: middle;
  overflow: hidden;
}
.score-cell .bar { display: block; height: 100%; background: var(--accent); }

/* 52W cell */
.td-52w {
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.td-52w .pct {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  font-size: 0.78rem;
  /* color, background, font-weight are set inline per-row for a continuous gradient */
}
.td-52w .pct.na { background: rgba(255,255,255,0.04); color: var(--ink-dimmer); font-weight: 500; }

/* -------- Preview table (landing page) -------- */
.preview-table { border: 1px solid var(--line); }
.preview-table thead th { background: var(--bg-soft); cursor: default; }
.preview-table thead th:hover { color: var(--ink-dimmer); }
.preview-table tbody tr:hover { background: var(--bg-soft); }
.preview-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border: 1px solid var(--line); border-top: none;
  background: var(--bg-soft);
  flex-wrap: wrap;
}
.preview-cta .preview-remaining {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lock-cta-row {
  border: 1px solid var(--brand);
  background: rgba(232,226,209,0.04);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.lock-cta-row .msg { color: var(--ink); max-width: 60ch; font-size: 0.9rem; }
.lock-cta-row .msg strong { color: var(--brand); }

/* -------- Methodology (compact) -------- */
.methodology .block-def {
  border: 1px solid var(--line);
  padding: 1.3rem 1.5rem;
  margin: 1rem 0;
}
.methodology h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.8rem;
  color: var(--brand);
}
.methodology code, .methodology .formula {
  font-family: var(--mono);
  background: var(--bg);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line-strong);
  font-size: 0.88em;
  color: var(--ink);
}
.methodology .formula { padding: 0.7rem 1.1rem; display: inline-block; margin: 0.4rem 0; font-weight: 700; }
.methodology .cutoff-row {
  display: grid;
  grid-template-columns: 150px 110px 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  align-items: center;
}
.methodology .cutoff-row:last-child { border-bottom: none; }
.methodology p { color: var(--ink-dim); margin: 0.4rem 0; }
.methodology p strong { color: var(--ink); font-weight: 700; }

/* -------- FAQ (compact) -------- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-family: var(--mono);
  font-size: 1.3rem; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-dim); margin: 0.75rem 0 0; font-size: 0.9rem; }

/* -------- Footer -------- */
footer.site-footer {
  padding: 2.5rem 0 2rem;
  color: var(--ink-dimmer);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
}
footer.site-footer .inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem;
  flex-wrap: wrap;
}
footer.site-footer .disclaimer {
  max-width: 60ch;
  line-height: 1.6;
  color: var(--ink-dimmer);
  margin: 0 0 1rem;
}
footer.site-footer .credit {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dimmer);
}
footer.site-footer a { color: var(--ink-dim); }
footer.site-footer a:hover { color: var(--ink); }

/* -------- Mobile -------- */
@media (max-width: 720px) {
  .site-header .inner { padding: 0.7rem 1rem; }
  .brand .sub { display: none; }
  .brand .name { font-size: 0.95rem; }
  .site-nav { gap: 0.8rem; }
  .site-nav a:not(.cta) { display: none; }
  .site-nav .cta { padding: 0.4rem 0.65rem; font-size: 0.7rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  section.block { padding: 2.5rem 0; }
  section.block h2 { font-size: 1.4rem; }
  .screen-table { font-size: 0.78rem; }
  .screen-table tbody td, .screen-table thead th { padding: 0.5rem 0.4rem; }
  .toolbar { gap: 0.35rem; }
  .toolbar .count { width: 100%; margin-left: 0; order: 99; }
  .lock-cta-row { flex-direction: column; align-items: flex-start; }
  .lock-cta-row .btn { width: 100%; justify-content: center; }
  .waitlist form { flex-direction: column; }
  .waitlist select { border-left: none; border-top: 1px solid var(--line-strong); }
}
