/*
 * ═══════════════════════════════════════════════════════════════
 * BUNYANGMATCH DESIGN SYSTEM v2
 * Atomic Design · Agent-First Architecture
 * ═══════════════════════════════════════════════════════════════
 *
 * LEVELS:
 *   0. TOKENS     — Design variables
 *   1. ATOMS      — Typography, Button, Badge, Input, Avatar, etc.
 *   2. MOLECULES  — Field, Stat, Card, Tab, Breadcrumb, Toast, etc.
 *   3. ORGANISMS  — Hero, CTA, Table, Modal, TOC, Timeline, etc.
 *   4. TEMPLATES  — Article layout, Landing layout
 *   S. SHOWCASE   — Admin showcase page only
 *
 * NAMING: ds-{component}[__{element}][--{modifier}]
 * All classes use `ds-` prefix (v1 conflict-free).
 *
 * AGENT USAGE:
 *   에이전트는 이 CSS 클래스만으로 블로그/랜딩/퍼블릭 페이지를 조립.
 *   토큰 변수를 재정의하면 테마 변경 가능.
 * ═══════════════════════════════════════════════════════════════
 */


/* ╔══════════════════════════════════════════════════════════════╗
   ║  0. DESIGN TOKENS                                          ║
   ╚══════════════════════════════════════════════════════════════╝ */

:root {
  /* ── Color: Lime (Primary) ── */
  --ds-lime-50:  #f7fee7;
  --ds-lime-100: #ecfccb;
  --ds-lime-200: #d9f99d;
  --ds-lime-300: #bef264;
  --ds-lime-400: #a3e635;
  --ds-lime-500: #84cc16;
  --ds-lime-600: #65a30d;
  --ds-lime-700: #4d7c0f;
  --ds-lime-800: #3f6212;
  --ds-lime-900: #365314;
  --ds-lime-950: #1a2e05;

  /* ── Color: Gray (Neutral) ── */
  --ds-gray-50:  #fafafa;
  --ds-gray-100: #f4f4f5;
  --ds-gray-200: #e4e4e7;
  --ds-gray-300: #d4d4d8;
  --ds-gray-400: #a1a1aa;
  --ds-gray-500: #71717a;
  --ds-gray-600: #52525b;
  --ds-gray-700: #3f3f46;
  --ds-gray-800: #27272a;
  --ds-gray-900: #18181b;
  --ds-gray-950: #09090b;

  /* ── Color: Status ── */
  --ds-red-50:  #fef2f2;
  --ds-red-100: #fee2e2;
  --ds-red-500: #ef4444;
  --ds-red-600: #dc2626;
  --ds-red-700: #b91c1c;

  --ds-yellow-50:  #fefce8;
  --ds-yellow-100: #fef9c3;
  --ds-yellow-500: #eab308;
  --ds-yellow-600: #ca8a04;

  --ds-blue-50:  #eff6ff;
  --ds-blue-100: #dbeafe;
  --ds-blue-500: #3b82f6;
  --ds-blue-600: #2563eb;

  --ds-green-50:  #f0fdf4;
  --ds-green-100: #dcfce7;
  --ds-green-500: #22c55e;
  --ds-green-600: #16a34a;

  /* ── Semantic Color ── */
  --ds-text-primary:   var(--ds-gray-900);
  --ds-text-secondary: var(--ds-gray-600);
  --ds-text-muted:     var(--ds-gray-400);
  --ds-text-inverse:   #ffffff;
  --ds-text-accent:    var(--ds-lime-700);

  --ds-bg-page:    #ffffff;
  --ds-bg-soft:    var(--ds-gray-50);
  --ds-bg-muted:   var(--ds-gray-100);
  --ds-bg-inverse: var(--ds-gray-950);
  --ds-bg-overlay: rgba(0, 0, 0, 0.6);

  --ds-border:        var(--ds-gray-200);
  --ds-border-light:  var(--ds-gray-100);
  --ds-border-strong: var(--ds-gray-300);
  --ds-border-focus:  var(--ds-lime-400);

  /* ── Typography ── */
  --ds-font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ds-font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  --ds-text-xs:   0.75rem;    /* 12px */
  --ds-text-sm:   0.8125rem;  /* 13px */
  --ds-text-base: 1rem;       /* 16px */
  --ds-text-md:   1.125rem;   /* 18px */
  --ds-text-lg:   1.25rem;    /* 20px */
  --ds-text-xl:   1.375rem;   /* 22px */
  --ds-text-2xl:  1.75rem;    /* 28px */
  --ds-text-3xl:  2rem;       /* 32px */
  --ds-text-4xl:  2.5rem;     /* 40px */
  --ds-text-5xl:  3rem;       /* 48px */
  --ds-text-6xl:  3.75rem;    /* 60px */

  /* ── Spacing ── */
  --ds-space-1:  4px;
  --ds-space-2:  8px;
  --ds-space-3:  12px;
  --ds-space-4:  16px;
  --ds-space-5:  20px;
  --ds-space-6:  24px;
  --ds-space-8:  32px;
  --ds-space-10: 40px;
  --ds-space-12: 48px;
  --ds-space-16: 64px;
  --ds-space-20: 80px;
  --ds-space-24: 96px;

  /* ── Radius ── */
  --ds-radius-xs:   4px;
  --ds-radius-sm:   6px;
  --ds-radius-md:   8px;
  --ds-radius-lg:   12px;
  --ds-radius-xl:   16px;
  --ds-radius-2xl:  20px;
  --ds-radius-3xl:  24px;
  --ds-radius-full: 9999px;

  /* ── Shadow ── */
  --ds-shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --ds-shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --ds-shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --ds-shadow-lg:  0 8px 24px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.04);
  --ds-shadow-xl:  0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.05);
  --ds-shadow-glow-lime: 0 0 24px rgba(163,230,53,0.35);
  --ds-shadow-glow-lime-lg: 0 8px 40px rgba(163,230,53,0.45);

  /* ── Transition ── */
  --ds-ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ds-ease-in:   cubic-bezier(0.55, 0, 1, 0.45);
  --ds-ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ds-duration-fast: 150ms;
  --ds-duration-base: 250ms;
  --ds-duration-slow: 400ms;

  /* ── Z-Index ── */
  --ds-z-dropdown: 10;
  --ds-z-sticky:   20;
  --ds-z-overlay:  30;
  --ds-z-modal:    40;
  --ds-z-toast:    50;
  --ds-z-max:      60;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  1. ATOMS                                                  ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── 1.1 Typography ── */

.ds-display {
  font-family: var(--ds-font-sans);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ds-text-primary);
  word-break: keep-all;
}

.ds-h1 {
  font-family: var(--ds-font-sans);
  font-size: clamp(1.625rem, 4.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ds-text-primary);
  word-break: keep-all;
}

.ds-h2 {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.35;
  color: var(--ds-text-primary);
  word-break: keep-all;
}

.ds-h3 {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--ds-text-primary);
  word-break: keep-all;
}

.ds-h4 {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--ds-text-primary);
  word-break: keep-all;
}

.ds-body {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 400;
  line-height: 1.85;
  color: var(--ds-text-secondary);
  word-break: keep-all;
}

.ds-body--sm {
  font-size: var(--ds-text-base);
  line-height: 1.75;
}

.ds-body--lg {
  font-size: var(--ds-text-lg);
  line-height: 1.9;
}

.ds-caption {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ds-text-muted);
}

.ds-label {
  font-family: var(--ds-font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ds-text-muted);
}

.ds-overline {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-text-accent);
}

.ds-code {
  font-family: var(--ds-font-mono);
  font-size: 0.875em;
  font-weight: 500;
  color: var(--ds-lime-700);
  background: var(--ds-lime-50);
  padding: 2px 7px;
  border-radius: var(--ds-radius-xs);
}

@media (max-width: 768px) {
  .ds-h2  { font-size: var(--ds-text-lg); }
  .ds-body { font-size: var(--ds-text-base); line-height: 1.78; }
}


/* ── 1.2 Button ── */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ds-font-sans);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ds-duration-base) var(--ds-ease-out);
  -webkit-tap-highlight-color: transparent;
}

.ds-btn:active {
  transform: scale(0.97);
}

/* Primary */
.ds-btn--primary {
  background: var(--ds-lime-400);
  color: var(--ds-lime-950);
  font-size: var(--ds-text-base);
  padding: 14px 28px;
  border-radius: var(--ds-radius-full);
  box-shadow: var(--ds-shadow-glow-lime);
}
.ds-btn--primary:hover {
  background: var(--ds-lime-500);
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-glow-lime-lg);
}

/* Secondary */
.ds-btn--secondary {
  background: var(--ds-gray-900);
  color: var(--ds-text-inverse);
  font-size: var(--ds-text-base);
  padding: 14px 28px;
  border-radius: var(--ds-radius-full);
  box-shadow: var(--ds-shadow-md);
}
.ds-btn--secondary:hover {
  background: var(--ds-gray-800);
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-lg);
}

/* Ghost */
.ds-btn--ghost {
  background: transparent;
  color: var(--ds-text-secondary);
  font-size: var(--ds-text-sm);
  padding: 10px 16px;
  border-radius: var(--ds-radius-md);
}
.ds-btn--ghost:hover {
  background: var(--ds-gray-100);
  color: var(--ds-text-primary);
}

/* Outline */
.ds-btn--outline {
  background: var(--ds-bg-page);
  color: var(--ds-text-secondary);
  font-size: var(--ds-text-sm);
  padding: 10px 20px;
  border-radius: var(--ds-radius-full);
  border: 1px solid var(--ds-border);
}
.ds-btn--outline:hover {
  border-color: var(--ds-lime-400);
  color: var(--ds-lime-700);
  background: var(--ds-lime-50);
}

/* Danger */
.ds-btn--danger {
  background: var(--ds-red-500);
  color: white;
  font-size: var(--ds-text-sm);
  padding: 10px 20px;
  border-radius: var(--ds-radius-full);
}
.ds-btn--danger:hover {
  background: var(--ds-red-600);
  transform: translateY(-1px);
}

/* Sizes */
.ds-btn--sm {
  font-size: var(--ds-text-sm);
  padding: 8px 16px;
  gap: 6px;
}

.ds-btn--lg {
  font-size: var(--ds-text-md);
  font-weight: 800;
  padding: 18px 36px;
  gap: 10px;
}

/* Icon-only */
.ds-btn--icon {
  padding: 10px;
  border-radius: var(--ds-radius-lg);
  background: var(--ds-bg-soft);
  color: var(--ds-text-secondary);
  border: 1px solid var(--ds-border-light);
}
.ds-btn--icon:hover {
  background: var(--ds-gray-200);
  color: var(--ds-text-primary);
}

/* Block */
.ds-btn--block {
  width: 100%;
}


/* ── 1.3 Badge ── */

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ds-font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--ds-radius-full);
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.4;
}

.ds-badge--lime {
  background: var(--ds-lime-100);
  color: var(--ds-lime-700);
  border: 1px solid var(--ds-lime-200);
}

.ds-badge--gray {
  background: var(--ds-gray-100);
  color: var(--ds-gray-500);
  border: 1px solid var(--ds-gray-200);
}

.ds-badge--red {
  background: var(--ds-red-50);
  color: var(--ds-red-600);
  border: 1px solid var(--ds-red-100);
}

.ds-badge--yellow {
  background: var(--ds-yellow-50);
  color: var(--ds-yellow-600);
  border: 1px solid var(--ds-yellow-100);
}

.ds-badge--blue {
  background: var(--ds-blue-50);
  color: var(--ds-blue-600);
  border: 1px solid var(--ds-blue-100);
}

.ds-badge--green {
  background: var(--ds-green-50);
  color: var(--ds-green-600);
  border: 1px solid var(--ds-green-100);
}

/* Dark badge (for dark backgrounds) */
.ds-badge--dark {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
}

.ds-badge--sm {
  font-size: 10px;
  padding: 2px 8px;
}

.ds-badge--lg {
  font-size: var(--ds-text-xs);
  padding: 6px 14px;
  font-weight: 600;
}

/* Category Badge (blog/landing hero) */
.ds-badge--category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  background: rgba(163,230,53,0.18);
  color: var(--ds-lime-400);
  border: 1px solid rgba(163,230,53,0.25);
}

/* Tag Badge */
.ds-badge--tag {
  font-size: var(--ds-text-xs);
  font-weight: 600;
  padding: 4px 10px;
  background: var(--ds-lime-50);
  color: var(--ds-lime-700);
  border: 1px solid var(--ds-lime-200);
}


/* ── 1.4 Form: Input ── */

.ds-input {
  display: block;
  width: 100%;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: 500;
  color: var(--ds-text-primary);
  background: var(--ds-bg-page);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--ds-duration-fast) ease, box-shadow var(--ds-duration-fast) ease;
}
.ds-input::placeholder {
  color: var(--ds-text-muted);
  font-weight: 400;
}
.ds-input:focus {
  border-color: var(--ds-lime-400);
  box-shadow: 0 0 0 3px rgba(163,230,53,0.15);
}
.ds-input--error {
  border-color: var(--ds-red-500);
}
.ds-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.ds-textarea {
  display: block;
  width: 100%;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: 500;
  color: var(--ds-text-primary);
  background: var(--ds-bg-page);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  padding: 12px 16px;
  outline: none;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  transition: border-color var(--ds-duration-fast) ease, box-shadow var(--ds-duration-fast) ease;
}
.ds-textarea:focus {
  border-color: var(--ds-lime-400);
  box-shadow: 0 0 0 3px rgba(163,230,53,0.15);
}

/* Select (custom trigger) */
.ds-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: 500;
  color: var(--ds-text-primary);
  background: var(--ds-bg-page);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color var(--ds-duration-fast) ease;
}
.ds-select:hover {
  border-color: var(--ds-border-strong);
}

/* Checkbox */
.ds-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  color: var(--ds-text-primary);
  line-height: 1.5;
}
.ds-checkbox__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ds-border-strong);
  border-radius: var(--ds-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ds-duration-fast) ease;
  margin-top: 2px;
}
.ds-checkbox__box--checked {
  background: var(--ds-lime-400);
  border-color: var(--ds-lime-400);
  color: var(--ds-lime-950);
}

/* Radio */
.ds-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  color: var(--ds-text-primary);
  line-height: 1.5;
}
.ds-radio__dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ds-border-strong);
  border-radius: var(--ds-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ds-duration-fast) ease;
  margin-top: 2px;
}
.ds-radio__dot--checked {
  border-color: var(--ds-lime-500);
}
.ds-radio__dot--checked::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-lime-500);
}

/* Switch */
.ds-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--ds-gray-300);
  border-radius: var(--ds-radius-full);
  cursor: pointer;
  transition: background var(--ds-duration-fast) ease;
  flex-shrink: 0;
}
.ds-switch--on {
  background: var(--ds-lime-400);
}
.ds-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: var(--ds-radius-full);
  box-shadow: var(--ds-shadow-sm);
  transition: transform var(--ds-duration-base) var(--ds-ease-out);
}
.ds-switch--on .ds-switch__thumb {
  transform: translateX(20px);
}


/* ── 1.5 Avatar ── */

.ds-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ds-radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ds-lime-100);
  color: var(--ds-lime-700);
  font-family: var(--ds-font-sans);
  font-weight: 700;
}
.ds-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ds-avatar--sm  { width: 32px; height: 32px; font-size: 12px; }
.ds-avatar--md  { width: 40px; height: 40px; font-size: 14px; }
.ds-avatar--lg  { width: 48px; height: 48px; font-size: 16px; }
.ds-avatar--xl  { width: 64px; height: 64px; font-size: 20px; }


/* ── 1.6 Divider ── */

.ds-divider {
  border: none;
  border-top: 1px solid var(--ds-border-light);
  margin: var(--ds-space-6) 0;
}
.ds-divider--strong {
  border-top-color: var(--ds-border);
}
.ds-divider--thick {
  border-top-width: 2px;
  border-top-color: var(--ds-gray-900);
}


/* ── 1.7 Spinner ── */

.ds-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ds-border);
  border-top-color: var(--ds-lime-500);
  border-radius: var(--ds-radius-full);
  animation: ds-spin 0.6s linear infinite;
}
.ds-spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes ds-spin {
  to { transform: rotate(360deg); }
}


/* ── 1.8 Skeleton ── */

.ds-skeleton {
  background: linear-gradient(90deg, var(--ds-gray-100) 25%, var(--ds-gray-50) 50%, var(--ds-gray-100) 75%);
  background-size: 200% 100%;
  animation: ds-shimmer 1.5s ease infinite;
  border-radius: var(--ds-radius-md);
}
.ds-skeleton--text  { height: 16px; width: 80%; }
.ds-skeleton--title { height: 24px; width: 60%; }
.ds-skeleton--image { height: 200px; width: 100%; }
.ds-skeleton--circle { border-radius: var(--ds-radius-full); }

@keyframes ds-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ── 1.9 Button Group ── */

.ds-btn-group {
  display: inline-flex;
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  border: 1px solid var(--ds-border);
}
.ds-btn-group > .ds-btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--ds-border);
  box-shadow: none;
}
.ds-btn-group > .ds-btn:last-child { border-right: none; }
.ds-btn-group > .ds-btn:hover { z-index: 1; }


/* ── 1.10 Tooltip ── */

.ds-tooltip {
  position: relative;
  display: inline-flex;
}
.ds-tooltip__content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--ds-gray-900);
  color: var(--ds-text-inverse);
  font-family: var(--ds-font-sans);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--ds-radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--ds-duration-fast) ease;
  z-index: var(--ds-z-tooltip, 25);
}
.ds-tooltip__content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ds-gray-900);
}
.ds-tooltip:hover .ds-tooltip__content {
  opacity: 1;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  2. MOLECULES                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── 2.1 Form Field ── */

.ds-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-field__label {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-primary);
}
.ds-field__helper {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-muted);
  line-height: 1.5;
}
.ds-field__error {
  font-size: var(--ds-text-xs);
  color: var(--ds-red-500);
  font-weight: 500;
  line-height: 1.5;
}


/* ── 2.2 Stat ── */

.ds-stat {
  text-align: center;
}
.ds-stat__number {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-5xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ds-lime-600);
}
.ds-stat__unit {
  font-size: 0.5em;
  font-weight: 900;
  color: var(--ds-lime-500);
  letter-spacing: -0.02em;
}
.ds-stat__label {
  display: block;
  font-size: var(--ds-text-xs);
  font-weight: 600;
  color: var(--ds-lime-700);
  margin-top: 8px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.ds-stat__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--ds-text-xs);
  font-weight: 600;
  margin-top: 4px;
}
.ds-stat__trend--up   { color: var(--ds-green-600); }
.ds-stat__trend--down { color: var(--ds-red-500); }

@media (max-width: 640px) {
  .ds-stat__number { font-size: var(--ds-text-4xl); }
}


/* ── 2.3 Card ── */

.ds-card {
  background: var(--ds-bg-page);
  border-radius: var(--ds-radius-2xl);
  overflow: hidden;
  border: 1px solid var(--ds-border);
  transition: transform var(--ds-duration-base) var(--ds-ease-out),
              box-shadow var(--ds-duration-base) var(--ds-ease-out);
}
.ds-card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--ds-shadow-xl);
}
.ds-card--glass {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.ds-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ds-lime-950) 0%, #1e3a5f 100%);
}
.ds-card__body {
  padding: var(--ds-space-6);
}
.ds-card__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 800;
  color: var(--ds-text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.4;
  word-break: keep-all;
}
.ds-card__desc {
  font-size: 14px;
  color: var(--ds-text-secondary);
  line-height: 1.6;
  margin: 0;
}
.ds-card__footer {
  display: flex;
  gap: var(--ds-space-4);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-border-light);
  margin-top: var(--ds-space-4);
}

@media (max-width: 640px) {
  .ds-card__image { height: 180px; }
  .ds-card__body  { padding: var(--ds-space-5); }
}


/* ── 2.4 Tab ── */

.ds-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--ds-gray-100);
  border-radius: var(--ds-radius-lg);
  overflow-x: auto;
}
.ds-tab {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-muted);
  padding: 8px 16px;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
  transition: all var(--ds-duration-fast) ease;
}
.ds-tab:hover {
  color: var(--ds-text-secondary);
}
.ds-tab--active {
  background: var(--ds-bg-page);
  color: var(--ds-text-primary);
  box-shadow: var(--ds-shadow-xs);
}


/* ── 2.5 Breadcrumb ── */

.ds-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  color: var(--ds-text-muted);
  flex-wrap: wrap;
}
.ds-breadcrumb__item {
  text-decoration: none;
  color: inherit;
  transition: color var(--ds-duration-fast) ease;
}
.ds-breadcrumb__item:hover {
  color: var(--ds-text-secondary);
}
.ds-breadcrumb__item--current {
  color: var(--ds-lime-300);
  font-weight: 600;
}
.ds-breadcrumb__sep {
  color: var(--ds-text-muted);
  opacity: 0.5;
  font-size: 10px;
}


/* ── 2.6 Toast ── */

.ds-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--ds-radius-xl);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  line-height: 1.5;
  box-shadow: var(--ds-shadow-lg);
  border: 1px solid;
  max-width: 400px;
}
.ds-toast--success {
  background: var(--ds-green-50);
  color: var(--ds-green-600);
  border-color: var(--ds-green-100);
}
.ds-toast--error {
  background: var(--ds-red-50);
  color: var(--ds-red-600);
  border-color: var(--ds-red-100);
}
.ds-toast--warning {
  background: var(--ds-yellow-50);
  color: var(--ds-yellow-600);
  border-color: var(--ds-yellow-100);
}
.ds-toast--info {
  background: var(--ds-blue-50);
  color: var(--ds-blue-600);
  border-color: var(--ds-blue-100);
}


/* ── 2.7 Progress ── */

.ds-progress {
  width: 100%;
  height: 6px;
  background: var(--ds-gray-100);
  border-radius: var(--ds-radius-full);
  overflow: hidden;
}
.ds-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ds-lime-500), var(--ds-lime-400));
  border-radius: var(--ds-radius-full);
  transition: width var(--ds-duration-slow) var(--ds-ease-out);
}
.ds-progress--reading {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: var(--ds-z-max);
  background: transparent;
  border-radius: 0;
}


/* ── 2.8 Search ── */

.ds-search {
  position: relative;
  display: flex;
  align-items: center;
}
.ds-search__icon {
  position: absolute;
  left: 14px;
  color: var(--ds-text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.ds-search__input {
  width: 100%;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-primary);
  background: var(--ds-bg-soft);
  border: 1px solid var(--ds-border-light);
  border-radius: var(--ds-radius-full);
  padding: 10px 16px 10px 40px;
  outline: none;
  transition: all var(--ds-duration-fast) ease;
}
.ds-search__input:focus {
  background: var(--ds-bg-page);
  border-color: var(--ds-lime-400);
  box-shadow: 0 0 0 3px rgba(163,230,53,0.12);
}


/* ── 2.9 Empty State ── */

.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--ds-space-16) var(--ds-space-6);
  gap: var(--ds-space-4);
}
.ds-empty__icon {
  width: 48px;
  height: 48px;
  color: var(--ds-gray-300);
}
.ds-empty__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 700;
  color: var(--ds-text-primary);
}
.ds-empty__desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  max-width: 320px;
  line-height: 1.6;
}


/* ── 2.10 Pagination ── */

.ds-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ds-pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-secondary);
  background: none;
  border: none;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ds-duration-fast) ease;
}
.ds-pagination__item:hover {
  background: var(--ds-gray-100);
  color: var(--ds-text-primary);
}
.ds-pagination__item--active {
  background: var(--ds-gray-900);
  color: var(--ds-text-inverse);
}


/* ── 2.11 Accordion ── */

.ds-accordion {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-xl);
  overflow: hidden;
}
.ds-accordion__item {
  border-bottom: 1px solid var(--ds-border-light);
}
.ds-accordion__item:last-child { border-bottom: none; }
.ds-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: 600;
  color: var(--ds-text-primary);
  background: var(--ds-bg-page);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--ds-duration-fast) ease;
}
.ds-accordion__trigger:hover { background: var(--ds-bg-soft); }
.ds-accordion__trigger[aria-expanded="true"] { font-weight: 700; }
.ds-accordion__icon {
  width: 16px;
  height: 16px;
  color: var(--ds-text-muted);
  transition: transform var(--ds-duration-base) var(--ds-ease-out);
  flex-shrink: 0;
}
.ds-accordion__trigger[aria-expanded="true"] .ds-accordion__icon {
  transform: rotate(180deg);
}
.ds-accordion__content {
  padding: 0 20px 16px;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.65;
}


/* ── 2.12 Dropdown Menu ── */

.ds-dropdown {
  position: relative;
  display: inline-flex;
}
.ds-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--ds-bg-page);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-xl);
  padding: 4px;
  box-shadow: var(--ds-shadow-lg);
  z-index: var(--ds-z-dropdown);
}
.ds-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-secondary);
  background: none;
  border: none;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--ds-duration-fast) ease;
  text-decoration: none;
}
.ds-dropdown__item:hover {
  background: var(--ds-bg-soft);
  color: var(--ds-text-primary);
}
.ds-dropdown__item--danger { color: var(--ds-red-500); }
.ds-dropdown__item--danger:hover { background: var(--ds-red-50); }
.ds-dropdown__divider {
  height: 1px;
  background: var(--ds-border-light);
  margin: 4px 0;
}


/* ── 2.13 Filter Bar & Chips ── */

.ds-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ds-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  color: var(--ds-lime-700);
  background: var(--ds-lime-50);
  border: 1px solid var(--ds-lime-200);
  border-radius: var(--ds-radius-full);
  padding: 5px 8px 5px 12px;
}
.ds-filter-chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-lime-200);
  color: var(--ds-lime-700);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ds-duration-fast) ease;
}
.ds-filter-chip__remove:hover { background: var(--ds-lime-300); }
.ds-filter-reset {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  color: var(--ds-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ds-filter-reset:hover { color: var(--ds-text-secondary); }


/* ── 2.14 Social Share ── */

.ds-share {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ds-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border);
  background: var(--ds-bg-page);
  color: var(--ds-text-secondary);
  cursor: pointer;
  transition: all var(--ds-duration-fast) ease;
}
.ds-share__btn:hover {
  border-color: var(--ds-border-strong);
  color: var(--ds-text-primary);
  background: var(--ds-bg-soft);
}


/* ── 2.15 Agreement ── */

.ds-agreement {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--ds-font-sans);
}
.ds-agreement__master {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--ds-text-base);
  font-weight: 700;
  color: var(--ds-text-primary);
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ds-border);
}
.ds-agreement__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 30px;
}
.ds-agreement__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  cursor: pointer;
}
.ds-agreement__required {
  color: var(--ds-red-500);
  font-weight: 600;
  font-size: 11px;
}


/* ── 2.16 Upload Zone ── */

.ds-upload__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--ds-space-10) var(--ds-space-6);
  border: 2px dashed var(--ds-border);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-bg-soft);
  cursor: pointer;
  transition: all var(--ds-duration-fast) ease;
  text-align: center;
}
.ds-upload__zone:hover {
  border-color: var(--ds-lime-400);
  background: var(--ds-lime-50);
}
.ds-upload__zone--active {
  border-color: var(--ds-lime-400);
  background: var(--ds-lime-50);
}
.ds-upload__icon {
  width: 40px;
  height: 40px;
  color: var(--ds-text-muted);
}
.ds-upload__text {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
}
.ds-upload__text strong {
  color: var(--ds-lime-600);
  font-weight: 600;
}
.ds-upload__preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.ds-upload__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--ds-radius-md);
  overflow: hidden;
  border: 1px solid var(--ds-border);
}
.ds-upload__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ── 2.17 Steps / Wizard ── */

.ds-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.ds-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-muted);
}
.ds-step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--ds-radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--ds-gray-100);
  color: var(--ds-text-muted);
  flex-shrink: 0;
}
.ds-step--active .ds-step__number {
  background: var(--ds-lime-400);
  color: var(--ds-lime-950);
}
.ds-step--active { color: var(--ds-text-primary); font-weight: 700; }
.ds-step--done .ds-step__number {
  background: var(--ds-lime-100);
  color: var(--ds-lime-700);
}
.ds-step--done { color: var(--ds-lime-700); }
.ds-step__connector {
  width: 32px;
  height: 2px;
  background: var(--ds-gray-200);
  margin: 0 8px;
  flex-shrink: 0;
}
.ds-step--done + .ds-step__connector,
.ds-step--active + .ds-step__connector { background: var(--ds-lime-300); }


/* ── 2.18 Avatar Stack ── */

.ds-avatar-stack {
  display: flex;
  align-items: center;
}
.ds-avatar-stack > .ds-avatar {
  margin-left: -8px;
  border: 2px solid var(--ds-bg-page);
}
.ds-avatar-stack > .ds-avatar:first-child { margin-left: 0; }
.ds-avatar-stack__count {
  margin-left: 8px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  color: var(--ds-text-muted);
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  3. ORGANISMS                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── 3.1 Blockquote ── */

.ds-blockquote {
  margin: 0;
  padding: 24px 28px;
  background: var(--ds-bg-soft);
  border-left: 4px solid var(--ds-lime-400);
  border-radius: 0 var(--ds-radius-lg) var(--ds-radius-lg) 0;
  font-family: var(--ds-font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ds-text-primary);
  line-height: 1.7;
  font-style: italic;
  word-break: keep-all;
}
@media (max-width: 640px) {
  .ds-blockquote { font-size: 15px; padding: 20px 20px 20px 24px; }
}


/* ── 3.2 Callout ── */

.ds-callout {
  padding: 16px 20px;
  border-radius: var(--ds-radius-lg);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  line-height: 1.65;
  border: 1px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ds-callout__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.ds-callout--tip {
  background: var(--ds-lime-50);
  color: var(--ds-lime-800);
  border-color: var(--ds-lime-200);
}
.ds-callout--warning {
  background: var(--ds-yellow-50);
  color: var(--ds-yellow-600);
  border-color: var(--ds-yellow-100);
}
.ds-callout--danger {
  background: var(--ds-red-50);
  color: var(--ds-red-700);
  border-color: var(--ds-red-100);
}
.ds-callout--note {
  background: var(--ds-blue-50);
  color: var(--ds-blue-600);
  border-color: var(--ds-blue-100);
}


/* ── 3.3 Stat Grid ── */

.ds-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--ds-space-6);
  padding: var(--ds-space-10) var(--ds-space-8);
  background: linear-gradient(135deg, var(--ds-lime-50) 0%, var(--ds-lime-100) 100%);
  border-radius: var(--ds-radius-2xl);
  border: 1px solid var(--ds-lime-200);
}
@media (max-width: 640px) {
  .ds-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--ds-space-8) var(--ds-space-5);
  }
}


/* ── 3.4 Hero ── */

.ds-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ds-hero--dark {
  background: linear-gradient(135deg, var(--ds-lime-950) 0%, #1e3a5f 70%, #0f172a 100%);
  min-height: 480px;
}

.ds-hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px;
}

.ds-hero__glow {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 50%, var(--ds-lime-500) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--ds-green-500) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, var(--ds-blue-500) 0%, transparent 45%);
}

.ds-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 40px 40px;
}

.ds-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: var(--ds-space-12) var(--ds-space-6);
  max-width: 860px;
  margin: 0 auto;
}

.ds-hero__title {
  font-family: var(--ds-font-sans);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ds-text-inverse);
  word-break: keep-all;
}
.ds-hero__title em {
  color: var(--ds-lime-400);
  font-style: normal;
}

.ds-hero__desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin-top: 12px;
  max-width: 560px;
}

.ds-hero__actions {
  display: flex;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-6);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .ds-hero--dark { min-height: 380px; }
  .ds-hero__content { padding: var(--ds-space-8) var(--ds-space-5); }
}


/* ── 3.5 CTA Block ── */

.ds-cta {
  padding: var(--ds-space-10) var(--ds-space-8);
  border-radius: var(--ds-radius-2xl);
  text-align: center;
}

.ds-cta--gradient {
  background: linear-gradient(135deg, var(--ds-green-50) 0%, var(--ds-lime-100) 50%, var(--ds-lime-200) 100%);
  border: 1px solid var(--ds-lime-200);
}

.ds-cta--dark {
  background: var(--ds-gray-950);
  border: 1px solid var(--ds-gray-800);
}

.ds-cta__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-lg);
  font-weight: 900;
  color: var(--ds-text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.ds-cta--dark .ds-cta__title { color: var(--ds-text-inverse); }

.ds-cta__desc {
  font-size: 14px;
  color: var(--ds-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--ds-space-5);
}
.ds-cta--dark .ds-cta__desc { color: var(--ds-gray-400); }

@media (max-width: 640px) {
  .ds-cta { padding: var(--ds-space-8) var(--ds-space-6); }
}


/* ── 3.6 Table ── */

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
}
.ds-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--ds-border);
}
.ds-table td {
  padding: 12px;
  border-bottom: 1px solid var(--ds-border-light);
  color: var(--ds-text-secondary);
  vertical-align: top;
  line-height: 1.5;
}
.ds-table--hover tbody tr:hover {
  background: var(--ds-bg-soft);
}
.ds-table--striped tbody tr:nth-child(even) {
  background: var(--ds-bg-soft);
}


/* ── 3.7 Modal ── */

.ds-modal__overlay {
  position: fixed;
  inset: 0;
  background: var(--ds-bg-overlay);
  backdrop-filter: blur(4px);
  z-index: var(--ds-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ds-space-6);
}
.ds-modal {
  background: var(--ds-bg-page);
  border-radius: var(--ds-radius-2xl);
  box-shadow: var(--ds-shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
}
.ds-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-6) var(--ds-space-6) 0;
}
.ds-modal__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-lg);
  font-weight: 800;
  color: var(--ds-text-primary);
  letter-spacing: -0.02em;
}
.ds-modal__body {
  padding: var(--ds-space-6);
}
.ds-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--ds-space-3);
  padding: 0 var(--ds-space-6) var(--ds-space-6);
}


/* ── 3.8 TOC (Table of Contents) ── */

.ds-toc {
  position: sticky;
  top: 80px;
}
.ds-toc__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  margin-bottom: var(--ds-space-4);
}
.ds-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ds-toc__link {
  display: block;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--ds-radius-md);
  border-left: 2px solid transparent;
  transition: all var(--ds-duration-fast) ease;
  line-height: 1.45;
}
.ds-toc__link:hover {
  color: var(--ds-text-secondary);
  background: var(--ds-bg-soft);
}
.ds-toc__link--active {
  color: var(--ds-lime-700);
  font-weight: 700;
  background: var(--ds-lime-50);
  border-left-color: var(--ds-lime-500);
}


/* ── 3.9 Header (Navigation Bar) ── */

.ds-header {
  position: sticky;
  top: 0;
  z-index: var(--ds-z-sticky);
  border-bottom: 1px solid var(--ds-border-light);
  transition: box-shadow var(--ds-duration-base) ease;
}
.ds-header--glass {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ds-header--scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
.ds-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ds-space-6);
  height: 64px;
}
.ds-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: var(--ds-text-md);
  color: var(--ds-text-primary);
  letter-spacing: -0.02em;
}
.ds-header__nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
}
.ds-header__nav-item {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--ds-radius-md);
  transition: all var(--ds-duration-fast) ease;
}
.ds-header__nav-item:hover {
  color: var(--ds-text-primary);
  background: var(--ds-bg-soft);
}
.ds-header__actions {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

@media (max-width: 768px) {
  .ds-header__nav { display: none; }
  .ds-header__inner { height: 56px; padding: 0 var(--ds-space-4); }
}


/* ── 3.10 Footer ── */

.ds-footer {
  padding: var(--ds-space-16) 0 var(--ds-space-10);
  background: var(--ds-gray-950);
  color: var(--ds-gray-400);
  font-family: var(--ds-font-sans);
}
.ds-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ds-space-6);
}
.ds-footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--ds-space-10);
}
.ds-footer__brand {
  font-size: var(--ds-text-md);
  font-weight: 800;
  color: var(--ds-text-inverse);
  letter-spacing: -0.02em;
  margin-bottom: var(--ds-space-4);
}
.ds-footer__section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-gray-500);
  margin-bottom: var(--ds-space-4);
}
.ds-footer__link {
  display: block;
  font-size: var(--ds-text-sm);
  color: var(--ds-gray-400);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--ds-duration-fast) ease;
}
.ds-footer__link:hover {
  color: var(--ds-text-inverse);
}
.ds-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--ds-space-10);
  margin-top: var(--ds-space-10);
  border-top: 1px solid var(--ds-gray-800);
  font-size: var(--ds-text-xs);
  color: var(--ds-gray-600);
}

@media (max-width: 768px) {
  .ds-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--ds-space-8);
  }
}


/* ── 3.11 Timeline ── */

.ds-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 20px;
  position: relative;
}
.ds-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--ds-border);
}
.ds-timeline__item {
  position: relative;
  padding: 0 0 var(--ds-space-8) var(--ds-space-6);
}
.ds-timeline__item:last-child { padding-bottom: 0; }
.ds-timeline__dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-page);
  border: 3px solid var(--ds-lime-400);
  z-index: 1;
}
.ds-timeline__dot--muted {
  border-color: var(--ds-gray-300);
}


/* ── 3.12 Floating CTA ── */

.ds-floating-cta {
  position: fixed;
  bottom: var(--ds-space-6);
  right: var(--ds-space-6);
  z-index: var(--ds-z-sticky);
}
.ds-floating-cta__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ds-lime-400);
  color: var(--ds-lime-950);
  font-family: var(--ds-font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: var(--ds-radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--ds-shadow-glow-lime-lg);
  transition: all var(--ds-duration-base) var(--ds-ease-out);
}
.ds-floating-cta__btn:hover {
  background: var(--ds-lime-500);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(163,230,53,0.55);
}


/* ── 3.13 Banner ── */

.ds-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  text-align: center;
}
.ds-banner--info {
  background: var(--ds-blue-50);
  color: var(--ds-blue-600);
  border-bottom: 1px solid var(--ds-blue-100);
}
.ds-banner--promo {
  background: linear-gradient(90deg, var(--ds-lime-950), #1e3a5f);
  color: var(--ds-text-inverse);
}
.ds-banner--warning {
  background: var(--ds-yellow-50);
  color: var(--ds-yellow-600);
  border-bottom: 1px solid var(--ds-yellow-100);
}
.ds-banner__dismiss {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 4px;
}
.ds-banner__dismiss:hover { opacity: 1; }


/* ── 3.14 Flash ── */

.ds-flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--ds-radius-xl);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid;
}
.ds-flash--success { background: var(--ds-green-50); color: var(--ds-green-600); border-color: var(--ds-green-100); }
.ds-flash--error   { background: var(--ds-red-50);   color: var(--ds-red-600);   border-color: var(--ds-red-100); }
.ds-flash--warning { background: var(--ds-yellow-50); color: var(--ds-yellow-600); border-color: var(--ds-yellow-100); }
.ds-flash--info    { background: var(--ds-blue-50);   color: var(--ds-blue-600);  border-color: var(--ds-blue-100); }
.ds-flash__dismiss {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 2px;
}
.ds-flash__dismiss:hover { opacity: 1; }


/* ── 3.15 Dialog ── */

.ds-dialog {
  background: var(--ds-bg-page);
  border-radius: var(--ds-radius-2xl);
  box-shadow: var(--ds-shadow-xl);
  width: 100%;
  max-width: 400px;
  padding: var(--ds-space-8);
  text-align: center;
}
.ds-dialog__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--ds-space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ds-radius-full);
}
.ds-dialog__icon--warning { background: var(--ds-yellow-50); color: var(--ds-yellow-500); }
.ds-dialog__icon--danger  { background: var(--ds-red-50);    color: var(--ds-red-500); }
.ds-dialog__icon--success { background: var(--ds-green-50);  color: var(--ds-green-500); }
.ds-dialog__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-lg);
  font-weight: 800;
  color: var(--ds-text-primary);
  margin-bottom: 8px;
}
.ds-dialog__desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--ds-space-6);
}
.ds-dialog__actions {
  display: flex;
  justify-content: center;
  gap: var(--ds-space-3);
}


/* ── 3.16 Drawer ── */

.ds-drawer__overlay {
  position: fixed;
  inset: 0;
  background: var(--ds-bg-overlay);
  z-index: var(--ds-z-overlay);
}
.ds-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--ds-bg-page);
  box-shadow: var(--ds-shadow-xl);
  z-index: var(--ds-z-modal);
  overflow-y: auto;
}
.ds-drawer--right { right: 0; }
.ds-drawer--left  { left: 0; }
.ds-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-5) var(--ds-space-6);
  border-bottom: 1px solid var(--ds-border-light);
}
.ds-drawer__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 800;
  color: var(--ds-text-primary);
}
.ds-drawer__body { padding: var(--ds-space-6); }


/* ── 3.17 CTA Bar (Fixed Bottom) ── */

.ds-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--ds-z-sticky);
  background: var(--ds-bg-page);
  border-top: 1px solid var(--ds-border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  padding: 12px 24px;
}
.ds-cta-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}
.ds-cta-bar__info {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
}
.ds-cta-bar__info strong {
  font-weight: 800;
  color: var(--ds-text-primary);
}
.ds-cta-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ds-cta-bar--dark {
  background: var(--ds-gray-950);
  border-top-color: var(--ds-gray-800);
}
.ds-cta-bar--dark .ds-cta-bar__info { color: var(--ds-gray-400); }
.ds-cta-bar--dark .ds-cta-bar__info strong { color: var(--ds-text-inverse); }


/* ── 3.18 Form Section ── */

.ds-form-section {
  padding: var(--ds-space-6) 0;
  border-bottom: 1px solid var(--ds-border-light);
}
.ds-form-section:last-child { border-bottom: none; }
.ds-form-section__header {
  margin-bottom: var(--ds-space-5);
}
.ds-form-section__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 700;
  color: var(--ds-text-primary);
}
.ds-form-section__desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  margin-top: 4px;
}
.ds-form-section__body {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-5);
}
.ds-form-section__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-6);
  padding-top: var(--ds-space-5);
  border-top: 1px solid var(--ds-border-light);
}


/* ── 3.19 Result ── */

.ds-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--ds-space-16) var(--ds-space-6);
  gap: var(--ds-space-3);
}
.ds-result__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--ds-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--ds-space-2);
}
.ds-result--success .ds-result__icon { background: var(--ds-green-50); color: var(--ds-green-500); }
.ds-result--error .ds-result__icon   { background: var(--ds-red-50);   color: var(--ds-red-500); }
.ds-result__title {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xl);
  font-weight: 800;
  color: var(--ds-text-primary);
}
.ds-result__desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-secondary);
  max-width: 360px;
  line-height: 1.6;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  4. TEMPLATES                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── 4.1 Article Layout ── */

.ds-article-layout {
  display: grid;
  grid-template-columns: 1fr min(680px, 100%) 260px;
  gap: 0 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ds-space-6);
  align-items: start;
}
@media (max-width: 1100px) {
  .ds-article-layout {
    grid-template-columns: 1fr min(680px, 100%);
  }
  .ds-article-layout .ds-toc { display: none !important; }
}
@media (max-width: 768px) {
  .ds-article-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--ds-space-5);
  }
}

.ds-article-body {
  padding: var(--ds-space-12) 0 var(--ds-space-20);
}
@media (max-width: 768px) {
  .ds-article-body { padding: var(--ds-space-10) 0 var(--ds-space-16); }
}

/* Article prose: h2 */
.ds-article-body h2 {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.4;
  color: var(--ds-text-primary);
  margin: var(--ds-space-12) 0 var(--ds-space-5);
  padding-bottom: var(--ds-space-3);
  border-bottom: 2px solid var(--ds-border-light);
  scroll-margin-top: 80px;
  word-break: keep-all;
}
.ds-article-body h2:first-child { margin-top: 0; }

/* Article prose: p */
.ds-article-body p {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  line-height: 1.88;
  font-weight: 400;
  color: var(--ds-text-secondary);
  margin: 0 0 var(--ds-space-6);
  word-break: keep-all;
}
.ds-article-body p:last-child { margin-bottom: 0; }

/* Article prose: h3 */
.ds-article-body h3 {
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-md);
  font-weight: 700;
  color: var(--ds-text-primary);
  margin: var(--ds-space-8) 0 var(--ds-space-3);
  letter-spacing: -0.015em;
}

/* Article prose: ul/ol */
.ds-article-body ul,
.ds-article-body ol {
  padding-left: 24px;
  margin: 0 0 var(--ds-space-6);
}
.ds-article-body li {
  font-size: var(--ds-text-md);
  line-height: 1.85;
  color: var(--ds-text-secondary);
  margin-bottom: 8px;
  word-break: keep-all;
}

@media (max-width: 768px) {
  .ds-article-body h2 { font-size: var(--ds-text-lg); margin: var(--ds-space-10) 0 var(--ds-space-4); }
  .ds-article-body p,
  .ds-article-body li { font-size: var(--ds-text-base); line-height: 1.8; }
}


/* ── 4.2 Landing Container ── */

.ds-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ds-space-6);
}

.ds-container--sm {
  max-width: 680px;
}

.ds-container--lg {
  max-width: 1400px;
}

.ds-section {
  padding: var(--ds-space-20) 0;
}

.ds-section--sm {
  padding: var(--ds-space-12) 0;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  S. SHOWCASE (Admin 전용)                                   ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── Base ── */
.ds-sc {
  --sc-bg: var(--ds-gray-950);
  --sc-text: #fafafa;
  --sc-text-muted: var(--ds-gray-500);
  --sc-border: rgba(255,255,255,0.07);
  --sc-demo-bg: rgba(255,255,255,0.03);
  --sc-demo-border: rgba(255,255,255,0.07);
  --sc-nav-bg: rgba(9,9,11,0.92);

  margin: 0;
  padding: 0;
  background: var(--sc-bg);
  color: var(--sc-text);
  min-height: 100vh;
  font-family: var(--ds-font-sans);
}

/* Light theme override */
.ds-sc--light {
  --sc-bg: #ffffff;
  --sc-text: var(--ds-gray-900);
  --sc-text-muted: var(--ds-gray-400);
  --sc-border: var(--ds-border);
  --sc-demo-bg: var(--ds-bg-soft);
  --sc-demo-border: var(--ds-border);
  --sc-nav-bg: rgba(255,255,255,0.92);
}
.ds-sc--light .ds-sc__sidebar { background: var(--ds-bg-soft); border-right-color: var(--ds-border); }
.ds-sc--light .ds-sc__sidebar-link { color: var(--ds-gray-500); }
.ds-sc--light .ds-sc__sidebar-link:hover { color: var(--ds-gray-700); background: var(--ds-gray-100); }
.ds-sc--light .ds-sc__sidebar-link--active { color: var(--ds-lime-700); background: var(--ds-lime-50); }
.ds-sc--light .ds-sc__level { color: var(--ds-lime-600); }
.ds-sc--light .ds-sc__level::after { background: var(--ds-lime-200); }
.ds-sc--light .ds-sc__section-title { color: var(--ds-gray-900); }
.ds-sc--light .ds-sc__section-desc { color: var(--ds-gray-500); }
.ds-sc--light .ds-sc__sub { color: var(--ds-gray-700); }
.ds-sc--light .ds-sc__class { color: var(--ds-lime-700); background: var(--ds-lime-50); }
.ds-sc--light .ds-sc__demo { background: var(--ds-bg-soft); border-color: var(--ds-border); }
.ds-sc--light .ds-sc__demo--light { background: var(--ds-bg-page); }
.ds-sc--light .ds-sc__color-swatch { border-color: var(--ds-border); }
.ds-sc--light .ds-sc__spec-table th { color: var(--ds-gray-500); border-bottom-color: var(--ds-border); }
.ds-sc--light .ds-sc__spec-table td { color: var(--ds-gray-600); border-bottom-color: var(--ds-border-light); }
.ds-sc--light .ds-sc__typo-row { border-bottom-color: var(--ds-border-light); }
.ds-sc--light .ds-sc__typo-label { color: var(--ds-gray-400); }
.ds-sc--light .ds-sc__code-block { background: var(--ds-gray-900); color: var(--ds-gray-300); }
.ds-sc--light .ds-sc__code-toggle summary { color: var(--ds-gray-400); }

/* Grain overlay */
.ds-sc::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--ds-z-max);
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ds-sc--light::after { opacity: 0.01; }

/* ── Layout: Sidebar + Main ── */
.ds-sc__layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */
.ds-sc__sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: rgba(9,9,11,0.6);
  border-right: 1px solid var(--sc-border);
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ds-gray-700) transparent;
}
.ds-sc__sidebar::-webkit-scrollbar { width: 4px; }
.ds-sc__sidebar::-webkit-scrollbar-thumb { background: var(--ds-gray-700); border-radius: 4px; }

.ds-sc__sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sc-border);
}
.ds-sc__sidebar-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.ds-sc__sidebar-title em {
  color: var(--ds-lime-400);
  font-style: normal;
}

/* Theme Toggle */
.ds-sc__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--ds-radius-md);
  border: 1px solid var(--sc-border);
  background: transparent;
  color: var(--sc-text-muted);
  cursor: pointer;
  transition: all var(--ds-duration-fast) ease;
}
.ds-sc__theme-toggle:hover {
  color: var(--sc-text);
  background: rgba(255,255,255,0.05);
}
.ds-sc--light .ds-sc__theme-toggle:hover { background: var(--ds-gray-100); }

.ds-sc__sidebar-group {
  padding: 16px 12px 8px;
}
.ds-sc__sidebar-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sc-text-muted);
  padding: 0 8px 8px;
}
.ds-sc__sidebar-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-400);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--ds-radius-md);
  transition: all var(--ds-duration-fast) ease;
  margin-bottom: 1px;
}
.ds-sc__sidebar-link:hover {
  color: var(--ds-gray-200);
  background: rgba(255,255,255,0.04);
}
.ds-sc__sidebar-link--active {
  color: var(--ds-lime-400);
  background: rgba(163,230,53,0.08);
  font-weight: 600;
}

.ds-sc__sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sc-border);
  font-size: 11px;
  color: var(--sc-text-muted);
}

/* ── Main Content ── */
.ds-sc__main {
  padding: var(--ds-space-8) var(--ds-space-10) var(--ds-space-24);
  max-width: 960px;
  overflow-x: hidden;
}

/* SC Header */
.ds-sc__header {
  padding: var(--ds-space-6) 0 var(--ds-space-8);
  border-bottom: 1px solid var(--sc-border);
  margin-bottom: var(--ds-space-8);
}
.ds-sc__title {
  font-size: var(--ds-text-3xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 var(--ds-space-2);
}
.ds-sc__title em {
  color: var(--ds-lime-400);
  font-style: normal;
}
.ds-sc__subtitle {
  font-size: var(--ds-text-sm);
  color: var(--sc-text-muted);
  margin: 0;
  line-height: 1.6;
}
.ds-sc__badges {
  display: flex;
  gap: 8px;
  margin-top: var(--ds-space-3);
}

/* SC Level Label */
.ds-sc__level {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-lime-400);
  padding: 20px 0 0;
}
.ds-sc__level::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(163,230,53,0.15);
  min-width: 40px;
}

/* SC Section */
.ds-sc__section {
  padding: var(--ds-space-10) 0 var(--ds-space-6);
}
.ds-sc__section-title {
  font-size: var(--ds-text-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ds-text-inverse);
  margin: 0 0 6px;
}
.ds-sc__section-desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-gray-500);
  margin: 0 0 var(--ds-space-6);
}

/* SC Demo Card (glass) */
.ds-sc__demo {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--ds-radius-2xl);
  padding: var(--ds-space-6);
  backdrop-filter: blur(12px);
  position: relative;
}
.ds-sc__demo--light {
  background: var(--ds-bg-page);
  border-color: var(--ds-border);
}
.ds-sc__demo--padded {
  padding: var(--ds-space-8);
}
.ds-sc__demo--flush {
  padding: 0;
  overflow: hidden;
}

/* SC Class Label */
.ds-sc__class {
  display: inline-block;
  font-family: var(--ds-font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ds-lime-400);
  background: rgba(163,230,53,0.1);
  padding: 3px 8px;
  border-radius: var(--ds-radius-xs);
  margin-top: var(--ds-space-3);
}

/* SC Subsection */
.ds-sc__sub {
  font-size: 14px;
  font-weight: 700;
  color: var(--ds-gray-300);
  margin: var(--ds-space-8) 0 var(--ds-space-3);
}
.ds-sc__sub:first-of-type {
  margin-top: 0;
}

/* SC Code Block */
.ds-sc__code-toggle {
  margin-top: var(--ds-space-3);
}
.ds-sc__code-toggle summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-gray-500);
  cursor: pointer;
  padding: 4px 0;
}
.ds-sc__code-toggle summary:hover {
  color: var(--ds-gray-300);
}
.ds-sc__code-block {
  margin: var(--ds-space-2) 0 0;
  padding: var(--ds-space-4);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font-mono);
  font-size: 12px;
  color: var(--ds-gray-300);
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}

/* SC Color Grid */
.ds-sc__color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.ds-sc__color-swatch {
  aspect-ratio: 1;
  border-radius: var(--ds-radius-lg);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.ds-sc__color-swatch:hover {
  transform: scale(1.05);
}
.ds-sc__color-label {
  font-family: var(--ds-font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.8;
}

/* SC Spec Table (dark) */
.ds-sc__spec-table {
  overflow-x: auto;
}
.ds-sc__spec-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ds-text-sm);
}
.ds-sc__spec-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ds-gray-500);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ds-sc__spec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--ds-gray-400);
}
.ds-sc__spec-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* SC Typography Row */
.ds-sc__typo-row {
  padding: var(--ds-space-4) 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: baseline;
  gap: var(--ds-space-5);
}
.ds-sc__typo-row:last-child { border-bottom: none; }
.ds-sc__typo-label {
  flex-shrink: 0;
  width: 90px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ds-gray-500);
  text-transform: uppercase;
}

/* SC Spacing Scale */
.ds-sc__space-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ds-sc__space-visual {
  height: 12px;
  background: var(--ds-lime-400);
  border-radius: 2px;
  opacity: 0.6;
}
.ds-sc__space-value {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  color: var(--ds-gray-400);
  min-width: 40px;
}

/* SC Shadow Demo */
.ds-sc__shadow-item {
  width: 100%;
  height: 80px;
  background: var(--ds-bg-page);
  border-radius: var(--ds-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-sc__shadow-label {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  color: var(--ds-gray-500);
}

/* SC Radius Demo */
.ds-sc__radius-item {
  width: 64px;
  height: 64px;
  background: rgba(163,230,53,0.15);
  border: 1px solid rgba(163,230,53,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-mono);
  font-size: 10px;
  color: var(--ds-lime-400);
}

@media (max-width: 1024px) {
  .ds-sc__layout {
    grid-template-columns: 1fr;
  }
  .ds-sc__sidebar {
    display: none;
  }
  .ds-sc__main {
    padding: var(--ds-space-6) var(--ds-space-6) var(--ds-space-16);
  }
}
@media (max-width: 768px) {
  .ds-sc {
    margin: 0;
  }
  .ds-sc__main {
    padding: var(--ds-space-4) var(--ds-space-4) var(--ds-space-16);
  }
  .ds-sc__title { font-size: var(--ds-text-2xl); }
}
