/**************************************************************************************************
 * Horizon Design System v2 — Comprehensive CSS
 * playcity Glass Morphism + shadcn/ui Style + Accessibility
 **************************************************************************************************/

/* ================================================================================================
   Font System
   ================================================================================================ */

:root {
  --font-sans-en: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif-en: 'Instrument Serif', Georgia, serif;
  --font-sans-kr: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-sans-global: 'Noto Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --font-sans-locale: var(--font-sans-kr);
  --font-family: var(--font-sans-en), var(--font-sans-locale), var(--font-sans-global);
  --font-family-serif: var(--font-serif-en), 'Noto Serif KR', serif;
}

:root[lang="ko"] {
  --font-sans-locale: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
}

:root[lang="ja"] {
  --font-sans-locale: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

:root[lang="zh"] {
  --font-sans-locale: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root[lang="fr"],
:root[lang="en"] {
  --font-sans-locale: 'Noto Sans', sans-serif;
}

/* ================================================================================================
   Icon System - Material Symbols Outlined
   ================================================================================================ */

:root.symbols-font-pending .hz-icon,
:root.symbols-font-pending .material-symbols-outlined {
  visibility: hidden;
}

.hz-icon,
.material-symbols-outlined.hz-icon {
  font-family: "Material Symbols Outlined";
  font-variation-settings:
    "FILL" 0,
    "wght" 250,
    "GRAD" 0,
    "opsz" 40;

  /* Prevent baseline/layout shifts */
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.hz-icon.icon-16 { font-size: 16px; }

/* ================================================================================================
   Theme Tokens - Light Mode (Default)
   ================================================================================================ */

:root, :root[data-theme="light"] {
  color-scheme: light;

  /* PlayCity Brand Colors */
  --pc-primary-blue: #0074ff;
  --pc-primary-red: #e04b4b;
  --pc-legacy-blue: #0857c3;
  --pc-horizon-green: #34a853;
  --pc-warning: #f59e0b;
  --pc-purple: #8b5cf6;

  /* Semantic aliases */
  --primary: var(--pc-primary-blue);
  --primary-hover: var(--pc-legacy-blue);
  --destructive: var(--pc-primary-red);
  --success: var(--pc-horizon-green);
  --warning: var(--pc-warning);
  --accent: var(--pc-purple);

  /* Background & Foreground */
  --background: #ffffff;
  --background-subtle: #fafafa;
  --foreground: #0f0f0f;

  /* Card & Surface */
  --card: #ffffff;
  --card-foreground: #0f0f0f;
  --surface: #f4f4f5;
  --surface-foreground: #18181b;

  /* Muted */
  --muted: #f4f4f5;
  --muted-foreground: #71717a;

  /* Border & Input */
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --input: #e4e4e7;
  --ring: var(--primary);

  /* Glass Morphism */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(26, 28, 31, 0.12);
  --glass-border-strong: rgba(26, 28, 31, 0.18);
  --glass-blur: 20px;
  --glass-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);

  /* Text on colors */
  --primary-foreground: #ffffff;
  --destructive-foreground: #ffffff;
  --success-foreground: #ffffff;

  /* Glow effects */
  --glow-primary: rgba(0, 116, 255, 0.15);
  --glow-success: rgba(52, 168, 83, 0.15);
  --glow-destructive: rgba(224, 75, 75, 0.15);

  /* Spacing (4px grid - compact) */
  --space-0: 0px;
  --space-px: 1px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Spacing semantics (AI-safe) */
  --gap-2xs: var(--space-1); /* 4px */
  --gap-xs: var(--space-2);  /* 8px */
  --gap-md: var(--space-4);  /* 16px */
  --gap-xl: var(--space-8);  /* 32px */
  --keyline-x: var(--space-5); /* 20px */

  /* Semantic spacing aliases (prefer over primitives in app code) */
  --space-stack-sm: var(--gap-xs);
  --space-stack-md: var(--gap-md);
  --space-stack-lg: var(--gap-xl);

  /* Control sizing presets (S/M/L only) */
  --control-h-s: 32px;
  --control-h-m: 40px;
  --control-h-l: 48px;
  --control-px-s: var(--space-3); /* 12px */
  --control-px-m: var(--space-4); /* 16px */
  --control-px-l: var(--space-5); /* 20px */
  --control-font-s: 13px;
  --control-font-m: 14px;
  --control-font-l: 16px;
  --control-icon-s: 16px;
  --control-icon-m: 20px;
  --control-icon-l: 24px;

  /* Modal width presets */
  --modal-w-xs: 400px;
  --modal-w-m: 560px;
  --modal-w-l: 800px;
  --modal-w-full: calc(100vw - var(--space-12)); /* 48px */

  /* Border Radius */
  --radius-sm: 4px;
  --radius: 6px;
	  --radius-md: 8px;
	  --radius-lg: 12px;
	  --radius-xl: 16px;
	  --radius-full: 9999px;

	  /* Line heights (4px grid aligned) */
	  --lh-xs: 16px;
	  --lh-sm: 16px;
	  --lh-body: 20px;
	  --lh-h4: 20px;
	  --lh-h3: 24px;
	  --lh-h2: 28px;
	  --lh-h1: 32px;
	  --lh-display: 36px;

	  /* Shadows */
	  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
	  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
	  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);

	  /* Layout */
	  --sidebar-width: 220px;
	  --header-height: 48px;
	  --page-max: 100vw; /* desktop default: fill the viewport */
	  --content-max: 100%;

	  /* Z-index layers */
	  --z-mobile-sidebar: 40;
	  --z-header: 50;
	  --z-toast: 180;
	  --z-overlay: 200;
	  --z-popover: 220;
	  --z-tooltip: 230;
	}

:root[data-layout="centered"] {
  --page-max: 1280px;
  --content-max: 960px;
}

:root[data-layout="docs"] {
  --page-max: 1440px;
  --content-max: 960px;
}

:root[data-layout="fluid"] {
  --page-max: 100vw;
  --content-max: 100%;
}

:root[data-layout="content"] {
  --page-max: 100vw;
  --content-max: 100%;
}

/* ================================================================================================
   Dark Mode
   ================================================================================================ */

:root[data-theme="dark"] {
  color-scheme: dark;

  --background: #09090b;
  --background-subtle: #0f0f12;
  --foreground: #fafafa;

  --card: #09090b;
  --card-foreground: #fafafa;
  --surface: #18181b;
  --surface-foreground: #fafafa;

  --muted: #27272a;
  --muted-foreground: #a1a1aa;

  --border: #27272a;
  --border-strong: #3f3f46;
  --input: #27272a;

  --glass-bg: rgba(20, 20, 22, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);

  --primary: #3b8eff;
  --primary-hover: #60a5ff;
  --glow-primary: rgba(59, 142, 255, 0.2);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
}

/* ================================================================================================
   High Contrast Light
   ================================================================================================ */

:root[data-theme="hc-light"] {
  color-scheme: light;

  --background: #ffffff;
  --background-subtle: #ffffff;
  --foreground: #000000;

  --card: #ffffff;
  --card-foreground: #000000;
  --surface: #f0f0f0;
  --surface-foreground: #000000;

  --muted: #e0e0e0;
  --muted-foreground: #1a1a1a;

  --border: #000000;
  --border-strong: #000000;
  --input: #000000;

  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.5);
  --glass-border-strong: rgba(0, 0, 0, 0.7);
  --glass-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);

  --primary: #0052cc;
  --primary-hover: #003d99;
  --destructive: #cc0000;
  --success: #006622;
}

/* ================================================================================================
   High Contrast Dark
   ================================================================================================ */

:root[data-theme="hc-dark"] {
  color-scheme: dark;

  --background: #000000;
  --background-subtle: #000000;
  --foreground: #ffffff;

  --card: #000000;
  --card-foreground: #ffffff;
  --surface: #1a1a1a;
  --surface-foreground: #ffffff;

  --muted: #2a2a2a;
  --muted-foreground: #e0e0e0;

  --border: #ffffff;
  --border-strong: #ffffff;
  --input: #ffffff;

  --glass-bg: rgba(0, 0, 0, 0.95);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-border-strong: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);

  --primary: #66b3ff;
  --primary-hover: #99ccff;
  --destructive: #ff6666;
  --success: #66cc77;
}

/* ================================================================================================
   Colorblind Mode (Deuteranopia-friendly)
   ================================================================================================ */

:root[data-theme="colorblind"] {
  color-scheme: light;

  --background: #fefefe;
  --foreground: #1a1a1a;

  --primary: #1464a0;
  --primary-hover: #1b7ac7;
  --destructive: #cc3300;
  --success: #009e73;
  --warning: #cc6600;

  --card: #ffffff;
  --muted: #f0f0f0;
  --muted-foreground: #4a4a4a;
  --border: #cccccc;

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(26, 28, 31, 0.12);
  --glass-border-strong: rgba(26, 28, 31, 0.18);
  --glass-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* ================================================================================================
   Base Styles
   ================================================================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

:root[data-hz-boot="1"] {
  scroll-behavior: auto;
}

:root[data-hz-boot="1"] *,
:root[data-hz-boot="1"] *::before,
:root[data-hz-boot="1"] *::after {
  transition: none !important;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-family);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================================================
   Typography
   ================================================================================================ */

.text-display { font-size: 28px; font-weight: 700; line-height: var(--lh-display); letter-spacing: -0.02em; }
.text-h1 { font-size: 22px; font-weight: 600; line-height: var(--lh-h1); letter-spacing: -0.01em; }
.text-h2 { font-size: 18px; font-weight: 600; line-height: var(--lh-h2); }
.text-h3 { font-size: 16px; font-weight: 600; line-height: var(--lh-h3); }
.text-h4 { font-size: 14px; font-weight: 600; line-height: var(--lh-h4); }
.text-body { font-size: 14px; line-height: var(--lh-body); }
.text-sm { font-size: 12px; line-height: var(--lh-sm); }
.text-xs { font-size: 11px; line-height: var(--lh-xs); }
.text-mono { font-family: var(--font-mono); }
.text-serif { font-family: var(--font-family-serif); }

.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-destructive { color: var(--destructive); }
.text-warning { color: var(--warning); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ================================================================================================
   Layout
   ================================================================================================ */

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
	.header {
	  position: fixed;
	  top: 0;
	  left: 0;
	  right: 0;
	  z-index: var(--z-header);
	  height: var(--header-height);
	  background: var(--glass-bg);
	  backdrop-filter: blur(var(--glass-blur));
	  -webkit-backdrop-filter: blur(var(--glass-blur));
	  border-bottom: 1px solid var(--glass-border);
	}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  height: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 clamp(var(--space-2), 4vw, var(--space-4));
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  overflow: hidden;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}

.header-left .text-muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.logo-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.header-nav {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

@media (min-width: 1025px) {
  .header-nav { display: flex; }
}

.header-nav a {
  padding: var(--space-1-5) var(--space-2-5);
  font-size: 12px;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.header-nav a:hover {
  color: var(--foreground);
  background: var(--muted);
}

.header-nav a.active {
  color: var(--foreground);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Theme Switcher */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-0-5);
  padding: var(--space-0-5);
  background: var(--muted);
  border-radius: var(--radius);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.theme-btn:hover {
  color: var(--foreground);
  background: var(--background);
}

.theme-btn.active {
  color: var(--foreground);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}

.theme-btn .hz-icon {
  font-size: 18px;
  color: inherit;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 8vw, 32px);
  height: clamp(28px, 8vw, 32px);
  border-radius: var(--radius);
  color: var(--muted-foreground);
}

.mobile-theme-section {
  display: none;
}

.mobile-theme-switcher {
  display: none;
  padding: 0;
  margin: 0;
  gap: var(--space-1);
  width: 100%;
}

@media (min-width: 1025px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.mobile-menu-btn .hz-icon { font-size: 20px; }

@media (max-width: 640px) {
  .header-right > .theme-switcher {
    display: none;
  }
  .mobile-theme-section {
    display: block;
    border: 0;
    margin: 0;
    padding: 0;
  }
  .mobile-theme-switcher {
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
  }
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  padding-top: var(--header-height);
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
}

/* Sidebar */
.sidebar {
  display: none;
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  width: var(--sidebar-width);
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--background);
}

@media (min-width: 1025px) {
  .sidebar {
    display: block;
    left: max(0px, calc((100vw - var(--page-max)) / 2));
  }
}

.sidebar-section {
  margin-bottom: var(--space-5);
}

.sidebar-title {
  padding: var(--space-1-5) var(--space-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-link {
  display: block;
  padding: var(--space-1) var(--space-2);
  font-size: 12px;
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover {
  color: var(--foreground);
  background: var(--muted);
}

.sidebar-link.active {
  color: var(--foreground);
  background: var(--muted);
  font-weight: 500;
}

/* Mobile Sidebar */
	.mobile-sidebar {
	  display: none;
	  position: fixed;
	  top: var(--header-height);
	  left: 0;
	  right: 0;
	  bottom: 0;
	  z-index: var(--z-mobile-sidebar);
	  background: var(--background);
	  padding: var(--space-4);
	  overflow-y: auto;
	}

.mobile-sidebar.open {
  display: block;
}

@media (min-width: 1025px) {
  .mobile-sidebar { display: none !important; }
}

/* Content */
.content-wrapper {
  flex: 1;
  min-width: 0;
  padding: var(--space-5) var(--space-3);
}

@media (min-width: 1025px) {
  .content-wrapper {
    margin-left: var(--sidebar-width);
    padding: var(--space-5) var(--space-6);
  }
}

.content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

:root[data-layout="centered"] .sidebar { display: none !important; }
:root[data-layout="centered"] .mobile-sidebar { display: none !important; }
:root[data-layout="centered"] .mobile-menu-btn { display: none !important; }

@media (min-width: 1025px) {
  :root[data-layout="centered"] .content-wrapper { margin-left: 0; }
  :root[data-layout="centered"] .footer { margin-left: 0; }
}

/* ================================================================================================
   Section Styles
   ================================================================================================ */

.section {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-header {
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.section-description {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 24px;
  max-width: 560px;
}

.subsection {
  margin-top: var(--space-4);
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.subsection-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

/* ================================================================================================
   Badge
   ================================================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--muted);
  color: var(--muted-foreground);
}

.badge-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.badge-success {
  background: var(--success);
  color: var(--success-foreground);
}

.badge-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

/* ================================================================================================
   Button System (v1 inspired)
   ================================================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
  padding: var(--space-1-5) var(--space-3);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.15s;
  white-space: nowrap;
  min-height: 32px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  color: var(--primary-foreground);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--glow-primary);
}

.btn-success {
  background: var(--success);
  color: var(--success-foreground);
}

.btn-success:hover:not(:disabled) {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

.btn-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.btn-destructive:hover:not(:disabled) {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover:not(:disabled) {
  background: var(--muted);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--muted);
}

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--foreground);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.btn-glass:hover:not(:disabled) {
  background: var(--glass-border);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
}

/* Button Sizes */
.btn-xs {
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  min-height: 24px;
}

.btn-sm {
  padding: var(--space-1) var(--space-2-5);
  font-size: 12px;
  min-height: 28px;
}

.btn-lg {
  padding: var(--space-2-5) var(--space-5);
  font-size: 14px;
  min-height: 40px;
}

/* Button Shapes */
.btn-pill {
  border-radius: var(--radius-full);
}

/* ================================================================================================
   Card System (v1 inspired)
   ================================================================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
}

.card-description {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: var(--space-0-5);
}

.card-content {
  padding: var(--space-3);
}

.card-content > :first-child { margin-top: 0; }
.card-content > :last-child { margin-bottom: 0; }

.card-footer {
  padding: var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--muted);
}

/* Interactive Card */
.card-hover {
  transition: all 0.2s;
}

.card-hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-media {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2);
  align-items: start;
}

.card-media-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

/* Glass Card (v1) */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.glass-card-hover {
  transition: all 0.2s;
}

.glass-card-hover:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================================================================================
   Input Components (v1 inspired)
   ================================================================================================ */

.input {
  width: 100%;
  padding: var(--space-1-5) var(--space-3);
  font-size: 13px;
  font-family: inherit;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 32px;
}

.input.input-md {
  min-height: var(--control-h-m);
  font-size: var(--control-font-m);
  padding: var(--space-2) var(--control-px-m);
}

.input.input-lg {
  min-height: var(--control-h-l);
  font-size: var(--control-font-l);
  padding: var(--space-3) var(--control-px-l);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--glow-primary);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input with validation */
.input-success {
  border-color: var(--success);
}

.input-success:focus {
  box-shadow: 0 0 0 2px var(--glow-success);
}

.input-error {
  border-color: var(--destructive);
}

.input-error:focus {
  box-shadow: 0 0 0 2px var(--glow-destructive);
}

/* Input Group */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.input-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
}

.input-hint {
  font-size: 11px;
  color: var(--muted-foreground);
}

.input-error-text {
  font-size: 11px;
  color: var(--destructive);
}

/* Textarea */
.textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  font-family: inherit;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  color: var(--foreground);
  resize: vertical;
  min-height: 80px;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--glow-primary);
}

/* Select */
.select-wrapper {
  position: relative;
  display: inline-flex;
  width: 100%;
  max-width: 100%;
}

.select-wrapper .select {
  padding-right: var(--space-8);
}

.select-wrapper .select-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-foreground);
  font-size: 18px;
}

.select {
  width: 100%;
  padding: var(--space-1-5) var(--space-3);
  font-size: 13px;
  font-family: inherit;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-height: 32px;
}

.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--glow-primary);
}

/* ================================================================================================
   Checkbox
   ================================================================================================ */

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.checkbox {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox::after {
  content: "";
  grid-area: 1 / 1;
  width: 4px;
  height: 8px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s;
}

.checkbox:checked::after {
  border-color: var(--primary-foreground);
  opacity: 1;
}

.checkbox:focus-visible {
  box-shadow: 0 0 0 2px var(--glow-primary);
}

.checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-label {
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

/* ================================================================================================
   Radio
   ================================================================================================ */

.radio-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.radio {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.radio:checked {
  border-color: var(--primary);
}

.radio::after {
  content: "";
  grid-area: 1 / 1;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}

.radio:checked::after {
  opacity: 1;
  transform: scale(1);
}

.radio:focus-visible {
  box-shadow: 0 0 0 2px var(--glow-primary);
}

.radio:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radio-label {
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  user-select: none;
}

/* Selection controls & action list items */
.checkbox.checkbox-20,
.radio.radio-20 {
  width: 20px;
  height: 20px;
}

.radio.radio-20::after {
  width: 10px;
  height: 10px;
}

.checkbox.checkbox-20::after {
  width: 5px;
  height: 10px;
}

.action-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

.action-item {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* 12px */
  min-height: 48px;
  padding: 0 var(--keyline-x);
  cursor: pointer;
  user-select: none;
}

.action-item:hover {
  background: var(--muted);
}

.action-item:focus-within {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.action-item__control {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.action-item__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-0-5);
}

.action-item__title {
  font-size: 14px;
  font-weight: 500;
  line-height: var(--lh-body);
}

.action-item__desc {
  font-size: 12px;
  line-height: var(--lh-sm);
  color: var(--muted-foreground);
}

.action-item--multiline {
  align-items: flex-start;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.action-item--multiline .action-item__control {
  margin-top: var(--action-item-control-offset, 2px);
}

/* ================================================================================================
   Switch (Toggle)
   ================================================================================================ */

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  appearance: none;
  background: var(--muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--background);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.switch:checked {
  background: var(--primary);
}

.switch:checked::after {
  transform: translateX(16px);
}

.switch:focus-visible {
  box-shadow: 0 0 0 2px var(--glow-primary);
}

.switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch-label {
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  user-select: none;
}

/* ================================================================================================
   Slider
   ================================================================================================ */

.slider {
  width: 100%;
  height: 4px;
  appearance: none;
  background: var(--muted);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: var(--shadow-sm);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
}

.slider:focus-visible {
  outline: none;
}

.slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--glow-primary);
}

/* ================================================================================================
   Code Block
   ================================================================================================ */

.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1-5) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.code-block-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.code-block pre {
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: inherit;
}

/* Inline Code */
code:not(.code-block code) {
  padding: 2px 5px;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--muted);
  border-radius: var(--radius-sm);
}

/* Copy Button */
.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.copy-btn:hover {
  color: var(--foreground);
  background: var(--surface);
}

.copy-btn .hz-icon { font-size: 16px; }

/* ================================================================================================
   Table
   ================================================================================================ */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  line-height: 16px;
  color: var(--muted-foreground);
  background: var(--muted);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--border);
  vertical-align: middle;
}

.table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--border);
  vertical-align: middle;
}

.table-dense {
  font-size: 11px;
}

.table-dense th,
.table-dense td {
  padding: var(--space-1-5) var(--space-2);
}

.table-wrapper.table-sticky thead th {
  position: sticky;
  top: var(--sticky-offset, 0px);
  z-index: 1;
}

.datatable-scroll {
  max-height: 240px;
  overflow: auto;
}

.table-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.table-check .checkbox {
  margin: 0;
}

.table tr:last-child td {
  box-shadow: none;
}

.table tr:hover td {
  background: var(--muted);
}

/* ================================================================================================
   Spacing Demo (v1 dotted line style)
   ================================================================================================ */

.spacing-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1-5) 0;
}

.spacing-box {
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.spacing-dotted {
  border-bottom: 2px dashed var(--border-strong);
  flex-shrink: 0;
}

.spacing-label {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  min-width: 48px;
  color: var(--foreground);
}

/* ================================================================================================
   Color System
   ================================================================================================ */

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.color-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}

.color-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.color-swatch {
  height: 56px;
}

.color-info {
  padding: var(--space-2);
  background: var(--card);
}

.color-name {
  font-size: 12px;
  font-weight: 600;
}

.color-value {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}

/* ================================================================================================
   Glass Morphism Demo (v1 style)
   ================================================================================================ */

.glass-demo-bg {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

.glass-demo-bg > .stars {
  z-index: 0;
}

.glass-demo-bg > .grid {
  position: relative;
  z-index: 1;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
}

/* ================================================================================================
   Horizon Background System (v1)
   ================================================================================================ */

.horizon-gradient {
  background: linear-gradient(135deg,
    rgba(0, 116, 255, 0.1) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(224, 75, 75, 0.05) 100%);
}

.horizon-radial {
  background: radial-gradient(circle at 30% 20%, rgba(0, 116, 255, 0.15) 0%, transparent 40%);
}

/* Space Background */
.space-bg {
  position: relative;
  background: #000;
  overflow: hidden;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ================================================================================================
   Preview Box
   ================================================================================================ */

.preview-box {
  padding: var(--space-3);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.preview-box-col {
  flex-direction: column;
  align-items: flex-start;
}

/* ================================================================================================
   Pattern Demos (Docs)
   ================================================================================================ */

.pattern-frame {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.pattern-frame-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.pattern-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
}

.pattern-caption {
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.pattern-surface {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--muted);
}

.pattern-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pattern-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* Layout primitives (Spacing invariants) */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.stack-tight { gap: var(--gap-xs); }
.stack-loose { gap: var(--gap-xl); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-xs);
}

.cluster-tight { gap: var(--gap-2xs); }
.cluster-loose { gap: var(--gap-md); }

.pattern-chip,
.pattern-chip-muted,
.pattern-chip-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 var(--space-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 500;
}

.pattern-chip-muted {
  background: var(--muted);
  color: var(--muted-foreground);
}

.pattern-chip-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.usage-label-avoid {
  color: var(--destructive);
  font-weight: 700;
}

.usage-label-base {
  color: var(--primary);
  font-weight: 700;
}

.pattern-frame.stretch-card {
  display: flex;
  flex-direction: column;
}

.pattern-frame.stretch-card .usage-card {
  margin-top: auto;
}

.pattern-block {
  width: 100%;
  min-height: 36px;
  padding: var(--space-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
}

.layout-mode-mini .pattern-block {
}

.pattern-block-title {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.pattern-skeleton {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--border);
  overflow: hidden;
  opacity: 0.7;
}

.pattern-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%);
  animation: patternShimmer 1.2s infinite;
}

/* ================================================================================================
   Loading / Empty / Progress (Patterns)
   ================================================================================================ */

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--foreground);
  animation: hzSpin 0.8s linear infinite;
  flex-shrink: 0;
}

.spinner.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.spinner.spinner-lg {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

.spinner.spinner-xl {
  width: 48px;
  height: 48px;
  border-width: 4px;
  animation: hzSpin 1.35s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loading-line {
  position: relative;
  height: 3px;
  width: 100%;
  border-radius: var(--radius-full);
  background: var(--border);
  overflow: hidden;
}

.loading-line::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--primary);
  left: 0;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  animation: hzLoadingLine 1.4s ease-in-out infinite;
}

.loading-line.loading-line--edge {
  border-radius: 0;
}

.loading-line.is-determinate::after {
  animation: none;
  transform: scaleX(var(--loading-progress, 0));
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-1-5);
  padding: var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--background);
}

.empty-state-icon {
  font-size: 28px;
  color: var(--muted-foreground);
}

.empty-state-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.empty-state-desc {
  font-size: 12px;
  color: var(--muted-foreground);
  max-width: 40ch;
}

.empty-state-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-1);
}

/* ================================================================================================
   Layout & Interaction Invariants (Demos)
   ================================================================================================ */

.invariant-sandbox {
  position: relative;
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
}

.invariant-sandbox-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--subtool-top, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}

.invariant-sandbox-body {
  position: absolute;
  top: var(--subtool-top, 48px);
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-3);
  overflow: hidden;
}

.hz-subtool-overlay {
  position: absolute;
  inset: auto;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--subtool-top, 48px);
}

/* Layout mode mini diagrams (Docs) */
.layout-mode-mini {
  margin-top: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  background: var(--background-subtle);
}

.layout-mode-mini-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.layout-mode-mini-sidebar {
  width: 28%;
  min-width: 72px;
}

.layout-mode-mini-content {
  flex: 1;
  min-width: 0;
}

.layout-mode-mini-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  padding: var(--space-1-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 54px;
}

.layout-mode-mini-center {
  display: flex;
  justify-content: center;
}

.layout-mode-mini-narrow {
  width: min(320px, 76%);
}

@keyframes patternShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes hzSpin {
  to { transform: rotate(360deg); }
}

@keyframes hzLoadingLine {
  0% { transform: scaleX(0); }
  70% { transform: scaleX(1); }
  100% { transform: scaleX(1); }
}

.pattern-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  container-type: inline-size;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--muted);
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.pattern-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.pattern-toolbar > .pattern-toolbar-group:first-child {
  flex: 1 1 360px;
}

.pattern-toolbar > .pattern-toolbar-group:last-child {
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.pattern-toolbar .input,
.pattern-toolbar .select-wrapper {
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 160px;
}

/* Container Query demo (Responsive Strategy) */
.cq-demo {
  container-type: inline-size;
}

.cq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.cq-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: auto;
}

@container (max-width: 520px) {
  .pattern-toolbar {
    padding: var(--space-2-5);
  }

  .pattern-toolbar > .pattern-toolbar-group:first-child {
    flex: 1 1 100%;
  }

  .pattern-toolbar > .pattern-toolbar-group:last-child {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .cq-toolbar .actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .cq-toolbar .input,
  .cq-toolbar .select-wrapper {
    flex: 1 1 100%;
  }
}

.pattern-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
}

.pattern-pagination .pattern-inline {
  gap: var(--space-1);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  transition: color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
}

.icon-btn-circle {
  border-radius: var(--radius-full);
}

.icon-btn .hz-icon {
  font-size: 20px;
}

/* ================================================================================================
   Pill / Status Controls
   ================================================================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
  text-align: left;
  min-height: 44px;
  max-width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.pill:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.pill-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-0-5);
  min-width: 0;
}

.pill-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.pill-subtitle {
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.1;
}

/* Pulse indicator (solid, circular) */
.pulse-dot {
  --pulse-color: var(--primary);
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.pulse-dot::before,
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--pulse-color);
}

.pulse-dot::before {
  opacity: 0.35;
  animation: hzPing 1.4s ease-out infinite;
}

.pulse-dot::after {
  opacity: 1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.form-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
}

.form-field-required {
  color: var(--destructive);
  margin-left: var(--space-0-5);
}

.form-field-help {
  font-size: 11px;
  color: var(--muted-foreground);
}

.form-field-message {
  font-size: 11px;
  min-height: 16px; /* reserve space to prevent layout shift */
  color: var(--muted-foreground);
}

.form-field-message-error {
  color: var(--destructive);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  color: var(--muted-foreground);
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb a:hover {
  color: var(--foreground);
}

.breadcrumb-sep {
  color: var(--muted-foreground);
}

.breadcrumb [aria-current="page"] {
  color: var(--foreground);
  font-weight: 500;
}

.canvas-demo {
  position: relative;
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(59, 142, 255, 0.18), transparent 45%),
              radial-gradient(circle at 80% 60%, rgba(139, 92, 246, 0.18), transparent 55%),
              var(--background);
}

.canvas-demo-toolbar {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
}

.canvas-demo-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 220px;
  border-left: 1px solid var(--border);
  background: var(--background);
  padding: var(--space-4);
}

.canvas-demo-panel-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.canvas-demo-panel-item {
  height: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
  margin-bottom: var(--space-2);
}

/* ================================================================================================
   Overlay / Dialog (Docs)
   ================================================================================================ */

	.hz-overlay {
	  position: fixed;
	  inset: 0;
	  z-index: var(--z-overlay);
	  display: grid;
	  place-items: center;
	  padding: var(--space-4);
	  background: rgba(0, 0, 0, 0.45);
	  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 0ms linear 160ms;
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .hz-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.hz-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 160ms ease;
}

body.hz-overlay-open {
  overflow: hidden;
}

.hz-dialog {
  width: min(var(--hz-dialog-width, var(--modal-w-m, 520px)), 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: transform 160ms ease, opacity 160ms ease;
}

.hz-dialog.hz-dialog-xs { --hz-dialog-width: var(--modal-w-xs); }
.hz-dialog.hz-dialog-lg { --hz-dialog-width: var(--modal-w-l); }
.hz-dialog.hz-dialog-full { --hz-dialog-width: var(--modal-w-full); }

.hz-overlay.is-open .hz-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hz-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.hz-dialog-body {
  padding: var(--space-3) var(--space-4);
}

	.hz-dialog-footer {
	  display: flex;
	  flex-wrap: wrap;
	  justify-content: flex-end;
	  gap: var(--space-2);
	  padding: var(--space-3) var(--space-4);
	  border-top: 1px solid var(--border);
	  background: var(--muted);
	}

	/* Sheet / Drawer (right) */
	.hz-sheet-overlay {
	  position: fixed;
	  inset: 0;
	  z-index: var(--z-overlay);
	  display: flex;
	  justify-content: flex-end;
	  background: rgba(0, 0, 0, 0.45);
	  opacity: 0;
	  visibility: hidden;
	  pointer-events: none;
	  transition: opacity 160ms ease, visibility 0ms linear 160ms;
	}

	@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
	  .hz-sheet-overlay {
	    backdrop-filter: blur(8px);
	    -webkit-backdrop-filter: blur(8px);
	  }
	}

	.hz-sheet-overlay.is-open {
	  opacity: 1;
	  visibility: visible;
	  pointer-events: auto;
	  transition: opacity 160ms ease;
	}

	.hz-sheet {
	  width: min(420px, 92vw);
	  height: 100%;
	  background: var(--card);
	  border-left: 1px solid var(--border);
	  box-shadow: var(--shadow-lg);
	  transform: translateX(14px);
	  opacity: 0;
	  transition: transform 160ms ease, opacity 160ms ease;
	  display: flex;
	  flex-direction: column;
	  outline: none;
	}

	.hz-sheet-overlay.is-open .hz-sheet {
	  transform: translateX(0);
	  opacity: 1;
	}

	.hz-sheet-body {
	  padding: var(--space-3) var(--space-4);
	  overflow: auto;
	  flex: 1;
	}

	/* Popover / Dropdown */
	.popover-demo {
	  position: relative;
	  display: inline-flex;
	  align-items: center;
	}

	.hz-popover {
	  position: absolute;
	  top: calc(100% + var(--space-2));
	  right: 0;
	  width: 220px;
	  padding: var(--space-1);
	  border: 1px solid var(--border);
	  border-radius: var(--radius-md);
	  background: var(--card);
	  box-shadow: var(--shadow-lg);
	  z-index: var(--z-popover);
	}

	.hz-popover .hz-menu {
	  border: none;
	  background: transparent;
	}

	@media (prefers-reduced-motion: reduce) {
	  .hz-sheet-overlay,
	  .hz-sheet,
	  .hz-overlay,
	  .hz-dialog {
	    transition: none;
	  }
	}

	.hz-menu {
	  display: flex;
	  flex-direction: column;
	  gap: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  overflow: hidden;
}

.hz-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  color: var(--foreground);
  background: transparent;
}

.hz-menu-item:hover {
  background: var(--muted);
}

.hz-menu-item .hz-icon {
  font-size: 18px;
}

/* ================================================================================================
   Tabs
   ================================================================================================ */

.tabs {
  display: flex;
  flex-direction: column;
}

.tabs-list {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.tab-trigger {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}

.tab-trigger:hover {
  color: var(--foreground);
}

.tab-trigger.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

.tab-content {
  padding: var(--space-4) 0;
}

/* ================================================================================================
   Accordion
   ================================================================================================ */

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) 0;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--foreground);
}

.accordion-trigger .hz-icon {
  font-size: 16px;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.accordion-item.open .accordion-trigger .hz-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding-bottom: var(--space-3);
  font-size: 13px;
  color: var(--muted-foreground);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* ================================================================================================
   Tooltip
   ================================================================================================ */

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

	.tooltip {
	  position: absolute;
	  bottom: 100%;
	  left: 50%;
	  transform: translateX(-50%) translateY(-4px);
	  padding: var(--space-1) var(--space-2);
	  font-size: 11px;
	  background: var(--foreground);
	  color: var(--background);
	  border-radius: var(--radius-sm);
	  white-space: nowrap;
	  opacity: 0;
	  visibility: hidden;
	  transition: all 0.15s;
	  z-index: var(--z-tooltip);
	}
	
	.tooltip-wrapper:hover .tooltip,
	.tooltip-wrapper:focus-within .tooltip {
	  opacity: 1;
	  visibility: visible;
	  transform: translateX(-50%) translateY(-8px);
	}

/* ================================================================================================
   Progress
   ================================================================================================ */

.progress {
  width: 100%;
  height: 6px;
  background: var(--muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

/* ================================================================================================
   Avatar
   ================================================================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--muted);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }

/* ================================================================================================
   Separator
   ================================================================================================ */

.separator {
  height: 1px;
  background: var(--border);
  border: none;
}

.separator-inset {
  margin-left: var(--keyline-x);
  margin-right: var(--keyline-x);
}

.separator-bleed {
  margin-left: 0;
  margin-right: 0;
}

.separator-vertical {
  width: 1px;
  height: auto;
  align-self: stretch;
}

/* ================================================================================================
   Alert
   ================================================================================================ */

.alert {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  gap: var(--space-2);
}

.alert-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-0-5);
}

.alert-description {
  font-size: 12px;
  color: var(--muted-foreground);
}

.alert-info {
  border-color: var(--primary);
  background: rgba(0, 116, 255, 0.05);
}

.alert-success {
  border-color: var(--success);
  background: rgba(52, 168, 83, 0.05);
}

.alert-warning {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.alert-destructive {
  border-color: var(--destructive);
  background: rgba(224, 75, 75, 0.05);
}

/* ================================================================================================
   Utilities
   ================================================================================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0%; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.w-full { width: 100%; }
.w-6 { width: 24px; }
.w-10 { width: 40px; }
.max-w-xs { max-width: 280px; }
.max-w-sm { max-width: 360px; }
.min-w-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--clamp-lh, var(--lh-body));
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
  max-height: calc(var(--clamp-lh, var(--lh-body)) * 2);
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
  max-height: calc(var(--clamp-lh, var(--lh-body)) * 3);
}

.tabular-nums { font-variant-numeric: tabular-nums; }
.pattern-chip.truncate,
.pattern-chip-muted.truncate,
.pattern-chip-primary.truncate {
  display: inline-block;
  line-height: 28px;
  vertical-align: middle;
}

/* ================================================================================================
   Animation
   ================================================================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes hzPing {
  0% { transform: scale(1); opacity: 0.35; }
  70% { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

.animate-fade-in { animation: fadeIn 0.2s ease-out; }
.animate-fade-out { animation: fadeOut 0.2s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.2s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ================================================================================================
   Footer
   ================================================================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 11px;
}

@media (min-width: 1025px) {
  .footer { margin-left: var(--sidebar-width); }
}

	/* ================================================================================================
	   Toast (Sonner-like)
	   ================================================================================================ */
	
	.toast-viewport {
	  position: fixed;
	  top: var(--space-4);
	  right: var(--space-4);
	  display: flex;
	  flex-direction: column;
	  gap: var(--space-2);
	  width: min(360px, calc(100vw - var(--space-8)));
	  z-index: var(--z-toast);
	  pointer-events: none;
	}
	
	.toast-item {
	  pointer-events: auto;
	  display: grid;
	  grid-template-columns: 20px minmax(0, 1fr) auto;
	  gap: var(--space-2);
	  align-items: start;
	  padding: var(--space-3);
	  border-radius: var(--radius-md);
	  border: 1px solid var(--border);
	  background: var(--card);
	  color: var(--foreground);
	  box-shadow: var(--shadow-md);
	  opacity: 0;
	  transform: translateY(-8px);
	  transition: opacity 160ms ease, transform 160ms ease;
	}
	
	.toast-item[data-state="open"] {
	  opacity: 1;
	  transform: translateY(0);
	}
	
	.toast-item[data-state="closing"] {
	  opacity: 0;
	  transform: translateY(-8px);
	}
	
	.toast-icon {
	  font-size: 18px;
	  line-height: 1;
	  margin-top: 2px;
	  color: var(--muted-foreground);
	}
	
	.toast-item[data-variant="success"] .toast-icon { color: var(--success); }
	.toast-item[data-variant="info"] .toast-icon { color: var(--primary); }
	.toast-item[data-variant="warning"] .toast-icon { color: var(--warning); }
	.toast-item[data-variant="error"] .toast-icon { color: var(--destructive); }
	
	.toast-body { min-width: 0; }
	
	.toast-title {
	  margin: 0;
	  font-size: 12px;
	  font-weight: 600;
	}
	
	.toast-message {
	  margin: 0;
	  font-size: 12px;
	  color: var(--foreground);
	}
	
	.toast-meta {
	  margin-top: var(--space-1);
	  display: flex;
	  gap: var(--space-1);
	  align-items: center;
	}
	
	.toast-count {
	  display: inline-flex;
	  align-items: center;
	  height: 18px;
	  padding: 0 var(--space-1);
	  border: 1px solid var(--border);
	  border-radius: var(--radius-full);
	  font-size: 11px;
	  color: var(--muted-foreground);
	  background: var(--muted);
	}
	
	.toast-actions {
	  display: flex;
	  gap: var(--space-2);
	  align-items: center;
	}
	
	.toast-actions .btn { white-space: nowrap; }
	.toast-actions .icon-btn { flex: 0 0 auto; }
	
	@media (max-width: 480px) {
	  .toast-viewport {
	    left: var(--space-4);
	    right: var(--space-4);
	    width: auto;
	  }
	}
	
	@media (prefers-reduced-motion: reduce) {
	  .toast-item {
	    transition: none;
	    transform: none;
	  }
	}

/* ================================================================================================
   Scrollbar
   ================================================================================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ================================================================================================
   Accessibility Note
   ================================================================================================ */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: var(--primary-foreground);
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}
