/* ============================================================
   Gov.om Design System - Bundled CSS
   Converted from @govom/tokens + @govom/components (Lit/Shadow DOM)
   to plain CSS for use in Blazor without npm.
   ============================================================ */

/* ------------------------------------------------------------
   1. FONTS
   Readex Pro (Latin + Arabic, weights 400/700) is loaded from Google Fonts
   via GUPHTMLHeader.razor:
     https://fonts.googleapis.com/css2?family=Readex+Pro:wght@400;700
   Google serves the correct Latin/Arabic unicode-range subsets, so no
   self-hosted @font-face is needed here.
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   2. CSS CUSTOM PROPERTIES — Design Tokens
   ------------------------------------------------------------ */
:root {
  /* Unit */
  --unit: 4px;

  /* --- Color Palette (aligned to Gov.om Design System — LIVE @govom implementation) ---
     Semantic names (xhigh/high/medium/low/xlow) are the values components consume.
     The *-medium slots carry the live design-system primary/success/danger/warning
     colors (#0b5fff etc.), exposed also via the flat --primary/--success/--danger/
     --warning/--info aliases below. Figma shade values are preserved separately as
     --gup-color-*-fig-* tokens for design-file mapping. */
  --gup-color-brand-xhigh: #132459;      /* deep navy — header/secondary text, borders (matches mockup) */
  --gup-color-accent-2xhigh: #132459;
  --gup-color-brand-high: #243d89;       /* Foundations §2.1 brand-high */
  --gup-color-brand-medium: #2f57cd;     /* Foundations §2.1 brand-medium (distinct from --primary) */
  --gup-color-brand-medium-low: #4d78ff; /* Figma brand 600 */
  --gup-color-brand-low: #bfd8ff;
  --gup-color-brand-xlow: #dde9ff;
  --gup-color-brand-contrast: #ffffff;
  --gup-color-neutral-xhigh: #202024;    /* live gray-900 — primary text */
  --gup-color-neutral-high: #27272a;     /* live gray-800 */
  --gup-color-neutral-medium: #3f3f46;   /* live gray-700 */
  --gup-color-neutral-low: #d0d0d4;      /* live gray-400 — disabled bg */
  --gup-color-neutral-xlow: #fcfcfc;     /* live gray-100 — lightest bg */
  --gup-color-neutral-contrast: #ffffff;
  --gup-color-positive-xhigh: #114c29;
  --gup-color-positive-high: #157f3c;
  --gup-color-positive-medium: #16a249;  /* live --success */
  --gup-color-positive-low: #85efac;
  --gup-color-positive-xlow: #f2fdf5;    /* live green-100 */
  --gup-color-positive-contrast: #ffffff;
  --gup-color-warning-xhigh: #733f12;
  --gup-color-warning-high: #a26107;
  --gup-color-warning-medium: #ca8511;   /* live --warning */
  --gup-color-warning-low: #ffe771;
  --gup-color-warning-xlow: #fefce7;
  --gup-color-warning-contrast: #ffffff;
  --gup-color-negative-xhigh: #811d1d;
  --gup-color-negative-high: #ba1c1c;
  --gup-color-negative-medium: #dc2828;  /* live --danger */
  --gup-color-negative-low: #ffa0a0;
  --gup-color-negative-xlow: #fef1f1;    /* live red-100 */
  --gup-color-negative-contrast: #ffffff;

  /* --- Flat semantic aliases (live @govom token names) --- */
  --primary: #0b5fff;
  --success: #287d3c;
  --danger: #da1414;
  --warning: #b95000;
  --info: #2e5aac;
  --text-primary: #2d2d2d;
  --text-secondary: #5b5b5b;
  --text-tertiary: #7e7e7e;
  --text-muted: #a7a9bc;
  --text-placeholder: #52525b;
  --body-color: #272833;
  --body-bg: #ffffff;
  --light: #f1f2f5;
  --dark: #272833;
  --white: #ffffff;
  --black: #000000;
  --border-primary: #c1c1c1;
  --gup-brand-default: #2d2d2d;
  --gup-brand-strong: #101010;
  --gup-brand-secondary: #5b5b5b;
  --gup-brand-soft: #f5f5f5;

  /* --- Neutral gray scale (Foundations §2.3) --- */
  --gray-100: #f7f8f9;
  --gray-200: #f1f2f5;
  --gray-300: #e7e7ed;
  --gray-400: #cdced9;
  --gray-500: #a7a9bc;
  --gray-600: #6b6c7e;
  --gray-700: #545465;
  --gray-800: #393a4a;
  --gray-900: #272833;

  /* --- Extended blue scale (Foundations §2.4) --- */
  --blue-100: #eef4fd;
  --blue-200: #cfddf9;
  --blue-300: #a3bff0;
  --blue-400: #7ba0e7;
  --blue-500: #5a83de;
  --blue-600: #3968d5;
  --blue-700: #2453b8;
  --blue-800: #1b3e8a;
  --blue-900: #132a5c;
  --blue-1000: #0a1629;
  /* Green / red scale anchors (full families available in the design system) */
  --green-100: #e6fae3;
  --green-500: #44a935;
  --green-1000: #0c1d09;
  --red-100: #fef2f2;
  --red-500: #ef6b6b;
  --red-1000: #320d0d;

  --gup-color-brand-accent-xhigh: #11111e; /* accent 900 */
  --gup-color-brand-accent-high: #2a324c;  /* accent 700 — deep accent blue */
  --gup-color-brand-accent-medium: #414e77;/* accent 600 — muted accent */
  --gup-color-brand-accent-low: #c9ccdd;   /* upstream tokens/src/variables/color.css */
  --gup-color-brand-accent-xlow: #eceef4;  /* accent 200 */
  --gup-color-brand-accent-contrast: #ffffff;

  /* --- Design-system numeric shade tokens (map 1:1 to Figma) --- */
  --gup-color-brand-900: #132450;
  --gup-color-brand-800: #2a3260;
  --gup-color-brand-700: #2f97cd;
  --gup-color-brand-600: #4078ff;
  --gup-color-brand-500: #bfd8ff;
  --gup-color-brand-400: #d0e6ff;
  --gup-color-brand-300: #ffffff;
  --gup-color-neutral-900: #202024;
  --gup-color-neutral-800: #272726;
  --gup-color-neutral-700: #3f3f40;
  --gup-color-neutral-600: #303034;
  --gup-color-neutral-300: #fcfcfc;
  --gup-color-neutral-100: #ffffff;
  --gup-color-positive-900: #134029;
  --gup-color-positive-700: #1b7f3c;
  --gup-color-positive-600: #10a24b;
  --gup-color-positive-400: #80efac;
  --gup-color-positive-200: #f2f5f5;
  --gup-color-positive-100: #ffffff;
  --gup-color-warning-900: #733f52;
  --gup-color-warning-700: #a26507;
  --gup-color-warning-600: #cab551;
  --gup-color-warning-400: #ffe771;
  --gup-color-warning-200: #fefce7;
  --gup-color-warning-100: #ffffff;
  --gup-color-negative-900: #b11d1d;
  --gup-color-negative-700: #ba1c1c;
  /* NOTE: the design-system doc lists negative 600 as #DC9808 (an amber),
     labelled "secondary warning-error". That is an amber, not a red, so it is
     NOT used for the red error semantic (--gup-color-negative-medium). It is
     preserved verbatim here only for fidelity; do not use it for error text. */
  --gup-color-negative-600-doc: #dc9808;
  --gup-color-negative-400: #f7ada0;
  --gup-color-negative-200: #fef5f1;
  --gup-color-negative-100: #ffffff;
  --gup-color-brand-accent-900: #111111;
  --gup-color-brand-accent-700: #0a3dac;
  --gup-color-brand-accent-600: #414e77;
  --gup-color-brand-accent-400: #36cc8d;
  --gup-color-brand-accent-200: #eceef4;
  --gup-color-brand-accent-100: #ffffff;

  /* --- Semantic Colors --- */
  --gup-color-states-base-border: #7a7a83;
  --gup-color-icon-inverse: #ffffff;
  --gup-color-states-primary-hover: rgba(26 26 26 / 26%);
  --gup-color-states-secondary-hover: rgba(26 26 26 / 8%);
  --gup-color-states-secondary-active: rgba(26 26 26 / 18%);
  --gup-color-states-primary-active: rgba(26 26 26 / 70%);
  --gup-color-states-base-bg: #ffffff;
  --gup-color-states-base-bg-secondary: #f4f4f5;
  --gup-color-states-base-bg-control: #eceef4;
  --gup-color-states-disabled-medium: #a1a1aa;
  --gup-color-states-disabled-low: #d0d0d4;
  --gup-color-states-base-focus-ring: #9747ff;
  --gup-color-states-inverted-primary-hover: rgba(255 255 255 / 80%);
  --gup-color-states-inverted-primary-active: rgba(255 255 255 / 60%);
  --gup-color-states-inverted-secondary-hover: rgba(26 26 26 / 26%);
  --gup-color-states-inverted-secondary-active: rgba(26 26 26 / 70%);
  --gup-color-states-inverted-disabled-medium: rgba(255 255 255 / 18%);
  --gup-color-states-inverted-disabled-low: rgba(255 255 255 / 18%);

  /* --- Content Colors --- */
  --gup-color-content-primary: #27272a;
  --gup-color-content-secondary: #52525b;
  --gup-color-content-tertiary: #7a7a83;
  --gup-color-content-on-fill: #ffffff;
  --gup-color-content-inverted-primary: #ffffff;
  --gup-color-content-inverted-secondary: rgba(255 255 255 / 70%);
  --gup-color-content-inverted-tertiary: rgba(255 255 255 / 60%);
  --gup-color-content-inverted-link: #bfd8ff;
  --gup-color-content-link: #132459;
  /* Semantic content-status text colors (for validation/status messages).
     Point at the semantic feedback palette. */
  --gup-color-content-negative: var(--danger);
  --gup-color-content-positive: var(--success);
  --gup-color-content-warning: var(--warning);
  --gup-color-content-info: var(--info);

  /* --- Border Colors --- */
  --gup-color-border-medium: #d0d0d4;
  --gup-color-border-low: #e1e1e2;
  --gup-color-border-xlow: #f4f4f5;
  --gup-color-border-inverted-medium: rgba(255 255 255 / 26%);
  --gup-color-border-inverted-low: rgba(255 255 255 / 18%);
  --gup-color-border-inverted-xlow: rgba(255 255 255 / 12%);

  /* --- Background Colors --- */
  --gup-color-background-base: #ffffff;
  --gup-color-background-canvas: #fefcf9;   /* wizard/form content surface (cream) */
  --gup-color-background-page: #e8e8e8;      /* outer page background per Gov.om design system */
  --gup-color-background-overcanvas: #eceef4;
  --gup-color-background-elevated-container: #ffffff;
  --gup-color-background-accent-container: #eceef4;
  --gup-color-background-navigation-bar: rgba(255 255 255 / 48%);
  --gup-color-background-footer: #1c2133;
  --gup-color-background-wizard-bar: #eceef4;
  --gup-color-background-gradient-1-start: #eff5ff;
  --gup-color-background-gradient-1-end: #f7f5f1;
  --gup-color-background-gradient-2-start: #eff5ff;
  --gup-color-background-gradient-2-end: #fafbff;

  /* --- Legacy color aliases used in components --- */
  --color-blue-700: #2c64b9;
  --color-blue-600: #377de6;
  --color-grey-0: #ffffff;
  --color-grey-100: #f5f5f5;
  --color-grey-400: #a9a9a9;
  --color-grey-600: #7e7e7e;
  --color-grey-900: #2d2d2d;
  --color-grey-999: #000000;
  --color-body: var(--color-grey-999);

  /* --- Spacing & Layout Tokens --- */
  --gup-component-0: 0px;
  --gup-component-1: 2px;
  --gup-component-2: 4px;
  --gup-component-3: 8px;
  --gup-component-4: 12px;
  --gup-component-5: 16px;
  --gup-component-6: 20px;
  --gup-component-7: 24px;
  --gup-component-8: 32px;
  --gup-component-9: 40px;
  --gup-universal-space-4: 20px;
  --gup-universal-space-5: 24px;
  --gup-universal-space-7: 40px;
  --gup-universal-space-9: 64px;
  --gup-universal-space-10: 80px;
  --gup-padding-xs: 8px;
  --gup-padding-sm: 16px;
  --gup-padding-md: 24px;
  --gup-padding-lg: 32px;
  --gup-padding-xl: 40px;
  --gup-icon-xs: 16px;
  --gup-icon-sm: 20px;
  --gup-icon-md: 24px;
  --gup-icon-lg: 28px;
  --gup-icon-xl: 32px;

  /* --- Gov.om GUP spacing scale (pixel-based) --- */
  --gup-space-0: 0;
  --gup-space-1: 2px;
  --gup-space-2: 4px;
  --gup-space-3: 8px;
  --gup-space-4: 12px;
  --gup-space-5: 16px;
  --gup-space-6: 20px;
  --gup-space-7: 24px;
  --gup-space-8: 28px;
  --gup-space-9: 32px;
  --gup-space-10: 36px;
  --gup-space-11: 40px;
  --gup-space-12: 48px;
  --gup-space-13: 64px;
  --gup-space-14: 80px;

  /* --- Gov.om spacer scale (rem-based) --- */
  --spacer-0: 0;
  --spacer-1: 0.25rem;   /* 4px */
  --spacer-2: 0.5rem;    /* 8px */
  --spacer-3: 1rem;      /* 16px */
  --spacer-4: 1.5rem;    /* 24px */
  --spacer-5: 3rem;      /* 48px */
  --spacer-6: 4.5rem;    /* 72px */
  --spacer-7: 6rem;      /* 96px */
  --spacer-8: 7.5rem;    /* 120px */
  --spacer-9: 9rem;      /* 144px */
  --spacer-10: 10rem;    /* 160px */

  /* --- Semantic Spacing --- */
  --gup-spacing-component-default: 12px;
  --gup-spacing-content-to-cta: 32px;
  --gup-spacing-between-content: 24px;
  --gup-spacing-between-form-fields: 20px;
  --gup-spacing-between-items: 8px;
  --gup-spacing-between-options: 0px;
  --gup-spacing-between-sections: 48px;
  --gup-spacing-between-text: 16px;
  --gup-spacing-horizontal-between-columns: 24px;
  --gup-spacing-image-bottom: 8px;
  --gup-spacing-text-to-component: 16px;

  /* --- Border Radius --- */
  --gup-radius-button: 999px;
  --gup-radius-component-default: 8px;
  --gup-radius-component-small: 4px;
  --gup-radius-component-full: 999px;
  --gup-radius-card: 12px;

  /* --- Border radius (Foundations appendix) --- */
  --border-radius-sm: 0.1875rem;   /* 3px */
  --border-radius: 0.25rem;        /* 4px */
  --border-radius-lg: 0.375rem;    /* 6px */
  --border-radius-circle: 50%;
  --rounded-pill: 50rem;

  /* --- Box shadows (Foundations appendix) --- */
  --box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
  --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
  --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);

  /* --- Transitions (Foundations §5.8) --- */
  --transition-collapse: height .35s ease;
  --transition-fade: opacity .15s linear;

  /* --- Aspect ratios (Foundations §5.7) --- */
  --aspect-ratio: 100%;
  --aspect-ratio-4-to-3: 75%;
  --aspect-ratio-16-to-9: 56.25%;
  --aspect-ratio-8-to-3: 37.5%;

  /* --- Responsive Breakpoints (Gov.om live design system) --- */
  --gup-breakpoint-mobile: 480px;         /* compact mobile */
  --gup-breakpoint-mobile-landscape: 600px;
  --gup-breakpoint-tablet: 767px;         /* sidebar → overlay; single-column */
  --gup-breakpoint-tablet-landscape: 810px;
  --gup-breakpoint-small-desktop: 991px;
  --gup-breakpoint-desktop: 1200px;       /* nav collapse threshold */
  --gup-breakpoint-wide: 1440px;

  /* Container max-widths (Gov.om) */
  --gup-container-max-sm: 540px;
  --gup-container-max-md: 720px;
  --gup-container-max-lg: 960px;
  --gup-container-max-xl: 1248px;
  /* Page shell (foundations-layout.md): chrome — header, content header and
     wizard footer — centres its inner wrapper at 1024px. */
  --gup-content-max: 1024px;
  --gup-container-max: var(--gup-content-max); /* default page content cap */

  /* The wizard main column is deliberately narrower than the chrome: a 632px
     measure constraint for legibility. Do not widen it. */
  --gup-wizard-main-max: 632px;

  /* Grid + gutters (Gov.om): 3-column desktop grid, fluid gap. */
  --gup-gutter: 32px;
  --gup-grid-columns: 3;
  --gup-grid-gap: 40px;           /* desktop row/column gap (tablet: 32px) */

  /* --- Focus Ring --- */
  /* foundations-tokens.md: 6px, colour --gup-color-states-base-focus-ring (#9747ff). */
  --gup-stroke-focus-ring: 6px;

  /* --- Shadow Colors --- */
  --gup-color-shadow-color-1: rgba(28 33 51 / 1%);
  --gup-color-shadow-color-2: rgba(28 33 51 / 2%);
  --gup-color-shadow-color-3: rgba(28 33 51 / 3%);
  --gup-color-shadow-color-4: rgba(28 33 51 / 4%);
  --gup-color-shadow-color-5: rgba(28 33 51 / 6%);

  /* --- Elevation (Gov.om effect styles) ---
     shadow-100: subtle — cards, containers, resting elements.
     shadow-200: elevated — dropdowns, modals, overlapping elements. */
  --gup-shadow-100:
    0 1px 2px 0 var(--gup-color-shadow-color-2),
    0 3px 6px 0 var(--gup-color-shadow-color-3);
  --gup-shadow-200:
    0 16px 32px 0 var(--gup-color-shadow-color-5),
    0 8px 16px 0 var(--gup-color-shadow-color-4),
    0 3px 6px 0 var(--gup-color-shadow-color-3),
    0 1px 2px 0 var(--gup-color-shadow-color-2);

  /* --- Typography --- */
  --font-base-ltr: 'Readex Pro', sans-serif;
  --font-base-rtl: var(--font-base-ltr);
  --font-base: var(--font-base-ltr);

  /* Font weights (Foundations §3.2) */
  --font-weight-lighter: lighter;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semi-bold: 600;
  --font-weight-bold: 700;
  --font-weight-bolder: 900;

  /* Heading scale (Foundations §3.4) — live implementation sizes */
  --h1-font-size: 1.625rem;   /* 26px */
  --h2-font-size: 1.375rem;   /* 22px */
  --h3-font-size: 1.1875rem;  /* 19px */
  --h4-font-size: 1rem;       /* 16px */
  --h5-font-size: 0.875rem;   /* 14px */
  --h6-font-size: 0.8125rem;  /* 13px */

  /* Body/display sizes (Foundations §3.3, §3.5) */
  --font-size-base: 0.875rem; /* 14px */
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;   /* 18px */
  --lead-font-size: 1.25rem;  /* 20px */
  --lead-font-weight: 300;
  --display1-size: 6rem;
  --display2-size: 5.5rem;
  --display3-size: 4.5rem;
  --display4-size: 3.5rem;
  --display-line-height: 1.2;

  --font-size-90: 8px;
  --font-size-200: 12px;
  --font-size-250: 13px;
  --font-size-300: 14px;
  --font-size-400: 16px;
  --font-size-525: 19px;
  --font-size-550: 20px;
  --font-size-600: 24px;
  --font-size-700: 32px;
  --line-height-400: 1.4;
  --line-height-500: 1.5;
  --font-weight-base-beta: bold;
  --font-size-body: var(--font-size-400);
  --line-height-body: var(--line-height-500);

  /* --- Semantic Type Scale (Gov.om Design System) ---
     Font-size / line-height pairs from the Gov.om type tokens.
     Weights: body = 400, label = 500 (medium), strong/headline/display = 700.
     Use via the utility classes below (.gup-text-headline-md, etc.). */
  --gup-font-weight-regular: 400;
  --gup-font-weight-medium: 500;
  --gup-font-weight-bold: 700;

  /* Body (regular) */
  --gup-body-xl-size: 24px;    --gup-body-xl-line: 32px;
  --gup-body-lg-size: 20px;    --gup-body-lg-line: 28px;
  --gup-body-md-size: 16px;    --gup-body-md-line: 24px;
  --gup-body-sm-size: 14px;    --gup-body-sm-line: 20px;
  --gup-body-xs-size: 12px;    --gup-body-xs-line: 16px;

  /* Label (medium) */
  --gup-label-xl-size: 24px;   --gup-label-xl-line: 32px;
  --gup-label-lg-size: 20px;   --gup-label-lg-line: 28px;
  --gup-label-md-size: 16px;   --gup-label-md-line: 24px;
  --gup-label-sm-size: 14px;   --gup-label-sm-line: 20px;
  --gup-label-xs-size: 12px;   --gup-label-xs-line: 16px;
  --gup-label-xxs-size: 10px;  --gup-label-xxs-line: 12px;

  /* Strong (bold) */
  --gup-strong-xl-size: 24px;  --gup-strong-xl-line: 32px;
  --gup-strong-lg-size: 20px;  --gup-strong-lg-line: 28px;
  --gup-strong-md-size: 16px;  --gup-strong-md-line: 24px;
  --gup-strong-sm-size: 14px;  --gup-strong-sm-line: 20px;

  /* Headline (bold) — large sizes scale fluidly on small screens (Foundations §3.10).
     clamp(min, preferred-vw, design-size): min keeps them readable on ~360px phones. */
  --gup-headline-xl-size: clamp(28px, 6vw, 40px);  --gup-headline-xl-line: 1.3;
  --gup-headline-lg-size: clamp(24px, 5vw, 32px);  --gup-headline-lg-line: 1.35;
  --gup-headline-md-size: clamp(22px, 4.5vw, 28px);--gup-headline-md-line: 1.4;
  --gup-headline-sm-size: clamp(20px, 4vw, 24px);  --gup-headline-sm-line: 1.35;
  --gup-headline-xs-size: 20px;  --gup-headline-xs-line: 28px;
  --gup-headline-xxs-size: 16px; --gup-headline-xxs-line: 24px;

  /* Display (bold, uppercase) — fluid down to 32px on small screens. */
  --gup-display-md-size: clamp(32px, 7vw, 48px);   --gup-display-md-line: 1.3;

  /* --- Directional --- */
  --gup--is-ltr: 1;
}

:dir(rtl),
[dir="rtl"] {
  --gup--is-ltr: -1;
  --font-base: var(--font-base-rtl);
}

/* ------------------------------------------------------------
   3. NORMALIZE & RESET
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6, p, dl, dd, ul, ol, li, figure {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  font-size: 100%;
}

button {
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  font-size: inherit;
  text-align: inherit;
}

button, input, optgroup, select, textarea {
  line-height: inherit;
  color: inherit;
  padding: 0;
}

img, video { max-width: 100%; height: auto; }

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

a { text-decoration: none; }
svg { fill: currentColor; }
th { text-align: start; }
fieldset { border: none; margin: 0; padding: 0; }
:disabled { cursor: default; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
ol, ul, menu { list-style: none; }
textarea { resize: vertical; }

/* ------------------------------------------------------------
   4. GLOBAL BASE
   ------------------------------------------------------------ */
body {
  font-family: var(--font-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-body);
  background-color: var(--gup-color-background-page);
  margin: 0;
}

/* ------------------------------------------------------------
   4a. RESPONSIVE LAYOUT SYSTEM (Gov.om live design system)
   - .gup-container: centered, gutter-padded, capped at container-max (1248px).
   - .gup-grid: 3-column desktop grid (Gov.om standard); collapses to a single
     column below 960px. .gup-col-{1..3} span columns; .gup-col-span-2 spans two.
   Container width variants map to the documented breakpoint caps.
   ------------------------------------------------------------ */
.gup-container {
  width: 100%;
  max-width: var(--gup-container-max);
  margin-inline: auto;
  padding-inline: var(--gup-gutter);
}
.gup-container--sm { max-width: var(--gup-container-max-sm); }
.gup-container--md { max-width: var(--gup-container-max-md); }
.gup-container--lg { max-width: var(--gup-container-max-lg); }
.gup-container--xl { max-width: var(--gup-container-max-xl); }

.gup-grid {
  display: grid;
  grid-template-columns: repeat(var(--gup-grid-columns), minmax(0, 1fr));
  gap: var(--gup-grid-gap);
}

.gup-col-1        { grid-column: span 1; }
.gup-col-2,
.gup-col-span-2   { grid-column: span 2; }
.gup-col-3,
.gup-col-full     { grid-column: 1 / -1; }

/* Responsive behavior — Gov.om Foundations §5.1 principles.
   P1  ≥1024px : content capped at --gup-content-max, background fills the rest.
   P2  ≤1024px : fewer columns (3 → 2), 32px side padding.
   P3  <750px  : padding → 20px; nav labels collapse to icons via
                 .gup-hide-below-mobile (opt-in — header slots are consumer-authored).
   P4  <640px  : single column; GupDataTable moves filters to the top. */

/* Tablet (≤ 1024px): fewer columns (3 → 2 per Principle 2), 32px side padding,
   grid gap 40 → 32. The column reduction was missing until now: the grid held at 3
   columns through the whole 720–1024 band and dropped straight to 1 at 639px. */
@media (max-width: 1024px) {
  :root {
    --gup-grid-columns: 2;
    --gup-gutter: 32px;
    --gup-grid-gap: 32px;
  }
}

/* Small tablet / large mobile (< 750px): tighten padding to 20px. */
@media (max-width: 749px) {
  :root { --gup-gutter: 20px; }
}

/* Mobile (< 640px): collapse to a single column. */
@media (max-width: 639px) {
  .gup-grid { grid-template-columns: 1fr; }
  .gup-grid > [class*="gup-col-"] { grid-column: 1 / -1; }
}

/* --- Responsive visibility utilities (Gov.om §5.1 Principle 3) ---
   The header's Start/End content is consumer-authored, so labels can't be
   auto-hidden. Apply .gup-hide-below-mobile to a label span next to an icon
   to collapse to icon-only below 750px; .gup-show-below-mobile for the inverse
   (e.g. a hamburger button shown only on small screens). */
@media (max-width: 749px) {
  .gup-hide-below-mobile { display: none !important; }
}
@media (min-width: 750px) {
  .gup-show-below-mobile { display: none !important; }
}

/* ------------------------------------------------------------
   4b. TYPOGRAPHY UTILITIES (Gov.om semantic type scale)
   Apply a single class to any text element to get the exact
   font-size / line-height / weight from the design system.
   ------------------------------------------------------------ */
.gup-text-body-xl { font-size: var(--gup-body-xl-size); line-height: var(--gup-body-xl-line); font-weight: var(--gup-font-weight-regular); }
.gup-text-body-lg { font-size: var(--gup-body-lg-size); line-height: var(--gup-body-lg-line); font-weight: var(--gup-font-weight-regular); }
.gup-text-body-md { font-size: var(--gup-body-md-size); line-height: var(--gup-body-md-line); font-weight: var(--gup-font-weight-regular); }
.gup-text-body-sm { font-size: var(--gup-body-sm-size); line-height: var(--gup-body-sm-line); font-weight: var(--gup-font-weight-regular); }
.gup-text-body-xs { font-size: var(--gup-body-xs-size); line-height: var(--gup-body-xs-line); font-weight: var(--gup-font-weight-regular); }

.gup-text-label-xl  { font-size: var(--gup-label-xl-size);  line-height: var(--gup-label-xl-line);  font-weight: var(--gup-font-weight-medium); }
.gup-text-label-lg  { font-size: var(--gup-label-lg-size);  line-height: var(--gup-label-lg-line);  font-weight: var(--gup-font-weight-medium); }
.gup-text-label-md  { font-size: var(--gup-label-md-size);  line-height: var(--gup-label-md-line);  font-weight: var(--gup-font-weight-medium); }
.gup-text-label-sm  { font-size: var(--gup-label-sm-size);  line-height: var(--gup-label-sm-line);  font-weight: var(--gup-font-weight-medium); }
.gup-text-label-xs  { font-size: var(--gup-label-xs-size);  line-height: var(--gup-label-xs-line);  font-weight: var(--gup-font-weight-medium); }
.gup-text-label-xxs { font-size: var(--gup-label-xxs-size); line-height: var(--gup-label-xxs-line); font-weight: var(--gup-font-weight-medium); }

/* Label underline — same sizes as label, with underline decoration. */
.gup-text-label-underline-xl,
.gup-text-label-underline-lg,
.gup-text-label-underline-md,
.gup-text-label-underline-sm,
.gup-text-label-underline-xs,
.gup-text-label-underline-xxs { text-decoration: underline; text-underline-offset: 2px; font-weight: var(--gup-font-weight-medium); }
.gup-text-label-underline-xl  { font-size: var(--gup-label-xl-size);  line-height: var(--gup-label-xl-line); }
.gup-text-label-underline-lg  { font-size: var(--gup-label-lg-size);  line-height: var(--gup-label-lg-line); }
.gup-text-label-underline-md  { font-size: var(--gup-label-md-size);  line-height: var(--gup-label-md-line); }
.gup-text-label-underline-sm  { font-size: var(--gup-label-sm-size);  line-height: var(--gup-label-sm-line); }
.gup-text-label-underline-xs  { font-size: var(--gup-label-xs-size);  line-height: var(--gup-label-xs-line); }
.gup-text-label-underline-xxs { font-size: var(--gup-label-xxs-size); line-height: var(--gup-label-xxs-line); }

.gup-text-strong-xl { font-size: var(--gup-strong-xl-size); line-height: var(--gup-strong-xl-line); font-weight: var(--gup-font-weight-bold); }
.gup-text-strong-lg { font-size: var(--gup-strong-lg-size); line-height: var(--gup-strong-lg-line); font-weight: var(--gup-font-weight-bold); }
.gup-text-strong-md { font-size: var(--gup-strong-md-size); line-height: var(--gup-strong-md-line); font-weight: var(--gup-font-weight-bold); }
.gup-text-strong-sm { font-size: var(--gup-strong-sm-size); line-height: var(--gup-strong-sm-line); font-weight: var(--gup-font-weight-bold); }

.gup-text-headline-xl  { font-size: var(--gup-headline-xl-size);  line-height: var(--gup-headline-xl-line);  font-weight: var(--gup-font-weight-bold); }
.gup-text-headline-lg  { font-size: var(--gup-headline-lg-size);  line-height: var(--gup-headline-lg-line);  font-weight: var(--gup-font-weight-bold); }
.gup-text-headline-md  { font-size: var(--gup-headline-md-size);  line-height: var(--gup-headline-md-line);  font-weight: var(--gup-font-weight-bold); }
.gup-text-headline-sm  { font-size: var(--gup-headline-sm-size);  line-height: var(--gup-headline-sm-line);  font-weight: var(--gup-font-weight-bold); }
.gup-text-headline-xs  { font-size: var(--gup-headline-xs-size);  line-height: var(--gup-headline-xs-line);  font-weight: var(--gup-font-weight-bold); }
.gup-text-headline-xxs { font-size: var(--gup-headline-xxs-size); line-height: var(--gup-headline-xxs-line); font-weight: var(--gup-font-weight-bold); }

.gup-text-display-md { font-size: var(--gup-display-md-size); line-height: var(--gup-display-md-line); font-weight: var(--gup-font-weight-bold); text-transform: uppercase; }

/* ------------------------------------------------------------
   4c. LAYOUT / CONTENT HELPERS (real design-system classes)
   Production-safe equivalents of the generic layout scaffolding that used to
   live only in demo.css, so consumers no longer depend on .demo-* classes.
   Definitions are 1:1 with the demo classes they replace (identical visuals),
   so the swap is a pure rename:
     .demo-page         → .gup-page           (full-height page shell / background)
     .demo-body         → .gup-page-body      (centred max-width page container)
     .demo-section      → .gup-section        (vertical section stack)
     .demo-section-title→ .gup-section-title  (section heading, no rule)
     .demo-row          → .gup-row            (wrapping flex row)
     .demo-card         → .gup-card           (flex-column cell, min-width 180)
     .demo-card--full   → .gup-card--full     (full-width cell)
     .demo-card-label   → .gup-field-label    (small caption/field label)
     .demo-surface      → .gup-surface        (elevated card) / --flat (C6)
   For a *semantic* titled section with a footer, prefer <GupFormSection>.
   ------------------------------------------------------------ */
.gup-page {
  background: var(--gup-color-background-canvas);
  min-height: 100vh;
  /* font inherits from body (var(--font-base)); kept as a fallback for pages
     that place .gup-page outside the styled <body> context. */
  font-family: var(--font-base, 'Readex Pro', sans-serif);
}

.gup-page-body,
.gup-body {   /* .gup-body is an alias for a direct demo-body → gup-body rename */
  max-width: var(--gup-content-max);
  margin-inline: auto;
  padding: var(--gup-space-12) var(--gup-space-9) var(--spacer-8);  /* 48px 32px 120px */
  display: flex;
  flex-direction: column;
  gap: var(--gup-space-13);   /* 64px */
}

.gup-section {
  display: flex;
  flex-direction: column;
  gap: var(--gup-space-7);   /* 24px */
}

.gup-section-title {
  /* Matches .gup-form-section .title (§15): the same heading role must not render
     two ways depending on which section wrapper the page reached for. */
  font-size: var(--font-size-600);   /* 24px */
  line-height: var(--line-height-500);
  font-weight: var(--gup-font-weight-regular);
  color: var(--gup-color-content-primary);
  /* No underline — the design system does not specify a rule under section
     headings (verified against the Foundations docs). */
}

.gup-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gup-space-5);   /* 16px */
  align-items: flex-start;
}

.gup-card {
  display: flex;
  flex-direction: column;
  gap: var(--gup-space-3);   /* 8px */
  flex: 1;
  min-width: 180px;
}

.gup-card--full {
  flex: 1 1 100%;
  min-width: 0;
}

.gup-field-label {
  font-size: var(--gup-label-xs-size);      /* 12px */
  line-height: var(--gup-label-xs-line);
  font-weight: var(--gup-font-weight-bold);
  color: var(--gup-color-content-tertiary);
  /* Sentence case by default; add .gup-field-label--caps for uppercase. */
}
.gup-field-label--caps { text-transform: uppercase; letter-spacing: 0.08em; }

.gup-surface {
  background: var(--gup-color-background-elevated-container);
  border: 1px solid var(--gup-color-border-low);
  border-radius: var(--gup-radius-card);
  padding: var(--gup-padding-md);
}

/* Flat variant — no card; fields sit directly on the page background (C6). */
.gup-surface--flat {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding-inline: 0;
}

/* ------------------------------------------------------------
   5. COMPONENT: gup-logo
   ------------------------------------------------------------ */
.gup-logo svg {
  fill: var(--gup-logo--color, var(--gup-color-neutral-contrast));
  width: var(--gup-logo--size, 45px);
  height: auto;
}

/* The horizontal lockup is sized by height; a fixed width would distort it. */
.gup-logo--horizontal svg {
  width: auto;
}

/* ------------------------------------------------------------
   6. COMPONENT: gup-icon
   ------------------------------------------------------------ */
.gup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gup-icon--fill-color, currentColor);
}

.gup-icon.material-symbols-outlined {
  line-height: 1;
  vertical-align: middle;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

:dir(rtl) .gup-icon--rtl-flip,
[dir="rtl"] .gup-icon--rtl-flip {
  transform: scaleX(-1);
}

/* ------------------------------------------------------------
   7. COMPONENT: gup-header
   ------------------------------------------------------------ */
.gup-header {
  position: relative;
}

.gup-header .inner {
  background: var(--gup-color-background-navigation-bar)
    linear-gradient(180deg, #eff5ff -66.34%, #f7f5f1 100%);
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--gup-color-border-low);
  padding-inline: var(--gup-gutter);
}

.gup-header .navigation {
  max-width: var(--gup-container-max);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  min-height: 60px;
  width: 100%;
  font-size: 16px;
  color: var(--gup-color-brand-xhigh);
  flex-wrap: wrap;
  align-items: center;
}

.gup-header .logo-wrapper {
  --overhang: 10px;
  display: flex;
  margin-bottom: calc(var(--overhang) * -1);
  width: 72px;
  height: calc(60px + var(--overhang));
  padding: 11px 18px 13px;
  justify-content: center;
  align-items: center;
  border-radius: 0 0 var(--gup-radius-component-default)
    var(--gup-radius-component-default);
  background-color: var(--gup-color-brand-medium);
}

.gup-header .slot-start,
.gup-header .slot-end {
  flex-grow: 1;
  flex-basis: 0;
  min-width: 0;       /* allow slots to shrink below their content width so a
                         longer label on one side can't push the logo off-centre */
  overflow: hidden;
  display: flex;
  align-items: center;
}

.gup-header .slot-end {
  justify-content: flex-end;
}

/* Keep the header help/exit labels on a SINGLE line (no wrap). To stop a long
   one-line label from pushing the centred logo or getting clipped, the labels
   shrink their font-size on narrow screens (see the mobile override below).
   Exclude dialog/modal buttons so a dialog hosted inside a header slot (e.g.
   CancelConfirm) does not have its action buttons squashed or altered. */
.gup-header .slot-start .button:not(.gup-dialog *):not(.gup-dialog-backdrop *),
.gup-header .slot-end .button:not(.gup-dialog *):not(.gup-dialog-backdrop *) {
  white-space: nowrap;
  text-align: start;
}

/* Override button underline inside header (exclude dialogs) */
.gup-header .gup-button--text:not(.gup-dialog *):not(.gup-dialog-backdrop *) .button {
  text-decoration: none;
}

/* Header action labels (upstream helper) */
.header-action-label {
  display: inline;
}

/* Mobile: below 750px, collapse the help action in slot-end to just its icon
   (hiding "Do you need help?" / "هل تحتاج إلى مساعدة؟") and hide any .header-action-label.
   This gives Cancel / Save & exit in slot-start plenty of space without squashing. */
@media (max-width: 749px) {
  .header-action-label,
  .gup-hide-below-mobile {
    display: none !important;
  }

  .gup-header .slot-end .button:not(.gup-dialog *):not(.gup-dialog-backdrop *) .btn-label {
    display: none;
  }

  .gup-header .slot-end .button:not(.gup-dialog *):not(.gup-dialog-backdrop *) {
    font-size: 0 !important;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 8px;
    justify-content: center;
  }

  .gup-header .slot-start .button:not(.gup-dialog *):not(.gup-dialog-backdrop *) {
    font-size: 14px;
    gap: 6px;
    padding-inline: 8px;
    min-height: 44px;
  }

  .gup-header .slot-start .button:not(.gup-dialog *):not(.gup-dialog-backdrop *) .gup-icon {
    font-size: 22px !important;
  }
}

/* ------------------------------------------------------------
   8. COMPONENT: gup-content-header
   ------------------------------------------------------------ */
.gup-content-header .inner-wrapper {
  display: flex;
  width: 100%;
  background: var(--gup-color-states-base-bg-secondary);
  border-bottom: 1px solid var(--gup-color-border-low);
  font-size: var(--font-size-550);
  color: var(--gup-color-content-secondary);
}

.gup-content-header .inner {
  max-width: var(--gup-container-max);
  padding-inline: var(--gup-gutter);
  min-height: 100px;
  margin-inline: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--gup-component-6);
  padding-block: 32px;
}

.gup-content-header .header {
  color: var(--gup-color-content-primary);
}

.gup-content-header .title {
  width: 100%;
  font-size: var(--gup-headline-lg-size);   /* fluid: clamp(24px, 5vw, 32px) */
  font-weight: var(--font-weight-base-beta);
  letter-spacing: -0.64px;
  line-height: 1.1;
  margin-top: var(--gup-component-9);
}

.gup-content-header.has-subtitle .title {
  margin-top: 0;
}

.gup-content-header .subtitle {
  margin-bottom: var(--gup-spacing-between-items);
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-400);
}

.gup-content-header .slot-page-summary {
  margin-top: var(--gup-component-6);
  font-size: var(--font-size-400);
  color: var(--gup-color-content-secondary);
}

/* ------------------------------------------------------------
   8b. COMPONENT: gup-wizard-stack (wizard root)
   Matches the upstream template shell: `display:flex; flex-direction:column;
   height:100%` (service-start.stories.ts). The PAGE scrolls — header and
   content-header travel with it, as they do in Storybook.

   This previously used 100dvh + overflow:hidden to pin the footer, which made
   gup-wizard-main the only scroller. On a 360x800 phone that left the fixed
   chrome owning ~74% of the viewport, and it diverged from upstream, so it was
   reverted. min-height keeps short pages filling the viewport without trapping
   tall ones.
   ------------------------------------------------------------ */
.gup-wizard-stack {
  display: flex;
  flex-direction: column;
  /* min-height (not height) so the page still grows and scrolls normally.
     dvh rather than 100%: percentage needs an ancestor with a definite height,
     and a consumer whose html/body have none would collapse the shell to content
     height, letting the grey --gup-color-background-page show under the footer.
     dvh needs no ancestor and tracks mobile browser chrome. */
  min-height: 100vh;   /* fallback for browsers without dvh */
  min-height: 100dvh;
}

/* ------------------------------------------------------------
   9. COMPONENT: gup-wizard-main
   ------------------------------------------------------------ */
/* Upstream is `display:block; height:100%` with NO overflow — it is not a scroll
   container. flex:1 is kept so the canvas background still fills a short page. */
.gup-wizard-main {
  display: block;
  background-color: var(--gup-color-background-canvas);
  flex: 1;
  padding-inline: var(--gup-gutter);
}

.gup-wizard-main > .inner {
  /* Direct child only: this styles the wizard's own content wrapper. Using a plain
     descendant selector (.gup-wizard-main .inner) leaked width/max-width/margin and a
     64px padding-bottom onto every nested .inner — notably GupFileItem's .inner —
     inflating file rows. The wizard's inner is a direct child (see GupWizardMain.razor),
     so ">" keeps this rule correct while stopping the bleed. */
  /* Gov.om standard (foundations-layout.md): the wizard main column is 632px — a
     measure constraint for line length, not a grid column. Page chrome (header,
     content header, footer) spans 1024px; the content you read and fill in does not. */
  width: 100%;
  /* Upstream's --gup-wizard-main--max-width wins if set; --gup-wizard-main-max is the
     name this package has shipped since v0.0.20 and stays supported so consumer
     overrides keep working. */
  max-width: var(--gup-wizard-main--max-width, var(--gup-wizard-main-max, 632px));
  margin-inline: auto;
  padding-top: var(--gup-component-9);     /* 40px */
  /* Raw 64px in the design-system source, not a token. Reproduce as-is. */
  padding-bottom: 64px;
}

/* ------------------------------------------------------------
   10. COMPONENT: gup-wizard-footer
   ------------------------------------------------------------ */
.gup-wizard-footer {
  display: block;
  position: sticky;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--gup-color-border-low);
  background-color: var(--gup-color-background-wizard-bar);
  padding-inline: var(--gup-gutter);
  padding-block: var(--gup-component-5);
}

.gup-wizard-footer .inner {
  max-width: var(--gup-container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--gup-space-4);   /* keep Back/Continue from touching on narrow screens */
}

.gup-wizard-footer .track {
  display: flex;
  align-items: center;
  flex: 1 0 0;
}

.gup-wizard-footer .slot-start {
  margin-inline-end: auto;
  display: flex;
  gap: var(--gup-spacing-component-default);
}

.gup-wizard-footer .slot-end {
  margin-inline-start: auto;
  display: flex;
  gap: var(--gup-spacing-component-default);
}

/* RTL: mirror the Back/Continue arrow icons so they point along the reading
   flow (same pattern as .gup-pagination__arrow-icon). Without this the
   Continue arrow keeps pointing right in Arabic. */
:dir(rtl) .gup-wizard-footer .gup-button .gup-icon,
[dir="rtl"] .gup-wizard-footer .gup-button .gup-icon {
  transform: scaleX(-1);
}

/* ------------------------------------------------------------
   11. COMPONENT: gup-button
   ------------------------------------------------------------ */
.gup-button {
  display: inline-block;
}

.gup-button .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--gup-component-4);
  border: 1px solid transparent;
  border-radius: var(--gup-radius-button);
  padding-block: 8px;
  padding-inline: var(--gup-component-5);
  line-height: var(--line-height-500);
  text-align: center;
  font-size: var(--font-size-400);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: none;
}

.gup-button .button:focus-visible {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

/* Primary */
.gup-button--primary .button {
  background: var(--primary);
  color: var(--gup-color-neutral-contrast);
  border-color: transparent;
}

.gup-button--primary .button:hover {
  background: linear-gradient(
      0deg,
      var(--gup-color-states-primary-hover) 0%,
      var(--gup-color-states-primary-hover) 100%
    ),
    var(--gup-color-brand-medium);
}

.gup-button--primary .button .gup-icon {
  color: var(--gup-color-brand-contrast);
}

/* Secondary */
.gup-button--secondary .button {
  background: transparent;
  border-color: var(--gup-color-brand-xhigh);
  color: var(--gup-color-brand-xhigh);
}

.gup-button--secondary .button:hover {
  background: var(--gup-color-brand-medium);
  border-color: transparent;
  color: var(--gup-color-brand-contrast);
}

.gup-button--secondary .button .gup-icon {
  color: var(--gup-color-brand-xhigh);
}

.gup-button--secondary .button:hover .gup-icon {
  color: var(--gup-color-brand-contrast);
}

/* Text */
.gup-button--text .button {
  background: transparent;
  color: var(--gup-color-brand-xhigh);
  text-decoration: underline;
  text-underline-offset: 2px;
  border-color: transparent;
}

.gup-button--text .button:hover {
  background: var(--gup-color-states-secondary-hover);
  text-decoration: none;
}

.gup-button--text .button .gup-icon {
  color: var(--gup-color-brand-xhigh);
}

/* Danger */
.gup-button--danger .button {
  background: var(--gup-color-negative-medium);
  color: var(--gup-color-neutral-contrast);
  border-color: transparent;
}

/* Disabled */
.gup-button.is-disabled .button,
.gup-button .button:disabled {
  background: var(--gup-color-states-disabled-low);
  color: var(--gup-color-states-disabled-medium);
  border-color: transparent;
  pointer-events: none;
}

.gup-button.is-disabled .button .gup-icon,
.gup-button .button:disabled .gup-icon {
  color: var(--gup-color-states-disabled-medium);
}

/* Soft-disabled: the disabled *look* without the disabled *behaviour*. The
   button stays clickable (no pointer-events:none, no `disabled` attribute) so
   pressing it can run validation and reveal what's missing. Used by the wizard
   footer's Continue/Submit button via GUPWizardStackStep.SoftLockNext. */
.gup-button--soft-disabled .button {
  background: var(--gup-color-states-disabled-low);
  color: var(--gup-color-states-disabled-medium);
  border-color: transparent;
  cursor: pointer;
}

.gup-button--soft-disabled .button .gup-icon {
  color: var(--gup-color-states-disabled-medium);
}

/* Hover hints it IS pressable — nudge toward the enabled look. */
.gup-button--soft-disabled .button:hover {
  background: var(--gup-color-states-disabled-medium);
  color: var(--gup-color-neutral-contrast);
}

.gup-button--soft-disabled .button:hover .gup-icon {
  color: var(--gup-color-neutral-contrast);
}

/* ------------------------------------------------------------
   12. COMPONENT: gup-button-group
   ------------------------------------------------------------ */
.gup-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gup-component-4);
}

/* Direction modifiers. GupButtonGroup has always emitted these classes and
   documented the four values, but nothing implemented them — every group rendered
   horizontal, and on a narrow screen the buttons wrapped to their own lines at
   natural width instead of filling the row. The inner .button is already
   width:100%, so stretching the host is all that is needed. */
.gup-button-group--vertical {
  flex-direction: column;
  align-items: stretch;
}

/* Stretching the host is not enough on its own: GUPBlazor's inner .button is
   inline-flex with no width (upstream's is width:100%), so it would sit at natural
   width inside a stretched host. Always-vertical groups get it at every width. */
.gup-button-group--vertical > .gup-button > .button {
  width: 100%;
}

/* The common case for a service page: side by side with room, stacked and
   full-width on a phone. Shares the mobile breakpoint used elsewhere. */
@media (max-width: 639px) {
  .gup-button-group--vertical-on-mobile {
    flex-direction: column;
    align-items: stretch;
  }

  /* Same, but the primary action ends up on top when markup order puts it last. */
  .gup-button-group--vertical-reverse-on-mobile {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  /* Only below the breakpoint — above it these groups are a normal row and their
     buttons should hug their labels. */
  .gup-button-group--vertical-on-mobile > .gup-button > .button,
  .gup-button-group--vertical-reverse-on-mobile > .gup-button > .button {
    width: 100%;
  }
}

/* ------------------------------------------------------------
   13. COMPONENT: gup-track
   ------------------------------------------------------------ */
.gup-track {
  display: flex;
}

.gup-track--multiline {
  flex-wrap: wrap;
}

.gup-track--items-equal > * {
  flex: 1 1 0;
}

/* ------------------------------------------------------------
   14. COMPONENT: gup-form-list
   ------------------------------------------------------------ */
.gup-form-list {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-form-fields);
}

/* ------------------------------------------------------------
   15. COMPONENT: gup-form-section
   Mirrors design-system/components/form-section/form-section.css.
   ------------------------------------------------------------ */
.gup-form-section {
  display: block;
  margin-block: var(--gup-spacing-between-sections);
}

.gup-form-section .title {
  color: var(--gup-color-content-primary);
  font-size: var(--font-size-600);
  line-height: var(--line-height-500);
  margin-top: 0;
  margin-bottom: var(--gup-spacing-text-to-component);
}

.gup-form-section .content {
  display: block;
}

.gup-form-section .footer {
  display: block;
}

.gup-form-section--has-footer .footer {
  margin-top: var(--gup-spacing-content-to-cta);
}

/* ------------------------------------------------------------
   16. COMPONENT: gup-input-field
   ------------------------------------------------------------ */
.gup-input-field {
  display: block;
}

.gup-input-field .label {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  display: block;
  margin-bottom: var(--gup-spacing-component-default);
}

.gup-input-field .label.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gup-input-field .validation-message {
  color: var(--gup-color-negative-medium, #b91c1c);
  font-size: var(--font-size-300);
  margin-bottom: var(--gup-spacing-component-default);
  display: flex;
  gap: var(--gup-component-3);
  align-items: center;
}

.gup-input-field .field-wrapper {
  border-radius: var(--gup-radius-component-default);
  border: 1px solid transparent;
}

.gup-input-field .field-inner-wrapper {
  border-radius: inherit;
  display: flex;
  line-height: 1;
  overflow: hidden;
  border: 1px solid var(--gup-color-states-base-border);
}

.gup-input-field .input-wrapper {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  width: 100%;
  background-color: var(--gup-color-states-base-bg);
}

.gup-input-field .input {
  appearance: none;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  flex-grow: 1;
  min-width: 0;
  padding-inline: var(--gup-component-4);
  padding-block: var(--gup-component-3);
  color: var(--gup-color-content-primary);
  line-height: 1.4;
  font-size: var(--font-size-400);
  font-family: inherit;
  width: 100%;
  text-align: start;
  text-align: -webkit-match-parent;
  text-align: match-parent;
}

.gup-input-field .input::placeholder {
  color: var(--gup-color-content-secondary);
}

.gup-input-field .input::-webkit-calendar-picker-indicator {
  display: none;
}

.gup-input-field .input:focus {
  outline: none;
}

.gup-input-field .field-wrapper:focus-within {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

/* Prefix / Suffix slots (non-interactive labels with secondary background) */
.gup-input-field .prefix,
.gup-input-field .suffix {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding-inline: var(--gup-component-4);
  padding-block: var(--gup-component-3);
  background-color: var(--gup-color-states-base-bg-secondary, var(--gup-color-states-base-bg));
  color: var(--gup-color-content-secondary);
  cursor: default;
  font-size: var(--font-size-300);
}

/* Input-start / Input-end slots (icons or interactive content inside the field) */
.gup-input-field .input-start,
.gup-input-field .input-end {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--gup-color-content-secondary);
}

.gup-input-field .input-start {
  padding-inline-start: var(--gup-component-4);
  padding-inline-end: var(--gup-component-3);
}

.gup-input-field .input-end {
  padding-inline-start: var(--gup-component-3);
  padding-inline-end: var(--gup-component-4);
}

.gup-input-field .input-affix-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
}

.gup-input-field .input-affix-btn:disabled {
  cursor: not-allowed;
  color: var(--gup-color-states-disabled-medium);
}

.gup-input-field .input-affix-btn:focus-visible {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
  border-radius: var(--gup-radius-component-default);
}
/* Input-start affix button (date/time picker icon) stays locked to the 24x24 icon size
   to align with static text/tel/email icons. Hit area expands via ::after under pointer: coarse. */
.gup-input-field .input-start .input-affix-btn {
  min-width: 24px;
  min-height: 24px;
  width: 24px;
  height: 24px;
  position: relative;
}

@media (pointer: coarse) {
  .gup-input-field .input-start .input-affix-btn {
    min-width: 24px;
    min-height: 24px;
  }

  .gup-input-field .input-start .input-affix-btn::after {
    content: "";
    position: absolute;
    inset: -10px;
  }
}

/* Hint text */
.gup-input-field .hint {
  margin-top: var(--gup-spacing-component-default);
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
  line-height: var(--line-height-500);
}

/* Field footer: lays out the hint (start) and the live character counter (end)
   on one row beneath the input/textarea. The footer owns the top spacing, so the
   nested hint drops its own margin-top to avoid double spacing. Used by both
   gup-input-field and gup-textarea-field. */
.gup-input-field .field-footer,
.gup-textarea-field .field-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gup-component-4);
  margin-top: var(--gup-spacing-component-default);
}

.gup-input-field .field-footer .hint,
.gup-textarea-field .field-footer .hint {
  margin-top: 0;
}

/* Live character counter ("42 / 100"). Sits at the end of the field footer;
   when there is no hint it still stays end-aligned. Pinned LTR — the digits
   and slash are directionless, so an RTL page would flip it to "100 / 42". */
.gup-char-counter {
  direction: ltr;
  unicode-bidi: isolate;
  margin-inline-start: auto;
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
  line-height: var(--line-height-500);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Below the minimum, or at the maximum — signal it in the negative colour. */
.gup-char-counter--invalid {
  color: var(--gup-color-negative-medium);
}

/* Hover state */
.gup-input-field:hover:not(.disabled):not(.invalid) .field-inner-wrapper {
  box-shadow: 0 0 0 1px var(--gup-color-states-base-border) inset;
}

/* Invalid state */
.gup-input-field.invalid .field-inner-wrapper {
  border-color: var(--gup-color-negative-medium, #b91c1c);
  box-shadow: 0 0 0 1px var(--gup-color-negative-medium, #b91c1c) inset;
}

.gup-input-field.invalid .label {
  color: var(--gup-color-negative-medium, #b91c1c);
}

/* ---- Shared field affordances (added) ------------------------------------ */

/* Chrome/Safari paint autofilled inputs blue and ignore background-color on them;
   the inset shadow is the only way to restore the field background. */
.gup-input-field input:-webkit-autofill,
.gup-input-field input:-webkit-autofill:hover,
.gup-input-field input:-webkit-autofill:focus,
.gup-input-field input:-webkit-autofill:active,
.gup-textarea-field textarea:-webkit-autofill,
.gup-textarea-field textarea:-webkit-autofill:hover,
.gup-textarea-field textarea:-webkit-autofill:focus {
  box-shadow: 0 0 0 100px var(--gup-color-states-base-bg, #ffffff) inset;
  -webkit-text-fill-color: var(--gup-color-content-primary);
  caret-color: var(--gup-color-content-primary);
}

/* "(optional)" label suffix — muted, slightly smaller, never bolder than the label. */
.gup-optional-hint {
  color: var(--gup-color-content-secondary, #5b5b5b);
  font-weight: 400;
  font-size: 0.9em;
}

/* Invalid state for input/textarea/dropdown is already the design-system's own
   red border + red label (see .gup-input-field.invalid / .gup-textarea-field.invalid
   / .gup-dropdown-field--invalid). Nothing extra is layered on top of those.

   Radio/checkbox GROUPS have no bordered input box, and many pages give them an
   EXTERNAL label (Label="" on the component + a separate <p>), so styling only the
   internal .group-label leaves no visible signal. Put the standard red border on the
   options container instead — a real, visible design-system-style red edge that
   works whether the label is internal or external. Also redden the internal label
   when present. */
.gup-radio-button-group.is-invalid .group-label,
.gup-checkbox-group.is-invalid .group-label {
  color: var(--gup-color-negative-medium, #b91c1c);
}

.gup-radio-button-group.is-invalid .options,
.gup-checkbox-group.is-invalid .options {
  border: 1px solid var(--gup-color-negative-medium, #b91c1c);
  border-radius: 8px;
  padding: 8px 12px;
}

/* Redden the group's own label when it's rendered inside the component. */
.gup-radio-button-group.is-invalid .group-label,
.gup-checkbox-group.is-invalid .group-label {
  color: var(--gup-color-negative-medium, #b91c1c);
}

/* Disabled state */
.gup-input-field.disabled .label {
  color: var(--gup-color-content-tertiary);
}

.gup-input-field.disabled .field-inner-wrapper {
  border-color: transparent;
}

.gup-input-field.disabled .input-wrapper,
.gup-input-field.disabled .prefix,
.gup-input-field.disabled .suffix {
  background-color: var(--gup-color-states-disabled-low);
}

.gup-input-field.disabled .input {
  color: var(--gup-color-states-disabled-medium);
  cursor: not-allowed;
}

.gup-input-field.disabled .input-start,
.gup-input-field.disabled .input-end,
.gup-input-field.disabled .prefix,
.gup-input-field.disabled .suffix {
  color: var(--gup-color-states-disabled-medium);
}

/* RTL support: digits, addresses, dates never mirror, so these inputs stay LTR
   (upstream forces tel/email; the rest complete the family). The wrapper keeps
   the page direction, so the start icon (phone, mail, calendar) lands on the
   right in an RTL form. */
.gup-input-field[data-type="tel"] .input,
.gup-input-field[data-type="email"] .input,
.gup-input-field[data-type="date"] .input,
.gup-input-field[data-type="time"] .input,
.gup-input-field[data-type="numeric"] .input,
.gup-input-field[data-type="url"] .input,
.gup-input-field[data-type="password"] .input {
  direction: ltr;
}

/* An LTR input inside an RTL form keeps its value on the RIGHT edge so the
   field still reads as part of the form. Direction is inherited from the
   ancestor (via [dir="rtl"], :dir(rtl), or CSS direction: rtl). */
[dir="rtl"] .gup-input-field[data-type="tel"] .input,
[dir="rtl"] .gup-input-field[data-type="email"] .input,
[dir="rtl"] .gup-input-field[data-type="date"] .input,
[dir="rtl"] .gup-input-field[data-type="time"] .input,
[dir="rtl"] .gup-input-field[data-type="numeric"] .input,
[dir="rtl"] .gup-input-field[data-type="url"] .input,
[dir="rtl"] .gup-input-field[data-type="password"] .input,
.gup-input-field[data-type="tel"] .input:dir(rtl),
.gup-input-field[data-type="email"] .input:dir(rtl),
.gup-input-field[data-type="date"] .input:dir(rtl),
.gup-input-field[data-type="time"] .input:dir(rtl),
.gup-input-field[data-type="numeric"] .input:dir(rtl),
.gup-input-field[data-type="url"] .input:dir(rtl),
.gup-input-field[data-type="password"] .input:dir(rtl),
[dir="rtl"] .gup-input-field .input,
.gup-input-field:dir(rtl) .input {
  text-align: right;
}

/* ------------------------------------------------------------
   17. COMPONENT: gup-stepper
   ------------------------------------------------------------ */
.gup-stepper {
  display: block;
  overflow: hidden;
}

.gup-stepper .list {
  display: block;
}

/* ------------------------------------------------------------
   18. COMPONENT: gup-stepper-item
   ------------------------------------------------------------ */
.gup-stepper-item {
  position: relative;
  display: block;
}

.gup-stepper-item .track {
  display: flex;
  gap: var(--gup-component-6);
  margin-top: 0; /* static-mode: no top margin */
}

.gup-stepper-item .step-number {
  position: relative;
  top: var(--gup-component-4);
  flex-shrink: 0;
}

.gup-stepper-item .step-number::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  height: 100%;
  top: 32px; /* step-size */
  border-inline-start: 1px solid var(--gup-color-border-medium);
}

.gup-stepper-item:last-child .step-number::before {
  display: none;
}

.gup-stepper-item .step-number-inner {
  width: 32px; /* --step-size */
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: var(--font-weight-base-beta);
  color: var(--gup-color-content-primary);
  border-radius: var(--gup-radius-component-full);
  border: 1px solid var(--gup-color-border-medium);
}

/* Step type: selected */
.gup-stepper-item--selected .step-number-inner {
  color: var(--gup-color-content-inverted-primary);
  border-color: var(--gup-color-brand-high);
  background-color: var(--gup-color-brand-high);
}

/* Step type: done */
.gup-stepper-item--done .step-number-inner {
  color: var(--gup-color-positive-high);
  border-color: var(--gup-color-positive-high);
  background: var(--gup-color-positive-xlow);
}

.gup-stepper-item--done .step-number-inner .gup-icon {
  color: var(--gup-color-positive-high);
}

.gup-stepper-item .label {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--gup-color-content-tertiary);
}

.gup-stepper-item--selected .label {
  color: var(--gup-color-content-primary);
}

.gup-stepper-item .static-content {
  padding-block: var(--gup-component-4);
}

/* ------------------------------------------------------------
   19. COMPONENT: gup-details (disclosure)
   ------------------------------------------------------------ */
.gup-details {
  --gup-icon--fill-color: var(--gup-color-content-link);
  display: block;
  width: 100%;
  position: relative;
}

.gup-details--appearance-quote {
  max-width: 328px;
}

.gup-details .inner summary.label {
  cursor: pointer;
  color: var(--gup-color-content-link);
  display: flex;
  align-items: center;
  gap: var(--gup-component-3);
  list-style: none;
}

.gup-details .inner summary.label::-webkit-details-marker {
  display: none;
}

.gup-details .inner summary.label::marker {
  display: none;
}

.gup-details .inner summary.label .gup-icon {
  color: var(--gup-color-content-link);
}

.gup-details .label-inner {
  text-decoration: underline;
  line-height: var(--line-height-500);
}

.gup-details .label-inner:hover {
  text-decoration-thickness: 2px;
}

.gup-details .content {
  margin-block-start: var(--gup-spacing-component-default);
}

/* content-appearance: quote */
.gup-details--appearance-quote .content {
  padding-block: var(--gup-padding-sm);
  padding-inline-start: var(--gup-padding-lg);
  border-inline-start: 6px solid var(--gup-color-brand-high);
  color: var(--gup-color-content-primary);
}

/* content-appearance: sink */
.gup-details--appearance-sink .content,
.gup-details.sink .content {
  background-color: var(--gup-color-states-base-bg-secondary);
  padding: var(--gup-padding-md);
  width: 100%;
  border-bottom: 1px solid var(--gup-color-border-medium);
  margin-bottom: var(--gup-spacing-between-text);
}

.gup-details--appearance-sink .content-inner,
.gup-details.sink .content-inner {
  position: relative;
  padding-inline-end: 24px;
  --gup-stepper-item--label--color: var(--gup-color-content-tertiary);
  --gup-stepper-item--selected--label--color: var(--gup-color-content-primary);
}

.gup-details--appearance-sink .close-button,
.gup-details.sink .close-button {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--gup-color-content-link);
}

.gup-details--appearance-sink .close-button .gup-icon,
.gup-details.sink .close-button .gup-icon {
  color: var(--gup-color-content-link);
}

/* ------------------------------------------------------------
   20. COMPONENT: gup-radio-button-group
   ------------------------------------------------------------ */
.gup-radio-button-group {
  display: block;
}

.gup-radio-button-group .group-label {
  display: block;
  padding-bottom: var(--gup-component-5);
  font-weight: var(--font-weight-base-beta);
  color: var(--gup-color-content-primary);
}

.gup-radio-button-group .group-error {
  color: var(--gup-color-negative-medium, #b91c1c);
  font-size: var(--font-size-300);
  margin-bottom: var(--gup-spacing-component-default);
  display: flex;
  gap: var(--gup-component-3);
  align-items: center;
}

.gup-radio-button-group .options {
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------
   21. COMPONENT: gup-radio-button
   ------------------------------------------------------------ */
.gup-radio-button {
  display: block;
}

.gup-radio-button .wrapper {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: var(--gup-component-4);
  padding: var(--gup-component-3) 0;
}

/* Hide native input, show custom */
.gup-radio-button input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gup-radio-button .box {
  flex-shrink: 0;
  background-color: var(--gup-color-states-base-bg);
  border: 1px solid var(--gup-color-states-base-border);
  width: var(--gup-icon-xl); /* 32px - size "m" */
  height: var(--gup-icon-xl);
  border-radius: var(--gup-radius-component-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gup-radio-button .box-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gup-radius-component-full);
}

.gup-radio-button .box-pupil {
  width: var(--gup-icon-sm); /* 20px */
  height: var(--gup-icon-sm);
  border-radius: var(--gup-radius-component-full);
  background-color: var(--gup-color-brand-high);
  visibility: hidden;
}

.gup-radio-button input[type="radio"]:checked ~ .box .box-inner .box-pupil {
  visibility: visible;
}

.gup-radio-button .labels {
  display: flex;
  flex-direction: column;
  gap: var(--gup-component-1);
}

.gup-radio-button .radio-label {
  min-height: var(--gup-icon-xl);
  display: flex;
  align-items: center;
  color: var(--gup-color-content-primary);
}

.gup-radio-button .radio-hint {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
  line-height: var(--line-height-400);
}

.gup-radio-button .wrapper:focus-within .box {
  box-shadow: 0 0 0 2px var(--gup-color-neutral-contrast),
    0 0 0 6px var(--gup-color-states-base-focus-ring);
}

/* ------------------------------------------------------------
   22. COMPONENT: gup-banner
   ------------------------------------------------------------ */
.gup-banner {
  --_border-color: var(--gup-color-neutral-low);
  --_icon-color: var(--gup-color-neutral-medium);
  --_bg-color: transparent;

  display: block;
  max-width: 600px;
  padding: var(--gup-padding-md);
  border-radius: var(--gup-radius-card);
  border: 1px solid var(--_border-color);
  background-color: var(--_bg-color);
  color: var(--gup-color-content-primary);
  line-height: var(--line-height-500);
}

/* Type variants — token values mirror design-system/classes/banner/banner.css;
   the selectors target this component's class names, not the BEM ones. */
.gup-banner--success {
  --_border-color: var(--gup-color-positive-low);
  --_icon-color: var(--gup-color-positive-medium);
  --_bg-color: var(--gup-color-positive-xlow);
}

.gup-banner--warning {
  --_border-color: var(--gup-color-warning-low);
  --_icon-color: var(--gup-color-warning-contrast);
  --_bg-color: var(--gup-color-warning-xlow);
}

.gup-banner--error {
  --_border-color: var(--gup-color-negative-low);
  --_icon-color: var(--gup-color-negative-medium);
  --_bg-color: var(--gup-color-negative-xlow);
}

.gup-banner .banner-icon .gup-icon {
  color: var(--_icon-color);
}

.gup-banner .inner {
  position: relative;
}

/* hide-icon = flex column */
.gup-banner.hide-icon .track {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-text);
}

/* with icon = grid */
.gup-banner:not(.hide-icon) .track {
  display: grid;
  grid-template-areas: 'icon title' '. body';
  grid-template-columns: 0fr auto;
  gap: var(--gup-spacing-between-text);
}

.gup-banner .banner-icon { grid-area: icon; }
.gup-banner .banner-title {
  grid-area: title;
  font-weight: var(--font-weight-base-beta);
  padding-inline-end: 24px;
}
.gup-banner .banner-content { grid-area: body; }

.gup-banner .close-button {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gup-banner .close-button .gup-icon {
  color: var(--gup-color-brand-xhigh);
}

/* ------------------------------------------------------------
   22a. UTILITY: form-error-summary (wizard validation summary)
   ------------------------------------------------------------ */
.form-error-summary {
  margin-bottom: 24px;
}

.form-error-summary__intro {
  margin: 0 0 12px;
}

.form-error-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--gup-color-content-primary);
}

.form-error-summary li + li {
  margin-block-start: 4px;
}

.form-error-summary__link {
  display: inline;
  text-align: start;
  font: inherit;
  font-weight: 700;
  color: var(--gup-color-negative-high, #ba1c1c);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.form-error-summary__link:hover,
.form-error-summary__link:focus-visible {
  text-decoration: none;
}

/* ------------------------------------------------------------
   22b. COMPONENT: gup-toast / gup-toast-container
   ------------------------------------------------------------ */
.gup-toast {
  --gup-toast-icon-bg: var(--gup-color-neutral-medium);
  --gup-toast-border: var(--gup-color-neutral-low);
  --gup-toast-bg: var(--gup-color-neutral-contrast);

  display: block;
  padding: var(--gup-padding-md);
  border: 1px solid var(--gup-toast-border);
  border-radius: var(--gup-radius-card);
  background-color: var(--gup-toast-bg);
  box-shadow: var(--gup-shadow-200);
}

.gup-toast .inner {
  display: flex;
  gap: var(--gup-spacing-text-to-component);
}

.gup-toast .content {
  flex-grow: 1;
}

.gup-toast .icon-wrapper,
.gup-toast .close-button {
  align-self: flex-start;
}

.gup-toast .icon-wrapper {
  background-color: var(--gup-toast-icon-bg);
  border-radius: 51%;
  width: 28px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.gup-toast .icon-wrapper .gup-icon {
  color: var(--gup-color-neutral-contrast);
}

.gup-toast .close-button {
  background: none;
  border: 0;
  /* The 22px glyph alone left a sub-24px target, failing WCAG 2.2 2.5.8. */
  padding: 0;
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
}

.gup-toast .close-button .gup-icon {
  color: var(--gup-color-brand-xhigh);
}

.gup-toast--positive {
  --gup-toast-icon-bg: var(--gup-color-positive-medium);
  --gup-toast-border: var(--gup-color-positive-low);
  --gup-toast-bg: var(--gup-color-positive-xlow);
}

.gup-toast--negative {
  --gup-toast-icon-bg: var(--gup-color-negative-medium);
  --gup-toast-border: var(--gup-color-negative-low);
  --gup-toast-bg: var(--gup-color-negative-xlow);
}

.gup-toast--warning {
  --gup-toast-icon-bg: var(--gup-color-warning-medium);
  --gup-toast-border: var(--gup-color-warning-low);
  --gup-toast-bg: var(--gup-color-warning-xlow);
}

.gup-toast-container {
  position: fixed;
  bottom: 0;
  inset-inline-end: 0;
  padding: 20px;
  /* Clear the iOS home indicator, which otherwise overlaps the close button. */
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: 600px;
  width: 100%;
  z-index: var(--gup-toast-container--z-index, 1000);
  pointer-events: none;
}

.gup-toast-container .gup-toast {
  pointer-events: auto;
}

/* ------------------------------------------------------------
   23. COMPONENT: gup-rich-text
   ------------------------------------------------------------ */
.gup-rich-text {
  display: block;
}

.gup-rich-text p {
  margin: 0;
  line-height: var(--line-height-500);
}

.gup-rich-text p + p {
  margin-top: 0.75em;
}

.gup-rich-text ol,
.gup-rich-text ul {
  padding-inline-start: 1.5em;
  list-style: revert;
  margin: 0.5em 0;
}

.gup-rich-text li {
  margin-block: 0.25em;
}

/* ------------------------------------------------------------
   24. COMPONENT: gup-link
   ------------------------------------------------------------ */
.gup-link a {
  color: var(--gup-color-content-link);
  border-bottom: 1px solid currentColor;
  padding-block: 2px;
  line-height: var(--line-height-500);
}

.gup-link a:hover {
  color: var(--color-blue-600);
  background-color: var(--color-grey-100);
}

/* ------------------------------------------------------------
   25. COMPONENT: gup-table
   ------------------------------------------------------------ */
.gup-table {
  display: block;
  width: 100%;
  /* Let wide tables scroll horizontally on small screens instead of
     overflowing the viewport (Foundations §5 responsive behavior). */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gup-table table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  display: table;
  /* Let cells wrap so the table fits its container; the parent's overflow-x
     is only a last-resort safety net for genuinely narrow (mobile) screens. */
}

/* ------------------------------------------------------------
   26. COMPONENT: gup-table-row
   ------------------------------------------------------------ */
.gup-table-row {
  display: table-row;
}

/* ------------------------------------------------------------
   27. COMPONENT: gup-table-cell
   ------------------------------------------------------------ */
.gup-table-cell {
  display: table-cell;
  height: 100%;
  border-bottom: 1px solid var(--gup-color-border-low);
}

.gup-table-cell .wrapper {
  padding-block: var(--gup-component-3);
  padding-inline-end: var(--gup-component-7);
  min-width: 60px;
  color: var(--gup-color-content-primary);
  text-align: start;
  text-wrap: wrap;
  /* The design system wraps at spaces only, so an unbreakable string (long ref
     number, URL, compound word) widens its column and pushes the table past the
     632px wizard column. components-table-table-cell.md records this as a gap,
     not a rule — "implementing them is not a deviation" — so we break them. */
  overflow-wrap: break-word;
}

.gup-table-cell--header .wrapper,
.gup-table-cell--rowheader .wrapper {
  font-weight: var(--font-weight-base-beta);
}

/* Inline per-cell field label — only visible in responsive stacked mode.
   display:none also hides it from screen readers here, which is what we want:
   on desktop the <th scope="col"> headers supply the field name. In stacked mode
   that header row is hidden, so this label becomes the only field name and must
   stay announceable — hence no aria-hidden on the span. */
.gup-table-cell__label {
  display: none;
}

/* --- Responsive table: stacked cards below the mobile breakpoint ---
   Opt-in via <GupTable Responsive="true"> + <GupTableCell Label="…">.
   Each row becomes a bordered card; each cell stacks with its Label shown
   above the value. Above the breakpoint it renders as a normal table. */
@media (max-width: 639px) {
  .gup-table--responsive,
  .gup-table--responsive table,
  .gup-table--responsive tbody {
    display: block;
    width: 100%;
  }

  /* Hide the column-header row — per-cell labels replace it. */
  .gup-table--responsive .gup-table-row:first-child {
    display: none;
  }

  .gup-table--responsive .gup-table-row {
    display: block;
    border: 1px solid var(--gup-color-border-low);
    border-radius: var(--gup-radius-component-default);
    padding: var(--gup-component-3) var(--gup-component-4);
    margin-bottom: var(--gup-component-4);
  }

  .gup-table--responsive .gup-table-cell {
    display: block;
    border-bottom: none;
  }

  .gup-table--responsive .gup-table-cell .wrapper {
    padding-block: var(--gup-component-2);
    padding-inline-end: 0;
    min-width: 0;
  }

  /* Show the inline field label above each value. */
  .gup-table--responsive .gup-table-cell__label {
    display: block;
    font-weight: var(--font-weight-base-beta);
    font-size: var(--gup-body-xs-size);
    color: var(--gup-color-content-secondary);
    margin-bottom: 2px;
  }

  /* Hide cells that carry no label and no content (e.g. a bare row-number). */
  .gup-table--responsive .gup-table-cell:empty {
    display: none;
  }
}

/* ────────────────────────────────────────────────────────────
   CHECKBOX  (.gup-checkbox)
   Converted from @govom/components checkbox class-based CSS
   ──────────────────────────────────────────────────────────── */

.gup-checkbox {
  --_border-color: var(--gup-color-states-base-border);
  --_second-border-color: transparent;
  --_size: 32px;
  --_icon-color: var(--gup-color-neutral-contrast);

  display: flex;
  position: relative;
  gap: var(--gup-spacing-component-default);
  padding: var(--gup-component-3) 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  color: var(--gup-color-content-primary);
}

.gup-checkbox__input {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: none;
  white-space: nowrap;
}

.gup-checkbox__check-mark {
  flex-shrink: 0;
  border: 1px solid var(--_border-color);
  background-color: var(--_border-color);
  border-radius: var(--gup-checkbox--check-mark--border-radius, var(--gup-radius-component-default));
  color: var(--gup-color-content-primary);
  width: var(--_size);
  height: var(--_size);
}

.gup-checkbox__check-mark-inner {
  background-color: var(--gup-color-states-base-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--_second-border-color);
  border-radius: inherit;
  height: 100%;
}

.gup-checkbox__check-mark-inner::after {
  content: "";
  display: none;
  width: 20px;
  height: 20px;
  background-color: var(--_icon-color);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.gup-checkbox__text-container {
  display: flex;
  flex-direction: column;
  gap: var(--gup-component-2);
  text-wrap: balance;
  line-height: var(--line-height-500);
  padding-top: 3px;
}

.gup-checkbox__hint {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
}

/* ── Hover ── */
.gup-checkbox:hover:has(.gup-checkbox__input:not(:disabled):not(:checked):not(:indeterminate)) {
  --_second-border-color: var(--gup-color-states-base-border);
}

/* ── Checked ── */
.gup-checkbox:has(.gup-checkbox__input:checked) {
  --_border-color: transparent;
}

.gup-checkbox__input:checked + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner {
  background-color: var(--gup-color-brand-high);
}

.gup-checkbox__input:checked + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner::after {
  display: block;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

/* ── Indeterminate ── */
.gup-checkbox:has(.gup-checkbox__input:indeterminate) {
  --_border-color: transparent;
}

.gup-checkbox__input:indeterminate + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner {
  background-color: var(--gup-color-brand-high);
}

.gup-checkbox__input:indeterminate + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner::after {
  display: block;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 13H5v-2h14v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 13H5v-2h14v2z'/%3E%3C/svg%3E");
}

/* ── Disabled ── */
.gup-checkbox:has(.gup-checkbox__input:disabled) {
  --_border-color: transparent;
  pointer-events: none;
}

.gup-checkbox__input:disabled + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner {
  background-color: var(--gup-color-states-disabled-low);
}

.gup-checkbox__input:disabled + .gup-checkbox__check-mark .gup-checkbox__check-mark-inner::after {
  --_icon-color: var(--gup-color-states-disabled-medium);
}

/* ── Small ── */
.gup-checkbox--small {
  --_size: 24px;
  font-size: var(--font-size-300);
}

.gup-checkbox--small .gup-checkbox__check-mark {
  border-radius: var(--gup-radius-component-small);
}

.gup-checkbox--small .gup-checkbox__check-mark-inner::after {
  width: 16px;
  height: 16px;
}

/* ── Circle ── */
.gup-checkbox--circle .gup-checkbox__check-mark {
  border-radius: var(--gup-radius-component-full);
}

.gup-checkbox--small.gup-checkbox--circle .gup-checkbox__check-mark {
  border-radius: var(--gup-radius-component-full);
}

/* ── Focus ── */
.gup-checkbox__input:focus {
  outline: none;
}

.gup-checkbox__input:not(:disabled):focus-visible + .gup-checkbox__check-mark {
  outline: 4px solid var(--gup-color-states-base-focus-ring);
  outline-offset: 3px;
}

/* ── Error message ── */
.gup-checkbox__error {
  display: block;
  color: var(--gup-color-negative-medium);
  font-size: var(--font-size-300);
  padding-bottom: var(--gup-spacing-component-default);
}

.gup-checkbox__input[aria-invalid="true"] + .gup-checkbox__check-mark {
  border-color: var(--gup-color-negative-medium);
}

/* ------------------------------------------------------------
   COMPONENT: gup-dropdown-field
   ------------------------------------------------------------ */
.gup-dropdown-field {
  display: block;
  position: relative;
}

.gup-dropdown-field .label {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  display: block;
  margin-bottom: var(--gup-spacing-component-default);
}

/* LabelHidden — keep the label for assistive tech only, matching
   .gup-input-field .label.sr-only above. */
.gup-dropdown-field .label.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gup-dropdown-field .hint {
  display: block;
  font-size: var(--font-size-300);
  color: var(--gup-color-content-secondary);
  margin-top: var(--gup-spacing-component-default);
}

.gup-dropdown-field .field-wrapper {
  border-radius: var(--gup-radius-component-default);
  border: 1px solid transparent;
  cursor: pointer;
}

.gup-dropdown-field .field-inner-wrapper {
  border-radius: inherit;
  display: flex;
  line-height: 1;
  overflow: hidden;
  border: 1px solid var(--gup-color-states-base-border);
}

.gup-dropdown-field .input-wrapper {
  display: flex;
  width: 100%;
  align-items: center;
  background-color: var(--gup-color-states-base-bg);
}

.gup-dropdown-field .input {
  appearance: none;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  flex-grow: 1;
  padding-inline: var(--gup-component-4);
  padding-block: var(--gup-component-3);
  color: var(--gup-color-content-primary);
  line-height: 1.4;
  font-size: var(--font-size-400);
  font-family: inherit;
  width: 100%;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.gup-dropdown-field .input::placeholder {
  color: var(--gup-color-content-secondary);
}

.gup-dropdown-field .input:focus {
  outline: none;
}

.gup-dropdown-field .field-wrapper:focus-within {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-dropdown-field .arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transform-origin: center center;
  --gup-icon--fill-color: var(--gup-color-content-secondary);
  transition: transform 0.2s ease;
}

.gup-dropdown-field--open .arrow-icon {
  transform: rotate(180deg);
}

.gup-dropdown-field--disabled .field-wrapper {
  cursor: not-allowed;
}

.gup-dropdown-field--disabled .input {
  cursor: not-allowed;
  color: var(--gup-color-content-tertiary);
}

.gup-dropdown-field--disabled .field-inner-wrapper {
  background-color: var(--gup-color-input-bg-default);
}

.gup-dropdown-field .error-message {
  color: var(--gup-color-negative-medium);
  font-size: var(--font-size-300);
  margin-bottom: var(--gup-spacing-component-default);
  display: flex;
  gap: var(--gup-component-3);
  align-items: center;
}

.gup-dropdown-field--invalid .label {
  color: var(--gup-color-negative-medium);
}

.gup-dropdown-field--invalid .field-inner-wrapper {
  border-color: var(--gup-color-negative-medium);
}

/* ── Dropdown spinner (loading state) ── */
.gup-dropdown-spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 2px;
  padding-inline-end: var(--gup-component-4);
}

.gup-dropdown-spinner {
  animation: gup-dropdown-spin 1s infinite linear;
}

.gup-dropdown-spinner-circle {
  fill: var(--gup-color-brand-accent-low);
}

.gup-dropdown-spinner-indicator {
  fill: var(--gup-color-brand-high);
}

@keyframes gup-dropdown-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Dropdown menu ── */
.gup-dropdown-menu {
  display: none;
  position: absolute;
  width: 100%;
  z-index: 100;
  margin-top: 4px;
}

.gup-dropdown-field--open .gup-dropdown-menu {
  display: block;
}

.gup-dropdown-menu .inner {
  display: flex;
  width: 100%;
  max-height: var(--gup-dropdown-menu--max-height, 280px);
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  border-radius: var(--gup-radius-component-default);
  padding: 4px;
  background: var(--gup-color-states-base-bg);
  box-shadow: var(--gup-shadow-200);
}

.gup-dropdown-menu .search-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--gup-component-4);
  border-bottom: 1px solid var(--gup-color-border-low);
  padding: var(--gup-component-4);
}

.gup-dropdown-menu .search-container .gup-icon {
  --gup-icon--fill-color: var(--gup-color-content-secondary);
}

.gup-dropdown-menu .search {
  border: none;
  outline: none;
  background-color: transparent;
  width: 100%;
  font-family: inherit;
  font-size: var(--font-size-400);
  color: var(--gup-color-content-primary);
}

.gup-dropdown-menu .search::placeholder {
  color: var(--gup-color-content-secondary);
}

.gup-dropdown-menu .search:focus {
  border: none;
  outline: none;
}

.gup-dropdown-menu .dropdown-items {
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

.gup-dropdown-menu .no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-inline: 48px;
  margin-block: 18px;
  text-align: center;
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
}

.gup-dropdown-menu .controls {
  width: 100%;
  padding: var(--gup-component-3) var(--gup-component-4);
  border-top: 1px solid var(--gup-color-border-low);
  display: flex;
  justify-content: flex-end;
  gap: var(--gup-component-3);
}

/* ── Dropdown menu item ── */
.gup-dropdown-menu-item {
  display: block;
  width: 100%;
  padding: var(--gup-component-4);
}

.gup-dropdown-menu-item--hidden {
  display: none;
}

.gup-dropdown-menu-item--highlighted {
  background-color: var(--gup-color-input-bg-secondary);
}

.gup-dropdown-menu-item .button {
  width: 100%;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: var(--font-size-400);
  color: var(--gup-color-text-strong, var(--gup-color-content-primary));
  text-align: start;
}

.gup-dropdown-menu-item .button:hover {
  background-color: var(--gup-color-input-bg-secondary);
  border-radius: var(--gup-radius-component-small);
}

.gup-dropdown-menu-item--selected .button {
  font-weight: var(--font-weight-base-beta);
}

.gup-dropdown-menu-item .item-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--gup-component-4);
}

.gup-dropdown-menu-item .item-content {
  flex-grow: 1;
  overflow-wrap: anywhere;
}

.gup-dropdown-menu-item .check-icon-wrapper {
  height: 20px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  --gup-icon--fill-color: var(--gup-color-brand-medium);
}

.gup-dropdown-menu-item--disabled {
  cursor: not-allowed;
  background-color: var(--gup-color-input-bg-default);
  color: var(--gup-color-brand-tertiary);
}

.gup-dropdown-menu-item--disabled .button {
  cursor: not-allowed;
  color: var(--gup-color-content-tertiary);
}

/* The "Please Select" row (value 0) is a prompt, not a choice: mute it so it
   reads differently from the real options under it. */
.gup-dropdown-menu-item[data-value="0"] .button .item-content {
  color: var(--gup-color-content-tertiary);
}

/* ── Dropdown field end slot (clear + arrow) ── */
.gup-dropdown-field .field-end-slot {
  display: flex;
  align-items: center;
  gap: 0;
  padding-inline-end: var(--gup-component-4);
}

.gup-dropdown-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: var(--gup-radius-component-small);
  --gup-icon--fill-color: var(--gup-color-content-secondary);
}

.gup-dropdown-clear-btn:hover {
  --gup-icon--fill-color: var(--gup-color-content-primary);
}

/* ── Dropdown apply button ── */
.gup-dropdown-apply-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-400);
  color: var(--gup-color-content-secondary);
  padding: 8px 16px;
  border-radius: 999px;
}

.gup-dropdown-apply-btn--primary {
  background-color: var(--gup-color-brand-medium);
  color: var(--gup-color-content-on-fill);
}

.gup-dropdown-apply-btn:hover {
  opacity: 0.85;
}

/* ── Dropdown menu item checkbox (multiple mode) ── */
.gup-dropdown-menu-item .gup-dropdown-menu-item__checkbox {
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--gup-component-3);
  padding: 0;
  margin: 0;
}

.gup-dropdown-menu-item .gup-dropdown-menu-item__checkbox:hover {
  background-color: var(--gup-color-input-bg-secondary);
  border-radius: var(--gup-radius-component-small);
}

/* ------------------------------------------------------------
   N. COMPONENT: gup-file-upload
   ------------------------------------------------------------ */
.gup-file-upload {
  display: block;
  --file-input-width: fit-content;
}

.gup-file-upload--full-width {
  --file-input-width: 100%;
}

.gup-file-upload .label {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  display: block;
}

.gup-file-upload .label.has-error {
  color: var(--gup-color-negative-medium);
}

.gup-file-upload .hint,
.gup-file-upload .error-message,
.gup-file-upload .size-error-message {
  margin-bottom: var(--gup-spacing-component-default);
  font-size: var(--font-size-300);
  display: flex;
  gap: var(--gup-component-3);
  align-items: center;
}

.gup-file-upload .hint {
  color: var(--gup-color-content-secondary);
}

.gup-file-upload .error-message,
.gup-file-upload .size-error-message {
  color: var(--gup-color-negative-medium);
}

.gup-file-upload .actions {
  margin-top: var(--gup-spacing-text-to-component);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: calc(3 * var(--unit));
}

.gup-file-upload .input-wrapper {
  position: relative;
  border: 1px solid var(--gup-color-brand-xhigh);
  display: flex;
  padding: var(--gup-component-0) var(--gup-component-5);
  justify-content: center;
  align-items: center;
  gap: var(--gup-component-4);
  border-radius: var(--gup-radius-button);
  width: var(--file-input-width);
}

.gup-file-upload .input-wrapper:focus-within {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-file-upload .file-input {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: var(--gup-component-3) var(--gup-component-0);
  border-radius: var(--gup-radius-component-full);
  gap: var(--gup-component-4);
  color: var(--gup-color-brand-xhigh);
  font-weight: var(--font-weight-base-beta);
}

.gup-file-upload .file-input .gup-icon {
  color: var(--gup-color-brand-xhigh);
}

.gup-file-upload .file-input-button {
  display: inline-block;
}

.gup-file-upload .native-input {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.gup-file-upload .uploaded-files {
  margin-top: var(--gup-spacing-text-to-component);
}

.gup-file-upload--invalid .input-wrapper {
  border-color: var(--gup-color-negative-medium);
}

/* Redden the upload's label in the invalid state too — matches the red-label
   treatment on other invalid fields. Fires for both HasError (ErrorMessage) and
   the IsInvalid flag set from a form's validation summary. */
.gup-file-upload--invalid .label {
  color: var(--gup-color-negative-medium);
}

/* ------------------------------------------------------------
   N+1. COMPONENT: gup-file-item
   ------------------------------------------------------------ */
.gup-file-item {
  display: block;
  padding-inline: var(--gup-padding-sm);
  background: var(--gup-color-background-overcanvas);
}

.gup-file-item:first-of-type {
  border-start-start-radius: var(--gup-component-3);
  border-start-end-radius: var(--gup-component-3);
  padding-top: var(--gup-padding-xs);
}

.gup-file-item:last-of-type {
  border-end-start-radius: var(--gup-component-3);
  border-end-end-radius: var(--gup-component-3);
  padding-bottom: var(--gup-padding-xs);
}

.gup-file-item .inner {
  display: flex;
  align-items: center;
  gap: var(--gup-spacing-component-default);
  align-self: stretch;
}

.gup-file-item:not(:first-of-type) .inner {
  padding-top: var(--gup-spacing-component-default);
}

.gup-file-item:not(:last-of-type) .inner {
  border-bottom: 1px solid var(--gup-color-border-medium);
  padding-bottom: var(--gup-spacing-component-default);
}

.gup-file-item .meta {
  flex-grow: 1;
  min-width: 0;
}

.gup-file-item .link {
  color: var(--gup-color-content-link);
  text-decoration: underline;
}

.gup-file-item .thumbnail {
  border-radius: var(--gup-component-2);
  max-height: 40px;
  aspect-ratio: 1;
  object-fit: cover;
}

.gup-file-item .title {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  font-size: var(--font-size-400);
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gup-file-item .subtitle {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
}

/* File-item action button (typically the delete icon). GupIcon renders a
   font-glyph <span class="gup-icon">, not an <svg>, so colour the glyph and
   give a clear hover/focus affordance for the destructive action. */
.gup-file-item .inner .gup-button .gup-icon {
  color: var(--gup-color-brand-xhigh);
  transition: color 0.15s ease;
}

.gup-file-item .inner .gup-button .button {
  border-radius: var(--gup-radius-component-default);
  transition: background 0.15s ease;
}

.gup-file-item .inner .gup-button .button:hover .gup-icon,
.gup-file-item .inner .gup-button .button:focus-visible .gup-icon {
  color: var(--gup-color-negative-medium);
}

.gup-file-item .inner .gup-button .button:hover {
  background: var(--gup-color-negative-xlow);
}

/* ── Spinner ── */
.gup-spinner-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--gup-component-2, 8px);
  vertical-align: middle;
}

.gup-spinner {
  animation: gup-spin 1s infinite linear;
  display: inline-block;
  flex-shrink: 0;
}

.gup-spinner-circle {
  fill: var(--gup-color-brand-accent-low);
}

.gup-spinner-indicator {
  fill: var(--gup-color-brand-high);
}

.gup-spinner-text {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
}

.gup-spinner-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes gup-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   28. COMPONENT: gup-badge
   ------------------------------------------------------------ */
.gup-badge {
  display: inline-block;
  width: 12px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--gup-color-content-inverted-primary);
  border-radius: 51%;
  background-color: var(--bg-color);
}

.gup-badge--type-neutral  { --bg-color: var(--gup-color-warning-medium); }
.gup-badge--type-positive { --bg-color: var(--gup-color-positive-medium); }
.gup-badge--type-negative { --bg-color: var(--gup-color-negative-medium); }
.gup-badge--type-offline  { --bg-color: var(--gup-color-neutral-low); }

/* ------------------------------------------------------------
   29. COMPONENT: gup-badge-chip
   Compact label/status pill — sized to its content.
   Mirrors design-system/components/badge-chip/badge-chip.css.
   Slots: thumbnail, prefix, label (default), suffix.
   ------------------------------------------------------------ */
.gup-badge-chip {
  display: inline-flex;
  min-height: var(--gup-icon-md);
  padding: 0 var(--gup-component-3);
  justify-content: center;
  align-items: center;
  gap: var(--gup-component-3);
  border-radius: calc(var(--gup-icon-md) / 2);
  border: 1px solid var(--gup-color-neutral-low);
  background: var(--gup-color-neutral-contrast);
  color: var(--gup-color-neutral-high);
  font-size: var(--font-size-300);
  line-height: var(--line-height-500);
  box-sizing: border-box;
}

.gup-badge-chip__label,
.gup-badge-chip__prefix,
.gup-badge-chip__suffix {
  display: inline-flex;
  align-items: center;
}

.gup-badge-chip__thumbnail {
  display: flex;
  width: var(--gup-component-5);
  height: var(--gup-component-5);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--gup-radius-component-full);
}

.gup-badge-chip--has-thumbnail {
  padding: var(--gup-component-0) var(--gup-component-3) var(--gup-component-0) var(--gup-component-1);
}

.gup-badge-chip--icon-only {
  padding: 0;
  width: var(--gup-component-7);
  height: var(--gup-component-7);
}

/* Outline (default) variants */
.gup-badge-chip--neutral  { border-color: var(--gup-color-neutral-low);  background: var(--gup-color-neutral-contrast); color: var(--gup-color-neutral-high); }
.gup-badge-chip--positive { border-color: var(--gup-color-positive-low); background: var(--gup-color-positive-xlow);    color: var(--gup-color-positive-xhigh); }
.gup-badge-chip--warning  { border-color: var(--gup-color-warning-low);  background: var(--gup-color-warning-xlow);     color: var(--gup-color-warning-xhigh); }
.gup-badge-chip--negative { border-color: var(--gup-color-negative-low); background: var(--gup-color-negative-xlow);    color: var(--gup-color-negative-xhigh); }
.gup-badge-chip--brand    { border-color: var(--gup-color-brand-low);    background: var(--gup-color-brand-xlow);       color: var(--gup-color-brand-xhigh); }

/* Filled variants */
.gup-badge-chip--neutral.gup-badge-chip--filled  { background: var(--gup-color-neutral-medium); color: var(--gup-color-negative-contrast); }
.gup-badge-chip--positive.gup-badge-chip--filled { background: var(--gup-color-positive-high);  color: var(--gup-color-negative-contrast); }
.gup-badge-chip--warning.gup-badge-chip--filled  { background: var(--gup-color-warning-low);    color: var(--gup-color-warning-xhigh); }
.gup-badge-chip--negative.gup-badge-chip--filled { background: var(--gup-color-negative-high);  color: var(--gup-color-negative-contrast); }
.gup-badge-chip--brand.gup-badge-chip--filled    { background: var(--gup-color-brand-high);     color: var(--gup-color-negative-contrast); }

/* ------------------------------------------------------------
   30. COMPONENT: gup-dialog
   ------------------------------------------------------------ */
.gup-dialog-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--gup-dialog--z-index, 100);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--gup-space-5);   /* keep the dialog off the screen edges on mobile */
  outline: 0;
}

/* A fullscreen dialog must go edge-to-edge — the backdrop's mobile edge padding
   would otherwise inset it, leaving a dark frame around a "fullscreen" modal. */
.gup-dialog-backdrop:has(> .gup-dialog--fullscreen) {
  padding: 0;
}

.gup-dialog {
  position: relative;
  display: grid;
  grid-template-areas: 'icon title' '. body' '. footer';
  grid-template-columns: 0fr auto;
  grid-template-rows: auto auto auto;
  row-gap: var(--gup-spacing-text-to-component);
  color: var(--gup-color-content-primary);
  width: 100%;
  max-width: var(--gup-modal--width, 420px);
  max-height: var(--gup-modal--height, 80vh);
  border: 1px solid var(--gup-color-neutral-low);
  background-color: var(--gup-color-neutral-xlow);
  border-radius: var(--gup-radius-card);
  box-shadow: var(--gup-shadow-200);
  padding: var(--gup-padding-md);
  z-index: calc(var(--gup-modal--z-index, 100) + 1);
}

.gup-dialog .gup-icon {
  grid-area: icon;
  align-self: start;
}

.gup-dialog .gup-icon {
  color: var(--gup-color-neutral-medium);
}

.gup-dialog__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-inline-start: var(--gup-spacing-text-to-component);
  grid-area: title;
}

.gup-dialog__heading {
  margin: 0;
  font-size: var(--font-size-550);
  font-weight: var(--font-weight-base-beta);
  color: var(--gup-color-content-primary);
  padding-inline-end: var(--gup-padding-lg);
}

.gup-dialog__close-button {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.gup-dialog__close-button .gup-icon {
  color: var(--gup-color-content-primary);
}

.gup-dialog__content {
  grid-area: body;
  max-height: var(--gup-modal--content-max-height, 400px);
  color: var(--gup-color-content-primary);
  display: flex;
  flex-direction: column;
  padding-inline-start: var(--gup-spacing-text-to-component);
  padding-inline-end: var(--gup-icon-md);
  padding-block-end: var(--gup-spacing-text-to-component);
  overflow-y: auto;
}

.gup-dialog__footer {
  grid-area: footer;
  padding-inline-start: var(--gup-spacing-text-to-component);
}

/* Ensure dialog action buttons keep standard button metrics even when the dialog
   is rendered inside a header slot (e.g. CancelConfirm modal). */
.gup-dialog .gup-button .button,
.gup-dialog .button:not(.gup-dialog__close-button) {
  font-size: var(--font-size-400);
  padding-block: 8px;
  padding-inline: var(--gup-component-5);
  gap: var(--gup-component-4);
  line-height: var(--line-height-500);
}

.gup-dialog .gup-button .button .gup-icon,
.gup-dialog .button:not(.gup-dialog__close-button) .gup-icon {
  font-size: inherit;
}

.gup-dialog .gup-button--text .button {
  text-decoration: underline;
}

.gup-dialog--small {
  max-width: 320px;
}

.gup-dialog--medium {
  max-width: 420px;
}

.gup-dialog--large {
  max-width: 640px;
}

.gup-dialog--xl {
  max-width: 960px;
}

.gup-dialog--fullscreen {
  max-width: 100vw;
  width: 100vw;
  border-radius: 0;
  border: 0;
  /* Header (auto) + scrollable body (1fr) + footer (auto) so the body keeps a
     real overflow area and the footer (Close) never gets pushed off-screen.
     dvh tracks the visible area as mobile browser chrome shows/hides; falls
     back to vh where unsupported. */
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
}

.gup-dialog--fullscreen .gup-dialog__content {
  min-height: 0;          /* allow the grid track to shrink so overflow engages */
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------
   COMPONENT: gup-textarea-field
   ------------------------------------------------------------ */
.gup-textarea-field {
  display: block;
}

.gup-textarea-field .label {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  display: block;
  margin-bottom: var(--gup-spacing-component-default);
}

.gup-textarea-field .validation-message {
  color: var(--gup-color-negative-medium, #b91c1c);
  font-size: var(--font-size-300);
  margin-bottom: var(--gup-spacing-component-default);
  display: flex;
  gap: var(--gup-component-3);
  align-items: center;
}

.gup-textarea-field .input-wrapper {
  display: flex;
  border-radius: var(--gup-radius-component-default);
  border: 1px solid var(--gup-color-states-base-border, var(--gup-color-border-medium));
  line-height: 1;
  overflow: hidden;
  background-color: var(--gup-color-states-base-bg);
}

.gup-textarea-field .input-inner-wrapper {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.gup-textarea-field .input {
  appearance: none;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  flex-grow: 1;
  width: 100%;
  padding-inline: var(--gup-component-4);
  padding-block: var(--gup-component-3);
  color: var(--gup-color-content-primary);
  line-height: 1.4;
  font-size: var(--font-size-400);
  font-family: inherit;
  resize: vertical;
  min-height: calc(var(--gup-component-7) * 2);
}

.gup-textarea-field .input::placeholder {
  color: var(--gup-color-content-secondary);
}

.gup-textarea-field .input:focus {
  outline: none;
}

.gup-textarea-field .input-wrapper:focus-within {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-textarea-field:hover:not(.disabled):not(.invalid) .input-wrapper {
  box-shadow: 0 0 0 1px var(--gup-color-states-base-border, var(--gup-color-border-medium)) inset;
}

.gup-textarea-field.invalid .input-wrapper {
  border-color: var(--gup-color-negative-medium, #b91c1c);
  box-shadow: 0 0 0 1px var(--gup-color-negative-medium, #b91c1c) inset;
}

.gup-textarea-field.invalid .label {
  color: var(--gup-color-negative-medium, #b91c1c);
}

.gup-textarea-field.disabled .label {
  color: var(--gup-color-content-tertiary);
}

.gup-textarea-field.disabled .input-wrapper {
  border-color: transparent;
  background-color: var(--gup-color-states-disabled-low);
}

.gup-textarea-field.disabled .input {
  color: var(--gup-color-states-disabled-medium);
  resize: none;
  cursor: not-allowed;
}

.gup-textarea-field .hint {
  margin-top: var(--gup-spacing-component-default);
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
  line-height: var(--line-height-500);
}

/* ============================================================
   TOGGLE  (.gup-toggle)
   Converted from @govom/components toggle web component
   ──────────────────────────────────────────────────────────── */

.gup-toggle {
  --gup-toggle--width: 44px;
  --gup-toggle--knob-size: var(--gup-component-6, 20px);
  --gup-toggle--padding: 2px;
  --gup-toggle--transition-animation: cubic-bezier(0.2, 0, 1, 0.9);
  --gup-toggle--transition-time: 70ms;

  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: var(--gup-component-3);
  border-radius: var(--gup-radius-component-default);
  color: var(--gup-color-content-primary);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.gup-toggle:not(.gup-toggle--disabled):not(.gup-toggle--readonly):hover {
  background-color: var(--gup-color-states-secondary-hover);
}

.gup-toggle__input {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: none;
  white-space: nowrap;
}

.gup-toggle__box {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: var(--gup-toggle--width);
  padding: var(--gup-toggle--padding);
  box-sizing: border-box;
  background-color: var(--gup-color-neutral-low);
  border-radius: var(--gup-radius-button);
  transition: background-color var(--gup-toggle--transition-time) var(--gup-toggle--transition-animation);
}

.gup-toggle:not(.gup-toggle--disabled):not(.gup-toggle--readonly) .gup-toggle__box:hover {
  background-color: var(--gup-color-states-primary-hover);
}

.gup-toggle:focus-within .gup-toggle__box {
  outline: var(--gup-stroke-focus-ring, 6px) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 3px;
}

.gup-toggle__knob {
  width: var(--gup-toggle--knob-size);
  height: var(--gup-toggle--knob-size);
  border-radius: 51%;
  background-color: var(--gup-color-neutral-contrast);
  transition: transform var(--gup-toggle--transition-time) var(--gup-toggle--transition-animation);
}

.gup-toggle__text-container {
  display: flex;
  flex-direction: column;
  gap: var(--gup-component-3);
  text-wrap: balance;
  line-height: var(--line-height-500);
}

.gup-toggle__hint {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-300);
}

/* ── Checked ── */
.gup-toggle--checked .gup-toggle__box {
  background-color: var(--gup-color-brand-high);
}

.gup-toggle--checked .gup-toggle__knob {
  /* Translate the knob across the track. The is-ltr custom property flips the sign in RTL. */
  transform: translateX(calc((var(--gup-toggle--width) * var(--gup--is-ltr, 1)) - (100% * var(--gup--is-ltr, 1)) - (var(--gup-toggle--padding) * 2 * var(--gup--is-ltr, 1))));
}

/* ── Disabled / Readonly ── */
.gup-toggle--disabled,
.gup-toggle--readonly {
  cursor: default;
}

.gup-toggle--disabled .gup-toggle__text-container,
.gup-toggle--readonly .gup-toggle__text-container,
.gup-toggle--disabled .gup-toggle__hint,
.gup-toggle--readonly .gup-toggle__hint {
  color: var(--gup-color-content-tertiary);
}

.gup-toggle--disabled .gup-toggle__box,
.gup-toggle--readonly .gup-toggle__box {
  background-color: var(--gup-color-states-disabled-low);
  cursor: default;
}

.gup-toggle--disabled .gup-toggle__knob,
.gup-toggle--readonly .gup-toggle__knob {
  background-color: var(--gup-color-states-disabled-medium);
}

/* ------------------------------------------------------------
   COMPONENT: gup-accordion / gup-accordion-item
   Converted from @govom/components accordion web component
   ------------------------------------------------------------ */
.gup-accordion {
  display: block;
}

.gup-accordion-item {
  --gup-icon--fill-color: var(--gup-color-content-link);
  --gup-accordion-item--border-color: transparent;

  border-bottom: 1px solid var(--gup-color-border-medium);
  display: block;
  color: var(--gup-color-content-primary);
}

.gup-accordion-item:hover {
  border-bottom-color: transparent;
}

.gup-accordion .gup-accordion-item:last-child:not(:only-child) {
  border-bottom: none;
}

.gup-accordion-item .inner {
  display: block;
}

.gup-accordion-item .label {
  cursor: pointer;
  padding: var(--gup-component-4) var(--gup-component-0, 0) var(--gup-component-7) var(--gup-component-0, 0);
  border-bottom: 4px solid var(--gup-accordion-item--border-color);

  /* Removes the native details marker */
  list-style-type: none;
}

.gup-accordion-item .label:hover {
  background-color: var(--gup-color-states-secondary-hover);
}

.gup-accordion-item .label::-webkit-details-marker {
  display: none;
}

.gup-accordion-item .label::marker {
  display: none;
}

.gup-accordion-item__row {
  display: flex;
  align-items: flex-start;
  gap: calc(4 * var(--unit, 4px));
  width: 100%;
}

.gup-accordion-item .label-inner {
  flex-grow: 1;
  font-size: var(--font-size-600);
  font-weight: var(--font-weight-base-beta);
  line-height: 32px;
  letter-spacing: -0.48px;
}

.gup-accordion-item .content {
  padding-bottom: var(--gup-padding-lg);
}

/* gup-accordion-item-action: a presentational toggle indicator */
.gup-accordion-item-action {
  display: inline-flex;
  align-items: center;
  gap: var(--gup-component-3);
  color: var(--gup-color-content-link);
  flex-shrink: 0;
}

.gup-accordion-item-action__label {
  line-height: var(--line-height-500);
  text-decoration-line: underline;
}

/* ------------------------------------------------------------
   COMPONENT: gup-avatar
   Mirrors design-system/components/avatar/avatar.css.
   Sizes: s (20px), m (28px), l (40px) — driven by --size + --font-size
   inline custom properties set on the host element.
   ------------------------------------------------------------ */
.gup-avatar {
  --gup-icon--fill-color: var(--gup-color-neutral-high);

  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  outline: 1px solid var(--gup-color-neutral-low);
  background-color: var(--gup-color-brand-accent-contrast);
  color: var(--gup-color-neutral-high);
  border-radius: 51%;
  width: var(--size, 20px);
  height: var(--size, 20px);
  aspect-ratio: 1 / 1;
  position: relative;
  font-size: var(--font-size, var(--font-size-90));
  vertical-align: middle;
}

.gup-avatar--has-label {
  --gup-icon--fill-color: var(--gup-color-neutral-contrast);

  background-color: var(--gup-color-neutral-high);
  color: var(--gup-color-neutral-contrast);
  outline-color: transparent;
}

.gup-avatar--clickable {
  cursor: pointer;
}

.gup-avatar--clickable:focus-visible {
  outline: 2px solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-avatar__image {
  width: 100%;
  height: 100%;
  border-radius: 51%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.gup-avatar__label {
  overflow: hidden;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.gup-avatar__badge {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
}

/* ------------------------------------------------------------
   COMPONENT: gup-breadcrumbs / gup-breadcrumbs-item
   Mirrors design-system/components/breadcrumbs/*.css.
   The chevron between items is an ::after element rotated 45deg
   in LTR and -45deg in RTL.
   ------------------------------------------------------------ */
.gup-breadcrumbs {
  --gap: var(--gup-spacing-component-default);

  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.gup-breadcrumbs-item {
  --color: var(--gup-color-content-primary);

  display: inline-flex;
  gap: var(--gup-spacing-component-default);
  align-items: center;
  font-size: var(--font-size-400);
  line-height: var(--line-height-500);
  color: var(--color);
  text-decoration: underline;
}

.gup-breadcrumbs-item:hover {
  --color: var(--gup-color-brand-strong);

  text-decoration-thickness: 2px;
}

.gup-breadcrumbs-item::after {
  --border-width: 2px;
  --size: 6px;
  --rotation: 45deg;

  content: '';
  transform: rotate(calc(var(--rotation) * var(--gup--is-ltr, 1)));
  display: inline-block;
  width: var(--size);
  height: var(--size);
  border-style: solid;
  border-color: var(--gup-color-content-tertiary);
  border-width: 0;
  border-inline-end-width: var(--border-width);
  border-block-start-width: var(--border-width);
  will-change: transform;
}

.gup-breadcrumbs-item:last-child::after {
  display: none;
}

.gup-breadcrumbs-item--current {
  text-decoration: none;
  cursor: default;
}

@media (max-width: 599px) {
  .gup-breadcrumbs-item:not(:first-child, :last-child) {
    display: none;
  }
}

/* ------------------------------------------------------------
   COMPONENT: gup-callout
   Mirrors design-system/components/callout/callout.css.
   Three appearances:
     - default    : left brand-color border, no background
     - background : filled overcanvas background, rounded corners
     - border     : 1px outline, rounded corners
   ------------------------------------------------------------ */
.gup-callout {
  --gup-callout-color: var(--gup-color-content-primary);

  display: block;
  color: var(--gup-callout-color);
}

.gup-callout__inner {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-text);
  position: relative;
}

.gup-callout--appearance-default .gup-callout__inner {
  padding-block-start: var(--gup-padding-sm);
  padding-inline-end: 0;
  padding-block-end: var(--gup-padding-sm);
  padding-inline-start: var(--gup-padding-lg);
  border-inline-start: 6px solid var(--gup-color-brand-high);
}

.gup-callout--appearance-background .gup-callout__inner {
  padding: var(--gup-padding-md);
  background: var(--gup-color-background-overcanvas);
  border-radius: var(--gup-radius-card);
}

.gup-callout--appearance-border .gup-callout__inner {
  padding: var(--gup-padding-md);
  border: 1px solid var(--gup-color-border-low);
  border-radius: var(--gup-radius-card);
}

.gup-callout__header {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--unit) * 2);
  font-weight: var(--font-weight-base-beta);
}

.gup-callout__icon {
  --gup-icon--fill-color: var(--gup-callout-color);

  display: inline-flex;
  flex-shrink: 0;
}

.gup-callout__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.gup-callout__footer {
  color: var(--gup-color-content-secondary);
}

.gup-callout--clickable {
  cursor: pointer;
}

.gup-callout--clickable:focus-visible {
  outline: 2px solid var(--gup-color-brand-high);
  outline-offset: 2px;
}

/* ============================================================
   COMPONENT: gup-divider
   Mirrors design-system/components/divider/divider.css.
   Three appearances:
     - default   : medium-contrast border (default)
     - secondary : low-contrast border
     - inverse   : white-tinted border for dark surfaces
   Three locations:
     - bottom        : line under the content (default)
     - top           : line above the content
     - top-and-bottom: lines on both sides
   The Gap parameter (in --unit multiples, default 4) controls spacing.
   ------------------------------------------------------------ */
.gup-divider {
  --gup-divider-border-color: var(--gup-color-border-medium);
  --gup-divider-gap: calc(4 * var(--unit, 4px));

  display: flex;
  flex-direction: column;
  width: 100%;
  border-block-end: 1px solid var(--gup-divider-border-color);
  padding-block-end: var(--gup-divider-gap);
}

.gup-divider--appearance-secondary {
  --gup-divider-border-color: var(--gup-color-border-low);
}

.gup-divider--appearance-inverse {
  --gup-divider-border-color: var(--gup-color-border-inverted-medium);
}

.gup-divider--location-top {
  border-block-start: 1px solid var(--gup-divider-border-color);
  padding-block-start: var(--gup-divider-gap);
  border-block-end: none;
  padding-block-end: 0;
}

.gup-divider--location-top-and-bottom {
  border-block: 1px solid var(--gup-divider-border-color);
  padding-block: var(--gup-divider-gap);
}

.gup-divider--clickable {
  cursor: pointer;
}

.gup-divider--clickable:focus-visible {
  outline: 2px solid var(--gup-color-brand-high);
  outline-offset: 2px;
}

/* ============================================================
   COMPONENT: gup-data-sheet
   Mirrors design-system/components/data-sheet/data-sheet.css.
   A bordered, padded vertical stack — typically used to highlight
   a group of gup-labelled-item entries.
   ------------------------------------------------------------ */
.gup-data-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--gup-padding-md);
  border: 1px solid var(--gup-color-border-low);
  padding: var(--gup-padding-md);
  border-radius: var(--gup-radius-card);
}

.gup-data-sheet--clickable {
  cursor: pointer;
}

.gup-data-sheet--clickable:focus-visible {
  outline: 2px solid var(--gup-color-brand-high);
  outline-offset: 2px;
}

/* ============================================================
   COMPONENT: gup-labelled-item
   Mirrors design-system/components/labelled-item/labelled-item.css.
   A label sitting above its content, with an optional icon next to
   the content.
   ------------------------------------------------------------ */
.gup-labelled-item {
  display: block;
}

.gup-labelled-item__inner {
  display: block;
}

.gup-labelled-item__label {
  color: var(--gup-color-content-primary);
  font-weight: var(--font-weight-base-beta);
  font-size: var(--font-size-400);
  margin-bottom: var(--gup-component-2);
}

.gup-labelled-item__content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: calc(var(--unit) * 2);
  font-size: var(--font-size-550);
  line-height: var(--line-height-400);
}

.gup-labelled-item__icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 4px;
}

.gup-labelled-item__value {
  flex: 1 1 auto;
  min-width: 0;
}

.gup-labelled-item--clickable {
  cursor: pointer;
}

.gup-labelled-item--clickable:focus-visible {
  outline: 2px solid var(--gup-color-brand-high);
  outline-offset: 2px;
}

/* ============================================================
   COMPONENT: gup-filter-chip
   Mirrors design-system/components/filter-chip/filter-chip/filter-chip.css.
   A pill-shaped chip displaying a user-selected filter; renders an
   optional trailing close icon when used as a button.
   ------------------------------------------------------------ */
.gup-filter-chip {
  --gup-filter-chip-color: var(--gup-color-content-link);
  --gup-filter-chip-bg:    var(--gup-color-states-base-bg-control);
  --gup-icon--fill-color:  var(--gup-filter-chip-color);

  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--gup-component-3);
  padding: 8px var(--gup-component-5);
  border: 0;
  border-radius: var(--gup-radius-component-full);
  background: var(--gup-filter-chip-bg);
  color: var(--gup-filter-chip-color);
  font-family: inherit;
  font-size: inherit;
  line-height: 24px;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gup-filter-chip:not(.is-disabled):hover {
  --gup-filter-chip-bg:
    linear-gradient(var(--gup-color-states-secondary-hover), var(--gup-color-states-secondary-hover)),
    linear-gradient(var(--gup-color-brand-accent-xlow), var(--gup-color-brand-accent-xlow));
}

.gup-filter-chip:not(.is-disabled):active {
  --gup-filter-chip-bg:
    linear-gradient(0deg, var(--gup-color-states-secondary-active) 0%, var(--gup-color-states-secondary-active) 100%),
    var(--gup-color-states-base-bg-control);
}

.gup-filter-chip:focus-visible {
  outline: 2px solid var(--gup-color-brand-high);
  outline-offset: 2px;
}

.gup-filter-chip.is-disabled,
.gup-filter-chip[disabled] {
  --gup-filter-chip-color: var(--gup-color-states-disabled-medium);
  --gup-filter-chip-bg:    var(--gup-color-states-disabled-low);
  cursor: not-allowed;
  pointer-events: none;
}

.gup-filter-chip__label {
  display: inline-flex;
  align-items: center;
}

.gup-filter-chip__icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

/* ============================================================
   COMPONENT: gup-filter-chip-wrapper
   Mirrors design-system/components/filter-chip/filter-chip-wrapper/
   filter-chip-wrapper.css. Groups filter chips with an optional
   leading label and a trailing "clear all" button.
   ------------------------------------------------------------ */
.gup-filter-chip-wrapper {
  display: block;
  border-bottom: 1px solid var(--gup-color-brand-low);
  padding-bottom: var(--gup-component-3);
}

.gup-filter-chip-wrapper__label {
  color: var(--gup-color-brand-high);
  font-weight: var(--font-weight-base-beta);
}

/* ============================================================
   COMPONENT: gup-flyout
   Mirrors design-system/components/flyout/flyout.css. A side / top /
   bottom panel that slides into view from an edge of the viewport.
   Supports a heading, optional close button, scrollable content area
   and an optional footer (typically action buttons).
   ------------------------------------------------------------ */
.gup-flyout-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--gup-flyout--z-index, 100);
  outline: 0;
}

.gup-flyout-backdrop--transparent {
  background-color: transparent;
}

.gup-flyout-panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  background-color: var(--gup-color-states-base-bg, #ffffff);
  box-shadow: var(--gup-shadow-200);
  z-index: calc(var(--gup-flyout--z-index, 100) + 1);
  animation-duration: 0.3s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.gup-flyout-panel--right {
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: var(--gup-flyout--width, 460px);
  max-width: 100%;
  animation-name: gup-flyout-slide-in-right;
}

.gup-flyout-panel--left {
  top: 0;
  left: 0;
  right: auto;
  bottom: 0;
  width: var(--gup-flyout--width, 460px);
  max-width: 100%;
  animation-name: gup-flyout-slide-in-left;
}

/* Flyout text direction */
[dir="rtl"] .gup-flyout-backdrop,
[dir="rtl"] .gup-flyout-panel,
.gup-flyout-backdrop[dir="rtl"],
.gup-flyout-panel[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .gup-flyout-panel .gup-flyout-content,
.gup-flyout-panel[dir="rtl"] .gup-flyout-content {
  text-align: right;
  direction: rtl;
}

[dir="ltr"] .gup-flyout-backdrop,
[dir="ltr"] .gup-flyout-panel,
.gup-flyout-backdrop[dir="ltr"],
.gup-flyout-panel[dir="ltr"] {
  direction: ltr;
  text-align: start;
}

[dir="ltr"] .gup-flyout-panel .gup-flyout-content,
.gup-flyout-panel[dir="ltr"] .gup-flyout-content {
  text-align: start;
  direction: ltr;
}

.gup-flyout-panel--top {
  top: 0;
  left: 0;
  right: 0;
  height: var(--gup-flyout--height, 400px);
  max-height: 100%;
  animation-name: gup-flyout-slide-in-top;
}

.gup-flyout-panel--bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--gup-flyout--height, 400px);
  max-height: 100%;
  animation-name: gup-flyout-slide-in-bottom;
}

.gup-flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-start: var(--gup-spacing-between-text, 16px);
  padding-block-end: var(--gup-spacing-between-text, 17px);
  padding-inline-start: var(--gup-spacing-between-content, 24px);
  padding-inline-end: var(--gup-spacing-component-default, 12px);
  border-bottom: 1px solid var(--gup-color-border-low, #e1e1e2);
  min-height: 60px;
  box-sizing: border-box;
}

.gup-flyout-heading {
  margin: 0;
  font-size: var(--font-size-500, 20px);
  font-weight: var(--font-weight-base-beta, 700);
  line-height: 28px;
  letter-spacing: -0.4px;
  color: var(--gup-color-content-primary, #27272a);
}

.gup-flyout-close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--gup-radius-button, 999px);
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--gup-color-content-primary, #27272a);
}

.gup-flyout-close-button:hover {
  background-color: var(--gup-color-states-hover-bg, rgba(0, 0, 0, 0.04));
}

.gup-flyout-close-button:focus-visible {
  outline: 2px solid var(--gup-color-focus-ring, #2f57cd);
  outline-offset: 2px;
}

.gup-flyout-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--gup-spacing-between-content, 24px) var(--gup-spacing-content-to-cta, 32px);
  color: var(--gup-color-content-primary, #27272a);
}

.gup-flyout-content:focus {
  outline: none;
}

.gup-flyout-content:focus-visible {
  outline: 2px solid var(--gup-color-focus-ring, #2f57cd);
  outline-offset: -2px;
}

.gup-flyout-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding-inline: var(--gup-spacing-content-to-cta, 32px);
  background-color: var(--gup-color-states-base-bg, #ffffff);
  border-top: 1px solid var(--gup-color-border-low, #e1e1e2);
}

.gup-flyout-footer:empty {
  display: none;
}

@keyframes gup-flyout-slide-in-right {
  0%  { transform: translateX(100%); }
  to  { transform: translateX(0); }
}

@keyframes gup-flyout-slide-in-left {
  0%  { transform: translateX(-100%); }
  to  { transform: translateX(0); }
}

@keyframes gup-flyout-slide-in-top {
  0%  { transform: translateY(-100%); }
  to  { transform: translateY(0); }
}

@keyframes gup-flyout-slide-in-bottom {
  0%  { transform: translateY(100%); }
  to  { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .gup-flyout-panel {
    animation: none;
  }
}

/* RTL: in left-to-right languages, "left" = physical left and "right" = physical right.
   The right/left panels already use logical inset-inline-start/end so they flip automatically
   in RTL contexts. Top/bottom variants stay anchored to the top/bottom edges. */

/* ============================================================
   COMPONENT: gup-image
   ------------------------------------------------------------
   Mirrors design-system/components/image/image.css — a <figure>
   wraps the <img> with an optional <figcaption>. The caption uses
   the secondary content color and the spacing-image-bottom token
   so it lines up with the rest of the design system.
   ============================================================ */

.gup-image {
  display: inline-block;
  margin: 0;
  max-width: 100%;
}

.gup-image__img {
  display: block;
  max-width: 100%;
  height: auto;
}

.gup-image__caption {
  color: var(--gup-color-content-secondary, #52525b);
  font-size: var(--font-size-300, 14px);
  margin-top: var(--gup-spacing-image-bottom, 8px);
}

.gup-image--error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gup-color-content-secondary, #52525b);
  font-size: var(--font-size-300, 14px);
}

.gup-image__error-message {
  padding: 8px 12px;
}

/* ============================================================
   COMPONENT: gup-page-status
   ------------------------------------------------------------
   Mirrors design-system/components/page-status/page-status.css.
   A vertically-stacked block with a circular icon, title,
   message, and optional action area. Three colour variants:
   success (green), error (red), and expired (neutral).
   ============================================================ */

.gup-page-status {
  --gup-page-status--icon-bg: var(--gup-color-neutral-low);
  --gup-page-status--icon-color: var(--gup-color-neutral-medium);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gup-spacing-between-content);
}

.gup-page-status__icon-wrapper {
  background-color: var(--gup-page-status--icon-bg);
  color: var(--gup-page-status--icon-color);
  border-radius: 51%;
  width: 64px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gup-page-status__icon-wrapper .gup-icon {
  color: var(--gup-page-status--icon-color);
}

.gup-page-status__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gup-spacing-between-text);
}

.gup-page-status__title {
  color: var(--gup-color-content-primary);
  text-align: center;
  font-size: var(--font-size-600);
  font-weight: var(--font-weight-base-beta);
  margin: 0;
}

.gup-page-status__message {
  color: var(--gup-color-content-primary);
  text-align: center;
  font-size: var(--font-size-550);
}

.gup-page-status__action {
  display: flex;
  justify-content: center;
}

.gup-page-status--success {
  --gup-page-status--icon-color: var(--gup-color-neutral-contrast);
  --gup-page-status--icon-bg: var(--gup-color-positive-medium);
}

.gup-page-status--error {
  --gup-page-status--icon-color: var(--gup-color-neutral-contrast);
  --gup-page-status--icon-bg: var(--gup-color-negative-medium);
}

/* ============================================================
   COMPONENT: gup-pagination
   ------------------------------------------------------------
   Mirrors design-system/components/pagination/pagination.css.
   Two layouts:
     - .gup-pagination          — numbered page buttons + prev/next text
     - .gup-pagination__links-wrapper — directional prev/next link cards
   ============================================================ */

.gup-pagination__nav {
  --gup-pagination--color: var(--gup-color-brand-xhigh);
  --gup-pagination--item-padding: 8px 20px; /* var(--gup-component-2) var(--gup-component-5) */
}

.gup-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gup-spacing-component-default, 8px);
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--gup-pagination--color);
}

.gup-pagination__directional-button {
  display: inline-flex;
  align-items: center;
  gap: 12px; /* var(--gup-component-3) */
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gup-pagination--color);
  font: inherit;
  border-radius: var(--gup-radius-component-default, 4px);
}

.gup-pagination__directional-button:hover {
  background-color: var(--gup-color-states-secondary-hover, rgba(19, 36, 89, 0.06));
}

.gup-pagination__directional-button:focus-visible {
  outline: 2px solid var(--gup-color-brand-medium, #2f57cd);
  outline-offset: 2px;
}

.gup-pagination__text {
  text-decoration: underline;
}

.gup-pagination__text--is-disabled {
  border-color: transparent;
  pointer-events: none;
  text-decoration: none;
}

.gup-pagination__arrow-icon {
  display: inline-flex;
  flex-shrink: 0;
}

/* RTL: flip the arrow horizontally so it still points "back/forward" along the reading flow. */
:dir(rtl) .gup-pagination__arrow-icon,
[dir="rtl"] .gup-pagination__arrow-icon {
  transform: scaleX(-1);
}

.gup-pagination__page-wrapper {
  display: inline-flex;
}

.gup-pagination__page-button {
  min-width: 40px; /* var(--gup-component-8) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--gup-pagination--item-padding);
  line-height: 24px;
  border-radius: var(--gup-radius-component-default, 4px);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gup-pagination--color);
  font: inherit;
}

.gup-pagination__page-button:disabled {
  cursor: default;
}

.gup-pagination__page-button:focus-visible {
  outline: 2px solid var(--gup-color-brand-medium, #2f57cd);
  outline-offset: 2px;
}

.gup-pagination__page-button:hover:not(.gup-pagination__page-button--is-current):not(:disabled) {
  background-color: var(--gup-color-states-secondary-hover, rgba(19, 36, 89, 0.06));
}

.gup-pagination__page-button--is-current {
  color: var(--gup-color-brand-contrast);
  background-color: var(--gup-pagination--color);
  cursor: default;
}

.gup-pagination__page-button--is-current .gup-pagination__text {
  text-decoration: none;
}

/* --- Directional kind --- */

.gup-pagination__links-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--gup-radius-component-default, 4px);
  justify-content: space-between;
}

.gup-pagination__nav-link {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px; /* var(--gup-component-3) */
  width: 50%;
  color: var(--gup-pagination--color);
  text-decoration: none;
}

.gup-pagination__nav-link--direction-next {
  margin-inline-start: auto;
  text-align: end;
}

.gup-pagination__nav-link--direction-prev {
  margin-inline-end: auto;
}

.gup-pagination__text-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--font-size-400, 16px);
  color: var(--gup-pagination--color);
}

.gup-pagination__nav-link--direction-next .gup-pagination__text-box {
  align-items: flex-end;
}

.gup-pagination__nav-link:hover .gup-pagination__text-box {
  color: var(--gup-color-content-link, var(--gup-color-brand-medium, #2f57cd));
}

.gup-pagination__label {
  font-weight: var(--font-weight-base-beta, 600);
  line-height: var(--line-height-500, 1.5);
  width: 100%;
  text-decoration: underline;
}

.gup-pagination__title {
  text-wrap: wrap;
  text-decoration: underline;
}

/* ============================================================
   COMPONENT: gup-screenreader-text
   ============================================================
   Mirror of the Angular `screenreader-text` mixin.
   Visually hides content while keeping it in the accessibility
   tree — i.e. invisible to sighted users but announced by
   assistive technologies (NVDA, JAWS, VoiceOver, TalkBack…).
*/
.gup-screenreader-text {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: none;
  white-space: nowrap;
}

/* ============================================================
   COMPONENT: gup-search
   ============================================================
   Mirror of design-system/components/search.css — pill-shaped
   text field with a trailing clear (×) and search-icon button.
*/
.gup-search {
  --gup-search--controls-gap: 10px;
  --gup-search--close-width: calc(20px + var(--gup-search--controls-gap));
  --gup-search--search-width: calc(24px + var(--gup-search--controls-gap));
  --gup-search--second-border-color: transparent;

  display: block;
  width: 100%;
  cursor: pointer;
  position: relative;
  font-size: var(--font-size-400);
}

.gup-search__input-container {
  display: flex;
  align-items: center;
  gap: var(--gup-component-4);
  border: 1px solid var(--gup-color-states-base-border);
  border-radius: var(--gup-radius-component-full);
  background: var(--gup-color-states-base-bg);
  padding-block: var(--gup-component-4);
  padding-inline-start: var(--gup-component-5);
  padding-inline-end: var(--gup-component-4);
  outline: 1px solid var(--gup-search--second-border-color);
}

.gup-search__input-container:hover {
  --gup-search--second-border-color: var(--gup-color-states-base-border);
}

.gup-search__input-container:focus-within {
  outline: var(--gup-stroke-focus-ring, 6px) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
  border-color: transparent;
}

.gup-search__input {
  border: none;
  outline: none;
  background-color: transparent;
  width: 100%;
  min-height: 23px;
  cursor: inherit;
  font: inherit;
  color: inherit;
  padding-inline-end: calc(
    var(--gup-search--controls-gap) + var(--gup-search--close-width) + var(--gup-search--search-width)
  );
}

/* Strip the native "X" the browser injects for type=search — we render our own. */
.gup-search__input::-webkit-search-cancel-button,
.gup-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.gup-search__controls {
  position: absolute;
  inset-inline-end: 4px;
  inset-block-start: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--gup-component-3);
}

.gup-search__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: var(--gup-radius-component-full);
  cursor: pointer;
  color: var(--gup-color-content-link);
}

.gup-search__icon-button .gup-icon {
  color: inherit;
}

.gup-search__icon-button:hover:not(:disabled) {
  background: var(--gup-color-states-secondary-hover, rgba(0, 0, 0, 0.04));
}

.gup-search__icon-button:focus-visible {
  outline: var(--gup-stroke-focus-ring, 6px) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-search__icon-button--clear {
  color: var(--gup-color-content-link);
}

.gup-search.is-disabled .gup-search__input-container {
  --gup-search--second-border-color: var(--gup-color-states-disabled-low);
  background-color: var(--gup-color-states-disabled-low);
  border-color: var(--gup-color-states-disabled-low);
  color: var(--gup-color-states-disabled-medium);
  cursor: not-allowed;
}

.gup-search.is-disabled .gup-search__input {
  cursor: not-allowed;
  color: var(--gup-color-states-disabled-medium);
}

.gup-search.is-disabled .gup-search__icon-button {
  color: var(--gup-color-states-disabled-medium);
  cursor: not-allowed;
  pointer-events: none;
}

/* RTL — flip the search-icon (the magnifier handle reads natural in either direction
   but we mirror it for visual symmetry with prev/next arrows elsewhere in the system). */
:dir(rtl) .gup-search__icon-button--submit .gup-icon,
[dir="rtl"] .gup-search__icon-button--submit .gup-icon {
  transform: scaleX(-1);
}

/* ============================================================
   COMPONENT: gup-tabs / gup-tabs-navigation / gup-tab / gup-tab-panel
   Mirrors design-system/components/tabs/{tabs,tabs-navigation,tab,tab-panel}.
   Selectors:
     - .gup-tabs                        — outer wrapper
     - .gup-tabs-navigation             — wraps the row/column of tab buttons
     - .gup-tabs-navigation__list       — the role="tablist" flex container
     - .gup-tab                         — individual tab button
     - .gup-tab__content                — label container (uses ::before
                                          ghost text to keep width stable
                                          when the label flips to bold)
     - .gup-tab-panel                   — content panel (hidden when not selected)
   Modifier classes: --appearance-default | --appearance-toggle | --appearance-vertical
                     --is-full-width
   ============================================================ */

.gup-tabs {
  display: block;
}

/* When the whole group is vertical, lay nav + panels side-by-side. */
.gup-tabs--appearance-vertical {
  display: flex;
  align-items: stretch;
  gap: var(--gup-component-5);
}

.gup-tabs--appearance-vertical .gup-tabs-navigation {
  flex-shrink: 0;
}

/* ── Tabs navigation (row of tab buttons) ────────────────── */

.gup-tabs-navigation {
  display: block;
}

.gup-tabs-navigation--appearance-default {
  border-bottom: 1px solid var(--gup-color-border-low);
}

.gup-tabs-navigation--appearance-toggle:not(.gup-tabs-navigation--is-full-width) {
  display: flex;
}

/* When full-width, individual tabs grow to fill the row. */
.gup-tabs-navigation--appearance-default.gup-tabs-navigation--is-full-width .gup-tabs-navigation__list > *,
.gup-tabs-navigation--appearance-toggle.gup-tabs-navigation--is-full-width .gup-tabs-navigation__list > * {
  flex-grow: 1;
}

.gup-tabs-navigation__list {
  display: flex;
}

.gup-tabs-navigation--appearance-toggle .gup-tabs-navigation__list {
  padding: var(--gup-component-2);
  gap: var(--gup-component-3);
  background-color: var(--gup-color-states-base-bg-secondary);
  border-radius: var(--gup-radius-component-full);
}

.gup-tabs-navigation--appearance-vertical .gup-tabs-navigation__list {
  flex-direction: column;
}

/* ── Tab button ───────────────────────────────────────────── */

.gup-tab {
  --gup-tab--border-bottom-width: var(--gup-component-2);

  appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--gup-color-content-link);
  cursor: pointer;
  position: relative;
  width: 100%;
  line-height: var(--line-height-500);
}

.gup-tab:focus-visible {
  outline: var(--gup-stroke-focus-ring) solid var(--gup-color-states-base-focus-ring);
  outline-offset: 2px;
}

.gup-tab:disabled {
  background-color: var(--gup-color-states-disabled-low);
  color: var(--gup-color-states-disabled-medium);
  pointer-events: none;
  cursor: not-allowed;
}

.gup-tab[aria-selected="true"] {
  font-weight: var(--font-weight-base-beta);
}

/* Width-stabilising ghost copy of the label rendered in bold —
   keeps the tab from re-flowing when the active tab becomes bold. */
.gup-tab--appearance-default .gup-tab__content::before,
.gup-tab--appearance-toggle .gup-tab__content::before {
  display: block;
  content: attr(data-title);
  font-weight: var(--font-weight-base-beta);
  height: 1px;
  color: transparent;
  overflow: hidden;
  visibility: hidden;
}

/* Default appearance — underline on the active tab. */
.gup-tab--appearance-default {
  display: flex;
  align-items: center;
  gap: var(--gup-component-4);
  padding-inline: var(--gup-padding-md);
  padding-block: var(--gup-component-4);
  border-bottom: var(--gup-tab--border-bottom-width) solid transparent;
}

.gup-tab--appearance-default[aria-selected="true"] {
  border-bottom: var(--gup-tab--border-bottom-width) solid var(--gup-color-content-link);
}

.gup-tab--appearance-default:hover:not([aria-selected="true"]):not(:disabled) {
  background-color: var(--gup-color-states-secondary-hover);
}

/* Full-width variant — center the content of each tab. */
.gup-tab--appearance-default.gup-tab--is-full-width,
.gup-tab--appearance-toggle.gup-tab--is-full-width {
  justify-content: center;
}

/* Toggle appearance — pill segmented control. */
.gup-tab--appearance-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gup-radius-component-full);
  padding: var(--gup-component-0) var(--gup-padding-sm);
  gap: var(--gup-component-3);
  text-align: center;
  min-height: var(--gup-icon-xl);
}

.gup-tab--appearance-toggle[aria-selected="true"] {
  background-color: var(--gup-color-states-base-bg);
  box-shadow:
    0 8px 16px 0 rgb(52 48 44 / 3%),
    0 4px 8px 0 rgb(52 48 44 / 2%),
    0 1.5px 3px 0 rgb(52 48 44 / 1%),
    0 0.5px 1px 0 rgb(52 48 44 / 1%);
}

.gup-tab--appearance-toggle:hover:not([aria-selected="true"]):not(:disabled) {
  background-color: var(--gup-color-states-secondary-hover);
}

/* Vertical appearance — left-aligned list with an active leading bar. */
.gup-tab--appearance-vertical {
  display: flex;
  align-items: center;
  gap: var(--gup-component-4);
  padding: var(--gup-component-4) var(--gup-component-4) var(--gup-component-4) var(--gup-component-5);
  border-bottom: 1px solid var(--gup-color-border-medium);
  width: 100%;
  text-align: start;
}

.gup-tab--appearance-vertical .gup-tab__content {
  flex-grow: 1;
}

.gup-tab--appearance-vertical[aria-selected="true"] {
  background-color: var(--gup-color-states-base-bg-control);
  border-bottom: 1px solid var(--gup-color-border-medium);
}

.gup-tab--appearance-vertical[aria-selected="true"]::before {
  position: absolute;
  content: '';
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: var(--gup-component-2);
  height: 100%;
  background-color: var(--gup-color-content-link);
}

.gup-tab--appearance-vertical:hover:not([aria-selected="true"]):not(:disabled) {
  background-color: var(--gup-color-states-secondary-hover);
}

/* ── Tab panel ───────────────────────────────────────────── */

.gup-tab-panel {
  display: block;
  flex-grow: 1;
}

.gup-tab-panel[hidden] {
  display: none;
}

.gup-tab-panel__inner {
  padding: calc(var(--unit) * 3);
}

/* ============================================================
   COMPONENT: gup-tooltip
   ------------------------------------------------------------
   Mirrors the gov.om <gup-tooltip> design-system component
   (which itself wraps gup-generic-popup + Floating UI).
   The Blazor port positions the popup with plain CSS — the
   wrapper is the positioning context and the popup is absolutely
   placed on the requested edge with a flip happening at the
   viewport edge via `max-width` + scroll.
   ============================================================ */

.gup-tooltip {
  --gup-tooltip--arrow-size: var(--gup-component-3);
  --gup-tooltip--offset: var(--gup-component-2);

  position: relative;
  display: inline-block;
  vertical-align: top;
}

.gup-tooltip__trigger {
  display: inline-block;
}

.gup-tooltip__popup {
  position: absolute;
  z-index: 1000;
  display: block;
  /* Allow text to wrap naturally up to max-width. */
  width: max-content;
  max-width: var(--gup-tooltip--max-width, var(--gup-tooltip--max-width-fallback, 200px));
}

/* ── Placement edges ─────────────────────────────────────── */

.gup-tooltip--placement-bottom > .gup-tooltip__popup {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: var(--gup-tooltip--offset);
}

.gup-tooltip--placement-top > .gup-tooltip__popup {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: var(--gup-tooltip--offset);
}

.gup-tooltip--placement-left > .gup-tooltip__popup {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: var(--gup-tooltip--offset);
}

.gup-tooltip--placement-right > .gup-tooltip__popup {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: var(--gup-tooltip--offset);
}

/* RTL inline reflection for left/right. */
[dir="rtl"] .gup-tooltip--placement-left > .gup-tooltip__popup {
  right: auto;
  left: 100%;
  margin-right: 0;
  margin-left: var(--gup-tooltip--offset);
}

[dir="rtl"] .gup-tooltip--placement-right > .gup-tooltip__popup {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: var(--gup-tooltip--offset);
}

/* ── Content card ────────────────────────────────────────── */

.gup-tooltip__content {
  display: flex;
  flex-direction: column;
  gap: var(--gup-component-2);
  overflow: auto;
  background: var(--gup-color-background-elevated-container);
  border: 1px solid var(--gup-color-border-low);
  box-shadow:
    0 8px 16px 0 var(--gup-color-shadow-color-3),
    0 4px 8px 0 var(--gup-color-shadow-color-2),
    0 1.5px 3px 0 var(--gup-color-shadow-color-1),
    0 0.5px 1px 0 var(--gup-color-shadow-color-1);
  border-radius: var(--gup-radius-component-default);
  padding: var(--gup-padding-sm);
  max-height: var(--gup-tooltip--max-height, var(--gup-tooltip--max-height-fallback, 150px));
  position: relative;
}

.gup-tooltip__content:focus {
  outline: none;
}

.gup-tooltip__title {
  margin: 0;
  color: var(--gup-color-content-primary);
  font-size: var(--font-size-300);
  line-height: 20px;
  font-weight: 600;
}

.gup-tooltip__hint {
  color: var(--gup-color-content-secondary);
  font-size: var(--font-size-200);
}

/* ── Arrow ───────────────────────────────────────────────── */

.gup-tooltip__arrow {
  position: absolute;
  width: var(--gup-tooltip--arrow-size);
  height: var(--gup-tooltip--arrow-size);
  background: var(--gup-color-background-elevated-container);
  border: 1px solid var(--gup-color-border-low);
  border-bottom: none;
  border-inline-end: none;
  z-index: 1;
}

.gup-tooltip--placement-bottom > .gup-tooltip__popup > .gup-tooltip__arrow {
  top: calc(var(--gup-tooltip--arrow-size) / -2);
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.gup-tooltip--placement-top > .gup-tooltip__popup > .gup-tooltip__arrow {
  bottom: calc(var(--gup-tooltip--arrow-size) / -2);
  left: 50%;
  transform: translateX(-50%) rotate(-135deg);
}

.gup-tooltip--placement-left > .gup-tooltip__popup > .gup-tooltip__arrow {
  right: calc(var(--gup-tooltip--arrow-size) / -2);
  top: 50%;
  transform: translateY(-50%) rotate(135deg);
}

.gup-tooltip--placement-right > .gup-tooltip__popup > .gup-tooltip__arrow {
  left: calc(var(--gup-tooltip--arrow-size) / -2);
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* ============================================================
   COMPONENT: gup-data-table
   Ported from design-system/components/data-table/data-table.css.
   Shadow-DOM constructs are re-targeted for Blazor:
     :host / .data-table            → .gup-data-table
     ::part(field-inner-wrapper|input-wrapper|input)
                                    → the real inner classes of
                                      GupInputField / GupDropdownField
     ::slotted(gup-badge-chip[...]) → .gup-badge-chip--* modifier classes
   The .data-table--stacked block becomes the (max-width: 639px) media query
   that .gup-table--responsive already uses, so the controls and the table
   collapse together.
   ============================================================ */

.gup-data-table {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-content-to-cta, 32px);
  width: 100%;
  background: var(--gup-color-background-canvas, #fefcf9);
  padding: var(--gup-spacing-component-default, 12px) var(--gup-spacing-between-content, 24px);
}

.gup-data-table .gup-button .button {
  border-radius: var(--gup-radius-button, 8px);
}

.gup-data-table .data-table-header {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-component-default, 12px);
}

.gup-data-table .title {
  margin: 0;
  font-family: 'Readex Pro', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -0.48px;
  color: var(--gup-color-content-primary, #27272a);
}

.gup-data-table .description {
  margin: 0;
  font-family: 'Readex Pro', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--gup-color-content-secondary, #52525b);
}

.gup-data-table .table-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-form-fields, 20px);
  position: relative;
  width: 100%;
}

.gup-data-table .table-content-wrapper--empty {
  flex: 1;
}

.gup-data-table .table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.gup-data-table .table-controls-left {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-text-to-component, 12px);
  flex: 1;
  min-width: 0;
}

.gup-data-table .table-controls-right {
  display: flex;
  gap: var(--gup-spacing-component-default, 12px);
  align-items: center;
  position: relative;
}

/* --- Search --- */

.gup-data-table .search-container {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-component-default, 12px);
  width: 520px;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.gup-data-table .search-input {
  width: 100%;
  position: relative;
  z-index: 1;
}

.gup-data-table .search-input .field-inner-wrapper {
  border: 1px solid var(--gup-color-states-base-border, #7a7a83);
  border-radius: var(--gup-radius-component-default, 8px);
  padding: var(--gup-component-3, 8px) var(--gup-component-4, 12px);
  gap: var(--gup-component-4, 12px);
  background-color: var(--gup-color-states-base-bg, #ffffff);
}

.gup-data-table .search-input .input-wrapper {
  background-color: var(--gup-color-states-base-bg, #ffffff);
}

.gup-data-table .search-input .input {
  font-family: 'Readex Pro', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  background-color: var(--gup-color-states-base-bg, #ffffff);
  color: var(--gup-color-content-primary, #27272a);
}

.gup-data-table .search-input .input::placeholder {
  color: var(--gup-color-content-tertiary, #7a7a83);
}

.gup-data-table .search-container .gup-icon {
  --gup-icon--fill-color: var(--gup-color-content-secondary, #52525b);
}

.gup-data-table .results-count {
  font-size: var(--font-size-400, 14px);
  line-height: var(--line-height-600, 20px);
  color: var(--gup-color-content-tertiary, #7a7a83);
}

/* --- Filter button + panel --- */

.gup-data-table .button-group-container {
  display: flex;
  gap: var(--gup-spacing-component-default, 12px);
  align-items: center;
  padding: 0;
  position: relative;
}

.gup-data-table .filter-toggle {
  display: flex;
}

/* The Lit rule set the gradient on <gup-button> itself; here it targets the real
   inner <button> so it wins over the appearance background. */
.gup-data-table .filter-button-active .gup-button .button {
  background: linear-gradient(
      0deg,
      var(--gup-color-states-primary-active, rgb(26 26 26 / 70%)) 0%,
      var(--gup-color-states-primary-active, rgb(26 26 26 / 70%)) 100%
    ),
    var(--gup-color-brand-medium, #2f57cd);
}

.gup-data-table .filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 350px;
  background: var(--gup-color-states-base-bg, #ffffff);
  border-radius: var(--gup-radius-component-default, 8px);
  box-shadow:
    0 1px 2px 0 rgb(28 33 51 / 2%),
    0 3px 6px 0 rgb(28 33 51 / 3%),
    0 8px 16px 0 rgb(28 33 51 / 4%),
    0 16px 32px 0 rgb(28 33 51 / 6%);
  z-index: 100;
  /* The source sets overflow: hidden. That clipped the menu of a Select filter,
     which renders a real GupDropdownField here rather than the source's text input. */
  overflow: visible;
}

.gup-data-table .filter-panel-content {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-content, 24px);
  padding: var(--gup-spacing-between-content, 24px);
}

.gup-data-table .filter-field {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-component-default, 12px);
  position: relative;
  z-index: 1;
}

.gup-data-table .filter-field .gup-input-field .input-wrapper,
.gup-data-table .filter-field .gup-dropdown-field .input-wrapper {
  background-color: var(--gup-color-states-base-bg, #ffffff);
}

.gup-data-table .filter-field .gup-input-field .input,
.gup-data-table .filter-field .gup-dropdown-field .input {
  background-color: var(--gup-color-states-base-bg, #ffffff);
  color: var(--gup-color-content-primary, #27272a);
}

.gup-data-table .filter-label {
  font-family: 'Readex Pro', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--gup-color-content-primary, #27272a);
}

.gup-data-table .filter-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--gup-spacing-between-items, 8px);
  padding: var(--gup-spacing-between-text, 16px) var(--gup-spacing-between-content, 24px);
  border-top: 1px solid var(--gup-color-border-low, #d9d9d9);
}

/* --- Applied filter chips --- */

.gup-data-table .applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gup-spacing-between-items, 8px);
  align-items: center;
}

/* --- Empty state --- */

.gup-data-table .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 300px;
  text-align: center;
  gap: 8px;
}

.gup-data-table .empty-state-title {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.4px;
  color: var(--gup-color-content-secondary, #52525b);
  margin: 0;
}

.gup-data-table .empty-state-description {
  font-family: 'Readex Pro', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--gup-color-content-secondary, #52525b);
  margin: 0;
  max-width: 335px;
}

/* --- Pagination footer --- */

.gup-data-table .pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gup-spacing-component-default, 12px);
  width: 100%;
}

.gup-data-table .items-info {
  font-family: 'Readex Pro', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--gup-color-content-secondary, #52525b);
  white-space: nowrap;
}

/* --- Badge chips inside the table (was ::slotted) --- */

.gup-data-table .gup-badge-chip--positive {
  background: var(--gup-color-positive-xlow);
  border: 1px solid var(--gup-color-positive-low);
  color: var(--gup-color-positive-xhigh);
}

.gup-data-table .gup-badge-chip--warning {
  background: var(--gup-color-warning-low);
  color: var(--gup-color-warning-xhigh);
}

.gup-data-table .gup-badge-chip--negative.gup-badge-chip--filled {
  background: var(--gup-color-negative-high);
  color: var(--gup-color-negative-contrast);
}

.gup-data-table .gup-badge-chip--brand {
  background: var(--gup-color-brand-xlow);
  border: 1px solid var(--gup-color-brand-low);
  color: var(--gup-color-brand-xhigh);
}

.gup-data-table .gup-badge-chip--neutral {
  background: var(--gup-color-neutral-contrast);
  border: 1px solid var(--gup-color-neutral-low);
  color: var(--gup-color-neutral-high);
}

/* --- Mobile control stack ---
   One markup tree: the desktop controls and the mobile stack are both rendered
   and swapped by the media query below (was _renderDesktopLayout /
   _renderMobileLayout in the Lit component). */

.gup-data-table .mobile-filters {
  display: none;
  flex-direction: column;
  gap: var(--gup-spacing-between-text, 16px);
  width: 100%;
}

.gup-data-table .mobile-filter-panel {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-component-default, 12px);
  width: 100%;
}

.gup-data-table .mobile-filter-panel-content {
  display: flex;
  flex-direction: column;
  gap: var(--gup-spacing-between-form-fields, 20px);
  padding: var(--gup-padding-xs, 8px) 0 var(--gup-padding-xs, 8px) var(--gup-spacing-between-content, 24px);
  border-inline-start: 4px solid var(--gup-color-neutral-medium, #3f3f46);
}

.gup-data-table .mobile-filters-button--active .gup-button .button {
  background: linear-gradient(
      0deg,
      var(--gup-color-states-primary-active, rgb(26 26 26 / 70%)) 0%,
      var(--gup-color-states-primary-active, rgb(26 26 26 / 70%)) 100%
    ),
    var(--gup-color-brand-medium, #2f57cd);
  color: var(--gup-color-brand-contrast, #ffffff);
}

/* Same breakpoint as .gup-table--responsive (see COMPONENT: gup-table) so the
   controls and the table collapse together. Do not introduce a second one. */
@media (max-width: 639px) {
  .gup-data-table {
    background: var(--gup-color-states-base-bg, #ffffff);
    padding: var(--gup-spacing-component-default, 12px) var(--gup-spacing-between-form-fields, 20px);
  }

  .gup-data-table .table-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--gup-spacing-between-text, 16px);
  }

  .gup-data-table .search-container {
    width: 100%;
    max-width: 100%;
  }

  .gup-data-table .table-controls-right {
    display: none;
  }

  .gup-data-table .mobile-filters {
    display: flex;
  }

  .gup-data-table .mobile-action-button,
  .gup-data-table .mobile-filters-button,
  .gup-data-table .mobile-action-button .gup-button,
  .gup-data-table .mobile-filters-button .gup-button,
  .gup-data-table .mobile-action-button .button,
  .gup-data-table .mobile-filters-button .button {
    width: 100%;
  }

  .gup-data-table .pagination-container {
    align-items: flex-start;
  }
}

/* ============================================================
   COMPONENT: gup-skip-link
   ============================================================
   Ported from design-system/components/skip-link/skip-link.css.
   The source hides :host via the screenreader-text mixin and reveals it on
   :focus-within; with no shadow root the anchor is the host, so the same two
   states map to .gup-skip-link and .gup-skip-link:focus.
*/

.gup-skip-link {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: none;
  white-space: nowrap;
}

.gup-skip-link:focus {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 100;
  overflow: visible;
  clip: auto;
  height: auto;
  width: 100%;
  margin: 0;
  padding: calc(var(--unit) * 3);
  background-color: var(--color-blue-700, #2c64b9);
  color: var(--color-grey-0, #ffffff);
  white-space: normal;
  text-align: start;
}

/* ============================================================
   COMPONENT: gup-flag
   ============================================================
   Ported from design-system/components/flag/flag.css.
   The source sets --aspect-ratio / --border-radius on :host per shape
   attribute; here the same tokens hang off the .gup-flag--* modifiers.
   Note the source declares 3/4 for the rectangle, which is portrait —
   the 4x3 artwork is landscape, so this uses 4/3.
*/

.gup-flag {
  display: block;
  width: auto;
}

.gup-flag--rectangle {
  --gup-flag--aspect-ratio: 4 / 3;
  --gup-flag--border-radius: 2px;
}

.gup-flag--circle {
  --gup-flag--aspect-ratio: 1;
  --gup-flag--border-radius: 51%;
}

.gup-flag__svg {
  display: block;
  height: 100%;
  width: auto;
  aspect-ratio: var(--gup-flag--aspect-ratio);
  border-radius: var(--gup-flag--border-radius);
  object-fit: cover;
}

@media (pointer: coarse) {
  .gup-dialog__close-button,
  .gup-flyout-close-button,
  .gup-toast .close-button,
  .gup-dropdown-clear-btn,
  .gup-input-field .input-end .input-affix-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .gup-details .inner summary.label {
    min-height: 44px;
  }

  .gup-toggle {
    min-height: 44px;
  }
}

/* ============================================================
   END OF BUNDLED STYLES
   ============================================================ */
