/*
  Palette
  ink      #1F2429   body text
  muted    #5E6873   secondary text
  line     #DADFE3   borders and rules
  field    #24704A   links and the ruling box
  paper    #FFFFFF   background
*/

[data-md-color-scheme="default"] {
  --ink: #1f2429;
  --muted: #5e6873;
  --line: #dadfe3;
  --field: #24704a;
  --ruling-bg: #f2f6f3;

  --md-default-bg-color: #ffffff;
  --md-default-fg-color: var(--ink);
  --md-default-fg-color--light: var(--muted);
  --md-typeset-color: var(--ink);
}

[data-md-color-scheme="slate"] {
  --ink: #e4e7ea;
  --muted: #9aa3ad;
  --line: #2e343a;
  --field: #79c29a;
  --ruling-bg: #1d2521;

  --md-default-bg-color: #181b1f;
  --md-default-fg-color: var(--ink);
  --md-default-fg-color--light: var(--muted);
  --md-typeset-color: var(--ink);
}

[data-md-color-scheme] {
  /* Header and tabs sit on the page background instead of a colored bar. */
  --md-primary-fg-color: var(--md-default-bg-color);
  --md-primary-fg-color--light: var(--md-default-bg-color);
  --md-primary-fg-color--dark: var(--md-default-bg-color);
  --md-primary-bg-color: var(--ink);
  --md-primary-bg-color--light: var(--muted);

  --md-accent-fg-color: var(--field);
  --md-typeset-a-color: var(--field);

  --md-footer-bg-color: var(--md-default-bg-color);
  --md-footer-bg-color--dark: var(--md-default-bg-color);
  --md-footer-fg-color: var(--muted);
  --md-footer-fg-color--light: var(--muted);
  --md-footer-fg-color--lighter: var(--muted);
}

/* Header: one hairline instead of a shadow. */
.md-header,
.md-header--shadow {
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.md-tabs {
  border-bottom: 1px solid var(--line);
}
.md-tabs__link {
  opacity: 1;
  color: var(--muted);
  font-size: 0.75rem;
}
.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  color: var(--ink);
}
.md-tabs__item--active .md-tabs__link {
  font-weight: 600;
}
.md-header__title {
  font-weight: 600;
}
.md-search__form {
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* Type */
.md-typeset {
  font-size: 0.82rem;
  line-height: 1.65;
}
.md-typeset h1 {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.7em;
  letter-spacing: -0.01em;
  margin-bottom: 0.8em;
}
.md-typeset h2 {
  font-weight: 650;
  font-size: 1.25em;
  margin-top: 2em;
}
.md-typeset h3 {
  font-weight: 600;
  font-size: 1.05em;
}
.md-typeset a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.md-typeset a.headerlink {
  text-decoration: none;
}

/* Tables: plain rows, no card treatment. */
.md-typeset table:not([class]) {
  border: none;
  box-shadow: none;
  font-size: 0.78rem;
  border-radius: 0;
}
.md-typeset table:not([class]) th {
  background: none;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}
.md-typeset table:not([class]) td {
  border-top: 1px solid var(--line);
}
.md-typeset table:not([class]) tr:hover {
  background: none;
  box-shadow: none;
}

/* Section list on the home page */
.md-typeset dl dt {
  font-weight: 600;
  margin-top: 1em;
}
.md-typeset dl dd {
  margin-top: 0.15em;
  margin-left: 0;
  color: var(--muted);
}

/*
  The ruling box: the proposed clarification text in each casebook entry.
  It's the main thing a reader is looking for, so it's the one styled element.
*/
.md-typeset .admonition.ruling {
  border: 1px solid var(--line);
  border-left: 4px solid var(--field);
  border-radius: 0;
  background: var(--ruling-bg);
  box-shadow: none;
  font-size: 0.82rem;
  padding: 0.2rem 1rem 0.6rem;
}
.md-typeset .ruling > .admonition-title {
  background: none;
  border: none;
  padding: 0.6rem 0 0;
  margin: 0;
  font-weight: 700;
  color: var(--field);
}
.md-typeset .ruling > .admonition-title::before {
  display: none;
}

/* Footer: quiet, single line. */
.md-footer-meta {
  border-top: 1px solid var(--line);
}
.md-copyright {
  color: var(--muted);
}

/* Visible keyboard focus everywhere. */
.md-typeset a:focus-visible,
.md-tabs__link:focus-visible,
.md-nav__link:focus-visible {
  outline: 2px solid var(--field);
  outline-offset: 2px;
}

/* Keep line length readable even on pages without sidebars. */
.md-content__inner {
  max-width: 44rem;
}

/* The default logo is a generic icon; the site name is enough. */
.md-header__button.md-logo {
  display: none;
}
@media screen and (max-width: 76.234375em) {
  .md-header__title { margin-left: 0.4rem; }
}

[dir] .md-typeset dl dd {
  margin-left: 0;
}
