/* ===========================================================================
   Aval docs theme. One identity for the landing page and the content pages:
   Sora headings, Manrope body, JetBrains Mono for code and labels, emerald
   accents, and the 2:1 isometric grid of the logo used sparingly. Material
   still owns navigation, search and layout; this file repaints it.
   The brand colours come from stylesheets/brand.css; the other
   colours below are tokens in this file. On light, text in the accent takes
   the link emerald (#047857), because the mark emerald (#059669) is below
   4.5:1 on white.
   =========================================================================== */

/* Sora, Manrope and JetBrains Mono (SIL OFL 1.1), the latin subset of each
   variable font as packaged by Fontsource; licences next to the files in
   assets/fonts/. Served from this site: no font CDN. */
@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/sora-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens --------------------------------------------------------------- */
:root {
  /* Material appends its own system fallback stack to these two. */
  --md-text-font: "Manrope";
  --md-code-font: "JetBrains Mono";
  /* Material defines its --md-*-font-family stacks on body, not :root, so
     these two carry their own fallbacks. */
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
}

[data-md-color-scheme="default"] {
  --c-bg: var(--aval-surface);
  --c-bg-2: #f6f8f7;
  --c-surface-hover: #eef2f1;
  --c-text: #0b1220;
  --c-text-2: #334155;
  --c-text-3: #64748b; /* 4.7:1 on white */
  --c-border: #e5e9ec;
  --c-accent: var(--aval-emerald-text);
  --c-accent-fill: var(--aval-emerald);
  --c-accent-soft: #ecfdf5;
  --c-accent-hover: #065f46;
  --c-on-accent: #ffffff;
  --c-code-bg: #f4f7f6;
  --c-grid: rgba(5, 150, 105, 0.15);
  /* The isometric art: layer faces and sides, the report paper. */
  --c-face: #ffffff;
  --c-side: #e7f6ef;
  --c-side-2: #d9f0e6;
  --c-card: #fffefa;
  --c-rule: #d9d5ca;
  --c-shadow: rgba(11, 18, 32, 0.14);
  --c-warn: #b45309;
  --c-err: #b91c1c;
  --c-info: #2563eb;
}

[data-md-color-scheme="slate"] {
  --c-bg: var(--aval-surface);
  --c-bg-2: #0f1828;
  --c-surface-hover: #16223a;
  --c-text: #e6edf3;
  --c-text-2: #b4c0cc;
  --c-text-3: #8593a3;
  --c-border: #1c2738;
  --c-accent: var(--aval-emerald-text);
  --c-accent-fill: var(--aval-emerald);
  --c-accent-soft: rgba(52, 211, 153, 0.1);
  --c-accent-hover: #6ee7b7;
  --c-on-accent: #04140e;
  --c-code-bg: #0f1828;
  --c-grid: rgba(52, 211, 153, 0.09);
  --c-face: #0f1a2b;
  --c-side: #10241f;
  --c-side-2: #0d1e1a;
  --c-card: #15213a;
  --c-rule: #2a3850;
  --c-shadow: rgba(0, 0, 0, 0.6);
  --c-warn: #fbbf24;
  --c-err: #f87171;
  --c-info: #60a5fa;
}

/* The isometric grid: two line sets at the logo's 26.565° (a 2:1 slope). */
[data-md-color-scheme] {
  --aval-iso-grid:
    repeating-linear-gradient(26.565deg, var(--c-grid) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(153.435deg, var(--c-grid) 0 1px, transparent 1px 32px);
}

/* ---- Tokens -> Material (primary/accent are `custom` in mkdocs.yml) -------- */
[data-md-color-scheme] {
  --md-default-bg-color: var(--c-bg);
  --md-default-fg-color: var(--c-text);
  --md-default-fg-color--light: var(--c-text-2);
  /* Material's own value is a 32% grey that fails AA where it carries text
     (icons, footnotes, the copy button); text-3 clears it in both schemes. */
  --md-default-fg-color--lighter: var(--c-text-3);
  --md-default-fg-color--lightest: var(--c-border);
  --md-typeset-color: var(--c-text-2);

  /* The header and tabs: the page background, ink, a hairline. */
  --md-primary-fg-color: var(--c-bg);
  --md-primary-fg-color--light: var(--c-surface-hover);
  --md-primary-fg-color--dark: var(--c-border);
  --md-primary-bg-color: var(--c-text);
  --md-primary-bg-color--light: var(--c-text-3);

  --md-accent-fg-color: var(--c-accent);
  --md-accent-fg-color--transparent: var(--c-accent-soft);
  --md-accent-bg-color: var(--c-on-accent);
  --md-accent-bg-color--light: var(--c-on-accent);
  --md-typeset-a-color: var(--c-accent);

  --md-code-bg-color: var(--c-code-bg);
  --md-code-fg-color: var(--c-text);
  --md-code-hl-keyword-color: var(--c-accent);
  --md-code-hl-name-color: var(--c-text);
  --md-code-hl-function-color: var(--c-accent);
  --md-code-hl-string-color: var(--c-text-2);
  --md-code-hl-constant-color: var(--c-info);
  --md-code-hl-number-color: var(--c-info);
  --md-code-hl-special-color: var(--c-warn);
  --md-code-hl-comment-color: var(--c-text-3);
  --md-code-hl-generic-color: var(--c-text-3);
  --md-code-hl-operator-color: var(--c-text-2);
  --md-code-hl-punctuation-color: var(--c-text-2);
  --md-code-hl-variable-color: var(--c-text-2);
  --md-code-hl-color: var(--c-accent);
  --md-code-hl-color--light: var(--c-accent-soft);

  --md-typeset-table-color: var(--c-border);
  --md-typeset-table-color--light: var(--c-surface-hover);
  --md-admonition-bg-color: var(--c-bg);
  --md-admonition-fg-color: var(--c-text-2);

  --md-footer-bg-color: var(--c-bg-2);
  --md-footer-bg-color--dark: var(--c-bg-2);
  --md-footer-fg-color: var(--c-text);
  --md-footer-fg-color--light: var(--c-text-3);
  --md-footer-fg-color--lighter: var(--c-text-3);
}

/* ---- Header: wordmark, version pill, search box, repo in mono ------------- */
.md-header,
.md-header--shadow {
  box-shadow: none;
  border-bottom: 1px solid var(--c-border);
}
.md-header__inner {
  height: 2.8rem;
  padding: 0 0.6rem;
}
/* The wordmark replaces the logo and the site name (overrides/partials/
   logo.html), at every width: Material hides the logo below 76.25em. */
.md-header__button.md-logo {
  display: block;
  margin: 0.2rem 0.3rem 0.2rem 0.2rem;
  padding: 0.4rem;
}
.md-header__button.md-logo svg.aval-wordmark,
.md-nav__title .md-logo svg.aval-wordmark {
  height: 1.3rem;
  width: auto;
  fill: none;
}
.aval-wordmark__mark {
  stroke: var(--aval-emerald);
}
.aval-wordmark__word {
  stroke: var(--aval-ink);
}
/* The site name is in the wordmark; the topic stays for the version pill. */
.md-header__topic:first-child > .md-ellipsis {
  display: none;
}
[dir="ltr"] .md-header__title {
  margin-left: 0;
}
.md-version__current {
  margin: 0;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text-3);
  font: 500 0.58rem var(--font-mono);
}
.md-version__current::after {
  display: none;
}
.md-version__current:hover {
  color: var(--c-text);
}
.md-version__link {
  font-family: var(--font-mono);
}
@media screen and (min-width: 60em) {
  .md-search__form,
  .md-search__form:hover {
    height: 1.7rem;
    background-color: var(--c-bg-2);
    border: 1px solid var(--c-border);
    border-radius: 8px;
  }
  .md-search__form:hover {
    border-color: var(--c-text-3);
  }
  .md-search__input {
    font-size: 0.7rem;
  }
  .md-search__input::placeholder,
  .md-search__input + .md-search__icon {
    color: var(--c-text-3);
  }
}
@media screen and (min-width: 60em) {
  .md-header__source {
    width: auto;
    margin-left: 1rem;
  }
}
.md-source {
  font-family: var(--font-mono);
  font-size: 0.62rem;
}
.md-source__repository {
  max-width: none;
  font-weight: 500;
  color: var(--c-text-2);
}

/* ---- Tabs: quiet links, the active one ink with an emerald underline ------ */
/* Material drops the tabs below 76.25em; keep them down to 60em, next to the
   drawer button. */
@media screen and (min-width: 60em) and (max-width: 76.234375em) {
  .md-tabs {
    display: block;
  }
}
.md-tabs {
  background-color: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-3);
}
.md-tabs__list {
  display: flex;
  gap: 1.3rem;
}
.md-tabs__item {
  height: 2.1rem;
  padding: 0;
}
[dir="ltr"] .md-tabs__list {
  margin-left: 1.2rem;
}
.md-tabs__link {
  display: flex;
  align-items: center;
  height: 100%;
  margin-top: 0;
  border-bottom: 2px solid transparent;
  color: var(--c-text-3);
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 1;
  transition: color 160ms, border-color 160ms;
}
.md-tabs__link:is(:hover, :focus) {
  color: var(--c-text);
}
.md-tabs__item--active .md-tabs__link {
  color: var(--c-text);
  font-weight: 600;
  border-bottom-color: var(--c-accent-fill);
}

/* ---- Sidebars: section titles are mono labels ----------------------------- */
.md-nav__item--section > .md-nav__link,
.md-nav__item--section > .md-nav__link[for],
.md-nav--secondary > .md-nav__title {
  font: 600 0.58rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.md-nav__link {
  color: var(--c-text-2);
}
.md-nav__link--active,
.md-nav__link:is(:hover, :focus) {
  color: var(--c-accent);
}
.md-nav--primary .md-nav__link--active {
  font-weight: 600;
}

/* ---- Content pages -------------------------------------------------------- */
.md-typeset :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  color: var(--c-text);
}
.md-typeset h1 {
  margin: 0 0 1em;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
/* The breadcrumbs above the title (navigation.path): a mono label, like the
   eyebrows on the home page. */
.md-path {
  font: 500 0.6rem var(--font-mono);
  letter-spacing: 0.04em;
}
.md-path__link {
  color: var(--c-accent);
}
.md-typeset h2 {
  margin-top: 2em;
  font-size: 1.45em;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.md-typeset h3 {
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.md-typeset :is(h4, h5, h6) {
  font: 600 0.8em var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.md-typeset strong {
  color: var(--c-text);
}

/* A faint iso grid in the top corner of content pages, fading out: the one
   place the home page's grid shows up inside the docs. */
.md-main {
  position: relative;
  isolation: isolate;
}
.md-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(36rem, 60%);
  height: 18rem;
  background: var(--aval-iso-grid);
  -webkit-mask: radial-gradient(100% 100% at 100% 0, #000, transparent 60%);
  mask: radial-gradient(100% 100% at 100% 0, #000, transparent 60%);
  pointer-events: none;
}

/* Tables: a hairline card with mono labels for headers. */
.md-typeset table:not([class]) {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background-color: var(--c-bg);
  font-size: 0.7rem;
}
.md-typeset table:not([class]) th {
  background-color: var(--c-bg-2);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-3);
  font: 600 0.58rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.md-typeset table:not([class]) td {
  border-top: 1px solid var(--c-border);
}
.md-typeset table:not([class]) tbody tr:hover {
  background-color: var(--c-bg-2);
  box-shadow: none;
}

/* Code. */
.md-typeset code,
.md-typeset kbd {
  font-variant-ligatures: none;
}
.md-typeset :not(pre) > code {
  padding: 0.05em 0.35em;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  color: var(--c-text);
}
.md-typeset pre > code {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.md-typeset .highlight span.filename {
  border: 1px solid var(--c-border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--c-bg-2);
  font: 500 0.62rem var(--font-mono);
}
.md-typeset .highlight span.filename + pre > code {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Content tabs (=== "Tab"). */
.md-typeset .tabbed-labels {
  border-bottom: 1px solid var(--c-border);
  box-shadow: none;
}
.md-typeset .tabbed-labels > label {
  color: var(--c-text-3);
  font: 500 0.65rem var(--font-mono);
}
.md-typeset .tabbed-labels > label:hover,
.md-typeset .tabbed-set > input:checked + label {
  color: var(--c-accent);
}
.js .md-typeset .tabbed-labels::before {
  background: var(--c-accent-fill);
}

/* Admonitions: a card with a status edge and a mono title. Material colours
   each type with selectors of specificity (0,3,0); the doubled .md-typeset
   lifts the shared rules above them without !important. */
.md-typeset :is(.admonition, details):is(.note, .info, .abstract, .summary, .tldr, .todo) {
  --aval-tone: var(--c-info);
}
.md-typeset :is(.admonition, details):is(.tip, .hint, .important, .success, .check, .done, .question, .help, .faq, .example) {
  --aval-tone: var(--c-accent-fill);
}
.md-typeset :is(.admonition, details):is(.warning, .caution, .attention) {
  --aval-tone: var(--c-warn);
}
.md-typeset :is(.admonition, details):is(.failure, .fail, .missing, .danger, .error, .bug) {
  --aval-tone: var(--c-err);
}
.md-typeset :is(.admonition, details):is(.quote, .cite) {
  --aval-tone: var(--c-text-3);
}
.md-typeset.md-typeset :is(.admonition, details) {
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--aval-tone, var(--c-info));
  border-radius: var(--radius);
  background-color: var(--c-bg);
  box-shadow: none;
  font-size: 0.72rem;
}
.md-typeset.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  background-color: color-mix(in srgb, var(--aval-tone, var(--c-info)) 8%, transparent);
  border: none;
  color: var(--c-text);
  font: 600 0.62rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.md-typeset.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
  background-color: var(--aval-tone, var(--c-info));
}

/* Buttons: bordered; the primary one filled with the accent. */
.md-typeset .md-button,
.aval-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background-color: var(--c-bg);
  color: var(--c-text);
  font: 600 0.75rem var(--md-text-font-family);
  transition: background-color 90ms, border-color 90ms, color 90ms;
}
.md-typeset .md-button:is(:hover, :focus),
.aval-btn:is(:hover, :focus) {
  background-color: var(--c-bg-2);
  border-color: var(--c-text-3);
  color: var(--c-text);
}
.md-typeset .md-button--primary,
.aval-btn--primary {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-on-accent);
  box-shadow: 0 6px 18px -8px var(--c-accent-fill);
}
[data-md-color-scheme="slate"] :is(.md-typeset .md-button--primary, .aval-btn--primary) {
  background-color: var(--c-accent-fill);
  border-color: var(--c-accent-fill);
}
.md-typeset .md-button--primary:is(:hover, :focus),
.aval-btn--primary:is(:hover, :focus) {
  background-color: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  color: var(--c-on-accent);
}

/* ---- Diagrams and glossary tooltips --------------------------------------- */
/* A Mermaid diagram (javascripts/diagrams.js) sits on a hairline card over a
   faint iso grid, like the home page's art. The diagram's colours are in
   diagrams.js; they use the tokens above. */
.md-typeset .aval-diagram {
  margin: 1.2em 0 1.6em;
  padding: 1.2rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--aval-iso-grid), var(--c-bg-2);
  text-align: center;
  overflow-x: auto;
}
.md-typeset .aval-diagram svg {
  max-width: 100%;
  height: auto;
}
/* The fence's source shows, quietly, until the diagram replaces it. */
.md-typeset pre.aval-mermaid {
  min-height: 6rem;
  color: var(--c-text-3);
}
/* Glossary terms (docs/includes/abbreviations.md): a dotted emerald
   underline; Material's content.tooltips shows the definition. */
.md-typeset abbr {
  border-bottom: 1px dotted var(--c-accent);
  text-decoration: none;
  cursor: help;
}

/* ---- Footer: prev/next on content pages, then one line -------------------- */
.md-footer {
  border-top: 1px solid var(--c-border);
}
.md-footer__inner:not([hidden]) {
  border-bottom: 1px solid var(--c-border);
}
.md-footer__direction {
  font: 500 0.58rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.md-footer__title {
  font-family: var(--font-display);
}
.md-footer-meta {
  background-color: var(--c-bg-2);
}
.md-footer-meta__inner {
  padding: 0 0.6rem;
}
.md-copyright.aval-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  width: 100%;
  margin: 0;
  padding: 1.2rem 0.6rem;
  color: var(--c-text-3);
  font-size: 0.68rem;
}
.aval-footer__mark {
  width: 1rem;
  stroke: var(--aval-emerald);
}
.aval-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-left: auto;
}
.md-typeset .aval-footer a,
.aval-footer a {
  color: var(--c-text-3);
}
.aval-footer a:is(:hover, :focus) {
  color: var(--c-accent);
}

/* ===========================================================================
   Home (overrides/home.html). Pixel sizes follow the design mockup; widths
   follow Material's grid (61rem).
   =========================================================================== */
/* The sections replace <main>; the empty one that follows them goes. */
.aval-home ~ .md-main {
  display: none;
}
.aval-home {
  flex-grow: 1; /* keeps the footer at the bottom, in <main>'s place */
  color: var(--c-text-2);
  font-size: 15.5px;
  line-height: 1.65;
}
.aval-wrap {
  max-width: 61rem;
  margin: 0 auto;
  padding: 0 1.2rem;
}
.aval-home :is(.aval-hero__inner, .aval-run__inner) > * {
  min-width: 0;
}
.aval-home h2 {
  margin: 10px 0 0;
  font: 650 32px/1.2 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--c-text);
}
.aval-home p {
  margin: 0;
}
.aval-home :is(p, li) code {
  padding: 1px 5px;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  background: var(--c-code-bg);
  color: var(--c-text);
  font: 13px var(--font-mono);
  font-variant-ligatures: none;
}
.aval-eyebrow {
  font: 500 12.5px var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--c-accent);
}

/* Hero: copy left, the isometric stack right, over a faint iso grid. */
.aval-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}
.aval-hero__grid {
  position: absolute;
  inset: 0;
  background: var(--aval-iso-grid);
  -webkit-mask: radial-gradient(55% 80% at 74% 55%, #000 15%, transparent 72%);
  mask: radial-gradient(55% 80% at 74% 55%, #000 15%, transparent 72%);
}
.aval-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 40px;
  align-items: center;
  padding-top: 30px;
  padding-bottom: 30px;
}
.aval-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 8px;
  border: 1px solid color-mix(in srgb, var(--c-accent-fill) 25%, transparent);
  border-radius: 999px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font: 500 12.5px var(--font-mono);
}
.aval-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-accent-fill);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent-fill) 22%, transparent);
}
.aval-hero__title {
  margin: 20px 0 18px;
  font: 700 40px/1.14 var(--font-display);
  letter-spacing: -0.035em;
  color: var(--c-text);
  white-space: nowrap;
}
.aval-hero__title em {
  position: relative;
  z-index: 0;
  font-style: normal;
  color: var(--c-accent-fill);
}
.aval-hero__title em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--c-accent-fill) 18%, transparent);
}
.aval-hero__lead {
  max-width: 31em;
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-text-2);
}
.aval-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.aval-home .aval-btn {
  padding: 11px 20px;
  font-size: 15px;
}
.aval-btn--gh svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  fill: currentColor;
}
.aval-install {
  display: inline-flex;
  max-width: 100%;
  margin-top: 20px;
  padding: 9px 14px;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text-2);
  font: 500 13.5px var(--font-mono);
}
.aval-install b {
  margin-right: 10px;
  color: var(--c-accent-fill);
  font-weight: 500;
}
/* The installer line is longer than the hero column at every width. Wrap it
   the way a terminal does, filling each line, so `| bash` stays visible
   instead of hiding behind a scrollbar. Copying it still gives one line. */
.aval-install code {
  font: inherit;
  font-variant-ligatures: none;
  word-break: break-all;
}
.aval-install__alt {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-text-3);
}
.aval-install__alt a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* The stack and the lifted verify report, one 2:1 iso projection. */
.aval-hero__art {
  display: flex;
  justify-content: flex-end;
}
.aval-stack {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}
.aval-stack .edge {
  fill: none;
  stroke: var(--c-accent-fill);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.aval-stack .top {
  fill: var(--c-face);
}
.aval-stack .side {
  fill: var(--c-side);
}
.aval-stack .side.dk {
  fill: var(--c-side-2);
}
.aval-stack .glow {
  fill: var(--c-accent-fill);
  opacity: 0.14;
  filter: blur(7px);
}
.aval-stack :is(.ldr, .drop) {
  fill: none;
  stroke: var(--c-text-3);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  opacity: 0.7;
}
.aval-stack .drop {
  stroke: var(--c-accent-fill);
  opacity: 0.55;
}
.aval-stack .dot {
  fill: var(--c-accent-fill);
}
.aval-stack text {
  fill: var(--c-text-3);
  font: 500 12.5px var(--font-mono);
}
.aval-stack .em {
  fill: var(--c-text);
  font-weight: 600;
}
.aval-stack .lift {
  filter: drop-shadow(0 1px 0 var(--c-rule)) drop-shadow(0 18px 18px var(--c-shadow));
  animation: aval-lift 1.4s cubic-bezier(0.2, 0.9, 0.25, 1.1) 0.2s both;
}
[data-md-color-scheme="slate"] .aval-stack .lift {
  filter: drop-shadow(0 18px 26px var(--c-shadow));
}
@keyframes aval-lift {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.aval-stack .paper {
  fill: var(--c-card);
}
.aval-stack .rule {
  stroke: var(--c-rule);
  stroke-dasharray: 3 3;
}
.aval-stack .t {
  fill: var(--c-text);
  font: 600 17px var(--font-display);
  letter-spacing: -0.01em;
}
.aval-stack :is(.s, .k) {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.aval-stack .v {
  fill: var(--c-text);
  font-size: 13px;
}
.aval-stack .stamp rect {
  fill: color-mix(in srgb, var(--c-card) 85%, transparent);
  stroke: var(--c-accent-fill);
  stroke-width: 2.2;
}
.aval-stack .stamp .in {
  fill: none;
  stroke-width: 1;
}
.aval-stack .stamp text {
  fill: var(--c-accent-fill);
  font: 700 16px var(--font-mono);
  letter-spacing: 0.12em;
}

/* See it run: a terminal with real CLI output, and the three outcomes. */
.aval-run__inner {
  display: grid;
  grid-template-columns: 640px 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.aval-run h2 {
  font-size: 28px;
}
/* The terminal is dark in both schemes. */
.aval-term {
  margin: 0;
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  background: #0b1220;
  box-shadow: 0 30px 60px -30px rgba(11, 18, 32, 0.55), 0 0 0 6px color-mix(in srgb, var(--c-accent-fill) 7%, transparent);
  color: #cbd5e1;
  font: 13.5px/1.75 var(--font-mono);
}
[data-md-color-scheme="slate"] .aval-term {
  border-color: #1c2738;
  background: #060b14;
}
.aval-term__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid #1c2738;
}
.aval-term__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #273244;
}
.aval-term__bar span {
  margin-left: 10px;
  color: #64748b;
  font-size: 12px;
}
.aval-term__bar .aval-term__tag {
  margin-left: auto;
  padding: 0 6px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 5px;
  color: #34d399;
  font-size: 11px;
}
.aval-term pre {
  margin: 0;
  padding: 18px 20px 20px;
  font: inherit;
  font-variant-ligatures: none;
  white-space: pre;
}
.aval-term .pr,
.aval-term .g {
  color: #34d399;
}
.aval-term .c {
  color: #64748b;
}
.aval-term .y {
  color: #fbbf24;
}
.aval-term .w {
  color: #f1f5f9;
  font-weight: 600;
}
.aval-term .d {
  color: #5b6b80;
}
.aval-term .hit {
  display: block;
  margin: 2px -20px 6px;
  padding: 4px 20px 4px 17px;
  border-left: 3px solid #34d399;
  background: rgba(52, 211, 153, 0.08);
}
.aval-term .sep {
  display: block;
  margin: 10px 0;
  border-top: 1px dashed #1c2738;
}
.aval-term .cur {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #34d399;
  vertical-align: -3px;
  animation: aval-blink 1.1s steps(1) infinite;
}
@keyframes aval-blink {
  50% {
    opacity: 0;
  }
}
.aval-run__explain ol {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: aval-step;
}
.aval-run__explain li {
  position: relative;
  padding: 14px 0 14px 44px;
  border-top: 1px solid var(--c-border);
  counter-increment: aval-step;
  font-size: 16px;
}
.aval-run__explain li:last-child {
  border-bottom: 1px solid var(--c-border);
}
.aval-run__explain li::before {
  content: counter(aval-step);
  position: absolute;
  top: 14px;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font: 600 12.5px/26px var(--font-mono);
  text-align: center;
}
.aval-run__explain b {
  color: var(--c-text);
  font-weight: 700;
}

/* Metric strip. */
.aval-metrics {
  padding: 40px 0 22px;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-2);
}
.aval-metrics__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.aval-metric {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-bg);
}
.aval-metric__n {
  font: 700 36px/1 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--c-text);
  white-space: nowrap;
}
.aval-metric__n small {
  margin-left: 4px;
  color: var(--c-accent-fill);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.aval-metric p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--c-text-3);
}
.aval-metric p b {
  color: var(--c-text);
  font-weight: 700;
}
.aval-metric__bar {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}
.aval-metric__bar i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--c-accent-fill) 22%, transparent);
}
.aval-metric__bar i.on {
  background: var(--c-accent-fill);
}
.aval-home .aval-metrics__note {
  margin-top: 16px;
  text-align: center;
  color: var(--c-text-3);
  font: 500 11.5px var(--font-mono);
}

/* How it works: three steps with the layer icons of the logo. */
.aval-how .aval-wrap {
  padding-top: 80px;
  padding-bottom: 96px;
}
.aval-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.aval-step {
  padding: 24px 26px 26px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-bg);
}
.aval-step__k {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--c-accent);
  font: 600 12px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.aval-step__k svg {
  width: 38px;
  height: 38px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--c-accent-soft);
  fill: none;
  stroke: var(--c-accent-fill);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aval-step h3 {
  margin: 0 0 6px;
  font: 600 19px var(--font-display);
  letter-spacing: -0.015em;
  color: var(--c-text);
}
.aval-step p {
  font-size: 15px;
  color: var(--c-text-3);
}
.aval-home .aval-failclosed {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  color: var(--c-text-3);
  font: 500 13px var(--font-mono);
}
.aval-failclosed::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c-accent-fill);
}

@media (max-width: 1100px) {
  .aval-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .aval-hero__art {
    justify-content: center;
  }
  .aval-hero__grid {
    -webkit-mask: radial-gradient(70% 45% at 50% 75%, #000 15%, transparent 72%);
    mask: radial-gradient(70% 45% at 50% 75%, #000 15%, transparent 72%);
  }
  .aval-run__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .aval-term {
    max-width: 720px;
  }
}
@media (max-width: 820px) {
  .aval-metrics__inner,
  .aval-steps {
    grid-template-columns: 1fr;
  }
  /* The one-line title is wider than the column from here down. */
  .aval-hero__title {
    white-space: normal;
  }
}
@media (max-width: 560px) {
  .aval-home {
    font-size: 15px;
  }
  .aval-wrap {
    padding-right: 18px;
    padding-left: 18px;
  }
  .aval-hero__title {
    font-size: 31px;
  }
  .aval-hero__lead {
    font-size: 16.5px;
  }
  .aval-install {
    display: flex;
    font-size: 11.5px;
  }
  .aval-term {
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.7;
  }
  .aval-term pre {
    padding: 14px 14px 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .aval-term .hit {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 11px;
  }
  .aval-run h2 {
    font-size: 24px;
  }
  .aval-home h2 {
    font-size: 28px;
  }
  .aval-hero__art {
    margin: 0 -18px;
  }
}

/* ---- Motion --------------------------------------------------------------- */
/* navigation.instant swaps pages client-side; the content fades in. */
@media (prefers-reduced-motion: no-preference) {
  .md-content__inner {
    animation: aval-page-in 0.28s ease both;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.28s;
  }
}
@keyframes aval-page-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aval-stack .lift,
  .aval-term .cur {
    animation: none;
  }
}

/* ---- Header: keep the mike version selector visible ------------------------
   mike injects the version selector into the header's site-name topic.
   Material swaps that topic for the page-title topic on scroll (adds
   .md-header__title--active), and with sticky tabs that state is set even at
   the top, so the selector never showed. Keep the site-name topic and drop
   the swap; the page title still shows as the content h1. */
.md-header__title--active .md-header__ellipsis > .md-header__topic:first-child {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.md-header__title--active .md-header__ellipsis > .md-header__topic[data-md-component="header-topic"] {
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

/* Version selector: open on click only (javascripts/version-selector.js),
   never on hover or focus. Material opens .md-version__list on :hover, and the
   list sits over the tabs, so it opened when the mouse crossed the header and
   swallowed the tabs' clicks. The suppress rules are gated with
   :not(.md-version--open) because clicking the trigger focuses it, and an
   ungated :focus-within rule (0,3,0) would outrank the open rule. The open
   list is capped so a long version list scrolls. */
.md-version:not(.md-version--open):hover .md-version__list,
.md-version:not(.md-version--open):focus-within .md-version__list {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  animation: none;
}
.md-version.md-version--open .md-version__list {
  max-height: 75vh;
  opacity: 1;
  pointer-events: auto;
  animation: none;
}
/* max-height:0 and opacity:0 hide the closed list from the eye but not from
   the tab order; visibility takes its links out of the sequence too. */
.md-version .md-version__list {
  visibility: hidden;
}
.md-version.md-version--open .md-version__list {
  visibility: visible;
}

/* ---- Accessibility -------------------------------------------------------- */
/* One accent outline for every focusable element, on :focus-visible only. */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
/* Material leaves tabindex="0" on the closed, zero-height search results: an
   invisible tab stop on every page. The selector mirrors Material's own
   `[data-md-toggle=search]:checked ~ .md-header`. */
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__output {
  visibility: hidden;
}
/* The palette switch is a 0x0 radio behind the visible icon label; ring the
   label instead. */
.md-option:focus-visible + label:not([hidden]) {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
/* Inline links are underlined (WCAG 1.4.1): the accent does not reach 3:1
   against body text in either scheme. Buttons, nav and heading anchors have
   nothing around them to be confused with; image links keep a clean edge. */
.md-typeset p > a:not(.md-button),
.md-typeset li > a:not(.md-button),
.md-typeset td > a:not(.md-button),
.md-typeset dd > a:not(.md-button) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.md-typeset p > a:has(> img),
.md-typeset li > a:has(> img),
.md-typeset td > a:has(> img) {
  text-decoration: none;
}

/* Outdated-version banner (overrides/main.html): the warning tone. Material
   pins data-md-color-scheme="default" on the banner, so dark mode restores
   its own colours. */
.md-banner--warning {
  background-color: color-mix(in srgb, var(--c-warn) 8%, var(--c-bg));
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
[data-md-color-scheme="slate"] .md-banner--warning {
  --c-bg: #0b1220;
  --c-text: #e6edf3;
  --c-border: #1c2738;
  --c-warn: #fbbf24;
  --md-typeset-a-color: #34d399;
}
