/* ==========================================================================
   ChipLOGIC 2026 — Design Tokens & Base Reset
   Exact Brand Palette sampled from official Chip[LOGIC] logo:
   #191919 Matte Charcoal | #DB3140 Signal Crimson | #FFFFFF Pure White
   ========================================================================== */

:root {
	/* Brand & Surface Palette */
	--cl-bg: #0E0E11;
	--cl-bg-alt: #141418;
	--cl-surface: #191919;
	--cl-surface-elevated: #1E1E24;
	--cl-surface-brushed: linear-gradient(145deg, #23232A 0%, #17171C 58%, #131317 100%);
	--cl-surface-glass: rgba(20, 20, 25, 0.82);
	--cl-surface-glass-strong: rgba(16, 16, 20, 0.94);

	/* ChipLOGIC Signal Crimson (sampled from [LOGIC] block) */
	--cl-accent: #DB3140;
	--cl-accent-hover: #F03D4D;
	--cl-accent-dim: rgba(219, 49, 64, 0.14);
	--cl-accent-border: rgba(219, 49, 64, 0.45);
	--cl-accent-glow: rgba(219, 49, 64, 0.34);

	/* Typography Ink */
	--cl-ink: #FFFFFF;
	--cl-ink-secondary: #D4D4DC;
	--cl-ink-muted: #8E8E9B;

	/* Precision Borders */
	--cl-border: rgba(255, 255, 255, 0.085);
	--cl-border-strong: rgba(255, 255, 255, 0.16);

	/* Semantic Status Tokens (Consumed natively by KT OTP Registrar & ENCBOARD Flasher) */
	--cl-success-bg: rgba(52, 211, 153, 0.14);
	--cl-success-ink: #6EE7B7;
	--cl-success-border: rgba(52, 211, 153, 0.32);
	--cl-info-bg: rgba(56, 189, 248, 0.14);
	--cl-info-ink: #7DD3FC;
	--cl-info-border: rgba(56, 189, 248, 0.32);
	--cl-warn-bg: rgba(251, 191, 36, 0.14);
	--cl-warn-ink: #FCD34D;
	--cl-warn-border: rgba(251, 191, 36, 0.32);
	--cl-error-text: #FF8A94;

	/* Typography Families */
	--cl-font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cl-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--cl-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	/* Layout & Radii */
	--cl-container: 1280px;
	--cl-header-h: 76px;
	--cl-radius-sm: 4px;
	--cl-radius-md: 8px;
	--cl-radius-lg: 12px;

	/* Elevation & Transitions */
	--cl-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
	--cl-shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.58);
	--cl-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
	scroll-behavior: smooth;
	background-color: var(--cl-bg);
	color-scheme: dark;
	-webkit-text-size-adjust: 100%;
}

body.chiplogic-theme {
	margin: 0;
	padding: 0;
	background-color: var(--cl-bg);
	color: var(--cl-ink-secondary);
	font-family: var(--cl-font-body);
	font-size: 16px;
	line-height: 1.65;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--cl-ink);
	text-decoration: none;
	transition: color 0.2s var(--cl-ease), border-color 0.2s var(--cl-ease), background-color 0.2s var(--cl-ease);
}

a:hover {
	color: var(--cl-accent);
}

:focus-visible {
	outline: 2px solid var(--cl-accent);
	outline-offset: 2px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--cl-surface-elevated);
	border: 1px solid var(--cl-accent);
	border-radius: var(--cl-radius-sm);
	clip: auto !important;
	clip-path: none;
	color: var(--cl-ink);
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 12px;
	padding: 12px 18px;
	top: 12px;
	width: auto;
	z-index: 100000;
}

.cl-container {
	width: 100%;
	max-width: var(--cl-container);
	margin-inline: auto;
	padding-inline: clamp(18px, 3vw, 36px);
}

.cl-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}
