/* ---------------------------------------------------------------------------
   Arvo docs.

   The goal is a page that does not read as rendered Markdown: flat surfaces
   with one hairline border instead of shadows, a narrow measure, a quiet
   sidebar, and type that carries the hierarchy so the chrome does not have to.
   --------------------------------------------------------------------------- */

/* The brand palette, from the brand sheet: ground, chrome, accent, gold. */
:root {
  --md-primary-fg-color: #1e293b;
  --md-primary-fg-color--light: #2563eb;
  --md-primary-fg-color--dark: #0a0f1a;
  --md-accent-fg-color: #2563eb;
  --md-accent-fg-color--transparent: rgba(37, 99, 235, 0.1);

  --arvo-hairline: rgba(15, 23, 42, 0.11);
  --arvo-surface: rgba(15, 23, 42, 0.022);
  --arvo-gold: #b08900;
  --md-default-font-weight: 400;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0a0f1a;
  --md-default-fg-color: #f8f9fa;
  --md-code-bg-color: #131c2e;
  --md-typeset-a-color: #d4af37;

  --arvo-hairline: rgba(248, 249, 250, 0.13);
  --arvo-surface: rgba(248, 249, 250, 0.03);
  --arvo-gold: #d4af37;
}

/* --- Shell -----------------------------------------------------------------
   One hairline under the header instead of a shaded bar, and no second row of
   chrome now that the tab bar is gone. */
.md-header {
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  box-shadow: none;
  border-bottom: 1px solid var(--arvo-hairline);
}

.md-header__title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-search__form {
  background-color: var(--arvo-surface);
  border: 1px solid var(--arvo-hairline);
  border-radius: 0.4rem;
  box-shadow: none;
}

.md-search__form:hover {
  background-color: var(--arvo-surface);
}

/* --- Measure and rhythm ---------------------------------------------------
   Prose wants ~70 characters. Material's default column is wider than that on
   a large screen, which is the single biggest reason docs read as a wall. */
.md-content {
  max-width: 48rem;
  margin: 0 auto;
}

.md-typeset {
  font-size: 0.775rem;
  line-height: 1.72;
}

.md-typeset h1 {
  font-weight: 650;
  font-size: 1.85rem;
  letter-spacing: -0.022em;
  margin-bottom: 1.4rem;
  color: var(--md-default-fg-color);
}

.md-typeset h2 {
  font-weight: 620;
  font-size: 1.25rem;
  letter-spacing: -0.014em;
  margin-top: 2.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--arvo-hairline);
}

.md-typeset h3 {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.008em;
  margin-top: 1.9rem;
}

/* A first heading needs no rule above it. */
.md-typeset h1 + h2,
.md-typeset > h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 1.4rem;
}

/* --- Sidebar --------------------------------------------------------------
   Section labels as small caps, links quiet until hovered. */
.md-nav {
  font-size: 0.7rem;
}

.md-nav__title {
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.md-nav__item--section > .md-nav__link {
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.md-nav__link {
  border-radius: 0.3rem;
  padding: 0.16rem 0.4rem;
  transition: background-color 120ms ease, color 120ms ease;
}

.md-nav__link:hover {
  background-color: var(--arvo-surface);
}

.md-nav__link--active {
  background-color: var(--md-accent-fg-color--transparent);
  font-weight: 600;
}

/* --- Cards ----------------------------------------------------------------
   Flat, hairline, a small lift on hover. No drop shadow: a shadow on a card on
   a page is three surfaces pretending to be depth. */
.md-typeset .grid.cards {
  grid-gap: 0.7rem;
}

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--arvo-hairline);
  border-radius: 0.55rem;
  box-shadow: none;
  padding: 0.95rem 1.05rem;
  background-color: var(--arvo-surface);
  transition: border-color 140ms ease, transform 140ms ease;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
  transform: translateY(-2px);
  box-shadow: none;
}

/* The bold lead line of a card is its title; give it the weight of one. */
.md-typeset .grid.cards > ul > li > p:first-child strong {
  font-size: 0.85rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}

/* --- Code ---------------------------------------------------------------- */
.md-typeset pre > code {
  border-radius: 0.5rem;
}

.md-typeset .highlight {
  border: 1px solid var(--arvo-hairline);
  border-radius: 0.5rem;
  overflow: hidden;
}

.md-typeset .highlight > pre {
  margin: 0;
}

/* A file name on a code block reads as a tab, not as a caption. */
.md-typeset .highlight span.filename {
  border-bottom: 1px solid var(--arvo-hairline);
  background-color: var(--arvo-surface);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.75rem;
}

.md-typeset code {
  border-radius: 0.25rem;
  font-size: 0.85em;
  padding: 0.1em 0.32em;
}

/* --- Tables -------------------------------------------------------------- */
.md-typeset table:not([class]) {
  border: none;
  border-radius: 0;
  font-size: 0.72rem;
  box-shadow: none;
}

.md-typeset table:not([class]) th {
  background-color: transparent;
  border-bottom: 1px solid var(--md-default-fg-color);
  font-weight: 640;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  padding: 0.5rem 0.8rem;
}

.md-typeset table:not([class]) td {
  border-bottom: 1px solid var(--arvo-hairline);
  padding: 0.55rem 0.8rem;
  vertical-align: top;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

/* --- Admonitions --------------------------------------------------------
   A left accent rule and a flat body, rather than a tinted box with a bar. */
.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--arvo-hairline);
  border-left: 2px solid var(--md-accent-fg-color);
  border-radius: 0.45rem;
  box-shadow: none;
  font-size: 0.74rem;
  background-color: var(--arvo-surface);
}

.md-typeset .admonition-title,
.md-typeset summary {
  background-color: transparent !important;
  font-weight: 640;
  letter-spacing: -0.005em;
}

.md-typeset .admonition-title::before,
.md-typeset summary::before {
  opacity: 0.8;
}

.md-typeset .admonition.warning,
.md-typeset .admonition.caution {
  border-left-color: #d29922;
}

.md-typeset .admonition.danger,
.md-typeset .admonition.failure {
  border-left-color: #d64545;
}

.md-typeset .admonition.tip,
.md-typeset .admonition.success {
  border-left-color: #3a9d5d;
}

/* --- Blockquote: for the one-line principles ---------------------------- */
.md-typeset blockquote {
  border-left: 2px solid var(--arvo-gold);
  color: var(--md-default-fg-color);
  font-size: 0.83rem;
  font-style: normal;
  opacity: 0.92;
  padding-left: 1rem;
}

/* --- Mermaid ------------------------------------------------------------- */
.md-typeset .mermaid {
  border: 1px solid var(--arvo-hairline);
  border-radius: 0.55rem;
  background-color: var(--arvo-surface);
  padding: 1.1rem 0.6rem;
  margin: 1.5rem 0;
  text-align: center;
}

/* --- Tabbed sets: platform pickers -------------------------------------- */
.md-typeset .tabbed-set > label {
  font-size: 0.7rem;
  font-weight: 620;
  letter-spacing: 0.005em;
  opacity: 0.6;
}

.md-typeset .tabbed-set > input:checked + label {
  opacity: 1;
  border-color: var(--md-accent-fg-color);
}

/* --- Footer -------------------------------------------------------------- */
.md-footer {
  background-color: var(--md-default-bg-color);
  border-top: 1px solid var(--arvo-hairline);
}

.md-footer-meta {
  background-color: transparent;
  font-size: 0.66rem;
}

.md-copyright {
  opacity: 0.55;
}

/* --- Arvo's own bits ----------------------------------------------------- */
.arvo-hero {
  margin: 0.5rem 0 2.4rem;
}

.arvo-hero h1 {
  font-size: 2.3rem;
  margin-bottom: 0.3rem;
}

.arvo-hero p.tagline {
  font-size: 1.02rem;
  line-height: 1.55;
  opacity: 0.72;
  margin-top: 0;
  max-width: 34rem;
}

.arvo-hero-image {
  display: block;
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid var(--arvo-hairline);
}

.arvo-card {
  text-align: center;
  margin: 2.4rem 0;
}

.arvo-card img {
  border-radius: 0.6rem;
  max-width: 100%;
}

/* The three verdicts, wherever they are named. */
.arvo-verdict-supported {
  color: #3a9d5d;
  font-weight: 620;
}

.arvo-verdict-inconclusive {
  color: #b58900;
  font-weight: 620;
}

.arvo-verdict-notsupported {
  color: #d64545;
  font-weight: 620;
}

[data-md-color-scheme="slate"] .arvo-verdict-inconclusive {
  color: #fbbf24;
}

/* Narrow screens: the measure is the viewport, and the gutters stay. */
@media screen and (max-width: 76.1875em) {
  .md-content {
    max-width: none;
  }
}

/* Diagrams drawn inline rather than screenshotted, so they theme with the page
   and stay diffable. Screenshots of Arvo itself are still deferred. */
.arvo-figure {
  margin: 1.4rem 0;
}

.arvo-figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 30rem;
}

.arvo-figure--wide svg {
  max-width: 42rem;
}

.arvo-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.75;
}
