/* =====================================================================
   Jacobs Geometry — print stylesheet
   Loaded on every page with media="print". It turns the screen edition
   into clean paper output: site chrome and interactive controls are
   removed, type is set in points, figures are capped to a page, and
   tables repeat their headers across page breaks.
   ===================================================================== */

@page {
  margin: 15mm 16mm 17mm;
}

html {
  background: #fff !important;
  color: #000 !important;
}

body {
  background: #fff !important;
  color: #000 !important;
  font-size: 10.5pt;
  line-height: 1.42;
  -webkit-print-color-adjust: economy;
  print-color-adjust: economy;
}

/* ---------------------------------------------------- screen chrome out */

.topbar,
.sitefoot,
.skip,
.pagebar,
.pager,
.toc,
.pdfchip,
.pagechips,
.searchform,
.noscript,
.iconbtn {
  display: none !important;
}

.page {
  padding: 0 !important;
}

.wrap,
.hero,
.home-wrap,
.search-head {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ------------------------------------------------------------ type */

.prose,
.prose-sans {
  font-size: 10.5pt;
  line-height: 1.42;
}

.prose h1,
.prose-sans h1 {
  font-size: 20pt;
  line-height: 1.15;
  margin: 0 0 .55em;
  padding: 0;
  border: 0;
}

.prose h2,
.prose-sans h2 {
  font-size: 13.5pt;
  line-height: 1.25;
  margin: 1.45em 0 .45em;
  padding-top: .45em;
  border-top: .6pt solid #999;
}

.prose h3,
.prose-sans h3 {
  font-size: 11pt;
  margin: 1.05em 0 .3em;
}

.prose h4,
.prose-sans h4 {
  font-size: 9pt;
  margin: .9em 0 .25em;
}

h1, h2, h3, h4, h5, h6 {
  color: #000 !important;
  break-after: avoid-page;
  page-break-after: avoid;
  break-inside: avoid;
}

p, li, dt, dd {
  orphans: 3;
  widows: 3;
}

.prose p,
.prose-sans p {
  margin: 0 0 .65em;
}

.prose ul,
.prose ol,
.prose-sans ul,
.prose-sans ol {
  margin: 0 0 .7em;
  padding-left: 1.25em;
}

.prose li,
.prose-sans li {
  margin: .14em 0;
}

.prose a,
.prose-sans a {
  color: #000 !important;
  text-decoration: none !important;
}

.prose blockquote,
.prose-sans blockquote {
  margin: .8em 0;
  padding: .1em 0 .1em 8pt;
  border-left: 2pt solid #999;
  color: #222;
}

.prose hr {
  border: 0;
  border-top: .6pt solid #999;
  margin: 1em 0;
}

.prose code,
.prose-sans code {
  background: transparent !important;
  border: .5pt solid #bbb;
  font-size: .9em;
}

/* --------------------------------------------------------- figures */

.prose img,
.prose-sans img {
  max-width: 100% !important;
  max-height: 218mm;
  width: auto;
  height: auto;
  margin: 6pt auto;
  border: .5pt solid #ccc;
  border-radius: 0;
  box-shadow: none !important;
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.prose .figcaption,
.prose-sans .figcaption {
  margin: 0 auto 8pt;
  color: #333;
  font-size: 8.5pt;
  line-height: 1.35;
}

/* ---------------------------------------------------------- tables */

.tablewrap {
  overflow: visible !important;
  border: .6pt solid #aaa;
  border-radius: 0;
  margin: 8pt 0;
}

.prose table,
.prose-sans table {
  font-size: 8.8pt;
  line-height: 1.35;
}

.prose thead,
.prose-sans thead {
  display: table-header-group;
}

.prose tfoot,
.prose-sans tfoot {
  display: table-footer-group;
}

.prose tr,
.prose-sans tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.prose th,
.prose td,
.prose-sans th,
.prose-sans td {
  padding: 3pt 5pt;
  border-bottom: .5pt solid #bbb;
}

.prose thead th,
.prose-sans thead th {
  background: transparent !important;
  color: #000 !important;
  border-bottom: .9pt solid #666;
}

.prose tbody tr:nth-child(even),
.prose-sans tbody tr:nth-child(even) {
  background: transparent !important;
}

/* ------------------------------------------------------------ math */

.prose math,
.prose-sans math {
  font-size: 1em;
}

.prose math[display="block"],
.prose-sans math[display="block"] {
  overflow: visible !important;
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 5pt auto;
}

/* --------------------------------------------------------- page refs */

.prose .page-ref,
.prose-sans .page-ref {
  display: none !important;
}

/* --------------------------------------------------- the home page */

.page-home .hero {
  border: 0 !important;
  padding-bottom: 8pt !important;
}

.page-home .eyebrow {
  font-size: 8pt;
  color: #000 !important;
  margin-bottom: 4pt;
}

.page-home .hero h1 {
  font-size: 26pt;
  margin: 0 0 2pt;
}

.page-home .h1-sub {
  font-size: 12.5pt;
  color: #222;
  margin-top: 0;
}

.page-home .lede {
  font-size: 10.5pt;
  margin-bottom: 8pt;
  color: #000;
}

.page-home .hero-actions,
.section-foot {
  display: none !important;
}

.page-home .stats {
  font-size: 8pt;
  color: #333;
  gap: 10pt;
}

.home-section {
  padding-top: 12pt;
}

.section-head {
  margin-bottom: 6pt;
}

.section-head h2 {
  font-size: 14pt;
}

.section-note {
  font-size: 8.5pt;
  color: #333;
  max-width: none;
}

.chapter-grid,
.link-grid {
  display: block !important;
}

.chapter-card,
.link-card {
  display: block;
  border: 0;
  border-bottom: .5pt solid #ccc;
  border-radius: 0;
  padding: 4pt 0;
  background: transparent;
  box-shadow: none;
  break-inside: avoid;
  page-break-inside: avoid;
}

.chapter-card {
  display: flex;
}

.card-main {
  padding: 0;
}

.card-num {
  color: #000 !important;
  min-width: 26pt;
}

.card-title {
  font-size: 10.5pt;
}

.card-meta {
  font-size: 8pt;
  color: #333;
}

.card-pdf,
.card-extra,
.mini-link {
  display: none !important;
}

.link-card {
  padding: 5pt 0;
}

.link-card-title {
  font-size: 10.5pt;
}

.link-card-note {
  font-size: 8.5pt;
  color: #333;
}

.link-card-kind {
  color: #000;
  font-size: 7.5pt;
}

/* ------------------------------------------------- folder indexes */

.dirlist {
  border: .6pt solid #aaa;
  border-radius: 0;
  background: transparent;
}

.dirlist li + li {
  border-top: .5pt solid #ccc;
}

.dirrow {
  padding: 4pt 6pt;
}

.dirrow:hover {
  background: transparent;
}

.row-icon {
  color: #000;
}

.row-kind {
  color: #333;
}

/* ----------------------------------------------------- search page */

.search-head {
  border: 0;
  padding: 0 0 8pt;
}

.search-head h1 {
  font-size: 20pt;
}

.searchform {
  display: none !important;
}

.search-status {
  font-size: 9pt;
  color: #000;
  margin: 0 0 8pt;
}

.results {
  margin: 0;
}

.result {
  break-inside: avoid;
  page-break-inside: avoid;
  padding: 6pt 0;
  border-top: .5pt solid #999;
}

.result-title {
  color: #000 !important;
  text-decoration: none !important;
}

.result-meta {
  color: #333;
  font-size: 7.5pt;
}

.result-snippet {
  color: #000;
  font-size: 9pt;
}

.result-snippet mark {
  background: transparent !important;
  font-weight: 700;
}
