/* One-page revision sheets, 27 November 2026.
   On screen the sheet sits in the normal site layout. When printed, everything
   except the sheet is hidden and the sheet fits one A4 page. */

.sheet-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 4px; }
.sheet-actions .button { cursor: pointer; border: 0; font: inherit; }
.sheet-actions .text-link { align-self: center; }

.sheet-wrap { max-width: 1180px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 72px) 24px; }

.sheet {
  --sheet-font: 0.98rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 8px solid var(--accent);
  border-radius: 10px;
  padding: clamp(16px, 3vw, 32px);
  font-size: var(--sheet-font);
  line-height: 1.45;
  box-shadow: 0 14px 40px rgba(17, 38, 27, 0.06);
}
.sheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.sheet__title { margin: 0; font-size: 1.35em; line-height: 1.15; }
.sheet__course { margin: 0; color: var(--muted); font-size: 0.9em; }
.sheet__intro { margin: 0 0 12px; font-size: 0.95em; }
.sheet__site { font-weight: 700; color: var(--accent-dark, var(--green-dark)); white-space: nowrap; }

.sheet__cols { columns: 2 22rem; column-gap: 28px; }
.sheet-group { break-inside: avoid; margin: 0 0 14px; }
.sheet-group h3 { margin: 0 0 6px; font-size: 1em; color: var(--accent-dark, var(--green-dark)); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.sheet-block-title { column-span: all; margin: 4px 0 10px; font-size: 1.05em; padding: 5px 10px; border-radius: 6px; background: var(--accent-soft, var(--green-soft)); color: var(--ink); }
html.theme-dark .sheet-block-title { background: var(--green-soft); }

.eq { list-style: none; margin: 0; padding: 0; }
.eq li { break-inside: avoid; padding: 4px 0; border-bottom: 1px dotted var(--line); }
.eq li:last-child { border-bottom: 0; }
.eq__words { display: block; }
.eq__sym { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 1.08em; font-weight: 600; white-space: nowrap; }
.eq__units { color: var(--muted); font-size: 0.85em; margin-left: 6px; }
.eq__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }

.lvl { display: inline-block; min-width: 1.6em; text-align: center; font-size: 0.72em; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-right: 6px; vertical-align: 0.1em; }
.lvl--C { background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--line); }
.lvl--S { background: var(--accent); color: #fff; }
html.theme-dark .lvl--S { color: #fff; }

.prac { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 10px 16px; list-style: none; margin: 0; padding: 0; }
.prac li { break-inside: avoid; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 8px 10px; }
.prac h3 { margin: 0 0 4px; font-size: 1em; line-height: 1.25; }
.prac__ref { color: var(--muted); font-weight: 700; margin-right: 6px; }
.prac p { margin: 0 0 3px; }
.prac b { color: var(--accent-dark, var(--green-dark)); }
.prac .p2 { display: inline-block; font-size: 0.72em; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--accent); color: #fff; margin-left: 6px; vertical-align: 0.1em; }

.sheet-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--green-soft); font-size: 0.9em; }
.sheet__foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; color: var(--muted); font-size: 0.8em; }

.sheet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 560px) {
  .sheet__cols { columns: 1; }
  .prac { grid-template-columns: 1fr; }
  .eq__sym { white-space: normal; }
}

/* ---------- Print: the sheet alone, on one A4 page ---------- */
@page { size: A4 portrait; margin: 9mm; }

@media print {
  html, html.theme-dark {
    --bg: #fff; --ink: #111; --muted: #444; --line: #bbb; --white: #fff;
    --green-soft: #eef4f0; --green-dark: #135434;
    color-scheme: light;
  }
  html.theme-dark body, body { background: #fff !important; color: #111 !important; }
  .site-chrome, .page-top, .workbook-strip, .page-hero, .sheet-extra, .site-footer,
  .igsr-consent, [class^="a11y"], [class*=" a11y"], [class^="site-search"], .resume-banner, .mobile-nav-toggle,
  .back-to-top, [data-no-print] { display: none !important; }
  .site-shell, main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .sheet-wrap { padding: 0; max-width: none; }
  .sheet {
    font-size: var(--print-font, 8.2pt);
    line-height: 1.28;
    border: 0; border-top: 4pt solid var(--accent);
    border-radius: 0; box-shadow: none; padding: 4pt 0 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .sheet__head { padding-bottom: 4pt; margin-bottom: 6pt; }
  .sheet__cols { columns: 2; column-gap: 14pt; }
  .sheet-group { margin-bottom: 6pt; }
  .eq li { padding: 1.6pt 0; }
  .prac { grid-template-columns: 1fr 1fr; gap: 4pt 8pt; }
  .prac li { padding: 3pt 5pt; }
  .sheet-note { margin-top: 5pt; padding: 3pt 6pt; }
  .sheet__foot { margin-top: 5pt; padding-top: 3pt; }
  a { color: inherit; text-decoration: none; }
  /* The site's dark theme swaps --accent-dark and --accent-soft for light
     colours with !important; paper is always light, so set print colours here. */
  .sheet b, .sheet__site, .prac__ref, .sheet__title { color: #1a1a1a !important; }
  .sheet-group h3 { color: var(--accent) !important; border-color: #bbb; }
  .sheet-block-title { background: #ececec !important; color: #111 !important; }
  .sheet-note, .lvl--C { background: #f0f0f0 !important; color: #111 !important; }
}
