/* shared/styles/tokens.css */
/* Grav Commerce design tokens — shared by the website and the portal.
   Raw palette (--gc-*) never changes with theme; semantic tokens (--bg, --text, …) do.
   Use semantic tokens in components. Scope a region with .theme-dark / .theme-light. */

:root {
  /* Ink — near-black with a cold blue undertone */
  --gc-ink-1000: #05070a;
  --gc-ink-950: #080a0f;
  --gc-ink-900: #0d1017;
  --gc-ink-850: #12161f;
  --gc-ink-800: #181d28;
  --gc-ink-700: #232a38;
  --gc-ink-600: #323b4d;
  --gc-slate-500: #5d6679;
  --gc-slate-400: #8a92a3;
  --gc-slate-300: #b6bcc8;
  --gc-slate-200: #d8dce3;
  --gc-slate-150: #e4e6eb;
  --gc-slate-100: #eef0f3;
  /* Paper — warm off-white */
  --gc-paper-200: #ebe8df;
  --gc-paper-100: #f4f2ec;
  --gc-paper-50: #f9f8f4;
  --gc-white: #ffffff;

  /* Flare — the brand accent (a star at the bottom of a gravity well) */
  --gc-flare-50: #fff3ec;
  --gc-flare-100: #ffe1cf;
  --gc-flare-200: #ffc09d;
  --gc-flare-300: #ff9a66;
  --gc-flare-400: #ff7a3d;
  --gc-flare-500: #ff5a1f;
  --gc-flare-600: #e8460d;
  --gc-flare-700: #b9360a;
  --gc-flare-800: #8c2a0b;
  --gc-gold-400: #ffc24a;
  --gc-gold-500: #ffb020;

  /* Orbit — cool secondary for data, focus and links in dark UI */
  --gc-orbit-100: #e6e9ff;
  --gc-orbit-300: #a9b2ff;
  --gc-orbit-400: #8592ff;
  --gc-orbit-500: #5b6cff;
  --gc-orbit-600: #4351e8;
  --gc-orbit-700: #3440b8;

  /* Status */
  --gc-mint-500: #14b88a;
  --gc-mint-600: #0e9670;
  --gc-mint-700: #0a7556;
  --gc-mint-100: #d9f6ec;
  --gc-amber-500: #f0a020;
  --gc-amber-600: #b87405;
  --gc-amber-700: #925c03;
  --gc-amber-100: #fdf0d5;
  --gc-red-500: #ef4444;
  --gc-red-600: #c42a2a;
  --gc-red-100: #fde3e3;
  --gc-sky-500: #2f8cff;
  --gc-sky-100: #e0eeff;

  --gc-gradient-flare: linear-gradient(135deg, var(--gc-gold-500) 0%, var(--gc-flare-500) 55%, #e8336b 100%);
  --gc-gradient-orbit: linear-gradient(135deg, var(--gc-orbit-400), #7d5bff 60%, var(--gc-flare-500));

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-2xs: 0.6875rem;  /* 11 */
  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.875rem;    /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-md: 1.0625rem;   /* 17 */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.5rem;      /* 24 */
  --text-2xl: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  --text-3xl: clamp(2.125rem, 1.6rem + 2vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.7rem + 3.2vw, 4.25rem);
  --text-5xl: clamp(2.875rem, 1.6rem + 5vw, 5.75rem);

  --leading-tight: 1.08;
  --leading-snug: 1.25;
  --leading-normal: 1.55;
  --tracking-tight: -0.035em;
  --tracking-snug: -0.02em;
  --tracking-wide: 0.08em;

  /* Space (4px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 999px;

  --container: 1200px;
  --container-wide: 1360px;
  --container-narrow: 760px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration: 200ms;
  --duration-slow: 420ms;

  --z-dropdown: 40;
  --z-sticky: 50;
  --z-overlay: 80;
  --z-modal: 90;
  --z-toast: 100;
}

/* ---- Semantic tokens: light (default) ---- */
:root,
.theme-light {
  color-scheme: light;
  --bg: var(--gc-paper-50);
  --bg-subtle: var(--gc-paper-100);
  --bg-muted: var(--gc-paper-200);
  --surface: var(--gc-white);
  --surface-raised: var(--gc-white);
  --surface-sunken: var(--gc-paper-100);
  --text: var(--gc-ink-900);
  --text-strong: var(--gc-ink-1000);
  --text-muted: #4b5466;
  --text-subtle: var(--gc-slate-500);
  --text-inverse: var(--gc-white);
  --border: rgba(13, 16, 23, 0.1);
  --border-strong: rgba(13, 16, 23, 0.18);
  --border-subtle: rgba(13, 16, 23, 0.06);
  --accent: var(--gc-flare-500);
  --accent-hover: var(--gc-flare-600);
  --accent-text: var(--gc-flare-700);     /* accent-coloured text with AA contrast */
  --accent-soft: var(--gc-flare-50);
  --accent-contrast: var(--gc-ink-1000);  /* text on an accent fill */
  --primary: var(--gc-ink-900);           /* primary button fill */
  --primary-hover: var(--gc-ink-700);
  --primary-text: var(--gc-white);
  --link: var(--gc-ink-900);
  --link-decoration: var(--gc-flare-500);
  --focus: var(--gc-orbit-500);
  --focus-ring: 0 0 0 3px rgba(91, 108, 255, 0.35);
  --success: var(--gc-mint-700);    /* AA (≥4.5:1) on --success-soft and white */
  --success-soft: var(--gc-mint-100);
  --warning: var(--gc-amber-700);   /* AA (≥4.5:1) on --warning-soft and white */
  --warning-soft: var(--gc-amber-100);
  --danger: var(--gc-red-600);
  --danger-soft: var(--gc-red-100);
  --info: var(--gc-orbit-600);
  --info-soft: var(--gc-orbit-100);
  --shadow-xs: 0 1px 2px rgba(13, 16, 23, 0.06);
  --shadow-sm: 0 1px 2px rgba(13, 16, 23, 0.06), 0 2px 6px rgba(13, 16, 23, 0.04);
  --shadow-md: 0 2px 4px rgba(13, 16, 23, 0.04), 0 8px 24px -6px rgba(13, 16, 23, 0.12);
  --shadow-lg: 0 4px 8px rgba(13, 16, 23, 0.04), 0 24px 56px -12px rgba(13, 16, 23, 0.22);
  --shadow-glow: 0 0 0 1px rgba(255, 90, 31, 0.2), 0 12px 40px -8px rgba(255, 90, 31, 0.45);
  --grid-line: rgba(13, 16, 23, 0.06);
}

/* ---- Semantic tokens: dark ---- */
.theme-dark,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: var(--gc-ink-950);
  --bg-subtle: var(--gc-ink-900);
  --bg-muted: var(--gc-ink-850);
  --surface: var(--gc-ink-900);
  --surface-raised: var(--gc-ink-850);
  --surface-sunken: var(--gc-ink-1000);
  --text: #e7e9ee;
  --text-strong: var(--gc-white);
  --text-muted: #a3aab8;
  --text-subtle: #7c8496;
  --text-inverse: var(--gc-ink-950);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --accent: var(--gc-flare-500);
  --accent-hover: var(--gc-flare-400);
  --accent-text: var(--gc-flare-300);
  --accent-soft: rgba(255, 90, 31, 0.12);
  --accent-contrast: var(--gc-ink-1000);
  --primary: var(--gc-white);
  --primary-hover: var(--gc-slate-150);
  --primary-text: var(--gc-ink-950);
  --link: var(--gc-white);
  --link-decoration: var(--gc-flare-400);
  --focus: var(--gc-orbit-400);
  --focus-ring: 0 0 0 3px rgba(133, 146, 255, 0.45);
  --success: #3ddbaa;
  --success-soft: rgba(20, 184, 138, 0.14);
  --warning: #f7b955;
  --warning-soft: rgba(240, 160, 32, 0.14);
  --danger: #ff7b7b;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: var(--gc-orbit-300);
  --info-soft: rgba(91, 108, 255, 0.16);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 32px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.35), 0 32px 72px -16px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 0 1px rgba(255, 90, 31, 0.35), 0 16px 56px -8px rgba(255, 90, 31, 0.5);
  --grid-line: rgba(255, 255, 255, 0.05);
}

/* Whole-document dark mode: follows the OS unless the page pins data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: var(--gc-ink-950);
    --bg-subtle: var(--gc-ink-900);
    --bg-muted: var(--gc-ink-850);
    --surface: var(--gc-ink-900);
    --surface-raised: var(--gc-ink-850);
    --surface-sunken: var(--gc-ink-1000);
    --text: #e7e9ee;
    --text-strong: var(--gc-white);
    --text-muted: #a3aab8;
    --text-subtle: #7c8496;
    --text-inverse: var(--gc-ink-950);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --accent-text: var(--gc-flare-300);
    --accent-hover: var(--gc-flare-400);
    --accent-soft: rgba(255, 90, 31, 0.12);
    --primary: var(--gc-white);
    --primary-hover: var(--gc-slate-150);
    --primary-text: var(--gc-ink-950);
    --link: var(--gc-white);
    --link-decoration: var(--gc-flare-400);
    --focus: var(--gc-orbit-400);
    --focus-ring: 0 0 0 3px rgba(133, 146, 255, 0.45);
    --success: #3ddbaa;
    --success-soft: rgba(20, 184, 138, 0.14);
    --warning: #f7b955;
    --warning-soft: rgba(240, 160, 32, 0.14);
    --danger: #ff7b7b;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --info: var(--gc-orbit-300);
    --info-soft: rgba(91, 108, 255, 0.16);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 32px -8px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.35), 0 32px 72px -16px rgba(0, 0, 0, 0.7);
    --grid-line: rgba(255, 255, 255, 0.05);
  }
}


/* shared/styles/fonts.css */
/* Self-hosted fonts (SIL OFL 1.1, see shared/fonts/LICENSE-*.txt). Paths are relative to this file. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('/assets/shared/fonts/Inter-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url('/assets/shared/fonts/Inter-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/shared/fonts/InstrumentSerif-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/shared/fonts/InstrumentSerif-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/assets/shared/fonts/InstrumentSerif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/assets/shared/fonts/InstrumentSerif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/shared/fonts/JetBrainsMono-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/shared/fonts/JetBrainsMono-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }


/* shared/styles/base.css */
/* Grav Commerce base: reset, typography, layout primitives. Requires tokens.css (+ fonts.css). */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, h4, h5, h6, li, dd, blockquote, figcaption { overflow-wrap: break-word; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--border); }
::selection { background: color-mix(in srgb, var(--gc-flare-500) 28%, transparent); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-weight: 620;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-3xl); line-height: 1.12; letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5, h6 { font-size: var(--text-base); }
p { text-wrap: pretty; }

/* Serif emphasis inside headings: <h1>Commerce with <em class="serif">gravity</em></h1> */
.serif, h1 em, h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.text-accent { color: var(--accent-text); }
.text-gradient {
  background: var(--gc-gradient-flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a { color: var(--link); text-decoration-line: underline; text-decoration-color: var(--link-decoration); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color var(--duration-fast); }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
}
kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  padding: 0.05em 0.4em;
  font-size: 0.8em;
  background: var(--surface);
}
pre {
  background: var(--gc-ink-950);
  color: #dfe3ea;
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
  line-height: 1.6;
  font-size: var(--text-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: calc(var(--container-wide) + 2 * var(--gutter)); }
.container-narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.stack > * + * { margin-top: var(--stack-gap, var(--space-4)); }
.stack-sm { --stack-gap: var(--space-2); }
.stack-lg { --stack-gap: var(--space-8); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, var(--space-3)); align-items: center; }
.grid { display: grid; gap: var(--grid-gap, var(--space-6)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: var(--z-toast);
  background: var(--primary); color: var(--primary-text); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--accent-text);
}
.lead { font-size: var(--text-lg); line-height: 1.55; color: var(--text-muted); max-width: 46rem; }


/* shared/styles/ui.css */
/* Grav Commerce shared UI components (buttons, forms, badges, cards, alerts, tables).
   Used by both the website and the portal. Requires tokens.css + base.css. */

/* ---- Buttons ---- */
.btn {
  --btn-h: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h); padding: 0 1.15rem;
  border-radius: var(--radius-full); border: 1px solid transparent;
  font-size: var(--text-sm); font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background var(--duration) var(--ease-out), color var(--duration), border-color var(--duration), box-shadow var(--duration), transform var(--duration-fast);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-text); }
.btn-accent { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 6px 20px -6px rgba(255, 90, 31, 0.6); }
.btn-accent:hover { background: var(--gc-flare-400); color: var(--accent-contrast); }
.btn-secondary { background: var(--surface); color: var(--text-strong); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--text-subtle); color: var(--text-strong); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }
.btn-link { background: none; padding: 0; min-height: 0; color: var(--accent-text); border-radius: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { --btn-h: 2.125rem; padding: 0 0.85rem; font-size: var(--text-xs); }
.btn-lg { --btn-h: 3.25rem; padding: 0 1.5rem; font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn .arrow { transition: transform var(--duration) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Badges & pills ---- */
.badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.2em 0.6em; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border-subtle);
}
.badge-dot::before { content: ''; width: 0.45em; height: 0.45em; border-radius: 50%; background: currentColor; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-outline { background: transparent; border-color: var(--border-strong); }

/* ---- Forms ---- */
.field { display: grid; gap: var(--space-2); }
.field + .field { margin-top: var(--space-4); }
.label { font-size: var(--text-sm); font-weight: 600; color: var(--text-strong); }
.label .optional { font-weight: 400; color: var(--text-subtle); }
.hint { font-size: var(--text-xs); color: var(--text-subtle); }
.error-text { font-size: var(--text-xs); color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 2.75rem; padding: 0.6rem 0.85rem;
  background: var(--surface); color: var(--text-strong);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  font-size: var(--text-sm); line-height: 1.4;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  box-shadow: var(--shadow-xs);
}
.textarea { min-height: 7rem; resize: vertical; }
.select {
  appearance: none; padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a92a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-subtle); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: var(--focus-ring); }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.6; cursor: not-allowed; }
.input-mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-sm); cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; accent-color: var(--accent); flex: none; }
.form-row { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.form-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; margin-top: var(--space-6); }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; color: var(--text-strong); margin-bottom: var(--space-3); }
/* Honeypot field for spam protection */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: var(--space-6); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { font-size: var(--text-base); }
.card-body { padding: var(--space-6); }
.card-footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color var(--duration), box-shadow var(--duration), transform var(--duration) var(--ease-out); }
.card-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }

/* ---- Alerts / callouts ---- */
.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-subtle); font-size: var(--text-sm);
}
.alert svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.1rem; }
.alert-success { background: var(--success-soft); border-color: transparent; color: var(--text-strong); }
.alert-success svg { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: transparent; color: var(--text-strong); }
.alert-warning svg { color: var(--warning); }
.alert-danger { background: var(--danger-soft); border-color: transparent; color: var(--text-strong); }
.alert-danger svg { color: var(--danger); }
.alert-info { background: var(--info-soft); border-color: transparent; color: var(--text-strong); }
.alert-info svg { color: var(--info); }

/* ---- Tables ---- */
.table { width: 100%; font-size: var(--text-sm); }
.table th { text-align: left; font-weight: 600; font-size: var(--text-xs); color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.05em; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-subtle); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- Misc ---- */
.divider { height: 1px; background: var(--border); border: 0; margin: var(--space-6) 0; }
.avatar {
  --size: 2rem; width: var(--size); height: var(--size); border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  font-size: calc(var(--size) * 0.4); font-weight: 650; color: #fff;
  background: var(--gc-gradient-orbit);
}
.icon { width: 1.25em; height: 1.25em; flex: none; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; display: inline-block; }
.copy-field { display: flex; align-items: stretch; gap: 0; }
.copy-field .input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.copy-field .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; min-height: 2.75rem; }
.spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gc-spin 0.7s linear infinite; }
@keyframes gc-spin { to { transform: rotate(360deg); } }


/* portal/public/portal.css */
/* Grav Commerce portal — app shell, auth shell and component kit styles.
   Built on shared/styles (tokens, base, ui). Feature styles go in public/features/<feature>.css. */

/* ===== Base ============================================================== */
body.portal, body.auth { font-size: 0.875rem; background: var(--bg); min-height: 100vh; }
body.portal h1, body.portal h2, body.portal h3 { letter-spacing: -0.015em; }
.strong { font-weight: 600; color: var(--text-strong); }
.hide-sm { }
.badge-neutral { background: var(--bg-muted); color: var(--text-muted); border-color: transparent; }
.badge-gold { background: color-mix(in srgb, var(--gc-gold-500) 18%, transparent); color: var(--gc-amber-700); border-color: transparent; }
.theme-dark .badge-gold, :root[data-theme='dark'] .badge-gold { color: var(--gc-gold-400); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .badge-gold { color: var(--gc-gold-400); } }
.avatar { background: linear-gradient(135deg, hsl(var(--avatar-hue, 250) 80% 62%), hsl(calc(var(--avatar-hue, 250) + 40) 85% 52%)); letter-spacing: 0.01em; }
.code-chip { font-family: var(--font-mono); font-size: 0.78rem; background: var(--bg-subtle); border: 1px solid var(--border-subtle); border-radius: var(--radius-xs); padding: 0.15em 0.45em; white-space: nowrap; color: var(--text-strong); }
.mono { font-size: 0.92em; }

/* ===== App shell ========================================================= */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--bg-subtle); border-right: 1px solid var(--border);
  scrollbar-width: thin;
}
.sidebar-top { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2) 0; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text-strong); font-weight: 680; letter-spacing: -0.02em; font-size: 0.98rem; }
.brand:hover { color: var(--text-strong); }
.brand-mark { flex: none; color: var(--text-strong); }
.brand-light, .brand-light .brand-mark { color: #fff; }
.area-pill { margin-left: auto; flex: none; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.45rem; border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.area-pill.area-hq { background: var(--gc-ink-900); color: #fff; border-color: transparent; }
.area-pill.area-partner { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
:root[data-theme='dark'] .area-pill.area-hq { background: var(--gc-flare-500); color: var(--gc-ink-1000); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .area-pill.area-hq { background: var(--gc-flare-500); color: var(--gc-ink-1000); } }
.sidebar-close { display: none; margin-left: var(--space-1); }
.sidebar-scrim { display: none; }
.brand-name { white-space: nowrap; }

.org-card { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.org-avatar { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; color: #fff; background: var(--gc-gradient-flare); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.org-text { display: grid; min-width: 0; line-height: 1.3; }
.org-name { font-weight: 620; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-meta { font-size: 0.75rem; color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-nav { display: grid; gap: var(--space-4); }
.nav-group ul { display: grid; gap: 1px; padding: 0; margin: 0; list-style: none; }
.nav-group-label { font-size: 0.68rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); padding: 0 var(--space-3) var(--space-2); }
.nav-item {
  display: flex; align-items: center; gap: 0.7rem; min-height: 2.15rem; padding: 0 var(--space-3);
  border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-weight: 520; font-size: 0.86rem;
  border: 1px solid transparent; transition: background var(--duration-fast), color var(--duration-fast);
}
.nav-item .icon { color: var(--text-subtle); transition: color var(--duration-fast); }
.nav-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-strong); }
.nav-item:hover .icon { color: var(--text); }
.nav-item.is-active { background: var(--surface); color: var(--text-strong); border-color: var(--border); box-shadow: var(--shadow-xs); font-weight: 600; }
.nav-item.is-active .icon { color: var(--accent); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { font-size: 0.7rem; font-weight: 650; min-width: 1.35rem; padding: 0.05rem 0.4rem; text-align: center; border-radius: var(--radius-full); background: var(--accent); color: var(--accent-contrast); font-variant-numeric: tabular-nums; }
.nav-ext { opacity: 0.6; }
.sidebar-bottom { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); }
.sidebar-bottom ul { list-style: none; padding: 0; display: grid; gap: 1px; }
.nav-item-quiet { font-size: 0.8rem; min-height: 1.95rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--space-3); min-height: 3.5rem; padding: 0 var(--space-8);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.menu-btn { display: none; }
.breadcrumbs { min-width: 0; flex: 1; }
.breadcrumbs ol { display: flex; align-items: center; gap: var(--space-1); list-style: none; padding: 0; margin: 0; font-size: 0.8125rem; color: var(--text-subtle); white-space: nowrap; overflow: hidden; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; }
.breadcrumbs li:last-child { flex: 1 1 auto; min-width: 0; }
.breadcrumbs li:last-child span { display: block; color: var(--text-strong); font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs a { color: var(--text-subtle); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-strong); }
.crumb-sep { opacity: 0.5; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.btn-icon { --btn-h: 2.25rem; width: var(--btn-h); padding: 0; border-radius: var(--radius-sm); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: none; }
}

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-2); padding: 0.2rem 0.5rem 0.2rem 0.2rem; border-radius: var(--radius-full); border: 1px solid transparent; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--surface); border-color: var(--border); }
.user-menu-name { font-weight: 560; color: var(--text-strong); max-width: 12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-caret { color: var(--text-subtle); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown); min-width: 15rem;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-1); animation: menu-in var(--duration) var(--ease-out);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu-head { display: grid; padding: var(--space-3); line-height: 1.35; }
.menu-head strong { color: var(--text-strong); }
.menu-head span { color: var(--text-subtle); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; }
.menu-item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 0.5rem var(--space-3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 0.86rem; text-align: left; }
.menu-item:hover { background: var(--bg-subtle); color: var(--text-strong); }
.menu-item .icon { color: var(--text-subtle); }
.menu-sep { margin: var(--space-1) 0; border-color: var(--border-subtle); }

/* ===== Page ============================================================== */
.page { width: 100%; max-width: none; margin: 0; padding: var(--space-8) var(--space-8) var(--space-16); outline: none; }
.page-wide { max-width: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-8); }
.page-header-text { min-width: 0; max-width: 52rem; }
.page-back { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 0.8125rem; color: var(--text-subtle); text-decoration: none; margin-bottom: var(--space-3); }
.page-back:hover { color: var(--text-strong); }
.page-eyebrow { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--space-2); }
.page-title { font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem); line-height: 1.15; font-weight: 650; letter-spacing: -0.025em; }
.page-subtitle { margin-top: var(--space-2); color: var(--text-muted); font-size: 0.95rem; }
.page-meta { margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.page > * + * { margin-top: var(--space-6); }
.page > .toasts + * { margin-top: 0; }
.page > .page-header + * { margin-top: 0; }

.p-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.p-section-head h2 { font-size: 1.05rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: var(--space-6); align-items: start; }
.two-col-main, .two-col-aside { display: grid; gap: var(--space-6); min-width: 0; }
.two-col.aside-first { grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); }
.p-grid { display: grid; gap: var(--gap, var(--space-6)); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 16rem)), 1fr)); }

/* ===== Cards ============================================================= */
.p-card { overflow: hidden; }
.p-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.p-card-title { font-size: 0.95rem; font-weight: 640; line-height: 1.4; }
.p-card-subtitle { font-size: 0.8125rem; color: var(--text-subtle); margin-top: 0.15rem; }
.p-card-actions { display: flex; gap: var(--space-2); align-items: center; flex-shrink: 0; }
.p-card-body { padding: var(--space-5); }
.p-card-body > * + * { margin-top: var(--space-4); }
.p-card-flush { padding: 0; }
.p-card-flush > .empty-state { margin: var(--space-4); }
.p-card-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border-subtle); background: var(--bg-subtle); font-size: 0.8125rem; color: var(--text-muted); }

/* ===== Stats ============================================================= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); gap: var(--space-4); }
.stat-card { padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-2); position: relative; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.stat-label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.78rem; font-weight: 560; color: var(--text-muted); }
.stat-label .icon { color: var(--text-subtle); }
.stat-value { font-size: 1.75rem; font-weight: 650; letter-spacing: -0.03em; color: var(--text-strong); line-height: 1.1; }
.stat-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); min-height: 1.25rem; }
.stat-hint { font-size: 0.78rem; color: var(--text-subtle); }
.stat-delta { font-size: 0.72rem; font-weight: 650; padding: 0.1rem 0.45rem; border-radius: var(--radius-full); background: var(--bg-muted); color: var(--text-muted); }
.stat-delta.is-up { background: var(--success-soft); color: var(--success); }
.stat-delta.is-down { background: var(--danger-soft); color: var(--danger); }
.sparkline { flex: none; overflow: visible; }
.sparkline .spark-line { fill: none; stroke: var(--spark, var(--accent)); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .spark-area { fill: var(--spark, var(--accent)); opacity: 0.12; }
.sparkline .spark-dot { fill: var(--spark, var(--accent)); }
.sparkline.tone-orbit { --spark: var(--gc-orbit-500); }
.sparkline.tone-mint { --spark: var(--gc-mint-500); }
.sparkline.tone-muted { --spark: var(--text-subtle); }

.bar-chart { margin: 0; }
.bar-chart-bars { display: flex; align-items: flex-end; gap: var(--space-3); height: calc(var(--chart-h) + 2.6rem); padding-top: var(--space-2); }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.bar { width: 100%; max-width: 3.5rem; height: var(--h, 2px); min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--gc-flare-400), var(--gc-flare-600)); }
.bar.tone-orbit { background: linear-gradient(180deg, var(--gc-orbit-400), var(--gc-orbit-600)); }
.bar.tone-mint { background: linear-gradient(180deg, var(--gc-mint-500), var(--gc-mint-600)); }
.bar.tone-muted { background: var(--bg-muted); }
.bar-value { font-size: 0.75rem; font-weight: 600; color: var(--text-strong); }
.bar-label { font-size: 0.72rem; color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.meter { display: grid; gap: var(--space-2); }
.meter-head { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 0.8rem; color: var(--text-muted); }
.meter-track { height: 6px; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.meter-track span { display: block; height: 100%; border-radius: inherit; background: var(--meter, var(--accent)); }
.meter.tone-warning { --meter: var(--gc-amber-500); }
.meter.tone-danger { --meter: var(--gc-red-500); }
.meter.tone-muted { --meter: repeating-linear-gradient(45deg, var(--border-strong) 0 6px, transparent 6px 12px); }
.meter.tone-success { --meter: var(--gc-mint-500); }

/* ===== Tables ============================================================ */
.p-table th { background: var(--bg-subtle); font-size: 0.7rem; padding: 0.6rem var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.p-table td { padding: 0.75rem var(--space-5); color: var(--text); }
.p-table.is-dense td { padding: 0.45rem var(--space-5); }
.p-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3.5%, var(--surface)); }
.p-table tr[data-href] { cursor: pointer; }
.p-table .row-link { color: var(--text-strong); font-weight: 580; text-decoration: none; }
.p-table .row-link:hover { color: var(--accent-text); text-decoration: underline; }
.p-table .align-right { text-align: right; }
.p-table .align-center { text-align: center; }
.p-table th.align-right { text-align: right; }
/* Contain absolutely positioned descendants (e.g. visually-hidden labels in row forms) inside the
   horizontal scroller, so wide tables never widen the page on phones. */
.table-wrap { position: relative; }
.card > .table-wrap:first-child .p-table th:first-child, .p-card-flush .p-table th:first-child { border-top-left-radius: 0; }
.row-actions { display: inline-flex; gap: var(--space-1); justify-content: flex-end; align-items: center; }
.inline-form { display: inline-flex; margin: 0; }

/* ===== Forms ============================================================= */
.p-form > .field + .field, .p-form > .field + .form-row, .p-form > .form-row + .field, .p-form > .form-row + .form-row, .p-form > .alert + *, .p-form > .choice-cards + * { margin-top: var(--space-4); }
.p-form .form-row > .field + .field { margin-top: 0; }
.form-row { align-items: start; }
.req { color: var(--danger); }
.field-inline { grid-template-columns: 12rem 1fr; align-items: center; }
.error-list { margin: var(--space-1) 0 0; padding-left: 1.1rem; }
.input[readonly] { background: var(--bg-subtle); color: var(--text-muted); }
.check-hint { display: block; margin-top: 0.15rem; }
.choice-cards { display: grid; gap: var(--space-2); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--space-3); }
.choice-card { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: border-color var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast); }
.choice-card:hover { border-color: var(--text-subtle); }
.choice-card input { margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
.choice-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.choice-body { display: grid; gap: 0.2rem; }
.choice-title { font-weight: 650; color: var(--text-strong); display: inline-flex; gap: var(--space-2); align-items: center; }
.choice-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.filter-search { position: relative; flex: 1 1 16rem; max-width: 24rem; display: block; }
.filter-search .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.filter-search .input { padding-left: 2.25rem; min-height: 2.25rem; }
.filter-select .select { min-height: 2.25rem; padding-top: 0.35rem; padding-bottom: 0.35rem; width: auto; min-width: 9rem; }
.card > .filter-bar, .p-card-header + .filter-bar { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border-subtle); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 0.8125rem; }
.p-card-flush + .p-card-footer .pagination, .p-card-footer .pagination { margin: 0; }

.tabs { border-bottom: 1px solid var(--border); }
.tabs ul { display: flex; gap: var(--space-1); list-style: none; padding: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.65rem 0.8rem; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-muted); text-decoration: none; font-weight: 560; white-space: nowrap; }
.tab:hover { color: var(--text-strong); }
.tab.is-active { color: var(--text-strong); border-bottom-color: var(--accent); }
.tab-count { font-size: 0.7rem; font-weight: 650; padding: 0.05rem 0.4rem; border-radius: var(--radius-full); background: var(--bg-muted); color: var(--text-muted); }

.detail-list { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: var(--space-4) var(--space-6); margin: 0; }
.detail-item { min-width: 0; }
.detail-item dt { font-size: 0.75rem; font-weight: 560; color: var(--text-subtle); margin-bottom: 0.2rem; }
.detail-item dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }

.kv-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.kv { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-full); overflow: hidden; font-size: 0.75rem; }
.kv-k { padding: 0.15rem 0.5rem; background: var(--bg-subtle); color: var(--text-subtle); }
.kv-v { padding: 0.15rem 0.55rem; color: var(--text-strong); font-weight: 560; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 1.75rem 1fr; gap: var(--space-3); position: relative; padding-bottom: var(--space-4); }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: calc(0.875rem - 0.5px); top: 1.85rem; bottom: 0.25rem; width: 1px; background: var(--border); }
.timeline-icon { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.timeline-item.tone-accent .timeline-icon { background: var(--accent-soft); color: var(--accent-text); }
.timeline-item.tone-success .timeline-icon { background: var(--success-soft); color: var(--success); }
.timeline-item.tone-warning .timeline-icon { background: var(--warning-soft); color: var(--warning); }
.timeline-item.tone-danger .timeline-icon { background: var(--danger-soft); color: var(--danger); }
.timeline-item.tone-info .timeline-icon { background: var(--info-soft); color: var(--info); }
.timeline-content { min-width: 0; padding-top: 0.2rem; }
.timeline-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.timeline-title { font-weight: 580; color: var(--text-strong); overflow-wrap: anywhere; }
.timeline-at { font-size: 0.75rem; color: var(--text-subtle); white-space: nowrap; }
.timeline-actor { font-size: 0.78rem; color: var(--text-subtle); overflow-wrap: anywhere; }
.timeline-body { margin-top: var(--space-2); color: var(--text); }

.empty-state { text-align: center; padding: var(--space-12) var(--space-6); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state.is-compact { padding: var(--space-8) var(--space-6); border: 0; background: transparent; }
.empty-icon { width: 3rem; height: 3rem; margin: 0 auto var(--space-4); display: grid; place-items: center; border-radius: 14px; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.empty-state h3 { font-size: 1rem; margin-bottom: var(--space-1); }
.empty-state p { color: var(--text-muted); max-width: 26rem; margin: 0 auto; }
.empty-action { margin-top: var(--space-5); display: flex; justify-content: center; gap: var(--space-2); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); counter-reset: step; }
.checklist li { display: grid; grid-template-columns: 1.6rem 1fr; column-gap: var(--space-3); counter-increment: step; }
.checklist li::before { content: counter(step); grid-row: span 2; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); background: var(--bg-muted); border: 1px solid var(--border); }
.checklist li.is-done::before { content: '✓'; background: var(--success-soft); color: var(--success); border-color: transparent; }
.checklist strong { color: var(--text-strong); font-weight: 600; }
.checklist span { color: var(--text-muted); font-size: 0.8125rem; }

.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle); }
.setting-row:last-child { border-bottom: 0; }
.setting-text h3 { font-size: 0.9rem; }
.setting-text p { color: var(--text-muted); font-size: 0.8125rem; margin-top: 0.15rem; }
.profile-head { display: flex; align-items: center; gap: var(--space-3); }
.profile-head div { display: grid; line-height: 1.35; }

/* ===== Toasts & dialog =================================================== */
.toasts { position: fixed; top: var(--space-4); right: var(--space-4); z-index: var(--z-toast); display: grid; gap: var(--space-2); width: min(24rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--space-3); padding: 0.75rem 0.85rem; border-radius: var(--radius-md); background: var(--gc-ink-900); color: #f1f3f6; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.08); font-size: 0.86rem; animation: toast-in var(--duration-slow) var(--ease-out); }
.toast .icon { flex: none; margin-top: 0.05rem; }
.toast-success .icon { color: #3ddbaa; }
.toast-info .icon { color: var(--gc-orbit-300); }
.toast-warning .icon { color: #f7b955; }
.toast-danger .icon { color: #ff7b7b; }
.toast-msg { flex: 1; line-height: 1.45; }
.toast-close { color: rgba(255,255,255,0.6); padding: 0.1rem; border-radius: 4px; }
.toast-close:hover { color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

.confirm-dialog { margin: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-lg); width: min(28rem, calc(100vw - 2rem)); }
.confirm-dialog::backdrop { background: rgba(5, 7, 10, 0.5); backdrop-filter: blur(3px); }
.confirm-dialog[open] { animation: menu-in var(--duration) var(--ease-out); }
.confirm-inner { padding: var(--space-6); }
.confirm-inner h2 { font-size: 1.1rem; }
.confirm-message { color: var(--text-muted); margin-top: var(--space-2); }
.confirm-inner .form-actions { justify-content: flex-end; }

/* ===== Error state ======================================================= */
.error-state { text-align: center; max-width: 32rem; margin: var(--space-16) auto; }
.error-state .error-code, .error-code { font-family: var(--font-serif); font-style: italic; font-size: 4.5rem; line-height: 1; background: var(--gc-gradient-flare); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: var(--space-3); }
.error-state h1 { font-size: 1.5rem; }
.error-state p { color: var(--text-muted); margin-top: var(--space-2); }
.center-cluster { justify-content: center; margin-top: var(--space-6); }

/* ===== Auth shell ======================================================== */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-start; gap: var(--space-6);
  padding: var(--space-10) clamp(2rem, 4vw, 4rem);
  background: radial-gradient(120% 80% at 50% 110%, #1a1020 0%, var(--gc-ink-950) 55%), var(--gc-ink-950);
  color: var(--text);
}
.auth-art-bg { position: relative; width: 100%; max-width: 34rem; height: clamp(12rem, 32vh, 22rem); margin: auto; flex: 0 1 auto; pointer-events: none; }
.gravity-art { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .gravity-art .ga-sat { display: none; } }
.auth-art-copy { position: relative; max-width: 30rem; margin-top: clamp(1.5rem, 5vh, 4rem); }

.auth-art-copy h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; margin: var(--space-3) 0 var(--space-4); color: #fff; }
.auth-art-copy h2 em { color: var(--gc-flare-300); }
.auth-art-copy > p { color: #b9c0cc; font-size: 1rem; max-width: 26rem; }
.auth-art .eyebrow { color: var(--gc-flare-300); }
.auth-points { list-style: none; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: var(--space-3); }
.auth-points li { display: flex; align-items: center; gap: var(--space-3); color: #d7dbe3; font-size: 0.9rem; }
.auth-points .icon { color: var(--gc-flare-300); padding: 0.35rem; width: 1.9rem; height: 1.9rem; border-radius: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.auth-art-foot { margin-top: auto; display: flex; gap: var(--space-2); font-size: 0.8rem; color: #8a92a3; }
.auth-art-foot a { color: #b9c0cc; text-decoration: none; }
.auth-art-foot a:hover { color: #fff; }

.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-12) var(--space-6); outline: none; }
.auth-brand-mobile { display: none; margin-bottom: var(--space-8); }
.auth-card { width: 100%; max-width: 25rem; }
.auth-card.is-wide { max-width: 34rem; }
.auth-card > .toasts { position: static; width: auto; margin-bottom: var(--space-4); }
.auth-card > .toasts:empty { display: none; }
.auth-title { font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.15; }
.auth-subtitle { color: var(--text-muted); margin-top: var(--space-2); font-size: 0.95rem; }
.auth-card > .alert, .auth-card > .auth-form, .auth-card > .auth-success { margin-top: var(--space-6); }
.auth-form .input { min-height: 2.9rem; font-size: 0.95rem; }
.auth-form .btn-lg { margin-top: var(--space-6); }
.auth-row { display: flex; justify-content: flex-end; margin-top: var(--space-2); font-size: 0.8125rem; }
.auth-row a, .auth-footer a { color: var(--text-strong); font-weight: 560; }
.auth-footer { margin-top: var(--space-8); text-align: center; color: var(--text-muted); font-size: 0.875rem; display: grid; gap: var(--space-1); }
.auth-theme { position: absolute; top: var(--space-4); right: var(--space-4); }
.auth-success { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--success-soft); color: var(--text-strong); }
.auth-success .icon { color: var(--success); flex: none; }
.auth .error-code { font-size: 3.5rem; margin-top: var(--space-4); }

/* ===== Responsive ======================================================== */
@media (max-width: 1100px) {
  .two-col, .two-col.aside-first { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: var(--z-modal);
    transform: translateX(-102%); transition: transform var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow); box-shadow: none; visibility: hidden;
  }
  .sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); visibility: visible; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(5, 7, 10, 0.45); opacity: 0; pointer-events: none; transition: opacity var(--duration-slow); }
  .sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .sidebar-close { display: inline-flex; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 var(--space-4); }
  .page { padding: var(--space-6) var(--space-4) var(--space-12); }
  .user-menu-name { display: none; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-brand-mobile { display: inline-flex; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  /* Only the parent and the current page fit in the mobile top bar. */
  .breadcrumbs li:not(:nth-last-child(-n + 2)) { display: none; }
  .breadcrumbs li:nth-last-child(2) > .crumb-sep { display: none; }
  /* Card headers wrap: actions (filters, buttons) drop below the title instead of overflowing. */
  .p-card-header { flex-wrap: wrap; }
  .p-card-actions { flex-shrink: 1; flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .detail-list { grid-template-columns: minmax(0, 1fr); }
  .page-header { align-items: flex-start; }
  .field-inline { grid-template-columns: 1fr; }
  .setting-row { grid-template-columns: 1fr; }
  .p-table th, .p-table td { padding-left: var(--space-4); padding-right: var(--space-4); }
  .stat-value { font-size: 1.4rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .stat-card { padding: var(--space-3) var(--space-4); }
  .stat-bottom .sparkline { display: none; }
}

/* ===== Dark refinements ================================================== */
:root[data-theme='dark'] .sidebar { background: var(--gc-ink-1000); }
:root[data-theme='dark'] .card { box-shadow: none; }
:root[data-theme='dark'] .org-card, :root[data-theme='dark'] .nav-item.is-active { background: var(--gc-ink-850); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .sidebar { background: var(--gc-ink-1000); }
  :root:not([data-theme='light']) .card { box-shadow: none; }
  :root:not([data-theme='light']) .org-card, :root:not([data-theme='light']) .nav-item.is-active { background: var(--gc-ink-850); }
}

/* ===== Print (invoices, license details) ================================ */
@media print {
  .sidebar, .topbar, .toasts, .page-actions, .filter-bar, .pagination, .no-print { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  body.portal { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
}

/* Unified identity: the active workspace is always visible, including on narrow screens. */
.context-current,.context-switcher > summary { display:flex; align-items:center; gap:.5rem; color:var(--text); font-size:.8125rem; text-decoration:none; min-height:2.25rem; cursor:pointer; }
.context-current span,.context-switcher > summary > span { max-width:12rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.context-switcher { position:relative; }
.context-switcher > summary { list-style:none; }
.context-switcher > summary::-webkit-details-marker { display:none; }
.context-switcher .menu-panel { min-width:17rem; max-width:min(24rem,90vw); }
.context-switcher .menu-item { width:100%; text-align:left; }
.context-switcher .menu-item small { display:block; color:var(--text-muted); font-size:.75rem; }
.preview-banner { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1.5rem; padding:1rem; border:1px solid var(--gc-flare-300); border-radius:var(--radius-md); background:var(--warning-soft); }
.preview-banner strong,.preview-banner span { display:block; }
.preview-banner span { margin-top:.25rem; font-size:.875rem; }
@media(max-width:680px){.context-current span,.context-switcher > summary > span{max-width:7rem}.preview-banner{align-items:flex-start;flex-direction:column}.topbar .breadcrumbs{display:none}}


/* portal/public/features/business.css */
/* Business features: dashboards, CRM, leads, billing, teams, HQ admin. Prefixes: dash-, home-, biz-, inv-. */

/* ---- Small form controls ---------------------------------------------------------- */
.select-sm, .input-sm { min-height: 2.1rem; padding-top: 0.3rem; padding-bottom: 0.3rem; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.select-sm { padding-right: 2rem; background-position: right 0.6rem center; }
.biz-mt { margin-top: var(--space-5); }
.biz-mb { margin-bottom: var(--space-5); }
.biz-card-filter { padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.biz-card-filter .tabs { border-bottom: 0; margin: calc(var(--space-3) * -1) 0; }
.biz-tab-body { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.biz-subhead { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); margin-top: var(--space-5); }
.biz-form-heading { font-size: 0.95rem; margin-top: var(--space-6); margin-bottom: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
.biz-fieldset { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
.biz-form-errors { margin: 0 0 var(--space-4); padding-left: 1.2rem; color: var(--danger); }
.biz-address { font-style: normal; display: grid; line-height: 1.5; }
.biz-vat-line { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--text-muted); font-size: 0.8125rem; }
.biz-vat-line .icon { color: var(--accent-text); }

/* ---- People, orgs, lists ---------------------------------------------------------------- */
.biz-person, .biz-org-cell { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.biz-person { min-width: 12rem; }
.biz-role-form .select { min-width: 7.5rem; }
.biz-person > div, .biz-org-cell > div { display: grid; min-width: 0; line-height: 1.35; }
.biz-person-name { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.biz-person-name .badge { padding: 0.05em 0.5em; font-size: 0.68rem; }
.biz-person-email, .biz-org-cell .subtle { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-role-form { display: inline-flex; }
.biz-role-form .select { width: auto; min-width: 8.5rem; }
.biz-invite-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) auto; gap: var(--space-3); align-items: start; }
.biz-invite-grid .field + .field { margin-top: 0; }
.biz-invite-submit { padding-top: 1.7rem; }
.biz-role-hint { display: inline-block; margin-right: var(--space-4); }
.biz-role-hint strong { color: var(--text-muted); font-weight: 600; }
.biz-roles { display: grid; gap: var(--space-3); margin: 0 0 var(--space-4); }
.biz-roles dt { font-weight: 600; color: var(--text-strong); }
.biz-roles dd { margin: 0; color: var(--text-muted); font-size: 0.8125rem; }
.biz-list, .biz-people { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: var(--space-2); }
.biz-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.biz-people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.biz-people li > div { display: grid; min-width: 0; line-height: 1.35; }
.biz-people a.subtle { font-size: 0.78rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.biz-actor { display: grid; line-height: 1.3; color: var(--text-muted); font-size: 0.8rem; }
.biz-actor .subtle { font-size: 0.72rem; }
.biz-date .input { min-height: 2.25rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }

/* ---- Notes & prose ------------------------------------------------------------------------ */
.biz-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.biz-note { padding-bottom: var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.biz-note:last-child { border-bottom: 0; padding-bottom: 0; }
.biz-note-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font-size: 0.8125rem; }
.biz-notes.is-compact .biz-note-head { margin-bottom: var(--space-1); }
.biz-prose > * + * { margin-top: 0.6em; }
.biz-prose p, .biz-prose li { color: var(--text); line-height: 1.55; }
.biz-prose ul, .biz-prose ol { padding-left: 1.2rem; }
.biz-quote { margin: 0; padding: var(--space-4) var(--space-5); border-left: 3px solid var(--accent); background: var(--bg-subtle); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-strong); }
.biz-quote p + p { margin-top: 0.75em; }
.biz-json summary { cursor: pointer; color: var(--text-muted); font-size: 0.78rem; }
.biz-json pre { margin-top: var(--space-2); font-size: 0.72rem; max-width: 34rem; max-height: 16rem; overflow: auto; padding: var(--space-3); border-radius: var(--radius-sm); }

/* ---- Mail ------------------------------------------------------------------------------- */
.biz-mail-body { padding: var(--space-5); background: var(--bg-subtle); }
.biz-mail-frame { width: 100%; min-height: 32rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: #f4f2ec; }
.biz-mail-text { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: 0.8125rem; }

/* ---- Health dots ------------------------------------------------------------------------ */
.biz-health { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; }
.biz-health::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.biz-health.is-ok { color: var(--success); }
.biz-health.is-warn { color: var(--warning); }
.biz-health.is-bad { color: var(--danger); }
.biz-health.is-unknown { color: var(--text-subtle); }

/* ---- Charts ------------------------------------------------------------------------------- */
.bar.tone-accent { background: linear-gradient(180deg, var(--gc-flare-400), var(--gc-flare-600)); }
.bar.tone-gold { background: linear-gradient(180deg, var(--gc-gold-400), var(--gc-amber-500)); }
.biz-funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.biz-funnel-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: var(--space-3); text-decoration: none; color: inherit; padding: 0.2rem 0; border-radius: var(--radius-sm); }
a.biz-funnel-row:hover .biz-funnel-label { color: var(--text-strong); }
.biz-funnel-label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 560; }
.biz-funnel-track { height: 0.75rem; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.biz-funnel-bar { display: block; height: 100%; border-radius: inherit; background: var(--gc-gradient-flare); transition: width var(--duration-slow) var(--ease-out); }
.biz-funnel-bar.tone-orbit { background: linear-gradient(90deg, var(--gc-orbit-400), var(--gc-orbit-600)); }
.biz-funnel-bar.tone-mint { background: linear-gradient(90deg, var(--gc-mint-500), var(--gc-mint-600)); }
.biz-funnel-bar.tone-muted { background: var(--border-strong); }
.biz-funnel-value { text-align: right; font-weight: 650; color: var(--text-strong); }

/* ---- Dashboards ------------------------------------------------------------------------------ */
.dash-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap;
  padding: var(--space-8) var(--space-8) var(--space-6); border-radius: var(--radius-xl);
  background: var(--gc-ink-950); color: #e7e9ee; border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}
.dash-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 34rem; height: 34rem; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 90, 31, 0.38), rgba(255, 90, 31, 0.08) 55%, transparent 72%);
}
.dash-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(ellipse 70% 90% at 80% 20%, #000 20%, transparent 75%);
}
.dash-date { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gc-flare-300); }
.dash-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); color: #fff; letter-spacing: -0.03em; margin-top: var(--space-1); }
.dash-summary { margin-top: var(--space-2); color: #b9c0cc; max-width: 46rem; font-size: 0.95rem; }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dash-hero .btn-secondary { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.16); box-shadow: none; }
.dash-hero .btn-secondary:hover { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.dash-hero .btn-primary { background: var(--gc-flare-500); color: var(--gc-ink-1000); }
.dash-hero .btn-primary:hover { background: var(--gc-flare-400); color: var(--gc-ink-1000); }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6); align-items: stretch; }
.dash-grid > * { grid-column: span 6; min-width: 0; }
.dash-grid > .dash-span-4 { grid-column: span 4; }
.dash-grid > .dash-span-5 { grid-column: span 5; }
.dash-grid > .dash-span-7 { grid-column: span 7; }
.dash-grid > .dash-span-8 { grid-column: span 8; }
.dash-grid > .dash-span-12 { grid-column: span 12; }
.home-col { display: grid; gap: var(--space-6); align-content: start; }
.dash-sub { display: block; font-size: 0.75rem; }
.dash-sev { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.dash-sev-item { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-subtle); text-decoration: none; color: inherit; transition: border-color var(--duration-fast), transform var(--duration-fast); }
.dash-sev-item:hover { border-color: var(--border-strong); transform: translateY(-1px); color: inherit; }
.dash-sev-n { font-size: 1.5rem; font-weight: 680; letter-spacing: -0.03em; color: var(--text-strong); line-height: 1; }
.dash-sev-item.sev-p1 .dash-sev-n { color: var(--danger); }
.dash-mini-list { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; }
.p-card-body > .dash-mini-list:first-child { margin-top: calc(var(--space-2) * -1); }
.dash-mini-list li + li { border-top: 1px solid var(--border-subtle); }
.dash-mini-list a { display: flex; align-items: center; gap: var(--space-3); padding: 0.6rem 0; text-decoration: none; color: inherit; }
.dash-mini-list a:hover .strong { color: var(--accent-text); }
.dash-mini-main { flex: 1; display: grid; min-width: 0; line-height: 1.35; }
.dash-mini-main .strong, .dash-mini-main .subtle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-mini-main .subtle { font-size: 0.78rem; }
.dash-mini-icon { flex: none; width: 2rem; height: 2rem; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--bg-muted); color: var(--text-muted); }
.dash-mini-end { flex: none; display: flex; align-items: center; gap: var(--space-2); }

/* ---- Customer overview --------------------------------------------------------------------- */
.home-licenses { display: grid; gap: var(--space-4); }
.home-license { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--bg-subtle), var(--surface) 70%); padding: var(--space-5); display: grid; gap: var(--space-4); }
.home-license-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.home-license-plan { display: flex; align-items: center; gap: var(--space-2); font-size: 1.05rem; font-weight: 650; color: var(--text-strong); margin-bottom: var(--space-2); letter-spacing: -0.015em; }
.home-license-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.home-license-foot { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); padding-top: var(--space-3); }
.home-license-foot span { display: inline-flex; align-items: center; gap: var(--space-2); }
.home-sub { display: block; font-size: 0.72rem; }
.home-checklist { margin-top: var(--space-4); }
.home-docs { display: flex; gap: var(--space-2); align-items: flex-start; margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 0.8125rem; }
.home-docs .icon { flex: none; margin-top: 0.15rem; color: var(--accent-text); }
.home-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.home-quick-item { display: flex; align-items: center; gap: var(--space-2); padding: 0.65rem 0.75rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text-strong); font-weight: 560; font-size: 0.8125rem; transition: border-color var(--duration-fast), background var(--duration-fast); }
.home-quick-item .icon { color: var(--accent-text); }
.home-quick-item:hover { border-color: var(--border-strong); background: var(--bg-subtle); color: var(--text-strong); }

/* ---- Leads board ------------------------------------------------------------------------------ */
.biz-board { display: grid; grid-template-columns: repeat(5, minmax(12rem, 1fr)); gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x proximity; }
.biz-col { min-width: 0; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-3); display: grid; gap: var(--space-3); align-content: start; min-height: 12rem; scroll-snap-align: start; }
.biz-col.is-won { background: color-mix(in srgb, var(--success-soft) 55%, var(--bg-subtle)); }
.biz-col-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-1); }
.biz-col-count { font-size: 0.78rem; font-weight: 650; color: var(--text-muted); }
.biz-col-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.biz-col-empty { font-size: 0.78rem; color: var(--text-subtle); text-align: center; padding: var(--space-6) 0; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.biz-col-more { font-size: 0.78rem; text-align: center; }
.biz-lead-card { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 0.3rem; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); text-decoration: none; color: inherit; transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast); }
.biz-lead-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: inherit; }
.biz-lead-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 0.72rem; }
.biz-lead-top .subtle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.biz-lead-top .badge { flex: none; }
.biz-lead-name { font-weight: 620; color: var(--text-strong); line-height: 1.3; }
.biz-lead-sub { font-size: 0.75rem; color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-lead-owner { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.biz-spam-hint { margin-top: var(--space-3); }

/* ---- Invoice document ----------------------------------------------------------------------------- */
.inv-card .p-card-body { padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem); }
.inv-doc { display: grid; gap: var(--space-8); color: var(--text); }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-6); flex-wrap: wrap; padding-bottom: var(--space-6); border-bottom: 1px solid var(--border); }
.inv-brand { display: flex; align-items: center; gap: var(--space-3); }
.inv-brand > div { display: grid; line-height: 1.3; }
.inv-brand strong { font-size: 1.05rem; letter-spacing: -0.02em; color: var(--text-strong); }
.inv-brand span { font-size: 0.78rem; color: var(--text-muted); }
.inv-mark { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--gc-ink-900); color: #fff; border: 1px solid var(--border); }
.inv-title { text-align: right; display: grid; justify-items: end; gap: var(--space-1); }
.inv-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.inv-number { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; color: var(--text-strong); }
.inv-stamp { display: inline-block; margin-top: var(--space-1); padding: 0.2rem 0.6rem; border: 2px solid currentColor; border-radius: var(--radius-sm); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; transform: rotate(-3deg); }
.inv-stamp-paid { color: var(--success); }
.inv-stamp-overdue { color: var(--danger); }
.inv-stamp-void, .inv-stamp-draft { color: var(--text-subtle); }
.inv-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.inv-parties h3 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--space-2); }
.inv-parties address { font-style: normal; display: grid; line-height: 1.55; font-size: 0.86rem; }
.inv-vat { font-family: var(--font-mono); font-size: 0.78rem; margin-top: var(--space-1); }
.inv-dates dl { display: grid; gap: var(--space-2); margin: 0; }
.inv-dates dl > div { display: flex; justify-content: space-between; gap: var(--space-3); border-bottom: 1px dashed var(--border-subtle); padding-bottom: var(--space-1); font-size: 0.84rem; }
.inv-dates dt { color: var(--text-muted); }
.inv-dates dd { margin: 0; font-weight: 600; color: var(--text-strong); }
.inv-lines { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.inv-lines th { text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); padding: var(--space-2) var(--space-3); border-bottom: 2px solid var(--text-strong); }
.inv-lines td { padding: var(--space-3); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.inv-lines th:first-child, .inv-lines td:first-child { padding-left: 0; }
.inv-lines th:last-child, .inv-lines td:last-child { padding-right: 0; }
.inv-lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-period-sm { display: none; }
.inv-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: var(--space-6); align-items: start; }
.inv-tax-note { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--info-soft); color: var(--text-strong); font-size: 0.8125rem; }
.inv-tax-note .icon { flex: none; margin-top: 0.1rem; color: var(--info); }
.inv-note > * + * { margin-top: var(--space-3); }
.inv-totals { display: grid; gap: var(--space-2); margin: 0; }
.inv-totals > div { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 0.9rem; }
.inv-totals dt { color: var(--text-muted); }
.inv-totals dd { margin: 0; color: var(--text-strong); }
.inv-totals .inv-total { border-top: 2px solid var(--text-strong); padding-top: var(--space-3); margin-top: var(--space-1); font-size: 1.15rem; font-weight: 700; }
.inv-totals .inv-total dt { color: var(--text-strong); }
.inv-foot { border-top: 1px solid var(--border); padding-top: var(--space-5); display: grid; gap: var(--space-2); font-size: 0.8125rem; color: var(--text-muted); }
.inv-foot strong { color: var(--text-strong); }
.biz-pay-form { display: inline-flex; gap: var(--space-2); align-items: center; }
.biz-pay-form .input { width: auto; min-height: 2.75rem; }

/* ---- Responsive -------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .dash-grid > *, .dash-grid > .dash-span-4, .dash-grid > .dash-span-5, .dash-grid > .dash-span-7, .dash-grid > .dash-span-8 { grid-column: span 12; }
  .biz-invite-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .biz-invite-submit { padding-top: 0; grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .dash-hero { padding: var(--space-6) var(--space-5) var(--space-5); border-radius: var(--radius-lg); }
  .dash-sev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-license-meters { grid-template-columns: minmax(0, 1fr); }
  .home-license-head { flex-wrap: wrap; }
  .biz-invite-grid { grid-template-columns: minmax(0, 1fr); }
  .inv-parties { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .inv-summary { grid-template-columns: minmax(0, 1fr); }
  .inv-title { text-align: left; justify-items: start; }
  .inv-period-sm { display: block; font-size: 0.75rem; color: var(--text-subtle); margin-top: 0.15rem; }
  .biz-board { grid-template-columns: repeat(5, minmax(15rem, 82vw)); }
  .biz-funnel-row { grid-template-columns: 5.5rem minmax(0, 1fr) 2rem; }
  .biz-pay-form { flex-wrap: wrap; }
}

/* ---- Print: the invoice is the page ---------------------------------------------------------------- */
@media print {
  .page-header, .two-col-aside, .breadcrumbs { display: none !important; }
  .two-col { display: block; }
  .inv-card { border: 0 !important; }
  .inv-card .p-card-body { padding: 0; }
  .inv-doc { color: #000; gap: 1.5rem; }
  .inv-mark { background: #0d1017 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-tax-note { background: #eef0ff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-lines th { border-bottom-color: #000; }
}


/* portal/public/features/licensing.css */
/* Licensing feature: licenses, instances, releases (customer portal + HQ). Prefix: .lic- */

.lic-page { display: grid; gap: var(--space-6); }
.lic-form { display: grid; gap: var(--space-6); min-width: 0; }
.lic-form .p-form { display: grid; gap: var(--space-6); }
.lic-plan-cell { display: inline-grid; gap: 2px; line-height: 1.3; }
.lic-plan-cell .subtle { font-size: 0.75rem; }
.lic-plan-cell .mono { font-size: 0.72rem; letter-spacing: 0.02em; }
.lic-interval { font-size: 0.72rem; }
.lic-help { font-size: 0.8rem; line-height: 1.6; }
.lic-help .badge { vertical-align: 1px; }

/* ---- Hero: the license as an object ---- */
.lic-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: center;
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 90, 31, 0.22), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(91, 108, 255, 0.18), transparent 60%),
    linear-gradient(160deg, var(--gc-ink-850), var(--gc-ink-950));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}
.lic-hero-glow {
  position: absolute; inset: auto -10% -60% auto; width: 420px; height: 420px; z-index: -1;
  background: repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 26px);
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
}
.lic-hero-main { display: grid; gap: var(--space-3); min-width: 0; }
.lic-hero-eyebrow { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gc-flare-300); }
.lic-key-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.lic-key {
  flex: 1 1 22rem; min-width: 0; max-width: 34rem;
  font-family: var(--font-mono); font-size: clamp(1rem, 0.7rem + 1.2vw, 1.45rem); font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-strong); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md); padding: 0.55rem 0.8rem; outline: none;
}
.lic-key:focus-visible { border-color: var(--focus); box-shadow: var(--focus-ring); }
.lic-hero .lic-copy { background: rgba(255, 255, 255, 0.06); color: var(--text-strong); border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }
.lic-hero .lic-copy:hover { background: rgba(255, 255, 255, 0.12); }
.lic-hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.lic-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: var(--text-muted); padding: 0.2rem 0.6rem; border-radius: var(--radius-full); border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); }
.lic-chip .icon { opacity: 0.8; }
.lic-hero-side { display: grid; justify-items: end; gap: var(--space-4); }
.lic-days { display: grid; justify-items: end; line-height: 1; }
.lic-days-value { font-size: 3rem; font-weight: 650; letter-spacing: -0.04em; color: var(--text-strong); }
.lic-days-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.lic-days.tone-warning .lic-days-value { color: var(--gc-gold-400); }
.lic-days.tone-danger .lic-days-value { color: #ff8a7a; }
.lic-hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }

/* ---- Term bar ---- */
.lic-term { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.lic-term-track { height: 8px; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.lic-term-track span { display: block; height: 100%; border-radius: inherit; background: var(--gc-gradient-flare); }
.lic-term.tone-success .lic-term-track span { background: linear-gradient(90deg, var(--gc-mint-500), var(--gc-orbit-400)); }
.lic-term.tone-info .lic-term-track span { background: linear-gradient(90deg, var(--gc-orbit-400), var(--gc-orbit-600)); }
.lic-term-labels { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 0.75rem; color: var(--text-subtle); }
.lic-term-left { font-weight: 600; color: var(--text-strong); }
.lic-term.tone-warning .lic-term-left { color: var(--warning); }
.lic-term.tone-danger .lic-term-left { color: var(--danger); }
.lic-term-open { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); font-size: 0.8rem; }

/* ---- Usage ---- */
.lic-usage { display: grid; gap: var(--space-4); }
.lic-usage-foot { display: grid; gap: var(--space-2); font-size: 0.78rem; color: var(--text-muted); padding-top: var(--space-3); border-top: 1px dashed var(--border); }
.lic-usage-foot span { display: inline-flex; align-items: center; gap: var(--space-2); }

/* ---- Entitlements ---- */
.lic-ents { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--space-2) var(--space-5); }
.lic-ent { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--space-3); align-items: start; padding: 0.45rem 0; border-bottom: 1px solid var(--border-subtle); }
.lic-ent-icon { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.lic-ent.is-on .lic-ent-icon { background: var(--success-soft); color: var(--success); }
.lic-ent.is-off .lic-ent-icon { background: var(--bg-muted); color: var(--text-subtle); }
.lic-ent-text { display: grid; gap: 1px; min-width: 0; }
.lic-ent-label { font-size: 0.85rem; color: var(--text-strong); line-height: 1.35; }
.lic-ent.is-off .lic-ent-label { color: var(--text-subtle); }
.lic-ent-key { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-subtle); background: none; border: 0; padding: 0; }
.lic-ent-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--space-1) var(--space-6); }
.lic-ent-form .field + .field { margin-top: 0; }
.lic-ent-form .check-hint { font-family: var(--font-mono); font-size: 0.68rem; }

/* ---- Instances ---- */
.lic-inst { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; }
.lic-inst > span:last-child { display: grid; gap: 1px; min-width: 0; }
.lic-inst-id { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.lic-org { display: block; font-weight: 560; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 15rem; }
.lic-pager .pagination { padding: var(--space-3) var(--space-5); }
.lic-org a { color: inherit; text-decoration: none; }
.lic-org a:hover { text-decoration: underline; }
.lic-sub { font-size: 0.75rem; white-space: nowrap; }
.lic-sub a { color: var(--text-muted); text-decoration: none; }
.lic-sub a:hover { color: var(--accent-text); text-decoration: underline; }
.lic-table td .code-chip { font-size: 0.72rem; }
/* Keep visually-hidden labels inside the scrolling table on small screens. */
.lic-table th, .lic-table td { position: relative; }
.lic-fleet-overview { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-6); align-items: stretch; margin-bottom: var(--space-6); }
.lic-fleet-overview > .card { height: 100%; }
@media (max-width: 1100px) { .lic-fleet-overview { grid-template-columns: 1fr 1fr; } .lic-fleet-overview > :first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .lic-fleet-overview { grid-template-columns: 1fr; } }
.lic-inst-domain { font-size: 0.75rem; color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18rem; }
.lic-dot { position: relative; width: 0.55rem; height: 0.55rem; border-radius: 50%; flex: none; background: var(--text-subtle); }
.lic-dot.is-healthy { background: var(--gc-mint-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-mint-500) 22%, transparent); }
.lic-dot.is-healthy::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--gc-mint-500); opacity: 0; animation: lic-ping 2.8s var(--ease-out) infinite; }
.lic-dot.is-stale { background: var(--gc-amber-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-amber-500) 22%, transparent); }
.lic-dot.is-offline { background: var(--gc-red-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-red-500) 22%, transparent); }
.lic-dot.is-deactivated { background: var(--border-strong); }
@keyframes lic-ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.lic-key-tail { font-size: 0.72rem; }
.lic-env { font-weight: 600; text-transform: capitalize; }
.lic-env.is-production { color: var(--accent-text); }
.lic-env.is-staging { color: var(--info); }

/* ---- Quick start ---- */
.lic-quick { display: grid; gap: var(--space-5); }
.lic-quick > * { min-width: 0; }
.lic-quick .checklist li > span { font-size: 0.82rem; line-height: 1.5; }
.lic-code { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); background: var(--gc-ink-950); }
.lic-code-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 0.35rem 0.5rem 0.35rem 0.9rem; font-size: 0.72rem; color: #a3aab8; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.025); }
.lic-code-bar > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.lic-code-bar .btn { color: #d8dce3; min-height: 1.8rem; }
.lic-code-bar .btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lic-code pre { margin: 0; border: 0; border-radius: 0; background: transparent; font-size: 0.78rem; padding: var(--space-4) var(--space-5); }

/* ---- Claims ---- */
.lic-claims { max-height: 22rem; overflow: auto; margin-bottom: var(--space-4); font-size: 0.75rem; }

/* ---- Lifecycle ---- */
.lic-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.lic-actions.is-stacked { display: grid; gap: var(--space-5); }
.lic-actions.is-stacked form { display: grid; gap: var(--space-3); justify-items: start; }
.lic-actions.is-stacked .field { width: 100%; }
.lic-inline { display: flex; gap: var(--space-2); width: 100%; }
.lic-inline .input { min-height: 2.125rem; padding-block: 0.3rem; font-size: 0.8rem; }
.lic-extend { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: end; margin-top: var(--space-2); }
.lic-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.lic-danger .p-card-title { color: var(--danger); }

/* ---- Versions ---- */
.lic-versions { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); }
.lic-version { display: grid; grid-template-columns: auto auto minmax(3rem, 1fr) 2rem; align-items: center; gap: var(--space-2); padding: 0.4rem 0.5rem; margin: 0 -0.5rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: 0.8rem; }
.lic-version:hover { background: var(--bg-subtle); color: var(--text-strong); }
.lic-version .badge { font-size: 0.65rem; }
.lic-version:not(.is-latest) { grid-template-columns: auto minmax(3rem, 1fr) 2rem; }
.lic-version-bar { height: 6px; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.lic-version-bar span { display: block; height: 100%; border-radius: inherit; background: var(--gc-orbit-500); }
.lic-version.is-latest .lic-version-bar span { background: var(--accent); }
.lic-version .tabular { text-align: right; color: var(--text-muted); }

/* ---- Releases ---- */
.lic-releases { display: grid; gap: var(--space-5); min-width: 0; }
.lic-release { padding: var(--space-6); display: grid; gap: var(--space-4); }
.lic-release.is-latest { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.lic-release-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.lic-release-title { display: grid; gap: var(--space-2); }
.lic-release-title h2 { font-size: 1.15rem; letter-spacing: -0.01em; }
.lic-release-name { font-weight: 500; color: var(--text-muted); }
.lic-release-badges { --cluster-gap: var(--space-2); }
.lic-release-date { font-size: 0.78rem; }
.lic-release-locked { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.78rem; }
.lic-release-notes { font-size: 0.88rem; line-height: 1.65; color: var(--text); }
.lic-release-notes > * + * { margin-top: 0.6em; }
.lic-release-notes h3, .lic-release-notes h4, .lic-release-notes h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); margin-top: 1.1em; }
.lic-release-notes ul, .lic-release-notes ol { padding-left: 1.2em; }
.lic-release-notes li + li { margin-top: 0.25em; }
.lic-release-notes li::marker { color: var(--accent); }
.lic-release-foot { display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--border); font-size: 0.75rem; min-width: 0; }
.lic-sha { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; background: none; border: 0; padding: 0; }
.lic-sha-wrap { font-family: var(--font-mono); font-size: 0.72rem; word-break: break-all; background: none; border: 0; padding: 0; }
.lic-notes-input textarea, textarea.lic-notes-input, .lic-notes-input .textarea { font-family: var(--font-mono); font-size: 0.8rem; }

/* Cards whose header holds a filter bar: let the filters wrap under the title. */
.lic-filter-card .p-card-header { flex-wrap: wrap; align-items: center; }
.lic-filter-card .p-card-actions { flex-shrink: 1; min-width: 0; max-width: 100%; }

@media (max-width: 760px) {
  .lic-filter-card .p-card-actions, .lic-filter-card .filter-bar { width: 100%; }
  .lic-filter-card .filter-search { max-width: none; }
  .lic-filter-card .filter-select { flex: 1 1 8rem; }
  .lic-filter-card .filter-select .select { width: 100%; min-width: 0; }
  .lic-hero { grid-template-columns: 1fr; padding: var(--space-5); }
  .lic-hero-side { justify-items: start; grid-auto-flow: column; align-items: end; justify-content: space-between; }
  .lic-days { justify-items: start; }
  .lic-days-value { font-size: 2.25rem; }
  .lic-key { flex-basis: 100%; }
  .lic-extend { grid-template-columns: 1fr; }
  .lic-inst-domain { max-width: 11rem; }
}


/* portal/public/features/operations.css */
/* Native operations workspaces: contextual navigation and dense, fluid content. */
.ops-workspace { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.ops-secondary { position: sticky; top: 4.75rem; max-height: calc(100dvh - 6rem); overflow: auto; scrollbar-width: thin; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: var(--space-3); }
.ops-secondary > summary { cursor: pointer; padding: var(--space-2); color: var(--text-strong); font-weight: 650; }
.ops-secondary-body { padding-top: var(--space-2); }
.ops-secondary-group + .ops-secondary-group { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle); }
.ops-secondary-title { color: var(--text-subtle); font-size: .68rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; margin: var(--space-2) var(--space-2) var(--space-2); }
.ops-secondary ul { list-style: none; padding: 0; margin: 0; }
.ops-secondary-link { display: block; padding: .45rem .6rem; border-radius: var(--radius-sm); font-size: .8rem; line-height: 1.4; color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.ops-secondary-link:hover { background: var(--bg-subtle); color: var(--text-strong); }
.ops-secondary-link.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; box-shadow: inset 3px 0 var(--accent); }
.ops-toc-link { font-size: .75rem; }
.ops-toc-link[data-level='3'],.ops-toc-link[data-level='4'],.ops-toc-link[data-level='5'],.ops-toc-link[data-level='6'] { padding-left: 1.2rem; }
.ops-content { min-width: 0; display: grid; gap: var(--space-5); }
.ops-content > .p-card { min-width: 0; }
.ops-content .p-card-body > * + * { margin-top: var(--space-4); }
.ops-policy-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: var(--space-4); }
.ops-policy-item { padding: var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-subtle); min-width: 0; }
.ops-policy-item dt,.ops-policy-item h3 { font-size: .85rem; color: var(--text-muted); margin-bottom: var(--space-2); }
.ops-policy-item dd,.ops-policy-item strong { color: var(--text-strong); font-size: 1.3rem; font-weight: 650; }
.ops-policy-item p { margin-top: var(--space-2); font-size: .8rem; color: var(--text-muted); }
.ops-filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3); margin-bottom: var(--space-5); }
.ops-filter-form label { display: grid; gap: var(--space-1); flex: 1 1 10rem; min-width: 0; font-size: .8rem; color: var(--text-muted); }
.ops-filter-form input,.ops-filter-form select { width: 100%; }
.ops-detail-list { display: grid; gap: .35rem; margin-top: var(--space-3); font-size: .8rem; }
.ops-detail-list > div { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 3fr); gap: var(--space-3); padding: .3rem 0; border-bottom: 1px solid var(--border-subtle); }
.ops-detail-list dt { color: var(--text-muted); }
.ops-detail-list dd { overflow-wrap: anywhere; }
.ops-content details > summary,.ops-audit-details > summary { cursor: pointer; color: var(--accent-text); font-weight: 550; }
.ops-json { max-width: 100%; overflow: auto; }
.docs-prose { min-width: 0; line-height: 1.7; overflow-wrap: anywhere; }
.docs-prose > * + * { margin-top: 1.1rem; }
.docs-prose :is(h1,h2,h3,h4,h5,h6) { scroll-margin-top: 5rem; margin-top: 2rem; margin-bottom: .7rem; line-height: 1.3; }
.docs-prose > :first-child { margin-top: 0; }
.docs-prose h1 { font-size: 1.85rem; }
.docs-prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: .5rem; }
.docs-prose h3 { font-size: 1.15rem; }
.docs-prose h4,.docs-prose h5,.docs-prose h6 { font-size: 1rem; }
.docs-prose ul,.docs-prose ol { padding-left: 1.5rem; }
.docs-prose li + li { margin-top: .35rem; }
.docs-prose li > :is(ul,ol,p) { margin-top: .4rem; }
.docs-prose blockquote { border-left: 3px solid var(--accent); padding: .75rem 1rem; color: var(--text-muted); background: var(--bg-subtle); }
.docs-prose pre { color: var(--text-strong); max-width: 100%; overflow: auto; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-subtle); font-size: .8rem; }
.docs-prose :not(pre) > code { background: var(--bg-subtle); padding: .1rem .3rem; border-radius: 3px; font-size: .88em; overflow-wrap: anywhere; }
.docs-prose pre code { white-space: pre; }
.markdown-table-wrap { max-width: 100%; overflow-x: auto; position: relative; }
.markdown-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.markdown-table-wrap table { width: 100%; font-size: .85rem; }
.markdown-table-wrap th,.markdown-table-wrap td { text-align: left; vertical-align: top; padding: .7rem .85rem; border: 1px solid var(--border); min-width: 7rem; }
.markdown-table-wrap th { background: var(--bg-subtle); font-weight: 650; }
.markdown-table-wrap tr:nth-child(even) td { background: color-mix(in srgb,var(--bg-subtle) 45%,var(--surface)); }
.markdown-table-wrap .md-align-center { text-align: center; }
.markdown-table-wrap .md-align-right { text-align: right; }
.docs-prose input[type='checkbox'] { margin-right: .45rem; accent-color: var(--accent); }
@media (min-width: 1201px) { .ops-secondary > summary { list-style: none; cursor: pointer; }.ops-secondary > summary::-webkit-details-marker { display:none; } }
@media (max-width: 1200px) {
 .ops-workspace { grid-template-columns: minmax(0,1fr); gap: var(--space-4); }
 .ops-secondary { position: static; max-height: 22rem; }
 .ops-secondary-body { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: var(--space-3); }
 .ops-secondary-group + .ops-secondary-group { margin-top: 0; padding-top: 0; border-top: none; }
}
@media (max-width: 640px) {
 .ops-secondary-body { display: block; }
 .ops-secondary-group + .ops-secondary-group { margin-top: var(--space-4); }
 .ops-detail-list > div { grid-template-columns: minmax(0,1fr); gap: .15rem; }
 .docs-prose h1 { font-size: 1.5rem; }
 .markdown-table-wrap th,.markdown-table-wrap td { min-width: 8rem; }
}
@media print { .ops-secondary { display: none; }.ops-workspace { display: block; }.docs-prose pre { white-space: pre-wrap; }.markdown-table-wrap { overflow: visible; } }

.docs-prose .task-list-item { list-style: none; }
.ops-content .form-field { display: grid; gap: .4rem; margin: 1rem 0; }
.ops-content .form-field > label { font-size: .83rem; font-weight: 600; color: var(--text-strong); }
.ops-content .form-field > :is(input,select,textarea) { width: 100%; }
.ops-policy-item .ops-policy-value { color: var(--text-strong); font-size: 1.3rem; font-weight: 650; }
.ops-filter-form > .form-field { display: grid; gap: .35rem; flex: 1 1 9rem; min-width: 0; }
.ops-filter-form > .form-field:first-child { flex-basis: 14rem; }
.ops-filter-form > .form-field > label { font-size: .8rem; color: var(--text-muted); }
.ops-detail-value { white-space: pre-wrap; }
@media (max-width:1200px) {
 .ops-secondary-body { display:block; }
 .ops-secondary-body > nav { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:var(--space-3); }
}
@media (max-width:640px) { .ops-secondary-body > nav { display:block; } }
.ops-doc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:var(--space-3); margin-top:var(--space-5); }
.ops-doc-card { display:flex; flex-direction:column; gap:.5rem; padding:var(--space-4); border:1px solid var(--border); border-radius:var(--radius-sm); text-decoration:none; color:var(--text-strong); background:var(--surface); }
.ops-doc-card:hover { border-color:var(--accent); background:var(--accent-soft); }
.ops-doc-card span { color:var(--text-muted); font-size:.78rem; }
.ops-setup-key { display:block; padding:.75rem; margin:.5rem 0; overflow-wrap:anywhere; background:var(--bg-subtle); }
.ops-content #unlock-code,.ops-content #enroll-code { max-width:18rem; letter-spacing:.15em; font-variant-numeric:tabular-nums; }


/* portal/public/features/partners.css */
/* Partner program (partner area + HQ). Prefix: .pt- — semantic tokens only, works in light and dark. */

.pt-kicker { font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.pt-cell-main { display: block; font-weight: 560; color: var(--text-strong); }
.pt-cell-sub { display: block; font-size: 0.75rem; color: var(--text-subtle); margin-top: 1px; }
.pt-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-mini-title { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--space-3); }

/* ---- Tier journey ------------------------------------------------------------------------ */
.pt-journey {
  position: relative; overflow: hidden; isolation: isolate;
  padding: var(--space-6) var(--space-6) var(--space-5);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--gc-flare-500) 10%, transparent) 0%, transparent 55%),
    radial-gradient(80% 120% at 0% 100%, color-mix(in srgb, var(--gc-orbit-500) 8%, transparent) 0%, transparent 60%),
    var(--surface);
}
.pt-journey-glow {
  position: absolute; z-index: -1; right: -6rem; top: -8rem; width: 22rem; height: 22rem; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gc-gold-500) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.pt-journey-head { display: flex; justify-content: space-between; gap: var(--space-6); align-items: flex-start; flex-wrap: wrap; }
.pt-journey-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.03em; margin-top: var(--space-1); }
.pt-journey-sub { color: var(--text-muted); margin-top: var(--space-1); }
.pt-journey-sub strong { color: var(--text-strong); font-size: 1.05em; }
.pt-journey-next {
  display: grid; justify-items: end; gap: 2px; text-align: right;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.pt-next-label { font-size: 0.75rem; font-weight: 600; color: var(--text-subtle); }
.pt-next-value { font-size: 1.75rem; font-weight: 680; letter-spacing: -0.03em; line-height: 1.1; color: var(--text-strong); }
.pt-journey-next.is-top .pt-next-value { color: var(--gc-gold-500); }
.pt-next-hint { font-size: 0.75rem; color: var(--accent-text); font-weight: 560; }

.pt-track { list-style: none; padding: 0; margin: var(--space-6) 0 var(--space-2); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-track-step { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--space-3); align-items: center; }
.pt-track-node {
  grid-row: 1 / span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--text-subtle);
}
.pt-track-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; opacity: 0.6; }
.pt-track-name { font-weight: 620; font-size: 0.875rem; color: var(--text-muted); }
.pt-track-margin { font-size: 0.75rem; color: var(--text-subtle); }
.pt-track-line {
  position: absolute; left: 2.6rem; right: 0.6rem; top: 1rem; height: 3px; border-radius: 3px; transform: translateY(-50%) translateY(14px);
  background: var(--bg-muted); overflow: hidden; display: none;
}
.pt-track-line span { display: block; height: 100%; background: var(--gc-gradient-flare); border-radius: inherit; }
.pt-track-step.is-done .pt-track-node { background: var(--gc-flare-500); border-color: var(--gc-flare-500); color: var(--gc-ink-1000); }
.pt-track-step.is-current .pt-track-node {
  background: var(--gc-gradient-flare); border: 0; color: var(--gc-ink-1000);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc-flare-500) 18%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--gc-flare-500) 70%, transparent);
}
.pt-track-step.is-current .pt-track-name, .pt-track-step.is-done .pt-track-name { color: var(--text-strong); }
.pt-track-step.is-next .pt-track-node { border-style: dashed; border-color: var(--accent); color: var(--accent-text); }
@media (min-width: 641px) {
  .pt-track-step { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; row-gap: var(--space-2); }
  .pt-track-node { grid-row: auto; }
  .pt-track-line { display: block; top: 1rem; transform: translateY(-50%); left: 2.75rem; right: 0.75rem; }
}

.pt-journey-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--space-6); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
.pt-reqs, .pt-benefits { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.pt-req { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: var(--space-3); row-gap: 6px; align-items: center; }
.pt-req-icon { grid-row: 1 / span 2; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg-muted); color: var(--text-subtle); }
.pt-req.is-met .pt-req-icon { background: var(--success-soft); color: var(--success); }
.pt-req-label { font-size: 0.875rem; color: var(--text-strong); font-weight: 520; }
.pt-req-value { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; }
.pt-req-alt { color: var(--text-subtle); }
.pt-req-bar { grid-column: 2 / span 2; height: 4px; border-radius: 4px; background: var(--bg-muted); overflow: hidden; }
.pt-req-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.pt-req.is-met .pt-req-bar span { background: var(--gc-mint-500); }
.pt-benefits li { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 0.875rem; color: var(--text); }
.pt-benefits svg { color: var(--accent-text); margin-top: 3px; flex: none; }
.pt-journey.is-compact .pt-track { margin-bottom: 0; }

/* ---- Pipeline ---------------------------------------------------------------------------- */
.pt-pipeline { display: grid; gap: var(--space-4); }
.pt-pipeline-bar { display: flex; gap: 3px; height: 12px; border-radius: var(--radius-full); overflow: hidden; background: var(--bg-muted); }
.pt-seg { min-width: 6px; }
.pt-seg.is-submitted, .pt-legend.is-submitted .pt-legend-dot { background: var(--gc-orbit-400); }
.pt-seg.is-approved, .pt-legend.is-approved .pt-legend-dot { background: var(--gc-flare-500); }
.pt-seg.is-won, .pt-legend.is-won .pt-legend-dot { background: var(--gc-mint-500); }
.pt-seg.is-lost, .pt-legend.is-lost .pt-legend-dot,
.pt-seg.is-expired, .pt-legend.is-expired .pt-legend-dot { background: var(--gc-slate-400); }
.pt-seg.is-rejected, .pt-legend.is-rejected .pt-legend-dot { background: var(--gc-red-500); }
.pt-pipeline-legend { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--space-3); }
.pt-legend { display: grid; grid-template-columns: auto 1fr auto; column-gap: var(--space-2); align-items: baseline; padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-subtle); border: 1px solid var(--border-subtle); }
.pt-legend-dot { width: 0.6rem; height: 0.6rem; border-radius: 3px; align-self: center; }
.pt-legend-label { font-size: 0.8125rem; color: var(--text-muted); }
.pt-legend-count { font-weight: 650; color: var(--text-strong); }
.pt-legend-value { grid-column: 2 / span 2; font-size: 0.75rem; color: var(--text-subtle); }

/* ---- Protection meter ---------------------------------------------------------------------- */
.pt-protect { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.pt-protect-track { width: 4.5rem; height: 5px; border-radius: 5px; background: var(--bg-muted); overflow: hidden; }
.pt-protect-track span { display: block; height: 100%; border-radius: inherit; background: var(--pt-tone, var(--success)); }
.pt-protect.tone-success { --pt-tone: var(--gc-mint-500); }
.pt-protect.tone-warning { --pt-tone: var(--gc-amber-500); }
.pt-protect.tone-danger { --pt-tone: var(--gc-red-500); }
.pt-protect-text { font-size: 0.8125rem; color: var(--text-muted); }
.pt-protect-big .pt-protect { display: grid; gap: var(--space-2); width: 100%; }
.pt-protect-big .pt-protect-track { width: 100%; height: 8px; }
.pt-protect-big .pt-protect-text { font-size: 1.25rem; font-weight: 650; color: var(--text-strong); letter-spacing: -0.02em; }

/* ---- Quick actions & lists ------------------------------------------------------------------- */
.pt-quick { display: grid; gap: var(--space-2); }
.pt-quick-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border-subtle);
  text-decoration: none; color: var(--text); transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
}
.pt-quick-item > svg:first-child { width: 2.25rem; height: 2.25rem; padding: 0.55rem; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-text); }
.pt-quick-item strong { display: block; font-size: 0.875rem; color: var(--text-strong); }
.pt-quick-item small { display: block; font-size: 0.75rem; color: var(--text-subtle); }
.pt-quick-item > svg:last-child { color: var(--text-subtle); transition: transform var(--duration) var(--ease-out); }
.pt-quick-item:hover { border-color: var(--border-strong); background: var(--bg-subtle); color: var(--text); }
.pt-quick-item:hover > svg:last-child { transform: translateX(3px); color: var(--accent-text); }

.pt-renewals { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.pt-renewal { display: grid; gap: 6px; padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-subtle); text-decoration: none; color: var(--text); border: 1px solid transparent; }
.pt-renewal:hover { border-color: var(--border); color: var(--text); }
.pt-renewal-name { font-weight: 600; color: var(--text-strong); font-size: 0.875rem; line-height: 1.35; }
.pt-renewal-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pt-renewal-days { font-size: 0.75rem; color: var(--text-subtle); }
.pt-renewal-days.is-soon { color: var(--warning); font-weight: 600; }

.pt-steps { padding-left: 1.1rem; display: grid; gap: var(--space-3); font-size: 0.875rem; color: var(--text-muted); }
.pt-steps strong { color: var(--text-strong); }
.pt-howto { list-style: none; padding: 0; display: grid; gap: var(--space-3); font-size: 0.875rem; }
.pt-howto li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); color: var(--text-muted); }
.pt-howto.is-strip { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-5); font-size: 0.8125rem; }
.pt-deal-form .choice-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.pt-howto svg { color: var(--accent-text); margin-top: 2px; }
.pt-contacts, .pt-people { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.pt-contacts li { display: grid; gap: 2px; font-size: 0.875rem; }
.pt-people li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; }
.pt-people li > div { display: grid; min-width: 0; font-size: 0.8125rem; }
.pt-people li > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-people li > .badge + .badge { grid-column: 3; }
.pt-message { margin-top: var(--space-5); padding: var(--space-4); border-radius: var(--radius-md); background: var(--bg-subtle); border: 1px solid var(--border-subtle); }
.pt-message .pt-kicker { margin-bottom: var(--space-2); }
.pt-statement-total { font-weight: 680; font-size: 1rem; color: var(--text-strong); }

/* ---- Health chips & conflicts ---------------------------------------------------------------- */
.pt-health { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8125rem; white-space: nowrap; }
.pt-health.is-ok { color: var(--success); }
.pt-health.is-warn { color: var(--warning); font-weight: 560; }
.pt-health.is-none { color: var(--text-subtle); }
.pt-conflicts { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.pt-conflict { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); font-size: 0.875rem; }
.pt-conflict svg { margin-top: 2px; }
.pt-conflict.is-warn { background: var(--warning-soft); }
.pt-conflict.is-warn svg { color: var(--warning); }
.pt-conflict.is-info { background: var(--info-soft); }
.pt-conflict.is-info svg { color: var(--info); }

/* ---- Resources ---------------------------------------------------------------------------- */
.pt-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-6); align-items: start; }
.pt-res-wide { grid-column: 1 / -1; }
.pt-playbook { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-4); counter-reset: none; }
.pt-playbook li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--bg-subtle); border: 1px solid var(--border-subtle); }
.pt-playbook-n { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); font-size: 0.8125rem; font-weight: 650; }
.pt-playbook strong { font-size: 0.9rem; color: var(--text-strong); }
.pt-playbook p { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }
.pt-points { list-style: none; padding: 0; display: grid; gap: var(--space-3); font-size: 0.875rem; }
.pt-points li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); color: var(--text); }
.pt-points svg { margin-top: 3px; color: var(--success); }
.pt-points.is-dont svg { color: var(--danger); }
.pt-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-5); }
.pt-swatch { display: grid; gap: 2px; padding: var(--space-6) var(--space-3) var(--space-3); border-radius: var(--radius-md); background: var(--sw); color: #fff; font-size: 0.6875rem; font-family: var(--font-mono); border: 1px solid var(--border); }
.pt-swatch b { font-family: var(--font-sans); font-size: 0.8125rem; }
.pt-swatch.is-light { color: var(--gc-ink-900); }
.pt-cert { list-style: none; padding: 0; margin: 0; }
.pt-cert li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.pt-cert li:last-child { border-bottom: 0; }
.pt-cert li > div { display: grid; font-size: 0.8125rem; color: var(--text-muted); }
.pt-cert strong { color: var(--text-strong); font-size: 0.875rem; }
.pt-cert-n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-subtle); width: 1.75rem; }
.pt-cert-h { font-size: 0.75rem; color: var(--text-subtle); }
.pt-cert li.is-exam { background: var(--accent-soft); }
.pt-cert li.is-exam .pt-cert-n { color: var(--accent-text); }

/* ---- Directory card (mirrors the website partner directory) ---------------------------------- */
.pt-preview-wrap { position: sticky; top: var(--space-6); display: grid; gap: var(--space-3); }
.pt-dir-card {
  display: grid; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.pt-dir-head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; }
.pt-dir-logo { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); display: grid; place-items: center; font-weight: 700; color: var(--gc-ink-1000); background: var(--gc-gradient-flare); }
.pt-dir-name { font-size: 0.95rem; line-height: 1.3; }
.pt-dir-meta { font-size: 0.75rem; color: var(--text-subtle); }
.pt-dir-tier { font-size: 0.6875rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.25em 0.6em; border-radius: var(--radius-full); border: 1px solid var(--border-strong); color: var(--text-muted); }
.pt-dir-tier.is-certified { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.pt-dir-tier.is-premier { border-color: transparent; background: color-mix(in srgb, var(--gc-gold-500) 18%, transparent); color: var(--warning); }
.pt-dir-desc { font-size: 0.875rem; color: var(--text); line-height: 1.55; }
.pt-dir-row { display: flex; gap: var(--space-2); align-items: center; font-size: 0.8125rem; color: var(--text-muted); }
.pt-dir-web { color: var(--accent-text); }
.pt-dir-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pt-dir-tags li { font-size: 0.75rem; padding: 0.2em 0.6em; border-radius: var(--radius-full); background: var(--bg-muted); color: var(--text-muted); }

/* ---- HQ commissions period bar ------------------------------------------------------------------ */
.pt-period-bar { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); }
.pt-period-form { display: flex; gap: var(--space-3); align-items: center; }
.pt-period-form .select { min-width: 9rem; min-height: 2.25rem; }
.pt-period-note { flex: 1; min-width: 14rem; font-size: 0.875rem; color: var(--text-muted); }
.pt-pay-form { gap: var(--space-1); align-items: center; }
.pt-ref-input { min-height: 2.125rem; width: 8.5rem; padding: 0.35rem 0.6rem; font-size: 0.75rem; }

@media (max-width: 640px) {
  .pt-journey { padding: var(--space-5) var(--space-4); }
  .pt-journey-next { justify-items: start; text-align: left; width: 100%; grid-template-columns: 1fr auto; align-items: center; }
  .pt-journey-next .pt-next-hint { grid-column: 1 / -1; }
  .pt-track { grid-template-columns: 1fr; gap: var(--space-3); }
  .pt-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-cert li { padding: var(--space-3) var(--space-4); }
  .pt-preview-wrap { position: static; }
}

.pt-flag { vertical-align: middle; }
.pt-flag svg { width: 12px; height: 12px; }


/* portal/public/features/support.css */
/* Support desk (.tk-*) and status pages (.st-*). Semantic tokens only — works in light and dark. */

/* ---- Shared prose for Markdown bodies ---- */
.tk-msg-body, .st-update-body { line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.tk-msg-body > * + *, .st-update-body > * + * { margin-top: 0.65em; }
.tk-msg-body ul, .tk-msg-body ol, .st-update-body ul, .st-update-body ol { padding-left: 1.3em; }
.tk-msg-body li + li { margin-top: 0.2em; }
.tk-msg-body h3, .tk-msg-body h4, .tk-msg-body h5 { font-size: 0.95rem; }
.tk-msg-body pre { font-size: 0.8rem; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
.tk-msg-body blockquote { border-left: 3px solid var(--border-strong); padding-left: var(--space-3); color: var(--text-muted); }

/* ---- Table cells ---- */
.tk-cell { display: grid; gap: 0.15rem; min-width: 0; }
.tk-cell-top { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.tk-num { font-size: 0.78rem; color: var(--text-subtle); flex: none; }
.tk-subject { font-weight: 580; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34rem; }
.tk-cell-sub { font-size: 0.78rem; color: var(--text-subtle); }
.tk-sm-only { display: none; }
.tk-assignee { display: inline-flex; align-items: center; gap: var(--space-2); }

/* ---- SLA pill ---- */
.tk-sla { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 560; padding: 0.15rem 0.55rem; border-radius: var(--radius-full); white-space: nowrap; background: var(--bg-muted); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tk-sla-met { background: var(--success-soft); color: var(--success); }
.tk-sla-missed, .tk-sla-soon { background: var(--warning-soft); color: var(--warning); }
.tk-sla-overdue { background: var(--danger-soft); color: var(--danger); }
.tk-sla-overdue .icon { animation: tk-pulse 1.6s ease-in-out infinite; }
@keyframes tk-pulse { 50% { opacity: 0.35; } }

/* ---- Support plan band ---- */
.tk-plan { display: grid; grid-template-columns: minmax(14rem, 18rem) 1fr; gap: 0; overflow: hidden; margin-bottom: var(--space-6); }
.tk-plan-intro { padding: var(--space-5) var(--space-6); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 70%); border-right: 1px solid var(--border-subtle); display: grid; align-content: start; gap: var(--space-2); }
.tk-plan-eyebrow { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.tk-plan-name { font-size: 1.25rem; letter-spacing: -0.02em; }
.tk-plan-hours, .tk-plan-channels { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--text-muted); font-size: 0.8125rem; line-height: 1.45; }
.tk-plan-hours .icon, .tk-plan-channels .icon { margin-top: 0.15rem; color: var(--text-subtle); }
.tk-plan-targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.tk-plan-target { padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; border-left: 1px solid var(--border-subtle); }
.tk-plan-target:first-child { border-left: 0; }
.tk-plan-target dd { margin: 0; display: grid; gap: 0.3rem; }
.tk-plan-target dd strong { color: var(--text-strong); font-size: 0.95rem; letter-spacing: -0.01em; }
.tk-plan-target dd span { color: var(--text-subtle); font-size: 0.78rem; line-height: 1.45; }

.tk-list { display: grid; gap: var(--space-4); }
.tk-footnote { margin-top: var(--space-6); font-size: 0.8125rem; }
.tk-footnote .icon { display: inline-block; vertical-align: -0.2em; margin-right: 0.35rem; }
.tk-new .choice-grid, .st-form .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col-aside .st-form .choice-grid { grid-template-columns: 1fr; }
@media (max-width: 640px) { .tk-new .choice-grid, .st-form .choice-grid { grid-template-columns: 1fr; } }

/* ---- Thread ---- */
.tk-thread { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); position: relative; }
.tk-thread::before { content: ''; position: absolute; left: 16px; top: 20px; bottom: 20px; width: 1px; background: var(--border); }
.tk-msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--space-3); position: relative; }
.tk-msg-avatar { position: relative; z-index: 1; }
.tk-msg-avatar .avatar { box-shadow: 0 0 0 3px var(--bg); }
.tk-msg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-xs); min-width: 0; }
.tk-msg.is-staff .tk-msg-card { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); box-shadow: inset 3px 0 0 var(--accent), var(--shadow-xs); }
.tk-msg.is-internal .tk-msg-card { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, transparent); border-style: dashed; box-shadow: none; }
.tk-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: var(--space-2); font-size: 0.8125rem; }
.tk-author { font-weight: 640; color: var(--text-strong); }
.tk-author-org { color: var(--text-subtle); display: inline-flex; align-items: center; gap: 0.25rem; }
.tk-author-staff { color: var(--accent-text); font-weight: 560; }
.tk-internal-label { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 650; color: var(--warning); text-transform: uppercase; letter-spacing: 0.04em; }
.tk-msg-time { margin-left: auto; color: var(--text-subtle); text-decoration: none; font-size: 0.78rem; }
.tk-msg-time:hover { color: var(--text); text-decoration: underline; }
.tk-msg:target .tk-msg-card { box-shadow: var(--focus-ring); }
.tk-thread + .p-card, .tk-thread + .alert, .tk-thread + .card { margin-top: var(--space-2); }

/* ---- Response target / SLA timer ---- */
.tk-rc { display: grid; gap: var(--space-3); }
.tk-rc-tier { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 0.78rem; }
.tk-rc-target { color: var(--text-muted); }
.tk-rc-main { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-subtle); font-size: 0.8125rem; }
.tk-rc-main .icon { color: var(--accent-text); flex: none; }

.tk-timer { display: grid; gap: var(--space-2); }
.tk-timer-label { font-size: 1.35rem; font-weight: 680; letter-spacing: -0.02em; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tk-timer-sub { color: var(--text-subtle); font-size: 0.8rem; }
.tk-timer-tier { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 0.78rem; }
.tk-timer-overdue .tk-timer-label { color: var(--danger); }
.tk-timer-soon .tk-timer-label, .tk-timer-missed .tk-timer-label { color: var(--warning); }
.tk-timer-met .tk-timer-label { color: var(--success); }

/* ---- Composer ---- */
.p-card:has(.tk-macros) { overflow: visible; }
.tk-macros { position: relative; }
.tk-macros summary { list-style: none; }
.tk-macros summary::-webkit-details-marker { display: none; }
.tk-macros .menu-panel { min-width: 17rem; }
.tk-composer .tk-kind { margin-bottom: var(--space-1); }
.tk-kind { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-full); background: var(--bg-muted); border: 1px solid var(--border-subtle); }
.tk-kind-opt { position: relative; cursor: pointer; }
.tk-kind-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tk-kind-opt span { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border-radius: var(--radius-full); font-weight: 600; font-size: 0.8125rem; color: var(--text-muted); transition: background var(--duration-fast), color var(--duration-fast); }
.tk-kind-opt input:checked + span { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.tk-kind-opt.is-internal input:checked + span { background: var(--warning-soft); color: var(--warning); }
.tk-kind-opt input:focus-visible + span { box-shadow: var(--focus-ring); }
.tk-composer:has(.tk-kind-opt.is-internal input:checked) .textarea { background: color-mix(in srgb, var(--warning-soft) 60%, var(--surface)); border-style: dashed; }
.tk-composer-foot { align-items: end; }
.tk-composer-actions { margin-top: 0; justify-content: flex-end; }

/* ---- Rating ---- */
.tk-rate { display: grid; gap: var(--space-3); justify-items: start; }
.tk-stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; border: 0; padding: 0; margin: 0; }
.tk-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk-stars label { cursor: pointer; color: var(--border-strong); transition: color var(--duration-fast), transform var(--duration-fast); padding: 0.1rem; border-radius: var(--radius-xs); }
.tk-stars label:hover, .tk-stars label:hover ~ label, .tk-stars input:checked ~ label { color: var(--gc-gold-500); }
.tk-stars label:hover { transform: scale(1.12); }
.tk-stars input:focus-visible + label { box-shadow: var(--focus-ring); }
.tk-stars label .icon, .tk-star .icon { fill: currentColor; }
.tk-stars.is-static { flex-direction: row; }
.tk-star { color: var(--border-strong); }
.tk-star.is-on { color: var(--gc-gold-500); }

/* ---- Context sidebar ---- */
.tk-ctx { display: grid; gap: var(--space-3); }
.tk-ctx-org { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font-size: 0.95rem; }
.tk-ctx-h { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-subtle); font-weight: 650; margin-top: var(--space-2); }
.tk-ctx-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.tk-ctx-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); font-size: 0.8125rem; min-width: 0; }
.tk-ctx-list li > a, .tk-ctx-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tk-ctx-list li > span { display: inline-flex; gap: var(--space-1); align-items: center; flex: none; }
.tk-ctx-list .mono { font-size: 0.75rem; }
.tk-ctx-two, .tk-ctx-list li > .tk-ctx-two { display: grid; gap: 0.1rem; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.tk-ctx-two > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ctx-two .subtle { font-size: 0.72rem; }
.tk-ctx-list .badge { flex: none; }
.tk-meta-cat { font-size: 0.8125rem; }

/* ---- Tips ---- */
.tk-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.tk-tips li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--space-2); color: var(--text-muted); line-height: 1.5; }
.tk-tips .icon { color: var(--accent-text); margin-top: 0.15rem; }

@media (max-width: 1100px) {
  .tk-plan { grid-template-columns: 1fr; }
  .tk-plan-intro { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .tk-plan-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-plan-target:nth-child(odd) { border-left: 0; }
  .tk-plan-target:nth-child(n + 3) { border-top: 1px solid var(--border-subtle); }
}
@media (max-width: 640px) {
  .tk-plan-intro { padding: var(--space-4) var(--space-5); }
  .tk-plan-target { padding: var(--space-3) var(--space-4); }
  .tk-plan-target dd span { display: none; }
  .tk-plan-target dd strong { font-size: 0.875rem; }
  .tk-subject { white-space: normal; max-width: none; overflow: visible; }
  .tk-cell-top { flex-wrap: wrap; row-gap: 0; }
  .tk-list .p-table th, .tk-queue .p-table th { width: auto !important; }
  .tk-sm-only { display: block; margin-top: 0.35rem; }
  .tk-thread::before { display: none; }
  .tk-msg { grid-template-columns: 1fr; }
  .tk-msg-avatar { display: none; }
}

/* =================================================================================
   Status
   ================================================================================= */
.st-page { font-size: 0.9375rem; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.st-wrap { width: 100%; max-width: 54rem; margin: 0 auto; padding-inline: var(--space-5); }
.st-top { border-bottom: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: var(--z-sticky); }
.st-top-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 3.75rem; }
.st-top-label { margin-left: var(--space-1); padding: 0.1rem 0.5rem; border-radius: var(--radius-full); background: var(--bg-muted); color: var(--text-muted); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.02em; }
.st-top-nav { display: flex; align-items: center; gap: var(--space-4); }
.st-top-nav a { color: var(--text-muted); text-decoration: none; font-weight: 560; font-size: 0.875rem; white-space: nowrap; }
.st-top-nav a:hover { color: var(--text-strong); }
.st-main { flex: 1; padding-block: var(--space-10) var(--space-12); display: grid; gap: var(--space-10); align-content: start; }
.st-section { display: grid; gap: var(--space-4); }
.st-h2 { font-size: 1.05rem; letter-spacing: -0.015em; }
.st-h2-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.st-legend { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem; color: var(--text-subtle); flex-wrap: wrap; }
.st-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: var(--space-2); }
.st-note { font-size: 0.78rem; color: var(--text-subtle); }

.st-banner { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-6) var(--space-6); border-radius: var(--radius-xl); color: var(--text-strong); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.st-banner::before { content: ''; position: absolute; inset: 0; opacity: 0.9; pointer-events: none; }
.st-banner > * { position: relative; }
.st-banner.is-ok::before { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gc-mint-500) 22%, transparent), transparent 60%); }
.st-banner.is-minor::before { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gc-amber-500) 26%, transparent), transparent 60%); }
.st-banner.is-major::before, .st-banner.is-critical::before { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gc-red-500) 26%, transparent), transparent 60%); }
.st-banner-icon { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.st-banner.is-ok .st-banner-icon { background: var(--gc-mint-500); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gc-mint-500) 18%, transparent); }
.st-banner.is-minor .st-banner-icon { background: var(--gc-amber-500); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gc-amber-500) 20%, transparent); }
.st-banner.is-major .st-banner-icon, .st-banner.is-critical .st-banner-icon { background: var(--gc-red-500); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gc-red-500) 20%, transparent); }
.st-banner-title { font-size: 1.3rem; font-weight: 680; letter-spacing: -0.02em; }
.st-banner-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.1rem; }
.st-banner.is-compact { padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); margin-bottom: var(--space-6); }
.st-banner.is-compact .st-banner-icon { width: 2.25rem; height: 2.25rem; box-shadow: none; }
.st-banner.is-compact .st-banner-title { font-size: 1rem; }

.st-card { overflow: hidden; }
.st-components { list-style: none; padding: 0; margin: 0; }
.st-component { padding: var(--space-5) var(--space-6); display: grid; gap: var(--space-3); }
.st-component + .st-component { border-top: 1px solid var(--border-subtle); }
.st-component-head { display: flex; justify-content: space-between; gap: var(--space-4); align-items: flex-start; }
.st-component-name { font-weight: 620; color: var(--text-strong); }
.st-component-desc { font-size: 0.8125rem; color: var(--text-subtle); margin-top: 0.1rem; }
.st-component-status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.st-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.st-component-status.is-ok { color: var(--success); }
.st-component-status.is-minor { color: var(--warning); }
.st-component-status.is-major, .st-component-status.is-critical { color: var(--danger); }

.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 28px; }
.st-bar { border-radius: 2px; background: color-mix(in srgb, var(--gc-mint-500) 70%, var(--surface)); transition: transform var(--duration-fast), filter var(--duration-fast); }
.st-bar:hover { transform: scaleY(1.15); filter: brightness(1.1); }
.st-bar.is-minor, .st-key.is-minor { background: var(--gc-amber-500); }
.st-bar.is-major, .st-key.is-major { background: #f0743a; }
.st-bar.is-critical, .st-key.is-critical { background: var(--gc-red-500); }
.st-key.is-ok { background: color-mix(in srgb, var(--gc-mint-500) 70%, var(--surface)); }
.st-bar.is-notice, .st-key.is-notice { background: var(--gc-orbit-400); }
.st-from-sm { display: none; }
.st-bars-legend { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-subtle); }

.st-incident { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6); box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.st-incident::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--info); }
.st-incident.impact-minor::before { background: var(--gc-amber-500); }
.st-incident.impact-major::before, .st-incident.impact-critical::before { background: var(--gc-red-500); }
.st-incident + .st-incident { margin-top: var(--space-3); }
.st-incident-head { display: flex; justify-content: space-between; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-4); }
.st-incident-title { font-size: 1rem; letter-spacing: -0.015em; }
.st-incident-title a { color: var(--text-strong); text-decoration: none; }
.st-incident-title a:hover { text-decoration: underline; }
.st-incident-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); font-size: 0.8rem; }

.st-updates { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); position: relative; }
.st-update { display: grid; gap: var(--space-1); padding-left: var(--space-5); position: relative; }
.st-update::before { content: ''; position: absolute; left: 0; top: 0.45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.st-update:not(:last-child)::after { content: ''; position: absolute; left: 3.5px; top: 1.1rem; bottom: calc(-1 * var(--space-4)); width: 1px; background: var(--border); }
.st-update-head { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; font-size: 0.8125rem; }
.st-update-head time { color: var(--text-subtle); }
.st-update-status { color: var(--text-strong); }
.st-update-status.is-resolved { color: var(--success); }
.st-update-status.is-investigating { color: var(--danger); }
.st-update-status.is-identified { color: var(--warning); }
.st-update-status.is-monitoring { color: var(--info); }
.st-update-body { font-size: 0.875rem; color: var(--text-muted); }

.st-past { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.st-past-item + .st-past-item { border-top: 1px solid var(--border-subtle); }
.st-past-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.25rem var(--space-4); padding: var(--space-4) var(--space-5); align-items: baseline; }
.st-past-item summary::-webkit-details-marker { display: none; }
.st-past-item summary:hover { background: var(--bg-subtle); }
.st-past-date { color: var(--text-subtle); font-size: 0.8125rem; font-variant-numeric: tabular-nums; grid-row: span 2; }
.st-past-title { font-weight: 600; color: var(--text-strong); }
.st-past-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 0.78rem; }
.st-past-item details[open] summary { background: var(--bg-subtle); }
.st-past-item details > .st-updates { padding: var(--space-4) var(--space-5) var(--space-5) calc(6.5rem + var(--space-5) + var(--space-4)); }

.st-foot { padding-block: var(--space-6) var(--space-10); border-top: 1px solid var(--border-subtle); color: var(--text-subtle); font-size: 0.8125rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6); }

.st-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.st-mini li { display: flex; align-items: center; gap: var(--space-3); font-size: 0.8125rem; }
.st-checks { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

@media (max-width: 640px) {
  .st-main { padding-block: var(--space-6) var(--space-10); gap: var(--space-8); }
  .st-banner { padding: var(--space-5); }
  .st-banner-title { font-size: 1.1rem; }
  .st-component { padding: var(--space-4); }
  .st-component-head { flex-direction: column; gap: var(--space-2); }
  .st-bars { grid-template-columns: repeat(45, minmax(0, 1fr)); }
  .st-bar:nth-child(-n + 45) { display: none; }
  .st-from-lg { display: none; }
  .st-from-sm { display: inline; }
  .st-past-item summary { grid-template-columns: 1fr; }
  .st-past-date { grid-row: auto; }
  .st-past-item details > .st-updates { padding: var(--space-4) var(--space-5); }
  .st-top-nav { gap: var(--space-3); }
  .st-hide-xs { display: none; }
  .st-incident { padding: var(--space-4); }
  .st-incident-head { flex-direction: column; }
}
