/* TaxTriage docs — theme tweaks */

:root {
  --md-text-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Brand colour. Material's named palettes have no #007aff, so the theme uses
   `primary: custom` and the values are defined here. White on #007aff is
   4.02:1 — a little better than the teal it replaces (3.67:1). */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #007aff;
  --md-primary-fg-color--light: #3395ff;
  --md-primary-fg-color--dark: #0062cc;
  --md-primary-bg-color: #fff;
  --md-primary-bg-color--light: rgb(255 255 255 / 70%);
}

/* On the dark scheme the same blue is too dark for body links, so lift it. */
[data-md-color-scheme="slate"][data-md-color-primary="custom"] {
  --md-typeset-a-color: #4da3ff;
}

/* Wider content column: several reference pages have big parameter tables. */
.md-grid {
  max-width: 68rem;
}

/* Tables: allow horizontal scroll instead of squishing, and tighten padding. */
.md-typeset table:not([class]) {
  font-size: 0.72rem;
  display: table;
}

.md-typeset table:not([class]) th {
  white-space: nowrap;
}

.md-typeset table:not([class]) td code {
  white-space: nowrap;
}

/* Diagrams and screenshots: rounded, subtle border, never overflow. */
.md-typeset img,
.md-typeset svg {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Logo in the header needs a little breathing room. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.5rem;
}

/* Mermaid diagrams centered. */
.md-typeset .mermaid {
  text-align: center;
}

/* Section index cards on the home page. */
.md-typeset .grid.cards > ul > li {
  border-radius: 6px;
}

/* ── Embedded interactive report demo ────────────────────────────────── */
.demo-frame {
  position: relative;
  width: 100%;
  height: min(78vh, 900px);
  margin: 1rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  background: var(--md-default-bg-color);
}

.demo-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The report ships its own light theme; keep it readable in dark mode without
   trying to restyle a 4MB self-contained artifact we don't own. */
[data-md-color-scheme="slate"] .demo-frame {
  background: #fff;
}
