/* Original site styling based on the DM32 manual's visual conventions.
   Reference: https://technical.swissmicros.com/dm32/doc/dm32_user_manual.html
   The manual's domain-licensed Theinhardt fonts are not included or loaded. */
:root,
[data-md-color-scheme="default"] {
  --md-text-font: Arial, Helvetica, sans-serif;
  --md-code-font: Menlo, Monaco, Consolas, "Courier New", monospace;
  --md-default-bg-color: #fff;
  --md-default-fg-color: #3a3a3a;
  --md-default-fg-color--light: #7a5f48;
  --md-default-fg-color--lighter: #dbd3cc;
  --md-primary-fg-color: #fff;
  --md-primary-bg-color: #7a5f48;
  --md-primary-bg-color--light: #7a5f48;
  --md-accent-fg-color: #7a5f48;
  --md-typeset-a-color: #7a5f48;
  --md-code-fg-color: #333;
  --md-code-bg-color: #f5f5f5;
}

body,
input {
  font-family: Arial, Helvetica, sans-serif;
}

.md-grid {
  max-width: 76rem;
}

.md-header {
  background: #fff;
  border-bottom: 1px solid #dbd3cc;
  color: #7a5f48;
  box-shadow: none;
}

.md-header__title {
  font-weight: 700;
}

.md-nav {
  font-size: 0.75rem;
  line-height: 1.5;
}

.md-nav__title {
  box-shadow: none;
  color: #7a5f48;
}

.md-nav__link--active {
  font-weight: 700;
}

.md-content__inner {
  max-width: 62.5em;
}

.md-typeset {
  color: #3a3a3a;
  font-size: 17px;
  line-height: 1.6;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: #7a5f48;
  font-family: Arial, Helvetica, sans-serif;
  font-style: normal;
  line-height: 1.2;
}

.md-typeset h1 {
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 16px 0 24px;
}

.md-typeset h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 56px 0 14px;
}

.md-typeset h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: normal;
  margin: 36px 0 12px;
}

.md-typeset h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.md-typeset p {
  margin: 0 0 14px;
}

.md-typeset li {
  margin-bottom: 5px;
}

.md-typeset a:hover {
  text-decoration: underline;
}

.md-typeset a:focus-visible {
  outline: 2px solid #7a5f48;
  outline-offset: 3px;
}

.md-typeset blockquote {
  border-left: 5px solid #dbd3cc;
  color: #3a3a3a;
}

/* Paths and program source are distinct from calculator display text. */
.md-typeset code {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  font-size: 90%;
  padding: 2px 4px;
}

.md-typeset pre > code {
  border: 0;
  font-size: inherit;
  padding: 0.8rem;
}

/* Use <kbd> for LCD text, including messages and soft-menu labels. */
.md-typeset kbd {
  background: #dbd3cc;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  color: #000;
  font-family: var(--md-code-font);
  font-size: 90%;
  font-weight: 700;
  padding: 2px 4px;
  white-space: nowrap;
}

/* Physical keys: **XEQ**{.button}, **√x**{.button}, **Σ+**{.button}. */
.md-typeset .button {
  background: #3a3a3a;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  color: #fff;
  display: inline-block;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  padding: 0 5px;
  text-align: center;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Shifted function names use the manual's printed-label colours. */
.md-typeset .or {
  color: #f99a2b;
  font-weight: 700;
}

.md-typeset .bl {
  color: #97b6e6;
  font-weight: 700;
}

/* Blank coloured rectangles identify the shift keys when explicitly needed. */
.md-typeset .ors,
.md-typeset .bls {
  border: 0;
  border-radius: 3px;
  display: inline-block;
  font-size: 16px;
  line-height: 1.5;
  min-width: 1.5em;
  padding: 0 5px;
  text-align: center;
  vertical-align: baseline;
  white-space: nowrap;
}

.md-typeset .ors {
  background: #f99a2b;
}

.md-typeset .bls {
  background: #97b6e6;
}

.md-typeset table:not([class]) {
  border: 0;
  border-collapse: collapse;
  box-shadow: none;
  color: #3a3a3a;
  font-size: inherit;
  margin: 25px 0 50px;
  min-width: 100%;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  background: transparent;
  border-bottom: 0;
  border-top: 1px solid #dbd3cc;
  padding: 8px;
  vertical-align: top;
}

.md-typeset table:not([class]) th {
  border-bottom: 2px solid #dbd3cc;
  font-weight: 700;
}

.md-typeset .admonition,
.md-typeset details {
  background: #fff;
  border-color: #dbd3cc;
  box-shadow: none;
  font-size: inherit;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: #f5f2ef;
  color: #7a5f48;
}

@media screen and (max-width: 600px) {
  .md-typeset h2 {
    font-size: 25px;
    margin-top: 40px;
  }

  .md-typeset h3 {
    font-size: 21px;
    margin-top: 30px;
  }
}

@media print {
  .md-typeset h1,
  .md-typeset h2,
  .md-typeset h3,
  .md-typeset h4 {
    break-after: avoid;
  }

  .md-typeset .button,
  .md-typeset .ors,
  .md-typeset .bls {
    print-color-adjust: exact;
  }
}


/* A quiet footer keeps attention on the notes. */
.md-footer,
.md-footer-meta {
  --md-footer-fg-color: #69645f;
  --md-footer-fg-color--light: #69645f;
  --md-footer-fg-color--lighter: #69645f;
  --md-footer-bg-color: #fff;
  --md-footer-bg-color--dark: #fff;
  background: #fff;
  color: #69645f;
}

.md-footer-meta {
  border-top: 1px solid #e7e2dd;
}

.md-copyright,
.md-copyright__highlight {
  color: #69645f;
}

.md-copyright a {
  color: #7a5f48;
}

/* Article index */
.md-typeset .article-home {
  max-width: 980px;
  padding-top: 8px;
}

.md-typeset .article-home > h1 {
  color: #302d2a;
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 16px 0 12px;
}

.md-typeset .article-home__intro {
  color: #68625c;
  font-size: 17px;
  line-height: 1.6;
  max-width: 65ch;
}

.md-typeset .article-home__intro p {
  margin-bottom: 0;
}

.md-typeset .article-index {
  border-top: 1px solid #dcd6cf;
  margin-top: 32px;
}

.md-typeset .article-entry {
  border-bottom: 1px solid #e7e2dd;
  display: grid;
  gap: 28px;
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 28px 0 30px;
}

.md-typeset .article-entry__meta {
  color: #68625c;
  font-family: var(--md-code-font);
  font-size: 13px;
  line-height: 1.65;
  padding-top: 4px;
}

.md-typeset .article-entry__meta time,
.md-typeset .article-entry__status {
  display: block;
}

.md-typeset .article-entry__meta time {
  white-space: nowrap;
}

.md-typeset .article-entry__status {
  color: #77716b;
  font-family: var(--md-text-font);
  font-size: 12px;
  margin-top: 5px;
}

.md-typeset .article-entry__body {
  min-width: 0;
}

.md-typeset .article-entry h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  margin: 0 0 9px;
}

.md-typeset .article-entry h2 a {
  color: #302d2a;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.md-typeset .article-entry h2 a:hover {
  color: #7a5f48;
  text-decoration: underline;
}

.md-typeset .article-entry h2 .headerlink {
  display: none;
}

.md-typeset .article-entry__body > p {
  color: #56514b;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  max-width: 72ch;
}

.md-typeset ul.article-topics {
  align-items: baseline;
  color: #72685e;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--md-code-font);
  font-size: 13px;
  gap: 4px 0;
  line-height: 1.6;
  list-style: none;
  margin: 13px 0 0;
  padding: 0;
}

.md-typeset ul.article-topics li {
  margin: 0;
  padding: 0;
}

.md-typeset ul.article-topics li + li::before {
  color: #aaa096;
  content: "·";
  display: inline-block;
  padding: 0 10px;
}

@media screen and (max-width: 640px) {
  .md-typeset .article-home > h1 {
    font-size: 29px;
  }

  .md-typeset .article-home__intro {
    font-size: 16px;
  }

  .md-typeset .article-index {
    margin-top: 26px;
  }

  .md-typeset .article-entry {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    padding: 23px 0 25px;
  }

  .md-typeset .article-entry__meta {
    align-items: baseline;
    display: flex;
    gap: 14px;
    padding-top: 0;
  }

  .md-typeset .article-entry__status {
    margin-top: 0;
  }

  .md-typeset .article-entry h2 {
    font-size: 20px;
  }
}


/* The homepage list already serves as its article index. */
body:has(.article-home) .md-nav--primary.md-nav--integrated .md-nav__item--active .md-nav--secondary,
body:has(.article-home) .md-nav--primary > .md-nav__list > .md-nav__item--active > label.md-nav__link {
  display: none;
}

body:has(.article-home) .md-nav--primary > .md-nav__list > .md-nav__item--active > a.md-nav__link {
  display: block;
}


.md-typeset .article-index__empty {
  color: #68625c;
  font-size: 16px;
  margin: 0;
  padding: 24px 0;
}
