/* Greyhaven design system for mkdocs-material.
   Colors are vendored from the design system's tokens/color.json;
   do not hand-tune values here, re-vendor from the design system. */

/* Aspekta: UI labels, nav, buttons (self-hosted, same weights as the web UI). */
@font-face { font-family: 'Aspekta'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Aspekta-400.woff2') format('woff2'); }
@font-face { font-family: 'Aspekta'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Aspekta-500.woff2') format('woff2'); }
@font-face { font-family: 'Aspekta'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Aspekta-600.woff2') format('woff2'); }
@font-face { font-family: 'Aspekta'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Aspekta-700.woff2') format('woff2'); }

/* Source Serif 4: headings and body content (variable font, latin subset). */
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('../fonts/source-serif-4-roman.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('../fonts/source-serif-4-italic.woff2') format('woff2'); }

:root {
  --md-text-font: 'Aspekta';
  /* The design system's mono token is the system mono stack; no font file. */
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas;
  --gh-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
}

/* Light: warm off-white surfaces, off-black text, orange accent. */
[data-md-color-scheme='default'] {
  --md-default-bg-color: #F9F9F7;           /* off-white */
  --md-default-fg-color: #161614;           /* off-black */
  --md-default-fg-color--light: #575753;    /* grey.7 */
  --md-default-fg-color--lighter: #A6A69F;  /* grey.4 */
  --md-default-fg-color--lightest: #F0F0EC; /* grey.1 */
  --md-primary-fg-color: #161614;
  --md-primary-fg-color--light: #2F2F2C;
  --md-primary-fg-color--dark: #161614;
  --md-primary-bg-color: #F9F9F7;
  --md-primary-bg-color--light: #DDDDD7;
  --md-accent-fg-color: #D95E2A;
  --md-accent-fg-color--transparent: rgba(217, 94, 42, 0.1);
  --md-typeset-a-color: #D95E2A;
  --md-code-bg-color: #F0F0EC;              /* grey.1 */
  --md-code-fg-color: #2F2F2C;              /* grey.8 */
  --md-typeset-mark-color: rgba(217, 94, 42, 0.25);
  --md-typeset-table-color: rgba(22, 22, 20, 0.12);
  --md-typeset-table-color--light: rgba(22, 22, 20, 0.035);
  --md-footer-bg-color: #161614;
  --md-footer-bg-color--dark: #161614;
  --md-footer-fg-color: #F9F9F7;
  --md-footer-fg-color--light: #C4C4BD;
}

/* Dark: off-black background, warm grey surfaces, same orange. */
[data-md-color-scheme='slate'] {
  --md-hue: 60; /* fallback for anything still derived from hue */
  --md-default-bg-color: #161614;           /* off-black */
  --md-default-fg-color: #F9F9F7;           /* off-white */
  --md-default-fg-color--light: #C4C4BD;    /* grey.3 */
  --md-default-fg-color--lighter: #7F7F79;  /* grey.5 */
  --md-default-fg-color--lightest: #2F2F2C; /* grey.8 */
  --md-primary-fg-color: #161614;
  --md-primary-fg-color--light: #2F2F2C;
  --md-primary-fg-color--dark: #161614;
  --md-primary-bg-color: #F9F9F7;
  --md-primary-bg-color--light: #DDDDD7;
  --md-accent-fg-color: #D95E2A;
  --md-accent-fg-color--transparent: rgba(217, 94, 42, 0.1);
  --md-typeset-a-color: #D95E2A;
  --md-code-bg-color: #2F2F2C;              /* grey.8 */
  --md-code-fg-color: #F0F0EC;              /* grey.1 */
  --md-typeset-mark-color: rgba(217, 94, 42, 0.3);
  --md-typeset-table-color: rgba(249, 249, 247, 0.12);
  --md-typeset-table-color--light: rgba(249, 249, 247, 0.035);
  --md-footer-bg-color: #111110;
  --md-footer-bg-color--dark: #111110;
}

/* Body content reads in serif; headings serif semibold with tight tracking. */
.md-typeset {
  font-family: var(--gh-serif);
  line-height: 1.625;
}
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--gh-serif);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--md-default-fg-color);
}
.md-typeset h1 {
  margin-bottom: 1em;
}
.md-typeset h5,
.md-typeset h6 {
  font-family: 'Aspekta', ui-sans-serif, system-ui, sans-serif;
}

/* UI chrome stays in the sans: nav, tabs, search, buttons, labels. */
.md-header,
.md-tabs,
.md-nav,
.md-search,
.md-footer,
.md-typeset .md-button,
.md-top {
  font-family: 'Aspekta', ui-sans-serif, system-ui, sans-serif;
}

/* Tables and admonition titles are UI, not prose. */
.md-typeset table:not([class]) {
  font-family: 'Aspekta', ui-sans-serif, system-ui, sans-serif;
}
.md-typeset .admonition-title,
.md-typeset summary {
  font-family: 'Aspekta', ui-sans-serif, system-ui, sans-serif;
}
.md-typeset .admonition,
.md-typeset details {
  font-size: 0.72rem;
}

/* Corner radius per the radii tokens. */
.md-typeset pre > code {
  border-radius: 0.375rem;
}
.md-typeset .admonition,
.md-typeset details {
  border-radius: 0.375rem;
}

/* Header: off-black bar, off-white text, like the app header. */
.md-header {
  background-color: #161614;
  color: #F9F9F7;
}
.md-header__title {
  font-weight: 600;
}
