/*
 * Decipon Brand CSS — Design Tokens as CSS Custom Properties
 * Generated from tokens.json | Version 1.0
 *
 * Single source of truth for colors, typography, and score tiers.
 * Import this file in all web templates and pages.
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Primary */
  --brand-deep-teal: #0D7377;
  --brand-ocean-blue: #1B4965;
  --brand-soft-white: #F7F9FA;

  /* Secondary */
  --brand-light-teal: #5DB7B8;
  --brand-mist-blue: #BEE3DB;
  --brand-slate: #3A4750;

  /* Accent */
  --brand-amber: #E8A838;

  /* Score Tiers (NCI Protocol §5.3) */
  --tier-low: #2E9E6B;
  --tier-moderate: #E8A838;
  --tier-high: #E07B3C;
  --tier-severe: #D45B3E;
  --system-success: #2E9E6B;
  --system-warning: #E8A838;
  --system-error: #C94040;
  --system-info: #3B82C4;

  /* Interaction States */
  --brand-deep-teal-hover: #0a5c5f;
  --brand-ocean-blue-dark: #122f45;

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Type Scale */
  --type-display-size: 3rem;
  --type-display-weight: 700;
  --type-display-lh: 1.1;
  --type-display-ls: -0.02em;
  --type-h1-size: 2rem;
  --type-h1-weight: 700;
  --type-h1-lh: 1.2;
  --type-h1-ls: -0.02em;
  --type-h2-size: 1.5rem;
  --type-h2-weight: 600;
  --type-h2-lh: 1.3;
  --type-h2-ls: -0.01em;
  --type-h3-size: 1.25rem;
  --type-h3-weight: 600;
  --type-h3-lh: 1.4;
  --type-h3-ls: 0;
  --type-h4-size: 1rem;
  --type-h4-weight: 600;
  --type-h4-lh: 1.4;
  --type-h4-ls: 0.01em;
  --type-body-large-size: 1.125rem;
  --type-body-large-weight: 400;
  --type-body-large-lh: 1.6;
  --type-body-large-ls: 0;
  --type-body-size: 1rem;
  --type-body-weight: 400;
  --type-body-lh: 1.6;
  --type-body-ls: 0;
  --type-body-small-size: 0.875rem;
  --type-body-small-weight: 400;
  --type-body-small-lh: 1.5;
  --type-body-small-ls: 0.01em;
  --type-label-size: 0.875rem;
  --type-label-weight: 600;
  --type-label-lh: 1.4;
  --type-label-ls: 0.05em;
  --type-caption-size: 0.75rem;
  --type-caption-weight: 500;
  --type-caption-lh: 1.4;
  --type-caption-ls: 0.02em;
  --type-score-display-size: 3rem;
  --type-score-display-weight: 700;
  --type-score-display-lh: 1.0;
  --type-score-display-ls: -0.02em;
  --type-stat-number-size: 2rem;
  --type-stat-number-weight: 700;
  --type-stat-number-lh: 1.1;
  --type-stat-number-ls: -0.01em;
  --type-score-label-size: 0.875rem;
  --type-score-label-weight: 500;
  --type-score-label-lh: 1.4;
  --type-score-label-ls: 0.05em;
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --brand-soft-white: #0f172a;
    --brand-slate: #cbd5e1;
  }
}

/* Utility Classes */
.btn-brand-primary {
  background-color: var(--brand-deep-teal);
  color: white;
  transition: background-color 0.2s;
}
.btn-brand-primary:hover {
  background-color: var(--brand-deep-teal-hover);
}

/* Accessibility: Focus Indicators (WCAG 2.4.7) */
/* High-contrast focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--brand-light-teal);
  outline-offset: 2px;
}

/* Remove default focus ring (we use focus-visible instead) */
:focus:not(:focus-visible) {
  outline: none;
}

/* Enhanced focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-light-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Make sr-only visible on focus (for skip links) */
.sr-only:focus,
.sr-only:focus-visible {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
