@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-regular-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-medium-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-serif-regular-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-serif-medium-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-serif-semibold-latin.woff2") format("woff2");
}

:root {
  /* Identidade visual GLL, alinhada aos tokens do protótipo validado. */
  --gll-ink: #182923;
  --gll-ink-soft: #4c5d55;
  --gll-forest: #183d35;
  --gll-forest-hover: #28564a;
  --gll-accent: #b57b43;
  --gll-canvas: #f5f3ed;
  --gll-paper: #fffefa;
  --gll-paper-muted: #efeee7;
  --gll-line: #d9dcd2;
  --gll-line-strong: #b8c2b5;
  --gll-success: #256a4f;
  --gll-success-bg: #e4f1e8;
  --gll-warning: #895a1a;
  --gll-warning-bg: #f6ebd5;
  --gll-danger: #9c4c42;
  --gll-danger-bg: #f7e9e5;
  --gll-info: #35647c;
  --gll-info-bg: #e6eef1;
  --gll-selection-bg: #e8eee4;
  --gll-selection-control: var(--gll-forest);
  --gll-selection-ink: var(--gll-forest);
  --gll-focus: #ad7237;
  --gll-on-forest: #edf3ea;
  --gll-forest-muted: #a9c0b2;
  --gll-forest-hover-surface: rgb(255 255 255 / 8%);
  --gll-forest-divider: rgb(255 255 255 / 16%);
  --gll-brand-mark: #f0e7d6;

  /* Typography: body, headings and numerical values use the prototype fonts. */
  --gll-font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --gll-font-display: "IBM Plex Serif", Georgia, serif;
  --gll-font-mono: "IBM Plex Mono", Consolas, monospace;
  --gll-text-xs: 0.75rem;
  --gll-text-sm: 0.875rem;
  --gll-text-md: 1rem;
  --gll-text-lg: 1.2rem;
  --gll-text-xl: 1.7rem;
  --gll-text-display: clamp(2rem, 2.7vw, 2.8rem);

  /* Spacing: four-pixel base scale used by the prototype. */
  --gll-space-1: 0.25rem;
  --gll-space-2: 0.5rem;
  --gll-space-3: 0.75rem;
  --gll-space-4: 1rem;
  --gll-space-6: 1.5rem;
  --gll-space-8: 2rem;
  --gll-space-12: 3rem;

  /* Shapes, elevation and dimensions from the prototype. */
  --gll-radius-sm: 4px;
  --gll-radius-md: 8px;
  --gll-radius-lg: 12px;
  --gll-shadow-sm: 0 2px 8px rgb(24 41 35 / 5%);
  --gll-shadow-md: 0 14px 34px rgb(24 41 35 / 12%);
  --gll-shadow-overlay: 0 30px 70px rgb(10 30 24 / 22%);
  --gll-sidebar-width: 258px;
  --gll-control-height: 44px;

  /* Compatibility names keep the existing HTML and components working. */
  --color-primary: var(--gll-forest);
  --color-primary-hover: var(--gll-forest-hover);
  --color-secondary: var(--gll-forest);
  --color-background: var(--gll-canvas);
  --color-surface: var(--gll-paper);
  --color-surface-subtle: var(--gll-paper-muted);
  --color-border: var(--gll-line);
  --color-border-strong: var(--gll-line-strong);
  --color-text-primary: var(--gll-ink);
  --color-text-secondary: var(--gll-ink-soft);
  --color-muted: var(--gll-ink-soft);
  --color-success: var(--gll-success);
  --color-success-surface: var(--gll-success-bg);
  --color-warning: var(--gll-warning);
  --color-warning-surface: var(--gll-warning-bg);
  --color-danger: var(--gll-danger);
  --color-danger-surface: var(--gll-danger-bg);
  --color-info: var(--gll-info);
  --color-info-surface: var(--gll-info-bg);
  --color-complete: var(--gll-success);
  --color-complete-surface: var(--gll-success-bg);
  --color-status-neutral: var(--gll-ink-soft);
  --color-status-neutral-surface: var(--gll-paper-muted);
  --color-status-approved: var(--gll-success);
  --color-status-analysis: var(--gll-warning);
  --color-status-disputed: var(--gll-info);
  --color-status-rejected: var(--gll-danger);
  --color-status-rejected-surface: var(--gll-danger-bg);
  --color-focus-ring: rgb(173 114 55 / 28%);
  --color-overlay: rgb(10 30 24 / 62%);

  --font-family-sans: var(--gll-font-body);
  --font-family-display: var(--gll-font-display);
  --font-family-mono: var(--gll-font-mono);
  --font-size-xs: var(--gll-text-xs);
  --font-size-sm: var(--gll-text-sm);
  --font-size-md: var(--gll-text-md);
  --font-size-lg: var(--gll-text-lg);
  --font-size-xl: var(--gll-text-xl);
  --font-size-2xl: var(--gll-text-xl);
  --font-size-3xl: var(--gll-text-display);
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 700;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;

  --space-0: 0;
  --space-xs: var(--gll-space-1);
  --space-sm: var(--gll-space-2);
  --space-md: var(--gll-space-3);
  --space-lg: var(--gll-space-4);
  --space-xl: var(--gll-space-6);
  --space-2xl: var(--gll-space-8);
  --space-3xl: var(--gll-space-12);

  --radius-xs: var(--gll-radius-sm);
  --radius-sm: var(--gll-radius-md);
  --radius-md: var(--gll-radius-md);
  --radius-lg: var(--gll-radius-lg);
  --radius-xl: var(--gll-radius-lg);
  --radius-pill: 999px;
  --border-width: 1px;
  --border-default: var(--border-width) solid var(--gll-line);
  --border-strong: var(--border-width) solid var(--gll-line-strong);

  --shadow-sm: var(--gll-shadow-sm);
  --shadow-md: var(--gll-shadow-md);
  --shadow-lg: var(--gll-shadow-overlay);
  --shadow-focus: 0 0 0 3px var(--color-focus-ring);

  --z-base: 0;
  --z-sticky: 10;
  --z-menu: 100;
  --z-dropdown: 200;
  --z-overlay: 800;
  --z-modal: 900;
  --z-toast: 1000;
  --z-tooltip: 1100;

  --control-height-sm: 2.375rem;
  --control-height-md: var(--gll-control-height);
  --control-height-lg: 3rem;
  --dialog-width-sm: 30rem;
  --dialog-width-md: 48rem;
  --dialog-width-lg: 65rem;
  --dialog-width-xl: 68.75rem;
  --dialog-shadow: var(--gll-shadow-overlay);
  --sidebar-width: var(--gll-sidebar-width);

  --scrollbar-track: var(--gll-paper-muted);
  --scrollbar-thumb: var(--gll-line-strong);
  --scrollbar-thumb-hover: var(--gll-forest);
  --scrollbar-thumb-active: var(--gll-forest-hover);

  --bg: var(--gll-canvas);
  --panel: var(--gll-paper);
  --panel-alt: var(--gll-paper-muted);
  --border: var(--gll-line);
  --border-strong: var(--gll-line-strong);
  --text: var(--gll-ink);
  --muted: var(--gll-ink-soft);
  --primary: var(--gll-forest);
  --primary-dark: var(--gll-forest-hover);
  --sidebar: var(--gll-forest);
  --danger: var(--gll-danger);
  --danger-bg: var(--gll-danger-bg);
  --success: var(--gll-success);
  --success-bg: var(--gll-success-bg);
  --warning: var(--gll-warning);
  --warning-bg: var(--gll-warning-bg);
  --info: var(--gll-info);
  --info-bg: var(--gll-info-bg);
  --shadow: var(--gll-shadow-overlay);
  --radius: var(--gll-radius-md);
}
