@scope (.kanban-board) {
  :scope {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding-bottom: var(--space-lg);
    flex-shrink: 0;
  }

  .filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  .pipeline-total {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-left: auto;
    font-size: var(--text-base);
  }

  .pipeline-total__label {
    color: var(--color-text-secondary);
  }

  .pipeline-total__value {
    font-weight: var(--font-semibold);
    color: var(--color-success-text);
  }

  .board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(16rem, 1fr);
    gap: var(--space-md);
    overflow: auto;
    padding-bottom: var(--space-xs);
    flex: 1;
    min-height: 0;
  }

  .column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 16rem;
    height: 100%;
    min-height: 0;

    & + & {
      border-left: 1px solid var(--color-border-muted);
      padding-left: var(--space-md);
    }
  }

  .column-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-muted);
    border-radius: var(--radius-md);
    flex-shrink: 0;
  }

  .column-title {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-text-heading);
  }

  .column-count {
    font-size: var(--text-caption);
    color: var(--color-text-muted);
    background: white;
    border-radius: var(--radius-full);
    min-width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-xs);
  }

  .column-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-xs);
  }

  .column-empty {
    font-size: var(--text-caption);
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
  }

  .card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-muted);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;

    &:hover {
      outline: var(--focus-ring);
      outline-offset: -2px;
      box-shadow: var(--shadow-sm);
      text-decoration: none;
    }

    &:focus-visible {
      outline: var(--focus-ring);
      outline-offset: var(--focus-ring-offset);
    }
  }

  .card--highlighted {
    background: var(--color-primary-muted);
    border-color: light-dark(var(--blue-200), var(--blue-800));

    &:hover {
      border-color: light-dark(var(--blue-300), var(--blue-700));
    }
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .card-status-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-full);
  }

  .card-status-badge svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
  }

  .card-status-badge--success {
    background: var(--color-success-muted);
    color: var(--color-success-text);
  }

  .card-status-badge--warning {
    background: var(--color-warning-muted);
    color: var(--color-warning-text);
  }

  .card-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-heading);
    line-height: var(--leading-snug);
  }

  .card-campaign {
    font-size: var(--text-body-sm);
    color: var(--color-text-secondary);
  }

  .card-store {
    font-size: var(--text-body-base);
    color: var(--color-text-muted);
  }

  .card-temperature {
    display: inline-flex;
    align-self: flex-start;
    font-size: var(--text-caption);
    font-weight: var(--font-semibold);
    padding: var(--space-2xs) var(--space-sm);
    border-radius: var(--radius-full);
    line-height: var(--leading-none);
  }

  .card-temperature--hot {
    background: var(--color-error-muted);
    color: var(--color-error-text);
  }

  .card-temperature--warm {
    background: var(--color-warning-muted);
    color: var(--color-warning-text);
  }

  .card-temperature--cold {
    background: var(--color-info-muted);
    color: var(--color-info-text);
  }

  @media (width < 48rem) {
    .board {
      grid-template-columns: 1fr;
      overflow-x: visible;
    }

    .column-body {
      min-height: auto;
    }
  }
}
