/**
 * nfl-home.css — page-scoped layout for the algorithm-builder home
 * (v0.44.1 redo, dec 78). Loaded ONLY when [nfl_lines_home] renders.
 *
 * Deliberately layout-only: colors, cards, KPIs, badges and rank pills come
 * from the shared design system (assets/css/nfl-lines-ds.css) so this page
 * speaks the same visual language as the rest of the product. The v0.46
 * token pass unifies these page-local rules system-wide (dec 78c) — until
 * then every value below either references a --nfl-* token or is a pure
 * geometry value (spacing / radius / breakpoint).
 */

/* ---------------------------------------------------------------- shell -- */

/* The template's <main> wrapper (mirrors .nfl-tp on the team page): the
 * surface owns full width via `site-main`; the inner container below is what
 * centers and pads it. Both are required — /leaderboards/ has the wrapper and
 * no container rule, which is why it renders flush to the viewport edge. */
.nfl-home-page {
  background: var(--nfl-page-bg, #fafafa);
}

.nfl-home {
  --home-gap: var(--nfl-gap-6, 20px);
  --home-band-pad: 40px 24px;
  --home-max: 1120px;
  color: var(--nfl-text, #111827);
  font-size: 16px;
  line-height: 1.55;
}

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

.nfl-home__inner {
  width: 100%;
  max-width: var(--home-max);
  margin: 0 auto;
  padding: 0 20px;
}

.nfl-home section {
  margin: 0 0 var(--home-gap);
}

.nfl-home__section-title {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.nfl-home__section-lede {
  color: var(--nfl-text-muted, #6b7280);
  margin: 0 0 18px;
  max-width: 62ch;
}

.nfl-home__meta {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.875rem;
  margin: 0 0 12px;
}

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

/* v0.46.13.1 — RULING 2. The hero was padded like a full band with two short
   rows in it: a giant block of solid colour around a quarter-row of content.
   Tightened to its own scale (not the shared band pad), and the proof chip now
   sits INSIDE as content rather than floating under the CTAs. */
.nfl-home__hero {
  background: var(--nfl-text, #111827);
  color: #fff;
  border-radius: var(--nfl-radius-band, 14px);
  padding: 26px 24px 22px;
  text-align: center;
  margin-bottom: 20px;
}

.nfl-home__hero-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #fff;
}

.nfl-home__hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: #d1d5db;
  max-width: 60ch;
  margin: 0 auto 26px;
}

.nfl-home__hero-cta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-4, 12px);
  align-items: center;
  justify-content: center;
}

.nfl-home__btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--nfl-radius-control, 9px);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.nfl-home__btn:hover { transform: translateY(-1px); }

.nfl-home__btn--primary {
  background: var(--nfl-accent, #2563eb);
  color: #fff;
}

.nfl-home__btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.nfl-home__btn--sm {
  padding: 9px 16px;
  font-size: 0.95rem;
}

.nfl-home__hero-note {
  display: block;
  width: 100%;
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* --------------------------------------------------------- method flow -- */

.nfl-home__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--nfl-gap-5, 16px);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: nfl-home-step;
}

.nfl-home__step {
  position: relative;
  padding: 18px 16px 16px;
}

.nfl-home__step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nfl-accent-bg, #dbeafe);
  color: var(--nfl-accent, #2563eb);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.nfl-home__step-title {
  font-weight: 700;
  margin: 0 0 4px;
}

.nfl-home__step-body {
  margin: 0;
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.925rem;
}

.nfl-home__formula {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--nfl-mid-bg, #f3f4f6);
  border-radius: var(--nfl-radius-control, 9px);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* ------------------------------------------------------------ simulator -- */

.nfl-home__sim {
  background: var(--nfl-accent-bg, #dbeafe);
  border-radius: var(--nfl-radius-band, 14px);
  padding: var(--home-band-pad);
}

.nfl-home__sim-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--nfl-gap-7, 28px);
  align-items: center;
}

.nfl-home__sim-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}

.nfl-home__sim-body { margin: 0 0 10px; }

.nfl-home__sim-blend {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.925rem;
}

.nfl-home__sim-blend li { margin-bottom: 4px; }

/* ---------------------------------------------------------- proof band -- */

.nfl-home__proof {
  border: 2px solid var(--nfl-text, #111827);
  border-radius: var(--nfl-radius-band, 14px);
  padding: 28px 24px;
  background: var(--nfl-card-bg, #fff);
}

.nfl-home__proof-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-5, 16px);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.nfl-home__proof-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.nfl-home__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--nfl-gap-4, 12px);
  margin: 14px 0 18px;
  padding: 16px 18px;
  border-radius: var(--nfl-radius-card, 12px);
  background: var(--nfl-mid-bg, #f3f4f6);
}

.nfl-home__headline-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nfl-home__headline-label {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.95rem;
}

.nfl-home__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-5, 16px);
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--nfl-accent, #2563eb);
  background: var(--nfl-page-bg, #fafafa);
  font-size: 0.875rem;
  color: var(--nfl-text-muted, #6b7280);
}

.nfl-home__legend-item { display: flex; gap: var(--nfl-gap-2, 8px); align-items: baseline; }

.nfl-home__record-wrap { overflow-x: auto; }

.nfl-home__record {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.94rem;
}

.nfl-home__record th,
.nfl-home__record td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid var(--nfl-card-border, #e6e8ec);
  white-space: nowrap;
}

.nfl-home__record th:first-child,
.nfl-home__record td:first-child { text-align: left; }

.nfl-home__record thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nfl-text-muted, #6b7280);
  border-bottom-width: 2px;
}

.nfl-home__record tbody tr:hover { background: var(--nfl-page-bg, #fafafa); }

.nfl-home__record-split th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nfl-text-muted, #6b7280);
  padding-top: 18px;
  border-bottom: none;
}

.nfl-home__record-total td {
  font-weight: 700;
  border-top: 2px solid var(--nfl-text, #111827);
  border-bottom: none;
  background: var(--nfl-page-bg, #fafafa);
}

.nfl-home__drill { margin-top: 16px; }

.nfl-home__drill summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}

.nfl-home__disclosure {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--nfl-page-bg, #fafafa);
  border-radius: var(--nfl-radius-control, 9px);
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.875rem;
}

/* ------------------------------------------------------- module layout -- */

.nfl-home__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--home-gap);
  align-items: start;
}

.nfl-home__module { padding: 20px; }

.nfl-home__module-title {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

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

.nfl-home__list li {
  display: flex;
  gap: var(--nfl-gap-3, 10px);
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--nfl-card-border, #e6e8ec);
}

.nfl-home__list li:last-child { border-bottom: none; }

.nfl-home__list-main { display: flex; gap: var(--nfl-gap-3, 10px); align-items: baseline; min-width: 0; }

.nfl-home__list-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

/* --------------------------------------------------------- path branch -- */

.nfl-home__paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--home-gap);
  align-items: stretch;
}

.nfl-home__path {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
}

.nfl-home__path--muted { opacity: 0.86; }

.nfl-home__path-title {
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.nfl-home__tiers {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: var(--nfl-gap-2, 8px);
}

.nfl-home__tier {
  display: flex;
  gap: var(--nfl-gap-4, 12px);
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--nfl-card-border, #e6e8ec);
  border-radius: var(--nfl-radius-control, 9px);
}

.nfl-home__tier-name { font-weight: 700; }

.nfl-home__tier-caps {
  color: var(--nfl-text-muted, #6b7280);
  font-size: 0.875rem;
}

.nfl-home__tier-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nfl-home__path-cta { margin-top: auto; padding-top: 16px; }

/* ------------------------------------------------------------ closer   -- */

.nfl-home__closer {
  background: var(--nfl-text, #111827);
  color: #fff;
  border-radius: var(--nfl-radius-band, 14px);
  padding: 34px 24px;
  text-align: center;
}

.nfl-home__closer-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 8px;
  color: #fff;
}

.nfl-home__closer-sub {
  color: #d1d5db;
  margin: 0 0 20px;
}

.nfl-home__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nfl-gap-3, 10px) 22px;
  justify-content: center;
  list-style: none;
  margin: 22px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.nfl-home__nav a { color: #e5e7eb; text-decoration: none; font-size: 0.94rem; }
.nfl-home__nav a:hover { color: #fff; text-decoration: underline; }

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

@media (max-width: 900px) {
  .nfl-home__steps { grid-template-columns: repeat(2, 1fr); }
  .nfl-home__sim-grid,
  .nfl-home__cols,
  .nfl-home__paths { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nfl-home { --home-band-pad: 28px 18px; }
  .nfl-home__steps { grid-template-columns: 1fr; }
  .nfl-home__inner { padding: 0 14px; }
  .nfl-home__btn { width: 100%; text-align: center; }
  .nfl-home__record { font-size: 0.86rem; }
}


/* ============================================================ v0.46.13.1 == */
/* RULING 2 — the chip is hero CONTENT: it sits between the sub and the CTAs,
   on the dark-band token so it is legible (ruling 3). */
.nfl-home__hero-sub { margin-bottom: 16px; }

.nfl-home__hero-chip {
  margin: 0 auto 16px;
  display: inline-block;
}

/* RULING 1 — ALL 32, TWO COLUMNS, so the module sits beside a 13-16 row slate
   instead of ten rows and an apology link. Collapses to one column on phones
   (L8) where there is nothing to sit beside. */
.nfl-home__ratings-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--nfl-gap-6, 20px);
}

.nfl-home__list--ratings { margin: 0; padding: 0; list-style: none; }

.nfl-home__rating-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px auto;
  align-items: center;
  gap: var(--nfl-gap-2, 8px);
  padding: 3px 0;
  font-size: 0.92rem;
}

/* The magnitude bar — the ratings read as a bar family, not a text list. */
.nfl-home__rating-bar {
  display: block;
  height: 6px;
  border-radius: var(--nfl-radius-pill, 999px);
  background: var(--nfl-color-surface-2, #f3f4f6);
  overflow: hidden;
}
.nfl-home__rating-bar > i {
  display: block;
  height: 100%;
  background: var(--nfl-color-accent, #2563eb);
}

/* RULING 4 lives in ds.css (v0.46.13.2) — House_Record_Band is a ds-layer
   component on BOTH homes, and this sheet is loaded by only one of them. It
   also REDEFINED .nfl-ds-statgrid (grid) against the ds base (flex), which is
   a page sheet overriding the design system on one page only. Moved whole. */

@media (max-width: 780px) {
  .nfl-home__ratings-cols { grid-template-columns: 1fr; }
}
