/* ============================================================
   ffree.co — the site's own rules (BP-427, ffree build unit 8)
   ------------------------------------------------------------
   Loaded after site-kit's tokens.css and site.css, by the switched pages
   only. Everything shared lives in site-kit; this is the stat band, the
   method page's reading column and its rule cards.

   EVERY COLOUR IS A TOKEN, and every one the dark theme redefines, so both
   themes are the tokens' job (tests/Feature/StylesheetTest.php measures the
   pairs used here at 4.5:1 in light and dark). Every link that stands on
   its own is at least --min-target tall (44px on touch). Nothing here
   moves: no transition, no animation, no smooth scrolling, so reduced
   motion has nothing to turn off.
   ============================================================ */

/* Words for a screen reader only (the stat band's heading). */
.ff-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── The stat band (slot 03): dark whatever the page's theme ── */
.ff-stats {
  padding-block: var(--sp-10);
  background: var(--canvas);
  color: var(--ink);
}

.ff-stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-stats__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-align: center;
}

/* Three facts while counsel holds the card one (Q1121): on a phone the odd
   one out takes the whole second row, centred, instead of half of it. */
.ff-stats__item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.ff-stats__value {
  color: var(--accent-text);
  font-size: var(--fs-public-title);
  line-height: var(--lh-public-title);
  font-weight: 700;
}

.ff-stats__label {
  color: var(--ink-muted);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

/* One row of equal columns, as many as there are facts (four, or three while
   counsel holds the card one), so no column is left empty. */
@media (min-width: 768px) {
  .ff-stats__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  .ff-stats__item:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ── The method page: one reading column ───────────────────── */
.ff-prose {
  max-width: 72ch;
  font-size: var(--fs-lg);
  line-height: var(--lh-lg-loose);
  overflow-wrap: anywhere;
}

.ff-prose > * + * {
  margin-top: var(--sp-4);
}

.ff-prose h2 {
  margin-top: var(--sp-10);
}

.ff-prose > h2:first-child {
  margin-top: 0;
}

.ff-prose h3 {
  margin-top: 0;
}

.ff-list {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: 0;
  padding-left: var(--sp-6);
}

.ff-coming {
  color: var(--ink);
}

/* A link that stands on its own line is a control: never under the target floor. */
.ff-more {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-target);
  font-weight: 600;
}

/* ── The rules behind the reminders ────────────────────────── */
.ff-rule-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ff-rule-index a {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-target);
  padding-inline: var(--sp-2);
  font-weight: 600;
}

.ff-rule {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-lg);
  background: var(--canvas);
  color: var(--ink);
}

.ff-rule > * + * {
  margin-top: var(--sp-3);
}

/* Landing here from a reminder's "Why this nudge?": the rule it named stands out. */
.ff-rule:target {
  border-color: var(--accent-text);
  box-shadow: var(--sh-md);
}

.ff-rule__off {
  color: var(--ink-muted);
}

/* The pledge (site-kit's solid band): its lines a breath apart. */
.ff-pledge .sk-cta__body > * + * {
  margin-top: var(--sp-2);
}

.ff-repeat .sk-actions {
  margin-top: var(--sp-6);
}
