/* ══════════════════════════════════════════════════════════════════════════
   css/formula-sheet.css — the printable formula sheets (item 19)
   Namespaced fs-* so nothing here can reach another page.
   ══════════════════════════════════════════════════════════════════════════ */

.fs-wrap { padding: 38px 0 60px; }
.fs-wrap .wrap { max-width: 900px; }

/* ── The index of six ────────────────────────────────────────────────────── */
.fs-index { display: grid; gap: 12px; }
@media (min-width: 600px) { .fs-index { grid-template-columns: 1fr 1fr; gap: 14px; } }

.fs-card {
  display: grid; gap: 3px; text-decoration: none;
  background: #fff; border: 1px solid var(--line, #E7E3D9);
  border-left: 4px solid var(--orange, #D97706);
  border-radius: 12px; padding: 15px 17px 14px;
}
.fs-card:hover, .fs-card:focus-visible { border-color: var(--orange, #D97706); }
.fs-card-code {
  font-size: .72rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--orange-ink, #B45309);
}
.fs-card-name {
  font-size: 1.08rem; font-weight: 800; color: var(--navy, #0B1D3F);
  letter-spacing: -.015em; line-height: 1.3;
}
.fs-card-n { font-size: .88rem; color: var(--ink-3, #78848F); font-variant-numeric: tabular-nums; }

/* ── The sheet ───────────────────────────────────────────────────────────── */
.fs-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.fs-print {
  font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
  background: var(--orange, #D97706); color: #fff; border: 0;
  border-radius: 9px; padding: 10px 18px;
}
.fs-print:hover { background: var(--orange-ink, #B45309); }
.fs-back { font-size: .92rem; font-weight: 700; color: var(--orange-ink, #B45309); text-decoration: none; }
.fs-back:hover { text-decoration: underline; }

.fs-sheet {
  background: #fff; border: 1px solid var(--line, #E7E3D9);
  border-radius: 14px; padding: 22px 22px 18px;
}

.fs-group { margin: 0 0 20px; }
.fs-group:last-of-type { margin-bottom: 6px; }
.fs-group-h {
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3, #78848F); margin: 0 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--bg-2, #F4F2EC);
}
.fs-group-h a { color: inherit; text-decoration: none; }
.fs-group-h a:hover { color: var(--orange-ink, #B45309); }

/* The formula blocks arrive as the topic pages' own <div class="tp-math">
   contents, so they are styled here rather than inheriting topic-page.css,
   which this page does not load. */
.fs-f {
  font-size: .97rem; line-height: 1.75; color: var(--navy, #0B1D3F);
  padding: 7px 11px; margin: 0 0 6px;
  background: var(--bg-2, #F4F2EC); border-radius: 7px;
  overflow-x: auto;
}
.fs-f sub, .fs-f sup { font-size: .76em; }

.fs-head, .fs-foot { font-size: .82rem; color: var(--ink-3, #78848F); margin: 0 0 14px; }
.fs-foot { margin: 14px 0 0; }
.fs-printonly { display: none; }

.fs-note {
  margin: 18px 0 0; font-size: .92rem; line-height: 1.6;
  color: var(--ink-2, #4A5666); max-width: 62ch;
}

@media (max-width: 560px) {
  .fs-sheet { padding: 15px 14px 12px; border-radius: 11px; }
  .fs-f { font-size: .93rem; padding: 6px 9px; }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
/* Everything that is not the article is a direct child of <body> on this site -
   the nav, the floating buttons, the search overlay, the footer, the cookie
   banner - so one rule removes the lot, and a second removes the hero inside
   the article. Checked against the real DOM, not guessed. */
@media print {
  body > *:not(#main-content) { display: none !important; }
  #main-content .page-hero,
  .fs-noprint { display: none !important; }

  .fs-printonly { display: block; }

  html, body { background: #fff !important; }
  .fs-wrap { padding: 0 !important; }
  .fs-wrap .wrap { max-width: none; padding: 0 !important; }

  .fs-sheet { border: 0; border-radius: 0; padding: 0; }

  /* Two columns on paper: 98 formulae down one side of A4 wastes half the
     sheet, and the point of this is to go on a wall. */
  .fs-group { break-inside: avoid; margin-bottom: 11px; }
  .fs-sheet { columns: 2; column-gap: 16px; }

  .fs-group-h { font-size: 8pt; color: #000; border-bottom: 1px solid #999; }
  .fs-f {
    font-size: 8.6pt; line-height: 1.5; padding: 2px 0; margin: 0 0 2px;
    background: none; color: #000; overflow: visible;
  }
  .fs-head, .fs-foot { font-size: 7.5pt; color: #000; column-span: all; }

  a { color: #000 !important; text-decoration: none !important; }
}
