/* ==========================================================================
   who-it-helps.html-only rules. Everything else (header, footer, buttons,
   cards, hero shell, CTA, back-to-top, global typography, dark-mode
   colors) comes from css/*.css and must not be redefined here. Requires
   the full shared foundation to be loaded first.
   ========================================================================== */

/* ---- hero: page-scoped headline size ----
   The shared h1 scale (base.css/hero.css, clamp 2.75-5.7rem) is tuned for
   shorter headlines. This page's headline is 67 characters - longer than
   any other rebuilt page's - and wrapped to 7 stacked lines at the default
   scale, so it needs a page-scoped override like every other rebuilt page.
   This page's longest word doesn't distort the hero grid's column split at
   any of these sizes (confirmed empirically: 620.9/485.1px holds). An
   earlier pass sized this down further than necessary to kill the last
   orphan and ended up visually smaller than the other rebuilt pages'
   hero titles - this is the corrected, larger pass: the max (3.2rem) sits
   at the top of the approved 3-3.3rem range, the largest size that still
   wraps cleanly (3 lines desktop, 2 lines at the 900px stacking point,
   no orphan anywhere from 1440 down to 320px). */

.hero h1 {
  font-size: clamp(2.2rem, 3.1vw, 3.2rem);
  line-height: 1.18;
}

/* ---- hero summary card ----
   Uses the shared .hero-card--icon treatment (hero.css) - same media
   size/spacing, title, and copy styling as the service pages' hero cards
   (reporting-reality-check.html, dashboard-rescue.html, etc.), so this
   page needs no page-specific overrides for it at all. .helps-hero-card
   is kept as a semantic hook only; every declaration that used to live
   here duplicated what .hero-card--icon already provides. */

/* ---- "common situations" audience cards ----
   Standard .card-base.icon-card (cards.css) - icon bubble, heading, and
   description. This file only supplies the grid layout. */

.helps-audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .helps-audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .helps-audience-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ---- "signs the problem is structural" signal cards ----
   Three grouped .card-base cards (no icons), each holding a short
   .dot-list (shared component, cards.css). Deliberately plainer than the
   icon-card grid above - no icon bubble, smaller heading - so the page
   doesn't read as two identical card treatments back to back. Desktop:
   three equal columns. Tablet: two columns, with the third card spanning
   full width on its own row. Mobile: stacked. */

.helps-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.helps-signal-card h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .helps-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .helps-signal-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .helps-signal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .helps-signal-card:last-child {
    grid-column: auto;
  }
}

/* ---- "fit check" comparison table ----
   Desktop/tablet (>760px) keeps the real <table>; overflow-x:auto stays on
   the wrapper only as a defensive fallback (verified empirically to never
   actually engage in that range - the table's 680px min-width comfortably
   fits the >=761px container). At <=760px the table is hidden entirely and
   replaced by .fit-check-mobile's stacked cards below, so a narrow
   viewport never needs horizontal scrolling and only one representation
   (table or cards) is ever in the accessibility tree at a time. */

.helps-fit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-panel);
  background: var(--surface-bg);
  box-shadow: var(--shadow-card);
}

@media (max-width: 760px) {
  .helps-fit-table-wrap {
    display: none;
  }
}

.helps-fit-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.helps-fit-table th,
.helps-fit-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  font-size: var(--fs-secondary);
  line-height: 1.55;
  border-bottom: 1px solid var(--border-color);
}

.helps-fit-table thead th {
  color: var(--heading-color);
  font-size: var(--fs-label-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-muted-bg);
}

.helps-fit-table tbody td:first-child {
  color: var(--heading-color);
  font-weight: 700;
  white-space: nowrap;
}

.helps-fit-table tbody td:not(:first-child) {
  color: var(--text-secondary);
}

.helps-fit-table tbody tr:last-child td {
  border-bottom: none;
}

.helps-fit-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.helps-fit-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent-color);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
}

.helps-fit-dot.not {
  background: var(--border-color);
  color: var(--heading-color);
}

/* ---- "fit check" mobile cards (<=760px) ----
   One stacked card per scenario, each repeating the Good Fit / Probably
   Not a Fit labels as real text (not just icons) so the comparison reads
   correctly without the table's column headers. Hidden above 760px via
   display:none, which also keeps it out of the accessibility tree there -
   see .helps-fit-table-wrap for the complementary desktop-side rule. */

.fit-check-mobile {
  display: none;
}

@media (max-width: 760px) {
  .fit-check-mobile {
    display: grid;
    gap: 18px;
  }
}

.fit-check-mobile-card {
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: var(--surface-bg);
}

.fit-check-mobile-card h3 {
  margin-bottom: 20px;
  color: var(--heading-color);
  font-size: 1.15rem;
  text-align: left;
}

.fit-check-mobile-result {
  padding: 14px 16px;
  border-radius: 12px;
}

.fit-check-mobile-result--good {
  margin-bottom: 18px;
  border-left: 3px solid var(--accent-color);
  background: rgba(1, 210, 132, 0.08);
}

.fit-check-mobile-result--not {
  border-left: 3px solid var(--border-color);
  background: var(--surface-muted-bg);
}

.fit-check-mobile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: var(--fs-label-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fit-check-mobile-result--good .fit-check-mobile-label {
  color: var(--accent-label-color);
}

.fit-check-mobile-result--not .fit-check-mobile-label {
  color: var(--text-secondary);
}

.fit-check-mobile-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.fit-check-mobile-result--good .fit-check-mobile-label span {
  background: var(--accent-color);
  color: #ffffff;
}

.fit-check-mobile-result--not .fit-check-mobile-label span {
  background: var(--border-color);
  color: var(--heading-color);
}

.fit-check-mobile-result p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  line-height: 1.55;
}

/* ---- "choose a starting point" recommendation cards ----
   Three stacked, full-width .card-base cards (situation | service+
   description+link) instead of a table-like panel. Left accent border
   marks each as a recommendation, distinct from the plain audience/signal
   cards above. No page-specific width - fills the container like the
   fit-check table above it, so the two sections still line up. */

.helps-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.helps-recommend-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
  border-left: 4px solid var(--accent-color);
}

.helps-recommend-situation {
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  line-height: 1.4;
}

.helps-recommend-body h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.helps-recommend-body p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: var(--fs-secondary);
  line-height: 1.55;
}

.helps-recommend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.helps-recommend-more {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 768px) {
  .helps-recommend-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px 22px;
  }
}
