.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.user-menu__sign-in {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: var(--text-on-accent, #fafafa);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.user-menu__sign-in:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.user-menu__sign-in:disabled {
  opacity: 0.85;
  cursor: wait;
}

.user-menu__container {
  position: relative;
}

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: none;
  border: none;
  border-radius: var(--radius);
  transition: background-color 0.15s;
}

.user-menu__trigger:hover {
  background: var(--color-surface-hover);
}

.user-menu__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-menu__avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--text-on-accent, #fafafa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.user-menu__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.user-menu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  min-width: 180px;
  z-index: 100;
  padding: 4px;
}

.user-menu__dropdown-info {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 4px;
}

.user-menu__dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.user-menu__dropdown-email {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.user-menu__dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.user-menu__dropdown-item:hover:not(:disabled) {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.user-menu__dropdown-item:disabled {
  opacity: 0.7;
  cursor: wait;
}

.user-menu__spinner {
  animation: user-menu-spin 1s linear infinite;
}

@keyframes user-menu-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.user-menu__dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 4px 0;
}

.user-menu--sidebar-collapsed .user-menu__trigger {
  justify-content: center;
  padding: 8px;
  width: 100%;
}

.user-menu--sidebar-collapsed .user-menu__name {
  display: none;
}

.user-menu--sidebar-collapsed .user-menu__sign-in {
  min-width: auto;
}
.plan-selection {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
}

.plan-selection__header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 4px;
}

@media (min-width: 640px) {
  .plan-selection__header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }
}

.plan-selection__intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.plan-selection__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary, var(--color-text-primary));
}

.plan-selection__subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, var(--color-text-secondary));
}

.plan-selection__scheduled {
  font-size: 13px;
  line-height: 1.4;
  color: var(--warning, #d97706);
}

.plan-selection__toggle {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-color, var(--color-border));
  border-radius: 10px;
  background: var(--surface-secondary, var(--color-surface-hover));
  align-self: flex-start;
}

.plan-selection__toggle-btn {
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, var(--color-text-secondary));
  background: transparent;
  border: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.plan-selection__toggle-btn:hover {
  color: var(--text-primary, var(--color-text-primary));
}

.plan-selection__toggle-btn--active {
  background: var(--surface-primary, var(--color-surface));
  color: var(--text-primary, var(--color-text-primary));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.plan-selection__save-badge {
  margin-left: 6px;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-info-muted-bg, rgba(37, 99, 235, 0.1));
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary, #2563eb);
}

/* Card grid — 2 columns in modal for readable card width */
.plan-selection__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 10px;
}

@media (min-width: 640px) {
  .plan-selection__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Full-screen plan picker uses 4 columns once there's room */
@media (min-width: 1100px) {
  .subscription-gate__inner .plan-selection__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    gap: 16px;
  }
}

/* Modal plan tab: stay 2×2 until the modal itself is very wide */
@media (min-width: 1280px) {
  .settings-modal--plan .plan-selection__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    gap: 16px;
  }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border-color, var(--color-border));
  border-radius: 12px;
  background: var(--surface-primary, var(--color-surface));
  transition: border-color 0.15s, box-shadow 0.15s;
}

@media (min-width: 1100px) {
  .subscription-gate__inner .plan-card {
    grid-row: span 3;
    display: grid;
    grid-template-rows: subgrid;
  }
}

@media (min-width: 1280px) {
  .settings-modal--plan .plan-card {
    grid-row: span 3;
    display: grid;
    grid-template-rows: subgrid;
  }
}

.plan-card--highlighted {
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 1px var(--color-primary, #2563eb);
}

.plan-card__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-primary, #2563eb);
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-on-accent, #fff);
}

.plan-card__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 24px 0;
}

.plan-card__tier {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, var(--color-text-secondary));
}

.plan-card--highlighted .plan-card__tier {
  color: var(--color-primary, #2563eb);
}

.plan-card__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-card__price-number {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-primary, var(--color-text-primary));
}

.plan-card__price-period {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary, var(--color-text-secondary));
}

.plan-card__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
  flex: 1;
}

.plan-card__tagline {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-primary, var(--color-text-primary));
}

.settings-modal--plan .plan-card__tagline {
  font-size: 16px;
}

@media (min-width: 1280px) {
  .settings-modal--plan .plan-card__tagline {
    font-size: 17px;
  }
}

.plan-card__description {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary, var(--color-text-secondary));
}

.plan-card__cta {
  padding: 0 24px 24px;
  margin-top: auto;
}

.plan-card__btn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-color, var(--color-border));
  background: var(--surface-primary, var(--color-surface));
  color: var(--text-primary, var(--color-text-primary));
  transition: background-color 0.15s, border-color 0.15s;
}

.plan-card__btn:hover:not(:disabled) {
  background: var(--surface-hover, var(--color-surface-hover));
  text-decoration: none;
}

.plan-card__btn--solid {
  background: var(--color-primary, #2563eb);
  color: var(--text-on-accent, #fff);
  border-color: var(--color-primary, #2563eb);
}

.plan-card__btn--solid:hover:not(:disabled) {
  background: var(--color-primary-hover, #1d4ed8);
}

.plan-card__btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.plan-selection__status {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  font-size: 14px;
  color: var(--text-secondary, var(--color-text-secondary));
}

.plan-selection__error {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 48px 0;
  text-align: center;
  color: var(--text-secondary, var(--color-text-secondary));
}
.settings-page {
  max-width: 780px;
}

.settings-page__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.settings-page__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.settings-page__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sections */

.settings-section {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.settings-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.settings-section__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.settings-section__subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 20px 0 8px;
}

.settings-section__description {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}

.settings-section__description code {
  font-size: 12px;
  padding: 1px 5px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
}

/* API Token */

.settings-token__reveal {
  margin: 16px 0;
  padding: 16px;
  background: var(--color-bg);
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
}

.settings-token__reveal-label {
  font-size: 13px;
  font-weight: 600;
  color: #f59e0b;
  margin: 0 0 10px;
}

.settings-token__reveal-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-token__value {
  flex: 1;
  font-size: 13px;
  font-family: var(--font-mono, monospace);
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  word-break: break-all;
  user-select: all;
}

.settings-token__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.settings-token__copy-btn:hover {
  background: var(--color-bg);
}

.settings-token__dismiss-btn {
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.settings-token__dismiss-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.settings-token__status {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 12px 0;
}

.settings-token__info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 13px;
}

.settings-token__exists {
  color: var(--color-text-secondary);
}

.settings-token__mask {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
  padding: 2px 8px;
  background: var(--color-bg);
  border-radius: 4px;
}

.settings-token__none {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 12px 0;
}

.settings-token__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.settings-token__generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--color-primary, #2563eb);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.settings-token__generate-btn:hover {
  opacity: 0.9;
}

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

.settings-token__delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.settings-token__delete-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.settings-token__delete-btn--confirm {
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
}

.settings-token__delete-btn--confirm:hover {
  color: #fff;
  background: #dc2626;
}

/* MCP Instructions */

.settings-mcp__tools {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 6px;
}

.settings-mcp__tools li {
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-secondary);
  padding: 4px 0;
}

.settings-mcp__tools li strong {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.settings-mcp__config-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 16px 0 6px;
}

.settings-mcp__code {
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  line-height: 1.6;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 16px;
  white-space: pre;
}

/* Admin Section */

.settings-admin__nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--color-surface-raised, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.settings-admin__nav-link:hover {
  background: var(--color-surface-hover, rgba(255, 255, 255, 0.08));
  border-color: var(--color-border-hover, rgba(255, 255, 255, 0.16));
}

.settings-admin__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.settings-admin__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.settings-admin__action-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

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

.settings-admin__action-btn--primary {
  color: #fff;
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
}

.settings-admin__action-btn--primary:hover {
  opacity: 0.9;
  color: #fff;
}

.settings-admin__action-result {
  font-size: 13px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-secondary);
}

.settings-admin__error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ef4444;
  margin: 8px 0;
}

.settings-admin__lock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 8px 0 4px;
}

.settings-admin__lock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.settings-admin__lock-dot--free {
  background: #22c55e;
}

.settings-admin__lock-dot--held {
  background: #f59e0b;
}

.settings-admin__lock-holder {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
}

.settings-admin__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.settings-admin__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--color-bg);
  border-radius: var(--radius);
}

.settings-admin__item-name {
  font-weight: 500;
  color: var(--color-text-primary);
  min-width: 100px;
}

.settings-admin__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.settings-admin__badge--idle {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.settings-admin__badge--starting {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.settings-admin__badge--unreachable {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.settings-admin__badge--busy {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.settings-admin__item-id {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
}

.settings-admin__item-time {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-left: auto;
}

.settings-admin__mono {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.settings-admin__projects {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-admin__project-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}

.settings-admin__project-link {
  color: var(--color-primary, #2563eb);
  text-decoration: none;
}

.settings-admin__project-link:hover {
  text-decoration: underline;
}

.settings-admin__expandable {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-admin__expandable + .settings-admin__expandable {
  margin-top: 4px;
}

.settings-admin__expandable-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  text-align: left;
}

.settings-admin__expandable-header:hover {
  background: var(--color-surface);
}

.settings-admin__expandable-sub {
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-admin__expandable-body {
  padding: 8px 10px;
  border-top: 1px solid var(--color-border);
}

.settings-admin__container-detail {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-admin__logs {
  margin-top: 6px;
}

.settings-admin__logs-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.settings-admin__logs-empty {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-style: italic;
}

.settings-admin__log {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  padding: 2px 0;
}

.settings-admin__log-time {
  flex-shrink: 0;
  width: 124px;
  white-space: nowrap;
  color: var(--color-text-tertiary, var(--color-text-secondary));
}

.settings-admin__log-type {
  flex-shrink: 0;
  width: 64px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.settings-admin__log--error .settings-admin__log-type { color: #ef4444; }
.settings-admin__log--warning .settings-admin__log-type { color: #f59e0b; }
.settings-admin__log--info .settings-admin__log-type { color: #3b82f6; }
.settings-admin__log--step .settings-admin__log-type { color: #22c55e; }
.settings-admin__log--event .settings-admin__log-type { color: var(--color-text-tertiary, var(--color-text-secondary)); width: 24px; }

.settings-admin__log-msg {
  color: var(--color-text-secondary);
  word-break: break-word;
}

/* Errors grouped by project: tasks nest one level inside their project's expandable body. */
.settings-admin__error-tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Daily Activity */

.settings-admin__day-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-admin__day-group-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.settings-admin__day-empty {
  font-size: 12px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
}

.settings-admin__day-owner {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin: 4px 0 2px;
}

/* All Projects by User */

.settings-admin__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-admin__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.settings-admin__sort-select {
  font-size: 13px;
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.settings-admin__companies {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.settings-admin__company-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.settings-admin__company-item:nth-child(odd) {
  background: var(--color-bg-secondary);
}

.settings-admin__company-name {
  font-weight: 500;
  color: var(--color-text-primary);
}

.settings-admin__company-count {
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.settings-admin__user-projects {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-admin__user-project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-admin__user-project-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: var(--radius);
}

.settings-admin__user-project-item:hover {
  background: var(--color-bg);
}

.settings-admin__user-project-name {
  font-weight: 500;
  color: var(--color-primary, #2563eb);
  text-decoration: none;
  min-width: 120px;
}

.settings-admin__user-project-name:hover {
  text-decoration: underline;
}

.settings-admin__user-project-stats {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-left: auto;
  margin-right: 8px;
}

/* Admin Users */

.settings-admin__add-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.settings-admin__add-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--color-text-primary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
}

.settings-admin__add-input:focus {
  border-color: var(--color-primary, #2563eb);
}

.settings-admin__remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-admin__remove-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.settings-admin__token-reveal {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.settings-admin__token-value {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: var(--color-text-primary);
  word-break: break-all;
  flex: 1;
}

.settings-admin__token-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-admin__action-btn--danger {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.settings-admin__action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Activity graph */

.settings-admin__chart-section {
  margin-bottom: 8px;
}

.settings-admin__chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 10px;
}

.settings-admin__chart-metrics,
.settings-admin__chart-grouping {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-admin__chip {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}

.settings-admin__chip:hover {
  background: var(--color-surface);
}

.settings-admin__chip--active {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
  background: var(--color-surface);
}

.settings-admin__chart-caption {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0 0 8px;
}

.settings-admin__chart {
  width: 100%;
}

/* Activity feed — split expandable header (toggle + user link) and user links */

.settings-admin__expandable-header--split {
  padding: 0;
  gap: 0;
}

.settings-admin__expandable-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.settings-admin__expandable-toggle:hover {
  background: var(--color-surface);
}

.settings-admin__user-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary, #2563eb);
  text-decoration: none;
  white-space: nowrap;
}

.settings-admin__user-link:hover {
  text-decoration: underline;
}

/* Project change diffs (from audit_log) */

.settings-admin__change-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.settings-admin__changes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.settings-admin__change {
  border-left: 2px solid var(--color-border);
  padding-left: 8px;
}

.settings-admin__change-time {
  font-size: 11px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
  margin-bottom: 2px;
}

.settings-admin__change-field {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  flex-wrap: wrap;
}

.settings-admin__change-name {
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 90px;
}

.settings-admin__change-old {
  color: var(--color-text-secondary);
  text-decoration: line-through;
  word-break: break-word;
}

.settings-admin__change-arrow {
  color: var(--color-text-tertiary, var(--color-text-secondary));
}

.settings-admin__change-new {
  color: var(--color-text-primary);
  word-break: break-word;
}

/* Admin user detail page */

.settings-admin__user-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.settings-admin__user-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.settings-admin__user-meta {
  font-size: 12px;
}

.settings-admin__user-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.settings-admin__stat-label {
  color: var(--color-text-tertiary, var(--color-text-secondary));
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

@media (max-width: 600px) {
  .settings-token__reveal-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-token__actions {
    flex-direction: column;
  }

  .settings-token__info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Usage */

.settings-usage__status {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 8px 0;
}

.settings-usage__status--error {
  color: #ef4444;
}

.settings-usage__summary {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.settings-usage__summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.settings-usage__summary-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.settings-usage__summary-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.settings-usage__empty {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

.settings-usage__projects {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-usage__project {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  overflow: hidden;
}

.settings-usage__project-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.settings-usage__project-header:hover {
  background: var(--color-bg-secondary, rgba(0, 0, 0, 0.03));
}

.settings-usage__project-chevron {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: transform 0.15s ease;
}

.settings-usage__project-chevron--open {
  transform: rotate(90deg);
}

.settings-usage__project-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-usage__project-total {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.settings-usage__entries {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-top: 1px solid var(--color-border);
}

.settings-usage__entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px;
  font-size: 13px;
}

.settings-usage__entry-kind {
  flex-shrink: 0;
  width: 78px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
}

.settings-usage__entry-label {
  flex: 1;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-usage__entry-date {
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

.settings-usage__entry-credits {
  flex-shrink: 0;
  min-width: 70px;
  text-align: right;
  color: var(--color-text-primary);
}

@media (max-width: 600px) {
  .settings-usage__summary {
    flex-direction: column;
  }
}
.settings-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.settings-modal {
  display: flex;
  width: 100%;
  max-width: 1120px;
  height: min(88vh, 820px);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.12),
    0 8px 16px rgba(15, 23, 42, 0.06);
}

.settings-modal--plan {
  max-width: min(1320px, 96vw);
  height: min(92vh, 900px);
}

.settings-modal__sidebar {
  display: flex;
  flex-direction: column;
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  background: var(--surface-secondary, var(--color-surface-hover));
}

.settings-modal__sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--color-border);
}

.settings-modal__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.settings-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  background: none;
  border: none;
  transition: background-color 0.15s, color 0.15s;
}

.settings-modal__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.settings-modal__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  overflow-y: auto;
}

.settings-modal__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius);
  transition: background-color 0.15s, color 0.15s;
}

.settings-modal__nav-item:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.settings-modal__nav-item--active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.settings-modal__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 32px 36px;
}

.settings-modal__content--plan {
  padding: 28px 32px 36px;
}

/* Flatter section cards inside the modal */
.settings-modal .settings-section {
  padding: 28px;
  border-radius: 12px;
  border-color: var(--color-border-light, var(--color-border));
  box-shadow: none;
}

.settings-modal .settings-section__header {
  margin-bottom: 10px;
}

.settings-modal .settings-section__title {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.settings-modal .settings-section__description {
  margin-bottom: 16px;
  line-height: 1.6;
}

.settings-legal__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.settings-legal__item:last-child {
  border-bottom: none;
}

.settings-legal__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
}

.settings-legal__link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .settings-modal__overlay {
    padding: 16px;
  }

  .settings-modal {
    flex-direction: column;
    height: 92vh;
    max-height: none;
  }

  .settings-modal--plan {
    height: 94vh;
  }

  .settings-modal__sidebar {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .settings-modal__sidebar-header {
    border-bottom: none;
    padding: 14px 16px;
  }

  .settings-modal__nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 12px 12px;
  }

  .settings-modal__nav-item {
    white-space: nowrap;
  }

  .settings-modal__content {
    padding: 24px 20px;
  }
}
.error-boundary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 520px;
  margin: 48px auto;
  padding: 32px 28px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.error-boundary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.error-boundary__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.error-boundary__message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.error-boundary__detail {
  width: 100%;
  margin: 4px 0 0;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-danger);
  background: var(--color-danger-bg);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 160px;
  overflow: auto;
}

.error-boundary__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.error-boundary__btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.error-boundary__btn:hover {
  background: var(--color-surface-hover);
}

.error-boundary__btn--primary {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.error-boundary__btn--primary:hover {
  background: var(--color-primary-hover);
}
.markdown-lite {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.markdown-lite > *:first-child {
  margin-top: 0;
}

.markdown-lite > *:last-child {
  margin-bottom: 0;
}

.markdown-lite__hr {
  margin: 12px 0;
  border: none;
  border-top: 1px solid var(--color-border-light, #e5e7eb);
}

.markdown-lite__heading {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
}

.markdown-lite__paragraph {
  margin: 0 0 10px;
}

.markdown-lite__list {
  margin: 0 0 10px;
  padding-left: 20px;
}

.markdown-lite__list li {
  margin: 2px 0;
}

.markdown-lite__code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
}

.markdown-lite__pre {
  margin: 0 0 10px;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm, 6px);
}

.markdown-lite__pre code {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
}
.help-widget {
  position: fixed;
  z-index: 1000;
  font-family: var(--hw-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Help Button */
.hw-button {
  position: fixed;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background-color: var(--hw-primary, #4C6EF5);
  color: var(--text-on-accent, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 150ms ease;
  z-index: 1001;
  animation: hw-pulse 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 3;
}

.hw-button.bottom-right { bottom: 24px; right: 24px; }
.hw-button.bottom-left { bottom: 24px; left: 24px; }
.hw-button:hover { transform: scale(1.05); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16); }
.hw-button:active { transform: scale(0.98); }

@keyframes hw-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Chat Panel */
.hw-chat-panel {
  position: fixed;
  width: 400px;
  height: 500px;
  background-color: var(--bg-elevated, #fff);
  border-radius: 16px;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  animation: hw-panel-slide-up 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hw-chat-panel.bottom-right { bottom: 92px; right: 24px; }
.hw-chat-panel.bottom-left { bottom: 92px; left: 24px; }

@keyframes hw-panel-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Chat Header */
.hw-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px 0 16px;
  background-color: var(--bg-surface, #F8F9FA);
  border-bottom: 1px solid var(--border-default, #E9ECEF);
  flex-shrink: 0;
}

.hw-chat-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #212529);
}

.hw-chat-header-actions {
  display: flex;
  gap: 4px;
}

.hw-chat-header-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted, #868E96);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 150ms ease, background-color 150ms ease;
}

.hw-chat-header-btn:hover {
  color: var(--text-primary, #212529);
  background-color: var(--bg-hover, #F1F3F5);
}

.hw-chat-header-btn.active {
  color: var(--accent, #4C6EF5);
  background-color: var(--accent-subtle, #EDF2FF);
}

/* Messages Area */
.hw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Help Banner */
.hw-help-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background-color: var(--accent-subtle, #EDF2FF);
  border-radius: 10px;
  font-size: 13px;
  color: var(--accent-pressed, #364FC7);
  line-height: 1.4;
}

.hw-help-banner-text { flex: 1; }

.hw-help-banner-dismiss {
  border: none;
  background: transparent;
  color: var(--accent-pressed, #364FC7);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
  flex-shrink: 0;
}

.hw-help-banner-dismiss:hover { opacity: 1; }

/* Picking Banner */
.hw-picking-banner {
  padding: 10px 12px;
  background-color: #FFF9DB;
  border-radius: 10px;
  font-size: 13px;
  color: #E67700;
  text-align: center;
  line-height: 1.4;
}

/* Message Bubble */
.hw-message-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.hw-message-bubble.user {
  align-self: flex-end;
  background-color: var(--hw-primary, #4C6EF5);
  color: var(--text-on-accent, #fff);
}

.hw-message-bubble.response {
  align-self: flex-start;
  background-color: var(--bg-surface, #F8F9FA);
  color: var(--text-primary, #212529);
}

.hw-message-context-badge {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 4px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: inline-block;
}

.hw-message-bubble-text { margin-bottom: 4px; white-space: pre-wrap; }
.hw-message-bubble-time { font-size: 11px; opacity: 0.7; }
.hw-message-bubble.response .hw-message-bubble-time { color: var(--text-hint, #ADB5BD); opacity: 1; }

/* Element Context Display */
.hw-element-context {
  padding: 8px 12px;
  border-top: 1px solid var(--border-default, #E9ECEF);
  background-color: var(--bg-surface, #F8F9FA);
  flex-shrink: 0;
  font-size: 12px;
}

.hw-element-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hw-element-context-label {
  font-weight: 600;
  color: var(--accent, #4C6EF5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hw-element-context-clear {
  border: none;
  background: transparent;
  color: var(--text-muted, #868E96);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.hw-element-context-clear:hover { color: var(--text-primary, #212529); }

.hw-element-context-tag {
  color: var(--text-primary, #495057);
  font-family: "SF Mono", "Fira Code", monospace;
  margin-bottom: 4px;
}

.hw-element-context-text {
  color: var(--text-muted, #868E96);
  font-style: italic;
  font-family: inherit;
}

.hw-element-context-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  line-height: 1.6;
}

.hw-element-context-component {
  color: var(--text-primary, #495057);
  font-family: "SF Mono", "Fira Code", monospace;
}

.hw-element-context-arrow {
  color: var(--text-hint, #ADB5BD);
}

/* Chat Input */
.hw-chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-default, #E9ECEF);
  background-color: var(--bg-surface, #F8F9FA);
  flex-shrink: 0;
  min-height: 48px;
}

.hw-chat-input input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default, #E9ECEF);
  border-radius: 8px;
  background-color: var(--bg-base, #fff);
  color: var(--text-primary, #212529);
  font-size: 14px;
  outline: none;
  transition: border-color 150ms ease;
  font-family: inherit;
}

.hw-chat-input input::placeholder { color: var(--text-hint, #ADB5BD); }
.hw-chat-input input:focus { border-color: var(--accent, #4C6EF5); }
.hw-chat-input input:disabled { opacity: 0.5; cursor: not-allowed; }

.hw-chat-send-button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background-color: var(--hw-primary, #4C6EF5);
  color: var(--text-on-accent, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease;
  flex-shrink: 0;
}

.hw-chat-send-button:hover:not(:disabled) { filter: brightness(0.9); }
.hw-chat-send-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Typing Indicator */
.hw-typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background-color: var(--bg-surface, #F8F9FA);
  border-radius: 12px;
}

.hw-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-hint, #ADB5BD);
  animation: hw-typing-bounce 1.4s infinite ease-in-out;
}

.hw-typing-dot:nth-child(1) { animation-delay: 0ms; }
.hw-typing-dot:nth-child(2) { animation-delay: 200ms; }
.hw-typing-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes hw-typing-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hw-button { animation: none; }
  .hw-typing-dot { animation: none; opacity: 0.5; }
  .hw-chat-panel { animation: none; }
}

@media (max-width: 767px) {
  .hw-chat-panel {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 0;
  }
  .hw-chat-panel.bottom-left { right: 0; }
}
.app-layout {
  height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.skip-nav {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.skip-nav:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.app-layout__mock-banner {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 12px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.app-layout__body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: visible;
}

.app-sidebar {
  flex-shrink: 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 12px 10px 12px;
  transition: width 0.22s ease, padding 0.22s ease;
  position: relative;
  z-index: 2;
}

.app-layout__body--sidebar-collapsed .app-sidebar {
  width: 64px;
  padding-left: 8px;
  padding-right: 8px;
}

.app-sidebar__top {
  flex-shrink: 0;
}

.app-sidebar__brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.app-sidebar__brand-row--collapsed {
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--color-text-primary);
}

.app-sidebar__brand img {
  flex-shrink: 0;
}

.app-sidebar__brand-hover {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border-radius: var(--radius);
}

.app-sidebar__brand-hover--rail {
  width: 100%;
}

.app-sidebar__brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--color-text-primary);
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.app-sidebar__brand-mark--collapsed {
  justify-content: center;
  padding: 8px;
}

.app-sidebar__pin-btn--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.app-sidebar__brand-hover:hover .app-sidebar__brand-mark,
.app-sidebar__brand-hover:focus-within .app-sidebar__brand-mark {
  opacity: 0;
  pointer-events: none;
}

.app-sidebar__brand-hover:hover .app-sidebar__pin-btn--overlay,
.app-sidebar__brand-hover:focus-within .app-sidebar__pin-btn--overlay {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar__pin-btn--overlay:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar__brand-hover:hover {
  background: var(--color-surface-hover);
}

.app-sidebar__brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar__pin-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.app-sidebar__pin-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.app-sidebar__pin-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.app-sidebar__pin-btn.app-sidebar__pin-btn--overlay {
  width: 100%;
  height: 100%;
  min-height: 42px;
}

.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}

.app-sidebar__link:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
  text-decoration: none;
}

.app-sidebar__link--active {
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
}

.app-sidebar__link--icon-only {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

button.app-sidebar__link {
  appearance: none;
  border: none;
  margin: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  width: 100%;
}

/* Hover tooltips (collapsed sidebar) — appears to the right */
.app-sidebar__tooltip-host {
  position: relative;
  width: 100%;
}

.app-sidebar__tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 400;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-on-accent);
  background: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 88%, var(--color-border));
  box-shadow: var(--shadow-float);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.app-sidebar__tooltip-host:hover .app-sidebar__tooltip,
.app-sidebar__tooltip-host:focus-within .app-sidebar__tooltip {
  opacity: 1;
  visibility: visible;
}

.app-sidebar__tooltip--portal {
  position: fixed;
  transform: translateY(-50%);
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* Sidebar project list */
.sidebar-projects {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.sidebar-projects--collapsed {
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.sidebar-projects__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-projects__search {
  flex-shrink: 0;
  padding: 2px 10px 8px;
}

.sidebar-projects__search-field {
  position: relative;
  width: 100%;
}

.sidebar-projects__search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.sidebar-projects__search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px 6px 30px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.sidebar-projects__search-input:hover {
  background: var(--color-surface);
}

.sidebar-projects__search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.sidebar-projects__search-input::placeholder {
  color: var(--color-text-muted);
}

.sidebar-projects__filter-empty {
  margin: 0;
  padding: 10px 12px 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.sidebar-projects__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 4px;
}

.sidebar-projects__title-link {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary, var(--color-text-muted));
  text-decoration: none;
  border-radius: 4px;
}

.sidebar-projects__title-link:hover {
  color: var(--color-text-primary);
}

.sidebar-projects__title-link--active {
  color: var(--color-text-primary);
}

.sidebar-projects__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--text-tertiary, var(--color-text-muted));
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.sidebar-projects__add:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.sidebar-projects__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
  min-width: 0;
}

.sidebar-projects__item:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
  text-decoration: none;
}

.sidebar-projects__item--active {
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
}

.sidebar-projects__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-projects__badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-success) 15%, transparent);
  color: var(--color-status-active-text);
}

/* Skeleton loading placeholders */
@keyframes sidebar-skeleton-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}

.sidebar-projects__skeleton {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-projects__skeleton-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 33px;
}

.sidebar-projects__skeleton-item--icon {
  justify-content: center;
  padding: 9px 10px;
  min-height: 36px;
}

.sidebar-projects__skeleton-bar {
  flex: 1;
  height: 12px;
  border-radius: 4px;
  background: var(--color-text-secondary);
  animation: sidebar-skeleton-pulse 1.4s ease-in-out infinite;
}

.sidebar-projects__skeleton-badge {
  flex-shrink: 0;
  width: 38px;
  height: 12px;
  border-radius: 4px;
  background: var(--color-text-secondary);
  animation: sidebar-skeleton-pulse 1.4s ease-in-out infinite;
  animation-delay: 0.15s;
}

.sidebar-projects__skeleton-icon {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--color-text-secondary);
  animation: sidebar-skeleton-pulse 1.4s ease-in-out infinite;
}

.sidebar-projects__skeleton-item:nth-child(2) .sidebar-projects__skeleton-bar { max-width: 60%; }
.sidebar-projects__skeleton-item:nth-child(2) .sidebar-projects__skeleton-icon { animation-delay: 0.1s; }
.sidebar-projects__skeleton-item:nth-child(3) .sidebar-projects__skeleton-bar { max-width: 85%; }
.sidebar-projects__skeleton-item:nth-child(3) .sidebar-projects__skeleton-icon { animation-delay: 0.2s; }
.sidebar-projects__skeleton-item:nth-child(4) .sidebar-projects__skeleton-bar { max-width: 50%; }
.sidebar-projects__skeleton-item:nth-child(4) .sidebar-projects__skeleton-icon { animation-delay: 0.3s; }

.app-sidebar__footer {
  flex-shrink: 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.app-sidebar__footer .user-menu {
  width: 100%;
}

.app-sidebar__footer .user-menu__container {
  width: 100%;
}

.app-sidebar__footer .user-menu__trigger {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 10px;
}

.app-sidebar__footer .user-menu__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.app-sidebar__footer .user-menu__dropdown {
  top: auto;
  bottom: calc(100% + 6px);
  right: 0;
  left: 0;
  margin-top: 0;
}

.app-sidebar--collapsed .app-sidebar__footer .user-menu__dropdown {
  top: auto;
  bottom: 0;
  left: calc(100% + 10px);
  right: auto;
  margin: 0;
  transform: none;
  min-width: 200px;
}

.app-sidebar__footer .user-menu__sign-in {
  width: 100%;
  justify-content: center;
}

.app-sidebar--collapsed .app-sidebar__footer .user-menu__sign-in {
  width: auto;
  padding: 8px 10px;
}

/* Help button */
.app-sidebar__help-btn {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* Help chat window — docked, non-blocking (no full-page overlay) so the page
   stays clickable, which the widget's element selector needs. */
.app-help-dialog {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1001;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 48px);
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: help-dialog-scale-in 0.15s ease;
}

@keyframes help-dialog-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.app-help-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.app-help-dialog__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.app-help-dialog__close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.app-help-dialog__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-help-dialog__body .hw-chat-panel {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.app-help-dialog .hw-message-bubble.response .hw-message-bubble-text {
  white-space: normal;
}

.app-help-dialog .hw-message-bubble-text .help-message-markdown {
  font-size: inherit;
  color: inherit;
  line-height: 1.5;
}

.app-help-dialog .hw-message-bubble-text .help-message-markdown .markdown-lite__heading {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
}

.app-help-dialog .hw-message-bubble-text .help-message-markdown .markdown-lite__heading:first-child {
  margin-top: 0;
}

.app-help-dialog .hw-message-bubble-text .help-message-markdown .markdown-lite__paragraph,
.app-help-dialog .hw-message-bubble-text .help-message-markdown .markdown-lite__list {
  margin-bottom: 8px;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface-secondary);
  padding: 28px 36px 48px;
  position: relative;
  z-index: 1;
}

.app-main:has(> .project-detail[data-testid='project-detail-page']),
.app-main:has(> .project-detail[data-testid='project-loading']),
.app-main:has(> .projects-page[data-testid='projects-page']),
.app-main:has(> .bug-detail[data-testid='bug-detail-page']),
.app-main:has(> .bug-detail[data-testid='bug-loading']) {
  overflow: hidden;
}

.app-main > * {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  max-width: min(1280px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.app-main > .project-detail[data-testid='project-detail-page'],
.app-main > .project-detail[data-testid='project-loading'],
.app-main > .projects-page[data-testid='projects-page'],
.app-main > .bug-detail[data-testid='bug-detail-page'],
.app-main > .bug-detail[data-testid='bug-loading'] {
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .app-sidebar__pin-btn {
    display: none;
  }

  .app-layout__body {
    flex-direction: column;
    overflow: auto;
  }

  .app-layout__body:has(> .app-main > .project-detail[data-testid='project-detail-page']),
  .app-layout__body:has(> .app-main > .project-detail[data-testid='project-loading']),
  .app-layout__body:has(> .app-main > .projects-page[data-testid='projects-page']) {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .app-sidebar {
    width: 100% !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    gap: 8px;
  }

  .app-sidebar__brand-row {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
  }

  .app-sidebar__brand-row--collapsed {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .app-sidebar__brand-hover {
    flex: 1;
    min-width: 0;
    min-height: 38px;
  }

  .app-sidebar__brand {
    padding: 6px 8px;
  }

  .app-sidebar__brand-mark {
    padding: 6px 8px;
  }

  .app-sidebar__pin-btn.app-sidebar__pin-btn--overlay {
    width: 100%;
    min-height: 38px;
  }

  .app-sidebar__brand-text {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-sidebar__pin-btn:not(.app-sidebar__pin-btn--overlay) {
    width: 34px;
  }

  .app-sidebar__tooltip {
    display: none;
  }

  .app-sidebar__nav {
    flex-direction: row;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 4px;
    min-height: unset;
  }

  .app-sidebar__link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .sidebar-projects {
    display: none;
  }

  .app-sidebar__footer {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
    width: auto;
  }

  .app-sidebar__footer .user-menu__dropdown {
    left: auto;
    right: 0;
    bottom: auto;
    top: calc(100% + 6px);
    transform: none;
    margin-left: 0;
  }

  .app-main {
    flex: none;
    min-height: min-content;
    overflow: visible;
    padding: 20px 16px 40px;
  }

  .app-main:has(> .project-detail[data-testid='project-detail-page']),
  .app-main:has(> .project-detail[data-testid='project-loading']),
  .app-main:has(> .projects-page[data-testid='projects-page']) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
}
.subscription-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  background: var(--color-bg);
  display: flex;
  justify-content: center;
  padding: 48px 24px;
}

.subscription-gate__inner {
  width: 100%;
  max-width: 1320px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.subscription-gate__head {
  text-align: center;
}

.subscription-gate__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.subscription-gate__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.subscription-gate__footer {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.subscription-gate__logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.subscription-gate__logout:hover {
  color: var(--text-primary);
}
/* New-project flow — guided single page. Every configuration option is visible in a
   numbered block (nothing hidden in accordions except rarely-used Advanced options),
   with a sticky "What happens next" rail that sets expectations before the user commits.
   Prefix: .np- */

.np {
  --np-accent: var(--color-primary);
  /* Breathing room between the create button and the bottom of the page. */
  padding-bottom: 72px;
}

/* The form footer's create button is the page's primary action — make it unmissable. */
.np-foot .np-submit {
  height: 48px;
  padding: 0 32px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--np-accent, var(--color-primary)) 35%, transparent);
}

/* Layout: single column, or form + sticky rail */
.np-single {
  max-width: 720px;
  margin: 0 auto;
}
.np-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  max-width: 1060px;
  margin: 0 auto;
}
.np-split__aside {
  position: sticky;
  top: 16px;
}
@media (max-width: 980px) {
  .np-split {
    grid-template-columns: 1fr;
  }
  .np-split__aside {
    position: static;
  }
}

/* Card surface */
.np-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Header block */
.np-block--header {
  border-bottom: 1px solid var(--color-border);
}
.np-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.np-title {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--color-text-primary);
}
.np-lead {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 560px;
}
.np-lead strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.np-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-bottom: 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.np-back:hover {
  color: var(--color-text-primary);
}

/* Agent CTA banner */
.np-agentcta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-brand) 5%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-brand) 22%, transparent);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.np-agentcta--share {
  margin-top: 10px;
}
.np-agentcta:hover {
  background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-brand) 38%, transparent);
}
.np-agentcta__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-brand) 12%, transparent);
  color: var(--color-brand);
}
.np-agentcta__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.np-agentcta__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}
.np-agentcta__action {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brand);
}
.np-agentcta__action svg {
  transition: transform 150ms ease;
}
.np-agentcta:hover .np-agentcta__action svg {
  transform: translateX(2px);
}
@media (max-width: 560px) {
  .np-agentcta {
    flex-wrap: wrap;
  }
  .np-agentcta__action {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Agent prompt modal */
.np-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-scrim);
  animation: np-fade 150ms ease;
}
@keyframes np-fade {
  from {
    opacity: 0;
  }
}
.np-modal {
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 48px);
  /* dvh tracks the mobile browser chrome (URL bar) — with plain vh the modal sizes to the
     larger layout viewport and its footer/scroll area lands off-screen. */
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  animation: np-pop 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes np-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
.np-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
}
.np-modal__heading {
  display: flex;
  gap: 13px;
}
.np-modal__icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-code-bg);
  color: var(--color-code-text);
}
.np-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}
.np-modal__lead {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 52ch;
}
.np-modal__close {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.np-modal__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}
.np-modal__body {
  padding: 0 24px;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.np-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 18px 24px 22px;
}

.np-prompt {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-code-bg);
}
.np-prompt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.np-prompt__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.np-prompt__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.np-prompt__copy:hover {
  background: rgba(255, 255, 255, 0.16);
}
.np-prompt__copy--done {
  color: #86efac;
}
.np-prompt__text {
  margin: 0;
  padding: 16px 18px;
  max-height: 340px;
  overflow-y: auto;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-code-text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Small screens: tighten the chrome and collapse to a single scroller — the fixed-height
   inner <pre> scroller fights the body scroller on touch, so let the prompt grow and the
   modal body scroll it all. */
@media (max-width: 640px) {
  .np-overlay {
    padding: 10px;
  }
  .np-modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .np-modal__head {
    padding: 16px 16px 12px;
  }
  .np-modal__body {
    padding: 0 16px;
  }
  .np-modal__foot {
    padding: 14px 16px 16px;
  }
  .np-prompt__text {
    max-height: none;
    overflow-y: visible;
  }
}

/* Sharing-program modal: numbered how-it-works steps */
.np-sharing-steps {
  margin: 0;
  padding: 2px 0 6px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-primary);
}

/* Numbered section block */
.np-block {
  padding: 20px 24px;
}
.np-block + .np-block {
  border-top: 1px solid var(--color-border-light);
}
.np-block--header + .np-block {
  border-top: none;
}
.np-block__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.np-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.np-block--done .np-step-num {
  background: var(--np-accent);
  border-color: var(--np-accent);
  color: var(--text-on-accent);
}
.np-block__titles {
  flex: 1;
  min-width: 0;
}
.np-block__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.np-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}
.np-block__hint {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 3px;
}
.np-block__field {
  margin-top: 14px;
  padding-left: 36px;
}
@media (max-width: 640px) {
  .np-block {
    padding: 16px;
  }
  .np-block__field {
    padding-left: 0;
  }
}

/* Fields */
.np-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.np-field + .np-field {
  margin-top: 16px;
}
.np-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
}
/* The combined scope block stacks mode buttons, optional area chips, the instructions
   textarea, and a hint — space the textarea and hint off whatever sits above them. */
.np-textarea--scope {
  margin-top: 12px;
}
.np-textarea--scope + .np-field-hint {
  margin-top: 8px;
}

.np-field-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.np-field-hint--spaced {
  margin-top: 8px;
}
.np-field-hint--toggle {
  padding-left: 46px;
}
.np-field-error {
  font-size: 12px;
  color: var(--color-danger);
}

.np-input,
.np-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
  resize: vertical;
  line-height: 1.5;
}
.np-input:hover,
.np-textarea:hover {
  background: var(--color-surface);
}
.np-input:focus,
.np-textarea:focus {
  outline: none;
  border-color: var(--np-accent);
  background: var(--color-surface);
  box-shadow:
    0 0 0 2px var(--color-surface),
    0 0 0 4px color-mix(in srgb, var(--np-accent) 35%, transparent);
}
.np-input:disabled,
.np-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* URL field with leading icon + validity tick */
.np-url-field {
  position: relative;
}
.np-url-field__lead {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}
.np-url-field .np-input {
  padding-left: 36px;
  padding-right: 40px;
}
.np-url-tick {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-status-active);
  opacity: 0;
  transition: opacity 150ms ease;
}
.np-url-field--valid .np-url-tick {
  opacity: 1;
}

/* Name field with auto tag */
.np-name-row {
  position: relative;
}
.np-input--name {
  padding-right: 96px;
}
.np-auto-tag {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
}

/* Scope mode + chips */
.np-scope-mode {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.np-scope-mode__btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all 120ms ease;
}
.np-scope-mode__btn--active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}
.np-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.np-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 120ms ease;
}
.np-chip svg {
  color: var(--color-text-muted);
  transition: color 120ms ease;
}
.np-chip:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 22%, var(--color-border));
  color: var(--color-text-primary);
}
.np-chip--on {
  background: color-mix(in srgb, var(--np-accent) 8%, var(--color-surface));
  border-color: var(--np-accent);
  color: var(--color-text-primary);
}
.np-chip--on svg {
  color: var(--np-accent);
}

/* Polish passes (toggle list) */
.np-passes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.np-pass {
  padding: 6px 0;
}
@media (max-width: 640px) {
  .np-passes {
    grid-template-columns: 1fr;
  }
}
.np-pass__txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.np-pass__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}
.np-pass__desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  font-weight: 400;
}

/* Toggle switch (real checkbox for a11y + tests) */
.np-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  user-select: none;
}
.np-toggle--top {
  align-items: flex-start;
  gap: 14px;
}
.np-toggle--top input[type='checkbox'] {
  margin-top: 2px;
}
.np-toggle input[type='checkbox'] {
  position: relative;
  width: 36px;
  height: 20px;
  appearance: none;
  background: var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease;
  flex-shrink: 0;
}
.np-toggle input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 150ms ease;
}
.np-toggle input[type='checkbox']:checked {
  background: var(--np-accent);
}
.np-toggle input[type='checkbox']:checked::after {
  transform: translateX(16px);
}
.np-toggle:hover input[type='checkbox']:not(:checked) {
  background: color-mix(in srgb, var(--color-text-primary) 18%, var(--color-border));
}

/* Login rows */
.np-logins {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.np-login-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: start;
}
.np-login-row .np-input {
  padding: 8px 11px;
  font-size: 13px;
}
.np-login-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.np-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 120ms ease;
}
.np-icon-btn:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}
.np-add-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  cursor: pointer;
  transition: all 120ms ease;
}
.np-add-row:hover {
  border-color: var(--np-accent);
  color: var(--color-text-primary);
}
.np-login-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
}
@media (max-width: 640px) {
  .np-login-row {
    grid-template-columns: 1fr auto;
  }
  .np-login-row .np-login-field:first-child {
    grid-column: 1 / -1;
  }
}

/* Advanced disclosure (rare options stay out of the numbered flow) */
.np-block--advanced {
  padding-top: 14px;
  padding-bottom: 14px;
}
.np-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.np-advanced-toggle:hover {
  color: var(--color-text-primary);
}
.np-advanced {
  margin-top: 16px;
  padding-left: 22px;
}

/* Errors */
.np-error {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-radius: var(--radius);
  font-size: 13px;
}
.np-error__dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
}
.np-error__dismiss:hover {
  opacity: 1;
}

.np-callout {
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
}
.np-callout__link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Action footer */
.np-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px 24px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}
.np-foot__summary {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.np-foot__summary b {
  color: var(--color-text-primary);
  font-weight: 600;
}
.np-foot__spacer {
  flex: 1;
}
.np-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--np-accent, var(--color-primary));
  color: var(--text-on-accent);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease;
  flex-shrink: 0;
}
.np-submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
}
.np-submit:focus-visible {
  outline: 2px solid var(--np-accent);
  outline-offset: 2px;
}
.np-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .np-foot {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.np-spin {
  animation: np-spin 1s linear infinite;
}
@keyframes np-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* What happens next (expectation-setter rail) */
.np-whn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.np-whn__head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.np-whn__title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
}
.np-whn__title svg {
  color: var(--color-text-secondary);
}
.np-whn__sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 5px;
}
.np-whn__steps {
  padding: 6px 18px 16px;
}
.np-whn-step {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  position: relative;
}
.np-whn-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: -3px;
  width: 1px;
  background: var(--color-border);
}
.np-whn-step__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.np-whn-step__body {
  padding-top: 2px;
}
.np-whn-step__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.np-whn-step__desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}
.np-whn__foot {
  padding: 12px 18px;
  background: var(--color-surface-secondary);
  border-top: 1px solid var(--color-border-light);
  font-size: 12px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
}
.np-whn__foot svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

/* Entrance for revealed blocks */
.np-reveal {
  animation: np-reveal 220ms ease both;
}
@keyframes np-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dashboard {
  padding: 0;
}

@media (max-width: 640px) {
  .dashboard {
    padding: 12px;
  }
}
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.project-list__empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
  font-size: 15px;
}

.project-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--color-text-primary) 22%, var(--color-border));
}

.project-card:has(.project-card__name a:focus-visible) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.project-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card__name a {
  color: inherit;
  text-decoration: none;
}

.project-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-card__name a:focus-visible {
  outline: none;
}

.project-card__url {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card__url:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.project-card__stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-card__stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .project-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .project-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .project-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-card {
    padding: 14px;
    border-radius: 10px;
  }
}
.projects-page {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.projects-page__header {
  flex-shrink: 0;
  margin-bottom: 28px;
}

.projects-page__back {
  margin-bottom: 20px !important;
}

.projects-page__fill {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.projects-page__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  line-height: 1.25;
}

.projects-page__subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 42rem;
}

.projects-page__toolbar {
  flex-shrink: 0;
  padding-bottom: 16px;
  margin-bottom: 0;
  max-width: min(400px, 100%);
  border-bottom: 1px solid var(--color-border-light);
}

.projects-page__list-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.projects-page__search-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.projects-page__search {
  position: relative;
  display: flex;
  align-items: center;
}

.projects-page__search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.projects-page__search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  transition: border-color 150ms ease, background 150ms ease;
}

.projects-page__search-input:hover {
  background: var(--color-surface);
}

.projects-page__search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-surface-secondary), 0 0 0 4px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.projects-page__search-input::placeholder {
  color: var(--color-text-muted);
}

.projects-page__no-results {
  margin: 0;
  padding: 32px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.projects-page__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.projects-page__spinner {
  animation: projects-page-spin 1s linear infinite;
}

@keyframes projects-page-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.projects-page__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
  text-align: center;
}

.projects-page__error p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.projects-page__retry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent, #fafafa);
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.projects-page__retry:hover {
  background: var(--color-primary-hover);
}

.projects-page__retry:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.back-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 8px 18px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.back-nav-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
  border-color: color-mix(in srgb, var(--color-text-primary) 10%, var(--color-border));
}

.back-nav-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.back-nav-btn__icon {
  flex-shrink: 0;
}

.back-nav-btn__label {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .back-nav-btn--compact-sm {
    position: relative;
    padding: 8px 12px;
  }

  .back-nav-btn--compact-sm .back-nav-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
.share-dialog__overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.share-dialog__content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}

.share-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.share-dialog__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary);
}

.share-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: var(--radius);
  cursor: pointer;
}

.share-dialog__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.share-dialog__card-preview {
  margin-bottom: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-secondary);
  /* Reserve the 1200x630 (1.905:1) aspect ratio so the dialog doesn't jump as the image loads. */
  aspect-ratio: 1200 / 630;
}

.share-dialog__card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-dialog__card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.share-dialog__stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.share-dialog__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-secondary);
}

.share-dialog__stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.share-dialog__stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.share-dialog__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.share-dialog__tab {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.share-dialog__tab:hover {
  color: var(--color-text-primary);
}

.share-dialog__tab--active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.08));
}

.share-dialog__preview {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  color: var(--color-text-primary);
  background: var(--color-surface);
  font-family: inherit;
  white-space: pre-wrap;
}

.share-dialog__preview:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.share-dialog__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  min-height: 16px;
}

.share-dialog__count {
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.share-dialog__count--over {
  color: var(--color-danger);
  font-weight: 600;
}

.share-dialog__note {
  font-size: 12px;
  color: var(--color-warning, #b45309);
  margin-left: auto;
}

.share-dialog__make-public {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
}

.share-dialog__make-public:hover:not(:disabled) {
  color: var(--color-primary-hover);
}

.share-dialog__make-public:disabled {
  opacity: 0.6;
  cursor: default;
  text-decoration: none;
}

.share-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.share-dialog__open-btn,
.share-dialog__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.share-dialog__open-btn {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  text-decoration: none;
}

.share-dialog__open-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.share-dialog__copy-btn {
  background: var(--color-primary);
  color: white;
  border: none;
}

.share-dialog__copy-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

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

.share-dialog__open-btn:focus-visible,
.share-dialog__copy-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .share-dialog__tab {
    font-size: 12px;
    padding: 7px 6px;
  }
}
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.project-header__info {
  min-width: 0;
  flex: 1;
}

.project-header__name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}

.project-header__name--editable {
  cursor: pointer;
  border-radius: var(--radius);
  padding: 2px 6px;
  margin-left: -6px;
}

.project-header__name--editable:hover {
  background: var(--color-surface-hover);
}

.project-header__name--editable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.project-header__name-input {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin: 0 0 6px;
  padding: 2px 6px;
  margin-left: -6px;
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  width: 100%;
  outline: none;
  font-family: inherit;
}

.project-header__url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 100%;
}

.project-header__url:hover {
  color: var(--color-text-primary);
}

.project-header__url:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.project-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.project-header__share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.project-header__share-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}

.project-header__delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-danger);
  background: var(--color-danger-bg);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--color-danger);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.project-header__delete-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.project-header__delete-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.project-header__confirm-delete-btn {
  padding: 6px 12px;
  border: none;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.project-header__confirm-delete-btn:hover {
  background: var(--color-danger-hover);
}

.project-header__cancel-delete-btn {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.project-header__cancel-delete-btn:hover {
  background: var(--color-surface-hover);
}

@media (max-width: 640px) {
  .project-header__name {
    font-size: 20px;
  }

  .project-header__name-input {
    font-size: 20px;
  }

  .project-header__url {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}
.tab-navigation {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.tab-navigation__tab {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: -1px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-navigation__tab:hover {
  color: var(--color-text-primary);
  background: color-mix(in srgb, var(--color-surface-secondary) 85%, transparent);
}

.tab-navigation__tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.tab-navigation__tab--active {
  color: var(--color-text-primary);
  font-weight: 600;
  border-bottom-color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .tab-navigation {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
  }

  .tab-navigation__tab {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}
.project-flag-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--color-status-paused) 45%, var(--color-border));
  background: var(--color-status-paused-bg);
}

.project-flag-warning__icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-status-paused);
}

.project-flag-warning__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-flag-warning__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.project-flag-warning__text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.overview-tab {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@keyframes overview-skeleton-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}

.overview-tab__skeleton {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.overview-tab__skeleton-status {
  height: 48px;
  background: var(--color-border);
  border-radius: var(--radius);
  animation: overview-skeleton-pulse 1.5s ease-in-out infinite;
}

.overview-tab__skeleton-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-tab__skeleton-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-tab__skeleton-card-stats {
  display: flex;
  gap: 12px;
}

.overview-tab__skeleton-text {
  background: var(--color-border);
  border-radius: var(--radius-sm);
  animation: overview-skeleton-pulse 1.5s ease-in-out infinite;
}

.overview-tab__skeleton-text--icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
}

.overview-tab__skeleton-text--label {
  width: 100px;
  height: 16px;
  flex: 1;
  max-width: 100px;
  animation-delay: 0.1s;
}

.overview-tab__skeleton-text--count {
  width: 32px;
  height: 22px;
  margin-left: auto;
  animation-delay: 0.2s;
}

.overview-tab__skeleton-text--bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  animation-delay: 0.3s;
}

.overview-tab__skeleton-text--stat {
  width: 80px;
  height: 14px;
  animation-delay: 0.4s;
}

.overview-tab__skeleton-summary {
  height: 44px;
  background: var(--color-border);
  border-radius: var(--radius);
  animation: overview-skeleton-pulse 1.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* Status sentence */
.overview-tab__status-sentence {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.overview-tab__status-sentence--active {
  background: var(--color-status-in-progress-bg);
  color: var(--color-text-primary);
}

.overview-tab__status-sentence--idle {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
}

.overview-tab__status-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.overview-tab__status-sentence--active .overview-tab__status-icon {
  color: var(--color-status-in-progress);
}

.overview-tab__status-sentence--idle .overview-tab__status-icon {
  color: var(--color-status-active);
}

@keyframes overview-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.overview-tab__status-icon--spin {
  animation: overview-spin 1.5s linear infinite;
}

/* Cards grid */
.overview-tab__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.overview-tab__card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.overview-tab__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-tab__card--clickable {
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.overview-tab__card-link:hover .overview-tab__card--clickable {
  border-color: var(--color-text-muted);
  box-shadow: var(--shadow-card-hover);
}

.overview-tab__card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-tab__card-icon {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.overview-tab__card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  flex: 1;
}

.overview-tab__card-count {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Progress bar */
.overview-tab__bar-track {
  height: 6px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius-pill);
  overflow: hidden;
  display: flex;
}

.overview-tab__bar-empty {
  flex: 1;
}

.overview-tab__bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 300ms ease;
}

.overview-tab__bar-fill--completed {
  background: var(--color-status-active);
}

.overview-tab__bar-fill--pending {
  background: var(--color-status-in-progress);
}

/* Stats row */
.overview-tab__card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 42px;
}

.overview-tab__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.overview-tab__stat-icon--spin {
  animation: overview-spin 1.5s linear infinite;
}

.overview-tab__stat--pending {
  color: var(--color-status-in-progress);
}

.overview-tab__stat--completed {
  color: var(--color-status-active-text);
}

.overview-tab__stat--failed {
  color: var(--color-danger);
}

.overview-tab__stat--bugs {
  color: var(--color-danger);
}

.overview-tab__stat--empty {
  color: var(--color-text-muted);
}

/* Summary */
.overview-tab__summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
}

.overview-tab__summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.overview-tab__summary-item svg {
  color: var(--color-text-muted);
}

.overview-tab__summary-count {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 16px;
}

.overview-tab__summary-label {
  color: var(--color-text-secondary);
}

.overview-tab__bug-breakdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.overview-tab__bug-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.overview-tab__bug-tag--open {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.overview-tab__bug-tag--reopened {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.overview-tab__bug-tag--resolved {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.overview-tab__bug-tag--rejected {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.overview-tab__status-sentence--waiting {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-text-primary);
}

.overview-tab__status-sentence--link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.overview-tab__status-sentence--link:hover {
  background: rgba(239, 68, 68, 0.14);
}

.overview-tab__status-sentence--waiting .overview-tab__status-icon {
  color: #b91c1c;
}

.overview-tab__status-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--color-text-secondary);
  opacity: 0.6;
  transition: opacity 0.12s;
}

.overview-tab__status-sentence--link:hover .overview-tab__status-chevron {
  opacity: 1;
}

/* Reverse proxy status */
.overview-tab__proxy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
}

.overview-tab__proxy--pending {
  border-color: color-mix(in srgb, var(--color-status-in-progress) 45%, var(--color-border));
  background: var(--color-status-in-progress-bg);
}

.overview-tab__proxy--ready {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border-color: color-mix(in srgb, var(--color-status-active) 40%, var(--color-border));
  background: var(--color-status-active-bg, var(--color-surface-secondary));
}

.overview-tab__proxy-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-tab__proxy-icon {
  flex-shrink: 0;
  color: var(--color-status-in-progress);
}

.overview-tab__proxy--ready .overview-tab__proxy-icon {
  color: var(--color-status-active);
}

.overview-tab__proxy-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.overview-tab__proxy-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.overview-tab__proxy-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-status-in-progress);
  background: color-mix(in srgb, var(--color-status-in-progress) 16%, transparent);
}

.overview-tab__proxy-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.overview-tab__proxy-text--muted {
  color: var(--color-text-muted);
  font-style: italic;
}

.overview-tab__proxy-text code,
.overview-tab__proxy-steps code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
  color: var(--color-text-primary);
  word-break: break-all;
}

/* Capability-flag warning (e.g. source maps missing). Amber, mirrors the proxy banner layout. */
.overview-tab__proxy-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.overview-tab__proxy-icon--spin {
  animation: overview-spin 1.5s linear infinite;
}

.overview-tab__proxy-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.overview-tab__proxy-link:hover {
  text-decoration: underline;
}

.overview-tab__proxy-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.overview-tab__proxy-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.overview-tab__proxy-copy:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.overview-tab__proxy-actions {
  margin-top: 4px;
}

.overview-tab__proxy-copy--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
}

.overview-tab__proxy-copy--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: white;
}

.overview-tab__proxy-code {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-primary);
  white-space: pre;
  overflow-x: auto;
}

.overview-tab__proxy-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-status-in-progress);
}

/* Charts */
.overview-tab__charts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overview-tab__chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.overview-tab__chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* Top open bugs list */
.overview-tab__bug-list {
  display: flex;
  flex-direction: column;
}

.overview-tab__bug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--color-surface-secondary);
  text-decoration: none;
  transition: background 0.12s;
}

.overview-tab__bug-row:last-child {
  border-bottom: none;
}

.overview-tab__bug-row:hover {
  background: var(--color-surface-hover);
}

.overview-tab__bug-severity {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.overview-tab__bug-severity--critical {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-severity-critical);
}

.overview-tab__bug-severity--high {
  background: rgba(249, 115, 22, 0.15);
  color: var(--color-severity-high);
}

.overview-tab__bug-severity--medium {
  background: rgba(234, 179, 8, 0.15);
  color: var(--color-severity-medium);
}

.overview-tab__bug-severity--low {
  background: rgba(107, 114, 128, 0.15);
  color: var(--color-severity-low);
}

.overview-tab__bug-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-tab__bug-kind {
  font-size: 11px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.overview-tab__bug-arrow {
  color: var(--color-text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}

.overview-tab__bug-row:hover .overview-tab__bug-arrow {
  opacity: 1;
}

@media (max-width: 900px) {
  .overview-tab__bug-kind {
    display: none;
  }
}

@media (max-width: 640px) {
  .overview-tab__cards {
    grid-template-columns: 1fr;
  }

  .overview-tab__card-stats {
    gap: 8px;
  }
}

/* Setup pipeline — interim view while the first exploration runs */
.ov-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.ov-setup__lead {
  text-align: center;
  padding: 12px 0 10px;
}

.ov-setup__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.ov-setup__sub {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-top: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.ov-setup__stage {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.ov-setup__stage--active {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  box-shadow: var(--shadow-card-hover);
}

/* Live exploration replay embedded in the setup pipeline's Exploration card — the same
   TaskEventReplay preview the Explorations tab shows, so users watch the agent browse
   without leaving the overview. The player styles itself; this just insets it from the
   card edges to line up with the stage head. */
.ov-setup__preview {
  padding: 0 18px 16px;
}

.ov-setup__stage-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
}

.ov-setup__stage-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-surface-secondary);
  color: var(--color-text-muted);
  transition: all 200ms ease;
}

.ov-setup__stage--active .ov-setup__stage-icon {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  color: var(--color-primary);
}

.ov-setup__stage-main {
  flex: 1;
  min-width: 0;
}

.ov-setup__stage-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
}

.ov-setup__stage-metric {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
}

.ov-setup__stage-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.45;
}

.ov-setup__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.ov-setup__state--queued {
  color: var(--color-text-muted);
}

.ov-setup__state--running {
  color: var(--color-status-in-progress);
}

.ov-setup__disc {
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-secondary);
  padding: 6px 18px 12px 65px;
  display: flex;
  flex-direction: column;
}

.ov-setup__disc-empty {
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 8px 0;
}

.ov-setup__disc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 13px;
  animation: ov-setup-fade 220ms ease;
}

.ov-setup__disc-item:last-child {
  border-bottom: none;
}

.ov-setup__disc-item > svg {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.ov-setup__disc-name {
  color: var(--color-text-primary);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-setup__disc-device {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ov-setup__disc-pending {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes ov-setup-fade {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .ov-setup__disc {
    padding-left: 18px;
  }
  .ov-setup__disc-device {
    display: none;
  }
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.pagination__btn:hover:not(:disabled) {
  background: var(--color-border-light);
}

.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.pagination__info {
  font-size: 13px;
  color: var(--color-text-muted);
}
/* Compact inline replay preview shown on Journeys/Explorations rows, to the right of the
   description and vertically centered. Sized to a fixed thumbnail box plus a play button. */
.row-preview {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.row-preview__frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  /* No border on the frame itself — a thumbnail image fills the box edge-to-edge and a border would
     draw a line around the image (which we don't want). The empty/loading placeholder states below
     re-add their own border so an image-less slot still reads as a defined box. */
  /* Match the skeleton/placeholder surface so the lazy mount doesn't flash from the near-white
     skeleton to a dark box before the thumbnail loads. Theme-aware via the surface variable
     (the old hardcoded #0b0b0f was a leftover from the removed dark rrweb player stage). */
  background: var(--color-surface-secondary);
  flex-shrink: 0;
}

.row-preview__scaler {
  position: absolute;
  top: 0;
  left: 0;
}

/* rrweb injects an iframe inside .replayer-wrapper; let it size to the recording. */
.row-preview__player .replayer-wrapper {
  margin: 0;
}

/* Server-computed preview frame: fills the box; object-fit (cover/contain) is set inline per call. */
.row-preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Frame indicator dots shown while hovering a multi-frame preview. */
.row-preview__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.row-preview__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

.row-preview__dot.is-active {
  background: #fff;
}

.row-preview__empty,
.row-preview__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-secondary, #9ca3af);
  text-align: center;
  padding: 4px;
  /* Image-less states keep a border so the empty/loading slot still reads as a box; the border was
     removed from .row-preview__frame so it never draws around an actual thumbnail image. */
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

/* Distinguish "still loading" (spinner) from "no preview" (static text). */
.row-preview__spinner {
  animation: row-preview-spin 0.8s linear infinite;
}

/* Spinner shown over the latest frame while the full frame set downloads on hover. Sits on a faint
   scrim so it stays visible over any thumbnail, without hiding the preview underneath. */
.row-preview__hover-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
}

.row-preview__hover-spinner svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

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

/* Shown if the rrweb preview chunk fails to load (e.g. a stale chunk after a deploy). Keeps the
   row intact instead of letting the failure blank the page. */
.row-preview__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 165px;
  height: 95px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
  font-size: 11px;
  color: var(--color-text-secondary, #9ca3af);
  text-align: center;
  padding: 4px;
}

/* Placeholder while the row is off-screen or the rrweb chunk is loading — keeps the row height
   stable so nothing jumps when the real preview mounts. */
.row-preview__skeleton {
  width: 165px;
  height: 95px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: linear-gradient(90deg, var(--color-surface-secondary) 25%, var(--color-surface-hover, var(--color-surface)) 37%, var(--color-surface-secondary) 63%);
}
.journeys-tab {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.journeys-tab__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 4px;
}

.journeys-tab__total {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.journeys-tab__empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

@keyframes journeys-skeleton-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}

.journeys-tab__skeleton {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.journeys-tab__skeleton-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.journeys-tab__skeleton-filters {
  display: flex;
  gap: 6px;
}

.journeys-tab__skeleton-text {
  background: var(--color-border);
  border-radius: var(--radius-sm);
  animation: journeys-skeleton-pulse 1.5s ease-in-out infinite;
}

.journeys-tab__skeleton-text--count {
  width: 80px;
  height: 14px;
}

.journeys-tab__skeleton-text--filter {
  width: 60px;
  height: 28px;
  border-radius: 6px;
  animation-delay: 0.1s;
}

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

.journeys-tab__skeleton-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 12px;
}

.journeys-tab__skeleton-text--name {
  width: 200px;
  height: 16px;
  animation-delay: 0.2s;
}

.journeys-tab__skeleton-text--stats {
  width: 140px;
  height: 14px;
  animation-delay: 0.3s;
}

.journeys-tab__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.journeys-tab__error button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 0.8125rem;
}

.journeys-tab__global-variables {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-secondary);
}

.journeys-tab__global-variables-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem 0;
}

.journeys-tab__variable-tag--global {
  background: var(--color-surface);
}

.journeys-tab__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Video-tile grid: each journey is a card with a replay thumbnail on top. Cards link to the
   journey page; the thumbnail heroes into the detail replay via a view transition. */
.journeys-tab__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 16px;
}

.journeys-tab__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.journeys-tab__card:hover {
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.journeys-tab__card:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
}

.journeys-tab__card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #0b0b0f;
  overflow: hidden;
}

.journeys-tab__card-media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary, #9ca3af);
}

.journeys-tab__card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
}

.journeys-tab__card-titlerow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journeys-tab__card-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journeys-tab__card-titlerow .journeys-tab__status-icon {
  flex-shrink: 0;
}

.journeys-tab__card-bug {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-brand);
}

.journeys-tab__card-bug--resolved {
  color: var(--color-status-active);
}

.journeys-tab__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.journeys-tab__card-children {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.journeys-tab__journey {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.journeys-tab__journey-header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-border);
}

/* Inline replay preview sits to the right of the journey name, vertically centered. Its fixed
   thumbnail height makes the row thicker when a recording exists. */
.journeys-tab__journey-header .row-preview {
  align-self: center;
  padding: 8px 12px;
}

@media (max-width: 640px) {
  .journeys-tab__journey-header {
    flex-direction: column;
  }
}

.journeys-tab__journey-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: none;
  background: var(--color-surface);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  color: var(--color-text-primary);
}

.journeys-tab__journey-toggle:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__journey-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 10px 12px;
  border-left: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
}

.journeys-tab__journey-tools-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.journeys-tab__journey-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  row-gap: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--color-text-secondary);
}

.journeys-tab__journey-stat {
  white-space: nowrap;
}

.journeys-tab__journey-stat--inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.journeys-tab__journey-stat-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.journeys-tab__journey-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.journeys-tab__journey-name {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journeys-tab__status-icon--completed {
  color: var(--color-status-active);
}

.journeys-tab__status-icon--failed {
  color: var(--color-danger);
}

.journeys-tab__status-icon--in-progress {
  color: var(--color-status-paused);
  animation: spin 1.5s linear infinite;
}

.journeys-tab__status-icon--queued {
  color: var(--color-text-muted);
}

.journeys-tab__status-icon--incomplete {
  color: var(--color-status-incomplete);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .journeys-tab__journey-tools {
    border-left: none;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .journeys-tab__journey-tools-group {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

.journeys-tab__journey-desc {
  padding: 0 0 10px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  border: none;
  background: transparent;
}

.journeys-tab__source-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 0 0 10px;
}

.journeys-tab__source-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.journeys-tab__source-link a:hover {
  text-decoration: underline;
}

.journeys-tab__instructions {
  padding: 0;
}

.journeys-tab__instructions-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.journeys-tab__instructions-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.journeys-tab__instructions-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
}

/* Compact expanded summary */
.journeys-tab__journey-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journeys-tab__journey-summary-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.journeys-tab__journey-summary-main .journeys-tab__journey-desc,
.journeys-tab__journey-summary-main .journeys-tab__source-link {
  padding: 0;
}

.journeys-tab__journey-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journeys-tab__flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.journeys-tab__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.journeys-tab__edit-btn:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  color: var(--color-primary, #2563eb);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.journeys-tab__page-link:hover {
  background: var(--color-surface-hover);
}

/* Edit panel */
.journeys-tab__edit-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journeys-tab__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.journeys-tab__field-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.journeys-tab__field-input,
.journeys-tab__field-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.journeys-tab__field-textarea {
  resize: vertical;
}

.journeys-tab__field-input:focus,
.journeys-tab__field-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.journeys-tab__edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.journeys-tab__edit-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.journeys-tab__edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.journeys-tab__save-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.journeys-tab__save-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

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

.journeys-tab__cancel-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.journeys-tab__cancel-btn:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__run-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--text-on-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.journeys-tab__run-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.journeys-tab__run-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.journeys-tab__delete-journey-btn {
  margin-left: auto;
}

.journeys-tab__actions {
  padding: 12px 14px;
  border-top: 1px solid var(--color-border);
}

.journeys-tab__section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 8px;
}

.journeys-tab__actions-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journeys-tab__action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-primary);
}

.journeys-tab__action-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.journeys-tab__action-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.journeys-tab__action-aside {
  flex-shrink: 0;
  max-width: min(280px, 46%);
}

.journeys-tab__action-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.journeys-tab__action--failed {
  border-left: 2px solid var(--color-danger);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

.journeys-tab__action-error {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 0.25rem;
}

.journeys-tab__action-desc {
  flex: 0 1 auto;
  color: var(--color-text-primary);
  font-weight: 500;
}

.journeys-tab__checks {
  width: 100%;
  list-style: none;
  padding: 2px 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.journeys-tab__check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.journeys-tab__check-assertion {
  font-size: 10px;
  color: var(--color-text-tertiary);
  background: var(--color-bg-secondary);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

@media (max-width: 520px) {
  .journeys-tab__action-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .journeys-tab__action-aside {
    max-width: none;
  }

  .journeys-tab__action-details {
    justify-content: flex-start;
  }
}

.journeys-tab__variables {
  padding: 12px 14px;
  border-top: 1px solid var(--color-border);
}

.journeys-tab__variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journeys-tab__variable-tag {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  color: var(--color-text-primary);
  background: var(--color-surface);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.journeys-tab__action-details {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: flex-end;
}

.journeys-tab__action-selector {
  font-size: 11px;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}

.journeys-tab__action-value {
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  font-style: italic;
}

.journeys-tab__action-var {
  font-size: 0.6875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  color: var(--color-text-secondary);
}

/* Bug banner shown when expanding a journey with an associated bug */
.journeys-tab__bug-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface));
  color: var(--color-brand);
  font-size: 13px;
}

.journeys-tab__bug-banner--resolved {
  background: color-mix(in srgb, var(--color-status-active) 8%, var(--color-surface));
  color: var(--color-status-active);
}

.journeys-tab__bug-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.journeys-tab__bug-banner-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.journeys-tab__bug-banner-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.journeys-tab__bug-banner-title {
  font-weight: 500;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journeys-tab__bug-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.journeys-tab__bug-banner-link:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* Run error banner shown above steps when error doesn't map to a specific step */
.journeys-tab__run-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent);
  color: var(--color-danger);
  font-size: 12px;
  line-height: 1.4;
}

.journeys-tab__run-error-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.journeys-tab__versions {
  border-top: 1px solid var(--color-border);
}

.journeys-tab__replay-section {
  border-top: 1px solid var(--color-border);
  padding: 0.75rem;
}

.journeys-tab__versions-empty {
  border-top: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem 0.75rem;
}

.journeys-tab__version {
  border-top: 1px solid var(--color-border);
}

.journeys-tab__version:first-child {
  border-top: none;
}

.journeys-tab__version--current {
  background: var(--color-surface);
}

.journeys-tab__version-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  color: var(--color-text-primary);
}

@media (max-width: 560px) {
  .journeys-tab__version-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .journeys-tab__version-meta {
    justify-self: start;
  }
}

.journeys-tab__version-header-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.journeys-tab__version-header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.journeys-tab__version-header:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__version-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.journeys-tab__version-current-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-on-accent);
  background: var(--color-primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.journeys-tab__version-run-info {
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journeys-tab__version-run-info--completed {
  color: var(--color-status-active);
}

.journeys-tab__version-run-info--failed {
  color: var(--color-brand);
}

.journeys-tab__version-run-info--in-progress {
  color: var(--color-status-paused);
}

.journeys-tab__version-run-info--none {
  color: var(--color-text-muted);
}

.journeys-tab__version-run-info--resolved {
  color: var(--color-status-active);
}

.journeys-tab__version-error {
  color: var(--color-text-secondary);
  font-style: italic;
}

.journeys-tab__version-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.journeys-tab__version-content {
  padding: 0 14px 14px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-secondary);
}

.journeys-tab__version-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-danger);
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.journeys-tab__version-delete-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.journeys-tab__runs {
  padding: 8px 0 0;
}

.journeys-tab__runs > .journeys-tab__section-title {
  margin-bottom: 6px;
}

.journeys-tab__no-runs {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 6px 0 0;
}

.journeys-tab__runs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}

.journeys-tab__runs-table th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
  vertical-align: middle;
}

.journeys-tab__runs-table td {
  padding: 10px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.journeys-tab__runs-table th:last-child,
.journeys-tab__runs-table td:last-child {
  text-align: right;
}

.journeys-tab__runs-table tbody tr:last-child td {
  border-bottom: none;
}

.journeys-tab__run-row {
  cursor: pointer;
}

.journeys-tab__run-row:hover {
  background: var(--color-surface-secondary);
}

.journeys-tab__run-date {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.journeys-tab__run-duration {
  font-variant-numeric: tabular-nums;
}

.journeys-tab__replay-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.75rem;
}

.journeys-tab__replay-link:hover {
  text-decoration: underline;
}

/* Bug link — Replay rose for open bugs */
.journeys-tab__bug-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-brand) 14%, var(--color-surface));
  color: var(--color-brand);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.15s;
}

.journeys-tab__bug-link:hover {
  background: color-mix(in srgb, var(--color-brand) 24%, var(--color-surface));
}

.journeys-tab__bug-link:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
  border-radius: 4px;
}

.journeys-tab__bug-link--resolved {
  background: var(--color-status-active-bg);
  color: var(--color-status-active);
}

.journeys-tab__bug-link--resolved:hover {
  background: color-mix(in srgb, var(--color-status-active) 22%, transparent);
}

.journeys-tab__bug-link--resolved:focus-visible {
  outline-color: var(--color-status-active);
}

.journeys-tab__bug-resolved-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Context labels for multiplayer journeys */
.journeys-tab__contexts {
  padding: 12px 14px;
  border-top: 1px solid var(--color-border);
}

.journeys-tab__context-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journeys-tab__context-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.journeys-tab__action-context {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.journeys-tab__recording-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
  width: 100%;
}

/* Viewport filter */
.journeys-tab__viewport-filter {
  display: flex;
  gap: 2px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
  padding: 2px;
}

.journeys-tab__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.journeys-tab__filter-btn:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__filter-btn--active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-weight: 600;
  box-shadow: none;
  border: 1px solid var(--color-border);
}

/* Mobile toggle in expanded journey */
.journeys-tab__journey-settings {
  padding: 10px 14px 12px 48px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
}

.journeys-tab__delete-journey-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--color-danger);
  background: var(--color-danger-bg);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-danger);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.journeys-tab__delete-journey-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.journeys-tab__confirm-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.journeys-tab__confirm-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.journeys-tab__confirm-btn--yes {
  border: none;
  background: var(--color-danger);
  color: white;
}

.journeys-tab__confirm-btn--yes:hover {
  background: var(--color-danger-hover);
}

.journeys-tab__confirm-btn--no {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.journeys-tab__confirm-btn--no:hover {
  background: var(--color-surface-hover);
}

.journeys-tab__children {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--color-border);
}

.journeys-tab__children .journeys-tab__section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.journeys-tab__children-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--color-border);
}

.journeys-tab__child-journey {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.journeys-tab__child-journey .journeys-tab__journey-header {
  border-bottom: none;
}

.journeys-tab__child-journey .journeys-tab__journey-toggle {
  padding: 8px 12px;
  font-size: 13px;
}

.journeys-tab__child-journey .journeys-tab__journey-desc {
  padding: 0 12px 8px;
}

.journeys-tab__child-journey .journeys-tab__actions {
  padding: 0 12px 12px;
}

.journeys-tab__children-loading {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  padding: 8px 0;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* Default variant - project status */
.status-badge--default-active {
  background: var(--color-status-active-bg);
  color: var(--color-status-active);
}

.status-badge--default-paused {
  background: var(--color-status-paused-bg);
  color: var(--color-status-paused);
}

.status-badge--default-completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-active-text);
}

.status-badge--default-failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
}

.status-badge--default-in-progress {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
}

.status-badge--default-unresolved {
  background: var(--color-status-paused-bg);
  color: var(--color-status-paused);
}

/* Severity variant */
.status-badge--severity-critical {
  background: var(--color-severity-critical-bg);
  color: var(--color-severity-critical);
}

.status-badge--severity-high {
  background: var(--color-severity-high-bg);
  color: var(--color-severity-high);
}

.status-badge--severity-medium {
  background: var(--color-severity-medium-bg);
  color: var(--color-severity-medium);
}

.status-badge--severity-low {
  background: var(--color-severity-low-bg);
  color: var(--color-severity-low);
}

/* Bug status variant */
.status-badge--bug-open {
  background: var(--color-bug-open-bg);
  color: var(--color-bug-open);
}

.status-badge--bug-fixed {
  background: var(--color-bug-fixed-bg);
  color: var(--color-bug-fixed);
}

.status-badge--bug-wontfix {
  background: var(--color-bug-wontfix-bg);
  color: var(--color-bug-wontfix);
}

.status-badge--bug-invalid {
  background: var(--color-bug-invalid-bg);
  color: var(--color-bug-invalid);
}

.status-badge--bug-reopened {
  background: var(--color-bug-reopened-bg);
  color: var(--color-bug-reopened);
}

.status-badge--bug-judge-rejected {
  background: var(--color-severity-high-bg);
  color: var(--color-severity-high);
}
.guidance-update {
  display: inline-flex;
}

.guidance-update__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.guidance-update__trigger:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-light);
}

.guidance-update__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.guidance-update__dialog {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 480px;
  max-width: 90vw;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.guidance-update__dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.guidance-update__dialog-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.guidance-update__close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.guidance-update__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
}

.guidance-update__description {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.guidance-update__textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: vertical;
  box-sizing: border-box;
}

.guidance-update__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.guidance-update__error {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 8px;
}

.guidance-update__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.guidance-update__cancel {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.guidance-update__cancel:hover {
  background: var(--color-surface-hover);
}

.guidance-update__submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.guidance-update__submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

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

.guidance-update__spinner {
  animation: guidance-update-spin 1s linear infinite;
}

@keyframes guidance-update-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.guidance-update__success {
  font-size: 13px;
  color: var(--color-text-primary);
  padding: 16px 0;
  text-align: center;
  line-height: 1.5;
}

.guidance-update__progress-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
}

.guidance-update__progress-link:hover {
  text-decoration: underline;
}

.guidance-update__retrigger {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  cursor: pointer;
}

.guidance-update__retrigger input {
  margin-top: 2px;
  cursor: pointer;
}
.bug-report {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: min-content;
}

.bug-report__sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  margin: 0 0 16px;
  padding: 14px 16px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px -10px color-mix(in srgb, var(--color-text-primary) 22%, transparent);
}

.bug-report__sticky-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
}

.bug-report__sticky-toolbar .back-nav-btn {
  justify-self: start;
}

.bug-report__delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: end;
  margin: 0;
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bug-report__delete-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.bug-report__delete-btn:focus-visible {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .bug-report__delete-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

.bug-report__mobile-sidebar {
  display: none;
}

@media (max-width: 768px) {
  .bug-report__mobile-sidebar {
    display: block;
    margin-bottom: 8px;
  }
}

.bug-report__scroll-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bug-report__title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.bug-report__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.bug-report__copy-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.bug-report__copy-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-report__severity-wrapper {
  position: relative;
  flex-shrink: 0;
  margin-top: 6px;
}

.bug-report__badge-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.bug-report__badge-btn:hover {
  opacity: 0.85;
}

.bug-report__badge-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-report__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  z-index: 50;
  padding: 6px;
  min-width: 128px;
}

.bug-report__dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
}

.bug-report__dropdown-item:hover,
.bug-report__dropdown-item:focus-visible {
  background: var(--color-surface-secondary);
}

.bug-report__dropdown-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.bug-report__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  cursor: pointer;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  margin: 0;
  line-height: 1.25;
}

.bug-report__title:hover,
.bug-report__title:focus-visible {
  color: var(--color-primary);
}

.bug-report__title:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.bug-report__title-edit {
  flex: 1;
}

.bug-report__title-input {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.bug-report__title-input:focus {
  border-color: var(--color-primary);
}

.bug-report__title-input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-report__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bug-report__section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  overflow: hidden;
}

.bug-report__section h2 {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.bug-report__section p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-primary);
  margin: 0;
}

.bug-report__editable-text {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}

.bug-report__editable-text:hover,
.bug-report__editable-text:focus-visible {
  background: var(--color-surface-secondary);
  margin: -4px;
  padding: 4px;
}

.bug-report__editable-text:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.bug-report__empty-text {
  color: var(--color-text-muted);
  font-style: italic;
}

.bug-report__steps {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--color-text-primary);
  margin: 0;
}

.bug-report__behavior-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .bug-report__behavior-grid {
    grid-template-columns: 1fr;
  }

  .bug-report__title {
    font-size: 20px;
  }

  .bug-report__title-input {
    font-size: 20px;
  }

  .bug-report__section {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .bug-report__section {
    padding: 12px 14px;
  }
}

.bug-report__section--expected {
  border-left: 3px solid var(--color-status-completed);
}

.bug-report__section--actual {
  border-left: 3px solid var(--color-danger);
}

.bug-report__edit-input,
.bug-report__edit-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  font-family: inherit;
  resize: vertical;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.bug-report__edit-input:focus,
.bug-report__edit-textarea:focus {
  border-color: var(--color-primary);
}

.bug-report__edit-input:focus-visible,
.bug-report__edit-textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-report__validation-error {
  display: block;
  color: var(--color-danger);
  font-size: 12px;
  margin-top: 6px;
}

/* Evidence banner */
.bug-report__evidence-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.bug-report__spinner {
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Causal chain */
.bug-report__chain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chain-step;
}

.bug-report__chain-step {
  counter-increment: chain-step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
}

.bug-report__chain-step:last-child {
  margin-bottom: 0;
}

.bug-report__chain-step::before {
  content: counter(chain-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bug-report__chain-step p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-primary);
  margin: 0;
}

/* Chronology of events */
.bug-report__chronology-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chronology-step;
}

.bug-report__chronology-step {
  counter-increment: chronology-step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 18px;
  border-left: 1px solid var(--color-border-light);
  padding-bottom: 4px;
}

.bug-report__chronology-step:last-child {
  margin-bottom: 0;
  border-left-color: transparent;
}

.bug-report__chronology-step::before {
  content: counter(chronology-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bug-report__chronology-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-primary);
  margin: 0 0 8px;
}

.bug-report__chronology-screenshot {
  margin: 8px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 100%;
}

.bug-report__chronology-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  background: var(--color-surface-secondary);
}

/* Video walkthrough */
.bug-report__video-container {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
}

.bug-report__video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
  background: var(--color-surface-hover);
}

/* Screenshot evidence — the still-image alternative to the video walkthrough. The container is
   position:relative so the highlight box (positioned in % via inline styles) overlays the image. */
.bug-report__screenshot-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface-hover);
  line-height: 0;
}

.bug-report__screenshot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
}

.bug-report__screenshot-box {
  position: absolute;
  border: 2px solid var(--color-danger, #ef4444);
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
  pointer-events: none;
}

/* Evidence panel */
.evidence-panel {
  margin-top: 14px;
  border-top: 1px solid var(--color-border-light);
  padding-top: 12px;
}

.evidence-panel__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.evidence-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--color-surface);
}

.evidence-item:last-child {
  margin-bottom: 0;
}

.evidence-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--color-surface-secondary);
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-primary);
  text-align: left;
  transition: background 0.12s ease;
}

.evidence-item__header:hover {
  background: var(--color-surface-hover);
}

.evidence-item__header:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.evidence-item__tool {
  font-weight: 600;
  font-family: monospace;
  font-size: 12px;
}

.evidence-item__body {
  padding: 10px 12px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-secondary);
}

.evidence-item__params,
.evidence-item__result {
  margin-bottom: 10px;
}

.evidence-item__params:last-child,
.evidence-item__result:last-child {
  margin-bottom: 0;
}

.evidence-item__params-label,
.evidence-item__result-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.evidence-item__params code {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--color-text-primary);
}

.evidence-item__result pre {
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--color-text-primary);
  font-family: monospace;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

/* Judge Assessment Section */
/* Unconfirmed warning banner (shown at the top of the report) */
.bug-report__unconfirmed {
  margin-bottom: 16px;
}

.bug-report__unconfirmed-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-warning, #e5a00d) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-warning, #e5a00d) 38%, transparent);
  color: var(--color-text-primary);
  font: inherit;
  cursor: pointer;
}

.bug-report__unconfirmed-banner:hover {
  background: color-mix(in srgb, var(--color-warning, #e5a00d) 18%, transparent);
}

.bug-report__unconfirmed-icon {
  flex-shrink: 0;
  color: var(--color-warning, #b45309);
}

.bug-report__unconfirmed-text {
  font-size: 14px;
  font-weight: 600;
}

.bug-report__unconfirmed-expand {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.bug-report__unconfirmed-review {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.bug-report__unconfirmed-review .bug-report__judge-history-label {
  margin-bottom: 10px;
}

.bug-report__section--judge {
  border-left: 3px solid var(--color-primary);
}

.bug-report__section--judge h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bug-report__judge-verdict {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
}

.bug-report__judge-verdict--approved {
  background: var(--color-status-completed-bg);
  border-color: color-mix(in srgb, var(--color-status-completed) 28%, var(--color-border));
}

.bug-report__judge-verdict--rejected {
  background: var(--color-danger-bg);
  border-color: color-mix(in srgb, var(--color-danger) 30%, var(--color-border));
}

.bug-report__judge-verdict-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.bug-report__judge-verdict--approved .bug-report__judge-verdict-icon {
  color: var(--color-status-completed);
}

.bug-report__judge-verdict--rejected .bug-report__judge-verdict-icon {
  color: var(--color-danger);
}

.bug-report__judge-verdict-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-primary);
}

.bug-report__judge-verdict-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.bug-report__judge-assessment-text {
  margin: 6px 0 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-primary);
  font-weight: normal;
}

.bug-report__judge-problems {
  list-style: disc;
  padding-left: 20px;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.bug-report__judge-problems li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.bug-report__judge-history {
  border-top: 1px solid var(--color-border-light);
  padding-top: 14px;
}

.bug-report__judge-history-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.bug-report__judge-attempt {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  background: var(--color-surface);
}

.bug-report__judge-attempt:last-child {
  margin-bottom: 0;
}

.bug-report__judge-attempt--approved {
  border-left: 3px solid var(--color-status-completed);
}

.bug-report__judge-attempt--rejected {
  border-left: 3px solid var(--color-danger);
}

.bug-report__judge-attempt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bug-report__judge-attempt-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.bug-report__judge-attempt-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid transparent;
}

.bug-report__judge-attempt-badge--approved {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border-color: color-mix(in srgb, var(--color-status-completed) 25%, var(--color-border));
}

.bug-report__judge-attempt-badge--rejected {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 28%, var(--color-border));
}

.bug-report__judge-attempt-time {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Judge phase results (evidence / requirements) */
.bug-report__judge-phase {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bug-report__judge-phase-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bug-report__judge-phase-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.bug-report__judge-phase-badge--passed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border-color: color-mix(in srgb, var(--color-status-completed) 25%, var(--color-border));
}

.bug-report__judge-phase-badge--failed {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 28%, var(--color-border));
}

/* Submitted analysis in judge history */
.bug-report__submitted-analysis {
  margin-top: 8px;
}

.bug-report__submitted-analysis-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary, #6c8cff);
  cursor: pointer;
  padding: 0;
}

.bug-report__submitted-analysis-toggle:hover {
  text-decoration: underline;
}

.bug-report__submitted-analysis-content {
  margin-top: 8px;
  padding: 10px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bug-report__submitted-analysis-field {
  margin-bottom: 10px;
}

.bug-report__submitted-analysis-field:last-child {
  margin-bottom: 0;
}

.bug-report__submitted-analysis-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}

.bug-report__submitted-analysis-field p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.5;
}

.bug-report__submitted-analysis-chronology {
  margin: 4px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--color-text-primary);
}

.bug-report__submitted-analysis-chronology li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.bug-report__submitted-analysis-screenshot {
  display: block;
  max-width: 400px;
  max-height: 200px;
  margin-top: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bug-report__footer-actions {
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 16px;
}
.bug-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
}

/* Round the outer cells so the table corners follow the wrapper's rounded
   border now that the wrapper no longer clips with overflow: hidden (which
   would otherwise cut off the open status dropdown). */
.bug-table thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.bug-table thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.bug-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

.bug-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

.bug-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
  vertical-align: middle;
}

.bug-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.bug-table__row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.bug-table__row:hover td {
  background: var(--color-surface-secondary);
}

.bug-table__title {
  font-weight: 500;
  color: var(--color-text-primary);
}

.bug-table__date {
  color: var(--color-text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.bug-table__kind {
  color: var(--color-text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-transform: capitalize;
}


.bug-table__run {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-family: monospace;
}

.bug-table__tooltip-wrapper {
  display: inline-flex;
}

.bug-table__status-cell {
  position: relative;
}

.bug-table__status-trigger {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s;
}

.bug-table__status-trigger:hover {
  border-color: var(--color-border);
}

.bug-table__status-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-table__status-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  z-index: 50;
  padding: 4px;
  min-width: 140px;
}

.bug-table__status-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.bug-table__status-option:hover {
  background: var(--color-surface-secondary);
}

.bug-table__status-option--active {
  background: var(--color-surface-secondary);
}

.bug-table__status-option:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.bug-table__send-webhook-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 0;
  border-radius: var(--radius-sm);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bug-table__send-webhook-btn:hover:not(:disabled) {
  color: var(--color-primary);
}

.bug-table__send-webhook-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-table__send-webhook-btn:disabled {
  color: var(--color-text-muted);
  cursor: default;
  text-decoration: none;
}

.bug-table-loading,
.bug-table-empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--color-text-muted);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .bug-table__col-discovered {
    display: none;
  }
}

@media (max-width: 768px) {
  .bug-table__col-run,
  .bug-table__col-kind {
    display: none;
  }
}

@media (max-width: 480px) {
  .bug-table thead {
    display: none;
  }

  .bug-table__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    align-items: center;
  }

  .bug-table__row td {
    border-bottom: none;
    padding: 0;
  }

  .bug-table__row td.bug-table__title {
    flex-basis: 100%;
  }

  .bug-table__row td.bug-table__col-discovered,
  .bug-table__row td.bug-table__col-run {
    display: none;
  }
}
.status-filter {
  position: relative;
}

.status-filter__controls {
  display: flex;
  align-items: stretch;
}

.status-filter__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.status-filter__trigger:hover {
  border-color: var(--color-primary);
}

.status-filter__trigger--active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  border-top-left-radius: var(--radius-pill);
  border-bottom-left-radius: var(--radius-pill);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.status-filter__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--radius-pill);
  border-bottom-right-radius: var(--radius-pill);
  color: var(--color-primary);
}

.status-filter__clear:hover {
  background: var(--color-primary);
  color: white;
}

.status-filter__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  z-index: 50;
  padding: 4px;
}

.status-filter__option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--color-text-primary);
  border-radius: 6px;
}

.status-filter__option:hover {
  background: var(--color-surface-hover);
}

.status-filter__option--selected {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 500;
}
.severity-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.severity-sort:hover {
  background: var(--color-surface-hover);
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
}

.severity-sort:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.severity-sort--asc {
  background: var(--color-primary-light);
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  color: var(--color-primary);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.modal-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  color: var(--color-text-primary);
  background: var(--color-surface);
}

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

.modal-textarea::placeholder {
  color: var(--color-text-muted);
}

.modal-error {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-danger);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal-btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.modal-btn--cancel {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.modal-btn--cancel:hover:not(:disabled) {
  background: var(--color-surface-hover);
}

.modal-btn--submit {
  background: var(--color-primary);
  color: white;
}

.modal-btn--submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.modal-btn--submit:focus-visible,
.modal-btn--cancel:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.bug-list-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bug-list-tab__controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.bug-list-tab__table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.bug-list-tab__resolved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bug-list-tab__resolved-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.bug-list-tab__resolved-toggle--active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.bug-list-tab__resolved-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-list-tab__copy-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bug-list-tab__copy-all-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

.bug-list-tab__copy-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bug-list-tab__copy-all-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-list-tab__missing-bug-wrapper {
  margin-left: auto;
}

/* Highlighted accent button so the "Missing Bug" call-to-action stands out on the page. */
.bug-list-tab__missing-bug-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-brand);
  background: var(--color-brand);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-brand) 35%, transparent);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.bug-list-tab__missing-bug-btn:hover {
  background: color-mix(in srgb, var(--color-brand) 88%, #000);
  border-color: color-mix(in srgb, var(--color-brand) 88%, #000);
  color: #ffffff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-brand) 45%, transparent);
}

.bug-list-tab__missing-bug-btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Explanatory text shown in the report modal describing what happens and that it's free. */
.missing-bug-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0 0 14px;
}

.missing-bug-intro strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Confirmation text shown after a missing-bug report is submitted (in the modal). */
.missing-bug-done {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.bug-list-tab__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.bug-list-tab__error p {
  margin: 0;
  font-size: 14px;
}

.bug-list-tab__error button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
}

.bug-list-tab__error button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .bug-list-tab__delete-all-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .bug-list-tab__delete-all-btn {
    width: 100%;
    justify-content: center;
  }

  .bug-list-tab__confirm-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .bug-list-tab__confirm-btn {
    width: 100%;
    justify-content: center;
  }
}
.processing {
  padding: 0;
}

.processing__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.processing__header--settings {
  margin-bottom: 16px;
  align-items: flex-start;
}

.processing__subsection {
  margin-bottom: 20px;
}

.processing__subsection:last-child {
  margin-bottom: 0;
}

.processing__title-block {
  min-width: 0;
}

.processing__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.processing__subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.45;
  max-width: 36rem;
}

.processing__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.processing__config {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.processing__config-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.processing__config-btn:hover:not(:disabled) {
  background: var(--color-surface-hover);
}

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

.processing__config-value {
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text-primary);
  min-width: 24px;
  text-align: center;
}

.processing__refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.processing__refresh-btn--compact {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  gap: 0;
}

.processing__history-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.processing__history-link:hover {
  background: var(--color-surface-hover);
}

.processing__history-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.processing__refresh-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

.processing__section {
  margin-bottom: 32px;
}

.processing__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 12px;
}

.processing__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  margin-left: 4px;
}

.processing__empty {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 24px;
  text-align: center;
  background: var(--color-surface-secondary);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.processing__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.processing__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.processing__card--running {
  border-left: 3px solid var(--color-status-in-progress);
}

.processing__card--clickable:hover {
  background: var(--color-bg-hover);
}

.processing__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.processing__card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.processing__card-status--running {
  color: var(--color-status-in-progress);
}

.processing__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-status-in-progress);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.processing__container-name {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: monospace;
}

.processing__card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.processing__card-field {
  display: flex;
  gap: 8px;
  font-size: 13px;
}

.processing__card-label {
  color: var(--color-text-muted);
  min-width: 64px;
  flex-shrink: 0;
}

.processing__card-value {
  color: var(--color-text-primary);
  font-weight: 500;
}

.processing__card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
}

.processing__card-link:hover {
  text-decoration: underline;
}

.processing__card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.processing__table-wrap {
  overflow: hidden;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.processing__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.processing__table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
  vertical-align: middle;
}

.processing__table td {
  padding: 10px 12px;
  color: var(--color-text-primary);
  vertical-align: middle;
}

.processing__queue-row:not(:last-child) td {
  border-bottom: 1px solid var(--color-border-light);
}

.processing__queue-pos {
  width: 40px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.processing__queue-time {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.processing__queue-actions {
  width: 40px;
  text-align: center;
}

.processing__delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

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

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

.processing__loading {
  padding: 48px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.processing__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.processing__retry-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.processing__spawn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.processing__spawn-btn:hover {
  background: var(--color-primary-hover);
}

.processing__spawn-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.processing__retry-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.processing__retry-btn:hover {
  background: var(--color-primary-hover);
}

@media (max-width: 640px) {
  .processing {
    padding: 12px;
  }

  .processing__title {
    font-size: 20px;
  }

  .processing__cards {
    grid-template-columns: 1fr;
  }
}
.members-loading {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 12px 0;
}

.members-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.members-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  background: var(--color-surface);
}

.members-list__info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.members-list__email {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.members-list__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.members-list__badge--owner {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
}

.members-list__badge--pending {
  background: var(--color-status-paused-bg);
  color: var(--color-status-paused);
  border-color: color-mix(in srgb, var(--color-status-paused) 22%, var(--color-border));
}

.members-list__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.members-list__remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-danger);
  background: var(--color-danger-bg);
  border-radius: var(--radius);
  color: var(--color-danger);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.members-list__remove-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.members-list__remove-btn:focus-visible {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
}

.members-list__confirm {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.members-list__confirm button {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--color-text-secondary);
}

.members-list__confirm button:hover {
  background: var(--color-surface-hover);
}

.members-list__confirm-btn {
  background: var(--color-danger) !important;
  color: white !important;
  border-color: var(--color-danger) !important;
}

.members-list__confirm-btn:hover {
  background: var(--color-danger-hover) !important;
  border-color: var(--color-danger-hover) !important;
}

.members-invite {
  margin-top: 4px;
}

.members-invite__error {
  font-size: 13px;
  color: var(--color-danger);
  margin-top: 8px;
}
.project-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.settings-section--danger {
  border-color: var(--color-danger);
}

.settings-section__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.processing__header--settings .settings-section__title {
  margin-bottom: 0;
}

.settings-section__title--danger {
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-section__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
}

.settings-section__select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  transition: border-color 150ms ease, background 150ms ease;
  cursor: pointer;
  min-width: 220px;
}

.settings-section__select:hover {
  background: var(--color-surface);
}

.settings-section__select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.settings-section__select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: var(--color-surface-hover);
}

.settings-section__field {
  margin-bottom: 12px;
}

.settings-section__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.settings-section__field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.settings-section__field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.settings-section__field input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.settings-section__input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.settings-section__input-row input {
  flex: 1;
  min-width: 0;
}

.settings-section__test-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.settings-section__test-btn:hover {
  background: var(--color-surface-hover);
}

.settings-section__test-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.settings-section__test-result {
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.45;
}

.settings-section__test-result--success {
  color: var(--color-status-active);
}

.settings-section__test-result--error {
  color: var(--color-danger);
}

.settings-section__save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-section__save-btn:hover {
  background: var(--color-primary-hover);
}

.settings-section__save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.settings-section__save-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.settings-section__frequency-options {
  display: flex;
  gap: 6px;
}

.settings-section__freq-btn {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}

.settings-section__freq-btn:hover {
  background: var(--color-surface-hover);
}

.settings-section__freq-btn--active {
  background: var(--color-primary);
  color: var(--text-on-accent);
  border-color: var(--color-primary);
}

.settings-section__delete-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.settings-section__delete-btn:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: var(--text-on-accent);
}

.settings-section__delete-btn:focus-visible {
  outline: 2px solid var(--color-danger);
  outline-offset: 2px;
}

.settings-section__delete-confirm p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.settings-section__delete-error {
  color: var(--color-danger) !important;
}

.settings-section__delete-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-section__delete-actions button {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.settings-section__delete-actions button:hover {
  background: var(--color-surface-hover);
}

.settings-section__confirm-delete-btn {
  background: var(--color-danger) !important;
  color: white !important;
  border-color: var(--color-danger) !important;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.settings-section__confirm-delete-btn:hover {
  background: var(--color-danger-hover) !important;
  border-color: var(--color-danger-hover) !important;
}

.settings-section__toggle-field {
  margin-bottom: 12px;
}

.settings-section__toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.settings-section__toggle-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.settings-section__toggle-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.settings-section__toggle-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  margin-left: 24px;
  line-height: 1.5;
}

.settings-section__radio-field {
  border: none;
  padding: 0;
  margin: 0 0 12px;
}

.settings-section__radio-legend {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.settings-section__radio-label {
  display: grid;
  grid-template-columns: 16px auto;
  gap: 4px 8px;
  align-items: baseline;
  cursor: pointer;
  padding: 4px 0;
}

.settings-section__radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
  margin: 0;
  grid-row: 1;
}

.settings-section__radio-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  grid-column: 2;
}

.settings-section__radio-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  grid-column: 2;
  line-height: 1.5;
}

.settings-section__setup-instructions {
  margin-top: 20px;
  border-top: 1px solid var(--color-border-light);
  padding-top: 16px;
}

.settings-section__setup-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.settings-section__service-guide {
  margin-bottom: 16px;
}

.settings-section__service-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.settings-section__guide-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0 0 8px;
}

.settings-section__steps {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding-left: 20px;
  margin: 0;
  line-height: 1.5;
}

.settings-section__steps li {
  margin-bottom: 4px;
}

.settings-section__steps code {
  background: var(--color-surface-secondary);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.settings-section__payload-info {
  margin-bottom: 0;
}

.settings-section__payload-info p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.55;
}

.settings-section__payload-example {
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  font-size: 12px;
  overflow-x: auto;
  margin: 0;
}

.settings-section__payload-example code {
  font-family: var(--font-mono, ui-monospace, monospace);
}

.settings-section__docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.settings-section__docs-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: bottom;
}

.settings-section__docs-table td {
  padding: 10px 12px 10px 0;
  color: var(--color-text-secondary);
  vertical-align: top;
  border-bottom: 1px solid var(--color-border-light);
  line-height: 1.45;
}

.settings-section__docs-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-section__docs-table code {
  font-size: 12px;
}

/* Reverse Proxy Events timeline */

.rp-events__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.rp-events__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rp-events__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-light);
}

.rp-events__item:last-child {
  border-bottom: none;
}

.rp-events__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
}

.rp-events__icon--up,
.rp-events__icon--connect {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.rp-events__icon--down,
.rp-events__icon--disconnect {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.rp-events__label {
  flex: 1;
  min-width: 0;
  color: var(--color-text-primary);
}

.rp-events__detail {
  color: var(--color-text-secondary);
}

.rp-events__time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--color-text-tertiary, var(--color-text-secondary));
  white-space: nowrap;
}

@media (max-width: 640px) {
  .settings-section {
    padding: 16px;
  }

  .settings-section__input-row {
    flex-direction: column;
  }

  .settings-section__frequency-options {
    flex-wrap: wrap;
  }

  .settings-section__delete-actions {
    flex-wrap: wrap;
  }
}
.explorations-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.explorations-tab__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.explorations-tab__new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.explorations-tab__new-btn:hover {
  background: var(--color-primary-hover);
}

.explorations-tab__new-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.explorations-tab__loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.explorations-tab__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.explorations-tab__error button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
}

.explorations-tab__empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-secondary);
}

/* Single exploration view. Capped to the same width as the journey detail hero
   (.journey-detail, max-width 920px) so a lone exploration's rrweb preview doesn't
   stretch across the full panel. */
.explorations-tab__single {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 920px;
}

.explorations-tab__single-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.explorations-tab__single-prompt {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.explorations-tab__single-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.explorations-tab__single-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explorations-tab__single-meta-item dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.explorations-tab__single-meta-item dd {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.explorations-tab__single-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.explorations-tab__single-link:hover {
  text-decoration: underline;
}

/* Cards grid (multiple explorations) */
.explorations-tab__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 16px;
}

.explorations-tab__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.explorations-tab__card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.explorations-tab__card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.explorations-tab__card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #0b0b0f;
  overflow: hidden;
}

.explorations-tab__card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
}

.explorations-tab__card-titlerow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.explorations-tab__card-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.explorations-tab__card-titlerow .explorations-tab__status {
  flex-shrink: 0;
}

.explorations-tab__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.explorations-tab__card-metaitem {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.explorations-tab__card-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.explorations-tab__status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.explorations-tab__status--queued {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.explorations-tab__status--in-progress {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
  border-color: color-mix(in srgb, var(--color-status-in-progress) 22%, var(--color-border));
}

.explorations-tab__status--completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border-color: color-mix(in srgb, var(--color-status-completed) 25%, var(--color-border));
}

.explorations-tab__status--failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
  border-color: color-mix(in srgb, var(--color-status-failed) 25%, var(--color-border));
}

/* Modal */
.explorations-tab__modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.explorations-tab__modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 480px;
  max-width: 90vw;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-float);
}

.explorations-tab__modal h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.explorations-tab__modal-field {
  margin-bottom: 16px;
}

.explorations-tab__modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.explorations-tab__modal-field textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.explorations-tab__modal-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.explorations-tab__modal-field input[type='number'] {
  width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
  font-size: 14px;
}

.explorations-tab__modal-field input[type='number']:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.explorations-tab__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.explorations-tab__modal-cancel {
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-primary);
  font-size: 14px;
  cursor: pointer;
}

.explorations-tab__modal-cancel:hover {
  background: var(--color-surface-hover);
}

.explorations-tab__modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.explorations-tab__modal-submit:hover {
  background: var(--color-primary-hover);
}

.explorations-tab__modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.explorations-tab__create-error {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--color-danger-bg);
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
  border-radius: var(--radius);
  color: var(--color-danger);
  font-size: 13px;
}
.polish-tab {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.polish-tab__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.polish-tab__refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.polish-tab__refresh-btn:hover {
  background: var(--color-surface-hover);
}

.polish-tab__refresh-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.polish-tab__loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.polish-tab__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.polish-tab__error button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
}

.polish-tab__empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-secondary);
}

/* Table */
.polish-tab__table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.polish-tab__table {
  width: 100%;
  border-collapse: collapse;
}

.polish-tab__th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-secondary);
  vertical-align: middle;
}

.polish-tab__th--toggle {
  width: 36px;
  padding-left: 10px;
  padding-right: 4px;
}

.polish-tab__th--num {
  text-align: right;
  width: 88px;
}

.polish-tab__th--status {
  width: 128px;
}

.polish-tab__th--date {
  width: 1%;
  white-space: nowrap;
}

.polish-tab__td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-primary);
  vertical-align: middle;
}

.polish-tab__td--toggle {
  width: 36px;
  text-align: center;
  color: var(--color-text-muted);
}

.polish-tab__td--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.polish-tab__td--date {
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.polish-tab__journey {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.polish-tab__status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.polish-tab__status--pending {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.polish-tab__status--in-progress {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
  border-color: color-mix(in srgb, var(--color-status-in-progress) 22%, var(--color-border));
}

.polish-tab__status--completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border-color: color-mix(in srgb, var(--color-status-completed) 25%, var(--color-border));
}

.polish-tab__status--failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
  border-color: color-mix(in srgb, var(--color-status-failed) 25%, var(--color-border));
}

/* Row styles */
.polish-tab__row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.polish-tab__row:hover {
  background: var(--color-surface-secondary);
}

/* Group rows (test run level) */
.polish-tab__row--group {
  font-weight: 500;
}

.polish-tab__row--group.polish-tab__row--expanded {
  background: var(--color-surface-secondary);
}

.polish-tab__row--group.polish-tab__row--expanded > .polish-tab__td {
  border-bottom-color: var(--color-border);
}

/* Nested task rows */
.polish-tab__row--task {
  background: var(--color-surface-secondary);
}

.polish-tab__row--task:hover {
  background: var(--color-surface-hover);
}

.polish-tab__td--task-icon {
  padding-left: 14px;
}

.polish-tab__td--task-name {
  padding-left: 20px;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-primary);
}

/* Loading row inside expanded group */
.polish-tab__row--loading .polish-tab__td {
  background: var(--color-surface-secondary);
}

.polish-tab__loading-inline {
  font-size: 13px;
  color: var(--color-text-muted);
  padding-left: 20px;
}

/* Status icons in table rows */
.polish-tab__status-icon--completed { color: var(--color-status-completed); }
.polish-tab__status-icon--failed { color: var(--color-status-failed); }
.polish-tab__status-icon--in-progress {
  color: var(--color-status-in-progress);
  animation: polish-spin 1s linear infinite;
}
.polish-tab__status-icon--pending { color: var(--color-text-muted); }

@keyframes polish-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Row arrow */
.polish-tab__row-arrow {
  color: var(--color-text-muted);
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.polish-tab__row:hover .polish-tab__row-arrow {
  opacity: 1;
}

.polish-tab__row-arrow--visible {
  opacity: 0.4;
}

.polish-tab__row:hover .polish-tab__row-arrow--visible {
  opacity: 1;
}

.polish-tab__date-text {
  vertical-align: middle;
}

@media (max-width: 720px) {
  .polish-tab__table-wrap {
    overflow-x: auto;
  }

  .polish-tab__table {
    min-width: 640px;
  }
}
.project-detail {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.project-detail__update-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-radius: var(--radius);
  font-size: 14px;
}

.project-detail__masthead {
  flex-shrink: 0;
  margin-bottom: 20px;
  background: var(--color-surface-secondary);
}

.project-detail__sheet {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-detail__sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.project-detail__sheet-scroll .tab-navigation {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 0;
  padding: 0 4px 0 12px;
  gap: 2px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 6px 14px -10px color-mix(in srgb, var(--color-text-primary) 28%, transparent);
}

.project-detail__sheet-scroll .tab-navigation__tab {
  padding-left: 14px;
  padding-right: 14px;
}

.project-detail__readonly-banner {
  padding: 8px 16px;
  background: var(--color-warning-bg, #fef3cd);
  color: var(--color-warning-text, #856404);
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.project-detail__panel {
  padding: 20px 20px 24px;
}

.project-detail__sheet--inactive .project-detail__skeleton-tabs {
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

.project-detail__skeleton-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-detail__back {
  margin-bottom: 16px;
}

.project-detail__error {
  padding: 48px;
  text-align: center;
  color: var(--color-text-muted);
}

.project-detail__error-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.project-detail__error button {
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-detail__error-back-btn {
  background: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border) !important;
}

.project-detail__error button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.project-detail__update-error button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}

.project-detail__skeleton-back {
  width: 140px;
  height: 16px;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.project-detail__skeleton-header {
  margin-bottom: 20px;
}

.project-detail__skeleton-title {
  width: 260px;
  height: 28px;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.project-detail__skeleton-url {
  width: 200px;
  height: 14px;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

.project-detail__skeleton-tabs {
  width: 100%;
  height: 44px;
  background: var(--color-border);
  margin: 0;
  border-radius: 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

.project-detail__skeleton-block {
  width: 100%;
  height: 120px;
  background: var(--color-border);
  border-radius: var(--radius);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  animation-delay: 0.3s;
}

.project-detail__skeleton-block--short {
  width: 70%;
  height: 80px;
  animation-delay: 0.4s;
}

@media (max-width: 640px) {
  .project-detail {
    padding: 12px;
  }

  .project-detail__loading,
  .project-detail__error {
    padding: 32px;
  }

  .project-detail__panel {
    padding: 16px 14px 20px;
  }

  .project-detail__back {
    margin-bottom: 12px;
  }
}
/* Responsive 16:9 box that establishes the cover's size; the cover fills it absolutely so the
   shared-layout morph has a stable frame to animate to. */
.journey-hero__sizer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* No-replay placeholder box (loading / none / restricted): a 16:9 frame carrying the same
   `layoutId` as the grid card so the shared-layout morph still has a stable target. */
.journey-hero__cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b0b0f;
  border: 1px solid var(--color-border);
}

.journey-hero__cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inline player: rendered directly (no click-to-play cover), sized to the recording. */
.journey-hero__player-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}
.status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-indicator--completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-active-text);
}

.status-indicator--failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
}

.status-indicator--in-progress {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
  animation: pulse-status 2s ease-in-out infinite;
}

.status-indicator--incomplete {
  background: var(--color-status-incomplete-bg);
  color: var(--color-status-incomplete);
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.status-indicator__tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  font-size: 12px;
  font-weight: 400;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: var(--shadow-float);
  pointer-events: none;
  z-index: 10;
}

.status-indicator__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-primary);
}
.journey-detail {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* `.app-main > *` (AppShell.css) sets `flex: 0 1 auto`, so when this page is taller than the
   viewport the flex column SHRINKS it to the available height. Its children then overflow the
   collapsed box (the page scrolls via `.app-main`), which parks this page's own `padding-bottom`
   mid-scroll instead of at the end — so scrolling to the bottom leaves zero breathing room below
   the last version. Pinning the page to its content height puts the bottom padding back at the
   true end of the scroll. Higher specificity than `.app-main > *` so it wins regardless of order. */
.app-main > .journey-detail {
  flex-shrink: 0;
}

.journey-detail__breadcrumb {
  font-size: 13px;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__breadcrumb a {
  color: var(--color-primary, #2563eb);
  text-decoration: none;
}

.journey-detail__breadcrumb a:hover {
  text-decoration: underline;
}

.journey-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.journey-detail__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.journey-detail__title-icon {
  color: var(--color-primary, #2563eb);
  flex-shrink: 0;
}

.journey-detail__title {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  color: var(--color-text);
  word-break: break-word;
}

.journey-detail__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.journey-detail__run-btn,
.journey-detail__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--color-border);
}

.journey-detail__run-btn {
  background: var(--color-primary, #2563eb);
  color: #fff;
  border-color: var(--color-primary, #2563eb);
}

.journey-detail__run-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.journey-detail__edit-btn {
  background: var(--color-surface);
  color: var(--color-text);
}

.journey-detail__edit-btn:hover {
  background: var(--color-surface-secondary);
}

.journey-detail__flags {
  display: flex;
  gap: 8px;
}

.journey-detail__flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary, #6b7280);
  border: 1px solid var(--color-border);
}

.journey-detail__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journey-detail__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
}

.journey-detail__instructions {
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.journey-detail__instructions-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 4px;
}

.journey-detail__instructions p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}

.journey-detail__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.journey-detail__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.journey-detail__muted {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__versions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journey-detail__version {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journey-detail__version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.journey-detail__version-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.journey-detail__version-latest {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-primary-soft, rgba(37, 99, 235, 0.12));
  color: var(--color-primary, #2563eb);
}

.journey-detail__version-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.journey-detail__version-time,
.journey-detail__run-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__version-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
}

.journey-detail__version-source {
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
  display: flex;
  align-items: center;
  gap: 4px;
}

.journey-detail__version-source a {
  color: var(--color-primary, #2563eb);
  text-decoration: none;
}

.journey-detail__version-source a:hover {
  text-decoration: underline;
}

.journey-detail__version-runs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.journey-detail__version-no-runs {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__run-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface-secondary);
  text-decoration: none;
  color: var(--color-text);
}

.journey-detail__run-row:hover {
  border-color: var(--color-primary, #2563eb);
}

.journey-detail__run-bugs {
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
}

.journey-detail__run-arrow {
  margin-left: auto;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__error {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-secondary, #9ca3af);
}

.journey-detail__skeleton {
  border-radius: 8px;
  background: var(--color-surface-secondary);
}

.journey-detail__skeleton--title {
  height: 32px;
  width: 50%;
}

.journey-detail__skeleton--block {
  height: 180px;
}

/* The cover-photo banner at the top of the page, holding the latest-run replay. The grid→cover morph
   and the cover→lightbox expansion are driven by Framer Motion shared-layout animations (see
   JourneyReplayHero), so this box stays a plain, unclipped container — clipping/transforms here would
   interfere with the morph. */
.journey-detail__cover {
  border-radius: 10px;
}

/* Loading shimmer shown inside the cover box while the replay is still being fetched. The box itself
   (with its shared `layoutId`) is already mounted, so the open/close morph plays regardless. */
.journey-detail__cover-shimmer {
  position: absolute;
  inset: 0;
  background: var(--color-surface-secondary);
  animation: journey-cover-shimmer 1.5s ease-in-out infinite;
}

@keyframes journey-cover-shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.6; }
}

/* Centered message inside the cover box when there's no replay to show (no runs yet / sign-in
   required). */
.journey-detail__cover-msg {
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary, #9ca3af);
}

/* Child-journey tiles: compact links to each child's own journey page. */
.journey-detail__children {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.journey-detail__child-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
}

.journey-detail__child-row:hover {
  border-color: var(--color-primary, #2563eb);
}

.journey-detail__child-icon {
  color: var(--color-text-secondary, #9ca3af);
  flex-shrink: 0;
}

.journey-detail__child-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Embedded `/p/*` views render run rows as static (no task-detail route to link to). */
.journey-detail__run-row--static {
  cursor: default;
}

.journey-detail__run-row--static:hover {
  border-color: var(--color-border);
}

.source-link-card {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.source-link-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 13px;
}

.source-link-card__link:hover {
  text-decoration: underline;
}

.source-link-card__text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.source-link-card__popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 240px;
  max-width: 340px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-link-card__popover-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.source-link-card__popover-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.source-link-card__popover-label {
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 10px;
  min-width: 56px;
  flex-shrink: 0;
}

.source-link-card__popover-value {
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-link-card__popover-link {
  color: var(--color-primary);
  text-decoration: none;
}

.source-link-card__popover-link:hover {
  text-decoration: underline;
}
.leave-feedback {
  display: block;
}

.leave-feedback__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.leave-feedback__trigger:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-light);
}

.leave-feedback__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.leave-feedback__dialog {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 480px;
  max-width: 90vw;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.leave-feedback__dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.leave-feedback__dialog-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.leave-feedback__close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.leave-feedback__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
}

.leave-feedback__description {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.leave-feedback__textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: vertical;
  box-sizing: border-box;
}

.leave-feedback__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.leave-feedback__error {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 8px;
}

.leave-feedback__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.leave-feedback__cancel {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.leave-feedback__cancel:hover {
  background: var(--color-surface-hover);
}

.leave-feedback__submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.leave-feedback__submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

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

.leave-feedback__spinner {
  animation: leave-feedback-spin 1s linear infinite;
}

@keyframes leave-feedback-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.leave-feedback__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-primary);
  padding: 16px 0;
  text-align: center;
  line-height: 1.5;
}

.leave-feedback__done {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.leave-feedback__done:hover {
  background: var(--color-primary-hover);
}
.replay-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  color: var(--color-brand);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.replay-link__lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.replay-link__id {
  font-family: var(--font-mono, 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.replay-link:hover {
  color: var(--color-brand);
}

.replay-link:hover .replay-link__lead {
  text-decoration: underline;
}

.replay-link:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (max-width: 640px) {
  .replay-link {
    font-size: 13px;
  }

  .replay-link__id {
    font-size: 12px;
  }
}
.bug-metadata {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bug-metadata h2 {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}

.bug-metadata__status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bug-metadata__badge-wrapper {
  flex-shrink: 0;
}

.bug-metadata__dropdown-wrapper {
  position: relative;
  flex: 1;
}

.bug-metadata__dropdown-btn {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
}

.bug-metadata__dropdown-btn:hover {
  border-color: var(--color-primary);
}

.bug-metadata__dropdown-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-metadata__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  z-index: 50;
  padding: 6px;
}

.bug-metadata__dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--color-text-primary);
  cursor: pointer;
}

.bug-metadata__dropdown-item:hover,
.bug-metadata__dropdown-item:focus-visible {
  background: var(--color-surface-secondary);
}

.bug-metadata__dropdown-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.bug-metadata__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.bug-metadata__list dd {
  margin: 0;
}

.bug-metadata__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  min-width: 0;
}

.bug-metadata__icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.bug-metadata__label {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 500;
  min-width: 72px;
  flex-shrink: 0;
}

.bug-metadata__value {
  color: var(--color-text-primary);
  flex: 1;
  min-width: 0;
}

.bug-metadata__value--muted {
  color: var(--color-text-muted);
  font-style: italic;
}

.bug-metadata__link {
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bug-metadata__link:hover {
  text-decoration: underline;
  align-items: flex-start;
}

.bug-metadata__recordings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.bug-metadata__recording-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-secondary);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.bug-metadata__recording-context {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Replay.io links: neutral chrome in sidebar; ID wraps on its own row (see ReplayLink) */
.bug-metadata .replay-link {
  font-size: 13px;
  color: var(--color-primary);
}

.bug-metadata .replay-link:hover {
  color: var(--color-primary-hover);
}

.bug-metadata .replay-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.bug-metadata__send-webhook-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bug-metadata__send-webhook-btn:hover:not(:disabled) {
  color: var(--color-primary);
}

.bug-metadata__send-webhook-btn:disabled {
  color: var(--color-text-muted);
  cursor: default;
  text-decoration: none;
}

.bug-metadata__feedback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 640px) {
  .bug-metadata {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .bug-metadata {
    padding: 12px;
  }

  .bug-metadata__item {
    flex-wrap: wrap;
  }

  .bug-metadata__label {
    min-width: 0;
  }
}
.guidance-deps {
  margin-top: 20px;
}

.guidance-deps__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.guidance-deps__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guidance-deps__item {
  display: inline-flex;
}

.guidance-deps__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  background: var(--color-info-muted-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  text-decoration: none;
}

.guidance-deps__link:hover {
  background: var(--color-info-muted-bg-hover);
  text-decoration: none;
}

.guidance-deps__key {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 500;
}

.guidance-deps__version {
  color: var(--color-text-muted);
  font-size: 11px;
}
.bug-detail {
  padding: 0;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

@media (max-width: 768px) {
  .bug-detail {
    flex: none;
    min-height: auto;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .bug-detail {
    padding: 12px;
  }
}

.bug-detail__actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.bug-detail__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.bug-detail__error-message {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin: 0;
}

.bug-detail__error-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.bug-detail__retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.bug-detail__retry-btn:hover {
  background: var(--color-primary-hover);
}

.bug-detail__retry-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bug-detail__mutation-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid color-mix(in srgb, var(--color-danger) 28%, var(--color-border));
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.bug-detail__skeleton-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.bug-detail__skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.bug-detail__skeleton-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bug-detail__skeleton-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton {
  background: var(--color-border-light);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton--text {
  height: 14px;
}

.skeleton--title {
  width: 60%;
  height: 18px;
}

.skeleton--badge {
  width: 56px;
  height: 22px;
  border-radius: var(--radius-lg);
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.bug-detail__layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
}

@media (max-width: 768px) {
  .bug-detail__layout {
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: visible;
    min-height: auto;
    flex: none;
  }

  .bug-detail__main {
    overflow: visible;
    min-height: auto;
  }

  .bug-detail__sidebar {
    display: none;
  }
}

.bug-detail__main {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bug-detail__main .project-flag-warning {
  margin-bottom: 16px;
}

.bug-detail__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 2px;
}

.breadcrumb__sep {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb__text {
  color: var(--color-text-secondary);
}
.task-detail {
  padding: 0 0 48px;
  max-width: 900px;
}

/* Header: icon + title + status badge + extra badges */
.task-detail__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.task-detail__icon {
  display: inline-flex;
  color: var(--color-primary);
}

.task-detail__title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Meta row of label/value pairs (see <MetaItem>) */
.task-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.task-detail__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-detail__meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.task-detail__meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

/* Sections + collapsible section toggle (shared with LogsSection classPrefix="task-detail") */
.task-detail__section {
  margin-bottom: 24px;
}

.task-detail__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}

.task-detail__section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.task-detail__section-toggle:hover {
  color: var(--color-text);
}

.task-detail__empty {
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 16px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

/* Logs (LogsSection classPrefix="task-detail") */
.task-detail__logs {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px;
}

.task-detail__log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-mono, monospace);
}

.task-detail__log-entry:hover {
  background: var(--color-bg);
}

.task-detail__log-time {
  color: var(--color-text-secondary);
  flex-shrink: 0;
  min-width: 70px;
}

.task-detail__log-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.task-detail__log-badge--error {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.task-detail__log-message {
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

/* Footer action bar */
.task-detail__footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Loading / error / not-found states */
.task-detail__state {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 32px;
}

.task-detail__state--error {
  color: var(--color-danger, #dc2626);
}

.task-detail__state-message {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

.task-detail__state-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface-secondary, var(--color-bg-secondary));
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}

.task-detail__state-btn:hover {
  background: var(--color-surface-hover, var(--color-bg-secondary));
}

.task-detail__state-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.task-detail__state-back:hover {
  text-decoration: underline;
}

/* Skeleton placeholder */
.task-detail__skeleton-back,
.task-detail__skeleton-title,
.task-detail__skeleton-badge,
.task-detail__skeleton-row {
  background: linear-gradient(
    90deg,
    var(--color-surface-secondary, #eee) 25%,
    var(--color-border) 37%,
    var(--color-surface-secondary, #eee) 63%
  );
  background-size: 400% 100%;
  animation: task-detail-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.task-detail__skeleton-back {
  width: 120px;
  height: 14px;
  margin-bottom: 20px;
}

.task-detail__skeleton-title {
  width: 160px;
  height: 22px;
}

.task-detail__skeleton-badge {
  width: 64px;
  height: 22px;
  border-radius: 999px;
}

.task-detail__skeleton-row {
  height: 14px;
  margin-bottom: 12px;
  width: 80%;
}

.task-detail__skeleton-row--short {
  width: 55%;
}

@keyframes task-detail-skeleton-pulse {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.screenshot-timeline {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.screenshot-timeline__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.screenshot-timeline__heading--toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0;
}

.screenshot-timeline__heading--toggle[aria-expanded="true"] {
  margin-bottom: 16px;
}

.screenshot-timeline__heading--toggle:hover {
  color: var(--color-text-primary);
}

.screenshot-timeline__chevron {
  transition: transform 0.15s ease;
}

.screenshot-timeline__chevron--open {
  transform: rotate(90deg);
}

.screenshot-timeline__list {
  display: flex;
  flex-direction: column;
}

.screenshot-timeline__item {
  display: flex;
  gap: 16px;
}

.screenshot-timeline__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  padding-top: 4px;
}

.screenshot-timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.screenshot-timeline__dot--action {
  background: var(--color-status-paused);
}

.screenshot-timeline__dot--discovery {
  background: var(--color-status-active);
}

.screenshot-timeline__dot--error {
  background: var(--color-danger);
}

.screenshot-timeline__dot--agent {
  background: var(--color-severity-low);
}

.screenshot-timeline__dot--info {
  background: var(--color-text-muted);
}

.screenshot-timeline__line {
  width: 2px;
  flex: 1;
  background: var(--color-border);
  margin-top: 4px;
}

.screenshot-timeline__content {
  flex: 1;
  min-width: 0;
  padding-bottom: 20px;
}

.screenshot-timeline__content--log {
  padding-bottom: 16px;
}

.screenshot-timeline__item:last-child .screenshot-timeline__content {
  padding-bottom: 0;
}

.screenshot-timeline__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.screenshot-timeline__time {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.screenshot-timeline__url {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenshot-timeline__caption {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.screenshot-timeline__thumb-btn {
  display: block;
  background: none;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
  width: 100%;
}

.screenshot-timeline__thumb-btn:hover {
  border-color: var(--color-primary);
}

.screenshot-timeline__thumb-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.screenshot-timeline__img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: top left;
  transition: max-height 0.3s ease;
}

.screenshot-timeline__img--expanded {
  max-height: none;
  object-fit: contain;
}

/* Log entries */
.screenshot-timeline__log-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
}

.screenshot-timeline__log-badge--action {
  background: var(--color-status-paused-bg);
  color: var(--color-severity-medium);
}

.screenshot-timeline__log-badge--discovery {
  background: var(--color-status-active-bg);
  color: var(--color-status-active);
}

.screenshot-timeline__log-badge--error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.screenshot-timeline__log-badge--agent {
  background: var(--color-severity-low-bg);
  color: var(--color-severity-low);
}

.screenshot-timeline__dot--container {
  background: var(--color-primary);
}

.screenshot-timeline__log-badge--container {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.screenshot-timeline__log-message {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .screenshot-timeline {
    padding: 14px;
  }

  .screenshot-timeline__heading {
    font-size: 12px;
  }

  .screenshot-timeline__item {
    gap: 10px;
  }

  .screenshot-timeline__url {
    max-width: 160px;
  }
}
.retrigger-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.retrigger-links__row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.retrigger-links__label {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.retrigger-links__link {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--color-info-muted-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  text-decoration: none;
}

.retrigger-links__link:hover {
  background: var(--color-info-muted-bg-hover);
}

.retrigger-links__sep {
  margin-right: 4px;
}
.run-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.run-summary__stat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  color: var(--color-text-muted);
}

.run-summary__label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.run-summary__value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

@media (max-width: 640px) {
  .run-summary {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }

  .run-summary__stat {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .run-summary {
    grid-template-columns: 1fr;
  }
}
.bugs-found-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bugs-found-list__header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.bugs-found-list__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bugs-found-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  font: inherit;
  width: 100%;
  text-align: left;
}

.bugs-found-list__item:hover {
  background: var(--color-surface-hover);
}

.bugs-found-list__item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bugs-found-list__title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

/* Judge details section */
.bugs-found-list__judge {
  margin: 4px 0 4px 12px;
  padding: 8px 12px;
  background: var(--color-surface-secondary);
  border-left: 3px solid var(--color-warning, #e5a00d);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
}

.bugs-found-list__judge-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
}

.bugs-found-list__judge-toggle:hover {
  color: var(--color-text-primary);
}

.bugs-found-list__judge-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.bugs-found-list__judge-problem-chip {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--color-surface-hover, #2a2a2f);
  border-radius: 10px;
  color: var(--color-text-secondary);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bugs-found-list__judge-details {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bugs-found-list__judge-attempt {
  padding: 8px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bugs-found-list__judge-attempt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-danger, #e55);
}

.bugs-found-list__judge-attempt-header time {
  font-weight: 400;
  color: var(--color-text-tertiary);
  margin-left: auto;
}

.bugs-found-list__judge-problems {
  list-style: disc;
  margin: 6px 0 0 20px;
  padding: 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.bugs-found-list__judge-problems li {
  margin-bottom: 2px;
}

.bugs-found-list__judge-assessment {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-style: italic;
}

.bugs-found-list__judge-analysis {
  margin-top: 8px;
}

.bugs-found-list__judge-analysis-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary, #6c8cff);
  cursor: pointer;
  padding: 0;
}

.bugs-found-list__judge-analysis-toggle:hover {
  text-decoration: underline;
}

.bugs-found-list__judge-analysis-content {
  margin-top: 8px;
  padding: 8px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bugs-found-list__judge-field {
  margin-bottom: 8px;
}

.bugs-found-list__judge-field:last-child {
  margin-bottom: 0;
}

.bugs-found-list__judge-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin-bottom: 2px;
}

.bugs-found-list__judge-field p {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-primary);
  line-height: 1.5;
}

.bugs-found-list__judge-chronology {
  margin: 4px 0 0;
  padding-left: 20px;
  font-size: 12px;
  color: var(--color-text-primary);
}

.bugs-found-list__judge-chronology li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.bugs-found-list__judge-screenshot {
  display: block;
  max-width: 400px;
  max-height: 200px;
  margin-top: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* Judge phase results (evidence / requirements) */
.bugs-found-list__judge-phase {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.bugs-found-list__judge-phase-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bugs-found-list__judge-phase-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
}

.bugs-found-list__judge-phase-badge--passed {
  background: var(--color-success-bg, rgba(34, 197, 94, 0.15));
  color: var(--color-success, #22c55e);
}

.bugs-found-list__judge-phase-badge--failed {
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.15));
  color: var(--color-danger, #e55);
}

@media (max-width: 640px) {
  .bugs-found-list {
    padding: 14px;
  }

  .bugs-found-list__header {
    font-size: 12px;
  }

  .bugs-found-list__item {
    gap: 8px;
    padding: 8px 10px;
  }

  .bugs-found-list__title {
    font-size: 13px;
  }

  .bugs-found-list__judge-screenshot {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .bugs-found-list__item {
    flex-wrap: wrap;
  }
}
.polish-run-detail {
  padding: 0 0 48px;
  max-width: 900px;
}

/* Breadcrumb */
.polish-breadcrumb {
  margin-bottom: 20px;
}

.polish-breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.polish-breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 2px;
}

.polish-breadcrumb__sep {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.polish-breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.polish-breadcrumb__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.polish-breadcrumb__text {
  color: var(--color-text-secondary);
}

.polish-breadcrumb__passes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.polish-breadcrumb__pass-link {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.polish-breadcrumb__pass-link:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.polish-breadcrumb__pass-link--active {
  background: var(--color-info-muted-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

.polish-run-detail__back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 0;
}

.polish-run-detail__back:hover {
  color: var(--color-primary);
}

.polish-run-detail__back:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.polish-run-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Timing */
.polish-run-detail__timing {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 13px;
}

.polish-run-detail__timing-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.polish-run-detail__timing-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.polish-run-detail__timing-value {
  color: var(--color-text-secondary);
}

.polish-run-detail__title-icon {
  color: var(--color-text-muted);
}

.polish-run-detail__title {
  font-size: 22px;
  font-weight: 700;
}

.polish-run-detail__journey {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.polish-run-detail__journey-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.polish-run-detail__journey-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-primary);
}

/* Recording links */
.polish-run-detail__recordings {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.polish-run-detail__recording-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-info-muted-bg);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s;
}

.polish-run-detail__recording-link:hover {
  background: var(--color-primary);
  color: var(--text-on-accent);
}

.polish-run-detail__recording-link--setup {
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border-color: var(--color-border);
}

.polish-run-detail__recording-link--setup:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

/* Section */
.polish-run-detail__section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.polish-run-detail__section h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.polish-run-detail > .run-summary {
  margin-bottom: 24px;
}

.polish-run-detail > .bugs-found-list {
  margin-bottom: 16px;
}

/* Pass cards */
.polish-run-detail__passes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.polish-run-detail__pass-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--color-bg);
}

.polish-run-detail__pass-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.polish-run-detail__pass-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.polish-run-detail__pass-status {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.polish-run-detail__pass-bug-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-danger);
}

.polish-run-detail__pass-icon--completed { color: var(--color-status-active); }
.polish-run-detail__pass-icon--failed { color: var(--color-danger); }
.polish-run-detail__pass-icon--in-progress {
  color: var(--color-status-in-progress);
  animation: polish-spin 1.5s linear infinite;
}
.polish-run-detail__pass-icon--pending { color: var(--color-text-muted); }

@keyframes polish-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Metrics */
.polish-run-detail__metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.polish-run-detail__metric {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.polish-run-detail__metric--good {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
}

.polish-run-detail__metric--needs-improvement {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
}

.polish-run-detail__metric--poor {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.polish-run-detail__metric--unknown {
  background: var(--color-surface-secondary);
  color: var(--color-text-muted);
}

.polish-run-detail__metric-name {
  font-weight: 600;
}

/* Findings */
.polish-run-detail__findings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.polish-run-detail__finding {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.polish-run-detail__finding-title {
  color: var(--color-text-primary);
}

.polish-run-detail__severity {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: capitalize;
  flex-shrink: 0;
}

.polish-run-detail__severity--critical {
  background: var(--color-severity-critical-bg);
  color: var(--color-severity-critical);
}

.polish-run-detail__severity--high {
  background: var(--color-severity-high-bg);
  color: var(--color-severity-high);
}

.polish-run-detail__severity--medium {
  background: var(--color-severity-medium-bg);
  color: var(--color-severity-medium);
}

.polish-run-detail__severity--low {
  background: var(--color-severity-low-bg);
  color: var(--color-severity-low);
}

/* Created Journeys */
.polish-run-detail__created-journeys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.polish-run-detail__created-journey-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.polish-run-detail__created-journey-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.polish-run-detail__created-journey-header:hover {
  background: var(--color-surface-hover, var(--color-surface));
}

.polish-run-detail__created-journey-expand {
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.polish-run-detail__created-journey-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
}

.polish-run-detail__created-journey-count {
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.polish-run-detail__created-journey-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.polish-run-detail__created-journey-link:hover {
  text-decoration: underline;
}

.polish-run-detail__created-journey-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
  padding: 0 12px 8px 34px;
  margin: 0;
}

.polish-run-detail__created-journey-steps {
  border-top: 1px solid var(--color-border);
  padding: 12px 12px 12px 20px;
}

/* Judge badges */
.polish-run-detail__judge-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
  flex-shrink: 0;
}

.polish-run-detail__judge-badge--approved {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
}

.polish-run-detail__judge-badge--rejected {
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.1));
  color: var(--color-danger, #ef4444);
}

.polish-run-detail__rejected-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Rejected journeys section */
.polish-run-detail__rejected-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-secondary, var(--color-bg));
}

.polish-run-detail__rejected-summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.polish-run-detail__rejected-summary::-webkit-details-marker {
  display: none;
}

.polish-run-detail__rejected-summary::before {
  content: '\25B6';
  font-size: 9px;
  transition: transform 0.15s;
}

.polish-run-detail__rejected-section[open] > .polish-run-detail__rejected-summary::before {
  transform: rotate(90deg);
}

.polish-run-detail__rejected-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px 8px;
}

.polish-run-detail__created-journey-item--rejected {
  opacity: 0.75;
  border-color: var(--color-danger-bg, rgba(239, 68, 68, 0.2));
}

/* Judge assessment */
.polish-run-detail__judge-assessment {
  padding: 8px 12px 12px 34px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.polish-run-detail__judge-assessment--rejected {
  background: var(--color-danger-muted-bg, rgba(239, 68, 68, 0.04));
  border-top: 1px solid var(--color-danger-bg, rgba(239, 68, 68, 0.15));
  padding: 10px 12px 12px 34px;
}

.polish-run-detail__judge-assessment-text {
  margin: 0 0 6px;
}

.polish-run-detail__judge-problems {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--color-danger, #ef4444);
}

.polish-run-detail__judge-problems li {
  margin-bottom: 2px;
}

/* Duplicates */
.polish-run-detail__duplicates {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.polish-run-detail__duplicates-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.polish-run-detail__duplicates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.polish-run-detail__duplicate-item {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.polish-run-detail__duplicate-new {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.polish-run-detail__duplicate-title {
  color: var(--color-text-primary);
  text-decoration: line-through;
  text-decoration-color: var(--color-text-muted);
}

.polish-run-detail__duplicate-existing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.polish-run-detail__duplicate-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.polish-run-detail__duplicate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--color-text-primary);
  cursor: pointer;
}

.polish-run-detail__duplicate-link:hover {
  color: var(--color-primary);
}

/* Pass bugs */
.polish-run-detail__pass-bugs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.polish-run-detail__pass-bug {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-primary);
}

.polish-run-detail__pass-empty,
.polish-run-detail__pass-pending {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Skeleton */
.polish-run-detail .skeleton {
  background: var(--color-border-light);
  border-radius: 4px;
  animation: polish-skeleton-pulse 1.5s ease-in-out infinite;
}

.polish-run-detail .skeleton--text { height: 14px; }
.polish-run-detail .skeleton--back { width: 120px; height: 14px; margin-bottom: 20px; }
.polish-run-detail .skeleton--heading { width: 160px; height: 22px; }
.polish-run-detail .skeleton--badge { width: 64px; height: 22px; border-radius: var(--radius-lg); }

.polish-run-detail__skeleton-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.polish-run-detail .skeleton--section-title { width: 30%; }
.polish-run-detail .skeleton--section-body { width: 80%; }
.polish-run-detail .skeleton--section-body-short { width: 55%; }

@keyframes polish-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Error / empty */
.polish-run-detail__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.polish-run-detail__error-message {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.polish-run-detail__retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.polish-run-detail__retry-btn:hover { background: var(--color-primary-hover); }

.polish-run-detail__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* Setup errors */
.polish-run-detail__setup-errors {
  background: var(--color-danger-muted-bg, rgba(239, 68, 68, 0.08));
  border: 1px solid var(--color-danger, #ef4444);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.polish-run-detail__setup-errors-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-danger, #ef4444);
  margin: 0 0 10px 0;
}

.polish-run-detail__setup-error-item {
  font-size: 13px;
  color: var(--color-text-primary);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light, rgba(239, 68, 68, 0.15));
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.polish-run-detail__setup-error-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.polish-run-detail__setup-error-ctx {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-danger, #ef4444);
  background: var(--color-danger-muted-bg, rgba(239, 68, 68, 0.08));
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.polish-run-detail__setup-error-msg {
  word-break: break-word;
}

/* Setup output */
.polish-run-detail__collapsible-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
  cursor: pointer;
}

.polish-run-detail__collapsible-header:hover {
  color: var(--color-primary);
}

.polish-run-detail__setup-output-wrapper {
  position: relative;
}

.polish-run-detail__copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}

.polish-run-detail__copy-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.polish-run-detail__setup-output {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  color: var(--color-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.polish-run-detail__footer-actions {
  margin-top: 24px;
  padding: 16px 0 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.polish-run-detail__retrigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.polish-run-detail__retrigger-btn:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.polish-run-detail__retrigger-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.polish-run-detail__retrigger-error {
  font-size: 13px;
  color: var(--color-danger);
  margin: 0;
}

@media (max-width: 640px) {
  .polish-run-detail { padding: 12px; }
  .polish-run-detail__title { font-size: 18px; }
  .polish-run-detail__section { padding: 14px; }
  .polish-run-detail__section h2 { font-size: 12px; }
}
.test-run-detail {
  padding: 0;
  max-width: 900px;
}

@media (max-width: 640px) {
  .test-run-detail {
    padding: 12px;
  }

  .test-run-detail__title {
    font-size: 18px;
  }

  .test-run-detail__header {
    margin-bottom: 16px;
  }

  .test-run-detail__section {
    padding: 14px;
  }

  .test-run-detail__section h2 {
    font-size: 12px;
  }

  .test-run-detail__error {
    padding: 32px 16px;
  }
}

.test-run-detail__back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 0;
}

.test-run-detail__back:hover {
  color: var(--color-primary);
}

.test-run-detail__back:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.test-run-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.test-run-detail__title {
  font-size: 22px;
  font-weight: 700;
}

.test-run-detail__goal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.test-run-detail__goal-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.test-run-detail__goal-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.test-run-detail__journey {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.test-run-detail__journey-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.test-run-detail__journey-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.test-run-detail__journey-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

.test-run-detail__unstepped-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-warning, #b45309);
  background: color-mix(in srgb, var(--color-warning, #b45309) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-warning, #b45309) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

.test-run-detail__judge-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

.test-run-detail__judge-badge--approved {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.test-run-detail__judge-badge--rejected {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.test-run-detail__journey-updates {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.test-run-detail__journey-updates-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}

.test-run-detail__journey-updates-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-run-detail__journey-update-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.test-run-detail__journey-update-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  white-space: nowrap;
}

.test-run-detail__journey-update-name {
  color: var(--color-text-primary);
  font-weight: 500;
}

.test-run-detail__section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.test-run-detail > .run-summary {
  margin-bottom: 24px;
}

.test-run-detail > .tree-path-view,
.test-run-detail > .tree-diff-view,
.test-run-detail > .bugs-found-list {
  margin-bottom: 16px;
}

.test-run-detail__section h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Journey actions */
.test-run-detail__actions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-run-detail__action-item {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.test-run-detail__action-item--failed {
  border-color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 5%, var(--color-bg));
}

.test-run-detail__action-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-run-detail__action-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-border-light);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.test-run-detail__action-item--failed .test-run-detail__action-step {
  background: var(--color-danger);
  color: white;
}

.test-run-detail__action-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-border-light);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  flex-shrink: 0;
}

.test-run-detail__action-desc {
  font-size: 13px;
  color: var(--color-text-primary);
}

.test-run-detail__action-details {
  margin-top: 6px;
  padding-left: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.test-run-detail__action-selector {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  color: var(--color-primary);
  font-family: monospace;
}

.test-run-detail__action-value {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.test-run-detail__action-var {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-family: monospace;
}

.test-run-detail__action-checks {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.test-run-detail__action-checks li {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.test-run-detail__action-checks li svg {
  flex-shrink: 0;
  color: var(--color-success);
}

.test-run-detail__action-item--failed .test-run-detail__action-checks li svg {
  color: var(--color-danger);
}

.test-run-detail__check-assertion {
  font-size: 10px;
  color: var(--color-text-tertiary);
  background: var(--color-bg-secondary);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  font-family: monospace;
}

/* Skeleton loading */
.test-run-detail .skeleton {
  background: var(--color-border-light);
  border-radius: 4px;
  animation: test-run-detail-skeleton-pulse 1.5s ease-in-out infinite;
}

.test-run-detail .skeleton--text {
  height: 14px;
}

.test-run-detail .skeleton--back {
  width: 120px;
  height: 14px;
  margin-bottom: 20px;
}

.test-run-detail .skeleton--heading {
  width: 140px;
  height: 22px;
}

.test-run-detail .skeleton--badge {
  width: 64px;
  height: 22px;
  border-radius: var(--radius-lg);
}

.test-run-detail__skeleton-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-run-detail .skeleton--stat-line {
  width: 45%;
  height: 14px;
}

.test-run-detail__skeleton-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-run-detail .skeleton--section-title {
  width: 30%;
  height: 14px;
}

.test-run-detail .skeleton--section-body {
  width: 80%;
  height: 14px;
}

.test-run-detail .skeleton--section-body-short {
  width: 55%;
  height: 14px;
}

@keyframes test-run-detail-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Error state */
.test-run-detail__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--color-danger);
}

.test-run-detail__error-message {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.test-run-detail__retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.test-run-detail__retry-btn:hover {
  background: var(--color-primary-hover);
}

.test-run-detail__retry-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Judge Review History */
.test-run-detail__section--judge {
  border-left: 3px solid var(--color-primary);
}

.test-run-detail__section--judge h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.test-run-detail__judge-bug {
  margin-bottom: 16px;
}

.test-run-detail__judge-bug:last-child {
  margin-bottom: 0;
}

.test-run-detail__judge-bug-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.test-run-detail__judge-submissions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-run-detail__judge-submission {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
}

.test-run-detail__judge-submission--approved {
  border-left: 3px solid var(--color-status-active);
}

.test-run-detail__judge-submission--rejected {
  border-left: 3px solid var(--color-danger);
}

.test-run-detail__judge-submission-icon {
  flex-shrink: 0;
  display: flex;
}

.test-run-detail__judge-submission--approved .test-run-detail__judge-submission-icon {
  color: var(--color-status-active);
}

.test-run-detail__judge-submission--rejected .test-run-detail__judge-submission-icon {
  color: var(--color-danger);
}

.test-run-detail__judge-submission-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.test-run-detail__judge-submission-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.test-run-detail__judge-submission-badge--approved {
  background: var(--color-status-active-bg);
  color: var(--color-status-active);
}

.test-run-detail__judge-submission-badge--rejected {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.test-run-detail__judge-submission-time {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: auto;
}

.test-run-detail__judge-submission-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.test-run-detail__judge-submission-toggle {
  flex-shrink: 0;
  display: flex;
  color: var(--color-text-muted);
}

.test-run-detail__judge-submission-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-run-detail__judge-submitted-data h4,
.test-run-detail__judge-response h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 6px;
}

.test-run-detail__judge-field {
  margin-bottom: 8px;
}

.test-run-detail__judge-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.test-run-detail__judge-field-value {
  font-size: 13px;
  color: var(--color-text-primary);
  line-height: 1.5;
}

.test-run-detail__judge-field-pre {
  font-size: 12px;
  line-height: 1.5;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 10px;
  margin: 0;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.test-run-detail__judge-rejected-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--color-severity-high-bg);
  color: var(--color-severity-high);
  margin-left: 8px;
  vertical-align: middle;
}

.test-run-detail__judge-assessment {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: var(--color-bg);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-primary);
}

.test-run-detail__judge-problems {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.test-run-detail__judge-problems li {
  margin-bottom: 2px;
  line-height: 1.5;
}

/* Multi-context journey recordings */
.test-run-detail__recordings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-run-detail__recording-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  min-width: 0;
  max-width: 100%;
}

.test-run-detail__recording-context {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.test-run-detail__recordings-list .replay-link {
  max-width: 100%;
}

/* Context badges on journey actions */
.test-run-detail__contexts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.test-run-detail__contexts-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.test-run-detail__context-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  padding: 2px 8px;
  border-radius: 4px;
}

.test-run-detail__action-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  background: var(--color-primary);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Empty / not found state */
.test-run-detail__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  color: var(--color-text-muted);
  font-size: 15px;
}

.test-run-detail__polish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.test-run-detail__polish-btn:hover {
  background: var(--color-primary-hover);
}

.test-run-detail__polish-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Polish pass links */
.test-run-detail__polish-passes-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.test-run-detail__polish-passes-loading {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 8px 0;
}

.test-run-detail__polish-passes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-run-detail__polish-pass-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  cursor: pointer;
  transition: background 0.12s;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.test-run-detail__polish-pass-item:hover {
  background: var(--color-surface-hover);
}

.test-run-detail__polish-pass-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.test-run-detail__polish-pass-icon {
  flex-shrink: 0;
  display: flex;
}

.test-run-detail__polish-pass-icon--completed { color: var(--color-status-completed, var(--color-success)); }
.test-run-detail__polish-pass-icon--failed { color: var(--color-status-failed, var(--color-danger)); }
.test-run-detail__polish-pass-icon--in-progress {
  color: var(--color-status-in-progress, var(--color-primary));
  animation: test-run-polish-spin 1s linear infinite;
}
.test-run-detail__polish-pass-icon--pending { color: var(--color-text-muted); }

@keyframes test-run-polish-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.test-run-detail__polish-pass-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  flex: 1;
}

.test-run-detail__polish-pass-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm, 4px);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.test-run-detail__polish-pass-status--pending,
.test-run-detail__polish-pass-status--queued {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.test-run-detail__polish-pass-status--in-progress {
  background: var(--color-status-in-progress-bg);
  color: var(--color-status-in-progress);
  border-color: color-mix(in srgb, var(--color-status-in-progress) 22%, var(--color-border));
}

.test-run-detail__polish-pass-status--completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border-color: color-mix(in srgb, var(--color-status-completed) 25%, var(--color-border));
}

.test-run-detail__polish-pass-status--failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
  border-color: color-mix(in srgb, var(--color-status-failed) 25%, var(--color-border));
}

.test-run-detail__polish-pass-bugs {
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.test-run-detail__polish-pass-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
  opacity: 0.4;
  transition: opacity 0.12s;
}

.test-run-detail__polish-pass-item:hover .test-run-detail__polish-pass-arrow {
  opacity: 1;
}

.test-run-detail__footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.test-run-detail__retrigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.test-run-detail__retrigger-btn:hover:not(:disabled) {
  background: var(--color-bg-hover, var(--color-bg-secondary));
}

.test-run-detail__retrigger-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Polish modal */
.test-run-detail__polish-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.test-run-detail__polish-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.test-run-detail__polish-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.test-run-detail__polish-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.test-run-detail__polish-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.test-run-detail__polish-modal-close:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.test-run-detail__polish-modal-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
}

.test-run-detail__polish-modal-passes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.test-run-detail__polish-modal-pass {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-primary);
  cursor: pointer;
}

.test-run-detail__polish-modal-pass input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.test-run-detail__polish-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.test-run-detail__polish-modal-submit {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.test-run-detail__polish-modal-submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.test-run-detail__polish-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.test-run-detail__polish-modal-cancel {
  padding: 8px 16px;
  background: none;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.test-run-detail__polish-modal-cancel:hover {
  background: var(--color-surface-hover);
}
.exploration-detail {
  padding: 0;
  max-width: 900px;
}

.exploration-detail__prompt-section {
  margin-bottom: 16px;
}

.exploration-detail__prompt {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

/* Sections are cards, matching the other task-detail pages (test run, polish pass). */
.exploration-detail__section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.exploration-detail__section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}

.exploration-detail__empty {
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 8px 0;
}

/* Journeys table */
.exploration-detail__table-wrap {
  overflow-x: auto;
}

.exploration-detail__journeys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.exploration-detail__journeys-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
}

.exploration-detail__journeys-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.exploration-detail__journeys-table tbody tr:last-child td {
  border-bottom: none;
}

.exploration-detail__journey-row {
  cursor: pointer;
}

.exploration-detail__journey-row:hover {
  background: var(--color-bg);
}

.exploration-detail__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.exploration-detail__badge--created {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.exploration-detail__badge--updated {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.exploration-detail__badge--approved {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.exploration-detail__badge--rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.exploration-detail__journey-judge {
  white-space: nowrap;
}

.exploration-detail__journey-name {
  font-weight: 500;
  color: var(--color-text);
}

.exploration-detail__journey-desc {
  color: var(--color-text-secondary);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exploration-detail__journey-steps {
  color: var(--color-text-secondary);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .exploration-detail__journey-desc {
    display: none;
  }
}

.exploration-detail__retrigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.exploration-detail__retrigger-btn:hover:not(:disabled) {
  background: var(--color-bg-hover, var(--color-bg-secondary));
}

.exploration-detail__retrigger-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.guidance-diff {
  background: var(--color-code-bg);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: 300px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
}

.guidance-diff__line {
  display: flex;
  padding: 0 12px;
  min-height: 20px;
}

.guidance-diff__line--add {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.guidance-diff__line--remove {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.guidance-diff__line--same {
  color: var(--color-code-text);
  opacity: 0.7;
}

.guidance-diff__prefix {
  flex-shrink: 0;
  width: 18px;
  user-select: none;
  text-align: center;
}

.guidance-diff__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.guidance-diff__separator {
  display: block;
  width: 100%;
  padding: 4px 12px;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 11px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.guidance-diff__separator--expandable {
  cursor: pointer;
}

.guidance-diff__separator--expandable:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
}
.gu-detail {
  padding: 0;
  max-width: 900px;
}

.gu-detail__loading {
  padding: 48px 0;
  text-align: center;
  color: var(--color-text-secondary);
}

.gu-detail__back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 0;
  cursor: pointer;
}

.gu-detail__back:hover {
  color: var(--color-primary);
}

.gu-detail__error {
  text-align: center;
  padding: 48px 0;
  color: var(--color-text-secondary);
}

.gu-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gu-detail__icon {
  color: var(--color-primary);
}

.gu-detail__title {
  font-size: 20px;
  font-weight: 600;
}

.gu-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 14px 16px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.gu-detail__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gu-detail__meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.gu-detail__meta-value {
  font-size: 14px;
  color: var(--color-text-primary);
}

.gu-detail__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  text-decoration: none;
}

.gu-detail__link:hover {
  text-decoration: underline;
}

.gu-detail__section {
  margin-bottom: 24px;
}

.gu-detail__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.gu-detail__message {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
  padding: 12px 16px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.gu-detail__reviewer-note {
  margin-top: 10px;
}

.gu-detail__reviewer-note-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.gu-detail__empty {
  font-size: 13px;
  color: var(--color-text-muted);
}

.gu-detail__failed {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-danger);
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.1));
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
}

.gu-detail__failed-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.gu-detail__analysis {
  padding: 14px 18px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.gu-detail__retrigger-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
  padding: 8px 14px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.gu-detail__retrigger-link:hover {
  text-decoration: underline;
}

.gu-detail__changes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gu-detail__change {
  padding: 12px 14px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}

.gu-detail__change-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.gu-detail__change-key {
  font-size: 13px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--color-primary);
  text-decoration: none;
}

.gu-detail__change-key:hover {
  text-decoration: underline;
}

.gu-detail__change-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-badge-bg, rgba(255,255,255,0.06));
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.gu-detail__change-summary {
  font-size: 12px;
  color: var(--color-text-secondary);
}


.gu-detail__section-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.gu-detail__section-toggle:hover {
  color: var(--color-primary);
}

.gu-detail__logs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}

.gu-detail__log-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 14px;
  font-size: 13px;
}

.gu-detail__log-entry:hover {
  background: var(--color-surface-hover, rgba(255,255,255,0.03));
}

.gu-detail__log-time {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 70px;
}

.gu-detail__log-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  background: var(--color-badge-bg, rgba(255,255,255,0.06));
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.gu-detail__log-message {
  color: var(--color-text-secondary);
  line-height: 1.4;
  word-break: break-word;
}
.guidance-page {
  max-width: 900px;
  /* Generous bottom space so the last section (User Feedback) doesn't sit flush against the
     viewport edge — keeps long expanded lists comfortable to scroll and scan. */
  padding-bottom: 160px;
}

/* The app shell's `.app-main > *` rule gives every page `flex: 0 1 auto; min-height: 0`, which
   squeezes a taller-than-viewport page box down to the viewport height — its content then
   overflows past the box's own bottom padding, leaving NO space after the last section no matter
   how much padding is set. Opt this page out so the padding above actually renders. */
.app-main > .guidance-page {
  flex-shrink: 0;
}

.guidance-page__pending-feedback {
  margin-bottom: 32px;
}

.guidance-page__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--color-text-primary);
}

.guidance-page__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.guidance-page__header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guidance-page__new-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.guidance-page__new-entry-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-light);
}

/* Create entry dialog */

.guidance-create__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.guidance-create__dialog {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 560px;
  max-width: 90vw;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.guidance-create__dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.guidance-create__dialog-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.guidance-create__close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.guidance-create__close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
}

.guidance-create__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guidance-create__context-textarea {
  min-height: 80px;
}

.guidance-create__field-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-danger);
}

.guidance-create__error {
  font-size: 13px;
  color: var(--color-danger);
}

.guidance-create__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.guidance-page__loading {
  padding: 48px 0;
  text-align: center;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.guidance-page__error {
  padding: 24px;
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.guidance-page__empty {
  padding: 48px 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.guidance-page__entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Entry card */

.guidance-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.guidance-entry--expanded {
  border-color: var(--color-primary);
}

.guidance-entry__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  color: var(--color-text-primary);
}

.guidance-entry__header:hover {
  background: var(--color-surface-hover);
}

.guidance-entry__toggle {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.guidance-entry__key {
  font-size: 14px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  flex: 1;
  min-width: 0;
}

.guidance-entry__description {
  font-size: 13px;
  color: var(--color-text-secondary);
  flex: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guidance-entry__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.guidance-entry__format-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.guidance-entry__format-badge--prompt {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.guidance-entry__format-badge--typescript {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.guidance-entry__version-badge {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.guidance-entry__updated {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Expanded content */

.guidance-entry__body {
  border-top: 1px solid var(--color-border);
  padding: 20px;
}

.guidance-entry__context {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--color-surface-secondary);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.guidance-entry__context-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
}

.guidance-entry__content-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.guidance-entry__content-block {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.guidance-entry__content-block--code {
  font-size: 12px;
  line-height: 1.5;
  max-height: 600px;
  tab-size: 2;
}

/* Edit section */

.guidance-entry__edit-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.guidance-entry__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  cursor: pointer;
}

.guidance-entry__edit-btn:hover {
  background: var(--color-surface-hover);
}

.guidance-entry__editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guidance-entry__editor-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.guidance-entry__editor-textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  resize: vertical;
}

.guidance-entry__editor-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.guidance-entry__summary-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
}

.guidance-entry__summary-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.guidance-entry__editor-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.guidance-entry__save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-primary);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.guidance-entry__save-btn:hover {
  background: var(--color-primary-hover);
}

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

.guidance-entry__cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.guidance-entry__cancel-btn:hover {
  background: var(--color-surface-hover);
}

.guidance-entry__save-error {
  font-size: 13px;
  color: var(--color-danger);
}

/* Version history */

.guidance-entry__versions {
  margin-top: 16px;
}

.guidance-entry__versions-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  background: none;
  border: none;
}

.guidance-entry__versions-toggle:hover {
  color: var(--color-text-primary);
}

.guidance-entry__versions-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guidance-entry__version-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

.guidance-entry__version-item:hover {
  background: var(--color-surface-hover);
}

.guidance-entry__version-item--active {
  border-color: var(--color-primary);
  background: var(--color-info-muted-bg);
}

.guidance-entry__version-number {
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.guidance-entry__version-delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.guidance-entry__version-item:hover .guidance-entry__version-delete {
  opacity: 1;
}

.guidance-entry__version-delete:hover {
  color: var(--color-danger, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

.guidance-entry__version-details {
  flex: 1;
  min-width: 0;
}

.guidance-entry__version-summary {
  color: var(--color-text-primary);
}

.guidance-entry__version-meta {
  display: flex;
  gap: 12px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.guidance-entry__version-expanded {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guidance-entry__version-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guidance-entry__version-diff-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.guidance-entry__version-diff-content {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 12px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

/* Update History / Gaps sections */

.guidance-page__updates {
  margin-top: 40px;
}

.guidance-page__feedback {
  margin-top: 40px;
}

.guidance-page__section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.guidance-page__section-toggle:hover {
  color: var(--color-primary);
}

.guidance-page__section-count {
  font-size: 12px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-secondary);
  color: var(--color-text-muted);
}

.guidance-page__updates-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.guidance-page__updates-empty {
  font-size: 13px;
  color: var(--color-text-muted);
}

.guidance-page__updates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guidance-page__load-more {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}

.guidance-page__load-more:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
}

.guidance-update-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.guidance-update-item--clickable {
  cursor: pointer;
  transition: border-color 0.15s;
}

.guidance-update-item--clickable:hover {
  border-color: var(--color-primary);
}

.guidance-update-item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.guidance-update-item__user {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.guidance-update-item__status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
}

.guidance-update-item__status--pending {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
}

.guidance-update-item__status--processing {
  background: var(--color-info-muted-bg);
  color: var(--color-primary);
}

.guidance-update-item__status--completed {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.guidance-update-item__status--failed {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.guidance-update-item__status--unresolved {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.guidance-update-item__source {
  font-size: 12px;
  color: var(--color-text-muted);
}

.guidance-update-item__time {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: auto;
}

.guidance-update-item__message {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* The message is rendered as lightweight markdown; keep it at the compact list
   scale rather than the default markdown-lite size. */
.guidance-update-item__message .markdown-lite {
  font-size: 13px;
  line-height: 1.5;
}

.guidance-update-item__changes-count {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.guidance-update-change {
  padding: 10px 12px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}

.guidance-update-change__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.guidance-update-change__key {
  font-size: 13px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--color-text-primary);
}

.guidance-update-change__summary {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.guidance-update-change__diff-toggle {
  font-size: 11px;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 0;
  text-decoration: underline;
}

.guidance-update-change__diff {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guidance-update-change__old,
.guidance-update-change__new {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guidance-update-change__diff-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.guidance-update-change__diff-content {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 10px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.guidance-update-item__source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
}

.guidance-update-item__source-link:hover {
  text-decoration: underline;
}

.guidance-update-item__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}


.guidance-update-item__retrigger-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-success, #22c55e);
  text-decoration: none;
}

.guidance-update-item__retrigger-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .guidance-entry__description {
    display: none;
  }

  .guidance-entry__updated {
    display: none;
  }
}

/* User feedback queue */
.guidance-feedback-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.guidance-feedback-item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.guidance-feedback-item__header--collapsible {
  cursor: pointer;
}

.guidance-feedback-item__header--collapsible:hover .guidance-feedback-item__user {
  color: var(--color-primary);
}

.guidance-feedback-item__header--collapsed {
  margin-bottom: 0;
}

.guidance-feedback-item__toggle {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--color-text-muted);
}

.guidance-feedback-item__user {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.guidance-feedback-item__bug-link {
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guidance-feedback-item__bug-link:hover {
  text-decoration: underline;
}

.guidance-feedback-item__field {
  margin-bottom: 10px;
}

.guidance-feedback-item__field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.guidance-feedback-item__feedback-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-primary);
  margin: 0;
  white-space: pre-wrap;
}

.guidance-feedback-item__evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guidance-feedback-item__evidence-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
}

.guidance-feedback-item__evidence-link:hover {
  text-decoration: underline;
}

.guidance-feedback-item__evidence-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  flex-shrink: 0;
}

.guidance-feedback-item__comment-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-primary);
  padding: 8px 10px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: vertical;
  font-family: inherit;
}

.guidance-feedback-item__comment-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.guidance-feedback-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.guidance-feedback-item__approve,
.guidance-feedback-item__ignore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.guidance-feedback-item__approve {
  color: white;
  background: var(--color-primary);
  border: 1px solid transparent;
}

.guidance-feedback-item__approve:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.guidance-feedback-item__ignore {
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.guidance-feedback-item__ignore:hover:not(:disabled) {
  background: var(--color-surface-hover);
}

.guidance-feedback-item__approve:disabled,
.guidance-feedback-item__ignore:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guidance-feedback-item__resolved {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.guidance-feedback-item__resolved-link {
  color: var(--color-primary);
  text-decoration: none;
}

.guidance-feedback-item__resolved-link:hover {
  text-decoration: underline;
}
.insights {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.insights__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insights__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
}

.insights__subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 640px;
}

/* Loading / error */
.insights__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 48px 0;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-secondary);
}

@keyframes insights-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.insights__spinner {
  animation: insights-spin 1.5s linear infinite;
  color: var(--color-text-muted);
}

.insights__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--color-danger);
  font-size: 14px;
}

.insights__error p {
  color: var(--color-text-secondary);
}

.insights__retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
}

.insights__retry:hover {
  border-color: var(--color-text-muted);
}

/* Summary cards */
.insights__summary-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.insights__summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.insights__summary-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.insights__summary-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insights__summary-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.insights__summary-badge--open {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* Chart card */
.insights__chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}

.insights__chart-card--full {
  /* no additional width constraints */
}

.insights__chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.insights__chart-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.insights__charts-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Donut layout */
.insights__donut-layout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.insights__donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.insights__donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.insights__donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.insights__donut-legend-label {
  text-transform: capitalize;
  color: var(--color-text-secondary);
  flex: 1;
  min-width: 0;
}

.insights__donut-legend-value {
  font-weight: 600;
  color: var(--color-text-primary);
}

.insights__donut-legend-pct {
  color: var(--color-text-muted);
  width: 32px;
  text-align: right;
}

/* Chart legend row */
.insights__chart-legend-row {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.insights__chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: capitalize;
}

.insights__chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Scorecard table */
.insights__scorecard-table {
  margin-top: 8px;
}

.insights__scorecard-header,
.insights__scorecard-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
}

.insights__scorecard-header {
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insights__scorecard-row {
  border-bottom: 1px solid var(--color-surface-secondary);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.insights__scorecard-row:last-child {
  border-bottom: none;
}

.insights__scorecard-col--name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.insights__scorecard-col--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.insights__scorecard-col--open {
  color: #f87171;
}

.insights__scorecard-col--resolved {
  color: #4ade80;
}

.insights__scorecard-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insights__scorecard-link:hover {
  text-decoration: underline;
}

.insights__scorecard-url {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.insights__scorecard-url:hover {
  color: var(--color-primary);
}

.insights__scorecard-rate {
  font-weight: 600;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}

.insights__scorecard-rate--good {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.insights__scorecard-rate--mid {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
}

.insights__scorecard-rate--low {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* Responsive */
@media (max-width: 900px) {
  .insights__summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .insights__charts-pair {
    grid-template-columns: 1fr;
  }

  .insights__scorecard-header,
  .insights__scorecard-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .insights__scorecard-col:nth-child(5),
  .insights__scorecard-col:nth-child(6) {
    display: none;
  }
}

@media (max-width: 640px) {
  .insights {
    padding: 24px 16px 48px;
  }

  .insights__summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .insights__donut-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .insights__scorecard-header,
  .insights__scorecard-row {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .insights__scorecard-col:nth-child(4),
  .insights__scorecard-col:nth-child(5),
  .insights__scorecard-col:nth-child(6) {
    display: none;
  }
}
.process-history {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.process-history__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 24px;
}

.process-history__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.process-history__subtitle {
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.process-history__refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--color-text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.process-history__refresh-btn:hover {
  background: var(--color-surface-hover);
}

/* Stats grid */
.process-history__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.process-history__stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px;
}

.process-history__stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.process-history__stat-icon--completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
}

.process-history__stat-icon--failed {
  background: var(--color-status-failed-bg);
  color: var(--color-status-failed);
}

.process-history__stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.process-history__stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.process-history__stat-label {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* Table */
.process-history__section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 12px;
}

.process-history__table-wrap {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.process-history__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.process-history__table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
}

.process-history__row td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.process-history__row:last-child td {
  border-bottom: none;
}

.process-history__row--clickable {
  transition: background 0.12s ease;
}

.process-history__row--clickable:hover td {
  background: var(--color-surface-secondary);
}

.process-history__goal {
  color: var(--color-text-secondary);
}

.process-history__time,
.process-history__duration,
.process-history__version {
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.process-history__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.8rem;
}

.process-history__status--completed {
  color: var(--color-status-completed);
}

.process-history__status--failed {
  color: var(--color-status-failed);
}

.process-history__empty {
  padding: 32px;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface-secondary);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
}

.process-history__loading {
  padding: 48px;
  text-align: center;
  color: var(--color-text-muted);
}

.process-history__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  color: var(--color-status-failed);
}

.process-history__retry-btn {
  background: var(--color-surface-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--color-text-primary);
  cursor: pointer;
}

@media (max-width: 640px) {
  .process-history {
    padding: 16px;
  }
  .process-history__header {
    flex-direction: column;
  }
}
.embedded-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
}

.embedded-login__message {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.embedded-login__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.embedded-login__button:hover:not(:disabled) {
  opacity: 0.9;
}

.embedded-login__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.embedded-login__spinner {
  animation: embedded-login-spin 0.8s linear infinite;
}

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

.embedded-login__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted, var(--color-text-secondary));
  max-width: 320px;
}

.embedded-login__error {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-danger);
  max-width: 320px;
}
/* Embeddable, chrome-free project view rendered inside an iframe.
   No sidebar, no masthead/title — just the tab bar and the active panel. */
.embedded-project {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  background: var(--color-surface-secondary);
  overflow: hidden;
}

.embedded-project--error {
  align-items: center;
  justify-content: center;
  color: var(--color-danger);
  font-size: 14px;
}

.embedded-project .project-detail__sheet {
  flex: 1 1 auto;
  min-height: 0;
}
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
@layer properties {
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
    *, :before, :after, ::backdrop {
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-border-style: solid;
      --tw-shadow: 0 0 #0000;
      --tw-shadow-color: initial;
      --tw-shadow-alpha: 100%;
      --tw-inset-shadow: 0 0 #0000;
      --tw-inset-shadow-color: initial;
      --tw-inset-shadow-alpha: 100%;
      --tw-ring-color: initial;
      --tw-ring-shadow: 0 0 #0000;
      --tw-inset-ring-color: initial;
      --tw-inset-ring-shadow: 0 0 #0000;
      --tw-ring-inset: initial;
      --tw-ring-offset-width: 0px;
      --tw-ring-offset-color: #fff;
      --tw-ring-offset-shadow: 0 0 #0000;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
      --tw-ease: initial;
    }
  }
}

@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --radius-sm: .25rem;
    --radius-md: .375rem;
    --radius-lg: .5rem;
    --shadow-sm: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
    --ease-out: cubic-bezier(0, 0, .2, 1);
    --ease-in-out: cubic-bezier(.4, 0, .2, 1);
    --default-transition-duration: .15s;
    --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
    --color-brand: #f02d5e;
    --color-primary: #171717;
    --color-primary-hover: #0a0a0a;
    --color-primary-light: #f5f5f5;
    --color-primary-dark: #171717;
    --color-primary-pressed: #262626;
    --color-surface: #fff;
    --color-surface-secondary: #fafafa;
    --color-surface-hover: #f5f5f5;
    --color-border: #e5e5e5;
    --color-border-light: #f5f5f5;
    --color-text-primary: #0a0a0a;
    --color-text-secondary: #737373;
    --color-text-muted: #737373;
    --color-text-disabled: #d4d4d4;
    --color-status-active: #10b981;
    --color-status-active-text: #047857;
    --color-status-active-bg: #ecfdf5;
    --color-status-paused: #f59e0b;
    --color-status-paused-bg: #fffbeb;
    --color-status-completed: #10b981;
    --color-status-completed-bg: #ecfdf5;
    --color-status-failed: #ef4444;
    --color-status-failed-bg: #fef2f2;
    --color-status-in-progress: #f59e0b;
    --color-status-in-progress-bg: #fffbeb;
    --color-status-incomplete: #6b7280;
    --color-status-incomplete-bg: #f3f4f6;
    --color-severity-critical: #b91c1c;
    --color-severity-critical-bg: #fef2f2;
    --color-severity-high: #c2410c;
    --color-severity-high-bg: #fff7ed;
    --color-severity-medium: #d97706;
    --color-severity-medium-bg: #fffbeb;
    --color-severity-low: #2563eb;
    --color-severity-low-bg: #eff6ff;
    --color-danger: #c93545;
    --color-danger-hover: #a02836;
    --color-danger-bg: #fdf4f3;
  }
}

@layer base {
  *, :after, :before, ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  html, :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    line-height: 1.5;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }

  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

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

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    vertical-align: middle;
    display: block;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  ::placeholder {
    opacity: 1;
  }

  @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentColor;
    }

    @supports (color: color-mix(in lab, red, red)) {
      ::placeholder {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-year-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-month-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-day-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-hour-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-minute-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-second-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-millisecond-field {
    padding-block: 0;
  }

  ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button, input:where([type="button"], [type="reset"], [type="submit"]) {
    appearance: button;
  }

  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  ::-webkit-outer-spin-button {
    height: auto;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer components;

@layer utilities {
  .collapse {
    visibility: collapse;
  }

  .invisible {
    visibility: hidden;
  }

  .visible {
    visibility: visible;
  }

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

  .absolute {
    position: absolute;
  }

  .fixed {
    position: fixed;
  }

  .relative {
    position: relative;
  }

  .static {
    position: static;
  }

  .container {
    width: 100%;
  }

  @media (min-width: 40rem) {
    .container {
      max-width: 40rem;
    }
  }

  @media (min-width: 48rem) {
    .container {
      max-width: 48rem;
    }
  }

  @media (min-width: 64rem) {
    .container {
      max-width: 64rem;
    }
  }

  @media (min-width: 80rem) {
    .container {
      max-width: 80rem;
    }
  }

  @media (min-width: 96rem) {
    .container {
      max-width: 96rem;
    }
  }

  .block {
    display: block;
  }

  .contents {
    display: contents;
  }

  .flex {
    display: flex;
  }

  .grid {
    display: grid;
  }

  .hidden {
    display: none;
  }

  .inline {
    display: inline;
  }

  .table {
    display: table;
  }

  .flex-shrink {
    flex-shrink: 1;
  }

  .transform {
    transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
  }

  .resize {
    resize: both;
  }

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

  .rounded {
    border-radius: .25rem;
  }

  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }

  .bg-surface {
    background-color: var(--color-surface);
  }

  .text-primary {
    color: var(--color-primary);
  }

  .uppercase {
    text-transform: uppercase;
  }

  .italic {
    font-style: italic;
  }

  .underline {
    text-decoration-line: underline;
  }

  .accent-primary {
    accent-color: var(--color-primary);
  }

  .shadow {
    --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .ring {
    --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .filter {
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }

  .ease-in-out {
    --tw-ease: var(--ease-in-out);
    transition-timing-function: var(--ease-in-out);
  }

  .ease-out {
    --tw-ease: var(--ease-out);
    transition-timing-function: var(--ease-out);
  }
}

:root {
  --color-bug-open: #b91c1c;
  --color-bug-open-bg: #fef2f2;
  --color-bug-fixed: #10b981;
  --color-bug-fixed-bg: #ecfdf5;
  --color-bug-wontfix: #6b7280;
  --color-bug-wontfix-bg: #f3f4f6;
  --color-bug-invalid: #b45309;
  --color-bug-invalid-bg: #fffbeb;
  --color-bug-reopened: #b91c1c;
  --color-bug-reopened-bg: #fef2f2;
  --shadow-card: 0 1px 2px #0000000a;
  --shadow-card-hover: 0 4px 12px #0000000f;
  --shadow-float: 0 4px 12px #00000014;
  --shadow-modal: 0 24px 48px #00000024;
  --overlay-scrim: #0a0a0a73;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --gradient-cta: linear-gradient(180deg, #262626 0%, #171717 100%);
  --color-code-bg: #1f2937;
  --color-code-text: #f1f5f9;
  --color-info-muted-bg: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  --color-info-muted-bg-hover: color-mix(in srgb, var(--color-primary) 18%, var(--color-surface));
  --primary: var(--color-primary);
  --danger: var(--color-danger);
  --success: var(--color-status-active);
  --warning: var(--color-status-paused);
  --border-color: var(--color-border);
  --surface-secondary: var(--color-surface-secondary);
  --surface-hover: var(--color-surface-hover);
  --surface-primary: var(--color-surface);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-tertiary: var(--color-text-muted);
  --text-muted: var(--color-text-muted);
  --accent-primary: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-pressed: var(--color-primary-pressed);
  --bg-base: var(--color-surface);
  --bg-surface: var(--color-surface-secondary);
  --bg-elevated: var(--color-surface-hover);
  --border-default: var(--color-border);
  --text-on-accent: #fafafa;
  --color-bg: var(--color-surface-secondary);
  --color-text: var(--color-text-primary);
  --color-info: var(--color-primary);
  --color-success: var(--color-status-active);
  --color-error: var(--color-danger);
  --color-error-bg: var(--color-danger-bg);
  --status-error: var(--color-danger);
  --status-error-bg: var(--color-danger-bg);
}

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

body {
  background-color: var(--color-surface-secondary);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizelegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-family: Inter, Inter Variable, SF Pro Display, -apple-system, system-ui, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
}

html, body, #root {
  height: 100%;
}

a {
  color: var(--color-text-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

input, textarea, select {
  font-family: inherit;
}

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

@property --tw-rotate-x {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-y {
  syntax: "*";
  inherits: false
}

@property --tw-rotate-z {
  syntax: "*";
  inherits: false
}

@property --tw-skew-x {
  syntax: "*";
  inherits: false
}

@property --tw-skew-y {
  syntax: "*";
  inherits: false
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-ring-inset {
  syntax: "*";
  inherits: false
}

@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0;
}

@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}

@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-blur {
  syntax: "*";
  inherits: false
}

@property --tw-brightness {
  syntax: "*";
  inherits: false
}

@property --tw-contrast {
  syntax: "*";
  inherits: false
}

@property --tw-grayscale {
  syntax: "*";
  inherits: false
}

@property --tw-hue-rotate {
  syntax: "*";
  inherits: false
}

@property --tw-invert {
  syntax: "*";
  inherits: false
}

@property --tw-opacity {
  syntax: "*";
  inherits: false
}

@property --tw-saturate {
  syntax: "*";
  inherits: false
}

@property --tw-sepia {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false
}

@property --tw-ease {
  syntax: "*";
  inherits: false
}
