/* CXR App paneli (tahoe) — Growix tasarım sisteminden türetildi. ÜRETİLMİŞ DOSYA: scripts/build-v2-css.sh ile yeniden oluşturulur, elle değiştirilmez. Hub içerik köprüsü: tx-skin.css */
/* Growix tasarım sistemi — tokenlar. Kaynak: resources/design-lab/final/css/00-tokens.css (onaylı mockup);
   token blokları (açık / koyu / kontrast / saydamlık) düz seçicilere açılmış haliyle aynen taşındı.
   Bağlayıcı kurallar: docs/DESIGN_SYSTEM.md · uygulama kullanımı: docs/UI.md */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* type — system font stack: the platform's own UI typeface renders natively and applies its own optical tracking,
     so components never add letter-spacing on top */
  --gx-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  --gx-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Growix panel scale = the platform's "Small" text-size step (body 15), one step above the 13 px desktop default.
     Nothing is smaller than 12 px. */
  --gx-fs-display: 40px; --gx-lh-display: 44px;   /* gauge number */
  --gx-fs-large: 32px;   --gx-lh-large: 39px;     /* KPI values, login title */
  --gx-fs-title1: 26px;  --gx-lh-title1: 32px;    /* page title */
  --gx-fs-title2: 20px;  --gx-lh-title2: 25px;    /* sheet title, firm name, legend values */
  --gx-fs-title3: 18px;  --gx-lh-title3: 23px;    /* card title */
  --gx-fs-body: 15px;    --gx-lh-body: 20px;      /* body, controls, table cells, sidebar */
  --gx-fs-callout: 14px; --gx-lh-callout: 19px;   /* dense secondary rows */
  --gx-fs-sub: 13px;     --gx-lh-sub: 18px;       /* secondary text, captions, column headers */
  --gx-fs-caption: 12px; --gx-lh-caption: 16px;   /* floor: axis labels, counters, key hints */
  --gx-fs-min: 12px;                               /* never go below this */

  /* spacing — 4 / 8 scale (05, 15, 25 are optical half-steps) */
  --gx-s05: 2px; --gx-s1: 4px; --gx-s15: 6px; --gx-s2: 8px; --gx-s25: 10px; --gx-s3: 12px;
  --gx-s4: 16px; --gx-s5: 20px; --gx-s6: 24px; --gx-s8: 32px; --gx-s10: 40px; --gx-s12: 48px;

  /* radii — concentric: outer − padding = inner */
  --gx-r-sheet: 28px;
  --gx-r-panel: 24px;
  --gx-r-card: 22px;
  --gx-r-control: 14px;
  --gx-r-row: 10px;
  --gx-r-small: 8px;
  --gx-r-pill: 999px;

  /* metrics (re-pointed for touch in section 6) */
  --gx-inset: 8px;            /* gap between floating glass and the window edge */
  --gx-sidebar-w: 280px;
  --gx-inspector-w: 344px;
  --gx-gutter: 24px;
  --gx-bar-h: 72px;           /* toolbar zone */
  --gx-control-h: 40px;       /* glass capsules, large buttons */
  --gx-btn-h: 32px;           /* regular button, in-content segmented control */
  --gx-btn-sm-h: 28px;        /* small button (desktop minimum hit size) */
  --gx-field-h: 44px;         /* grouped form rows */
  --gx-input-h: 36px;         /* standalone text field, select */
  --gx-row-h: 34px;           /* sidebar row */
  --gx-list-row-h: 56px;      /* two-line list row */
  --gx-table-row-h: 44px;
  --gx-hit: 32px;             /* icon button */
  --gx-ico: 24px;             /* squircle tile, default */
  --gx-avatar: 28px;

  /* motion */
  --gx-ease: cubic-bezier(.2, .8, .2, 1);
  --gx-dur: .28s;
  --gx-dur-fast: .14s;

  /* brand — official Growix yellow (brand pack v2.2) lives in the Growix icon / wordmark files and nowhere else in the
     panel (accent stays Apple system blue). Yellow is a fill / mark colour only; brand-toned text uses --gx-brand-ink. */
  --gx-brand: #F2C400;
  --gx-brand-ink: #756000;

  /* system colours */
  --gx-blue: #007AFF;
  --gx-red: #FF3B30;
  --gx-orange: #FF9500;
  --gx-yellow: #FFCC00;
  --gx-green: #34C759;
  --gx-mint: #00C7BE;
  --gx-teal: #30B0C7;
  --gx-cyan: #32ADE6;
  --gx-indigo: #5856D6;
  --gx-purple: #AF52DE;
  --gx-pink: #FF2D55;
  --gx-brown: #A2845E;
  --gx-gray: #8E8E93;

  /* text-safe variants (>= 4.5:1 on surface and on their own tint) */
  --gx-blue-text: #005FCC;
  --gx-red-text: #C4001A;
  --gx-orange-text: #AD3A00;
  --gx-yellow-text: #7A5A00;
  --gx-green-text: #1B7532;
  --gx-mint-text: #0A726D;
  --gx-teal-text: #007086;
  --gx-cyan-text: #006C9E;
  --gx-indigo-text: #3634A3;
  --gx-purple-text: #8944AB;
  --gx-pink-text: #C40E41;
  --gx-brown-text: #735A3C;
  --gx-gray-text: #5B5B63;

  /* deep variants: fills that carry white text (monograms, avatars, filled badges) */
  --gx-blue-deep: #0058C2;
  --gx-red-deep: #B3140D;
  --gx-orange-deep: #A83A00;
  --gx-yellow-deep: #6E5200;
  --gx-green-deep: #1B7231;
  --gx-mint-deep: #086E69;
  --gx-teal-deep: #006B80;
  --gx-cyan-deep: #00618F;
  --gx-indigo-deep: #3F3DB8;
  --gx-purple-deep: #7C3AA0;
  --gx-pink-deep: #B80C3B;
  --gx-brown-deep: #6E5435;
  --gx-gray-deep: #55555C;

  /* accent */
  --gx-accent: var(--gx-blue);              /* glyphs, ticks, focus ring, chart series 1 */
  --gx-accent-text: var(--gx-blue-text);    /* links, tinted labels */
  --gx-accent-fill: #0071E3;                /* behind white labels: 4.70:1 */
  --gx-accent-fill-hover: #0064CC;
  --gx-on-accent: #FFFFFF;
  --gx-danger-fill: #D1242B;                /* destructive buttons, counters */
  --gx-tab-on: var(--gx-blue-text);         /* selected tab label on the phone tab bar */
  --gx-firm: var(--gx-blue);                /* selected firm's colour, fed from data; tints the canvas behind the toolbar */

  /* chart series — fixed categorical order; each series also has its own dash pattern and marker shape */
  --gx-series-1: var(--gx-blue);
  --gx-series-2: var(--gx-pink);
  --gx-series-3: var(--gx-mint);
  --gx-series-4: var(--gx-orange);
  --gx-series-5: var(--gx-purple);
  --gx-series-6: var(--gx-gray);

  /* labels, separators, fills */
  --gx-label: #0B0B0F;
  --gx-label-2: rgba(50, 50, 58, .82);
  --gx-label-3: rgba(60, 60, 67, .52);      /* glyphs and decoration only, never text */
  --gx-sep: rgba(60, 60, 67, .14);
  --gx-sep-strong: rgba(60, 60, 67, .26);
  --gx-fill-1: rgba(120, 120, 128, .20);
  --gx-fill-2: rgba(120, 120, 128, .16);
  --gx-fill-3: rgba(118, 118, 128, .12);
  --gx-fill-4: rgba(116, 116, 128, .08);
  --gx-hover: rgba(60, 60, 80, .06);
  --gx-pressed: rgba(60, 60, 80, .12);
  --gx-selection: rgba(60, 60, 80, .12);    /* sidebar + list selection (neutral) */
  --gx-selection-rim: rgba(16, 24, 48, .06);
  --gx-stripe: rgba(60, 60, 80, .035);      /* alternating table rows */
  --gx-tint-a: 12%;                         /* strength of a colour tint behind text-safe labels */
  --gx-scrim: rgba(10, 14, 30, .28);
  --gx-focus: rgba(0, 122, 255, .62);

  /* content layer */
  --gx-canvas: #ECEEF5;
  --gx-surface: rgba(255, 255, 255, .86);
  --gx-surface-solid: #FFFFFF;
  --gx-surface-inset: rgba(116, 116, 128, .07);
  --gx-field: rgba(255, 255, 255, .92);
  --gx-field-rim: rgba(16, 24, 48, .16);
  --gx-thumb: rgba(255, 255, 255, .96);
  --gx-thumb-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .14);
  --gx-card-rim: inset 0 1px 0 rgba(255, 255, 255, .9);
  --gx-shadow-card: 0 0 0 .5px rgba(20, 24, 40, .07), 0 1px 2px rgba(20, 24, 40, .04), 0 10px 28px -12px rgba(20, 24, 40, .14);
  --gx-shadow-raised: 0 0 0 .5px rgba(20, 24, 40, .08), 0 2px 4px rgba(20, 24, 40, .05), 0 18px 36px -18px rgba(16, 24, 48, .30);
  --gx-shadow-pop: 0 0 0 .5px rgba(16, 24, 48, .12), 0 30px 80px -10px rgba(16, 24, 48, .38);

  /* ambient canvas glows — the colour the glass picks up */
  --gx-glow-firm: 30%;                      /* how much of --gx-firm the top-left glow carries */
  --gx-glow-2: rgba(175, 82, 222, .24);
  --gx-glow-3: rgba(255, 45, 85, .16);
  --gx-glow-4: rgba(48, 176, 199, .30);
  --gx-glow-5: rgba(88, 86, 214, .28);

  /* functional layer — Liquid Glass approximation */
  --gx-glass-filter: blur(28px) saturate(180%) brightness(1.1);          /* sidebar */
  --gx-glass-filter-control: blur(18px) saturate(190%) brightness(1.1);  /* toolbar capsules, tab bar */
  --gx-glass-filter-thick: blur(40px) saturate(180%) brightness(1.06);   /* menus, sheets, alerts */
  --gx-edge-filter: blur(14px) saturate(150%);                           /* scroll-edge effect */
  --gx-glass-regular: rgba(250, 251, 255, .58);
  --gx-glass-control: rgba(255, 255, 255, .46);
  --gx-glass-thick: rgba(248, 248, 251, .86);
  --gx-material-pane: rgba(246, 247, 251, .90);    /* standard material: edge-attached inspector */
  --gx-glass-login: rgba(255, 255, 255, .56);
  --gx-glass-bar: rgba(255, 255, 255, .80);         /* phone tab bar: content passes under it with no scroll-edge wash, so it is more opaque */
  --gx-glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 42%);
  --gx-glass-inner: inset 0 0 0 1px rgba(255, 255, 255, .30), inset 0 0 22px rgba(255, 255, 255, .34);
  --gx-rim-hi: rgba(255, 255, 255, .95);
  --gx-rim-lo: rgba(255, 255, 255, .38);
  --gx-rim-mid: rgba(255, 255, 255, .72);
  --gx-glass-shadow: 0 0 0 .5px rgba(16, 24, 48, .08), 0 1px 2px rgba(16, 24, 48, .05), 0 18px 48px -12px rgba(16, 24, 48, .26);
  --gx-control-shadow: 0 0 0 .5px rgba(16, 24, 48, .08), 0 1px 2px rgba(16, 24, 48, .06), 0 6px 18px -6px rgba(16, 24, 48, .20);
  --gx-lifted: rgba(255, 255, 255, .58);           /* lifted well on glass: firm switcher */
  --gx-lifted-hover: rgba(255, 255, 255, .80);
  --gx-lifted-rim: inset 0 0 0 .5px rgba(16, 24, 48, .09), 0 1px 2px rgba(16, 24, 48, .05);
  --gx-badge-ring: rgba(255, 255, 255, .92);
}

@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --gx-blue: #0A84FF;
  --gx-red: #FF453A;
  --gx-orange: #FF9F0A;
  --gx-yellow: #FFD60A;
  --gx-green: #30D158;
  --gx-mint: #63E6E2;
  --gx-teal: #40C8E0;
  --gx-cyan: #64D2FF;
  --gx-indigo: #5E5CE6;
  --gx-purple: #BF5AF2;
  --gx-pink: #FF375F;
  --gx-brown: #AC8E68;
  --gx-gray: #8E8E93;

  --gx-blue-text: #6CB4FF;
  --gx-red-text: #FF8A84;
  --gx-orange-text: #FFB340;
  --gx-yellow-text: #FFD60A;
  --gx-green-text: #30DB5B;
  --gx-mint-text: #66D4CF;
  --gx-teal-text: #5DE6FF;
  --gx-cyan-text: #70D7FF;
  --gx-indigo-text: #A9A7FF;
  --gx-purple-text: #DA8FFF;
  --gx-pink-text: #FF8FA6;
  --gx-brown-text: #D2B48C;
  --gx-gray-text: #B4B4BD;

  --gx-accent-fill: #0071E3;
  --gx-accent-fill-hover: #0064CC;
  --gx-danger-fill: #D1242B;

  --gx-label: #F5F5FA;
  --gx-label-2: rgba(235, 235, 245, .72);
  --gx-label-3: rgba(235, 235, 245, .42);
  --gx-sep: rgba(255, 255, 255, .10);
  --gx-sep-strong: rgba(255, 255, 255, .18);
  --gx-fill-1: rgba(120, 120, 128, .36);
  --gx-fill-2: rgba(120, 120, 128, .32);
  --gx-fill-3: rgba(118, 118, 128, .24);
  --gx-fill-4: rgba(118, 118, 128, .18);
  --gx-hover: rgba(255, 255, 255, .07);
  --gx-pressed: rgba(255, 255, 255, .13);
  --gx-selection: rgba(255, 255, 255, .14);
  --gx-selection-rim: rgba(255, 255, 255, .07);
  --gx-stripe: rgba(255, 255, 255, .035);
  --gx-tint-a: 20%;
  --gx-scrim: rgba(0, 0, 0, .54);
  --gx-focus: rgba(60, 150, 255, .78);

  --gx-canvas: #08080C;
  --gx-surface: rgba(40, 40, 47, .62);
  --gx-surface-solid: #1E1E22;
  --gx-surface-inset: rgba(255, 255, 255, .055);
  --gx-field: rgba(255, 255, 255, .07);
  --gx-field-rim: rgba(255, 255, 255, .16);
  --gx-thumb: rgba(255, 255, 255, .20);
  --gx-thumb-shadow: 0 0 0 .5px rgba(255, 255, 255, .08), 0 1px 3px rgba(0, 0, 0, .4);
  --gx-card-rim: inset 0 1px 0 rgba(255, 255, 255, .07);
  --gx-shadow-card: 0 0 0 .5px rgba(255, 255, 255, .09), 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .5);
  --gx-shadow-raised: 0 0 0 .5px rgba(255, 255, 255, .12), 0 2px 4px rgba(0, 0, 0, .3), 0 18px 36px -18px rgba(0, 0, 0, .7);
  --gx-shadow-pop: 0 0 0 .5px rgba(0, 0, 0, .7), 0 30px 80px -10px rgba(0, 0, 0, .75);

  --gx-glow-firm: 40%;
  --gx-glow-2: rgba(140, 70, 230, .30);
  --gx-glow-3: rgba(255, 55, 95, .16);
  --gx-glow-4: rgba(48, 176, 199, .26);
  --gx-glow-5: rgba(94, 92, 230, .34);

  --gx-glass-filter: blur(28px) saturate(180%) brightness(.7);
  --gx-glass-filter-control: blur(18px) saturate(190%) brightness(.7);
  --gx-glass-filter-thick: blur(40px) saturate(180%) brightness(.7);
  --gx-glass-regular: rgba(34, 34, 40, .62);
  --gx-glass-control: rgba(62, 62, 72, .54);
  --gx-glass-thick: rgba(42, 42, 48, .84);
  --gx-material-pane: rgba(26, 26, 31, .90);
  --gx-glass-login: rgba(26, 26, 32, .58);
  --gx-glass-bar: rgba(44, 44, 52, .84);
  --gx-tab-on: #8CC4FF;
  --gx-glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 42%);
  --gx-glass-inner: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 0 22px rgba(255, 255, 255, .035);
  --gx-rim-hi: rgba(255, 255, 255, .42);
  --gx-rim-lo: rgba(255, 255, 255, .09);
  --gx-rim-mid: rgba(255, 255, 255, .22);
  --gx-glass-shadow: 0 0 0 .5px rgba(0, 0, 0, .65), 0 1px 2px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .65);
  --gx-control-shadow: 0 0 0 .5px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -6px rgba(0, 0, 0, .55);
  --gx-lifted: rgba(255, 255, 255, .07);
  --gx-lifted-hover: rgba(255, 255, 255, .12);
  --gx-lifted-rim: inset 0 0 0 .5px rgba(255, 255, 255, .10), 0 1px 2px rgba(0, 0, 0, .2);
  --gx-badge-ring: rgba(40, 40, 46, .92);
}
}
:root[data-theme="dark"] {
  --gx-blue: #0A84FF;
  --gx-red: #FF453A;
  --gx-orange: #FF9F0A;
  --gx-yellow: #FFD60A;
  --gx-green: #30D158;
  --gx-mint: #63E6E2;
  --gx-teal: #40C8E0;
  --gx-cyan: #64D2FF;
  --gx-indigo: #5E5CE6;
  --gx-purple: #BF5AF2;
  --gx-pink: #FF375F;
  --gx-brown: #AC8E68;
  --gx-gray: #8E8E93;

  --gx-blue-text: #6CB4FF;
  --gx-red-text: #FF8A84;
  --gx-orange-text: #FFB340;
  --gx-yellow-text: #FFD60A;
  --gx-green-text: #30DB5B;
  --gx-mint-text: #66D4CF;
  --gx-teal-text: #5DE6FF;
  --gx-cyan-text: #70D7FF;
  --gx-indigo-text: #A9A7FF;
  --gx-purple-text: #DA8FFF;
  --gx-pink-text: #FF8FA6;
  --gx-brown-text: #D2B48C;
  --gx-gray-text: #B4B4BD;

  --gx-accent-fill: #0071E3;
  --gx-accent-fill-hover: #0064CC;
  --gx-danger-fill: #D1242B;

  --gx-label: #F5F5FA;
  --gx-label-2: rgba(235, 235, 245, .72);
  --gx-label-3: rgba(235, 235, 245, .42);
  --gx-sep: rgba(255, 255, 255, .10);
  --gx-sep-strong: rgba(255, 255, 255, .18);
  --gx-fill-1: rgba(120, 120, 128, .36);
  --gx-fill-2: rgba(120, 120, 128, .32);
  --gx-fill-3: rgba(118, 118, 128, .24);
  --gx-fill-4: rgba(118, 118, 128, .18);
  --gx-hover: rgba(255, 255, 255, .07);
  --gx-pressed: rgba(255, 255, 255, .13);
  --gx-selection: rgba(255, 255, 255, .14);
  --gx-selection-rim: rgba(255, 255, 255, .07);
  --gx-stripe: rgba(255, 255, 255, .035);
  --gx-tint-a: 20%;
  --gx-scrim: rgba(0, 0, 0, .54);
  --gx-focus: rgba(60, 150, 255, .78);

  --gx-canvas: #08080C;
  --gx-surface: rgba(40, 40, 47, .62);
  --gx-surface-solid: #1E1E22;
  --gx-surface-inset: rgba(255, 255, 255, .055);
  --gx-field: rgba(255, 255, 255, .07);
  --gx-field-rim: rgba(255, 255, 255, .16);
  --gx-thumb: rgba(255, 255, 255, .20);
  --gx-thumb-shadow: 0 0 0 .5px rgba(255, 255, 255, .08), 0 1px 3px rgba(0, 0, 0, .4);
  --gx-card-rim: inset 0 1px 0 rgba(255, 255, 255, .07);
  --gx-shadow-card: 0 0 0 .5px rgba(255, 255, 255, .09), 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .5);
  --gx-shadow-raised: 0 0 0 .5px rgba(255, 255, 255, .12), 0 2px 4px rgba(0, 0, 0, .3), 0 18px 36px -18px rgba(0, 0, 0, .7);
  --gx-shadow-pop: 0 0 0 .5px rgba(0, 0, 0, .7), 0 30px 80px -10px rgba(0, 0, 0, .75);

  --gx-glow-firm: 40%;
  --gx-glow-2: rgba(140, 70, 230, .30);
  --gx-glow-3: rgba(255, 55, 95, .16);
  --gx-glow-4: rgba(48, 176, 199, .26);
  --gx-glow-5: rgba(94, 92, 230, .34);

  --gx-glass-filter: blur(28px) saturate(180%) brightness(.7);
  --gx-glass-filter-control: blur(18px) saturate(190%) brightness(.7);
  --gx-glass-filter-thick: blur(40px) saturate(180%) brightness(.7);
  --gx-glass-regular: rgba(34, 34, 40, .62);
  --gx-glass-control: rgba(62, 62, 72, .54);
  --gx-glass-thick: rgba(42, 42, 48, .84);
  --gx-material-pane: rgba(26, 26, 31, .90);
  --gx-glass-login: rgba(26, 26, 32, .58);
  --gx-glass-bar: rgba(44, 44, 52, .84);
  --gx-tab-on: #8CC4FF;
  --gx-glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 42%);
  --gx-glass-inner: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 0 22px rgba(255, 255, 255, .035);
  --gx-rim-hi: rgba(255, 255, 255, .42);
  --gx-rim-lo: rgba(255, 255, 255, .09);
  --gx-rim-mid: rgba(255, 255, 255, .22);
  --gx-glass-shadow: 0 0 0 .5px rgba(0, 0, 0, .65), 0 1px 2px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .65);
  --gx-control-shadow: 0 0 0 .5px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -6px rgba(0, 0, 0, .55);
  --gx-lifted: rgba(255, 255, 255, .07);
  --gx-lifted-hover: rgba(255, 255, 255, .12);
  --gx-lifted-rim: inset 0 0 0 .5px rgba(255, 255, 255, .10), 0 1px 2px rgba(0, 0, 0, .2);
  --gx-badge-ring: rgba(40, 40, 46, .92);
}

/* Increase Contrast: stronger labels, visible borders, near-opaque materials, darker accent */
@media (prefers-contrast: more) {
:root {
  --gx-label: #000000;
  --gx-label-2: rgba(0, 0, 0, .86);
  --gx-label-3: rgba(0, 0, 0, .66);
  --gx-sep: rgba(0, 0, 0, .42);
  --gx-sep-strong: rgba(0, 0, 0, .62);
  --gx-field-rim: rgba(0, 0, 0, .62);
  --gx-selection: rgba(0, 0, 0, .18);
  --gx-selection-rim: rgba(0, 0, 0, .7);
  --gx-stripe: rgba(0, 0, 0, .06);
  --gx-surface: #FFFFFF;
  --gx-glass-regular: rgba(255, 255, 255, .95);
  --gx-glass-control: rgba(255, 255, 255, .96);
  --gx-glass-thick: rgba(255, 255, 255, .98);
  --gx-material-pane: #FFFFFF;
  --gx-rim-hi: rgba(0, 0, 0, .5);
  --gx-rim-lo: rgba(0, 0, 0, .5);
  --gx-rim-mid: rgba(0, 0, 0, .5);
  --gx-accent-fill: #0040DD;
  --gx-accent-fill-hover: #0A4CE8;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #0040DD;
  --gx-tab-on: #0040DD;
  --gx-glass-login: rgba(255, 255, 255, .96);
  --gx-glass-bar: rgba(255, 255, 255, .97);
  --gx-focus: #0040DD;
  --gx-shadow-card: 0 0 0 1px rgba(0, 0, 0, .5);
}
}
:root[data-contrast="more"] {
  --gx-label: #000000;
  --gx-label-2: rgba(0, 0, 0, .86);
  --gx-label-3: rgba(0, 0, 0, .66);
  --gx-sep: rgba(0, 0, 0, .42);
  --gx-sep-strong: rgba(0, 0, 0, .62);
  --gx-field-rim: rgba(0, 0, 0, .62);
  --gx-selection: rgba(0, 0, 0, .18);
  --gx-selection-rim: rgba(0, 0, 0, .7);
  --gx-stripe: rgba(0, 0, 0, .06);
  --gx-surface: #FFFFFF;
  --gx-glass-regular: rgba(255, 255, 255, .95);
  --gx-glass-control: rgba(255, 255, 255, .96);
  --gx-glass-thick: rgba(255, 255, 255, .98);
  --gx-material-pane: #FFFFFF;
  --gx-rim-hi: rgba(0, 0, 0, .5);
  --gx-rim-lo: rgba(0, 0, 0, .5);
  --gx-rim-mid: rgba(0, 0, 0, .5);
  --gx-accent-fill: #0040DD;
  --gx-accent-fill-hover: #0A4CE8;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #0040DD;
  --gx-tab-on: #0040DD;
  --gx-glass-login: rgba(255, 255, 255, .96);
  --gx-glass-bar: rgba(255, 255, 255, .97);
  --gx-focus: #0040DD;
  --gx-shadow-card: 0 0 0 1px rgba(0, 0, 0, .5);
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --gx-label: #FFFFFF;
  --gx-label-2: rgba(255, 255, 255, .88);
  --gx-label-3: rgba(255, 255, 255, .70);
  --gx-sep: rgba(255, 255, 255, .42);
  --gx-sep-strong: rgba(255, 255, 255, .62);
  --gx-field-rim: rgba(255, 255, 255, .62);
  --gx-selection: rgba(255, 255, 255, .26);
  --gx-selection-rim: rgba(255, 255, 255, .8);
  --gx-stripe: rgba(255, 255, 255, .07);
  --gx-surface: #1E1E22;
  --gx-glass-regular: rgba(22, 22, 26, .95);
  --gx-glass-control: rgba(40, 40, 46, .96);
  --gx-glass-thick: rgba(30, 30, 34, .98);
  --gx-material-pane: #18181C;
  --gx-rim-hi: rgba(255, 255, 255, .6);
  --gx-rim-lo: rgba(255, 255, 255, .6);
  --gx-rim-mid: rgba(255, 255, 255, .6);
  --gx-accent-fill: #0050D8;
  --gx-accent-fill-hover: #0A5CE6;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #8CC4FF;
  --gx-tab-on: #B8DBFF;
  --gx-glass-login: rgba(22, 22, 26, .96);
  --gx-glass-bar: rgba(34, 34, 40, .97);
  --gx-focus: #8CC4FF;
  --gx-shadow-card: 0 0 0 1px rgba(255, 255, 255, .5);
}
}
@media (prefers-contrast: more) {
:root[data-theme="dark"] {
  --gx-label: #FFFFFF;
  --gx-label-2: rgba(255, 255, 255, .88);
  --gx-label-3: rgba(255, 255, 255, .70);
  --gx-sep: rgba(255, 255, 255, .42);
  --gx-sep-strong: rgba(255, 255, 255, .62);
  --gx-field-rim: rgba(255, 255, 255, .62);
  --gx-selection: rgba(255, 255, 255, .26);
  --gx-selection-rim: rgba(255, 255, 255, .8);
  --gx-stripe: rgba(255, 255, 255, .07);
  --gx-surface: #1E1E22;
  --gx-glass-regular: rgba(22, 22, 26, .95);
  --gx-glass-control: rgba(40, 40, 46, .96);
  --gx-glass-thick: rgba(30, 30, 34, .98);
  --gx-material-pane: #18181C;
  --gx-rim-hi: rgba(255, 255, 255, .6);
  --gx-rim-lo: rgba(255, 255, 255, .6);
  --gx-rim-mid: rgba(255, 255, 255, .6);
  --gx-accent-fill: #0050D8;
  --gx-accent-fill-hover: #0A5CE6;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #8CC4FF;
  --gx-tab-on: #B8DBFF;
  --gx-glass-login: rgba(22, 22, 26, .96);
  --gx-glass-bar: rgba(34, 34, 40, .97);
  --gx-focus: #8CC4FF;
  --gx-shadow-card: 0 0 0 1px rgba(255, 255, 255, .5);
}
}
@media (prefers-color-scheme: dark) {
:root[data-contrast="more"]:not([data-theme="light"]) {
  --gx-label: #FFFFFF;
  --gx-label-2: rgba(255, 255, 255, .88);
  --gx-label-3: rgba(255, 255, 255, .70);
  --gx-sep: rgba(255, 255, 255, .42);
  --gx-sep-strong: rgba(255, 255, 255, .62);
  --gx-field-rim: rgba(255, 255, 255, .62);
  --gx-selection: rgba(255, 255, 255, .26);
  --gx-selection-rim: rgba(255, 255, 255, .8);
  --gx-stripe: rgba(255, 255, 255, .07);
  --gx-surface: #1E1E22;
  --gx-glass-regular: rgba(22, 22, 26, .95);
  --gx-glass-control: rgba(40, 40, 46, .96);
  --gx-glass-thick: rgba(30, 30, 34, .98);
  --gx-material-pane: #18181C;
  --gx-rim-hi: rgba(255, 255, 255, .6);
  --gx-rim-lo: rgba(255, 255, 255, .6);
  --gx-rim-mid: rgba(255, 255, 255, .6);
  --gx-accent-fill: #0050D8;
  --gx-accent-fill-hover: #0A5CE6;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #8CC4FF;
  --gx-tab-on: #B8DBFF;
  --gx-glass-login: rgba(22, 22, 26, .96);
  --gx-glass-bar: rgba(34, 34, 40, .97);
  --gx-focus: #8CC4FF;
  --gx-shadow-card: 0 0 0 1px rgba(255, 255, 255, .5);
}
}
:root[data-theme="dark"][data-contrast="more"] {
  --gx-label: #FFFFFF;
  --gx-label-2: rgba(255, 255, 255, .88);
  --gx-label-3: rgba(255, 255, 255, .70);
  --gx-sep: rgba(255, 255, 255, .42);
  --gx-sep-strong: rgba(255, 255, 255, .62);
  --gx-field-rim: rgba(255, 255, 255, .62);
  --gx-selection: rgba(255, 255, 255, .26);
  --gx-selection-rim: rgba(255, 255, 255, .8);
  --gx-stripe: rgba(255, 255, 255, .07);
  --gx-surface: #1E1E22;
  --gx-glass-regular: rgba(22, 22, 26, .95);
  --gx-glass-control: rgba(40, 40, 46, .96);
  --gx-glass-thick: rgba(30, 30, 34, .98);
  --gx-material-pane: #18181C;
  --gx-rim-hi: rgba(255, 255, 255, .6);
  --gx-rim-lo: rgba(255, 255, 255, .6);
  --gx-rim-mid: rgba(255, 255, 255, .6);
  --gx-accent-fill: #0050D8;
  --gx-accent-fill-hover: #0A5CE6;
  --gx-danger-fill: #B00020;
  --gx-blue-text: #8CC4FF;
  --gx-tab-on: #B8DBFF;
  --gx-glass-login: rgba(22, 22, 26, .96);
  --gx-glass-bar: rgba(34, 34, 40, .97);
  --gx-focus: #8CC4FF;
  --gx-shadow-card: 0 0 0 1px rgba(255, 255, 255, .5);
}

/* Reduce Transparency: opaque functional layer, no blur */
@media (prefers-reduced-transparency: reduce) {
:root {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #F3F3F7;
  --gx-glass-control: #FFFFFF;
  --gx-glass-thick: #F6F6F9;
  --gx-material-pane: #F4F5F8;
  --gx-glass-login: #F6F6F9;
  --gx-glass-bar: #FFFFFF;
  --gx-surface: #FFFFFF;
  --gx-lifted: #FFFFFF;
  --gx-lifted-hover: #FFFFFF;
}
}
:root[data-transparency="reduce"] {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #F3F3F7;
  --gx-glass-control: #FFFFFF;
  --gx-glass-thick: #F6F6F9;
  --gx-material-pane: #F4F5F8;
  --gx-glass-login: #F6F6F9;
  --gx-glass-bar: #FFFFFF;
  --gx-surface: #FFFFFF;
  --gx-lifted: #FFFFFF;
  --gx-lifted-hover: #FFFFFF;
}

@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #1F1F24;
  --gx-glass-control: #2E2E34;
  --gx-glass-thick: #26262B;
  --gx-material-pane: #1A1A1F;
  --gx-glass-login: #222227;
  --gx-glass-bar: #2E2E34;
  --gx-surface: #1E1E22;
  --gx-lifted: #2C2C32;
  --gx-lifted-hover: #34343A;
}
}
@media (prefers-reduced-transparency: reduce) {
:root[data-theme="dark"] {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #1F1F24;
  --gx-glass-control: #2E2E34;
  --gx-glass-thick: #26262B;
  --gx-material-pane: #1A1A1F;
  --gx-glass-login: #222227;
  --gx-glass-bar: #2E2E34;
  --gx-surface: #1E1E22;
  --gx-lifted: #2C2C32;
  --gx-lifted-hover: #34343A;
}
}
@media (prefers-color-scheme: dark) {
:root[data-transparency="reduce"]:not([data-theme="light"]) {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #1F1F24;
  --gx-glass-control: #2E2E34;
  --gx-glass-thick: #26262B;
  --gx-material-pane: #1A1A1F;
  --gx-glass-login: #222227;
  --gx-glass-bar: #2E2E34;
  --gx-surface: #1E1E22;
  --gx-lifted: #2C2C32;
  --gx-lifted-hover: #34343A;
}
}
:root[data-theme="dark"][data-transparency="reduce"] {
  --gx-glass-filter: none;
  --gx-glass-filter-control: none;
  --gx-glass-filter-thick: none;
  --gx-edge-filter: none;
  --gx-glass-regular: #1F1F24;
  --gx-glass-control: #2E2E34;
  --gx-glass-thick: #26262B;
  --gx-material-pane: #1A1A1F;
  --gx-glass-login: #222227;
  --gx-glass-bar: #2E2E34;
  --gx-surface: #1E1E22;
  --gx-lifted: #2C2C32;
  --gx-lifted-hover: #34343A;
}

:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* 2. BASE ------------------------------------------------------------------ */
:root {
  /* continuous-corner (superellipse) masks: fill and 1 px rim — work in every browser */
  --gx-squircle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 50.0L100.0 66.8L99.8 72.1L99.6 76.0L99.3 79.1L98.9 81.8L98.4 84.0L97.9 86.1L97.2 87.9L96.4 89.5L95.6 91.0L94.6 92.3L93.5 93.5L92.3 94.6L91.0 95.6L89.5 96.4L87.9 97.2L86.1 97.9L84.0 98.4L81.8 98.9L79.1 99.3L76.0 99.6L72.1 99.8L66.8 100.0L50.0 100.0L33.2 100.0L27.9 99.8L24.0 99.6L20.9 99.3L18.2 98.9L16.0 98.4L13.9 97.9L12.1 97.2L10.5 96.4L9.0 95.6L7.7 94.6L6.5 93.5L5.4 92.3L4.4 91.0L3.6 89.5L2.8 87.9L2.1 86.1L1.6 84.0L1.1 81.8L0.7 79.1L0.4 76.0L0.2 72.1L0.0 66.8L0.0 50.0L0.0 33.2L0.2 27.9L0.4 24.0L0.7 20.9L1.1 18.2L1.6 16.0L2.1 13.9L2.8 12.1L3.6 10.5L4.4 9.0L5.4 7.7L6.5 6.5L7.7 5.4L9.0 4.4L10.5 3.6L12.1 2.8L13.9 2.1L16.0 1.6L18.2 1.1L20.9 0.7L24.0 0.4L27.9 0.2L33.2 0.0L50.0 0.0L66.8 0.0L72.1 0.2L76.0 0.4L79.1 0.7L81.8 1.1L84.0 1.6L86.1 2.1L87.9 2.8L89.5 3.6L91.0 4.4L92.3 5.4L93.5 6.5L94.6 7.7L95.6 9.0L96.4 10.5L97.2 12.1L97.9 13.9L98.4 16.0L98.9 18.2L99.3 20.9L99.6 24.0L99.8 27.9L100.0 33.2Z'/%3E%3C/svg%3E");
  --gx-squircle-rim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 50.0L100.0 66.8L99.8 72.1L99.6 76.0L99.3 79.1L98.9 81.8L98.4 84.0L97.9 86.1L97.2 87.9L96.4 89.5L95.6 91.0L94.6 92.3L93.5 93.5L92.3 94.6L91.0 95.6L89.5 96.4L87.9 97.2L86.1 97.9L84.0 98.4L81.8 98.9L79.1 99.3L76.0 99.6L72.1 99.8L66.8 100.0L50.0 100.0L33.2 100.0L27.9 99.8L24.0 99.6L20.9 99.3L18.2 98.9L16.0 98.4L13.9 97.9L12.1 97.2L10.5 96.4L9.0 95.6L7.7 94.6L6.5 93.5L5.4 92.3L4.4 91.0L3.6 89.5L2.8 87.9L2.1 86.1L1.6 84.0L1.1 81.8L0.7 79.1L0.4 76.0L0.2 72.1L0.0 66.8L0.0 50.0L0.0 33.2L0.2 27.9L0.4 24.0L0.7 20.9L1.1 18.2L1.6 16.0L2.1 13.9L2.8 12.1L3.6 10.5L4.4 9.0L5.4 7.7L6.5 6.5L7.7 5.4L9.0 4.4L10.5 3.6L12.1 2.8L13.9 2.1L16.0 1.6L18.2 1.1L20.9 0.7L24.0 0.4L27.9 0.2L33.2 0.0L50.0 0.0L66.8 0.0L72.1 0.2L76.0 0.4L79.1 0.7L81.8 1.1L84.0 1.6L86.1 2.1L87.9 2.8L89.5 3.6L91.0 4.4L92.3 5.4L93.5 6.5L94.6 7.7L95.6 9.0L96.4 10.5L97.2 12.1L97.9 13.9L98.4 16.0L98.9 18.2L99.3 20.9L99.6 24.0L99.8 27.9L100.0 33.2Z' fill='none' stroke='black' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
.gx-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.gx-skip { position: fixed; left: var(--gx-s4); top: -80px; z-index: 100; padding: var(--gx-s2) var(--gx-s4); border-radius: var(--gx-r-pill); background: var(--gx-accent-fill); color: var(--gx-on-accent); font-weight: 600; }
.gx-skip:focus { top: var(--gx-s4); }
.gx-dim { color: var(--gx-label-2); }
.gx-strong { font-weight: 600; }
.gx-nowrap { white-space: nowrap; }
.gx-end { text-align: end; }

/* ambient canvas: fixed, extends beneath sidebar and toolbar. The top-left glow carries the selected
   firm's colour (--gx-firm), so colour lives in the content layer and the glass above picks it up. */
.gx-canvas {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 540px at 8% -6%, color-mix(in srgb, var(--gx-firm) var(--gx-glow-firm), transparent), transparent 64%),
    radial-gradient(48vw 460px at 50% -16%, var(--gx-glow-2), transparent 62%),
    radial-gradient(52vw 440px at 98% -8%, var(--gx-glow-3), transparent 62%),
    radial-gradient(520px 560px at -4% 58%, var(--gx-glow-4), transparent 64%),
    radial-gradient(560px 520px at 6% 108%, var(--gx-glow-5), transparent 62%),
    var(--gx-canvas);
}

/* MATERIALS — functional layer only: sidebar, toolbar capsules, tab bar, menus, sheets, alerts.
   Never on cards, tiles, tables or any other content.
   .gx-glass is positioned (relative) so its rim has a containing block; hosts that float (sidebar, menu, sheet)
   declare their own fixed position later in the file, which is equally valid for the rim. */
.gx-glass {
  position: relative;
  background: var(--gx-glass-sheen), var(--gx-glass-regular);
  -webkit-backdrop-filter: var(--gx-glass-filter);
  backdrop-filter: var(--gx-glass-filter);
  box-shadow: var(--gx-glass-shadow), var(--gx-glass-inner);
}
.gx-glass--control { background: var(--gx-glass-sheen), var(--gx-glass-control); -webkit-backdrop-filter: var(--gx-glass-filter-control); backdrop-filter: var(--gx-glass-filter-control); box-shadow: var(--gx-control-shadow), var(--gx-glass-inner); }
.gx-glass--thick { background: var(--gx-glass-sheen), var(--gx-glass-thick); -webkit-backdrop-filter: var(--gx-glass-filter-thick); backdrop-filter: var(--gx-glass-filter-thick); box-shadow: var(--gx-shadow-pop), var(--gx-glass-inner); }
/* specular rim: bright at top-left, soft return at bottom-right */
.gx-glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--gx-rim-hi) 0%, var(--gx-rim-lo) 32%, var(--gx-rim-lo) 66%, var(--gx-rim-mid) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ICONS -------------------------------------------------------------------- */
/* line glyph */
.gx-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gx-icon--sm { width: 16px; height: 16px; stroke-width: 2; }
.gx-icon--xs { width: 12px; height: 12px; stroke-width: 2.6; }
.gx-icon--lg { width: 24px; height: 24px; stroke-width: 1.7; }

/* colour hook: one class gives a component its fill (--c), text-safe (--ct) and deep (--cd) colour */
.gx-c-blue { --c: var(--gx-blue); --ct: var(--gx-blue-text); --cd: var(--gx-blue-deep); }
.gx-c-red { --c: var(--gx-red); --ct: var(--gx-red-text); --cd: var(--gx-red-deep); }
.gx-c-orange { --c: var(--gx-orange); --ct: var(--gx-orange-text); --cd: var(--gx-orange-deep); }
.gx-c-yellow { --c: var(--gx-yellow); --ct: var(--gx-yellow-text); --cd: var(--gx-yellow-deep); }
.gx-c-green { --c: var(--gx-green); --ct: var(--gx-green-text); --cd: var(--gx-green-deep); }
.gx-c-mint { --c: var(--gx-mint); --ct: var(--gx-mint-text); --cd: var(--gx-mint-deep); }
.gx-c-teal { --c: var(--gx-teal); --ct: var(--gx-teal-text); --cd: var(--gx-teal-deep); }
.gx-c-cyan { --c: var(--gx-cyan); --ct: var(--gx-cyan-text); --cd: var(--gx-cyan-deep); }
.gx-c-indigo { --c: var(--gx-indigo); --ct: var(--gx-indigo-text); --cd: var(--gx-indigo-deep); }
.gx-c-purple { --c: var(--gx-purple); --ct: var(--gx-purple-text); --cd: var(--gx-purple-deep); }
.gx-c-pink { --c: var(--gx-pink); --ct: var(--gx-pink-text); --cd: var(--gx-pink-deep); }
.gx-c-brown { --c: var(--gx-brown); --ct: var(--gx-brown-text); --cd: var(--gx-brown-deep); }
.gx-c-gray { --c: var(--gx-gray); --ct: var(--gx-gray-text); --cd: var(--gx-gray-deep); }

/* coloured squircle tile (the nav / section icon). Structure: masked fill + masked rim + glyph. */
.gx-ico, .gx-mono {
  position: relative; isolation: isolate; flex: none;
  display: inline-grid; place-items: center;
  width: var(--gx-ico); height: var(--gx-ico);
  color: #fff;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .18));
}
.gx-ico::before, .gx-mono::before, .gx-ico::after, .gx-mono::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gx-ico::before, .gx-mono::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--gx-blue)) 80%, #fff) 0%, var(--c, var(--gx-blue)) 50%, color-mix(in srgb, var(--c, var(--gx-blue)) 84%, #000) 100%);
  -webkit-mask: var(--gx-squircle) center / 100% 100% no-repeat; mask: var(--gx-squircle) center / 100% 100% no-repeat;
}
.gx-ico::after, .gx-mono::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .10) 46%, rgba(0, 0, 0, .20) 100%);
  -webkit-mask: var(--gx-squircle-rim) center / 100% 100% no-repeat; mask: var(--gx-squircle-rim) center / 100% 100% no-repeat;
}
.gx-ico svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.gx-ico--sm { width: calc(var(--gx-ico) - 4px); height: calc(var(--gx-ico) - 4px); }
.gx-ico--md { width: calc(var(--gx-ico) + 8px); height: calc(var(--gx-ico) + 8px); }
.gx-ico--lg { width: 40px; height: 40px; }
.gx-ico--xl { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--c) 34%, transparent)) drop-shadow(0 1px 1.5px rgba(0, 0, 0, .16)); }
.gx-ico--2xl { width: 72px; height: 72px; filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--c) 36%, transparent)) drop-shadow(0 1px 2px rgba(0, 0, 0, .16)); }
.gx-ico--ai::before { background: linear-gradient(140deg, #FF5E7A 0%, #C651E0 48%, #5E5CE6 100%); }
.gx-ico--plain { color: var(--ct, var(--gx-label-2)); filter: none; }
.gx-ico--plain::before { background: color-mix(in srgb, var(--c) var(--gx-tint-a), transparent); }
.gx-ico--plain::after { display: none; }

/* monogram (firm) and avatar (person): deep gradient so white initials stay >= 4.5:1 */
.gx-mono { width: 32px; height: 32px; font-size: var(--gx-fs-caption); line-height: 1; font-weight: 700; }
.gx-mono::before, .gx-avatar { background: linear-gradient(160deg, color-mix(in srgb, var(--cd, var(--gx-blue-deep)) 88%, #fff) 0%, var(--cd, var(--gx-blue-deep)) 100%); }
.gx-mono--sm { width: 26px; height: 26px; font-size: var(--gx-fs-min); }
.gx-mono--lg { width: 52px; height: 52px; font-size: var(--gx-fs-title3); filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--cd) 36%, transparent)) drop-shadow(0 1px 1.5px rgba(0, 0, 0, .16)); }
.gx-mono--xl { width: 72px; height: 72px; font-size: var(--gx-fs-title1); filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--cd) 36%, transparent)) drop-shadow(0 1px 2px rgba(0, 0, 0, .16)); }
.gx-avatar {
  flex: none; display: inline-grid; place-items: center;
  width: var(--gx-avatar); height: var(--gx-avatar); border-radius: 50%;
  color: #fff; font-size: var(--gx-fs-min); line-height: 1; font-weight: 600;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .14);
}
.gx-avatar--md { width: 32px; height: 32px; font-size: var(--gx-fs-caption); }
.gx-avatar--lg { width: 44px; height: 44px; font-size: var(--gx-fs-body); }
.gx-avatar--xl { width: 64px; height: 64px; font-size: var(--gx-fs-title2); }
.gx-avatars { display: inline-flex; }
.gx-avatars > * + * { margin-left: -6px; }
.gx-avatars > * { box-shadow: 0 0 0 2px var(--gx-surface-solid); }
.gx-avatars__more { background: var(--gx-fill-1); color: var(--gx-label); }

/* Growix mark — official brand pack v2.2 icon (yellow #F2C400 tile + dark megaphone, an <img>; x-gx.mark).
   The icon file carries its own rounded square: no CSS filter or recolouring (it is not a cut-out). */
.gx-mark { display: block; flex: none; width: 26px; height: 26px; }
.gx-mark--lg { width: 72px; height: 72px; filter: drop-shadow(0 12px 18px rgba(117, 96, 0, .22)) drop-shadow(0 1px 2px rgba(117, 96, 0, .20)); }
/* Official Growix wordmark (x-gx.wordmark): brand yellow on light surfaces, the pack's white file on dark ones */
.gx-wordmark { display: inline-flex; align-items: center; flex: none; }
.gx-wordmark img { display: block; width: auto; height: 100%; }
.gx-wordmark__dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gx-wordmark__light { display: none !important; }
  :root:not([data-theme="light"]) .gx-wordmark__dark { display: block !important; }
}
:root[data-theme="dark"] .gx-wordmark__light { display: none !important; }
:root[data-theme="dark"] .gx-wordmark__dark { display: block !important; }
.gx-brand { display: inline-flex; align-items: center; gap: var(--gx-s2); font-size: var(--gx-fs-title3); line-height: var(--gx-lh-title3); font-weight: 700; border-radius: var(--gx-r-small); }
/* Wordmark inside the brand link: 28 px tall file (the SVG has ~15 % built-in clear space, ~19 px visible letters).
   Panels (.gx-brand--panel: sidebar, staff toolbar) show the wordmark alone, no icon (CXR panel rule). */
.gx-brand__wordmark { height: 28px; }

/* 3. SHELL ----------------------------------------------------------------- */
/* sidebar: floating Liquid Glass panel, inset from the window edge */
.gx-sidebar {
  position: fixed; z-index: 40;
  top: var(--gx-inset); left: var(--gx-inset); bottom: var(--gx-inset);
  width: var(--gx-sidebar-w);
  border-radius: var(--gx-r-panel);
  display: flex; flex-direction: column;
  padding: var(--gx-s25);
  transition: transform var(--gx-dur) var(--gx-ease), opacity var(--gx-dur) var(--gx-ease), visibility 0s;
}
.gx-sidebar__grabber { display: none; }
.gx-sidebar__head { display: flex; align-items: center; gap: var(--gx-s2); height: 40px; padding: 0 var(--gx-s05) 0 var(--gx-s2); margin-bottom: var(--gx-s15); flex: none; }
.gx-sidebar__head .gx-iconbtn { margin-left: auto; }
.gx-sidebar__foot { padding-top: var(--gx-s15); flex: none; }

.gx-iconbtn {
  position: relative;
  width: var(--gx-hit); height: var(--gx-hit); flex: none;
  display: inline-grid; place-items: center;
  border-radius: var(--gx-r-small);
  color: var(--gx-label-2);
  transition: background var(--gx-dur-fast), color var(--gx-dur-fast);
}
.gx-iconbtn:hover, .gx-iconbtn[data-state="hover"] { background: var(--gx-hover); color: var(--gx-label); }
.gx-iconbtn:active, .gx-iconbtn[data-state="active"], .gx-iconbtn[aria-pressed="true"] { background: var(--gx-pressed); color: var(--gx-label); }
.gx-iconbtn--round { border-radius: 50%; background: var(--gx-fill-2); }
.gx-iconbtn:disabled, .gx-iconbtn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* firm switcher: a lifted well on the glass, opens a pop-up menu */
.gx-firm {
  display: flex; align-items: center; gap: var(--gx-s25); width: 100%; flex: none;
  height: 56px; padding: 0 var(--gx-s25) 0 var(--gx-s2); text-align: start;
  border-radius: var(--gx-r-control);
  background: var(--gx-lifted);
  box-shadow: var(--gx-lifted-rim);
  transition: background var(--gx-dur-fast);
}
.gx-firm:hover, .gx-firm[aria-expanded="true"] { background: var(--gx-lifted-hover); }
.gx-firm__text { min-width: 0; flex: 1; display: grid; }
.gx-firm__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-firm__meta { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-firm > .gx-icon, .gx-account > .gx-icon { color: var(--gx-label-2); }

/* navigation (source list) */
.gx-nav {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: var(--gx-s15) calc(var(--gx-s25) * -1) 0; padding: 0 var(--gx-s25) var(--gx-s2);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
}
.gx-nav::-webkit-scrollbar { display: none; }
.gx-nav__title { padding: var(--gx-s3) var(--gx-s2) var(--gx-s1); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 600; color: var(--gx-label-2); }
.gx-nav__group:first-child .gx-nav__title { padding-top: var(--gx-s2); }
.gx-nav__list { display: grid; gap: 1px; }
.gx-nav__item {
  display: flex; align-items: center; gap: var(--gx-s25);
  height: var(--gx-row-h); padding: 0 var(--gx-s25) 0 var(--gx-s15);
  border-radius: var(--gx-r-row);
  transition: background var(--gx-dur-fast);
}
.gx-nav__item:hover, .gx-nav__item[data-state="hover"] { background: var(--gx-hover); }
.gx-nav__item:active, .gx-nav__item[data-state="active"] { background: var(--gx-pressed); }
.gx-nav__item[aria-current="page"] { background: var(--gx-selection); font-weight: 600; box-shadow: inset 0 0 0 .5px var(--gx-selection-rim); }
.gx-nav__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-nav__count { font-size: var(--gx-fs-sub); font-weight: 500; color: var(--gx-label-2); }
.gx-nav__item[aria-current="page"] .gx-nav__count { color: var(--gx-label); }
/* option: emphasised (accent) selection — set data-nav-selection="accent" on <html> */
:root[data-nav-selection="accent"] .gx-nav__item[aria-current="page"], .gx-nav__item--accent[aria-current="page"] { background: var(--gx-accent-fill); color: var(--gx-on-accent); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .22), 0 1px 3px rgba(0, 60, 160, .28); }
:root[data-nav-selection="accent"] .gx-nav__item[aria-current="page"] .gx-nav__count, .gx-nav__item--accent[aria-current="page"] .gx-nav__count { color: inherit; }

/* account: pop-up button at the foot of the sidebar */
.gx-account {
  display: flex; align-items: center; gap: var(--gx-s25); width: 100%;
  height: 52px; padding: 0 var(--gx-s25) 0 var(--gx-s2); text-align: start;
  border-radius: var(--gx-r-control);
  transition: background var(--gx-dur-fast);
}
.gx-account:hover, .gx-account[aria-expanded="true"] { background: var(--gx-hover); }
.gx-account__text { flex: 1; min-width: 0; display: grid; }
.gx-account__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-account__role { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* toolbar: no bar background. Title sits on the content, controls are separate glass capsules. */
.gx-toolbar {
  position: fixed; z-index: 30; top: 0; right: 0;
  left: calc(var(--gx-inset) + var(--gx-sidebar-w));
  height: var(--gx-bar-h);
  padding: 0 var(--gx-gutter);
  display: flex; align-items: center; gap: var(--gx-s3);
  pointer-events: none;
  transition: left var(--gx-dur) var(--gx-ease), right var(--gx-dur) var(--gx-ease);
}
.gx-toolbar > * { pointer-events: auto; position: relative; }
/* scroll edge effect: content blurs and fades where it meets the bar; switched on only when scrolled */
.gx-toolbar::before {
  content: ""; position: absolute; inset: 0 0 -24px 0; pointer-events: none;
  -webkit-backdrop-filter: var(--gx-edge-filter); backdrop-filter: var(--gx-edge-filter);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gx-canvas) 86%, transparent) 0%, color-mix(in srgb, var(--gx-canvas) 62%, transparent) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 0, #000 58%, transparent 100%);
  mask-image: linear-gradient(#000 0, #000 58%, transparent 100%);
  opacity: 0; transition: opacity .2s;
}
:root[data-scrolled] .gx-toolbar::before { opacity: 1; }
.gx-toolbar__lead { display: flex; align-items: center; gap: var(--gx-s3); min-width: min(160px, 40%); flex: 0 1 auto; }
.gx-toolbar .gx-search { flex: 0 1 240px; min-width: 132px; }
.gx-toolbar__titles { min-width: 0; display: grid; }
.gx-toolbar__title { font-size: var(--gx-fs-title1); line-height: var(--gx-lh-title1); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-toolbar__subtitle { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-toolbar__space { flex: 1; }
.gx-toolbar .gx-toolbar__toggle, .gx-toolbar .gx-toolbar__firm { display: none; }
:root[data-sidebar="collapsed"] .gx-toolbar .gx-toolbar__toggle { display: inline-flex; }

/* glass capsule + the items inside it */
.gx-pill {
  display: inline-flex; align-items: center; flex: none;
  height: var(--gx-control-h); padding: 0 var(--gx-s1); gap: 1px;
  border-radius: var(--gx-r-pill);
}
.gx-pill--icon { width: var(--gx-control-h); padding: 0; justify-content: center; }
.gx-pill__btn {
  position: relative;
  height: calc(var(--gx-control-h) - 8px); min-width: 40px; padding: 0 var(--gx-s25);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--gx-s15);
  border-radius: var(--gx-r-pill);
  font-weight: 500; white-space: nowrap;
  transition: background var(--gx-dur-fast);
}
.gx-pill--icon .gx-pill__btn { width: 100%; height: 100%; padding: 0; }
.gx-pill__btn:hover, .gx-pill__btn[data-state="hover"] { background: var(--gx-hover); }
.gx-pill__btn:active, .gx-pill__btn[data-state="active"] { background: var(--gx-pressed); }
.gx-pill__btn[aria-pressed="true"] { background: color-mix(in srgb, var(--gx-accent) 16%, transparent); color: var(--gx-accent-text); }
.gx-pill__sep { width: 1px; height: 18px; background: var(--gx-sep-strong); margin: 0 var(--gx-s05); }
.gx-count-dot {
  position: absolute; top: 1px; right: 3px; min-width: 16px; height: 16px; padding: 0 var(--gx-s1);
  border-radius: 8px; background: var(--gx-danger-fill); color: #fff;
  font-size: var(--gx-fs-min); line-height: 16px; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 1.5px var(--gx-badge-ring);
}

/* segmented control (a real radio group). On glass: .gx-pill.gx-seg · in content: .gx-seg--content */
.gx-seg { display: inline-flex; align-items: center; flex: none; }
.gx-seg__opt { position: relative; display: inline-flex; align-self: stretch; align-items: center; flex: 1; }   /* hit area = full control height */
.gx-seg__opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: default; }
.gx-seg__opt span {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--gx-s15); flex: 1;
  height: calc(var(--gx-control-h) - 8px); min-width: 48px; padding: 0 var(--gx-s3);
  border-radius: var(--gx-r-pill);
  font-weight: 500; white-space: nowrap;
  transition: background var(--gx-dur-fast), box-shadow var(--gx-dur-fast);
}
.gx-seg__opt:hover span { background: var(--gx-hover); }
.gx-seg__opt input:checked + span { background: var(--gx-thumb); box-shadow: var(--gx-thumb-shadow); font-weight: 600; }
.gx-seg__opt input:focus-visible + span { outline: 3px solid var(--gx-focus); outline-offset: 1px; }
.gx-seg__opt input:disabled + span { opacity: .4; }
.gx-seg--content { height: var(--gx-btn-h); padding: 0 var(--gx-s05); border-radius: var(--gx-r-pill); background: var(--gx-fill-3); }
.gx-seg--content .gx-seg__opt span { height: calc(var(--gx-btn-h) - 4px); min-width: 0; padding: 0 var(--gx-s3); font-size: var(--gx-fs-callout); }
.gx-seg--icons .gx-seg__opt span { min-width: 40px; padding: 0 var(--gx-s2); }
.gx-seg--block { display: flex; width: 100%; }
.gx-seg__n { color: var(--gx-label-2); font-weight: 500; }
.gx-seg__opt input:checked + span .gx-seg__n { color: inherit; }

/* search field (capsule). On glass in the toolbar; .gx-search--content in the content layer */
.gx-search { width: 240px; padding: 0 var(--gx-s3); gap: var(--gx-s2); color: var(--gx-label-2); }
.gx-search:focus-within, .gx-pill.gx-search[data-state="focus"] { outline: 3px solid var(--gx-focus); outline-offset: 1px; }
.gx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--gx-label); outline: none; }
.gx-search input::placeholder { color: var(--gx-label-2); opacity: 1; }
.gx-search input::-webkit-search-cancel-button { display: none; }
.gx-search--content { background: var(--gx-fill-3); }
.gx-kbd { font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); padding: 1px var(--gx-s15); border-radius: var(--gx-s15); background: var(--gx-fill-3); font-weight: 500; white-space: nowrap; }

/* menus and popovers (thick glass) */
.gx-menu, .gx-popover {
  position: fixed; z-index: 70; min-width: 264px; max-width: calc(100vw - 16px);
  padding: var(--gx-s15); border-radius: 16px;
  transform-origin: var(--gx-menu-origin, top left);
  animation: gx-pop .18s var(--gx-ease);
}
@keyframes gx-pop { from { opacity: 0; transform: scale(.94); } }
.gx-menu--static, .gx-popover--static { animation: none; }
.gx-menu--inline, .gx-popover--inline { position: relative; z-index: auto; animation: none; }   /* kit / docs only */
.gx-menu__head { display: flex; align-items: center; gap: var(--gx-s25); padding: var(--gx-s2) var(--gx-s25) var(--gx-s25); }
.gx-menu__head-text { display: grid; min-width: 0; }
.gx-menu__name { font-weight: 600; }
.gx-menu__meta { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); overflow: hidden; text-overflow: ellipsis; }
.gx-menu__label { padding: var(--gx-s15) var(--gx-s25) var(--gx-s1); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 600; color: var(--gx-label-2); }
.gx-menu__item {
  display: flex; align-items: center; gap: var(--gx-s25); width: 100%;
  min-height: var(--gx-row-h); padding: var(--gx-s1) var(--gx-s25); text-align: start;
  border-radius: var(--gx-r-row);
}
.gx-menu__check { width: 16px; flex: none; display: grid; place-items: center; }
.gx-menu__item > .gx-icon, .gx-menu__row > .gx-icon { color: var(--gx-label-2); }
.gx-menu__item:hover, .gx-menu__item:focus-visible, .gx-menu__item[data-state="hover"] { background: var(--gx-accent-fill); color: var(--gx-on-accent); outline: none; }
.gx-menu__item:hover > .gx-icon, .gx-menu__item:focus-visible > .gx-icon, .gx-menu__item[data-state="hover"] > .gx-icon,
.gx-menu__item:hover .gx-menu__aux, .gx-menu__item:focus-visible .gx-menu__aux, .gx-menu__item[data-state="hover"] .gx-menu__aux { color: inherit; }
.gx-menu__item--danger { color: var(--gx-red-text); }
.gx-menu__item--danger > .gx-icon { color: inherit; }
.gx-menu__item--danger:hover, .gx-menu__item--danger:focus-visible { background: var(--gx-danger-fill); color: #fff; }
.gx-menu__item[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.gx-menu__item-text { flex: 1; min-width: 0; }
.gx-menu__aux { margin-left: auto; color: var(--gx-label-2); font-size: var(--gx-fs-sub); display: inline-flex; align-items: center; gap: var(--gx-s1); white-space: nowrap; }
.gx-menu__row { display: flex; align-items: center; gap: var(--gx-s25); min-height: 44px; padding: var(--gx-s05) var(--gx-s15) var(--gx-s05) var(--gx-s25); }
.gx-menu__row > span { flex: 1; }
.gx-menu__sep { height: 1px; margin: var(--gx-s1) var(--gx-s25); background: var(--gx-sep-strong); }
.gx-popover { padding: var(--gx-s4); min-width: 0; width: 300px; }
.gx-popover__title { font-weight: 600; margin-bottom: var(--gx-s1); }
.gx-popover__text { color: var(--gx-label-2); font-size: var(--gx-fs-callout); line-height: var(--gx-lh-callout); }

/* main column */
.gx-main {
  margin-left: calc(var(--gx-inset) + var(--gx-sidebar-w));
  padding: calc(var(--gx-bar-h) + var(--gx-s1)) var(--gx-gutter) var(--gx-s12);
  transition: margin var(--gx-dur) var(--gx-ease);
}
.gx-main__inner { max-width: 1360px; margin: 0 auto; container-type: inline-size; container-name: gx-main; }
:root[data-sidebar="collapsed"] .gx-sidebar { transform: translateX(calc(-100% - 24px)); opacity: 0; visibility: hidden; transition: transform var(--gx-dur) var(--gx-ease), opacity var(--gx-dur) var(--gx-ease), visibility 0s var(--gx-dur); }
:root[data-sidebar="collapsed"] .gx-toolbar { left: 0; }
:root[data-sidebar="collapsed"] .gx-main { margin-left: 0; }

/* inspector: edge-attached trailing pane of a list → detail split. Standard material, not floating glass. */
.gx-inspector {
  position: fixed; z-index: 36; top: 0; right: 0; bottom: 0; width: var(--gx-inspector-w);
  display: flex; flex-direction: column;
  background: var(--gx-material-pane);
  -webkit-backdrop-filter: var(--gx-glass-filter-thick); backdrop-filter: var(--gx-glass-filter-thick);
  box-shadow: -1px 0 0 var(--gx-sep-strong);
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--gx-dur) var(--gx-ease), visibility 0s var(--gx-dur);
}
:root[data-inspector="open"] .gx-inspector { transform: none; visibility: visible; transition: transform var(--gx-dur) var(--gx-ease), visibility 0s; }
:root[data-inspector="open"] .gx-has-inspector .gx-main, :root[data-inspector="open"] .gx-has-inspector.gx-main { margin-right: var(--gx-inspector-w); }
:root[data-inspector="open"] .gx-has-inspector .gx-toolbar, :root[data-inspector="open"] .gx-toolbar.gx-has-inspector { right: var(--gx-inspector-w); }
.gx-inspector__bar { display: flex; align-items: center; gap: var(--gx-s2); height: var(--gx-bar-h); padding: 0 var(--gx-s3) 0 var(--gx-s5); flex: none; }
.gx-inspector__bar-title { font-weight: 600; margin-right: auto; }
.gx-inspector__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--gx-s5) var(--gx-s6); scrollbar-width: thin; }
.gx-inspector__section { padding: var(--gx-s4) 0; }
.gx-inspector__section + .gx-inspector__section { border-top: 1px solid var(--gx-sep); }
.gx-inspector__head { display: flex; align-items: center; gap: var(--gx-s2); min-height: 28px; margin-bottom: var(--gx-s2); }
.gx-inspector__title { font-weight: 600; margin-right: auto; }
.gx-inspector__hero { display: grid; justify-items: center; gap: var(--gx-s1); text-align: center; padding-bottom: var(--gx-s2); }
.gx-inspector__name { font-size: var(--gx-fs-title2); line-height: var(--gx-lh-title2); font-weight: 700; margin-top: var(--gx-s2); }
.gx-inspector__actions { display: flex; gap: var(--gx-s2); margin-top: var(--gx-s3); }

/* phone tab bar (positioned in section 6) */
.gx-tabbar, .gx-pagehead { display: none; }
.gx-tabbar .gx-glass { --gx-glass-control: var(--gx-glass-bar); }
.gx-tabbar__tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 64px; padding: var(--gx-s1); border-radius: 32px; }
.gx-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 1px; border-radius: 28px; color: var(--gx-label); font-size: var(--gx-fs-min); line-height: 15px; font-weight: 500; min-width: 0; }
.gx-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-tab .gx-icon { width: 25px; height: 25px; stroke-width: 1.8; }
.gx-tab[aria-current="page"] { background: var(--gx-selection); font-weight: 600; }   /* selection = lozenge + weight + accent glyph; the label keeps the label colour so it survives any content beneath */
.gx-tab[aria-current="page"] .gx-icon { color: var(--gx-tab-on); }
.gx-tabbar__more { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.gx-tabbar__more .gx-icon { width: 25px; height: 25px; }
.gx-tabbar--inline { display: flex; gap: var(--gx-s25); width: 380px; max-width: 100%; }
.gx-sidebar--inline { position: relative; inset: auto; height: auto; transform: none !important; visibility: visible !important; opacity: 1 !important; z-index: auto; }
.gx-backdrop { position: fixed; inset: 0; z-index: 35; background: var(--gx-scrim); opacity: 0; pointer-events: none; transition: opacity var(--gx-dur) var(--gx-ease); }

/* 4. CONTROLS -------------------------------------------------------------- */
/* buttons: capsule. One prominent (filled accent) button per view. */
.gx-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--gx-s15); flex: none;
  height: var(--gx-btn-h); padding: 0 var(--gx-s4);
  border-radius: var(--gx-r-pill);
  font-weight: 500; white-space: nowrap;
  background: var(--gx-fill-2); color: var(--gx-label);
  transition: filter var(--gx-dur-fast), background var(--gx-dur-fast), transform var(--gx-dur-fast);
}
.gx-btn:hover, .gx-btn[data-state="hover"] { background: var(--gx-fill-1); }
.gx-btn:active, .gx-btn[data-state="active"] { transform: scale(.97); filter: brightness(.94); }
.gx-btn:disabled, .gx-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.gx-btn--prominent { background: var(--gx-accent-fill); color: var(--gx-on-accent); font-weight: 600; box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 60, 160, .24); }
.gx-btn--prominent:hover, .gx-btn--prominent[data-state="hover"] { background: var(--gx-accent-fill-hover); }
.gx-btn--tinted { background: color-mix(in srgb, var(--gx-accent) 14%, transparent); color: var(--gx-accent-text); font-weight: 600; }
.gx-btn--tinted:hover, .gx-btn--tinted[data-state="hover"] { background: color-mix(in srgb, var(--gx-accent) 22%, transparent); }
.gx-btn--plain { background: none; color: var(--gx-accent-text); padding: 0 var(--gx-s2); }
.gx-btn--plain:hover, .gx-btn--plain[data-state="hover"] { background: var(--gx-hover); }
.gx-btn--destructive { background: var(--gx-danger-fill); color: #fff; font-weight: 600; }
.gx-btn--destructive:hover, .gx-btn--destructive[data-state="hover"] { background: var(--gx-danger-fill); filter: brightness(1.08); }
.gx-btn--destructive-plain { color: var(--gx-red-text); }
.gx-btn--sm { height: var(--gx-btn-sm-h); padding: 0 var(--gx-s3); font-size: var(--gx-fs-callout); }
.gx-btn--lg { height: var(--gx-control-h); padding: 0 var(--gx-s5); }
.gx-btn--xl { height: 50px; padding: 0 var(--gx-s6); font-size: var(--gx-fs-title3); font-weight: 600; }
.gx-btn--icon { width: var(--gx-btn-h); padding: 0; }
.gx-btn--icon.gx-btn--sm { width: var(--gx-btn-sm-h); }
.gx-btn--icon.gx-btn--lg { width: var(--gx-control-h); }
.gx-btn--block { width: 100%; }
.gx-btn--glass { background: none; }   /* combine with .gx-glass.gx-glass--control for a floating action */
.gx-btn .gx-icon { width: 16px; height: 16px; stroke-width: 2.2; }
.gx-btn--lg .gx-icon, .gx-btn--xl .gx-icon { width: 18px; height: 18px; }
.gx-btn.is-loading { color: transparent; pointer-events: none; }
.gx-btn.is-loading::before { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: gx-spin .8s linear infinite; }
.gx-btn:not(.gx-btn--prominent):not(.gx-btn--destructive).is-loading::before { border-color: var(--gx-fill-1); border-top-color: var(--gx-label-2); }

.gx-link { color: var(--gx-accent-text); border-radius: var(--gx-s1); }
.gx-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* text field, textarea, select — standalone */
.gx-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gx-s15); min-width: 0; }
.gx-control__label { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 600; }
.gx-control__hint { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); }
.gx-control__error { display: flex; align-items: center; gap: var(--gx-s1); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-red-text); font-weight: 500; }
.gx-input, .gx-textarea, .gx-select select, .gx-popup {
  width: 100%; min-width: 0; height: var(--gx-input-h); padding: 0 var(--gx-s3);
  border: 0; border-radius: var(--gx-r-row);
  background: var(--gx-field); color: var(--gx-label);
  box-shadow: inset 0 0 0 1px var(--gx-field-rim), 0 1px 1.5px rgba(16, 24, 48, .04);
  outline: none; appearance: none; -webkit-appearance: none;
  transition: box-shadow var(--gx-dur-fast);
}
.gx-textarea { height: auto; min-height: 88px; padding: var(--gx-s2) var(--gx-s3); resize: vertical; line-height: var(--gx-lh-body); }
.gx-input::placeholder, .gx-textarea::placeholder { color: var(--gx-label-2); opacity: 1; }
.gx-input:hover, .gx-textarea:hover, .gx-select select:hover { box-shadow: inset 0 0 0 1px var(--gx-sep-strong), 0 1px 1.5px rgba(16, 24, 48, .04); }
.gx-input:focus-visible, .gx-textarea:focus-visible, .gx-select select:focus-visible, .gx-popup:focus-visible,
.gx-input[data-state="focus"], .gx-textarea[data-state="focus"] { outline: none; box-shadow: inset 0 0 0 1.5px var(--gx-accent), 0 0 0 3.5px var(--gx-focus); }
.gx-input[aria-invalid="true"], .gx-textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--gx-red-text); }
.gx-input:disabled, .gx-textarea:disabled, .gx-select select:disabled { opacity: .5; }
.gx-inputwrap { position: relative; display: flex; align-items: center; }
.gx-inputwrap > .gx-icon { position: absolute; left: var(--gx-s3); color: var(--gx-label-2); pointer-events: none; }
.gx-inputwrap > .gx-icon + .gx-input { padding-left: calc(var(--gx-s3) + 28px); }
.gx-select { position: relative; display: flex; align-items: center; }
.gx-select select { padding-right: var(--gx-s8); }
.gx-select > .gx-icon { position: absolute; right: var(--gx-s25); color: var(--gx-label-2); pointer-events: none; }
/* pop-up button: shows the current choice, opens a menu */
.gx-popup { display: inline-flex; align-items: center; gap: var(--gx-s2); width: auto; text-align: start; }
.gx-popup > .gx-icon:last-child { margin-left: auto; color: var(--gx-label-2); }
.gx-popup--pill { height: var(--gx-btn-h); border-radius: var(--gx-r-pill); background: var(--gx-fill-2); box-shadow: none; padding: 0 var(--gx-s25) 0 var(--gx-s4); font-weight: 500; }
.gx-popup--pill:hover { background: var(--gx-fill-1); }

/* grouped form (sheets, settings): inset rows, label left, value right, halo follows the row shape */
.gx-form { border-radius: var(--gx-r-control); background: var(--gx-field); box-shadow: 0 0 0 .5px var(--gx-field-rim); }
.gx-field { position: relative; display: flex; align-items: center; gap: var(--gx-s3); min-height: var(--gx-field-h); padding: 0 var(--gx-s4); border-radius: var(--gx-r-control); }
.gx-field + .gx-field::before { content: ""; position: absolute; top: 0; left: var(--gx-s4); right: 0; height: 1px; background: var(--gx-sep); }
.gx-field:focus-within, .gx-field[data-state="focus"] { box-shadow: 0 0 0 1.5px var(--gx-accent), 0 0 0 4.5px var(--gx-focus); z-index: 1; }
.gx-field:focus-within::before, .gx-field:focus-within + .gx-field::before, .gx-field[data-state="focus"]::before, .gx-field[data-state="focus"] + .gx-field::before { opacity: 0; }
.gx-field__label { width: 104px; flex: none; font-weight: 500; }
.gx-field__input { flex: 1; min-width: 0; height: var(--gx-field-h); border: 0; background: none; outline: none; appearance: none; -webkit-appearance: none; }
.gx-field__input::placeholder { color: var(--gx-label-2); opacity: 1; }
.gx-field select.gx-field__input { padding-right: var(--gx-s6); }
.gx-field > .gx-icon { color: var(--gx-label-2); pointer-events: none; margin-left: -28px; }
.gx-field__value { margin-left: auto; color: var(--gx-label-2); display: inline-flex; align-items: center; gap: var(--gx-s2); }
.gx-form__note { margin-top: var(--gx-s2); padding: 0 var(--gx-s4); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }

/* toggle (switch) */
.gx-toggle { position: relative; display: inline-flex; align-items: center; gap: var(--gx-s25); min-height: var(--gx-btn-sm-h); }
.gx-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: default; }
.gx-toggle__track { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: var(--gx-fill-1); transition: background .2s; }
.gx-toggle__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 2px 5px rgba(0, 0, 0, .22); transition: transform .22s var(--gx-ease); }
.gx-toggle input:checked + .gx-toggle__track { background: var(--gx-green); }
.gx-toggle input:checked + .gx-toggle__track::after { transform: translateX(18px); }
.gx-toggle input:focus-visible + .gx-toggle__track, .gx-toggle[data-state="focus"] .gx-toggle__track { outline: 3px solid var(--gx-focus); outline-offset: 2px; }
.gx-toggle input:disabled + .gx-toggle__track { opacity: .45; }

/* checkbox (square), radio, and the round task checkbox */
.gx-choice { position: relative; display: inline-flex; align-items: center; gap: var(--gx-s25); min-height: var(--gx-btn-sm-h); }
.gx-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: default; }
.gx-choice__box { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: var(--gx-s15); background: var(--gx-field); box-shadow: inset 0 0 0 1.5px var(--gx-label-3); color: transparent; transition: background var(--gx-dur-fast), box-shadow var(--gx-dur-fast); }
.gx-choice__box svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.gx-choice input[type="radio"] + .gx-choice__box { border-radius: 50%; }
.gx-choice input[type="radio"] + .gx-choice__box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.gx-choice input:checked + .gx-choice__box, .gx-choice input:indeterminate + .gx-choice__box { background: var(--gx-accent-fill); box-shadow: none; color: #fff; }
.gx-choice input:focus-visible + .gx-choice__box, .gx-choice[data-state="focus"] .gx-choice__box { outline: 3px solid var(--gx-focus); outline-offset: 2px; }
.gx-choice input:disabled + .gx-choice__box { opacity: .45; }
.gx-choice input:disabled ~ span { color: var(--gx-label-2); }

.gx-check { position: relative; width: var(--gx-hit); height: var(--gx-hit); flex: none; display: inline-grid; place-items: center; }
.gx-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: default; }
.gx-check__box { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--gx-label-3); color: transparent; transition: background var(--gx-dur-fast), box-shadow var(--gx-dur-fast); }
.gx-check__box svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gx-check:hover .gx-check__box { box-shadow: inset 0 0 0 1.5px var(--gx-accent); }
.gx-check input:checked + .gx-check__box { background: var(--gx-accent-fill); box-shadow: none; color: #fff; }
.gx-check input:focus-visible + .gx-check__box { outline: 3px solid var(--gx-focus); outline-offset: 2px; }

/* tabs: page-level sections (a tablist). For a choice among views of the same data use .gx-seg instead. */
.gx-tabs { display: flex; align-items: center; gap: var(--gx-s1); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gx-tab-item { position: relative; display: inline-flex; align-items: center; gap: var(--gx-s15); height: var(--gx-btn-h); padding: 0 var(--gx-s3); border-radius: var(--gx-r-pill); color: var(--gx-label-2); font-weight: 500; white-space: nowrap; transition: background var(--gx-dur-fast), color var(--gx-dur-fast); }
.gx-tab-item:hover { background: var(--gx-hover); color: var(--gx-label); }
.gx-tab-item[aria-selected="true"] { background: var(--gx-fill-2); color: var(--gx-label); font-weight: 600; }

/* tag: tinted capsule with glyph + text (never colour alone) */
.gx-tag {
  display: inline-flex; align-items: center; gap: var(--gx-s1); flex: none;
  height: 24px; padding: 0 var(--gx-s25) 0 var(--gx-s2);
  border-radius: var(--gx-r-pill);
  font-size: var(--gx-fs-sub); line-height: 1; font-weight: 600;
  color: var(--ct, var(--gx-label-2));
  background: color-mix(in srgb, var(--c, var(--gx-gray)) var(--gx-tint-a), transparent);
  white-space: nowrap;
}
.gx-tag .gx-icon { width: 13px; height: 13px; stroke-width: 2.3; }
.gx-tag--plain { background: var(--gx-fill-3); color: var(--gx-label-2); }
.gx-tag--ai { color: var(--gx-purple-text); background: linear-gradient(120deg, color-mix(in srgb, var(--gx-pink) var(--gx-tint-a), transparent), color-mix(in srgb, var(--gx-indigo) var(--gx-tint-a), transparent)); }

/* badge: a count */
.gx-badge { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-width: 22px; height: 22px; padding: 0 var(--gx-s15); border-radius: 11px; background: var(--gx-fill-2); font-size: var(--gx-fs-sub); line-height: 1; font-weight: 600; color: var(--gx-label-2); flex: none; }
.gx-badge--accent { background: var(--gx-accent-fill); color: #fff; }
.gx-badge--danger { background: var(--gx-danger-fill); color: #fff; }

/* status: glyph + word, colour is secondary */
.gx-status { display: inline-flex; align-items: center; gap: var(--gx-s15); font-weight: 600; color: var(--ct, var(--gx-label)); white-space: nowrap; }
.gx-status .gx-icon { width: 17px; height: 17px; stroke-width: 2.1; }

/* delta: arrow + value (+ hidden word) */
.gx-delta { display: inline-flex; align-items: center; gap: var(--gx-s05); font-weight: 600; color: var(--gx-green-text); white-space: nowrap; }
.gx-delta--down { color: var(--gx-red-text); }
.gx-delta--flat { color: var(--gx-label-2); }
.gx-delta--chip { height: 22px; padding: 0 var(--gx-s2) 0 var(--gx-s15); border-radius: 11px; font-size: var(--gx-fs-sub); background: color-mix(in srgb, var(--gx-green) var(--gx-tint-a), transparent); }
.gx-delta--chip.gx-delta--down { background: color-mix(in srgb, var(--gx-red) var(--gx-tint-a), transparent); }
.gx-delta--chip.gx-delta--flat { background: var(--gx-fill-3); }

/* banner: icon shape + title carry the meaning */
.gx-banner { --c: var(--gx-blue); --ct: var(--gx-blue-text); display: flex; align-items: flex-start; gap: var(--gx-s3); padding: var(--gx-s3) var(--gx-s4); border-radius: var(--gx-r-control); background: color-mix(in srgb, var(--c) var(--gx-tint-a), var(--gx-surface-solid)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent); }
.gx-banner > .gx-icon { color: var(--ct); margin-top: 1px; width: 22px; height: 22px; }
.gx-banner__body { flex: 1; min-width: 0; display: grid; gap: var(--gx-s05); }
.gx-banner__title { font-weight: 600; }
.gx-banner__text { color: var(--gx-label-2); font-size: var(--gx-fs-callout); line-height: var(--gx-lh-callout); }
.gx-banner__actions { display: flex; align-items: center; gap: var(--gx-s1); flex: none; align-self: center; }
.gx-banner--success { --c: var(--gx-green); --ct: var(--gx-green-text); }
.gx-banner--warning { --c: var(--gx-orange); --ct: var(--gx-orange-text); }
.gx-banner--error { --c: var(--gx-red); --ct: var(--gx-red-text); }

/* tooltip: [data-gx-tip="…"] on any focusable element, or a static .gx-tip */
.gx-tip, [data-gx-tip]::after {
  padding: var(--gx-s15) var(--gx-s25); border-radius: var(--gx-r-small);
  background: #26262B; color: #F5F5FA; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .16), 0 6px 18px -4px rgba(0, 0, 0, .4);
  font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 500; white-space: nowrap;
}
.gx-tip { display: inline-block; }
[data-gx-tip] { position: relative; }
[data-gx-tip]::after { content: attr(data-gx-tip); position: absolute; z-index: 80; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; }
[data-gx-tip]:hover::after, [data-gx-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
[data-gx-tip][data-gx-tip-pos="bottom"]::after { bottom: auto; top: calc(100% + 8px); }

/* sheet: a short, self-contained task (native <dialog>) */
.gx-sheet, .gx-alert {
  position: fixed; inset: 0; margin: auto; z-index: 60;
  width: min(500px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 48px);
  padding: var(--gx-s6); border: 0;
  border-radius: var(--gx-r-sheet);
  color: var(--gx-label);
  overflow: visible;
}
.gx-sheet::backdrop, .gx-alert::backdrop { background: var(--gx-scrim); }
.gx-sheet[open], .gx-alert[open] { animation: gx-sheet-in .32s var(--gx-ease); }
.gx-sheet[open]::backdrop, .gx-alert[open]::backdrop { animation: gx-fade .25s ease-out; }
@keyframes gx-sheet-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes gx-fade { from { opacity: 0; } }
@keyframes gx-spin { to { transform: rotate(360deg); } }
.gx-sheet--inline, .gx-alert--inline { position: relative; inset: auto; margin: 0; z-index: auto; animation: none; display: block; }   /* kit / docs only */
.gx-sheet__grabber { display: none; }
.gx-sheet__head { display: flex; align-items: center; gap: var(--gx-s4); margin-bottom: var(--gx-s5); }
.gx-sheet__title { font-size: var(--gx-fs-title2); line-height: var(--gx-lh-title2); font-weight: 700; }
.gx-sheet__desc { color: var(--gx-label-2); font-size: var(--gx-fs-callout); line-height: var(--gx-lh-callout); }
.gx-sheet__foot { display: flex; justify-content: flex-end; gap: var(--gx-s2); margin-top: var(--gx-s6); }
.gx-sheet__foot .gx-btn { min-width: 96px; }

/* alert / confirm: rare, direct, two buttons; the destructive choice is never the default */
.gx-alert { width: min(340px, calc(100vw - 32px)); padding: var(--gx-s6) var(--gx-s5) var(--gx-s5); text-align: center; }
.gx-alert__icon { margin: 0 auto var(--gx-s3); }
.gx-alert__title { font-size: var(--gx-fs-title3); line-height: var(--gx-lh-title3); font-weight: 700; }
.gx-alert__text { margin-top: var(--gx-s15); color: var(--gx-label-2); font-size: var(--gx-fs-callout); line-height: var(--gx-lh-callout); }
.gx-alert__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gx-s2); margin-top: var(--gx-s5); }
.gx-alert__actions--stack { grid-template-columns: 1fr; }

/* pagination */
.gx-pager { display: flex; align-items: center; gap: var(--gx-s1); }
.gx-pager__info { color: var(--gx-label-2); font-size: var(--gx-fs-sub); margin-right: auto; }
.gx-pager__btn { min-width: var(--gx-btn-h); height: var(--gx-btn-h); padding: 0 var(--gx-s2); display: inline-grid; place-items: center; border-radius: var(--gx-r-small); color: var(--gx-label); font-weight: 500; transition: background var(--gx-dur-fast); }
.gx-pager__btn:hover { background: var(--gx-hover); }
.gx-pager__btn[aria-current="page"] { background: var(--gx-fill-2); font-weight: 700; }
.gx-pager__btn:disabled, .gx-pager__btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.gx-pager__gap { color: var(--gx-label-2); padding: 0 var(--gx-s1); }

/* progress, spinner, skeleton */
.gx-progress { display: flex; align-items: center; gap: var(--gx-s3); min-width: 0; }
.gx-progress__bar { flex: 1; min-width: 48px; height: 6px; border-radius: 3px; background: var(--gx-fill-3); overflow: hidden; }
.gx-progress__bar i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--gx-accent)); }
.gx-progress__bar--indeterminate i { width: 36%; animation: gx-slide 1.4s ease-in-out infinite; }
@keyframes gx-slide { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
.gx-progress__val { font-weight: 600; flex: none; }
.gx-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--gx-fill-1); border-top-color: var(--gx-label-2); animation: gx-spin .8s linear infinite; flex: none; }
.gx-skel { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--gx-fill-3) 0%, var(--gx-fill-4) 40%, var(--gx-fill-3) 80%); background-size: 200% 100%; animation: gx-shimmer 1.6s linear infinite; }
.gx-skel--title { height: 22px; width: 46%; border-radius: 11px; }
.gx-skel--tile { height: 32px; width: 32px; border-radius: 9px; }
.gx-skel--circle { height: 28px; width: 28px; border-radius: 50%; }
@keyframes gx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* empty state: says what is missing and offers the next action */
.gx-empty { display: grid; justify-items: center; gap: var(--gx-s2); padding: var(--gx-s8) var(--gx-s5); text-align: center; }
.gx-empty__title { font-size: var(--gx-fs-title3); line-height: var(--gx-lh-title3); font-weight: 600; margin-top: var(--gx-s2); }
.gx-empty__text { color: var(--gx-label-2); max-width: 44ch; }
.gx-empty .gx-btn { margin-top: var(--gx-s2); }

/* 5. CONTENT LAYER ---------------------------------------------------------- */
/* layout helpers (reflow is driven by the width of .gx-main__inner — see section 6) */
.gx-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gx-s4); align-content: start; min-width: 0; }
.gx-stack > * { order: var(--o, 0); }
.gx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gx-s4); }
.gx-split { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: var(--gx-s4); align-items: start; }
.gx-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gx-s4); }
.gx-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gx-s4); }

/* card: the content surface. Standard material — never glass. */
.gx-card {
  position: relative; min-width: 0;
  background: var(--gx-surface);
  border-radius: var(--gx-r-card);
  box-shadow: var(--gx-shadow-card), var(--gx-card-rim);
  padding: var(--gx-s5);
}
.gx-card--flush { padding: var(--gx-s5) 0 var(--gx-s2); display: flex; flex-direction: column; }
.gx-card--flush > .gx-card__head { padding: 0 var(--gx-s5); }
.gx-card__head { display: flex; align-items: center; gap: var(--gx-s2); min-height: var(--gx-btn-h); margin-bottom: var(--gx-s4); }
.gx-card__titles { display: grid; min-width: 0; }
.gx-card__title { font-size: var(--gx-fs-title3); line-height: var(--gx-lh-title3); font-weight: 600; }
.gx-card__sub { color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
.gx-card__tools { margin-left: auto; display: flex; align-items: center; gap: var(--gx-s1); }
.gx-card__foot { margin-top: auto; display: flex; align-items: center; gap: var(--gx-s3); padding: var(--gx-s3) var(--gx-s5) var(--gx-s2); border-top: 1px solid var(--gx-sep); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
.gx-card__foot .gx-progress { flex: 1; }
.gx-card__foot .gx-progress__bar { flex: none; width: 120px; max-width: 40%; }
/* the one AI signal: a soft multi-colour rim */
.gx-card--ai::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, #FF5E7A, #C651E0 45%, #5E5CE6 75%, #32ADE6); opacity: .7;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* grouped list rows, separators inset to the text edge */
.gx-list { display: grid; }
.gx-row { position: relative; display: flex; align-items: center; gap: var(--gx-s3); min-height: var(--gx-list-row-h); padding: var(--gx-s2) var(--gx-s5) var(--gx-s2) var(--gx-s4); transition: background var(--gx-dur-fast); }
.gx-row + .gx-row::before, li + li > .gx-row::before { content: ""; position: absolute; top: 0; right: var(--gx-s5); left: var(--gx-row-inset, 60px); height: 1px; background: var(--gx-sep); }
.gx-row__body { flex: 1; min-width: 0; display: grid; gap: var(--gx-s05); }
.gx-row__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-row__meta { display: flex; align-items: center; gap: var(--gx-s2); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); min-width: 0; }
.gx-row__meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-row__meta > .gx-tag, .gx-row__meta > .gx-sev { flex: none; overflow: visible; }
.gx-row__chev { color: var(--gx-label-3); flex: none; }
a.gx-row:hover, .gx-row[data-state="hover"] { background: var(--gx-hover); }
.gx-sev { font-weight: 600; color: var(--ct); }
.gx-due { display: inline-flex; align-items: center; gap: var(--gx-s1); color: var(--gx-label-2); white-space: nowrap; }
.gx-due--today { color: var(--gx-label); font-weight: 600; }
.gx-due--late { color: var(--gx-red-text); font-weight: 600; }

/* key–value rows (inspector, detail panes) */
.gx-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--gx-s25) var(--gx-s4); align-items: center; }
.gx-kv dt { color: var(--gx-label-2); }
.gx-kv dd { display: flex; align-items: center; justify-content: flex-end; gap: var(--gx-s2); text-align: end; font-weight: 500; min-width: 0; }
.gx-rowitem { display: flex; align-items: center; gap: var(--gx-s25); min-height: 40px; }
.gx-rowitem + .gx-rowitem { border-top: 1px solid var(--gx-sep); }
.gx-rowitem__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* table: sortable headers, alternating rows, emphasised selection, status-bar footer */
.gx-table-wrap { padding: 0 var(--gx-s2); min-width: 0; }
.gx-table { table-layout: fixed; }
.gx-table th { height: 34px; padding: 0 var(--gx-s3); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 400; color: var(--gx-label-2); white-space: nowrap; border-bottom: 1px solid var(--gx-sep-strong); position: relative; }
.gx-table th + th::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 1px; background: var(--gx-sep); }
.gx-th-sort { position: relative; display: inline-flex; align-items: center; gap: var(--gx-s1); height: 28px; margin: 0 calc(var(--gx-s15) * -1); padding: 0 var(--gx-s15); border-radius: var(--gx-s15); color: inherit; }
.gx-th-sort:hover { background: var(--gx-hover); color: var(--gx-label); }
.gx-th-sort .gx-icon { opacity: 0; transition: transform .16s; }
th[aria-sort] .gx-th-sort { color: var(--gx-label); font-weight: 600; }
th[aria-sort] .gx-th-sort .gx-icon { opacity: 1; }
th[aria-sort="descending"] .gx-th-sort .gx-icon { transform: rotate(180deg); }
.gx-table td { height: var(--gx-table-row-h); padding: 0 var(--gx-s3); vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-table td:first-child { border-radius: var(--gx-r-row) 0 0 var(--gx-r-row); }
.gx-table td:last-child { border-radius: 0 var(--gx-r-row) var(--gx-r-row) 0; }
.gx-table td[data-cell="check"] { overflow: visible; text-overflow: clip; padding: 0 var(--gx-s1) 0 var(--gx-s2); }
.gx-table tbody tr:nth-child(even) td { background: var(--gx-stripe); }
.gx-table--select tbody tr { cursor: default; }
.gx-table--select tbody tr:not([aria-selected="true"]):hover td, .gx-table tbody tr[data-state="hover"] td { background: var(--gx-hover); }
.gx-table tbody tr[aria-selected="true"] td { background: var(--gx-accent-fill); }
.gx-table tbody tr:focus-visible { outline: none; }
.gx-table tbody tr:focus-visible td { box-shadow: inset 0 3px 0 var(--gx-focus), inset 0 -3px 0 var(--gx-focus); }
.gx-table tr.is-done .gx-cell__title { color: var(--gx-label-2); text-decoration: line-through; text-decoration-color: var(--gx-label-3); }
.gx-table--tall { --gx-table-row-h: 60px; }
.gx-w-xs { width: calc(48px * var(--gx-w-scale, 1)); } .gx-w-sm { width: calc(104px * var(--gx-w-scale, 1)); } .gx-w-md { width: calc(152px * var(--gx-w-scale, 1)); } .gx-w-lg { width: calc(196px * var(--gx-w-scale, 1)); }
.gx-table--tall td { padding-top: var(--gx-s2); padding-bottom: var(--gx-s2); }
.gx-cell__title { font-weight: 500; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.gx-cell__two small { margin-top: var(--gx-s1); }
.gx-cell { display: flex; align-items: center; gap: var(--gx-s25); min-width: 0; }
.gx-cell > span { overflow: hidden; text-overflow: ellipsis; }
.gx-cell__two { min-width: 0; display: grid; }
.gx-cell__two > * { overflow: hidden; text-overflow: ellipsis; }
.gx-cell__two b { font-weight: 600; }
.gx-cell__two small { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); }
.gx-scorebar { display: inline-flex; align-items: center; gap: var(--gx-s2); width: 100%; }
.gx-scorebar i { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--gx-accent) var(--v), var(--gx-fill-3) var(--v)); }
.gx-scorebar span { width: 22px; text-align: end; font-weight: 600; }
.gx-statusbar { display: flex; align-items: center; justify-content: center; gap: var(--gx-s2); min-height: 36px; margin-top: var(--gx-s2); padding: var(--gx-s2) var(--gx-s5) 0; border-top: 1px solid var(--gx-sep); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
.gx-statusbar--split { justify-content: space-between; }

/* a scope whose backdrop is the accent fill (selected table row): tokens flip once, every child follows */
.gx-on-accent, .gx-table tbody tr[aria-selected="true"] {
  --gx-label: #FFFFFF; --gx-label-2: #FFFFFF; --gx-label-3: rgba(255, 255, 255, .78);
  --gx-sep: rgba(255, 255, 255, .28); --gx-sep-strong: rgba(255, 255, 255, .44);
  --gx-fill-1: rgba(255, 255, 255, .30); --gx-fill-2: rgba(255, 255, 255, .24); --gx-fill-3: rgba(255, 255, 255, .22); --gx-fill-4: rgba(255, 255, 255, .14);
  --gx-accent: #FFFFFF; --gx-accent-text: #FFFFFF; --gx-focus: rgba(255, 255, 255, .8);
  --gx-blue-text: #FFFFFF; --gx-red-text: #FFFFFF; --gx-orange-text: #FFFFFF; --gx-yellow-text: #FFFFFF; --gx-green-text: #FFFFFF; --gx-mint-text: #FFFFFF; --gx-teal-text: #FFFFFF;
  --gx-cyan-text: #FFFFFF; --gx-indigo-text: #FFFFFF; --gx-purple-text: #FFFFFF; --gx-pink-text: #FFFFFF; --gx-brown-text: #FFFFFF; --gx-gray-text: #FFFFFF;
  --gx-tint-a: 0%; --gx-surface-solid: transparent;
  color: var(--gx-label);
}
.gx-on-accent .gx-tag, .gx-table tbody tr[aria-selected="true"] .gx-tag { background: var(--gx-fill-3); }

/* KPI tile */
.gx-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--gx-s3); row-gap: var(--gx-s1); padding: var(--gx-s4) var(--gx-s5); container-type: inline-size; }
.gx-kpi__label { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--gx-s2); color: var(--gx-label-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-kpi__value { margin-top: var(--gx-s15); font-size: var(--gx-fs-large); line-height: var(--gx-lh-large); font-weight: 700; white-space: nowrap; }
.gx-kpi__unit { font-size: .62em; font-weight: 600; color: var(--gx-label-2); margin: 0 1px; }
.gx-kpi__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--gx-s15); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); white-space: nowrap; overflow: hidden; }
.gx-kpi__cmp { overflow: hidden; text-overflow: ellipsis; }
.gx-spark { position: relative; justify-self: end; align-self: center; width: min(100%, 116px); height: 38px; margin-top: var(--gx-s15); color: var(--c); min-width: 0; }
.gx-spark svg { width: 100%; height: 100%; overflow: visible; }
.gx-spark path { vector-effect: non-scaling-stroke; }
.gx-spark i { position: absolute; right: -3px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--gx-surface-solid); }
@container (max-width: 190px) { .gx-spark { display: none; } }

/* charts — categorical order is fixed; a series is never identified by colour alone (dash + marker shape + direct label) */
.gx-legend { display: flex; flex-wrap: wrap; gap: var(--gx-s3) var(--gx-s8); margin-bottom: var(--gx-s4); }
.gx-legend__item { display: grid; gap: var(--gx-s05); }
.gx-legend__key { display: inline-flex; align-items: center; gap: var(--gx-s2); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); font-weight: 500; }
.gx-legend__key svg { width: 26px; height: 12px; overflow: visible; flex: none; }
.gx-legend__val { display: flex; align-items: baseline; gap: var(--gx-s2); font-size: var(--gx-fs-title1); line-height: var(--gx-lh-title1); font-weight: 700; }
.gx-legend__val small { font-size: var(--gx-fs-sub); font-weight: 500; color: var(--gx-label-2); }
.gx-legend__val .gx-delta { font-size: var(--gx-fs-sub); }
.gx-legend--compact { gap: var(--gx-s2) var(--gx-s5); margin-bottom: var(--gx-s3); }

.gx-chart { --s1: var(--gx-series-1); --s2: var(--gx-series-2); --s3: var(--gx-series-3); --s4: var(--gx-series-4); position: relative; padding-right: 36px; }
.gx-chart__plot { position: relative; height: var(--gx-chart-h, 216px); border-radius: var(--gx-s1); }
.gx-chart__plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gx-chart__plot path, .gx-chart__plot line { vector-effect: non-scaling-stroke; }
.gx-chart__grid line { stroke: var(--gx-sep); stroke-width: 1; stroke-dasharray: 2 3; }
.gx-chart__grid line.is-base { stroke: var(--gx-sep-strong); stroke-dasharray: none; }
.gx-chart__line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; stroke: var(--s1); }
.gx-chart__line--2 { stroke: var(--s2); stroke-dasharray: 6 4; }
.gx-chart__line--3 { stroke: var(--s3); stroke-dasharray: 1.5 4.5; }
.gx-chart__line--4 { stroke: var(--s4); stroke-dasharray: 9 4 2 4; }
.gx-chart__area { fill: var(--s1); opacity: .16; }
.gx-chart__area--2 { fill: var(--s2); opacity: .10; }
.gx-chart__bar { fill: var(--s1); }
.gx-chart__bar--2 { fill: var(--s2); }
.gx-chart__bar--muted { fill: var(--gx-fill-1); }
.gx-chart__y { position: absolute; top: 0; right: 0; height: var(--gx-chart-h, 216px); width: 30px; }
.gx-chart__y span { position: absolute; right: 0; transform: translateY(-50%); font-size: var(--gx-fs-caption); color: var(--gx-label-2); }
.gx-chart__x { position: relative; height: 18px; margin-top: var(--gx-s2); }
.gx-chart__x span { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); white-space: nowrap; }
.gx-chart__x span:first-child { transform: none; }
.gx-chart__x span:last-child { transform: translateX(-100%); }
.gx-chart__x--bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; text-align: center; }
.gx-chart__x--bars span, .gx-chart__x--bars span:first-child, .gx-chart__x--bars span:last-child { position: static; transform: none; }
.gx-chart__name { position: absolute; left: var(--gx-s2); transform: translateY(-135%); padding: 0 var(--gx-s1); border-radius: var(--gx-s1); background: var(--gx-surface-solid); font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); font-weight: 600; color: var(--ct); white-space: nowrap; }
.gx-chart__name--below { transform: translateY(35%); }
.gx-chart__rule { position: absolute; top: -6px; bottom: 0; width: 0; border-left: 1px solid var(--gx-sep-strong); pointer-events: none; }
.gx-chart__dot { position: absolute; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6.5px; border-radius: 50%; background: var(--s1); box-shadow: 0 0 0 2.5px var(--gx-surface-solid), 0 1px 3px 2px rgba(0, 0, 0, .12); }
.gx-chart__dot--2 { background: var(--s2); border-radius: 3px; }
.gx-chart__callout {
  position: absolute; bottom: calc(100% - 2px); left: 0; transform: translateX(-50%);
  display: grid; gap: var(--gx-s05); padding: var(--gx-s2) var(--gx-s3); border-radius: var(--gx-r-row); white-space: nowrap;
  background: var(--gx-surface-solid); box-shadow: var(--gx-shadow-raised);
  font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub);
}
.gx-chart__callout.is-start { transform: translateX(-12px); }
.gx-chart__callout.is-end { transform: translateX(calc(-100% + 12px)); }
.gx-chart__callout b { font-weight: 600; }
.gx-chart__callout span { display: flex; align-items: center; gap: var(--gx-s15); color: var(--gx-label-2); }
.gx-chart__callout span b { margin-left: auto; padding-left: var(--gx-s3); color: var(--gx-label); }
.gx-key { width: 9px; height: 9px; border-radius: 50%; background: var(--s1, var(--c)); flex: none; }
.gx-key--2 { border-radius: 2.5px; background: var(--s2); }
.gx-key--3 { border-radius: 0; transform: rotate(45deg) scale(.86); background: var(--s3); }
.gx-key--4 { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--s4); }
.gx-key--5 { border-radius: 2.5px; background: var(--gx-series-5); }
.gx-key--6 { background: var(--gx-series-6); }
/* donut */
.gx-donut { position: relative; width: 168px; flex: none; }
.gx-donut svg { width: 100%; height: auto; transform: rotate(-90deg); }
.gx-donut circle { fill: none; stroke-width: 15; }
.gx-donut__track { stroke: var(--gx-fill-3); }
.gx-donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gx-donut__num { font-size: var(--gx-fs-title1); line-height: var(--gx-lh-title1); font-weight: 700; }
.gx-donut__cap { font-size: var(--gx-fs-sub); color: var(--gx-label-2); }
.gx-donutrow { display: flex; align-items: center; gap: var(--gx-s6); flex-wrap: wrap; }
.gx-donutlist { flex: 1; min-width: 180px; display: grid; gap: var(--gx-s2); }
.gx-donutlist li { display: flex; align-items: center; gap: var(--gx-s2); }
.gx-donutlist li b { margin-left: auto; font-weight: 600; }

/* score gauge */
.gx-gauge { position: relative; width: 208px; margin: 0 auto; flex: none; }
.gx-gauge > svg { width: 100%; height: auto; overflow: visible; }
.gx-gauge__track { fill: none; stroke: var(--gx-fill-3); stroke-width: 13; stroke-linecap: round; }
.gx-gauge__value { fill: none; stroke-width: 13; stroke-linecap: round; }
.gx-gauge__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding-top: var(--gx-s2); }
.gx-gauge__num { font-size: 52px; line-height: 54px; font-weight: 700; }
.gx-gauge__of { color: var(--gx-label-2); font-size: var(--gx-fs-sub); }
.gx-gauge__state { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: center; gap: var(--gx-s2); align-items: center; font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); }
.gx-gauge__state b { color: var(--gx-label); font-weight: 600; }
.gx-subscores { display: grid; gap: var(--gx-s05); margin-top: var(--gx-s4); min-width: 0; }
.gx-subscore { display: flex; align-items: center; gap: var(--gx-s25); min-height: 36px; }
.gx-subscore__name { width: 60px; font-weight: 500; }
.gx-subscore__bar { flex: 1; height: 6px; border-radius: 3px; background: var(--gx-fill-3); overflow: hidden; }
.gx-subscore__bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.gx-subscore__val { width: 26px; text-align: end; font-weight: 600; }
.gx-trend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gx-s2); align-items: end; margin-top: var(--gx-s4); padding-top: var(--gx-s4); border-top: 1px solid var(--gx-sep); }
.gx-trend__m { display: grid; gap: var(--gx-s1); justify-items: center; font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); }
.gx-trend__m i { width: 100%; max-width: 30px; height: calc(var(--v) * .44px); border-radius: 5px; background: var(--gx-fill-1); }
.gx-trend__m b { font-weight: 600; color: var(--gx-label-2); }
.gx-trend__m.is-now i { background: var(--gx-accent); }
.gx-trend__m.is-now, .gx-trend__m.is-now b { color: var(--gx-label); font-weight: 700; }

/* AI approval card: what changes (now → after), why, then an equal-width Reject | Approve pair */
.gx-proposals { display: grid; gap: var(--gx-s2); margin: 0 calc(var(--gx-s2) * -1); }
.gx-proposal { padding: var(--gx-s3); border-radius: var(--gx-r-control); background: var(--gx-surface-inset); display: grid; gap: var(--gx-s2); }
.gx-proposal__ctx { display: flex; align-items: center; gap: var(--gx-s15); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
.gx-proposal__title { font-weight: 600; }
.gx-proposal__why { color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
.gx-diff { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--gx-s2); }
.gx-diff__side { padding: var(--gx-s2) var(--gx-s3); border-radius: var(--gx-r-small); background: var(--gx-surface-solid); box-shadow: 0 0 0 .5px var(--gx-sep-strong); display: grid; gap: 1px; min-width: 0; }
.gx-diff__side--after { background: color-mix(in srgb, var(--gx-accent) var(--gx-tint-a), var(--gx-surface-solid)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gx-accent) 40%, transparent); }
.gx-diff__cap { font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-diff__val { font-size: var(--gx-fs-title3); line-height: var(--gx-lh-title3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-diff__val small { font-size: var(--gx-fs-sub); font-weight: 500; color: var(--gx-label-2); }
.gx-diff > .gx-icon { color: var(--gx-label-2); }
.gx-proposal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gx-s2); }
.gx-proposal__done { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--gx-s2); min-height: var(--gx-btn-h); font-weight: 600; color: var(--gx-label); }
.gx-proposal__done .gx-icon { color: var(--gx-green-text); }
.gx-proposal__done .gx-btn { margin-left: auto; }
.gx-proposals__note { margin-top: var(--gx-s3); color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); display: flex; gap: var(--gx-s15); align-items: flex-start; }
.gx-proposals__note .gx-icon { flex: none; margin-top: 1px; }

/* calendar week strip */
.gx-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gx-day { position: relative; min-width: 0; padding: var(--gx-s2) var(--gx-s15); display: grid; align-content: start; gap: var(--gx-s15); border-radius: var(--gx-r-control); }
.gx-day + .gx-day::before { content: ""; position: absolute; left: 0; top: var(--gx-s2); bottom: var(--gx-s2); width: 1px; background: var(--gx-sep); }
.gx-day__head { display: grid; justify-items: center; gap: var(--gx-s05); padding-bottom: var(--gx-s15); }
.gx-day__name { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); font-weight: 500; }
.gx-day__num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: var(--gx-fs-title3); font-weight: 500; }
.gx-day--today { background: color-mix(in srgb, var(--gx-accent) 7%, transparent); }
.gx-day.gx-day--today::before, .gx-day--today + .gx-day::before { display: none; }
.gx-day--today .gx-day__num { background: var(--gx-accent-fill); color: #fff; font-weight: 700; }
.gx-day--today .gx-day__name { color: var(--gx-accent-text); font-weight: 700; }
.gx-day--off .gx-day__num, .gx-day--off .gx-day__name { color: var(--gx-label-2); }
.gx-post {
  display: grid; gap: 1px; padding: var(--gx-s15) var(--gx-s2); min-width: 0;
  border-radius: var(--gx-r-small);
  background: color-mix(in srgb, var(--c) var(--gx-tint-a), transparent);
  font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub);
}
.gx-post__type { display: flex; align-items: center; gap: var(--gx-s1); font-weight: 600; color: var(--ct); white-space: nowrap; overflow: hidden; }
.gx-post__type .gx-icon { width: 13px; height: 13px; stroke-width: 2.3; }
.gx-post__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.gx-post__time { color: var(--gx-label-2); font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-post--draft { background: repeating-linear-gradient(135deg, var(--gx-fill-4) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px var(--gx-sep-strong); }
.gx-day__empty { text-align: center; color: var(--gx-label-2); padding: var(--gx-s15) 0; }

/* kanban */
.gx-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: var(--gx-s3); overflow-x: auto; padding-bottom: var(--gx-s1); }
.gx-kcol { display: grid; align-content: start; gap: var(--gx-s2); padding: var(--gx-s2); border-radius: 18px; background: var(--gx-surface-inset); min-width: 0; }
.gx-kcol__head { display: flex; align-items: center; gap: var(--gx-s2); min-height: var(--gx-btn-h); padding: 0 var(--gx-s1) 0 var(--gx-s2); font-weight: 600; }
.gx-kcol__head .gx-iconbtn { margin-left: auto; }
.gx-kcard { display: grid; gap: var(--gx-s2); padding: var(--gx-s3); border-radius: var(--gx-r-row); background: var(--gx-surface-solid); box-shadow: var(--gx-shadow-card); }
.gx-kcard__title { font-weight: 500; }
.gx-kcard__meta { display: flex; align-items: center; gap: var(--gx-s2); color: var(--gx-label-2); font-size: var(--gx-fs-sub); }
.gx-kcard__meta .gx-avatar { margin-left: auto; }
.gx-kcard--drag { transform: rotate(2deg); box-shadow: var(--gx-shadow-raised); }
.gx-kcol__drop { height: 44px; border-radius: var(--gx-r-row); border: 1.5px dashed var(--gx-sep-strong); display: grid; place-items: center; color: var(--gx-label-2); font-size: var(--gx-fs-sub); }

/* AI assistant: bubbles + prompt input */
.gx-chat { display: grid; gap: var(--gx-s3); align-content: start; }
.gx-msg { display: flex; align-items: flex-end; gap: var(--gx-s2); max-width: min(100%, 560px); }
.gx-msg--me { margin-left: auto; flex-direction: row-reverse; }
.gx-bubble { padding: var(--gx-s25) var(--gx-s4); border-radius: 20px 20px 20px 6px; background: var(--gx-fill-3); min-width: 0; }
.gx-msg--me .gx-bubble { border-radius: 20px 20px 6px 20px; background: var(--gx-accent-fill); color: #fff; }
.gx-bubble p + p { margin-top: var(--gx-s2); }
.gx-msg__meta { font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); margin-top: var(--gx-s1); }
.gx-typing { display: inline-flex; gap: var(--gx-s1); padding: var(--gx-s1) 0; }
.gx-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gx-label-3); animation: gx-blink 1.2s infinite both; }
.gx-typing i:nth-child(2) { animation-delay: .15s; } .gx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gx-blink { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
.gx-prompt { display: flex; align-items: flex-end; gap: var(--gx-s1); padding: var(--gx-s1); border-radius: 26px; background: var(--gx-field); box-shadow: inset 0 0 0 1px var(--gx-field-rim), 0 4px 14px -6px rgba(16, 24, 48, .16); }
.gx-prompt:focus-within { box-shadow: inset 0 0 0 1.5px var(--gx-accent), 0 0 0 3.5px var(--gx-focus); }
.gx-prompt textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 160px; padding: var(--gx-s25) var(--gx-s2); border: 0; background: none; resize: none; outline: none; line-height: var(--gx-lh-body); }
.gx-prompt textarea::placeholder { color: var(--gx-label-2); opacity: 1; }
.gx-prompt .gx-btn, .gx-prompt .gx-iconbtn { width: 40px; height: 40px; border-radius: 50%; padding: 0; }
.gx-prompt .gx-btn .gx-icon { width: 20px; height: 20px; }
.gx-chips { display: flex; flex-wrap: wrap; gap: var(--gx-s2); }

/* firms: collection (cards) — the grid view; the list view is .gx-table + .gx-inspector */
.gx-filterbar { display: flex; align-items: center; gap: var(--gx-s3); margin-bottom: var(--gx-s4); flex-wrap: wrap; }
.gx-filterbar__info { margin-left: auto; color: var(--gx-label-2); display: inline-flex; align-items: center; gap: var(--gx-s15); }
.gx-firms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gx-s4); }
.gx-firmcard { display: grid; gap: var(--gx-s4); padding: var(--gx-s5) var(--gx-s5) 0; transition: transform .2s var(--gx-ease), box-shadow .2s; overflow: hidden; }
.gx-firmcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 96px; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent); }
.gx-firmcard > * { position: relative; }
.gx-firmcard:hover { transform: translateY(-2px); box-shadow: var(--gx-shadow-raised), var(--gx-card-rim); }
.gx-firmcard__head { display: flex; align-items: center; gap: var(--gx-s3); }
.gx-firmcard__titles { flex: 1; min-width: 0; display: grid; gap: 1px; }
.gx-firmcard__name { font-size: var(--gx-fs-title2); line-height: var(--gx-lh-title2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-firmcard__name a::after { content: ""; position: absolute; inset: 0; }
.gx-firmcard__sector { color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-firmcard .gx-iconbtn { z-index: 1; }
.gx-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gx-s15); min-width: 0; }
.gx-platform { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--gx-fill-3); color: var(--gx-label); z-index: 1; }
.gx-platform .gx-icon { width: 17px; height: 17px; }
.gx-platform--off { background: none; box-shadow: inset 0 0 0 1px var(--gx-sep-strong); color: var(--gx-label-3); }
.gx-platform--off::before { content: ""; position: absolute; width: 1.5px; height: 62%; background: var(--gx-label-2); transform: rotate(45deg); border-radius: 1px; box-shadow: 0 0 0 1.5px var(--gx-surface-solid); }
.gx-platforms--sm .gx-platform { width: 26px; height: 26px; }
.gx-platforms--sm .gx-platform .gx-icon { width: 14px; height: 14px; }
.gx-platforms__note { margin-left: auto; color: var(--gx-label-2); font-size: var(--gx-fs-sub); white-space: nowrap; }
.gx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--gx-sep); margin: 0 calc(var(--gx-s5) * -1); }
.gx-stat { position: relative; display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 84px; padding: var(--gx-s25) var(--gx-s15); text-align: center; min-width: 0; }
.gx-stat + .gx-stat::before { content: ""; position: absolute; left: 0; top: var(--gx-s4); bottom: var(--gx-s4); width: 1px; background: var(--gx-sep); }
.gx-stat__cap { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); font-weight: 500; }
.gx-stat__val { font-size: var(--gx-fs-title2); line-height: var(--gx-lh-title2); font-weight: 700; display: inline-flex; align-items: center; gap: var(--gx-s15); }
.gx-stat__val--muted { color: var(--gx-label-2); }
.gx-stat .gx-status { font-size: var(--gx-fs-callout); line-height: var(--gx-lh-title2); }
.gx-stat__sub { font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-view="list"] .gx-view-grid, [data-view="grid"] .gx-view-list { display: none; }

/* login */
.gx-login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--gx-s6) var(--gx-s4); overflow: hidden; position: relative; }
.gx-login .gx-canvas {
  background:
    radial-gradient(60vw 70vh at 20% 14%, color-mix(in srgb, var(--gx-firm) var(--gx-glow-firm), transparent), transparent 70%),
    radial-gradient(56vw 66vh at 82% 18%, var(--gx-glow-2), transparent 70%),
    radial-gradient(58vw 68vh at 74% 88%, var(--gx-glow-3), transparent 70%),
    radial-gradient(58vw 70vh at 16% 90%, var(--gx-glow-4), transparent 70%),
    radial-gradient(46vw 56vh at 50% 50%, var(--gx-glow-5), transparent 72%),
    var(--gx-canvas);
}
/* the product's own icon tiles, resting behind the glass (decorative, clipped to the window) */
.gx-orbit { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gx-orbit .gx-ico { position: absolute; left: var(--x); top: var(--y); width: var(--s, 56px); height: var(--s, 56px); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); opacity: var(--op, 1); filter: blur(var(--b, 0px)) drop-shadow(0 14px 22px color-mix(in srgb, var(--c) 34%, transparent)); }
.gx-login__wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; width: min(440px, 100%); }
.gx-login__panel { --gx-glass-regular: var(--gx-glass-login); position: relative; width: 100%; padding: var(--gx-s8) var(--gx-s6) var(--gx-s6); border-radius: 34px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gx-s5); }
.gx-login__brand { display: grid; justify-items: center; gap: var(--gx-s3); text-align: center; }
.gx-login__title { font-size: var(--gx-fs-large); line-height: var(--gx-lh-large); font-weight: 700; margin-top: var(--gx-s1); }
.gx-login__sub { color: var(--gx-label-2); margin-top: calc(var(--gx-s2) * -1); }
.gx-or { display: flex; align-items: center; gap: var(--gx-s3); color: var(--gx-label-2); font-size: var(--gx-fs-sub); }
.gx-or::before, .gx-or::after { content: ""; flex: 1; height: 1px; background: var(--gx-sep-strong); }
.gx-login__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gx-s3); }
.gx-login__row { display: flex; align-items: center; justify-content: space-between; gap: var(--gx-s3); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); flex-wrap: wrap; }
.gx-login__foot { position: relative; margin-top: var(--gx-s5); display: flex; justify-content: center; align-items: center; gap: var(--gx-s4); flex-wrap: wrap; }
.gx-login__foot > span:last-child { padding: var(--gx-s15) var(--gx-s3); border-radius: var(--gx-r-pill); color: var(--gx-label-2); font-size: var(--gx-fs-sub); }

/* component kit + gallery pages (docs only) */
.gx-main--solo { margin-left: 0; }
.gx-toolbar--solo { left: 0; }
.gx-kit { display: grid; gap: var(--gx-s10); }
.gx-kit__section { display: grid; gap: var(--gx-s4); scroll-margin-top: calc(var(--gx-bar-h) + var(--gx-s4)); }
.gx-kit__h { font-size: var(--gx-fs-title1); line-height: var(--gx-lh-title1); font-weight: 700; }
.gx-kit__p { color: var(--gx-label-2); max-width: 78ch; margin-top: calc(var(--gx-s2) * -1); }
.gx-kit__p code, .gx-spec code { font-family: var(--gx-font-mono); font-size: .88em; padding: 1px var(--gx-s1); border-radius: var(--gx-s1); background: var(--gx-fill-3); color: var(--gx-label); }
.gx-spec { display: grid; gap: var(--gx-s3); align-content: start; }
.gx-spec__label { font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); color: var(--gx-label-2); font-weight: 600; }
.gx-spec__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gx-s3); }
.gx-spec__row--top { align-items: flex-start; }
.gx-spec__cap { font-size: var(--gx-fs-caption); line-height: var(--gx-lh-caption); color: var(--gx-label-2); }
.gx-spec__unit { display: grid; gap: var(--gx-s15); justify-items: center; }
.gx-spec__unit--start { justify-items: start; }
/* a stage puts colour behind glass specimens, the way the canvas does in the app */
.gx-stage {
  position: relative; padding: var(--gx-s5); border-radius: var(--gx-r-card); overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--gx-s4);
  box-shadow: inset 0 0 0 .5px var(--gx-sep-strong);
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--gx-blue) 34%, transparent), transparent 62%),
    radial-gradient(50% 110% at 60% -10%, var(--gx-glow-2), transparent 62%),
    radial-gradient(50% 120% at 100% 100%, var(--gx-glow-4), transparent 62%),
    radial-gradient(40% 100% at 30% 110%, var(--gx-glow-3), transparent 62%),
    var(--gx-canvas);
}
.gx-stage--dim::after { content: ""; position: absolute; inset: 0; background: var(--gx-scrim); z-index: -1; }
.gx-swatch { display: grid; gap: var(--gx-s15); justify-items: center; width: 84px; text-align: center; }
.gx-swatch i { width: 100%; height: 40px; border-radius: var(--gx-r-row); background: var(--c); box-shadow: inset 0 0 0 .5px var(--gx-sep-strong); }
.gx-type-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: baseline; gap: var(--gx-s4); padding: var(--gx-s2) 0; }
.gx-type-row + .gx-type-row { border-top: 1px solid var(--gx-sep); }
.gx-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gx-s4); }
.gx-shot { display: grid; gap: var(--gx-s2); padding: var(--gx-s3); }
.gx-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--gx-r-row); box-shadow: 0 0 0 .5px var(--gx-sep-strong); background: var(--gx-fill-4); }
.gx-shot--phone img { aspect-ratio: 8 / 9; }
.gx-shot__title { font-weight: 600; padding: 0 var(--gx-s1); }
.gx-shot__links { display: flex; flex-wrap: wrap; gap: var(--gx-s1) var(--gx-s3); padding: 0 var(--gx-s1) var(--gx-s1); font-size: var(--gx-fs-sub); }

/* 6. RESPONSIVE ------------------------------------------------------------- */
/* 6a. content reflows by the width it actually has (container queries on .gx-main__inner),
       so a docked sidebar or an open inspector never breaks a grid */
@container gx-main (max-width: 1040px) {
  .gx-split { grid-template-columns: minmax(0, 1fr); }
  .gx-split > .gx-stack { display: contents; }
  .gx-split > .gx-stack > * { order: var(--o, 0); }
  .gx-score { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--gx-s8); align-items: center; }
  .gx-score > .gx-card__head, .gx-score > .gx-trend { grid-column: 1 / -1; }
  .gx-score .gx-subscores { margin-top: 0; }
  .gx-firms, .gx-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-proposals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container gx-main (max-width: 860px) {
  .gx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-col-opt { display: none; }
}
@container gx-main (max-width: 680px) {
  .gx-proposals { grid-template-columns: minmax(0, 1fr); }
  .gx-firms, .gx-cols-2, .gx-cols-3 { grid-template-columns: minmax(0, 1fr); }
  .gx-filterbar__info { display: none; }
  .gx-type-row { grid-template-columns: minmax(0, 1fr); gap: var(--gx-s1); }
  /* any table marked .gx-table--stack becomes a list: cells stack, data-label supplies the caption */
  .gx-table--stack, .gx-table--stack tbody { display: block; }
  .gx-table--stack thead, .gx-table--stack colgroup { display: none; }
  .gx-table--stack tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--gx-s4); row-gap: var(--gx-s1); padding: var(--gx-s3); border-radius: var(--gx-r-control); }
  .gx-table--stack.gx-table--checks tr { padding-left: calc(var(--gx-hit) + var(--gx-s3)); }
  .gx-table--stack tr + tr::before { content: ""; position: absolute; top: 0; left: var(--gx-s3); right: var(--gx-s3); height: 1px; background: var(--gx-sep); }
  .gx-table--stack tbody tr:nth-child(even) td { background: none; }
  .gx-table--stack tbody tr[aria-selected="true"] { background: var(--gx-accent-fill); }
  .gx-table--stack tbody tr[aria-selected="true"] td { background: none; }
  .gx-table--stack td { display: flex; align-items: center; gap: var(--gx-s15); flex: none; max-width: 100%; height: auto; min-height: 0; padding: 0; white-space: normal; overflow: visible; border-radius: 0; text-align: start; }
  .gx-table--stack td[data-cell="check"] { position: absolute; left: var(--gx-s1); top: var(--gx-s2); padding: 0; }
  .gx-table--stack td[data-cell="primary"] { flex: 0 0 100%; font-weight: 600; }
  .gx-table--stack td[data-label] { color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); min-height: 28px; }
  .gx-table--stack td[data-label]::before { content: attr(data-label); flex: none; }
  .gx-table--stack td[data-label] .gx-cell, .gx-table--stack td[data-label] .gx-due, .gx-table--stack td[data-label] .gx-status { color: var(--gx-label); }
  .gx-table--stack td.gx-col-opt { display: flex; }
  .gx-table--stack .gx-scorebar { max-width: 160px; }
  .gx-statusbar { flex-wrap: wrap; }
}
@container gx-main (max-width: 560px) {
  .gx-score { grid-template-columns: minmax(0, 1fr); }
  .gx-score .gx-subscores { margin-top: var(--gx-s4); }
  .gx-card__head { flex-wrap: wrap; row-gap: var(--gx-s2); }
  .gx-card__head > .gx-card__titles:first-child { flex-basis: 100%; }
  .gx-card__head > .gx-card__titles:first-child ~ .gx-card__tools { margin-left: 0; }
  .gx-legend { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gx-s3); }
  .gx-legend:has(+ .gx-chart .gx-chart__callout) { margin-bottom: 84px; }
  .gx-card__foot { flex-wrap: wrap; }
  .gx-card__foot .gx-progress { flex: 1 0 100%; }
  .gx-card__foot .gx-progress__bar { flex: 1; width: auto; max-width: none; }
  .gx-legend__val { flex-wrap: wrap; column-gap: var(--gx-s2); row-gap: 0; }
  .gx-legend__val small { display: none; }
  .gx-kpi { padding: var(--gx-s3) var(--gx-s4); }
  .gx-kpi__cmp { display: none; }
  .gx-row__title { white-space: normal; }
  .gx-row:has(> .gx-btn) { flex-wrap: wrap; }
  .gx-row:has(> .gx-btn) > .gx-row__body { flex-basis: calc(100% - 60px); }
  .gx-row > .gx-btn { margin-left: 44px; }
  .gx-row__meta { flex-wrap: wrap; row-gap: var(--gx-s1); }
  .gx-row__meta > span { white-space: normal; }
  .gx-week { grid-template-columns: repeat(7, 148px); overflow-x: auto; margin: 0 calc(var(--gx-s5) * -1); padding: 0 var(--gx-s4) var(--gx-s2); scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .gx-day { scroll-snap-align: start; }
  .gx-filterbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gx-gutter) * -1); padding-inline: var(--gx-gutter); }
  .gx-chart { --gx-chart-h: 184px; }
}

/* 6b. touch: the platform's default (Large) text sizes and 44 px targets */
@media (max-width: 1099px), (pointer: coarse) {
  :root {
    --gx-fs-display: 44px; --gx-lh-display: 48px;
    --gx-fs-large: 34px;   --gx-lh-large: 41px;
    --gx-fs-title1: 28px;  --gx-lh-title1: 34px;
    --gx-fs-title2: 22px;  --gx-lh-title2: 28px;
    --gx-fs-title3: 20px;  --gx-lh-title3: 25px;
    --gx-fs-body: 17px;    --gx-lh-body: 22px;
    --gx-fs-callout: 16px; --gx-lh-callout: 21px;
    --gx-fs-sub: 15px;     --gx-lh-sub: 20px;
    --gx-fs-caption: 13px; --gx-lh-caption: 18px;
    --gx-control-h: 44px; --gx-btn-h: 40px; --gx-btn-sm-h: 36px; --gx-field-h: 50px; --gx-input-h: 44px;
    --gx-row-h: 44px; --gx-list-row-h: 64px; --gx-table-row-h: 52px; --gx-hit: 44px;
    --gx-ico: 28px; --gx-avatar: 30px;
    --gx-sidebar-w: 320px; --gx-gutter: 20px; --gx-bar-h: 76px;
    --gx-r-row: 12px; --gx-w-scale: 1.14;
  }
  /* visuals under 44 px keep a 44 px hit region */
  .gx-btn::after, .gx-tab-item::after, .gx-pager__btn::after, .gx-seg--content .gx-seg__opt::after { content: ""; position: absolute; inset: -2px 0; }
  .gx-btn--sm::after { inset: -4px 0; }
  .gx-pill__btn { min-width: 44px; height: calc(var(--gx-control-h) - 4px); }
  .gx-pill { padding: 0 var(--gx-s05); }
  .gx-seg__opt span { height: calc(var(--gx-control-h) - 6px); }
  .gx-seg--icons .gx-seg__opt span { min-width: 44px; }
  .gx-nav__item { gap: var(--gx-s3); padding-left: var(--gx-s2); }
  .gx-firm, .gx-account { height: 60px; }
  .gx-mono { width: 36px; height: 36px; }
  .gx-mono--sm { width: 28px; height: 28px; }
  .gx-tag { height: 28px; padding: 0 var(--gx-s3) 0 var(--gx-s25); }
  .gx-choice__box, .gx-check__box { width: 24px; height: 24px; }
  .gx-toggle__track { width: 51px; height: 31px; border-radius: 16px; }
  .gx-toggle__track::after { width: 27px; height: 27px; }
  .gx-toggle input:checked + .gx-toggle__track::after { transform: translateX(20px); }
  .gx-toggle, .gx-choice { min-height: 44px; }
  .gx-platform { width: 36px; height: 36px; }
  .gx-subscore { min-height: 44px; }
  .gx-subscore__name { width: 68px; }
  .gx-day__num { width: 36px; height: 36px; }
  .gx-th-sort { height: 44px; }
  .gx-table th { height: 44px; }
  .gx-rowitem { min-height: 48px; }
  .gx-field__label { width: 116px; }
  .gx-menu__row { min-height: 52px; }
}

/* 6c. compact windows: the sidebar becomes an overlay drawer */
@media (max-width: 1099px) {
  .gx-sidebar { transform: translateX(calc(-100% - 24px)); visibility: hidden; z-index: 45; transition: transform var(--gx-dur) var(--gx-ease), visibility 0s var(--gx-dur); }
  :root[data-sidebar="open"] .gx-sidebar { transform: none; visibility: visible; opacity: 1; transition: transform var(--gx-dur) var(--gx-ease), visibility 0s; }
  :root[data-sidebar="open"] .gx-backdrop { opacity: 1; pointer-events: auto; }
  .gx-toolbar { left: 0; }
  .gx-main { margin-left: 0; }
  .gx-toolbar .gx-toolbar__toggle { display: inline-flex; }
  .gx-toolbar .gx-search { display: none; }
  .gx-toolbar__show-sm { display: inline-flex !important; }
  .gx-kitnav { display: none; }
}
/* below a full-size desktop window the inspector stops pushing content and floats over it */
@media (max-width: 1439px) {
  :root[data-inspector="open"] .gx-has-inspector .gx-main, :root[data-inspector="open"] .gx-has-inspector.gx-main { margin-right: 0; }
  :root[data-inspector="open"] .gx-has-inspector .gx-toolbar { right: 0; }
  .gx-inspector { z-index: 46; box-shadow: -1px 0 0 var(--gx-sep-strong), -24px 0 60px -20px rgba(16, 24, 48, .35); width: min(var(--gx-inspector-w), calc(100vw - 48px)); }
  :root[data-inspector="open"] .gx-backdrop--inspector { opacity: 1; pointer-events: auto; z-index: 45; }
}

/* 6d. phone: floating glass tab bar + round "Diğer" button; the sidebar becomes the "Diğer" sheet */
@media (max-width: 600px) {
  :root { --gx-gutter: 16px; --gx-bar-h: 64px; --gx-sidebar-w: auto; --gx-r-card: 24px; }
  body.gx-app { padding-bottom: 104px; }
  .gx-toolbar { gap: var(--gx-s2); }
  .gx-toolbar__toggle, .gx-toolbar__titles, .gx-toolbar .gx-seg, .gx-toolbar__hide-sm { display: none !important; }
  .gx-toolbar .gx-toolbar__firm { display: inline-flex; padding: 0 var(--gx-s3) 0 var(--gx-s1); gap: var(--gx-s2); max-width: 58vw; font-weight: 600; min-width: 0; }
  .gx-toolbar__firm > span:not(.gx-mono) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gx-toolbar .gx-btn--lg { width: var(--gx-control-h); padding: 0; }
  .gx-toolbar .gx-btn--lg > span { display: none; }
  .gx-main { padding-top: calc(var(--gx-bar-h) + var(--gx-s1)); padding-bottom: var(--gx-s6); }
  .gx-pagehead { display: grid; gap: var(--gx-s05); margin-bottom: var(--gx-s4); }
  .gx-pagehead__title { font-size: var(--gx-fs-large); line-height: var(--gx-lh-large); font-weight: 700; }
  .gx-pagehead__sub { color: var(--gx-label-2); font-size: var(--gx-fs-sub); line-height: var(--gx-lh-sub); }
  .gx-pagehead__tools { display: flex; gap: var(--gx-s2); margin-top: var(--gx-s3); }
  .gx-stack, .gx-kpis, .gx-split, .gx-firms { gap: var(--gx-s3); }
  .gx-card { padding: var(--gx-s4); }
  .gx-card--flush { padding: var(--gx-s4) 0 var(--gx-s2); }
  .gx-card--flush > .gx-card__head { padding: 0 var(--gx-s4); }
  .gx-row { padding-left: var(--gx-s3); padding-right: var(--gx-s4); }
  .gx-kpi__value { font-size: var(--gx-fs-title1); line-height: var(--gx-lh-title1); }
  .gx-kpi__label { font-size: var(--gx-fs-caption); gap: var(--gx-s15); }
  .gx-card__tools .gx-iconbtn[data-gx-tip] { display: none; }
  .gx-kpi .gx-ico { width: 24px; height: 24px; }

  .gx-tabbar { position: fixed; z-index: 34; left: var(--gx-s3); right: var(--gx-s3); bottom: max(var(--gx-s3), env(safe-area-inset-bottom)); display: flex; gap: var(--gx-s2); pointer-events: none; }
  .gx-tabbar > * { pointer-events: auto; }

  .gx-sidebar {
    top: auto; left: var(--gx-s2); right: var(--gx-s2); bottom: var(--gx-s2); width: auto; height: min(86dvh, 760px);
    border-radius: 34px; padding: var(--gx-s15) var(--gx-s4) var(--gx-s4);
    transform: translateY(calc(100% + 24px));
    --gx-glass-regular: var(--gx-glass-thick);
  }
  .gx-sidebar__grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--gx-label-3); margin: var(--gx-s1) auto var(--gx-s15); flex: none; }
  .gx-sidebar__head .gx-iconbtn { border-radius: 50%; background: var(--gx-fill-2); width: 36px; height: 36px; }
  .gx-sidebar__head .gx-iconbtn::after { content: ""; position: absolute; inset: -4px; }
  .gx-only-wide { display: none !important; }
  .gx-only-phone { display: revert !important; }
  .gx-sidebar .gx-firm { display: none; }
  .gx-nav { margin: 0 calc(var(--gx-s4) * -1); padding: 0 var(--gx-s4) var(--gx-s2); }
  .gx-backdrop { z-index: 44; }

  .gx-sheet { inset: auto var(--gx-s2) var(--gx-s2) var(--gx-s2); width: auto; margin: 0; border-radius: 34px; padding: var(--gx-s2) var(--gx-s4) var(--gx-s4); }
  .gx-sheet[open] { animation-name: gx-sheet-up; }
  .gx-sheet__grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--gx-label-3); margin: 0 auto var(--gx-s4); }
  .gx-sheet__foot { display: grid; grid-template-columns: 1fr 1fr; }
  .gx-sheet__foot .gx-btn { height: 50px; }
  .gx-menu { min-width: min(300px, calc(100vw - 16px)); }
  .gx-inspector { top: auto; left: var(--gx-s2); right: var(--gx-s2); bottom: var(--gx-s2); width: auto; height: min(80dvh, 720px); border-radius: 34px; transform: translateY(calc(100% + 24px)); box-shadow: var(--gx-shadow-pop); overflow: hidden; }
  .gx-inspector__bar { height: 60px; }
  .gx-login__panel { padding: var(--gx-s6) var(--gx-s5) var(--gx-s5); }
  .gx-orbit .gx-ico:nth-child(n+3) { display: none; }
  .gx-kit__h { font-size: var(--gx-fs-title2); line-height: var(--gx-lh-title2); }
  .gx-swatch { width: 72px; }
}
@keyframes gx-sheet-up { from { transform: translateY(40%); opacity: 0; } }
.gx-toolbar__show-sm { display: none; }
.gx-only-phone { display: none; }

/* 7. ACCESSIBILITY VARIANTS -------------------------------------------------- */
/* Token overrides for Increase Contrast and Reduce Transparency are generated in section 1
   (media query + data-contrast / data-transparency twins). Only structural rules live here. */

/* Reduce Transparency: the scroll-edge band becomes a plain fade */
@media (prefers-reduced-transparency: reduce) {
  .gx-toolbar::before { background: linear-gradient(180deg, var(--gx-canvas) 40%, transparent); }
  .gx-inspector { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
:root[data-transparency="reduce"] .gx-toolbar::before { background: linear-gradient(180deg, var(--gx-canvas) 40%, transparent); }
:root[data-transparency="reduce"] .gx-inspector { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Increase Contrast: selection and controls get a visible outline */
@media (prefers-contrast: more) {
  .gx-nav__item[aria-current="page"], .gx-tab[aria-current="page"], .gx-tab-item[aria-selected="true"], .gx-seg__opt input:checked + span { box-shadow: inset 0 0 0 1.5px var(--gx-label); }
  .gx-btn:not(.gx-btn--prominent):not(.gx-btn--destructive):not(.gx-btn--plain), .gx-seg--content, .gx-tag, .gx-badge { box-shadow: inset 0 0 0 1px var(--gx-sep-strong); }
  .gx-card--ai::after { opacity: 1; }
}
:root[data-contrast="more"] .gx-nav__item[aria-current="page"], :root[data-contrast="more"] .gx-tab[aria-current="page"], :root[data-contrast="more"] .gx-tab-item[aria-selected="true"], :root[data-contrast="more"] .gx-seg__opt input:checked + span { box-shadow: inset 0 0 0 1.5px var(--gx-label); }
:root[data-contrast="more"] .gx-btn:not(.gx-btn--prominent):not(.gx-btn--destructive):not(.gx-btn--plain), :root[data-contrast="more"] .gx-seg--content, :root[data-contrast="more"] .gx-tag, :root[data-contrast="more"] .gx-badge { box-shadow: inset 0 0 0 1px var(--gx-sep-strong); }
:root[data-contrast="more"] .gx-card--ai::after { opacity: 1; }

/* Reduce Motion: no movement, state changes stay instant */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .gx-firmcard:hover { transform: none; }
  .gx-skel { animation: none; }
}
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

/* Windows High Contrast / forced colours: system colours, real borders, no material tricks */
@media (forced-colors: active) {
  .gx-glass, .gx-card, .gx-inspector, .gx-kcard, .gx-kcol, .gx-proposal, .gx-diff__side, .gx-form, .gx-input, .gx-textarea, .gx-select select, .gx-popup, .gx-btn, .gx-tag, .gx-badge, .gx-banner, .gx-bubble, .gx-prompt { border: 1px solid CanvasText; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gx-glass::before, .gx-card--ai::after, .gx-canvas, .gx-toolbar::before { display: none; }
  .gx-ico, .gx-mono, .gx-avatar { forced-color-adjust: none; }
  .gx-nav__item[aria-current="page"], .gx-tab[aria-current="page"], .gx-seg__opt input:checked + span, .gx-table tbody tr[aria-selected="true"] td, .gx-tab-item[aria-selected="true"] { background: Highlight; color: HighlightText; forced-color-adjust: none; }
  .gx-btn--prominent { background: Highlight; color: HighlightText; forced-color-adjust: none; }
  .gx-toggle__track, .gx-choice__box, .gx-check__box { border: 1.5px solid CanvasText; }
  .gx-toggle input:checked + .gx-toggle__track, .gx-choice input:checked + .gx-choice__box, .gx-check input:checked + .gx-check__box { background: Highlight; forced-color-adjust: none; }
  .gx-progress__bar i, .gx-subscore__bar i { background: Highlight; forced-color-adjust: none; }
  :focus-visible { outline-color: Highlight; }
}

@media print {
  .gx-sidebar, .gx-toolbar, .gx-tabbar, .gx-canvas, .gx-inspector { display: none !important; }
  .gx-main { margin: 0; padding: 0; }
}
