/* Loaded only for printing reference, setup, and release pages. */
@page {
  margin: 0.58in 0.62in;

  @bottom-left {
    content: "MAGKORE.COM";
    color: #45504f;
    font: 8pt system-ui, sans-serif;
  }

  @bottom-right {
    content: counter(page);
    color: #45504f;
    font: 8pt system-ui, sans-serif;
  }
}

html, body {
  color-scheme: light !important;
  color: #202829 !important;
  background: #fff !important;
  margin: 0;
}

body {
  --ink: #202829 !important;
  --muted: #394546 !important;
  --dim: #4b5859 !important;
  --line: #a3adac !important;
  --accent: #174e4a !important;
  --gold: #704719 !important;
  --panel: #fff !important;
  --panel-raised: #fff !important;
}

body::before, body::after,
body > :is(header, footer, .skip, .product-nav, .mk-contours-live, .mk-crisp-dust),
.knowledge-shell > .sidebar,
main :is(.breadcrumb, .back-link, .lesson-start, .article-contents, .roadmap-jumps,
         .download-page-nav, .core-sections, .core-dev-nav, #tempo-controls, .fx-control, .kore-nav-arrow),
.download-actions a[href^="#"], .download-store-jump,
.download-history details:not([open]) {
  display: none !important;
}

.knowledge-shell,
main :is(.release-dashboard, .download-layout, .core-hero, .core-dev-tracks, .core-section-title, .core-evidence),
.release-ledger article {
  display: block !important;
}

.knowledge-shell, body main:is(.content, .download-main, .core-main) {
  inline-size: auto;
  max-inline-size: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

body main::before {
  content: "MAGKORE";
  display: block;
  color: #174e4a;
  font: 700 9pt/1.2 system-ui, sans-serif;
  letter-spacing: .15em;
  margin-block-end: .7em;
}

main :where(section, article, aside, div, nav, figure, details, summary, pre, dl, h1, h2, h3, h4) {
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

main :where(h1, h2, h3, h4, p, li, dt, dd, strong, span, b, em, small, time, summary, figcaption, code, kbd) {
  color: #202829 !important;
  -webkit-text-fill-color: currentColor !important;
}

body main :is(.eyebrow, .card-kicker) {
  font: 700 8pt/1.35 system-ui, sans-serif !important;
  letter-spacing: .08em;
  margin: 0 0 .35em !important;
}

main .eyebrow::before { display: none !important; }

body main h1 {
  font-size: 30pt !important;
  line-height: 1.03 !important;
  margin: 0 0 .42em !important;
}

body main h1 em { color: #174e4a !important; }

body main h2 {
  font-size: 19pt !important;
  line-height: 1.13 !important;
  margin: .7em 0 .2em !important;
}

body main h3 {
  font-size: 13pt !important;
  line-height: 1.23 !important;
  margin: .55em 0 .18em !important;
}

main :is(h1, h2, h3, h4, summary) { break-after: avoid-page; }

body main :is(p, li, dt, dd, summary, figcaption, .lead, .intro) {
  font-size: 10.5pt !important;
  line-height: 1.4 !important;
  orphans: 3;
  widows: 3;
}

main :is(.lead, .intro, .prose, .download-intro) { max-inline-size: none !important; }
body main p { margin-block: .25em .6em !important; }
body main :is(ul, ol) { margin: .3em 0 .65em !important; padding-inline-start: 1.4em !important; }
body main li { padding: 0 !important; margin-block: 0 .35em !important; }

main a, main a :where(span, strong, b, em) {
  color: #174e4a !important;
  text-decoration: underline;
  text-underline-offset: .13em;
}

main a { overflow-wrap: anywhere; }
main :is(.button, .detail-link, .download-evidence-link) {
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  clip-path: none !important;
}

main a:is([href^="https://grvbbs.itch.io/"][href$="#download"], [download][href^="/"])::after {
  display: block !important;
  position: static !important;
  z-index: auto !important;
  clip-path: none !important;
  opacity: 1 !important;
  background: none !important;
  transform: none !important;
  inline-size: auto !important;
  color: #394546;
  font: 8pt/1.35 system-ui, sans-serif;
  content: attr(href);
  overflow-wrap: anywhere;
  text-decoration: none;
}

main a[download][href^="/"]::after { content: "https://magkore.com" attr(href); }

main :is(.release-dashboard, .download-layout, .release-ledger, .download-history, .roadmap-stage) {
  margin: .7em 0 !important;
}

main :is(.release-primary, .release-facts, .download-install, .download-history, .download-notes,
         .core-hero, .core-section, .core-dev-tracks article, .core-workbench, .core-dev-download) {
  min-block-size: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

main :is(.release-primary, .release-facts, .download-install, .download-notes, .core-dev-tracks article) {
  margin-block: 0 .9em !important;
}

main .release-facts > div {
  display: grid !important;
  grid-template-columns: minmax(7em, 28%) minmax(0, 1fr);
  column-gap: .6em;
  padding: .28em 0 !important;
  break-inside: avoid-page;
}

main .release-facts :is(dt, dd) { margin: 0 !important; }
main .release-facts dt { letter-spacing: 0; text-transform: none; font-weight: 700; }
main .download-actions { display: block !important; margin: .32em 0 .7em !important; }
main .history-entry, main .release-ledger article { padding: .42em 0 !important; break-inside: avoid-page; }
main .game-first-run { margin-block-start: .75em !important; padding-block-start: .18em !important; }
main .article-end { margin-block: .55em 0 !important; padding: .25em 0 0 !important; }
main :is(.doc-actions, .core-section-title) { margin: .48em 0 !important; }
main .doc-actions { gap: .25em .9em !important; }

body.games main h1 { font-size: 25pt !important; }
body.games main h2 { font-size: 16pt !important; margin-block-start: .35em !important; }
body.games main h3 { font-size: 12pt !important; }
body.games main :is(p, li, dt, dd) { line-height: 1.32 !important; }
body.games main p { margin-block: .2em .42em !important; }
body.games main .release-facts > div { padding-block: .12em !important; }
body.games main :is(.release-primary, .release-facts, .download-install, .download-notes) { margin-block-end: .38em !important; }
body.games main .history-entry { padding-block: .22em !important; }

/* BLACKLEDGER keeps setup on its overview. The setup bookmarks print that section. */
.game-blackledger main:has(:is(#downloads, #first-launch):target) > :not(#downloads),
.game-blackledger #downloads .game-install-link { display: none !important; }
.game-blackledger main:has(:is(#downloads, #first-launch):target) #downloads {
  max-inline-size: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
.game-blackledger #downloads .release-heading { display: block !important; }
.game-blackledger #downloads .game-release-actions { display: block !important; margin: .32em 0 .7em !important; }

main :is(.roadmap-grid, .cards, .decision-grid, .bundle-copy-grid, .core-responsibility-map, .core-range) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .6em !important;
}

main :is(.card, .roadmap-card, .callout, .kore-alert, .tempo-tool, .routing-diagram, .core-intent, .core-range > div) {
  break-inside: avoid-page;
  padding: .45em .65em !important;
  margin-block: .42em .62em !important;
  border-color: #a3adac !important;
  min-block-size: 0 !important;
}

main :is(.kore-alert, .kore-alert .ka-body, .kore-alert .ka-head) { position: static !important; overflow: visible !important; }
main .kore-alert .ka-head { padding: 0 !important; border: 0 !important; font-size: 8pt !important; }
main .kore-alert .ka-head svg { display: none; }
main .kore-alert .ka-body { padding: 0 !important; }
main :is(.tempo-tool dl, .tempo-tool .tiny) { margin-block: .3em !important; }

main :is(.prose details, .core-dev-commands, .download-notes details)::details-content {
  content-visibility: visible !important;
  block-size: auto !important;
  opacity: 1 !important;
  overflow: visible !important;
}

main :is(.prose details, .core-dev-commands, .download-notes details) { margin-block: .5em .75em !important; }
main summary { font-weight: 700; cursor: auto; }
main summary::marker { content: ""; }
main summary::-webkit-details-marker { display: none; }

main :is(pre, code, kbd) {
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: pre-wrap;
}

main pre { padding: .45em .6em !important; font-size: 8.5pt !important; break-inside: avoid-page; }
main figure { break-inside: avoid-page; }
main img { max-inline-size: 100%; block-size: auto; max-block-size: 4in; object-fit: contain; }
