 
    /* ── Reset & Base ─────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      /* ── Brand Colors ── */
      --amber-50:  #fff8ed;
      --amber-100: #fde7c0;
      --amber-200: #faca7a;
      --amber-400: #f5a623;
      --amber-500: #e8920e;
      --amber-600: #c57d0a;
      --amber-800: #7a4e08;
      --amber-900: #412402;

      /* ── Teal (Verified / Success) ── */
      --teal-400: #5bcba8;
      --teal-600: #2ea882;
      --teal-bg:  rgba(91,203,168,0.12);

      /* ── Red (Failed / Danger) ── */
      --red-400: #f87171;
      --red-bg:  rgba(248,113,113,0.12);

      /* ── Blue (Pending / Info) ── */
      --blue-400: #4a7fa8;
      --blue-bg:  rgba(74,127,168,0.12);

      /* ── Neutrals ── */
      --bg-base:      #1a1d24;
      --bg-surface:   #1e2129;
      --bg-card:      #272b33;
      --bg-elevated:  #2e323c;
      --bg-hover:     rgba(255,255,255,0.04);
      --bg-active:    rgba(245,166,35,0.10);

      /* ── Borders ── */
      --border-subtle:  rgba(255,255,255,0.07);
      --border-default: rgba(255,255,255,0.12);
      --border-accent:  rgba(245,166,35,0.45);
      --border-strong:  rgba(255,255,255,0.22);

      /* ── Text ── */
      --text-primary:   #f0eed8;
      --text-secondary: #e2e0d6;
      --text-muted:     #9a9890;
      --text-faint:     #6b6960;
      --text-accent:    #f5a623;

      /* ── Radius ── */
      --radius-sm:  6px;
      --radius-md:  10px;
      --radius-lg:  14px;
      --radius-xl:  20px;
      --radius-pill: 99px;

      /* ── Shadows ── */
      --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
      --shadow-md:  0 4px 20px rgba(0,0,0,0.40);
      --shadow-lg:  0 8px 40px rgba(0,0,0,0.55);

      /* ── Transitions ── */
      --transition-fast: 0.15s ease;
      --transition-base: 0.20s ease;
      --transition-slow: 0.35s ease;

      /* ── Typography ── */
      --font-sans: 'Inter', sans-serif;
      --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
      --weight-light:    300;
      --weight-regular:  400;
      --weight-medium:   500;
      --weight-semibold: 600;
    }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg-base);
      color: var(--text-secondary);
      font-family: var(--font-sans);
      font-size: 14px;
      line-height: 1.6;
    }

    /* ── Layout ─────────────────────────────────────────────── */
    .ds-layout {
      display: grid;
      grid-template-columns: 240px 1fr;
      min-height: 100vh;
    }

    /* ── Sidebar ─────────────────────────────────────────────── */
    .ds-sidebar {
      background: var(--bg-surface);
      border-right: 0.5px solid var(--border-subtle);
      padding: 28px 0;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }
    .ds-sidebar::-webkit-scrollbar { width: 4px; }
    .ds-sidebar::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }

    .sidebar-logo {
      display: flex; align-items: center; gap: 10px;
      padding: 0 20px 24px;
      border-bottom: 0.5px solid var(--border-subtle);
      margin-bottom: 16px;
    }
    .logo-mark {
      width: 34px; height: 34px;
      
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; font-weight: 700; color: var(--bg-base);
      flex-shrink: 0;
    }
    .logo-text { font-size: 13px; font-weight: 600; color: var(--text-primary); }
    .logo-sub  { font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

    .nav-section-label {
      font-size: 10px; font-weight: 600;
      letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--text-faint);
      padding: 12px 20px 6px;
    }
    .nav-link {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 20px;
      font-size: 13px; color: var(--text-muted);
      text-decoration: none;
      border-left: 2px solid transparent;
      transition: all var(--transition-fast);
    }
    .nav-link:hover { color: var(--text-secondary); background: var(--bg-hover); }
    .nav-link.active { color: var(--amber-400); border-left-color: var(--amber-400); background: var(--bg-active); }
    .nav-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

    /* ── Main content ─────────────────────────────────────────── */
    .ds-main {
      padding: 48px 56px;
      max-width: 1100px;
    }

    /* ── Section ─────────────────────────────────────────────── */
    .ds-section { margin-bottom: 72px; }
    .ds-section-header {
      display: flex; align-items: center; gap: 12px;
      margin-bottom: 32px;
      padding-bottom: 16px;
      border-bottom: 0.5px solid var(--border-subtle);
    }
    .ds-section-accent {
      width: 4px; height: 28px;
      background: var(--amber-400);
      border-radius: 2px;
      flex-shrink: 0;
    }
    .ds-section-title {
      font-size: 22px; font-weight: 600;
      color: var(--text-primary);
    }
    .ds-section-sub {
      font-size: 13px; color: var(--text-muted);
      margin-top: 2px;
    }
    .ds-section-num {
      font-size: 11px; font-weight: 600;
      color: var(--amber-400);
      letter-spacing: 0.08em;
      background: rgba(245,166,35,0.1);
      padding: 3px 8px; border-radius: var(--radius-pill);
      margin-left: auto;
    }

    /* ── Sub-section ─────────────────────────────────────────── */
    .ds-sub { margin-bottom: 36px; }
    .ds-sub-title {
      font-size: 13px; font-weight: 600;
      color: var(--text-muted);
      letter-spacing: 0.06em; text-transform: uppercase;
      margin-bottom: 16px;
    }

    /* ── Token row ─────────────────────────────────────────────── */
    .token-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 10px;
    }
    .token-row {
      background: var(--bg-card);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 12px 14px;
      display: flex; align-items: center; gap: 12px;
    }
    .token-swatch {
      width: 32px; height: 32px;
      border-radius: var(--radius-sm);
      flex-shrink: 0;
      border: 0.5px solid rgba(255,255,255,0.08);
    }
    .token-name { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
    .token-val  { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 1px; }

    /* ── Color ramp ─────────────────────────────────────────────── */
    .color-ramp { display: flex; gap: 0; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 8px; }
    .color-ramp-stop {
      flex: 1; height: 44px;
      position: relative;
      cursor: default;
    }
    .color-ramp-stop span {
      position: absolute; bottom: 4px; left: 50%;
      transform: translateX(-50%);
      font-size: 9px; opacity: 0.7;
      white-space: nowrap;
    }
    .ramp-label { font-size: 11px; color: var(--text-faint); margin-bottom: 12px; }

    /* ── Typography specimens ─────────────────────────────────── */
    .type-specimen {
      background: var(--bg-card);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      overflow: hidden;
      margin-bottom: 10px;
    }
    .type-row {
      display: flex; align-items: baseline; gap: 0;
      padding: 16px 20px;
      border-bottom: 0.5px solid var(--border-subtle);
    }
    .type-row:last-child { border-bottom: none; }
    .type-meta {
      width: 160px; flex-shrink: 0;
      font-size: 11px; color: var(--text-faint);
      font-family: var(--font-mono);
      padding-top: 2px;
    }
    .type-preview { flex: 1; color: var(--text-primary); }

    /* ── Spacing ─────────────────────────────────────────────── */
    .spacing-row {
      display: flex; align-items: center; gap: 16px;
      margin-bottom: 10px;
    }
    .spacing-bar {
      background: rgba(245,166,35,0.25);
      border: 0.5px solid rgba(245,166,35,0.4);
      border-radius: 2px;
      height: 20px;
      flex-shrink: 0;
    }
    .spacing-meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
    .spacing-name { font-size: 12px; color: var(--text-faint); margin-left: 4px; }

    /* ── Radius showcase ─────────────────────────────────────── */
    .radius-grid { display: flex; gap: 16px; flex-wrap: wrap; }
    .radius-item {
      background: var(--bg-card);
      border: 0.5px solid var(--border-default);
      width: 80px; height: 80px;
      display: flex; align-items: center; justify-content: center;
      flex-direction: column; gap: 4px;
    }
    .radius-val { font-size: 12px; font-weight: 500; color: var(--text-muted); }
    .radius-name { font-size: 10px; color: var(--text-faint); }

    /* ── Buttons ─────────────────────────────────────────────── */
    .btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      font-family: var(--font-sans); font-size: 13px; font-weight: 500;
      padding: 9px 18px; border-radius: var(--radius-md);
      border: none; cursor: pointer;
      transition: all var(--transition-fast);
      text-decoration: none;
    }
    .btn-primary {
      background: var(--amber-400); color: var(--bg-base);
    }
    .btn-primary:hover { background: var(--amber-500); }

    .btn-secondary {
      background: rgba(245,166,35,0.12);
      color: var(--amber-400);
      border: 0.5px solid rgba(245,166,35,0.35);
    }
    .btn-secondary:hover { background: rgba(245,166,35,0.2); }

    .btn-ghost {
      background: transparent;
      color: var(--text-muted);
      border: 0.5px solid var(--border-default);
    }
    .btn-ghost:hover { background: var(--bg-hover); color: var(--text-secondary); }

    .btn-danger {
      background: rgba(248,113,113,0.12);
      color: var(--red-400);
      border: 0.5px solid rgba(248,113,113,0.3);
    }
    .btn-danger:hover { background: rgba(248,113,113,0.2); }

    .btn-sm { font-size: 11px; padding: 5px 12px; }
    .btn-lg { font-size: 15px; padding: 12px 24px; }
    .btn-icon { padding: 9px; border-radius: var(--radius-md); }
    .btn:disabled { opacity: 0.38; cursor: not-allowed; }

    /* ── Badges ─────────────────────────────────────────────── */
    .badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 11px; font-weight: 500;
      padding: 3px 9px; border-radius: var(--radius-pill);
    }
    .badge-up      { background: rgba(91,203,168,0.12); color: var(--teal-400); }
    .badge-down    { background: rgba(248,113,113,0.12); color: var(--red-400); }
    .badge-neutral { background: rgba(148,163,184,0.12); color: #94a3b8; }
    .badge-amber   { background: rgba(245,166,35,0.12);  color: var(--amber-400); }
    .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

    /* ── Tags ─────────────────────────────────────────────── */
    .tag {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; padding: 2px 8px;
      border-radius: var(--radius-sm);
      border: 0.5px solid var(--border-default);
      color: var(--text-muted);
      background: var(--bg-elevated);
    }

    /* ── Inputs ─────────────────────────────────────────────── */
    .input-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
    .input-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
    .ds-input {
      background: var(--bg-card);
      border: 0.5px solid var(--border-default);
      border-radius: var(--radius-md);
      padding: 9px 12px;
      font-family: var(--font-sans); font-size: 13px;
      color: var(--text-primary);
      outline: none;
      transition: border-color var(--transition-fast);
      width: 100%;
    }
    .ds-input::placeholder { color: var(--text-faint); }
    .ds-input:focus { border-color: var(--amber-400); box-shadow: 0 0 0 3px rgba(245,166,35,0.12); }
    .ds-input.error { border-color: var(--red-400); }
    .ds-input.success { border-color: var(--teal-400); }
    .input-hint { font-size: 11px; color: var(--text-faint); }
    .input-hint.error { color: var(--red-400); }
    .input-hint.success { color: var(--teal-400); }

    /* ── Select ─────────────────────────────────────────────── */
    .ds-select {
      appearance: none;
      background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b6960' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
      border: 0.5px solid var(--border-default);
      border-radius: var(--radius-md);
      padding: 9px 32px 9px 12px;
      font-family: var(--font-sans); font-size: 13px;
      color: var(--text-primary);
      outline: none;
      cursor: pointer;
      width: 100%;
      transition: border-color var(--transition-fast);
    }
    .ds-select:focus { border-color: var(--amber-400); }

    /* ── Toggle ─────────────────────────────────────────────── */
    .toggle-track {
      display: inline-block;
      position: relative; width: 36px; height: 20px;
      background: var(--bg-elevated);
      border-radius: var(--radius-pill);
      border: 0.5px solid var(--border-default);
      cursor: pointer;
      transition: all var(--transition-base);
    }
    .toggle-track.on {
      background: rgba(245,166,35,0.2);
      border-color: rgba(245,166,35,0.5);
    }
    .toggle-thumb {
      position: absolute; top: 2px; left: 2px;
      width: 14px; height: 14px;
      border-radius: 50%; background: var(--text-muted);
      transition: all var(--transition-base);
    }
    .toggle-track.on .toggle-thumb {
      transform: translateX(16px);
      background: var(--amber-400);
    }

    /* ── Segmented control ─────────────────────────────────── */
    .segmented {
      display: inline-flex;
      background: var(--bg-elevated);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 3px; gap: 2px;
    }
    .seg-btn {
      font-size: 12px; padding: 5px 14px;
      border-radius: var(--radius-sm);
      border: none; background: transparent;
      color: var(--text-muted); cursor: pointer;
      transition: all var(--transition-fast);
    }
    .seg-btn.active {
      background: rgba(245,166,35,0.18);
      color: var(--amber-400);
    }
    .seg-btn:hover:not(.active) { color: var(--text-secondary); }

    /* ── Cards ─────────────────────────────────────────────── */
    .card-demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

    .ds-card {
      background: var(--bg-card);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: border-color var(--transition-fast);
    }
    .ds-card:hover { border-color: var(--border-default); }

    .ds-card-accent {
      background: var(--bg-card);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 20px;
      border-left: 3px solid var(--amber-400);
    }

    .kpi-card-demo {
      background: var(--bg-card);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 20px 22px;
      position: relative; overflow: hidden;
    }
    .kpi-card-demo::after {
      content: '';
      position: absolute; top: 0; left: 0;
      width: 3px; height: 100%;
    }
    .kpi-card-demo.c-amber::after { background: var(--amber-400); }
    .kpi-card-demo.c-teal::after  { background: var(--teal-400); }
    .kpi-card-demo.c-red::after   { background: var(--red-400); }
    .kpi-icon-wrap {
      width: 36px; height: 36px; border-radius: var(--radius-sm);
      display: flex; align-items: center; justify-content: center;
      font-size: 15px; margin-bottom: 12px;
    }
    .kpi-val  { font-size: 26px; font-weight: 600; color: var(--text-primary); line-height: 1; margin: 6px 0 8px; }
    .kpi-lbl  { font-size: 12px; color: var(--text-muted); }

    /* ── Navigation items ─────────────────────────────────── */
    .nav-demo {
      background: var(--bg-surface);
      border-radius: var(--radius-lg);
      padding: 8px;
      border: 0.5px solid var(--border-subtle);
      display: flex; flex-direction: column; gap: 2px;
    }
    .nav-demo-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 14px; border-radius: var(--radius-md);
      font-size: 13px; color: var(--text-muted);
      cursor: pointer; transition: all var(--transition-fast);
    }
    .nav-demo-item:hover { background: var(--bg-hover); color: var(--text-secondary); }
    .nav-demo-item.active { background: rgba(245,166,35,0.1); color: var(--amber-400); }
    .nav-demo-icon { font-size: 15px; width: 18px; text-align: center; }

    /* ── Table ─────────────────────────────────────────────── */
    .ds-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .ds-table thead tr {
      border-bottom: 0.5px solid var(--border-default);
    }
    .ds-table th {
      text-align: left;
      padding: 8px 12px;
      font-size: 11px; font-weight: 600;
      letter-spacing: 0.06em; text-transform: uppercase;
      color: var(--text-faint);
    }
    .ds-table td {
      padding: 11px 12px;
      color: var(--text-secondary);
      border-bottom: 0.5px solid var(--border-subtle);
    }
    .ds-table tbody tr:hover td { background: var(--bg-hover); }
    .ds-table tbody tr:last-child td { border-bottom: none; }
    .status-dot {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 12px;
    }

    /* ── Divider ─────────────────────────────────────────────── */
    .ds-divider {
      height: 0.5px; background: var(--border-subtle);
      margin: 24px 0;
    }

    /* ── Code block ─────────────────────────────────────────── */
    .ds-code {
      background: #0f1117;
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 14px 16px;
      font-family: var(--font-mono);
      font-size: 12px;
      color: #c9c7b8;
      overflow-x: auto;
      line-height: 1.7;
    }
    .code-kw  { color: #f5a623; }
    .code-str { color: #5bcba8; }
    .code-cmt { color: #6b6960; font-style: italic; }
    .code-var { color: #4a7fa8; }

    /* ── Demo box ─────────────────────────────────────────────── */
    .demo-box {
      background: var(--bg-surface);
      border: 0.5px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 16px;
    }

    /* ── Two-col layout ─────────────────────────────────────── */
    .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

    /* ── Cover ─────────────────────────────────────────────── */
    .ds-cover {
      background: var(--bg-surface);
      border-bottom: 0.5px solid var(--border-subtle);
      padding: 48px 56px 40px;
      margin-bottom: 0;
    }
    .cover-eyebrow {
      font-size: 11px; font-weight: 600;
      letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--amber-400); margin-bottom: 10px;
    }
    .cover-title {
      font-size: 36px; font-weight: 700;
      color: var(--text-primary); line-height: 1.15;
      margin-bottom: 10px;
    }
    .cover-sub {
      font-size: 15px; color: var(--text-muted);
      max-width: 560px; line-height: 1.65;
      margin-bottom: 24px;
    }
    .cover-meta { display: flex; gap: 24px; }
    .cover-meta-item { font-size: 12px; color: var(--text-faint); }
    .cover-meta-item strong { color: var(--text-muted); font-weight: 500; }

    /* ── Scrollbar ─────────────────────────────────────────── */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .ds-section { animation: fadeUp 0.4s ease both; }


 