/* Formula sheets (site/formulas.py): loaded after site.css on /formula-sheets/ pages only. The math pieces (.fr stacked
   fractions, .rad roots, .ri root index) come from site.css, the same as on the solution pages. */
.fs-url { display: none; }
.fs-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.fs-jump a { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; font-size: 14px;
             color: var(--ink); text-decoration: none; }
.fs-jump a:hover { border-color: var(--ink-2); background: #f3f6ff; }
.fu { scroll-margin-top: 70px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 26px; }
.fi { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.fn { font-weight: 700; font-size: 15px; }
.fx { font: 400 25px/1.5 Caveat, cursive; color: var(--ink); background: var(--paper); border-left: 3px solid var(--hl);
      border-radius: 6px; padding: 2px 12px; overflow-x: auto; }
.fx .seg { white-space: nowrap; margin-right: .6em; }
.fx sup, .fx sub { font-size: .65em; }
.fx .tx { font: 400 14px/1 Inter, sans-serif; color: var(--muted); margin: 0 3px; }
.fx .sp { display: inline-block; width: .9em; }
.fx .seg:last-child { margin-right: 0; }
.fx .rad { display: inline-block; line-height: 1.1; padding-top: 1px; }
.fx .ov { border-top: 2px solid currentColor; padding-top: 1px; }
.fx .fr.nb > span:first-child { border-bottom: 0; }
.fx .bn { white-space: nowrap; }
.fx .lims { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: .55em; line-height: 1.1; margin: 0 2px 0 -1px; }
.fx .lm { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1; margin-right: 3px; }
.fx .lm > span:last-child { font-size: .55em; }
.fx .mx { display: inline-grid; gap: 0 10px; vertical-align: middle; text-align: center; line-height: 1.15; padding: 0 6px; margin: 2px 3px;
          border-left: 2px solid currentColor; border-right: 2px solid currentColor; border-radius: 6px; }
.fx .mx.det { border-radius: 0; }
.fm { font-size: 15px; color: var(--muted); }
.fl { font-size: 14px; color: var(--ink); text-decoration: none; font-weight: 600; }
.fl:hover { text-decoration: underline; }
.fs-list { columns: 2; padding-left: 20px; }
.fs-list li { margin: 6px 0; break-inside: avoid; }
.fs-list a { color: var(--ink); text-decoration: none; }
.fs-list a:hover { text-decoration: underline; }
.fs-acts .ghost { color: var(--ink); text-decoration: none; }
.fs-link { margin: -4px 0 16px; }
.fs-link a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--hl-soft); color: var(--ink); font-weight: 600;
             text-decoration: none; font-size: 15px; }
.fs-link a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .fx { font-size: 22px; }
  .fs-list { columns: 1; }
}

/* printed sheet: two columns, small, black on white; the lesson links and buttons stay on screen */
@media print {
  @page { margin: 11mm 10mm; }
  main > div.fsheet { display: block !important; }
  .fsheet .crumbs, .fs-jump, .fs-acts, .fl, .fs-more, .fs-note { display: none !important; }
  .fsheet { font: 10px/1.3 Inter, sans-serif; color: #000; }
  .fsheet .hero { padding: 0 0 4px; }
  .fsheet h1 { font-size: 18px !important; margin: 0 !important; }
  .fsheet .sub { display: none; }
  .fs-url { display: block; margin: 0 0 4px; font-size: 9px; color: #333; }
  .fu { border: 0; border-radius: 0; padding: 0; margin: 0 0 4px; background: none; }
  .fu h2 { font-size: 12px; margin: 4px 0 1px; padding-bottom: 1px; border-bottom: 1.5px solid #000; break-after: avoid; }
  .fgrid { display: block; columns: 2; column-gap: 16px; }
  .fi { break-inside: avoid; display: block; padding: 2px 0; border-top: 1px solid #ddd; }
  .fn { font-size: 10px; margin-right: 6px; }
  .fx { display: inline-block; font-size: 16px; line-height: 1.25; color: #000; background: none; border: 0; padding: 0; overflow: visible; vertical-align: middle; }
  .fx .tx { font-size: 9px; color: #000; }
  .fm { display: block; font-size: 9px; color: #333; }
}
