/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   Gokaizen theme for Material for MkDocs
   ───────────────────────────────────────────────────────────────────────────────────────────────
   The docs follow the Gokaizen website's design system (gkz-website, src/styles/global.css;
   the reasoning is published at docs/website/branding.md):

     LIGHT BY DEFAULT, DARK BY CHOICE   The control in the header switches; the choice is
                                        remembered on the device. The system setting is ignored.
     GEIST AND GEIST MONO               Self-hosted from docs/fonts. The monospace carries every
                                        label, figure and nav item: it is a voice, not a fallback.
     WARM NEUTRALS, RADII, HAIRLINES    Structure is drawn with 1px rules and whitespace before
                                        boxes. The one accent is the orange.
     MOBILE IS THE DESIGN               Rules are written small-first and widened with min-width.

   COLOURS ARE THE COMPANY BRAND'S      Every value is from docs/brand/index.md (light and dark),
                                        so the palette is shown as it is. The website's warm
                                        neutrals are the website's own. Do not invent colours.
   Structure, type and shape follow the website; see docs/website/branding.md.
   Material's root font size is 20px, so 1rem here is 20px, not 16px as on the website.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ──────────────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin.19f9c92546.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.684ad5b531.woff2") format("woff2");
}

/* ── Tokens: light (the default) ────────────────────────────────────────────────────────────── */

:root,
:root > *,
[data-md-color-scheme="default"] {
  color-scheme: light;

  --gk-brand: #FF3806;                 /* logo only: 3.6:1 on white fails AA for text */
  --gk-primary: #C8380F;               /* brand primary: 4.9:1 on the page, 5.2:1 on white */
  --gk-primary-strong: #A82E0B;        /* brand hover */
  --gk-primary-contrast: #FFFFFF;
  --gk-primary-wash: rgba(200, 56, 15, 0.07);
  --gk-primary-edge: rgba(200, 56, 15, 0.22);
  --gk-error: #B4234A;                 /* brand error */

  --gk-bg: #F7F7F8;                    /* brand page background */
  --gk-surface: #FFFFFF;               /* cards, panels, inputs */
  --gk-sunken: color-mix(in srgb, #D8DADF 40%, #FFFFFF);   /* derived: code, wells */
  --gk-border: #D8DADF;                /* brand border */
  --gk-border-strong: color-mix(in srgb, #D8DADF 75%, #5B636E);

  --gk-text: #1F2328;                  /* brand text: 14.8:1 on the page */
  --gk-muted: #5B636E;                 /* brand muted text */
  --gk-faint: #5B636E;                 /* small labels: the muted value, held to 4.5:1 */

  --gk-shadow-sm: 0 1px 2px rgba(31, 35, 40, 0.04), 0 1px 3px rgba(31, 35, 40, 0.03);
  --gk-shadow-md: 0 1px 2px rgba(31, 35, 40, 0.04), 0 8px 24px -10px rgba(31, 35, 40, 0.1);
  --gk-shadow-lg: 0 2px 4px rgba(31, 35, 40, 0.04), 0 24px 56px -20px rgba(31, 35, 40, 0.16);

  --gk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gk-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gk-r-xs: 6px;
  --gk-r-sm: 10px;
  --gk-r-md: 16px;
  --gk-r-lg: 22px;
  --gk-r-pill: 999px;

  /* The website's frame and gutter, converted to this stylesheet's 20px rem */
  --gk-wrap: 1760px;
  --gk-gutter: clamp(1rem, 0.64rem + 2.4vw, 3.2rem);
  --gk-content-max: none;              /* set e.g. 60rem to cap the text column */

  /* Material hooks */
  --md-primary-fg-color: var(--gk-primary);
  --md-primary-fg-color--light: #E0400F;
  --md-primary-fg-color--dark: var(--gk-primary-strong);
  --md-accent-fg-color: var(--gk-primary-strong);
  --md-accent-fg-color--transparent: var(--gk-primary-wash);
  --md-default-bg-color: var(--gk-bg);
  --md-default-fg-color: var(--gk-text);
  --md-default-fg-color--light: var(--gk-muted);
  --md-default-fg-color--lighter: var(--gk-faint);
  --md-default-fg-color--lightest: var(--gk-border);
  --md-typeset-a-color: var(--gk-primary);
  --md-code-bg-color: var(--gk-sunken);
  --md-code-fg-color: var(--gk-text);
  --md-typeset-table-color: var(--gk-border);
  --md-footer-bg-color: var(--gk-bg);
  --md-footer-bg-color--dark: var(--gk-bg);
  --md-footer-fg-color: var(--gk-text);
  --md-footer-fg-color--light: var(--gk-muted);
  --md-footer-fg-color--lighter: var(--gk-faint);
  --md-text-font: var(--gk-font);
  --md-code-font: var(--gk-font-mono);
}

/* ── Tokens: dark (opt-in) ──────────────────────────────────────────────────────────────────── */

[data-md-color-scheme="slate"],
[data-md-color-scheme="slate"][data-md-color-primary="custom"] {
  color-scheme: dark;

  --gk-primary: #F2683A;               /* brand dark primary: 5.8:1 on the page */
  --gk-primary-strong: #FF8A60;
  --gk-primary-contrast: #16181B;      /* a dark label on the light orange, never white */
  --gk-primary-wash: rgba(242, 104, 58, 0.1);
  --gk-primary-edge: rgba(242, 104, 58, 0.26);
  --gk-error: #F7708F;

  --gk-bg: #16181B;                    /* brand dark background */
  --gk-surface: #1E2125;               /* brand dark surface */
  --gk-sunken: color-mix(in srgb, #16181B 80%, #000000);
  --gk-border: #30343A;
  --gk-border-strong: color-mix(in srgb, #30343A 70%, #9AA1AB);

  --gk-text: #E6E8EB;                  /* brand dark text */
  --gk-muted: #9AA1AB;                 /* brand dark muted */
  --gk-faint: #9AA1AB;

  --gk-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --gk-shadow-md: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
  --gk-shadow-lg: 0 24px 56px -20px rgba(0, 0, 0, 0.7);

  --md-primary-fg-color: var(--gk-primary);
  --md-primary-fg-color--light: #FF8A60;
  --md-primary-fg-color--dark: #D9572B;
  --md-accent-fg-color: var(--gk-primary-strong);
  --md-accent-fg-color--transparent: var(--gk-primary-wash);
  --md-default-bg-color: var(--gk-bg);
  --md-default-fg-color: var(--gk-text);
  --md-default-fg-color--light: var(--gk-muted);
  --md-default-fg-color--lighter: var(--gk-faint);
  --md-default-fg-color--lightest: var(--gk-border);
  --md-typeset-a-color: var(--gk-primary);
  --md-code-bg-color: var(--gk-sunken);
  --md-code-fg-color: var(--gk-text);
  --md-typeset-table-color: var(--gk-border);
  --md-footer-bg-color: var(--gk-bg);
  --md-footer-bg-color--dark: var(--gk-bg);
  --md-footer-fg-color: var(--gk-text);
  --md-footer-fg-color--light: var(--gk-muted);
  --md-footer-fg-color--lighter: var(--gk-faint);
  --md-hue: 215;
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────────── */

body {
  background: var(--gk-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  /* State changes stay; the travel and the click pulse go. */
  .md-typeset .md-button:hover,
  .md-typeset .md-button:active,
  .md-typeset .gk-pager__link:hover,
  .md-typeset .gk-card:hover,
  .md-header__button.md-icon:active {
    transform: none;
  }
  .md-top:active {
    transform: translateX(-50%);
  }
  .md-typeset .md-button:active::after {
    animation: none;
  }
}
:focus-visible {
  outline: 2px solid var(--gk-primary);
  outline-offset: 3px;
  border-radius: var(--gk-r-xs);
}
::selection {
  background: var(--gk-primary);
  color: var(--gk-primary-contrast);
}
/* Anchor targets land below the sticky header (Material's offset assumes a 2.4rem header) */
.md-typeset :target {
  --md-scroll-margin: 4.6rem;
}

/* ── Layout: the website's frame ────────────────────────────────────────────────────────────── */

.md-grid {
  max-width: var(--gk-wrap);
  padding-left: var(--gk-gutter);
  padding-right: var(--gk-gutter);
}
.md-content__inner {
  max-width: var(--gk-content-max);
}
.md-content__inner::before {
  height: 0;
}
/* Full-bleed backgrounds (the home hero's wash) reach past the content column; clip them at
   the main area so they never widen the page. `clip` keeps sticky sidebars working, unlike
   `hidden`, because it does not make .md-main a scroll container. */
.md-main {
  overflow-x: clip;
}

/* ── Header ─────────────────────────────────────────────────────────────────────────────────── */

.md-header {
  background-color: var(--gk-bg);
  color: var(--gk-text);
  box-shadow: none;
  border-bottom: 1px solid var(--gk-border);
  transition: background-color 0.3s ease;
}
.md-header--shadow {
  box-shadow: none;
}
@supports (backdrop-filter: blur(1px)) {
  .md-header {
    background-color: color-mix(in srgb, var(--gk-bg) 86%, transparent);
    backdrop-filter: blur(14px) saturate(130%);
  }
}
.md-header__inner {
  min-height: 3.6rem;
  gap: 0.4rem;
}
.md-header__button.md-logo {
  display: block;
  padding: 0.3rem 0.6rem 0.3rem 0;
  margin: 0;
}
.md-header__button.md-logo img {
  width: 130px;
  height: auto;
}
@media screen and (min-width: 48em) {
  .md-header__button.md-logo img {
    width: 146px;
  }
}
.md-header__title {
  display: none;                       /* the logo is the identity at every width */
}
/* Section links: centred, monospace, the current one marked with a rule */
.gk-header__nav {
  display: none;
  margin: 0 auto;
}
.gk-header__nav .md-tabs__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.8rem);
  margin: 0;
  padding: 0;
  list-style: none;
  contain: none;
  white-space: nowrap;
}
.gk-header__nav .md-tabs__item {
  display: block;
  height: auto;
  padding: 0;
}
.gk-header__nav .md-tabs__link {
  position: relative;
  display: block;
  margin: 0;
  padding: 0.5rem 0;
  font-family: var(--gk-font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gk-muted);
  opacity: 1;
  transform: none;
  transition: color 0.18s ease;
}
.gk-header__nav .md-tabs__link:hover,
.gk-header__nav .md-tabs__item--active .md-tabs__link {
  color: var(--gk-text);
}
.gk-header__nav .md-tabs__item--active .md-tabs__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gk-primary);
}
.md-tabs {
  display: none;                       /* Material's own tabs row is never rendered */
}
/* Round controls: theme toggle and, on phones, the menu button. 44px targets. */
.md-header__button.md-icon {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0.55rem;
  margin: 0 0 0 0.3rem;
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-pill);
  color: var(--gk-muted);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.md-header__button.md-icon:active {
  transform: scale(0.94);
  transition-duration: 0.07s;
}
.md-header__button.md-icon:hover {
  color: var(--gk-text);
  border-color: var(--gk-border-strong);
  background-color: var(--gk-surface);
  opacity: 1;
}
.md-header__option {
  margin: 0;
}
@media screen and (min-width: 76.25em) {
  .gk-header__nav {
    display: block;
  }
  .md-header__button[for="__search"] {
    display: none;
  }
}
@media screen and (max-width: 76.1875em) {
  .md-header__inner {
    min-height: 3.2rem;
  }
  .md-header__button[for="__drawer"] {
    order: 10;                         /* logo first, menu last, as on the website */
  }
  .md-header__option {
    margin-left: auto;
  }
}

/* Search: a pill at rest, a panel when open */
.md-search__form {
  background-color: var(--gk-surface);
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-pill);
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.md-search__form:hover {
  background-color: var(--gk-surface);
  border-color: var(--gk-border-strong);
}
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-radius: var(--gk-r-md) var(--gk-r-md) 0 0;
  border-color: var(--gk-border-strong);
  box-shadow: var(--gk-shadow-lg);
}
.md-search__input {
  color: var(--gk-text);
  font-family: var(--gk-font);
}
.md-search__input::placeholder,
.md-search__icon,
.md-search__icon[for="__search"] {
  color: var(--gk-muted);
}
.md-search__output {
  border: 1px solid var(--gk-border-strong);
  border-top: 0;
  border-radius: 0 0 var(--gk-r-md) var(--gk-r-md);
  box-shadow: var(--gk-shadow-lg);
}
.md-search-result__meta {
  font-family: var(--gk-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: var(--gk-sunken);
  color: var(--gk-muted);
}
.md-search-result__item {
  box-shadow: 0 -1px 0 var(--gk-border);
}

/* ── Sidebars ───────────────────────────────────────────────────────────────────────────────── */

@media screen and (min-width: 76.25em) {
  :root {
    --gk-sidebar: 13.5rem;
  }
  .md-sidebar {
    width: var(--gk-sidebar);
    padding: 1.35rem 0;
    top: calc(3.6rem + 1px);
  }
  .md-sidebar--primary .md-sidebar__inner {
    padding-right: calc(100% - (var(--gk-sidebar) - 1.4rem));
  }
  .md-sidebar--secondary .md-sidebar__inner {
    padding-left: calc(100% - (var(--gk-sidebar) - 1.4rem));
  }
  .md-sidebar__scrollwrap {
    margin: 0;
  }

  /* Labels: the section name on the left, "On this page" on the right */
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link,
  .md-sidebar--secondary .md-nav__title {
    display: block;
    margin: 0 0 0.7rem;
    padding: 0 0 0.6rem 0.8rem;
    border-bottom: 1px solid var(--gk-border);
    font-family: var(--gk-font-mono);
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gk-faint);
    line-height: 1.4;
    height: auto;
    background: transparent;
    box-shadow: none;
    position: static;
    pointer-events: auto;
  }
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link .md-nav__link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
  }
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link:hover,
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link:hover .md-nav__link {
    color: var(--gk-primary);
  }
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link .md-nav__icon {
    display: none;
  }
  .md-sidebar--secondary .md-nav__title {
    font-size: 0;
  }
  .md-sidebar--secondary .md-nav__title::before {
    content: "On this page";
    font-size: 0.56rem;
  }
  .md-nav--lifted > .md-nav__list,
  .md-sidebar--secondary .md-nav--secondary > .md-nav__list {
    padding-top: 0;
  }
  /* A section whose only page is its index: the label itself is the current entry */
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link.md-nav__link--active,
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link:has(> .md-nav__link--active) {
    color: var(--gk-text);
    border-left: 2px solid var(--gk-primary);
    margin-left: -1px;
    font-weight: 500;
  }

  /* The lists: a rail, entries hanging off it */
  [dir=ltr] .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav:not(.md-nav--secondary),
  [dir=rtl] .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav:not(.md-nav--secondary),
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav,
  .md-sidebar--secondary .md-nav--secondary > .md-nav__list {
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--gk-border);
  }
  .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav > .md-nav__list {
    padding: 0;
  }
  .md-sidebar .md-nav__item {
    padding: 0;
  }
  .md-sidebar .md-nav__item--section {
    margin: 0.9rem 0 0;
  }
  .md-sidebar .md-nav__item--section > .md-nav__link {
    margin: 0 0 0.2rem;
    padding: 0.25rem 0 0.25rem 0.8rem;
    font-family: var(--gk-font-mono);
    font-size: 0.54rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gk-faint);
    border-left: 2px solid transparent;
  }
  .md-sidebar .md-nav__item--section > .md-nav {
    margin: 0;
  }
  .md-sidebar .md-nav__link {
    position: relative;
    margin: 0 0 0 -1px;
    padding: 0.3rem 0 0.3rem 0.8rem;
    border-left: 2px solid transparent;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--gk-muted);
    text-wrap: pretty;
    transition: color 0.15s ease, border-color 0.15s ease;
  }
  .md-sidebar .md-nav__link:hover,
  .md-sidebar .md-nav__link:focus-visible {
    color: var(--gk-text);
  }
  .md-sidebar .md-nav__link--active,
  .md-sidebar .md-nav__item .md-nav__link--active,
  .md-sidebar .md-nav__item .md-nav__link--active code {
    color: var(--gk-text);
    border-left-color: var(--gk-primary);
    font-weight: 600;
  }
  .md-sidebar--secondary .md-nav__item .md-nav--secondary {
    border: 0;
    margin: 0;
  }
  .md-sidebar--secondary .md-nav__item .md-nav--secondary .md-nav__link {
    padding-left: 1.6rem;
    font-size: 0.66rem;
  }
  .md-sidebar--secondary .md-nav__item .md-nav--secondary .md-nav--secondary .md-nav__link {
    padding-left: 2.3rem;
  }
  .md-sidebar--secondary .md-nav__link--active {
    font-weight: 500;
  }
  .md-content__inner {
    margin-top: 1.1rem;
  }
}

/* Drawer (phones and tablets): a wide sheet of large entries with hairlines, like the website's
   menu. Only the row under each item is styled: Material wraps a section that has an overview
   page in .md-nav__container (the page link plus the arrow label), and the parts inside that
   row must stay plain or the row doubles its padding and borders. */
@media screen and (max-width: 76.1875em) {
  :root {
    --gk-drawer-w: min(100vw - 3.4rem, 16rem);
  }
  /* Material fixes the sheet at 12.1rem in three places; keep them in step */
  [dir=ltr] .md-sidebar--primary {
    left: calc(-1 * var(--gk-drawer-w));
  }
  .md-sidebar--primary {
    width: var(--gk-drawer-w);
  }
  [data-md-toggle=drawer]:checked ~ .md-container .md-sidebar--primary {
    transform: translateX(var(--gk-drawer-w));
  }
  .md-nav--primary,
  .md-nav--primary .md-nav {
    background-color: var(--gk-bg);
  }
  .md-nav--primary .md-nav__title,
  .md-nav--primary .md-nav__title[for="__drawer"] {
    position: relative;
    height: auto;
    padding: 1rem 0.8rem 0.9rem 2.3rem;   /* room for the back arrow on nested levels */
    line-height: 1;
    background-color: var(--gk-bg);
    color: var(--gk-faint);
    font-family: var(--gk-font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--gk-border);
    box-shadow: none;
  }
  .md-nav--primary .md-nav__title .md-nav__icon {
    color: var(--gk-text);
    top: 50%;
    left: 0.6rem;
    margin: 0;
    transform: translateY(-50%);
  }
  .md-nav--primary .md-nav__title[for="__drawer"] {
    padding-left: 0.8rem;                  /* the top level has no back arrow */
  }
  .md-nav--primary .md-nav__title[for="__drawer"] .md-nav__button.md-logo {
    display: none;
  }
  .md-nav--primary .md-nav__item {
    border-top: 0;
  }
  /* The row */
  .md-nav--primary .md-nav__item > .md-nav__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0.8rem;
    padding: 0.8rem 0;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--gk-text);
    border-bottom: 1px solid var(--gk-border);
  }
  /* The parts of a container row: the page link grows, the arrow label sits at the end */
  .md-nav--primary .md-nav__container > .md-nav__link {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    border: 0;
  }
  .md-nav--primary .md-nav__container > .md-nav__link:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .md-nav--primary .md-nav__container > .md-nav__link:last-child {
    flex: 0 0 auto;
  }
  .md-nav--primary .md-nav__link .md-nav__icon {
    margin-left: auto;
    color: var(--gk-faint);
  }
  .md-nav--primary .md-nav__item > .md-nav__link--active,
  .md-nav--primary .md-nav__container > .md-nav__link--active,
  .md-nav--primary .md-nav__link--active .md-nav__icon {
    color: var(--gk-primary);
  }
  /* No section-label styling here: in the drawer the current section keeps Material's
     --section class but is an ordinary entry, and a label rule would shrink it. */
  .md-nav--primary .md-nav__list {
    padding-bottom: 0;
  }
}

/* ── Typography ─────────────────────────────────────────────────────────────────────────────── */

.md-typeset {
  font-size: 0.8rem;
  line-height: 1.6;
}
.md-typeset p {
  text-wrap: pretty;
}
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--gk-text);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
.md-typeset h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 1.1rem;
}
.md-typeset h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem);
  letter-spacing: -0.035em;
  margin-top: 2.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--gk-border);
}
.md-typeset h3 {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
  margin-top: 1.8rem;
}
.md-typeset h4 {
  font-size: 0.6rem;
  font-family: var(--gk-font-mono);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gk-faint);
  margin-top: 1.6rem;
}
.md-typeset .headerlink {
  color: var(--gk-faint);
}
.md-typeset a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 0.18s ease;
}
.md-typeset a:hover {
  color: var(--gk-primary-strong);
}
.md-typeset hr {
  border-bottom: 1px solid var(--gk-border);
}
.md-typeset strong {
  font-weight: 600;
}

/* The "Effective date: …" line that opens every legal document, marked `{ .gk-meta }` in the
   Markdown (a shape-based selector also caught intros that merely start in bold) */
.md-typeset .gk-meta {
  font-family: var(--gk-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gk-faint);
  margin: -0.5rem 0 1.6rem;
}
.md-typeset .gk-meta strong {
  font-weight: 500;
  color: var(--gk-primary);
}

/* Code */
.md-typeset code {
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-xs);
  background-color: var(--md-code-bg-color);
}
.md-typeset pre {
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-sm);
  overflow: hidden;
}
.md-typeset pre > code {
  border: 0;
  border-radius: 0;
  font-size: 0.7rem;
  line-height: 1.6;
  padding: 0.9rem 1rem;
}
.md-clipboard {
  color: var(--gk-faint);
}
.md-clipboard:hover {
  color: var(--gk-primary);
}

/* ── Tables: ruled rows, monospace headers, no boxes ────────────────────────────────────────── */

.md-typeset .md-typeset__table {
  display: block;
}
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: 0.72rem;
  border: 0;
  border-top: 1px solid var(--gk-border-strong);
  border-bottom: 1px solid var(--gk-border-strong);
  border-radius: 0;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  font-family: var(--gk-font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gk-faint);
  background: transparent;
  border-bottom: 1px solid var(--gk-border);
  padding: 0.7em 0.9em;
  vertical-align: bottom;
}
.md-typeset table:not([class]) td {
  padding: 0.75em 0.9em;
  border-top: 1px solid var(--gk-border);
  vertical-align: top;
}
.md-typeset table:not([class]) tr:first-child td {
  border-top: 0;
}
.md-typeset table:not([class]) tbody tr:hover {
  background-color: var(--gk-primary-wash);
  box-shadow: none;
}
.md-typeset table:not([class]) th:empty {
  display: none;
}
.md-typeset table:not([class]) td:first-child:nth-last-child(2) {
  color: var(--gk-muted);
}
@media screen and (min-width: 45em) {
  .md-typeset table:not([class]) td:first-child:nth-last-child(2) {
    width: 11rem;
  }
}
/* Phones: a two-column table stacks, the key as a small label above its value */
@media screen and (max-width: 44.9375em) {
  .md-typeset table:not([class]) thead:has(th:first-child:nth-last-child(2)) {
    display: none;
  }
  .md-typeset table:not([class]):has(td:first-child:nth-last-child(2)) tbody {
    display: block;                 /* only the stacking tables; a wide table keeps its grid */
  }
  .md-typeset table:not([class]) tr:has(> td:first-child:nth-last-child(2)) {
    display: block;
    padding: 0.7em 0;
    border-top: 1px solid var(--gk-border);
  }
  .md-typeset table:not([class]) tr:has(> td:first-child:nth-last-child(2)):first-child {
    border-top: 0;
  }
  .md-typeset table:not([class]) tr:has(> td:first-child:nth-last-child(2)) > td {
    display: block;
    width: auto;
    padding: 0 0.2em;
    border: 0;
  }
  .md-typeset table:not([class]) tr:has(> td:first-child:nth-last-child(2)) > td:first-child {
    font-family: var(--gk-font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gk-faint);
    margin-bottom: 0.3em;
  }
  .md-typeset table:not([class]) tr:has(> td:first-child:nth-last-child(2)) > td:first-child em {
    text-transform: none;
    letter-spacing: 0;
  }
  .md-typeset .md-typeset__scrollwrap {
    overflow-x: auto;
  }
  .md-typeset table:not([class]):not(:has(td:first-child:nth-last-child(2))) {
    min-width: 36rem;
  }
}

/* ── Admonitions: the one tinted surface ────────────────────────────────────────────────────── */

.md-typeset .admonition,
.md-typeset details {
  font-size: 0.72rem;
  border: 1px solid var(--gk-primary-edge);
  border-radius: var(--gk-r-md);
  box-shadow: none;
  background-color: var(--gk-primary-wash);
  padding: 0.3rem 1rem 0.7rem;
}
.md-typeset .admonition-title,
.md-typeset summary {
  font-family: var(--gk-font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background-color: transparent;
  border: 0;
  color: var(--gk-text);
  margin: 0 -1rem 0.2rem;
  padding: 0.7rem 1rem 0 2.2rem;
}
.md-typeset .admonition-title::before,
.md-typeset summary::before {
  background-color: var(--gk-primary);
  left: 1rem;
  top: 0.75rem;
}
.md-typeset .admonition.warning,
.md-typeset .admonition.danger,
.md-typeset .admonition.failure {
  border-color: color-mix(in srgb, var(--gk-error) 30%, transparent);
  background-color: color-mix(in srgb, var(--gk-error) 7%, transparent);
}
.md-typeset .admonition.warning .admonition-title::before,
.md-typeset .admonition.danger .admonition-title::before,
.md-typeset .admonition.failure .admonition-title::before {
  background-color: var(--gk-error);
}

/* ── Buttons: pills, monospace labels, 48px targets ─────────────────────────────────────────── */

.md-typeset .md-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.6em 1.5em;
  font-family: var(--gk-font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gk-text);
  background: var(--gk-surface);
  border: 1px solid var(--gk-border-strong);
  border-radius: var(--gk-r-pill);
  box-shadow: var(--gk-shadow-sm);
  position: relative;
  overflow: hidden;                    /* clips the click pulse to the pill */
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.md-typeset .md-button:hover {
  color: var(--gk-text);
  background: var(--gk-surface);
  border-color: var(--gk-primary);
  box-shadow: var(--gk-shadow-md);
  transform: translateY(-1px);
}
/* Press feedback as on the website: the press is immediate (70ms), the release eases back
   (220ms), and the hover lift gives the press somewhere to travel from. */
.md-typeset .md-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--gk-shadow-sm);
  transition-duration: 0.07s;
}
/* One pulse out from the centre on click. CSS only, so it is centred rather than at the pointer. */
.md-typeset .md-button::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 130%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0.25);
  pointer-events: none;
}
.md-typeset .md-button:active::after {
  animation: gk-pulse 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes gk-pulse {
  from { opacity: 0.16; transform: scale(0.25); }
  to   { opacity: 0;    transform: scale(1); }
}
.md-typeset .md-button--primary {
  background: var(--gk-primary);
  border-color: transparent;
  color: var(--gk-primary-contrast);
}
.md-typeset .md-button--primary:hover {
  background: var(--gk-primary-strong);
  border-color: transparent;
  color: var(--gk-primary-contrast);
}

/* ── Pager: previous and next, two panels ───────────────────────────────────────────────────── */

.md-typeset .gk-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding-top: 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--gk-border);
}
.md-typeset .gk-pager__link {
  display: block;
  padding: 0.9rem 1.1rem 1rem;
  background: var(--gk-surface);
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-md);
  box-shadow: var(--gk-shadow-sm);
  color: var(--gk-text);
  text-decoration: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.md-typeset .gk-pager__link:hover {
  color: var(--gk-text);
  border-color: var(--gk-border-strong);
  box-shadow: var(--gk-shadow-md);
  transform: translateY(-2px);
}
.md-typeset .gk-pager__link:active {
  transform: translateY(0);
  box-shadow: var(--gk-shadow-sm);
  transition-duration: 0.07s;
}
.gk-pager__link--next {
  text-align: right;
}
.gk-pager__link--next:only-child {
  grid-column: 2;
}
.gk-pager__dir {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--gk-font-mono);
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gk-faint);
}
.gk-pager__title {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.md-typeset .gk-pager__link:hover .gk-pager__title {
  color: var(--gk-primary);
}
@media screen and (max-width: 44.9375em) {
  .md-typeset .gk-pager {
    grid-template-columns: 1fr;
  }
  .gk-pager__link--next:only-child {
    grid-column: auto;
  }
}

/* ── Footer: the website's ──────────────────────────────────────────────────────────────────── */

.gk-mono {
  font-family: var(--gk-font-mono);
  font-variant-numeric: tabular-nums;
}
.md-footer {
  background-color: var(--gk-bg);
  color: var(--gk-text);
  border-top: 1px solid var(--gk-border);
  margin-top: 2rem;
}
.md-footer .gk-footer__inner {
  padding-top: clamp(2.4rem, 1.6rem + 3vw, 4.4rem);
  padding-bottom: 1.6rem;
  font-size: 0.76rem;
}
.gk-footer__top {
  display: grid;
  gap: 2.2rem;
  padding-bottom: clamp(2rem, 1.4rem + 2vw, 3.4rem);
}
@media screen and (min-width: 24em) {
  .gk-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gk-footer__brand {
    grid-column: 1 / -1;
  }
}
@media screen and (min-width: 49.6em) {
  .gk-footer__top {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2.8rem;
  }
  .gk-footer__brand {
    grid-column: auto;
  }
}
.gk-footer__brand img {
  width: 150px;
  height: auto;
  margin-bottom: 1rem;
}
.md-typeset .gk-footer__pitch {
  margin: 0;
  color: var(--gk-muted);
  max-width: 32ch;
}
.md-typeset .gk-footer__heading {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-family: var(--gk-font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gk-faint);
}
.md-footer .md-typeset .gk-footer__col ul,
.md-footer .md-typeset .gk-footer__col li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  height: auto;
  contain: none;
}
.md-typeset .gk-footer__col li + li {
  margin-top: 0.55rem;
}
.md-typeset .gk-footer__col a {
  display: inline-block;
  margin: 0;
  padding: 0.1rem 0;
  font-family: var(--gk-font);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gk-text);
  text-decoration: none;
  overflow-wrap: anywhere;
  opacity: 1;
  transform: none;
}
.md-typeset .gk-footer__col a:hover,
.md-typeset .gk-footer__col .md-tabs__item--active a {
  color: var(--gk-primary);
}
.gk-footer__note {
  display: block;
  font-size: 0.62rem;
  color: var(--gk-faint);
}
.md-typeset .gk-footer__where {
  margin: 1rem 0 0;
  font-size: 0.64rem;
  color: var(--gk-faint);
}
.gk-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--gk-border);
}
.md-typeset .gk-footer__copy {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  color: var(--gk-faint);
}
/* Material's `.md-typeset ul:not([hidden])` (flow-root) and `[dir=ltr] .md-typeset ul li`
   (indent) outrank two-class selectors, so these carry the footer prefix. */
.md-footer .md-typeset .gk-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-footer .md-typeset .gk-footer__legal li {
  margin: 0;
}
.md-typeset .gk-footer__legal a {
  font-family: var(--gk-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gk-muted);
  text-decoration: none;
}
.md-typeset .gk-footer__legal a:hover {
  color: var(--gk-primary);
}
.md-top {
  background-color: var(--gk-surface);
  color: var(--gk-text);
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-pill);
  box-shadow: var(--gk-shadow-md);
  font-family: var(--gk-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.md-top:hover {
  background-color: var(--gk-primary);
  border-color: transparent;
  color: var(--gk-primary-contrast);
}
.md-top:active {
  transform: translateX(-50%) scale(0.96);
  transition-duration: 0.07s;
}

/* ── Home page ──────────────────────────────────────────────────────────────────────────────── */
/* Dense on purpose: the hero, a fact strip, one three-across grid, a brand band and the contact
   band, with section-scale gaps of about 2rem rather than 3. */

.md-typeset .gk-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  font-family: var(--gk-font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gk-primary);
}
.md-typeset .gk-eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
}
.md-typeset .gk-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(0.6rem, 0.3rem + 1.2vw, 1.6rem) 0 0;
  margin-bottom: 1.6rem;
}
/* The ground: a faint orange wash top-left and a dot lattice fading out, as on the website. */
.md-typeset .gk-hero::before {
  content: "";
  position: absolute;
  inset: -4.6rem -100vw 0 -100vw;
  z-index: -1;
  background:
    radial-gradient(ellipse 42% 70% at 18% 10%, var(--gk-primary-wash), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--gk-primary-edge) 1px, transparent 0) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  opacity: 0.55;
  pointer-events: none;
}
.md-typeset .gk-hero h1 {
  font-size: clamp(2.1rem, 1.3rem + 3vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.96;
  margin: 0 0 0.8rem;
  max-width: 16ch;
}
.md-typeset .gk-hero .gk-lede {
  font-size: clamp(0.88rem, 0.82rem + 0.3vw, 1.04rem);
  line-height: 1.5;
  color: var(--gk-muted);
  max-width: 52ch;
  margin: 0;
}
/* The actions line: the paragraph that holds the two buttons */
.md-typeset .gk-hero p:has(> .md-button) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.2rem 0 0;
}
.md-typeset .gk-hero h1 .headerlink,
.md-typeset .gk-section-head h2 .headerlink {
  display: none;
}

/* Fact strip: four figures between two hairlines, as the website's hero closes */
.md-typeset .gk-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  margin-top: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
  border-top: 1px solid var(--gk-border);
  border-bottom: 1px solid var(--gk-border);
}
.md-typeset .gk-fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem 0.9rem 0;
}
.md-typeset .gk-fact + .gk-fact {
  padding-left: 1rem;
  border-left: 1px solid var(--gk-border);
}
.md-typeset .gk-fact__value {
  font-family: var(--gk-font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gk-text);
}
.md-typeset .gk-fact__label {
  font-size: 0.64rem;
  line-height: 1.4;
  color: var(--gk-muted);
  max-width: 24ch;
}

/* Section opener: index, heading, a hairline to the far edge, a note at the end */
.md-typeset .gk-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 2rem 0 0.9rem;
}
.md-typeset .gk-section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  align-self: center;
  background: var(--gk-border);
  min-width: 1.5rem;
}
.md-typeset .gk-section-head__index {
  font-family: var(--gk-font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gk-primary);
}
.md-typeset .gk-section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.3rem;
}
.md-typeset .gk-section-head p {
  margin: 0;
  display: contents;
}
.md-typeset .gk-section-head .gk-count {
  order: 3;
  font-family: var(--gk-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gk-faint);
  text-align: right;
}

/* Cards: panels. Surface, hairline, radius, a shadow so low it reads as an edge. */
.md-typeset .gk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.8rem;
  margin: 0 0 0.4rem;
}
.md-typeset .gk-cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.md-typeset .gk-card,
.md-typeset .gk-feature {
  background: var(--gk-surface);
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-md);
  box-shadow: var(--gk-shadow-sm);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.md-typeset .gk-card:hover,
.md-typeset .gk-feature:hover {
  border-color: var(--gk-border-strong);
  box-shadow: var(--gk-shadow-md);
  transform: translateY(-2px);
}
.md-typeset .gk-card__body {
  height: 100%;
  padding: 1.2rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.md-typeset .gk-card__kicker {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--gk-font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gk-faint);
  margin: 0;
}
.md-typeset .gk-card__index {
  color: var(--gk-primary);
}
.md-typeset .gk-card h3,
.md-typeset .gk-feature h3 {
  font-size: 1.12rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.md-typeset .gk-card h3 .headerlink,
.md-typeset .gk-feature h3 .headerlink {
  display: none;
}
.md-typeset .gk-card h3 a,
.md-typeset .gk-feature h3 a {
  color: var(--gk-text);
  text-decoration: none;
}
.md-typeset .gk-card h3 a:hover,
.md-typeset .gk-feature h3 a:hover {
  color: var(--gk-primary);
}
.md-typeset .gk-card p,
.md-typeset .gk-feature p {
  margin: 0;
  color: var(--gk-muted);
  font-size: 0.72rem;
}
.md-typeset .gk-card__address {
  align-self: flex-start;
  font-family: var(--gk-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  color: var(--gk-text);
  text-decoration: none;
  border-bottom: 1px solid var(--gk-border-strong);
}
.md-typeset .gk-card__address:hover {
  color: var(--gk-primary);
  border-bottom-color: var(--gk-primary);
}
/* The document links: small pills, so the card's foot is a row of targets rather than a list */
.md-typeset .gk-card__links {
  margin-top: auto;
  padding-top: 0.8rem;
}
.md-typeset .gk-card__links ul:not([hidden]) {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.md-typeset .gk-card__links ul li {   /* outranks Material's `[dir=ltr] .md-typeset ul li` indent */
  margin: 0;
}
.md-typeset .gk-card__links a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--gk-text);
  background: var(--gk-sunken);
  border: 1px solid transparent;
  border-radius: var(--gk-r-pill);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.md-typeset .gk-card__links a:hover {
  color: var(--gk-primary);
  border-color: var(--gk-primary-edge);
  background: var(--gk-primary-wash);
}

/* Brand band: the one wide panel, copy on the left and the marks on the right */
.md-typeset .gk-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden;
}
.md-typeset .gk-feature__body {
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.md-typeset .gk-feature__art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 0.6rem;
  padding: 0.8rem;
  background: var(--gk-sunken);
  border-left: 1px solid var(--gk-border);
}
.md-typeset .gk-feature__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  border-radius: var(--gk-r-sm);
  border: 1px solid var(--gk-border);
}
.md-typeset .gk-feature__tile img {
  display: block;
  width: auto;
  max-width: 70%;
}
.md-typeset .gk-feature__tile--light {
  background: #F7F7F8;
}
.md-typeset .gk-feature__tile--light img {
  height: 1.3rem;
}
.md-typeset .gk-feature__tile--dark {
  background: #16181B;
  border-color: #2A2E34;
}
.md-typeset .gk-feature__tile--dark img {
  height: 2.8rem;
}
.md-typeset .gk-feature__swatches {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.35rem;
}
.md-typeset .gk-feature__swatches span {
  flex: 1;
  height: 0.8rem;
  border-radius: var(--gk-r-xs);
  border: 1px solid rgba(31, 35, 40, 0.12);
}

/* Contact band: the website's one dark section on a light page. Dark in both themes. */
.md-typeset .gk-contact {
  --gk-primary: #F2683A;
  --gk-primary-strong: #FF8A60;
  --gk-primary-contrast: #16181B;
  --gk-bg: #16181B;
  --gk-surface: #1E2125;
  --gk-border: #30343A;
  --gk-border-strong: #4A5059;
  --gk-text: #E6E8EB;
  --gk-muted: #9AA1AB;
  color-scheme: dark;
  margin: 2rem 0 0.4rem;
  padding: clamp(1.2rem, 0.9rem + 1.2vw, 2rem) clamp(1.2rem, 0.8rem + 1.5vw, 2.4rem);
  background: var(--gk-bg);
  color: var(--gk-text);
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 2rem;
}
.md-typeset .gk-contact p {
  margin: 0;
}
.md-typeset .gk-contact .gk-contact__text {
  font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--gk-text);
  max-width: 24ch;
  text-wrap: balance;
}
.md-typeset .gk-contact .md-button--primary {
  box-shadow: none;
}

@media screen and (max-width: 59.9375em) {
  .md-typeset .gk-feature {
    grid-template-columns: 1fr;
  }
  .md-typeset .gk-feature__art {
    border-left: 0;
    border-top: 1px solid var(--gk-border);
  }
}
@media screen and (max-width: 44.9375em) {
  .md-typeset .gk-cards {
    gap: 0.6rem;
  }
  .md-typeset .gk-card__body,
  .md-typeset .gk-feature__body {
    padding: 1rem 1rem 0.9rem;
  }
  .md-typeset .gk-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md-typeset .gk-fact {
    padding: 0.7rem 0.6rem 0.7rem 0;
  }
  .md-typeset .gk-fact + .gk-fact {
    padding-left: 0.6rem;
  }
  .md-typeset .gk-fact:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .md-typeset .gk-fact:nth-child(n + 3) {
    border-top: 1px solid var(--gk-border);
  }
  .md-typeset .gk-section-head {
    flex-wrap: wrap;
    margin-top: 1.6rem;
  }
  .md-typeset .gk-section-head .gk-count {
    flex-basis: 100%;
    text-align: left;
  }
  .md-typeset .gk-contact .md-button {
    display: flex;
    width: 100%;
  }
}

/* ── Brand page ─────────────────────────────────────────────────────────────────────────────── */

.gk-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
/* Phones: two across, always */
@media screen and (max-width: 44.9375em) {
  .gk-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}
.gk-swatch {
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-sm);
  background: var(--gk-surface);
  box-shadow: var(--gk-shadow-sm);
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.45;
}
.gk-swatch__chip {
  height: 3.5rem;
}
.gk-swatch__meta {
  padding: 0.5rem 0.65rem 0.55rem;
  color: var(--gk-muted);
}
.gk-swatch__meta strong {
  display: block;
  color: var(--gk-text);
}
.md-typeset .gk-swatch__meta code {
  font-size: 0.62rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--gk-faint);
}
.gk-logo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.gk-logo-preview > div {
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-md);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gk-logo-preview img {
  max-height: 2.4rem;
}
.gk-logo-preview .on-light {
  background: #F7F7F8;
}
.gk-logo-preview .on-dark {
  background: #16181B;
  border-color: #2A2E34;
}
.gk-logo-preview img.gk-icon {
  max-height: 4rem;
}

/* ── Contrast cards: the pairing itself, sample text on its background, with the ratio ───────── */

.gk-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
@media screen and (max-width: 44.9375em) {
  .gk-pairs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}
.gk-pair {
  border: 1px solid var(--gk-border);
  border-radius: var(--gk-r-sm);
  background: var(--gk-surface);
  box-shadow: var(--gk-shadow-sm);
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.45;
}
/* The chip's colours are set inline on the element so they never follow the page theme */
.gk-pair__chip {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-height: 3.6rem;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--gk-border);
}
.gk-pair__chip .gk-pair__aa {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.gk-pair__chip .gk-pair__sample {
  font-size: 0.6rem;
  line-height: 1.3;
}
.gk-pair__chip .gk-pair__sample--label {
  font-family: var(--gk-font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gk-pair__meta {
  padding: 0.5rem 0.65rem 0.6rem;
  color: var(--gk-muted);
}
.gk-pair__meta strong {
  display: block;
  color: var(--gk-text);
}
.md-typeset .gk-pair__meta code {
  font-size: 0.6rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--gk-faint);
}
.gk-pair__badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--gk-r-pill);
  font-family: var(--gk-font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gk-text);
  background: var(--gk-sunken);
  border: 1px solid var(--gk-border);
}
.gk-pair__badge--fail {
  color: var(--gk-error);
  border-color: color-mix(in srgb, var(--gk-error) 35%, transparent);
  background: color-mix(in srgb, var(--gk-error) 8%, transparent);
}

/* ── Page transition ────────────────────────────────────────────────────────────────────────
   The website's scan: the old page fades, the new one is revealed top to bottom behind a thin
   orange leading edge, in under a third of a second. Here it is the cross-document form, which
   the browser applies to ordinary page loads between pages of this site, so it needs no script
   and passes the strict Content-Security-Policy. Browsers without it (Firefox at the time of
   writing) load pages exactly as before. Reduced motion gets the plain swap. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: gk-page-out 0.16s ease both;
}
::view-transition-new(root) {
  animation: gk-page-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes gk-page-out {
  to { opacity: 0; }
}
@keyframes gk-page-in {
  from {
    clip-path: inset(0 0 100% 0);
    border-top: 2px solid var(--gk-primary);
  }
  to {
    clip-path: inset(0 0 0 0);
    border-top: 2px solid transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
