.article-theme-controls {
  display: none;
}

@media screen {
  html {
    --article-page-bg: #ffffff;
    --article-body-bg: #ffffff;
    --article-text: #141414;
    --article-heading: #713823;
    --article-muted: #3b5158;
    --article-link: #174f68;
    --article-notice-bg: #faf5f1;
    --article-notice-border: #d08b69;
    --article-panel-bg: #f1f7f8;
    --article-panel-border: #a7c5cc;
    --article-table-head: #f7e4d8;
    --article-border: #888888;
    --article-control-bg: #ffffff;
    --article-focus: #0a628a;
    background: var(--article-page-bg);
    color: var(--article-text);
  }

  html[data-theme="dark"] {
    --article-page-bg: #0b1220;
    --article-body-bg: #111b2a;
    --article-text: #e4e9f1;
    --article-heading: #f0b58e;
    --article-muted: #c5d0df;
    --article-link: #8acdf6;
    --article-notice-bg: #30241e;
    --article-notice-border: #c99674;
    --article-panel-bg: #18283a;
    --article-panel-border: #526b83;
    --article-table-head: #3b2e28;
    --article-border: #64748b;
    --article-control-bg: #18283a;
    --article-focus: #8acdf6;
  }

  body {
    background: var(--article-body-bg);
    color: var(--article-text);
  }

  h1,
  h2,
  h3 {
    color: var(--article-heading);
  }

  a,
  .web-nav a,
  .references a {
    color: var(--article-link);
  }

  a:hover {
    text-decoration: underline;
  }

  a:focus-visible,
  .article-theme-controls select:focus-visible {
    outline: 3px solid var(--article-focus);
    outline-offset: 3px;
  }

  .translation {
    color: var(--article-text);
    background: var(--article-notice-bg);
    border-color: var(--article-notice-border);
  }

  .meta,
  .affiliation,
  .references,
  .figure-note {
    color: var(--article-muted);
  }

  .abstract-content,
  .figure {
    color: var(--article-text);
    background: var(--article-panel-bg);
    border-color: var(--article-panel-border);
  }

  table {
    color: var(--article-text);
    background: var(--article-body-bg);
  }

  th,
  td {
    border-color: var(--article-border);
  }

  th {
    background: var(--article-table-head);
  }

  /* The display copies of paper/ink artwork follow the page palette. */
  html[data-theme="dark"] .equation {
    color: var(--article-text);
    background: var(--article-body-bg);
    padding: 8px;
    border-radius: 4px;
  }

  .equation img,
  .figure img {
    background: transparent;
  }

  .article-theme-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 16px;
    color: var(--article-text);
    font-size: 14px;
    text-align: start;
  }

  .article-theme-controls select {
    min-height: 44px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--article-border);
    border-radius: 6px;
    background: var(--article-control-bg);
    color: var(--article-text);
    font: inherit;
    cursor: pointer;
  }
}

@media print {
  html {
    color-scheme: light !important;
  }

  .article-theme-controls {
    display: none !important;
  }
}
