/* ===========================================================
   Rozumnyi Dim v2 — design tokens. Palette/fonts carried forward
   verbatim from rozumnyi-dim-child/assets/custom.css (dark by
   default, zinc neutral scale + blue accent, Inter + JetBrains
   Mono) — this is a structural portal rebuild, not a re-skin, so
   the visual identity itself does not change (research.md D2).
   =========================================================== */

@font-face {
	font-family: 'InterVariable';
	src: url('fonts/inter-var.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'InterVariable';
	src: url('fonts/inter-var-italic.woff2') format('woff2');
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/jbm-400-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/jbm-400-latin.woff2') format('woff2');
	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: 'JetBrains Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('fonts/jbm-500-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('fonts/jbm-500-latin.woff2') format('woff2');
	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: 'JetBrains Mono';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('fonts/jbm-600-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('fonts/jbm-600-latin.woff2') format('woff2');
	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: 'JetBrains Mono';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('fonts/jbm-700-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('fonts/jbm-700-latin.woff2') format('woff2');
	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;
}

:root {
	/* dark is the default palette (no [data-theme] override needed) */
	--rd-bg: #09090b;
	--rd-bg-alt: #18181b;
	--rd-card-bg: #131316;
	--rd-text: #d4d4d8;
	--rd-text-muted: #a1a1aa;
	--rd-border: #3f3f46;
	--rd-accent: #60a5fa;
	--rd-accent-hover: #93c5fd;
	--rd-accent-soft: rgba(96, 165, 250, 0.14);
	--rd-accent-ink: #0b1220;
	--rd-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);

	--rd-font-body: 'InterVariable', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	/* mono is for actual code only — everything else (nav, labels,
	   logo) uses body font, per the July 2026 fidelity pass */
	--rd-font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Consolas, "Roboto Mono", monospace;
	--rd-radius: 8px;

	/* type scale (~1.20 ratio, 16px base) */
	--rd-fs-sm: 0.85rem;
	--rd-fs-base: 1rem;
	--rd-fs-md: 1.2rem;
	--rd-fs-lg: 1.44rem;
	--rd-fs-xl: 1.728rem;
	--rd-fs-2xl: 2.074rem;
	--rd-lh-body: 1.7;

	/* spacing scale (4px base) */
	--rd-space-1: 0.25rem;
	--rd-space-2: 0.5rem;
	--rd-space-3: 0.75rem;
	--rd-space-4: 1rem;
	--rd-space-6: 1.5rem;
	--rd-space-8: 2rem;
	--rd-space-12: 3rem;

	/* content container widths */
	--rd-measure: 720px;
	--rd-wide: 1100px;
}

html[data-theme="light"] {
	--rd-bg: #ffffff;
	--rd-bg-alt: #fafafa;
	--rd-card-bg: #ffffff;
	--rd-text: #18181b;
	--rd-text-muted: #71717a;
	--rd-border: #e4e4e7;
	--rd-accent: #3b82f6;
	--rd-accent-hover: #2563eb;
	--rd-accent-soft: rgba(59, 130, 246, 0.10);
	--rd-accent-ink: #ffffff;
	--rd-shadow: 0 1px 2px rgba(24, 24, 27, 0.05), 0 8px 24px rgba(24, 24, 27, 0.06);
}
