/* FlyNumber landing-section primitives — hero + howto + stat-strip overrides.
 * Loaded by any `.rates-page` that wants the redesigned hero or howto block
 * (currently /rates and /coverage). Sits on top of rates.css.
 *
 * Page-unique pieces (filter cards, legend bar, capability chips, table
 * variants) live in the page-specific stylesheet (coverage.css, etc.).
 */

/* When the hero is present, hide the layout's auto-rendered post-title — the
   hero itself provides the canonical h1 — and zero the rates-main top padding
   that was reserved for that auto-h1. Pages without `.cov-hero` keep the
   default Jekyll header + spacing. */
.post:has(.rates-page .cov-hero) > .post-header { display: none; }
.rates-page:has(.cov-hero) .rates-main { padding-top: 0; }

/* Site-wide `h1`/`h2` rules in custom.css force a sticker box (#e3eaf5 bg,
   3px border, 5px offset shadow, fit-content centered). Reset for our hero
   and howto headings. */
.rates-page .cov-hero h1,
.rates-page .howto-head h2 {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  text-align: left;
  width: auto;
  font-family: inherit;
}

/* ───────── Hero ─────────────────────────────────────────────────────── */
.cov-hero {
  background:
    radial-gradient(900px 320px at 88% -20%, hsl(var(--rates-primary) / 0.10), transparent 60%),
    radial-gradient(700px 260px at 10% 110%, hsl(var(--rates-primary) / 0.06), transparent 60%),
    white;
  border: 1px solid hsl(var(--rates-border));
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  overflow: hidden;
}
.cov-hero-top {
  padding: 32px 40px 28px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: center;
}
.cov-hero-text { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.rates-page .kicker {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: hsl(var(--rates-primary) / 0.08);
  border: 1px solid hsl(var(--rates-primary) / 0.20);
  color: hsl(221 83% 38%);
  border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.rates-page .cov-hero h1 {
  margin: 4px 0 0;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: hsl(var(--rates-fg));
}
.rates-page .cov-hero .page-sub {
  margin: 4px 0 0;
  font-size: 15px;
  color: hsl(var(--rates-muted));
  line-height: 1.55;
  max-width: 560px;
}

/* Illustration slot — sized big with no round mask: the hub artwork has its
   own circular composition with elements floating outside the inner ring,
   so clipping or framing kills the effect. */
.cov-hero-art {
  position: relative;
  justify-self: end;
  width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
}
.cov-hero-art img { max-width: 100%; max-height: 100%; display: block; }

/* When .stat-strip is nested inside .cov-hero it becomes the bottom band of
   the hero card (border-top divider only) instead of a standalone card. */
.cov-hero .stat-strip {
  border-radius: 0;
  border: none;
  border-top: 1px solid hsl(var(--rates-border));
  background: hsl(220 25% 99%);
  box-shadow: none;
}
.cov-hero .stat-strip .stat { padding: 18px 24px; }
.cov-hero .stat-value { font-size: 26px; }
.cov-hero .stat-value .unit { font-size: 13px; font-weight: 500; color: hsl(var(--rates-muted)); margin-left: 2px; }

/* ───────── "How to use this page" — 4-step footer + CTA ─────────────── */
.howto {
  background: white;
  border: 1px solid hsl(var(--rates-border));
  border-radius: 16px;
  padding: 28px 32px 24px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.howto-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.rates-page .howto-head h2 {
  margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: hsl(var(--rates-fg));
}
.rates-page .howto-head p { margin: 2px 0 0; font-size: 14px; color: hsl(var(--rates-muted)); }
.howto-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.howto-step {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 20px;
  background: hsl(220 25% 99%);
  border: 1px solid hsl(var(--rates-border));
  border-radius: 12px;
  transition: background 150ms, border-color 150ms, transform 150ms;
  /* Override legacy global `ul li, ol li { text-align: center; border: 2px
     solid #333; box-shadow: 5px 5px 0 #333 }` from custom.css. */
  text-align: left;
  box-shadow: none;
}
.howto-step:hover { background: white; border-color: hsl(var(--rates-primary) / 0.25); }
.howto-step-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: hsl(var(--rates-primary));
}
.howto-step-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--rates-primary) / 0.10);
  color: hsl(var(--rates-primary));
  margin-bottom: 2px;
}
.howto-step-icon svg { width: 18px; height: 18px; }
.howto-step-title { font-size: 14px; font-weight: 600; color: hsl(var(--rates-fg)); }
.howto-step-sub { font-size: 13px; color: hsl(var(--rates-muted)); line-height: 1.5; }

.howto-cta {
  display: flex; justify-content: center; gap: 12px;
  padding-top: 22px; margin-top: 22px;
  border-top: 1px dashed hsl(var(--rates-border));
}

/* ───────── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cov-hero-top { grid-template-columns: 1fr; gap: 24px; padding: 28px 28px 24px; }
  .cov-hero-art { justify-self: center; width: 240px; height: 240px; }
  .howto-steps { grid-template-columns: repeat(2, 1fr); }
  .cov-hero .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .cov-hero .stat-strip .stat:nth-child(2) { border-right: none; }
  .cov-hero .stat-strip .stat:nth-child(1),
  .cov-hero .stat-strip .stat:nth-child(2) { border-bottom: 1px solid hsl(var(--rates-border)); }
}
@media (max-width: 720px) {
  .rates-page .cov-hero h1 { font-size: 28px; }
  .cov-hero-top { padding: 22px 20px 20px; }
  .howto { padding: 22px 20px 18px; }
  .howto-steps { grid-template-columns: 1fr; }
  .howto-head { flex-direction: column; align-items: flex-start; }
}
