/* Print: formula sheet & notes. Loaded with media="print". Black on white, no chrome. */
@page {
  margin: 14mm 12mm;
}

:root,
:root[data-theme='dark'] {
  --bg: #fff;
  --surface: #fff;
  --surface-2: #fff;
  --surface-3: #fff;
  --border: #999;
  --border-strong: #666;
  --text: #000;
  --text-2: #000;
  --text-muted: #333;
  --heading: #000;
  --heading-2: #000;
  --accent-text: #000;
  --code-bg: #fff;
  --code-text: #000;
  --code-strong: #000;
  --code-label: #000;
  --code-note: #333;
  --trap-bg: #fff;
  --trap-text: #000;
  --note-bg: #fff;
  --note-text: #000;
  --fav: #000;
  --unfav: #000;
}
html,
body {
  background: #fff !important;
  color: #000 !important;
  font-size: 10.5pt;
}
.sidebar,
.topbar,
.hub-header,
.drawer-overlay,
.skip-link,
.toast-region,
.hero-actions,
.topic-complete,
.example-toggle,
.calc-actions,
.quiz-toolbar,
.srs-buttons,
.page-footer,
.notice,
.no-print,
button {
  display: none !important;
}
.app-shell {
  display: block !important;
}
.page {
  width: 100% !important;
  padding: 0 !important;
}

/* Only the active view prints (usually the formula sheet). */
.view {
  display: none !important;
}
.view.active {
  display: block !important;
  animation: none !important;
}

h1,
h2 {
  font-size: 16pt;
  letter-spacing: 0;
}
.formula-box {
  border: 1px solid #000;
  border-radius: 0;
  padding: 6px 8px;
  margin: 0 0 6px;
  break-inside: avoid;
}
.formula-box::before {
  display: none;
}
.formula-label {
  color: #000;
}
.formula-sheet {
  columns: 2;
  column-gap: 10mm;
}
.katex {
  color: #000 !important;
}
details.lesson > *:not(summary) {
  display: block !important;
}
.worked-example[hidden],
.solution-steps[hidden] {
  display: block !important;
}
.exam-trap,
.instructor-note,
.panel,
.lesson,
.question,
.cbq {
  border: 1px solid #000;
  box-shadow: none;
  break-inside: avoid;
}
.data-table th {
  background: #fff !important;
  color: #000 !important;
  border-bottom: 1px solid #000;
}
.data-table tr:nth-child(even) td {
  background: #fff !important;
}
a {
  color: #000;
  text-decoration: none;
}

/* Interest tables: print all four, each starting on a new page, small enough to fit 21 columns. */
.tvm-hidden {
  display: block !important;
}
.tvm-table {
  break-before: page;
}
.tvm-grid {
  font-size: 6.5pt;
  width: 100%;
}
.tvm-grid th,
.tvm-grid td {
  padding: 1px 2px;
  border: 0.5pt solid #999;
  color: #000;
}
.data-table-wrap {
  overflow: visible !important;
}
