/*
 * Author: Andrey Morozov
 * Confidential. Shared IAM documentation design tokens and browser reset.
 * This file defines the visual contract only; layout and content components
 * live in companion stylesheets so the source stays independently auditable.
 */

:root {
  --iam-canvas: #0a1020;
  --iam-canvas-deep: #060a16;
  --iam-canvas-lift: #0e162a;
  --iam-surface: rgba(18, 28, 52, 0.72);
  --iam-surface-strong: rgba(24, 36, 64, 0.82);
  --iam-panel: rgba(255, 255, 255, 0.035);
  --iam-panel-hover: rgba(91, 140, 255, 0.08);
  --iam-stroke: rgba(155, 180, 230, 0.12);
  --iam-stroke-strong: rgba(155, 180, 230, 0.22);
  --iam-stroke-bright: rgba(180, 200, 240, 0.34);
  --iam-divider: rgba(120, 150, 200, 0.09);
  --iam-ink: #e6ecf7;
  --iam-ink-mute: #a6b1c8;
  --iam-ink-dim: #6b7794;
  --iam-ink-faint: #4a5573;
  --iam-blue: #5b8cff;
  --iam-blue-hi: #84a8ff;
  --iam-blue-soft: rgba(91, 140, 255, 0.12);
  --iam-azure: #0ea5e9;
  --iam-teal: #33c98a;
  --iam-violet: #a78bfa;
  --iam-orange: #ff8a3d;
  --iam-coral: #f07178;
  --iam-rose: #fb7185;
  --iam-amber: #f5a623;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --header-height: 64px;
  --sidebar-width: 264px;
  --toc-width: 210px;
  --content-width: 860px;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --transition: 180ms cubic-bezier(.2, .65, .2, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 520px at 72% -8%, rgba(91, 140, 255, 0.09), transparent 62%),
    linear-gradient(180deg, var(--iam-canvas) 0%, var(--iam-canvas-deep) 100%);
  color: var(--iam-ink);
  font: 400 16px/1.62 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  content: "";
  opacity: .38;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { border: 0; background: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(91, 140, 255, .35); color: white; }

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

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

.product-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--iam-blue);
  box-shadow: 0 0 12px currentColor;
}

.product-dot.blue { background: var(--iam-blue); color: var(--iam-blue); }
.product-dot.azure { background: var(--iam-azure); color: var(--iam-azure); }
.product-dot.teal { background: var(--iam-teal); color: var(--iam-teal); }
.product-dot.violet { background: var(--iam-violet); color: var(--iam-violet); }
.product-dot.orange { background: var(--iam-orange); color: var(--iam-orange); }
.product-dot.coral { background: var(--iam-coral); color: var(--iam-coral); }
.product-dot.rose { background: var(--iam-rose); color: var(--iam-rose); }
.product-dot.amber { background: var(--iam-amber); color: var(--iam-amber); }
