/* ===== Cognition University Brand Fonts ===== */

/* Inter is self-hosted alongside the other brand faces: the site CSP is
   `default-src 'self'` with no font/style exception, so a Google Fonts import
   is blocked outright, and partners on locked-down corporate networks often
   can't reach fonts.gstatic.com either. Variable font, one file per subset,
   covering the full 100–900 axis. Inter is licensed under the SIL OFL 1.1. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Variable-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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';
  src: url('../fonts/Inter-Variable-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Field Kit — Shared Design Tokens =====
   Single source of truth for the learn.devinenterprise.com design system:
   light editorial surfaces, ink text, electric-blue interactive accent,
   2px radii, borders instead of shadows. Imported by every page before its
   page-specific stylesheet so the catalog, doc viewer, and Foundations
   course share one design language. */

:root {
  /* ----- Layout ----- */
  --sidebar-w: 300px;
  --topbar-h: 60px;

  /* ----- Core palette (learn.devinenterprise.com) ----- */
  --bg: #f7f6f5;
  --surface: #ffffff;
  --ink: #191919;
  --ink-2: rgba(25, 25, 25, 0.56);
  --ink-3: rgba(25, 25, 25, 0.56);
  --line: rgba(0, 0, 0, 0.06);
  --blue: #2200ff;
  --blue-dark: #2200ff;
  --blue-soft: rgba(34, 0, 255, 0.05);
  --green: #19a974;
  --green-soft: #e7f7f0;
  --amber: #b97f10;
  --amber-soft: #fdf3df;
  --hover-bg: rgba(0, 0, 0, 0.04);
  --card-hover-border: rgba(0, 0, 0, 0.2);
  --radius: 2px;
  --shadow: none;

  /* ----- Surfaces (legacy names, aliased to the learn palette) ----- */
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-surface-raised: var(--bg);
  --color-surface-hover: var(--hover-bg);
  --color-border: var(--line);
  --color-border-light: var(--line);
  --color-border-hover: var(--card-hover-border);

  /* ----- Sidebar (light shell) ----- */
  --color-sidebar-bg: var(--surface);
  --color-sidebar-text: var(--ink-2);
  --color-sidebar-text-dim: var(--ink-3);
  --color-sidebar-active-bg: var(--blue-soft);
  --color-sidebar-active-text: var(--blue-dark);
  --color-sidebar-hover-bg: var(--hover-bg);
  --color-sidebar-group: var(--ink-3);

  /* ----- Text ----- */
  --color-text: var(--ink);
  --color-text-secondary: var(--ink-2);
  --color-text-muted: var(--ink-3);

  /* ----- Brand / interactive (electric blue) ----- */
  --color-primary: var(--blue);
  --color-primary-light: var(--blue);
  --color-primary-dim: var(--blue-soft);
  --color-primary-surface: var(--blue-soft);
  --color-primary-subtle: var(--blue-soft);
  --color-accent: var(--blue);
  --color-accent-dim: var(--blue-soft);

  /* ----- Status ----- */
  --color-success: var(--green);
  --color-success-dim: var(--green-soft);
  --color-success-surface: var(--green-soft);

  --color-danger: #b42318;
  --color-danger-dim: rgba(180, 35, 24, 0.08);

  --color-warning: var(--amber);
  --color-warning-dim: var(--amber-soft);

  --color-info: var(--ink-2);
  --color-info-dim: var(--hover-bg);
  --color-purple: var(--blue);
  --color-purple-dim: var(--blue-soft);

  /* ----- Radius (flat system: everything 2px) ----- */
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;

  /* ----- Shadow (none: elevation is expressed with 1px borders) ----- */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  /* ----- Type ----- */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Inter', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: var(--font);
  --font-mono: var(--mono);
  /* Brand font roles per current Cognition University: Inter carries headings
     and UI chrome; IBM Plex Mono is used for uppercase labels and metadata. */
  --font-heading: var(--font);
  --font-body: var(--font);
  --font-prose: var(--font);
  --font-weight-strong: 600;

  /* ----- Motion ----- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fluid type scale: rem-based sizes across every page grow smoothly with the
   viewport — ~17px on small screens up to ~19px on wide desktops. */
html {
  font-size: clamp(17px, 16px + 0.25vw, 19px);
}

::selection {
  background-color: var(--blue);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

/* Signature dotted texture behind the page shell (devin.ai / Devin
   University); surfaces sit on top, so dots only show in the gaps. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(13, 13, 13, 0.06) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
  z-index: -1;
}

/* ---- Shared button system (learn.devinenterprise.com) ----
   Default: outlined ink button that inverts on hover.
   .btn-primary / .btn.primary: solid near-black. Blue is never a fill. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 6px 12px 5px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  color: #fff;
}
.btn.primary,
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn.primary:hover,
.btn-primary:hover {
  opacity: 0.8;
}
.btn.lg {
  padding: 8px 16px 7px;
  font-size: 16px;
}

/* ---- Shared eyebrow label (mono uppercase) ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
}
