.ds-card {
    --ds-bg: #fff;
    --ds-primary: #10b981;
    --ds-primary-hover: #059669;
    --ds-border: rgba(16, 185, 129, 0.2);
    --ds-shadow: rgba(16, 185, 129, 0.08);
    --ds-sidebar-bg: rgba(236, 253, 245, 0.5);
    --ds-sidebar-border: rgba(16, 185, 129, 0.15);
    --ds-text: #0f172a;
    --ds-text-muted: #475569;
    --ds-surface: #f8fafc;
    --ds-input-bg: #fff;
    --ds-input-border: rgba(16, 185, 129, 0.3);

    display: flex;
    flex-direction: column;
    background: var(--ds-bg);
    border: 1px solid var(--ds-border);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px var(--ds-shadow);
    overflow: hidden;
    margin: 2rem 0;
  }

  .theme-dark .ds-card {
    --ds-bg: #18181b;
    --ds-primary: #34d399;
    --ds-primary-hover: #10b981;
    --ds-border: rgba(52, 211, 153, 0.2);
    --ds-sidebar-bg: rgba(39, 39, 42, 0.8);
    --ds-sidebar-border: rgba(52, 211, 153, 0.15);
    --ds-text: #f4f4f5;
    --ds-text-muted: #a1a1aa;
    --ds-surface: #27272a;
    --ds-input-bg: #3f3f46;
    --ds-input-border: rgba(52, 211, 153, 0.25);
  }

  .ds-sidebar {
    background: var(--ds-sidebar-bg);
    border-bottom: 1px solid var(--ds-sidebar-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .ds-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ds-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .ds-type-toggle {
    display: flex;
    border: 1px solid var(--ds-input-border);
    border-radius: 0.625rem;
    overflow: hidden;
  }

  .ds-type-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: transparent;
    color: var(--ds-text-muted);
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .ds-type-btn.active {
    background: var(--ds-primary);
    color: #fff;
  }

  .ds-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ds-text-muted);
  }

  .ds-textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--ds-input-border);
    background: var(--ds-input-bg);
    color: var(--ds-text);
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s;
  }

  .ds-hint {
    font-size: 0.8rem;
    color: var(--ds-text-muted);
  }

  .ds-hint-error {
    color: #ef4444;
  }

  .ds-filter-notice {
    font-size: 0.75rem;
    color: #f59e0b;
    min-height: 1rem;
  }

  .ds-main {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .ds-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .ds-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ds-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .ds-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .ds-stat {
    background: var(--ds-surface);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .ds-stat-hero {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.2);
  }

  .ds-sl {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ds-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .ds-sv {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ds-text);
  }

  .ds-sv-hero {
    font-size: 1.6rem;
    color: var(--ds-primary);
  }

  .ds-chart-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .ds-chart-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ds-text);
  }

  .ds-chart-desc {
    font-size: 0.8rem;
    color: var(--ds-text-muted);
  }

  #ds-chart {
    width: 100%;
    height: 180px;
    display: block;
    border-radius: 0.75rem;
    background: var(--ds-surface);
  }

  #ds-boxplot {
    width: 100%;
    height: 80px;
    display: block;
    border-radius: 0.75rem;
    background: var(--ds-surface);
  }

  .ds-insight-box {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .ds-insight-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ds-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .ds-insight-text {
    font-size: 0.875rem;
    color: var(--ds-text);
    line-height: 1.6;
    margin: 0;
  }

  .ds-copy-block {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .ds-copy-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ds-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .ds-copy-text {
    font-size: 0.85rem;
    color: var(--ds-text);
    line-height: 1.6;
    background: var(--ds-input-bg);
    border: 1px solid var(--ds-input-border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    min-height: 2.25rem;
    margin: 0;
    word-break: break-all;
  }

  .ds-copy-btn {
    align-self: flex-start;
    padding: 0.5rem 1.25rem;
    background: var(--ds-primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
  }

  .ds-copy-btn:hover {
    background: var(--ds-primary-hover);
  }

  @media (min-width: 768px) {
    .ds-card {
      flex-direction: row;
    }

    .ds-sidebar {
      width: 280px;
      flex-shrink: 0;
      border-bottom: none;
      border-right: 1px solid var(--ds-sidebar-border);
    }
  }

  @media (max-width: 600px) {
    .ds-group {
      grid-template-columns: repeat(2, 1fr);
    }
  }