/* =============================================================================
 * @gpi/brand — GPI design tokens + brand fonts (Tailwind v4, CSS-first @theme)
 * =============================================================================
 * CANONICAL source of truth for the GPI brand surface. Import this file AFTER
 * `@import "tailwindcss";` in a consumer's entry CSS so the @theme block extends
 * Tailwind's default theme (generating `bg-gpi-crimson`, `text-gpi-navy`,
 * `font-display`, `font-body`, `rounded-md`, `text-2xs`, … utilities).
 *
 * The @font-face `src` URLs are absolute `/fonts/...`: the fonts ship in this
 * package under `fonts/` and the consumer serves them at `/fonts/` (the product
 * from the gateway wwwroot; the internal SPA copies them into its build output —
 * see that repo's vite config). Keep this file and the product's
 * src/frontend/src/styles/globals.css @font-face + @theme blocks byte-identical
 * until the product formally adopts this package (see README.md).
 * ========================================================================== */

/* ===== GPI Brand Fonts ===== */
/* Fonts are self-hosted and served at /fonts/ by the consuming app. */
/* Montserrat Regular 400 (and its italic): body text, buttons and fine print (brandbook p.7). */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/montserrat/Montserrat-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/montserrat/Montserrat-Italic.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/montserrat/Montserrat-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat/Montserrat-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Buvera";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/buvera/Buvera-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Buvera";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/buvera/Buvera-ExtraBold.ttf") format("truetype");
}

/* ===== GPI Brand Tokens ===== */
:root {
  --color-gpi-crimson: #970000;
  --color-gpi-crimson-light: #b81c1c;
  --color-gpi-crimson-dark: #7a0000;
  --color-gpi-navy: #102a43;
  --color-gpi-navy-light: #1a3a5c;
  /* Dimmed navy for muted/caption text — same brand hue as --color-gpi-navy,
     lightened to read as secondary while clearing WCAG AA (4.5:1) on white and
     on the gray-100 muted surface at the 11px caption size (#2002). */
  --color-gpi-navy-muted: #51627a;
  /* The brand's own tints: crimson and navy mixed with 10–50 % white. A token that needs a lighter crimson or navy takes
     one of these, never a generic shade. */
  --color-gpi-crimson-tint-10: #a11a1a;
  --color-gpi-crimson-tint-20: #ab3333;
  --color-gpi-crimson-tint-30: #b64d4d;
  --color-gpi-crimson-tint-40: #c06666;
  --color-gpi-crimson-tint-50: #ca7f7f;
  --color-gpi-navy-tint-10: #283f56;
  --color-gpi-navy-tint-20: #3f5468;
  --color-gpi-navy-tint-30: #586a7b;
  --color-gpi-navy-tint-40: #6f7f8e;
  --color-gpi-navy-tint-50: #8794a0;
  --color-gpi-gray-50: #f8f9fa;
  --color-gpi-gray-100: #f1f3f5;
  --color-gpi-gray-200: #e9ecef;
  --color-gpi-gray-300: #dee2e6;
  --color-gpi-gray-400: #ced4da;
  --color-gpi-gray-500: #adb5bd;
  --color-gpi-gray-600: #868e96;
  --color-gpi-gray-700: #495057;
  --color-gpi-gray-800: #343a40;
  --color-gpi-gray-900: #212529;

  --font-body: "Montserrat", system-ui, sans-serif;
  --font-display: "Buvera", "Montserrat", system-ui, sans-serif;

  /* Smallest readable step in the type scale (11px). Enables `text-2xs`.
     Nothing should go below this — sub-11px text is unreadable. */
  --text-2xs: 0.6875rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
}

/* Headings and sub-headings are Buvera, body text, buttons and fine print Montserrat (brandbook p.7).
   Every h1-h4 takes the display face, so a heading without `font-display` (a chat answer's Markdown,
   a documentation page) no longer falls back to the body's Montserrat. In the base layer, so a
   heading that is a small label (uppercase, muted) keeps Montserrat with `font-body`. Sizes and
   weights stay each heading's own. */
@layer base {
  h1, h2, h3, h4 {
    font-family: var(--font-display);
  }
}

/* =============================================================================
 * @gpi-aps/brand — shared semantic light/dark theme
 * =============================================================================
 * Import after theme.css. Consumers use semantic custom properties rather than
 * hard-coded palette values and toggle the `dark` class on <html>.
 * ========================================================================== */

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: var(--color-gpi-navy);
  --muted: var(--color-gpi-gray-100);
  --muted-foreground: var(--color-gpi-navy-muted);
  --border: var(--color-gpi-gray-200);
  /* A field's edge clears 3:1 on the page and the sidebar (WCAG 1.4.11). */
  --input: var(--color-gpi-gray-600);
  /* Navy is the brand's action colour and crimson its signal (owner 2026-11-25): a primary button, a link and the focus
     ring are navy; crimson is the active marker and danger, nothing else. */
  --ring: var(--color-gpi-navy);
  --primary: var(--color-gpi-navy);
  --primary-hover: var(--color-gpi-navy-tint-10);
  --primary-foreground: #ffffff;
  --secondary: var(--color-gpi-gray-100);
  --secondary-foreground: var(--color-gpi-navy);
  --accent: var(--color-gpi-gray-100);
  --accent-foreground: var(--color-gpi-navy);
  --destructive: var(--color-gpi-crimson);
  --destructive-foreground: #ffffff;
  /* Destructive as text: the fill (--destructive) carries white words, so it cannot also be text on the page in dark. */
  --destructive-text: var(--tone-danger-fg);
  --card: #ffffff;
  --card-foreground: var(--color-gpi-navy);
  --popover: #ffffff;
  --popover-foreground: var(--color-gpi-navy);
  --sidebar: var(--color-gpi-gray-50);
  --sidebar-foreground: var(--color-gpi-navy);
  /* A group box's border (every box core draws on the card surface: Card, CollapsibleSection, ListRow, lists, tiles,
     tabs, dialogs, menus, diagrams): in light mode a clearly darker neutral than a divider's (owner 2026-11-17: "Darker
     neutral + red header line"). A box in a tone (a failure, a warning, the selected one) keeps its own border. */
  --group-border: var(--color-gpi-gray-400);

  --tone-neutral-bg: var(--color-gpi-gray-100);
  --tone-neutral-fg: var(--color-gpi-gray-700);
  --tone-neutral-border: var(--color-gpi-gray-200);
  /* The brand tone (a link, the selected row, a brand badge) is navy on a navy-grey surface, never pink. */
  --tone-brand-bg: var(--tone-info-bg);
  --tone-brand-fg: var(--color-gpi-navy);
  --tone-brand-border: var(--tone-info-border);
  --tone-info-bg: #e7ebef;
  --tone-info-fg: var(--color-gpi-navy);
  --tone-info-border: #bec8d1;
  --tone-success-bg: #edf4ef;
  --tone-success-fg: #166534;
  --tone-success-border: #b8d5c0;
  --tone-warning-bg: #f7f2e8;
  --tone-warning-fg: #854d0e;
  --tone-warning-border: #dec89e;
  --tone-danger-bg: #f6e9e9;
  --tone-danger-fg: var(--color-gpi-crimson);
  --tone-danger-border: var(--color-gpi-crimson-tint-50);

  /* Compatibility aliases. New React surfaces consume --tone-* through
     @gpi-aps/ui; these names keep older hosts readable during pin skew. */
  --badge-neutral-bg: var(--tone-neutral-bg);
  --badge-neutral-fg: var(--tone-neutral-fg);
  --badge-brand-bg: var(--tone-brand-bg);
  --badge-brand-fg: var(--tone-brand-fg);
  --badge-info-bg: var(--tone-info-bg);
  --badge-info-fg: var(--tone-info-fg);
  --badge-success-bg: var(--tone-success-bg);
  --badge-success-fg: var(--tone-success-fg);
  --badge-warning-bg: var(--tone-warning-bg);
  --badge-warning-fg: var(--tone-warning-fg);
  --badge-danger-bg: var(--tone-danger-bg);
  --badge-danger-fg: var(--tone-danger-fg);

  --status-neutral: var(--badge-neutral-fg);
  --status-info: var(--badge-info-fg);
  --status-success: var(--badge-success-fg);
  --status-warning: var(--badge-warning-fg);
  --status-danger: var(--badge-danger-fg);
}

.dark {
  color-scheme: dark;
  --background: var(--color-gpi-navy);
  --foreground: var(--color-gpi-gray-100);
  --muted: var(--color-gpi-navy-light);
  --muted-foreground: var(--color-gpi-gray-400);
  --border: #334e68;
  --input: var(--color-gpi-navy-tint-50);
  /* A primary button is a light neutral fill with navy words (as core's inverse button); links and the ring are light. */
  --ring: var(--color-gpi-gray-300);
  --primary: var(--color-gpi-gray-100);
  --primary-hover: var(--color-gpi-gray-300);
  --primary-foreground: var(--color-gpi-navy);
  --secondary: #243b53;
  --secondary-foreground: var(--color-gpi-gray-100);
  --accent: #243b53;
  --accent-foreground: var(--color-gpi-gray-100);
  --destructive: var(--color-gpi-crimson-light);
  --destructive-foreground: #ffffff;
  --destructive-text: var(--tone-danger-fg);
  --card: var(--color-gpi-navy-light);
  --card-foreground: var(--color-gpi-gray-100);
  --popover: var(--color-gpi-navy-light);
  --popover-foreground: var(--color-gpi-gray-100);
  --sidebar: #0c2236;
  --sidebar-foreground: var(--color-gpi-gray-200);
  --group-border: var(--border);

  --tone-neutral-bg: #243b53;
  --tone-neutral-fg: var(--color-gpi-gray-300);
  --tone-neutral-border: #486581;
  --tone-brand-bg: var(--tone-info-bg);
  --tone-brand-fg: var(--color-gpi-gray-100);
  --tone-brand-border: var(--tone-info-border);
  --tone-info-bg: #243b53;
  --tone-info-fg: var(--color-gpi-gray-200);
  --tone-info-border: #486581;
  --tone-success-bg: #173f29;
  --tone-success-fg: #a7ddb5;
  --tone-success-border: #2f6d45;
  --tone-warning-bg: #4a371c;
  --tone-warning-fg: #ecd39c;
  --tone-warning-border: #765b2e;
  --tone-danger-bg: #4a2020;
  /* Danger words stay the light red they were: crimson-tint-50 (#ca7f7f) reads 3.8:1 on a card, under the 4.5:1 text
     needs; it is the danger tone's border. */
  --tone-danger-fg: #efb3b3;
  --tone-danger-border: var(--color-gpi-crimson-tint-50);

  --badge-neutral-bg: var(--tone-neutral-bg);
  --badge-neutral-fg: var(--tone-neutral-fg);
  --badge-brand-bg: var(--tone-brand-bg);
  --badge-brand-fg: var(--tone-brand-fg);
  --badge-info-bg: var(--tone-info-bg);
  --badge-info-fg: var(--tone-info-fg);
  --badge-success-bg: var(--tone-success-bg);
  --badge-success-fg: var(--tone-success-fg);
  --badge-warning-bg: var(--tone-warning-bg);
  --badge-warning-fg: var(--tone-warning-fg);
  --badge-danger-bg: var(--tone-danger-bg);
  --badge-danger-fg: var(--tone-danger-fg);
}

/* =============================================================================
 * The marker: crimson, solid, the line's width (2px), and only where something
 * is active: the selected tab's underline and a selected row's start edge (the
 * active menu row draws the same bar). No header, divider or open panel carries
 * it: they take the neutral hairline (--border) or nothing (owner 2026-11-25:
 * "with the new design, i dont like the faded red lines"; the fades of
 * 2026-11-18 are gone). Never --primary. A row's tone bar is the line's width in
 * its own tone: a warning stays amber and a failure red. Focus rings stay solid
 * and never use it.
 *
 * The marker is drawn as a background layer, never a border, so a box's own
 * border, radius and background colour stay as they are.
 * ========================================================================== */
:root {
  --gpi-marker-width: 2px;
}

/* Crimson in both modes, whatever --primary is (navy since owner 2026-11-25). A part of a page with its own colours (a
   customer's) sets --gpi-marker-colour; each element that draws the marker resolves it, so it draws in that colour. */
:root {
  --gpi-marker-colour: var(--color-gpi-crimson);
}

/* A selection's underline (a selected tab) and down the start side (a selected row). */
.gpi-line-selected,
.gpi-line-start {
  background-image: linear-gradient(var(--gpi-marker-colour), var(--gpi-marker-colour));
  background-repeat: no-repeat;
  background-origin: border-box;
}
.gpi-line-selected {
  background-size: 100% var(--gpi-marker-width);
  background-position: left bottom;
}
.gpi-line-start {
  background-size: var(--gpi-marker-width) 100%;
  background-position: left top;
}

/* A row's tone bar: the line's width, solid, its colour the row's own tone. */
.gpi-line-bar {
  border-left-style: solid;
  border-left-width: var(--gpi-marker-width);
}

/* =============================================================================
 * Label/value pairs (core's DetailsList, which carries gpi-details). In light
 * mode a label's muted navy sat too close to a value's navy (owner 2026-11-17:
 * "fields and values - they might not benefit from having the same color?" →
 * "agreed, for all fields and values in non-dark mode"): a label is muted and a
 * step smaller, a value the foreground in medium weight, since the values are
 * what is read; an empty value (an element marked data-empty: "–", Mangler) is
 * muted. Dark mode stays as it was. Unlayered, so it wins over the utilities the
 * pair's markup carries.
 * ========================================================================== */
:root:not(.dark) .gpi-details dt {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 400;
}
:root:not(.dark) .gpi-details dd {
  color: var(--foreground);
  font-weight: 500;
}
:root:not(.dark) .gpi-details dd [data-empty] {
  color: var(--muted-foreground);
  font-weight: 400;
}
:root:not(.dark) .gpi-details,
:root:not(.dark) .gpi-details > div {
  align-items: baseline;
}

.gpi-doc-workspace {
  --gpi-doc-crimson: var(--primary, #970000);
  /* Crimson as text (links, the current page, eyebrows): the brand's text tone, readable on the dark theme's navy too, where
     --primary (a button's fill) is not; crimson as a fill keeps --gpi-doc-crimson. */
  --gpi-doc-link: var(--tone-brand-fg, var(--gpi-doc-crimson));
  --gpi-doc-navy: var(--navy, #102a43);
  --gpi-doc-surface: var(--card, #fff);
  --gpi-doc-canvas: var(--background, #f7f7f8);
  --gpi-doc-text: var(--foreground, #102a43);
  --gpi-doc-muted: var(--muted-foreground, #637282);
  --gpi-doc-border: var(--border, #d9dee3);
  color: var(--gpi-doc-text);
  padding-bottom: 2rem;
}
.gpi-doc-workspace *, .gpi-doc-workspace *::before, .gpi-doc-workspace *::after { box-sizing: border-box; }
.gpi-doc-workspace button, .gpi-doc-workspace input, .gpi-doc-workspace select { font: inherit; }
.gpi-doc-workspace button { cursor: pointer; }
.gpi-doc-workspace button:focus-visible, .gpi-doc-workspace a:focus-visible, .gpi-doc-workspace input:focus-visible, .gpi-doc-workspace select:focus-visible { outline: 3px solid color-mix(in srgb, var(--gpi-doc-crimson) 35%, transparent); outline-offset: 2px; }
.gpi-doc-hero { background-color: var(--gpi-doc-surface); border-bottom: 1px solid var(--gpi-doc-border); color: var(--gpi-doc-text); padding: 1.5rem 1.75rem; position: relative; }
.gpi-doc-hero-art { display: none; }
.gpi-doc-hero-art > * { height: 100%; width: 100%; object-fit: cover; }
.gpi-doc-hero-content { position: relative; }
.gpi-doc-title-row { align-items: start; display: flex; gap: 1.25rem; justify-content: space-between; }
.gpi-doc-title-row h1, .gpi-doc-reader h1, .gpi-doc-reader h2, .gpi-doc-reader h3, .gpi-doc-state h1 { font-family: var(--font-display, Buvera, Montserrat, sans-serif); }
.gpi-doc-title-row h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: .25rem 0 .4rem; }
.gpi-doc-title-row p { color: var(--gpi-doc-muted); line-height: 1.55; margin: 0; max-width: 48rem; }
.gpi-doc-eyebrow { color: var(--gpi-doc-link); font-size: .7rem; font-weight: 700; letter-spacing: .14em; margin: 0; text-transform: uppercase; }
.gpi-doc-hero .gpi-doc-eyebrow { color: var(--gpi-doc-muted); }
.gpi-doc-download { border-top: 1px solid var(--gpi-doc-border); color: var(--gpi-doc-muted); font-size: .85rem; margin-top: 2.5rem; padding-top: 1rem; }
.gpi-doc-download a { align-items: center; color: var(--gpi-doc-link); display: inline-flex; font-weight: 600; gap: .4rem; text-decoration: none; }
.gpi-doc-download a:hover { text-decoration: underline; }
.gpi-doc-filters { align-items: center; display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
.gpi-doc-search { flex: 1 1 20rem; position: relative; }
.gpi-doc-search > span:not(.gpi-doc-sr-only) { color: var(--gpi-doc-muted); left: .85rem; position: absolute; top: .8rem; }
.gpi-doc-search input, .gpi-doc-select select { background: var(--gpi-doc-canvas); border: 1px solid var(--gpi-doc-border); border-radius: .5rem; color: var(--gpi-doc-text); height: 3rem; width: 100%; }
.gpi-doc-search input { padding: 0 .75rem 0 2.35rem; }
.gpi-doc-search input::placeholder { color: var(--gpi-doc-muted); }
.gpi-doc-select select { padding-inline: .7rem; }
.gpi-doc-select option { background: var(--gpi-doc-surface); color: var(--gpi-doc-text); }
.gpi-doc-kinds { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: .5rem; }
.gpi-doc-kinds button { background: var(--gpi-doc-canvas); border: 1px solid var(--gpi-doc-border); border-radius: .5rem; color: var(--gpi-doc-text); padding: .4rem .75rem; }
.gpi-doc-kinds button[aria-pressed="true"] { background: var(--gpi-doc-crimson); color: #fff; }
.gpi-doc-body { display: grid; gap: 2rem; grid-template-columns: 16rem minmax(0, 1fr); margin-top: 1.5rem; }
.gpi-doc-sidebar, .gpi-doc-reader { background: var(--gpi-doc-surface); }
.gpi-doc-sidebar { align-self: start; border-right: 1px solid var(--gpi-doc-border); max-height: calc(100vh - 3rem); overflow: auto; position: sticky; top: 1rem; }
.gpi-doc-version { border-bottom: 1px solid var(--gpi-doc-border); display: grid; gap: .3rem; padding: 1rem; }
.gpi-doc-version p { color: var(--gpi-doc-link); font-size: .7rem; font-weight: 700; letter-spacing: .12em; margin: 0; text-transform: uppercase; }
.gpi-doc-version small, .gpi-doc-chapter-toggle small { color: var(--gpi-doc-muted); }
.gpi-doc-overview, .gpi-doc-chapter-toggle { align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--gpi-doc-border); color: inherit; display: flex; gap: .7rem; padding: .85rem 1rem; text-align: left; width: 100%; }
.gpi-doc-overview[aria-current="page"] { background: color-mix(in srgb, var(--gpi-doc-crimson) 7%, transparent); color: var(--gpi-doc-link); }
.gpi-doc-chapter-toggle > span:nth-child(2) { display: grid; flex: 1; gap: .15rem; min-width: 0; }
.gpi-doc-nav-icon, .gpi-doc-chapter-icon, .gpi-doc-heading-icon { align-items: center; background: color-mix(in srgb, var(--gpi-doc-crimson) 8%, transparent); border-radius: .55rem; display: inline-flex; justify-content: center; padding: .4rem; }
.gpi-doc-expand { transition: transform .2s ease; }
.gpi-doc-chapter-toggle[aria-expanded="true"] .gpi-doc-expand { transform: rotate(180deg); }
.gpi-doc-tree-level { list-style: none; margin: 0; padding: 0; }
.gpi-doc-page-navigation > .gpi-doc-tree-level { padding-bottom: .5rem; }
.gpi-doc-tree-folder, .gpi-doc-tree-page { align-items: center; background: transparent; border: 0; border-left: 2px solid transparent; color: inherit; display: flex; gap: .5rem; padding-block: .5rem; padding-inline: calc(.65rem + var(--gpi-doc-tree-depth, 0) * .7rem) .65rem; text-align: left; text-decoration: none; width: 100%; }
.gpi-doc-tree-folder { color: inherit; }
.gpi-doc-tree-folder > span:nth-child(2) { flex: 1; font-weight: 600; }
.gpi-doc-tree-folder .gpi-doc-nav-icon { padding: .3rem; }
.gpi-doc-tree-page { color: var(--gpi-doc-muted); line-height: 1.4; }
.gpi-doc-tree-page[aria-current="page"] { background-color: color-mix(in srgb, var(--gpi-doc-crimson) 6%, transparent); color: var(--gpi-doc-link); font-weight: 650; }
.gpi-doc-tag-filter { border-bottom: 1px solid var(--gpi-doc-border); display: flex; flex-wrap: wrap; gap: .4rem; padding: .85rem 1rem; }
.gpi-doc-tag { background: color-mix(in srgb, var(--gpi-doc-crimson) 6%, transparent); border: 1px solid transparent; border-radius: 999px; color: var(--gpi-doc-muted); font-size: .75rem; font-weight: 650; padding: .3rem .65rem; }
.gpi-doc-tag[aria-pressed="true"] { background: var(--gpi-doc-crimson); color: #fff; }
.gpi-doc-tag-clear { background: transparent; border: 0; color: var(--gpi-doc-link); font-size: .75rem; font-weight: 650; padding: .3rem .35rem; text-decoration: underline; }
.gpi-doc-nav-toggle { align-items: center; background: var(--gpi-doc-surface); border: 1px solid var(--gpi-doc-border); border-radius: .55rem; display: none; gap: .5rem; margin-top: 1rem; padding: .6rem .9rem; }
.gpi-doc-nav-backdrop { display: none; }
.gpi-doc-reader { min-width: 0; padding: .75rem 1.75rem 2rem 0; }
.gpi-doc-chapters { margin-bottom: 2.5rem; }
.gpi-doc-chapter-heading { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-top: .45rem; }
.gpi-doc-chapter-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.gpi-doc-chapter-heading p { color: var(--gpi-doc-muted); line-height: 1.55; margin: .5rem 0 0; max-width: 42rem; }
.gpi-doc-chapter-heading > span { background: var(--gpi-doc-canvas); border-radius: 999px; color: var(--gpi-doc-muted); font-size: .75rem; font-weight: 650; padding: .45rem .75rem; }
.gpi-doc-chapter-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.5rem; }
.gpi-doc-results-heading { align-items: center; display: flex; gap: .75rem; }
.gpi-doc-results-heading h2 { margin: 0; }
.gpi-doc-results-heading p { color: var(--gpi-doc-muted); margin: .15rem 0 0; }
.gpi-doc-results > div:nth-child(2) { margin-top: 1.25rem; }
.gpi-doc-results > div:nth-child(2) > a { background: transparent; border: 0; border-bottom: 1px solid var(--gpi-doc-border); color: inherit; display: grid; gap: .35rem; padding: 1.1rem 0; text-align: left; text-decoration: none; width: 100%; }
.gpi-doc-results small, .gpi-doc-results p { color: var(--gpi-doc-muted); line-height: 1.5; margin: 0; }
.gpi-doc-no-match, .gpi-doc-loading { background: var(--gpi-doc-canvas); border-radius: .65rem; color: var(--gpi-doc-muted); margin-top: 1.5rem; padding: 1.25rem; }
.gpi-doc-back { align-items: center; background: transparent; border: 0; color: var(--gpi-doc-link); display: inline-flex; gap: .35rem; padding: 0; }
.gpi-doc-breadcrumb { margin-top: 1rem; }
.gpi-doc-breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.gpi-doc-breadcrumb li { align-items: center; color: var(--gpi-doc-muted); display: flex; font-size: .8rem; gap: .35rem; }
.gpi-doc-breadcrumb li:not(:first-child)::before { content: "/"; opacity: .5; }
.gpi-doc-breadcrumb button { background: transparent; border: 0; color: var(--gpi-doc-link); font: inherit; font-weight: 650; padding: 0; }
.gpi-doc-breadcrumb span[aria-current="page"] { color: var(--gpi-doc-text); font-weight: 650; }
.gpi-doc-provenance { align-items: center; border-bottom: 1px solid var(--gpi-doc-border); color: var(--gpi-doc-muted); display: flex; flex-wrap: wrap; font-size: .75rem; gap: .45rem; margin: 1.25rem 0 1.75rem; padding-bottom: 1rem; }
.gpi-doc-provenance span:first-child { background: color-mix(in srgb, var(--gpi-doc-crimson) 8%, transparent); border-radius: 999px; color: var(--gpi-doc-link); font-weight: 650; padding: .35rem .65rem; }
.gpi-doc-page-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: -1.25rem 0 1.75rem; }
.gpi-doc-tag-badge { background: var(--gpi-doc-canvas); border-radius: 999px; color: var(--gpi-doc-muted); font-size: .7rem; font-weight: 650; padding: .3rem .6rem; }
.gpi-doc-page-body { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) 11rem; }
.gpi-doc-heading-nav { align-self: start; border-left: 1px solid var(--gpi-doc-border); font-size: .8rem; padding-left: 1.25rem; position: sticky; top: 1rem; }
.gpi-doc-heading-nav p { color: var(--gpi-doc-muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; margin: 0 0 .65rem; text-transform: uppercase; }
.gpi-doc-heading-nav ol { display: grid; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.gpi-doc-heading-nav a { color: var(--gpi-doc-muted); text-decoration: none; }
.gpi-doc-heading-nav a:hover { color: var(--gpi-doc-link); }
.gpi-doc-heading-nav-sub { padding-left: .9rem; }
.gpi-doc-digest-meta { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.gpi-doc-digest-meta > span { align-items: center; background: var(--gpi-doc-canvas); border-radius: 999px; color: var(--gpi-doc-link); display: inline-flex; font-size: .75rem; font-weight: 650; gap: .35rem; padding: .4rem .65rem; }
.gpi-doc-digest-meta small { color: var(--gpi-doc-muted); }
.gpi-doc-markdown { font-size: .98rem; line-height: 1.75; margin-inline: auto; max-width: 72ch; min-width: 0; overflow-wrap: anywhere; width: 100%; }
.gpi-doc-markdown h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2; margin: 0 0 1.5rem; }
.gpi-doc-markdown h2 { border-bottom: 1px solid var(--gpi-doc-border); font-size: 1.4rem; margin: 2.5rem 0 1rem; padding-bottom: .6rem; }
.gpi-doc-markdown h3 { color: var(--gpi-doc-link); font-size: 1.2rem; margin: 2rem 0 .5rem; }
.gpi-doc-markdown p, .gpi-doc-markdown li { color: var(--gpi-doc-text); }
.gpi-doc-markdown a { color: var(--gpi-doc-link); font-weight: 650; text-underline-offset: 2px; }
.gpi-doc-markdown blockquote { background: var(--gpi-doc-canvas); border-left: 4px solid var(--gpi-doc-crimson); border-radius: 0 .65rem .65rem 0; margin: 1.5rem 0; padding: .35rem 1.25rem; }
.gpi-doc-markdown :not(pre) > code { background: var(--gpi-doc-canvas); border-radius: .25rem; padding: .15rem .35rem; }
.gpi-doc-markdown pre { background: var(--gpi-doc-navy); border-radius: .65rem; color: #fff; overflow: auto; padding: 1.25rem; }
.gpi-doc-markdown img { border: 1px solid var(--gpi-doc-border); border-radius: .5rem; display: block; margin: 1.5rem 0; max-height: 34rem; max-width: 100%; object-fit: contain; }
.gpi-doc-table-scroll, .gpi-doc-mermaid, .gpi-doc-mermaid-fallback { overflow-x: auto; }
.gpi-doc-markdown table { border-collapse: collapse; min-width: 100%; }
.gpi-doc-markdown th, .gpi-doc-markdown td { border: 1px solid var(--gpi-doc-border); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.gpi-doc-markdown th { background: var(--gpi-doc-canvas); }
.gpi-doc-mermaid, .gpi-doc-mermaid-fallback { background: var(--gpi-doc-surface); border: 1px solid var(--gpi-doc-border); border-radius: .8rem; margin: 1.75rem 0; padding: 1.25rem; }
.gpi-doc-state { align-items: center; background: var(--gpi-doc-surface); border: 1px solid var(--gpi-doc-border); border-radius: .8rem; display: grid; justify-items: center; min-height: 24rem; padding: 2rem; text-align: center; }
.gpi-doc-state h1 { margin: .75rem 0 0; }
.gpi-doc-state p { color: var(--gpi-doc-muted); max-width: 34rem; }
.gpi-doc-state button { background: var(--gpi-doc-crimson); border: 0; border-radius: .5rem; color: #fff; padding: .65rem 1rem; }
.gpi-doc-sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
@media (max-width: 64rem) {
  .gpi-doc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpi-doc-search { grid-column: 1 / -1; }
  .gpi-doc-page-body { grid-template-columns: minmax(0, 1fr); }
  .gpi-doc-heading-nav { border-left: 0; border-top: 1px solid var(--gpi-doc-border); padding-left: 0; padding-top: 1.25rem; position: static; }
  .gpi-doc-nav-toggle { display: inline-flex; }
  .gpi-doc-body { grid-template-columns: 1fr; position: relative; }
  .gpi-doc-sidebar { max-height: none; position: static; }
  .gpi-doc-page-navigation { max-height: none; overflow: visible; }
  .gpi-doc-chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /*
   * Mobile drawer: the sidebar (version panel, overview link, tag filter,
   * source tree) becomes a fixed off-canvas panel that slides in only when
   * gpi-doc-nav-open is set; a full-screen backdrop closes it on click. At
   * widths above this breakpoint gpi-doc-nav-open has no effect at all —
   * the sidebar renders inline exactly as it always has.
   */
  .gpi-doc-body:not(.gpi-doc-nav-open) .gpi-doc-sidebar { display: none; }
  .gpi-doc-nav-open .gpi-doc-sidebar {
    background: var(--gpi-doc-surface);
    bottom: 0;
    box-shadow: 0 0 30px rgb(16 42 67 / 25%);
    max-width: 22rem;
    overflow: auto;
    position: fixed;
    right: 0;
    top: 0;
    width: 85vw;
    z-index: 40;
  }
  .gpi-doc-nav-backdrop { background: rgb(16 42 67 / 45%); bottom: 0; display: block; left: 0; position: fixed; right: 0; top: 0; z-index: 30; }
}
@media (max-width: 40rem) {
  .gpi-doc-hero { border-radius: .75rem; padding: 1.35rem; }
  .gpi-doc-title-row { align-items: stretch; flex-direction: column; }
  .gpi-doc-filters { grid-template-columns: 1fr; }
  .gpi-doc-search, .gpi-doc-kinds { grid-column: auto; }
  .gpi-doc-reader { padding: 1.25rem; }
  .gpi-doc-chapter-grid { grid-template-columns: 1fr; }
  .gpi-doc-chapter-heading { align-items: start; flex-direction: column; }
}

.gpi-doc-release-label { color: var(--gpi-doc-muted); display: inline-block; font-size: .75rem; margin-top: .45rem; }
.gpi-doc-chapter-grid > section { border: 1px solid var(--gpi-doc-border); border-radius: .65rem; padding: 1.1rem; }
.gpi-doc-chapter-grid h3 { align-items: center; display: flex; font-family: var(--font-display, Buvera, Montserrat, sans-serif); font-size: 1.1rem; gap: .65rem; margin: 0 0 .8rem; }
.gpi-doc-chapter-grid ul { display: grid; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.gpi-doc-chapter-grid a { align-items: center; border-radius: .25rem; color: var(--gpi-doc-text); display: flex; font-size: .85rem; gap: .65rem; justify-content: space-between; line-height: 1.5; padding: .4rem .2rem; text-decoration: none; }
.gpi-doc-chapter-grid a:hover, .gpi-doc-tree-page:hover { background-color: var(--gpi-doc-canvas); color: var(--gpi-doc-link); }
.gpi-doc-chapter-grid a > span { color: var(--gpi-doc-muted); flex-shrink: 0; }
.gpi-doc-chapter-grid a svg { height: 1rem; width: 1rem; }
.gpi-doc-tag-disclosure { border-top: 1px solid var(--gpi-doc-border); font-size: .8rem; margin-top: 1rem; }
.gpi-doc-tag-disclosure summary { color: var(--gpi-doc-muted); cursor: pointer; padding: 1rem .75rem; }
.gpi-doc-heading-icon { display: none; }
@media (max-width: 80rem) {
  .gpi-doc-page-body { grid-template-columns: minmax(0, 1fr); }
  .gpi-doc-heading-nav { border: 0; border-bottom: 1px solid var(--gpi-doc-border); order: -1; padding: 0 0 1rem; position: static; }
}
@media (max-width: 40rem) {
  .gpi-doc-filters { align-items: stretch; }
  .gpi-doc-search { flex-basis: 100%; }
  .gpi-doc-select { flex: 1; }
  .gpi-doc-body { gap: 0; }
}

.gpi-doc-workspace-reading .gpi-doc-hero { padding-block: .75rem; }
.gpi-doc-workspace-reading .gpi-doc-title-row .gpi-doc-eyebrow,
.gpi-doc-workspace-reading .gpi-doc-title-row .gpi-doc-description { display: none; }
.gpi-doc-workspace-reading .gpi-doc-workspace-title { color: var(--gpi-doc-text); font-family: var(--font-display, Buvera, Montserrat, sans-serif); font-size: 1.1rem; }
.gpi-doc-workspace-reading .gpi-doc-filters { margin-top: .75rem; }
.gpi-doc-breadcrumb { margin: 0 0 1.25rem; }
.gpi-doc-provenance { border-bottom: 0; border-top: 1px solid var(--gpi-doc-border); margin-top: 2rem; padding-block: 1rem; }
@media (max-width: 40rem) {
  .gpi-doc-workspace-reading .gpi-doc-search { flex: 1 1 9rem; }
  .gpi-doc-workspace-reading .gpi-doc-select { flex: 0 0 4.5rem; }
  .gpi-doc-workspace-reading .gpi-doc-reader { padding-top: .5rem; }
}
.gpi-doc-tree-page:has(.gpi-doc-locked) { flex-wrap: wrap; row-gap: .25rem; }
.gpi-doc-tree-page .gpi-doc-locked { margin-inline-start: 0; }
.gpi-doc-locked { border: 1px solid var(--gpi-doc-border); border-radius: 999px; color: var(--gpi-doc-muted); font-size: .7rem; font-weight: 600; margin-inline-start: .5rem; padding: .05rem .5rem; white-space: nowrap; }


html, body { margin: 0; }
body { background: var(--background); color: var(--foreground); font-family: var(--font-body); }
.gpi-store-page { margin: 0 auto; max-width: 84rem; padding: 1.5rem 1rem 0; }
.gpi-store-footer { border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: .8rem; margin: 2rem auto 0; max-width: 84rem; padding: 1rem; }
.gpi-store-footer a { color: inherit; }
.gpi-store-products { list-style: none; padding: 0; }
.gpi-store-products a { color: var(--primary); font-size: 1.1rem; font-weight: 600; }
.gpi-store-glyph { display: inline-block; line-height: 1; }
