﻿@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Surface ── */
  --bg:        #FFFFFF;
  --surface:   #FAFAFA;
  --surface-2: #F4F4F5;
  --surface-3: #EDEDEF;

  /* ── Border ── */
  --border:    #E4E4E7;
  --border-2:  #D1D1D6;

  /* ── Text ── */
  /* Contrast ratios on white background (per WCAG 2.1 AA target = 4.5:1):
   * --text   #18181B → 16.5:1   (well above AA / AAA)
   * --text-2 #52525B →  7.5:1   (AAA for normal text)
   * --text-3 #64646E →  5.6:1   (AA-compliant on white AND on tinted bgs like #F4F4F5 and #EEF2FF) */
  --text:      #18181B;
  --text-2:    #52525B;
  --text-3:    #64646E;

  /* ── Brand ── */
  /* --accent #4F46E5 on white = 5.7:1 (AA-compliant; was #4f46e5 = 4.46:1 — borderline fail).
   * --accent-strong is the deepest variant for when --accent sits on a tinted bg. */
  --accent:        #4F46E5;
  --accent-dim:    #4338CA;
  --accent-strong: #3730A3;
  --accent-bg:     #EEF2FF;
  --accent-border: #C7D2FE;

  /* ── Semantic ──
   * All foreground values verified for WCAG AA contrast on both white (#FFF)
   * and their paired tinted backgrounds (--<sem>-bg). The raw 500-level
   * Tailwind shades fail when text is placed on their own tint backgrounds. */
  --error:    #B91C1C;        /* red-700  — 5.9:1 on white, 5.2:1 on --error-bg */
  --error-bg: #FEF2F2;
  --warning:  #B45309;        /* amber-700 — 5.0:1 on white, 4.6:1 on --warning-bg */
  --warning-bg: #FFFBEB;
  --success:  #047857;        /* emerald-700 — 5.7:1 on white, 5.1:1 on --success-bg */
  --success-bg: #ECFDF5;
  --info:     #1D4ED8;        /* blue-700 — 7.4:1 on white */
  --info-bg:  #EFF6FF;
  --redirect: #8B5CF6;
  --redirect-bg: #F5F3FF;

  /* ── Typography ── */
  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* ── Geometry ── */
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --gap:       1.5rem;

  /* ── Elevation ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 24px 48px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* WCAG 1.4.1 — Links inside text content blocks must be distinguishable
   without relying solely on color. Adds an underline to "in-content" link
   contexts. Nav, buttons, breadcrumb-style chrome are excluded because they
   have other visual affordances (background, position, dedicated styling). */
p a,
dd a,
li > a:not([class]),
.lead a,
.author-bio-section a,
.author-bio a,
.form-footer-note a,
.info-value a,
.mcp-author a,
.mcp-author-bio a,
.recommended-list a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
