@import url("buttons.css");
@import url("navigation.css");

/* Conflitulus design tokens and base rules. Load first on every page.
 *
 * Accents preserve main's blue brand (#245493); actions stay charcoal.
 * every text pairing below meets WCAG AA (4.5:1) on its intended surface.
 * Graph colors are light tints of the app's role hues: evaluators indigo, candidates green, conflict lines brick red.
 */
:root {
  --font-body: "Lato", Arial, sans-serif;
  --app-font-family: var(--font-body);

  --color-primary: oklch(44.68977% 0.115822 256.38278);        /* 7.6:1 on white; exact main brand value */
  --color-primary-hover: color-mix(in oklch, var(--color-primary), black 20%);
  --color-primary-soft: color-mix(in oklch, var(--color-primary) 8%, white);
  --color-primary-soft-hover: color-mix(in oklch, var(--color-primary) 14%, white);
  --color-accent: oklch(48.5% 0.115 152);                      /* brand leaf green */
  --color-accent-soft: oklch(95.5% 0.025 152);
  --button-color: var(--color-primary);
  --button-soft: var(--color-primary-soft);
  --navigation-color: var(--color-ink);
  --navigation-hover: var(--color-primary);
  --color-ink: oklch(25.19647% 0 none);
  --color-muted: oklch(45.97883% 0.019874 251.04153);          /* 7.1:1 on white, 6.6:1 on canvas */
  --color-surface: oklch(100% 0 none);
  --color-canvas: oklch(96.8% 0.005 252);
  --color-canvas-subtle: oklch(95.2% 0.006 252);
  --color-border: oklch(62% 0.016 254.66529);
  --color-divider: oklch(90.5% 0.008 247.92397);
  --color-success: oklch(44.17272% 0.077476 160.03987);
  --color-success-soft: oklch(95.01319% 0.017648 148.10122);
  --color-success-border: oklch(79.02061% 0.063165 153.46597);
  --color-danger: oklch(45.52412% 0.142485 27.51541);
  --color-danger-soft: oklch(96.75314% 0.012957 17.38042);
  --color-danger-hover: color-mix(in oklch, var(--color-danger), black 20%);
  --color-danger-ink: oklch(38.87398% 0.125476 25.19082);       /* alert text on danger-soft */
  --color-danger-border: oklch(59.65502% 0.181759 24.51199);
  --color-highlight: var(--color-primary);                      /* upload heading accent */
  --color-warning: oklch(42.43984% 0.08386 70.17847);
  --color-warning-soft: oklch(96.77325% 0.054089 95.86843);
  --color-warning-border: oklch(76.75091% 0.139497 87.46705);
  --color-attention: oklch(42.97834% 0.10551 55.72529);        /* conflict badge text */
  --color-attention-soft: oklch(96.46555% 0.027089 72.81481);   /* conflict badge and matrix hit */
  --color-info: oklch(39.59227% 0.074643 249.66061);
  --color-info-soft: oklch(96.16365% 0.011378 252.08813);
  --color-info-border: oklch(82.85414% 0.037249 252.11637);

  /* Conflict graph palette (PyVis output, routes._build_network) — shared by legend and matrix.
     The app's role hues (evaluator indigo, candidate green, conflict brick red), lightened to read on the dark canvas. */
  --graph-background: oklch(25.19647% 0 none);                 /* #222222 */
  --graph-evaluator: oklch(54% 0.08 272.5);                    /* #5f6c9d */
  --graph-candidate: oklch(55% 0.08 155.4);                    /* #48805d */
  --graph-work: oklch(63% 0.13 28);                            /* #cc675c */
  --graph-edge: oklch(55% 0 none);                             /* #717171 */

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --radius: .5rem;
  --radius-lg: .75rem;
  --shadow-sm: 0 1px 2px oklch(20% 0.02 252 / 0.05), 0 1px 3px oklch(20% 0.02 252 / 0.04);
  --shadow-md: 0 4px 12px oklch(20% 0.02 252 / 0.07), 0 1px 3px oklch(20% 0.02 252 / 0.05);
  --shadow-lg: 0 12px 32px oklch(20% 0.02 252 / 0.10), 0 2px 6px oklch(20% 0.02 252 / 0.06);
  --target-min: 44px;
  --content-max: 1200px;
  --focus-ring: 3px solid var(--color-primary);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --text-page-title: clamp(1.6rem, 1.39rem + 1.05vw, 2.2rem);
  --text-section-title: clamp(1.35rem, 1.2rem + 0.75vw, 1.75rem);
  --text-team-title: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem);
  --text-counter: clamp(3.25rem, 2rem + 6vw, 5.5rem);
  --space-page: clamp(1rem, .75rem + 1.25vw, 1.5rem);
  --space-nav: clamp(1rem, -.143rem + 5.714vw, 5rem);
  --space-auth-card: clamp(1.25rem, -.1rem + 5.5vw, 2.5rem);
  --graph-phone-size: clamp(20rem, 65dvh, 37.5rem);
  --space-landing-gutter: clamp(1rem, 4vw, 4rem);
  --space-landing-pad: clamp(1.5rem, 4vw, 4rem);
  --space-landing-section: clamp(3rem, 7vw, 6rem);
  --space-landing-figure: clamp(1.25rem, 3vw, 3rem);
  --text-landing-hero: clamp(2.25rem, 3.7vw, 3.5rem);
  --text-landing-title: clamp(2rem, 3.6vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-wrap: break-word; scrollbar-gutter: stable; }
button, a, summary, [role="button"] { touch-action: manipulation; }
button, [role="button"] { user-select: none; }
/* Named content tracks replace centered page-width wrappers. */
:is(.app-main, .history-main, .section-center) {
  --gutter: var(--space-page);
  display: grid;
  grid-template-columns: [full-width-start] minmax(var(--gutter), 1fr) [content-start] min(100% - var(--gutter) * 2, var(--content)) [content-end] minmax(var(--gutter), 1fr) [full-width-end];
  align-content: start;
}
:is(.app-main, .history-main, .section-center) > * { grid-column: content; min-inline-size: 0; }
/* Press feedback without movement, including on touch screens. */
:where(a, button, summary, [role="button"], label:has(input)):not(:disabled):not([aria-disabled="true"]):active { opacity: .78; }

:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

.skip-link {
  position: absolute; inset-inline-start: var(--space-4); inset-block-start: -100px; z-index: 1000;
  display: inline-flex; align-items: center; min-block-size: var(--target-min); padding-block: var(--space-2); padding-inline: var(--space-4); background: var(--color-primary);
  color: oklch(100% 0 none); font-weight: 700; border-radius: var(--radius);
}
.skip-link:focus { inset-block-start: var(--space-4); }

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0;
  overflow: clip; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
