/* Light scheme: same brand, ink on paper. Copper stays the accent in both. */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0b0d10;
  --md-primary-fg-color--light: #14181d;
  --md-primary-fg-color--dark: #05070a;
  --md-accent-fg-color: #a8682c;
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #15181c;
  --md-typeset-a-color: #a8682c;
  --md-code-bg-color: #f4f5f7;
}
[data-md-color-scheme="default"] .md-header,
[data-md-color-scheme="default"] .md-tabs { background: #0b0d10; border-bottom: 1px solid #232a32; }
[data-md-color-scheme="default"] .md-typeset h1 { color: #0b0d10; }
/* Material tints admonitions with its own blue; keep the control box in brand colours */
[data-md-color-scheme="default"] .md-typeset .admonition.info,
[data-md-color-scheme="default"] .md-typeset details.info {
  border-color: #a8682c; background: #fdf6ef;
}
[data-md-color-scheme="default"] .md-typeset .info > .admonition-title { background: #f5e6d5; color: #15181c; }
[data-md-color-scheme="default"] .md-typeset .info > .admonition-title::before { background-color: #a8682c; }
[data-md-color-scheme="slate"] .md-typeset .admonition.info,
[data-md-color-scheme="slate"] .md-typeset details.info { border-color: #c8813f; }
[data-md-color-scheme="slate"] .md-typeset .info > .admonition-title { background: #1d2228; }
[data-md-color-scheme="slate"] .md-typeset .info > .admonition-title::before { background-color: #c8813f; }

/* EmbeddedEra brand on Material's slate scheme: site colors, not Apple's */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0b0d10;
  --md-primary-fg-color--light: #14181d;
  --md-primary-fg-color--dark: #05070a;
  --md-accent-fg-color: #c8813f;
  --md-default-bg-color: #0b0d10;
  --md-default-fg-color: #e6e9ee;
  --md-typeset-a-color: #e09a57;
  --md-code-bg-color: #14181d;
}
.md-header, .md-tabs { background: #0b0d10; border-bottom: 1px solid #232a32; }
.md-typeset h1 { color: #e6e9ee; font-weight: 700; letter-spacing: -.02em; }

/* Print: the screen theme is dark, paper is not. Force black on white and drop the chrome.
   Rules are !important because Material sets these colors from its slate palette. */
@media print {
  :root, [data-md-color-scheme="slate"] {
    --md-default-bg-color: #fff !important;
    --md-default-fg-color: #000 !important;
    --md-default-fg-color--light: #000 !important;
    --md-default-fg-color--lighter: #333 !important;
    --md-typeset-color: #000 !important;
    --md-typeset-a-color: #000 !important;
    --md-code-bg-color: #f2f2f2 !important;
    --md-code-fg-color: #000 !important;
  }
  html, body, .md-main, .md-content, .md-typeset { background: #fff !important; color: #000 !important; }
  .md-typeset :is(h1,h2,h3,h4,h5,h6,p,li,td,th,strong,em,a,code) { color: #000 !important; }
  .md-typeset h1, .md-typeset h2 { border-bottom: 1px solid #000; padding-bottom: 2pt; }
  /* the document-control banner must stay legible and boxed */
  .md-typeset .admonition, .md-typeset details {
    background: #fff !important; color: #000 !important;
    border: 1.5pt solid #000 !important; box-shadow: none !important;
  }
  .md-typeset .admonition-title { background: #eee !important; color: #000 !important; }
  .md-typeset table :is(th,td) { border: .5pt solid #666 !important; }
  .md-typeset table th { background: #eee !important; }
  /* keep a step and its sub-steps together */
  .md-typeset :is(h2,h3) { break-after: avoid; }
  .md-typeset li, .md-typeset tr { break-inside: avoid; }
  /* chrome off */
  .md-header, .md-tabs, .md-sidebar, .md-footer, .md-nav, .md-search, .md-top,
  .md-content__button, .md-typeset .headerlink { display: none !important; }
  .md-main__inner, .md-content__inner { margin: 0 !important; padding: 0 !important; }
  @page { margin: 16mm 14mm; }
}
@media print {
  /* inline code chips and the revision table printed as dark blocks */
  .md-typeset code, .md-typeset pre, .md-typeset kbd {
    background: #f2f2f2 !important; color: #000 !important; border: .5pt solid #999 !important;
  }
  .md-typeset table, .md-typeset table tbody, .md-typeset table tr,
  .md-typeset :is(table,th,td) { background: #fff !important; color: #000 !important; }
  .md-typeset .admonition > :is(p,div) { color: #000 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  /* The git evidence block is for the screen. A printed procedure should be the procedure. */
  h2#what-changed, h2#what-changed ~ * { display: none !important; }
}

/* Header link back to the internal home page — Material has no slot for one. */
.ee-home {
  margin-left: auto; margin-right: .6rem; padding: .3rem .8rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #e6e9ee; border: 1px solid rgba(230,233,238,.35); text-decoration: none; white-space: nowrap;
}
.ee-home:hover { border-color: #c8813f; color: #e09a57; }
@media print { .ee-home { display: none !important; } }
