:root {
  --primary: #5e6ad2;
  --primary-hover: #4854c2;
  --primary-focus: #5e69d1;
  --on-primary: #ffffff;
  --ink: #111113;
  --ink-muted: #444c56;
  --ink-subtle: #6b7380;
  --ink-tertiary: #9aa0aa;
  --canvas: #f7f8f8;
  --surface-1: #ffffff;
  --surface-2: #f0f1f3;
  --surface-3: #e4e6ea;
  --hairline: #e2e4e8;
  --hairline-strong: #cdd0d6;
  --success: #1f8f3f;
  --success-text: #1a7a32;
  --error-text: #c53030;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --backdrop: rgba(15, 16, 17, 0.45);
  --row-hover: rgba(0, 0, 0, 0.03);
  --overlay-subtle: rgba(0, 0, 0, 0.03);
  --focus-ring: rgba(94, 105, 209, 0.35);
  --panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  --loader-track: rgba(0, 0, 0, 0.06);
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --shadow-top: inset 0 1px 0 rgba(0, 0, 0, 0.04);
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #5e6ad2;
  --primary-hover: #828fff;
  --primary-focus: #5e69d1;
  --on-primary: #ffffff;
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;
  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --hairline: #23252a;
  --hairline-strong: #34343a;
  --success: #27a644;
  --success-text: #6ee787;
  --error-text: #f0a0a0;
  --nav-bg: rgba(1, 1, 2, 0.85);
  --backdrop: rgba(1, 1, 2, 0.82);
  --row-hover: rgba(255, 255, 255, 0.02);
  --overlay-subtle: rgba(255, 255, 255, 0.03);
  --focus-ring: rgba(94, 105, 209, 0.35);
  --panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --loader-track: rgba(255, 255, 255, 0.06);
  --shadow-top: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.05px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--primary);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.35);
}

.brand-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
  background: var(--surface-3);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12px;
  border: 1px solid var(--hairline);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-tertiary);
}

.status-badge.ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 8px rgba(39, 166, 68, 0.45);
}

.status-badge.warn .status-dot {
  background: #c9a227;
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  width: 100%;
}

@media (max-width: 720px) {
  .main {
    padding: 24px 16px 48px;
  }
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.headline {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1px;
}

.subhead {
  margin: 0;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-muted);
  letter-spacing: -0.1px;
}

.panel {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-top);
  padding: 24px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header-actions {
    justify-content: stretch;
  }

  .panel-header-actions .btn {
    flex: 1 1 auto;
  }
}

.panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.4px;
}

.panel-caption {
  margin: 0;
  font-size: 14px;
  color: var(--ink-subtle);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  margin-bottom: 16px;
}

.notice.ok {
  border-color: rgba(39, 166, 68, 0.35);
  background: rgba(39, 166, 68, 0.08);
}

.notice.warn {
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
}

.notice-text {
  flex: 1;
  min-width: 220px;
  font-size: 14px;
  color: var(--ink-muted);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

@media (max-width: 768px) {
  .search-form {
    grid-template-columns: 1fr;
  }
}

.text-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input::placeholder {
  color: var(--ink-tertiary);
}

.text-input:focus {
  border-color: var(--hairline-strong);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--surface-1);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

#furtherBtn {
  background: rgba(94, 106, 210, 0.14);
  border-color: rgba(94, 106, 210, 0.45);
  color: #aab2ff;
}

#refreshSearchBtn {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.45);
  color: #67e8f9;
}

#refreshSearchBtn:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.24);
  border-color: rgba(6, 182, 212, 0.7);
  color: #a5f3fc;
}

#furtherBtn:hover:not(:disabled) {
  background: rgba(94, 106, 210, 0.24);
  border-color: rgba(94, 106, 210, 0.7);
  color: #c2c8ff;
}

#aiKeywordsBtn {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.45);
  color: #5eead4;
}

#aiKeywordsBtn:hover:not(:disabled) {
  background: rgba(20, 184, 166, 0.24);
  border-color: rgba(20, 184, 166, 0.7);
  color: #99f6e4;
}

#bulkDetailsBtn {
  background: rgba(217, 119, 6, 0.16);
  border-color: rgba(217, 119, 6, 0.5);
  color: #fbbf60;
}

#bulkDetailsBtn:hover:not(:disabled) {
  background: rgba(217, 119, 6, 0.26);
  border-color: rgba(217, 119, 6, 0.75);
  color: #fcd285;
}

#aiBrandsBtn {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.5);
  color: #d8b4fe;
}

#aiBrandsBtn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.26);
  border-color: rgba(168, 85, 247, 0.75);
  color: #e9d5ff;
}

.btn-compact {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
}

.btn-with-icon {
  gap: 8px;
}

.btn-icon {
  flex-shrink: 0;
}

.get-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.details-cell {
  width: 124px;
}

.details-cell .get-details-btn,
.details-cell .remove-product-btn {
  display: flex;
  width: 100%;
}

.details-cell .remove-product-btn {
  margin-top: 6px;
}

.remove-product-btn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  background: rgba(229, 72, 77, 0.1);
  border-color: rgba(229, 72, 77, 0.35);
  color: #f1707a;
}

.remove-product-btn:hover:not(:disabled) {
  background: rgba(229, 72, 77, 0.18);
  border-color: rgba(229, 72, 77, 0.55);
  color: #ff8089;
}

.details-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.details-btn-icon-pending {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--success);
  border-radius: 50%;
  opacity: 0.9;
}

.details-btn-icon-cached {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(94, 106, 210, 0.2);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.get-details-btn.details-cached {
  background: rgba(94, 106, 210, 0.12);
  border-color: rgba(94, 106, 210, 0.45);
  color: var(--primary);
}

.get-details-btn.details-cached:hover:not(:disabled) {
  background: rgba(94, 106, 210, 0.18);
  border-color: rgba(94, 106, 210, 0.6);
  color: var(--primary-hover);
}

.get-details-btn.details-pending {
  background: rgba(39, 166, 68, 0.1);
  border-color: rgba(39, 166, 68, 0.35);
  color: var(--success);
}

.get-details-btn.details-pending:hover:not(:disabled) {
  background: rgba(39, 166, 68, 0.16);
  border-color: rgba(39, 166, 68, 0.5);
}

.status-line {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-subtle);
  min-height: 20px;
}

.results-panel {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  background: var(--surface-3);
  border-bottom: 1px solid var(--hairline);
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.sort-btn:hover {
  color: var(--ink);
}

.sort-btn.active {
  color: var(--ink);
}

.sort-indicator {
  display: inline-block;
  width: 0;
  height: 0;
  opacity: 0.35;
}

.sort-btn.active .sort-indicator {
  opacity: 1;
}

.sort-btn[data-direction="asc"] .sort-indicator {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
}

.sort-btn[data-direction="desc"] .sort-indicator {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

tbody td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-muted);
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody tr.best-seller-row {
  background: rgba(94, 106, 210, 0.1);
  box-shadow: inset 3px 0 0 var(--primary);
}

tbody tr.best-seller-row:hover {
  background: rgba(94, 106, 210, 0.14);
}

.results-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-swatch-best-seller {
  background: rgba(94, 106, 210, 0.1);
  box-shadow: inset 3px 0 0 var(--primary);
  border: 1px solid rgba(94, 106, 210, 0.35);
}

.legend-swatch-details-cached {
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.45);
}

.legend-swatch-details-pending {
  background: rgba(39, 166, 68, 0.1);
  border: 1px solid rgba(39, 166, 68, 0.35);
}

tbody tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

.title-cell {
  max-width: 320px;
  color: var(--ink);
  line-height: 1.45;
}

.product-title-text {
  display: block;
}

.monthly-purchases {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-subtle);
}

.variation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.var-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.var-chip-size {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
}

.var-chip-options {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--hairline);
  color: var(--ink-subtle);
}

.var-chip-icon {
  font-size: 10px;
  line-height: 1;
  opacity: 0.85;
}

.thumb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.thumb-link:hover .thumb {
  border-color: rgba(94, 106, 210, 0.55);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.25);
}

.thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
}

.link-chip {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.keywords-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.keywords-column {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.keyword-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #d8e0ff;
  background: rgba(94, 106, 210, 0.14);
  border: 1px solid rgba(94, 106, 210, 0.35);
}

@media (max-width: 760px) {
  .keywords-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  box-shadow: var(--shadow-top);
}

.metric-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.metric-value {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.brand-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.brand-dominance-layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.brand-chart-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.brand-donut-chart {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
}

.brand-chart-total-label,
.brand-chart-total-value {
  fill: var(--ink-subtle);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
}

.brand-chart-total-value {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.brand-list-compact {
  min-width: 0;
}

.brand-list-compact .brand-item {
  grid-template-columns:
    10px
    minmax(72px, 1fr)
    64px
    44px
    56px
    76px
    64px;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  align-items: center;
}

.brand-list-compact .brand-bar-wrap {
  width: 64px;
  max-width: 64px;
  height: 6px;
}

.brand-list-compact .brand-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary-hover);
  white-space: nowrap;
  text-align: right;
}

.brand-list-compact .brand-tier-low .brand-pct {
  color: var(--ink-subtle);
}

.brand-item-header {
  border: none;
  background: transparent;
  padding: 0 12px 6px;
  box-shadow: none;
}

.brand-item-header.brand-tier-high,
.brand-item-header.brand-tier-mid,
.brand-item-header.brand-tier-low {
  border: none;
  background: transparent;
}

.brand-col-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  white-space: nowrap;
}

.brand-col-label.brand-col-numeric {
  text-align: center;
}

.brand-col-label.brand-col-highlight {
  text-align: center;
  color: var(--ink-muted);
}

.brand-listings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  color: var(--ink-subtle);
  background: transparent;
  border: 1px dashed var(--hairline);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 56px;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.brand-pill-price {
  color: #b8c0ff;
  background: rgba(94, 106, 210, 0.18);
  border: 1px solid rgba(94, 106, 210, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-pill-trust-success {
  color: #75e0a0;
  background: rgba(25, 135, 84, 0.28);
  border: 1px solid rgba(25, 135, 84, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-pill-trust-warning {
  color: #ffe566;
  background: rgba(255, 193, 7, 0.22);
  border: 1px solid rgba(255, 193, 7, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-pill-trust-orange {
  color: #ffb07a;
  background: rgba(253, 126, 20, 0.24);
  border: 1px solid rgba(253, 126, 20, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-pill-trust-danger {
  color: #ff9b9b;
  background: rgba(220, 53, 69, 0.24);
  border: 1px solid rgba(220, 53, 69, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.trust-score-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.trust-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.trust-legend-pill {
  min-width: 52px;
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
  pointer-events: none;
}

.trust-legend-copy {
  white-space: nowrap;
}

.brand-pill-muted {
  color: var(--ink-subtle);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  font-weight: 500;
}

.brand-list-compact .brand-tier-high {
  border-color: rgba(94, 106, 210, 0.28);
  background: rgba(94, 106, 210, 0.04);
}

.brand-list-compact .brand-tier-mid,
.brand-list-compact .brand-tier-low {
  border-color: var(--hairline);
  background: var(--surface-2);
}

.brand-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: center;
}

.brand-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .brand-dominance-layout {
    grid-template-columns: 1fr;
  }

  .brand-chart-panel {
    max-width: 220px;
    margin: 0 auto;
  }

  .brand-list-compact {
    overflow-x: auto;
  }

  .brand-list-compact .brand-item {
    min-width: 520px;
  }
}

.brand-item {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) minmax(120px, 2fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 14px;
}

.brand-tier-high {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.08);
}

.brand-tier-mid {
  border-color: rgba(94, 106, 210, 0.28);
  background: rgba(94, 106, 210, 0.05);
}

.brand-tier-low {
  border-color: var(--hairline);
  background: var(--surface-2);
}

.brand-name {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-bar-wrap {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.brand-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.2s ease;
}

.brand-tier-high .brand-bar {
  background: var(--primary-hover);
  opacity: 0.95;
}

.brand-tier-mid .brand-bar {
  background: var(--primary);
  opacity: 0.75;
}

.brand-tier-low .brand-bar {
  background: var(--brand-secure, #7a7fad);
  opacity: 0.55;
}

.brand-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-hover);
  white-space: nowrap;
}

.brand-tier-low .brand-pct {
  color: var(--ink-subtle);
}

.metrics-grid-compact {
  margin-bottom: 12px;
}

.metrics-grid-compact .metric-card {
  padding: 12px;
}

.metrics-grid-compact .metric-value {
  font-size: 22px;
}

.history-further-caption {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-subtle);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-subtle);
  font-size: 14px;
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-subtle);
  font-size: 12px;
}

.accordion {
  display: grid;
  gap: 8px;
}

.accordion-item {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
}

.accordion-item-head {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-right: 8px;
}

.accordion-item-head .accordion-trigger {
  flex: 1;
  min-width: 0;
  width: auto;
}

.accordion-delete-btn {
  align-self: center;
  flex-shrink: 0;
  color: #f0a8a8;
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.08);
}

.accordion-delete-btn:hover:not(:disabled) {
  color: #f5bcbc;
  border-color: rgba(220, 53, 69, 0.55);
  background: rgba(220, 53, 69, 0.14);
}

.accordion-header-actions {
  text-align: center;
}

.accordion-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 0.9fr 0.8fr 24px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.02);
}

.accordion-trigger[aria-expanded="true"] {
  background: var(--surface-3);
  border-bottom: 1px solid var(--hairline);
}

.accordion-head {
  display: contents;
}

.accordion-col-label {
  display: none;
}

.accordion-header-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 0.9fr 0.8fr 24px 84px;
  gap: 12px;
  padding: 0 16px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ink-subtle);
}

.accordion-keyword {
  font-weight: 500;
  color: var(--ink);
}

.accordion-meta {
  font-size: 13px;
  color: var(--ink-muted);
}

.accordion-chevron {
  color: var(--ink-subtle);
  transition: transform 0.15s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 16px;
}

.accordion-details {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.accordion-details a {
  word-break: break-all;
}

.history-table {
  font-size: 13px;
}

.history-table th,
.history-table td {
  padding: 8px 10px;
}

.pill-ai {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  border: 1px solid var(--hairline);
  color: var(--ink-subtle);
}

.pill-ai.done {
  border-color: rgba(94, 106, 210, 0.45);
  color: var(--primary-hover);
}

@media (max-width: 900px) {
  .accordion-header-row {
    display: none;
  }

  .accordion-trigger {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .accordion-col-label {
    display: inline;
    color: var(--ink-subtle);
    margin-right: 6px;
    font-size: 11px;
    text-transform: uppercase;
  }
}

body.modal-open {
  overflow: hidden;
}

body.loader-open {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page-loader.hidden {
  display: none;
}

.page-loader-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
}

.page-loader-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  box-shadow: var(--panel-shadow);
}

.page-loader-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.page-loader-status {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
  min-height: 40px;
}

.page-loader-bar-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--loader-track);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.page-loader-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  transition: width 0.35s ease;
}

.page-loader-pct {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-hover);
  text-align: right;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-modal.hidden {
  display: none;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(4px);
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  box-shadow: var(--shadow-lg, var(--panel-shadow));
}

.image-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.image-modal-close:hover {
  color: var(--ink);
  border-color: rgba(94, 106, 210, 0.45);
}

.image-modal-title {
  margin: 0 40px 16px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.image-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  overflow: auto;
}

.image-modal-img {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}

.product-details-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.product-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.product-details-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
}

.product-details-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  white-space: nowrap;
}

.product-details-badge.cached {
  border-color: rgba(94, 106, 210, 0.35);
  color: var(--primary-hover);
}

.product-details-badge.fresh {
  border-color: rgba(39, 166, 68, 0.35);
  color: #6dd58a;
}

.product-details-body {
  display: grid;
  gap: 16px;
}

.product-details-section {
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.product-details-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.product-details-list {
  margin: 0;
}

.product-details-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.product-details-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.product-details-row dt {
  margin: 0;
  font-size: 12px;
  color: var(--ink-subtle);
}

.product-details-row dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}

.product-details-row dd a {
  color: var(--primary-hover);
  text-decoration: none;
}

.product-details-row dd a:hover {
  text-decoration: underline;
}

.product-details-pill {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.product-details-pill.aplus-yes {
  background: rgba(94, 106, 210, 0.14);
  border: 1px solid rgba(94, 106, 210, 0.35);
  color: var(--primary-hover);
}

.product-details-pill.aplus-no {
  background: var(--overlay-subtle);
  border: 1px solid var(--hairline);
  color: var(--ink-subtle);
}

.product-details-rank {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}

.product-details-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
}

.product-details-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.notification-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.bulk-toast {
  pointer-events: auto;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  animation: bulk-toast-in 0.2s ease;
}

.bulk-toast.scraped,
.bulk-toast.cached,
.bulk-toast.completed {
  border-color: rgba(39, 166, 68, 0.45);
}

.bulk-toast.failed,
.bulk-toast.cancelled {
  border-color: rgba(220, 90, 90, 0.45);
}

.bulk-toast.cancelling {
  border-color: rgba(255, 180, 80, 0.45);
}

@keyframes bulk-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bulk-details-panel {
  width: min(760px, 100%);
}

.bulk-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bulk-details-progress-wrap {
  margin-bottom: 14px;
}

.bulk-details-activity-log {
  flex: 1;
  min-height: 220px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.bulk-activity-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--overlay-subtle);
  font-size: 13px;
  line-height: 1.45;
}

.bulk-activity-item:last-child {
  border-bottom: none;
}

.bulk-activity-time {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
}

.bulk-activity-message {
  color: var(--ink-muted);
}

.bulk-activity-message.success {
  color: var(--ink);
}

.bulk-activity-message.error {
  color: var(--error-text);
}

.bulk-details-footer {
  justify-content: flex-end;
  gap: 8px;
}

/* --- Navigation tabs --- */

.top-nav-start {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-subtle);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--ink-muted);
  background: var(--surface-2);
}

.nav-tab.active {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--hairline);
}

@media (max-width: 720px) {
  .top-nav {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }

  .top-nav-start {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .nav-tabs {
    flex-wrap: wrap;
  }
}

/* --- Helium 10 analyzer --- */

.helium-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: 8px;
}

.helium-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .helium-actions .btn {
    flex: 1 1 100%;
  }
}

.helium-promo-banner {
  position: relative;
  margin-top: 20px;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(94, 106, 210, 0.45);
  background: linear-gradient(
    115deg,
    rgba(94, 106, 210, 0.18) 0%,
    rgba(94, 106, 210, 0.06) 42%,
    rgba(6, 182, 212, 0.08) 100%
  );
}

.helium-promo-banner-glow {
  position: absolute;
  top: -40%;
  right: -8%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.helium-promo-banner-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
}

.helium-promo-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(94, 106, 210, 0.22);
  color: var(--primary-hover);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.35);
}

.helium-promo-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.helium-promo-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
}

@media (max-width: 600px) {
  .helium-promo-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .helium-promo-icon {
    width: 36px;
    height: 36px;
  }

  .helium-tool-criteria-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .helium-tool-criterion-rule {
    white-space: normal;
  }
}

.helium-tool-guide {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.helium-tool-guide-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.helium-tool-guide-caption {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-subtle);
  line-height: 1.45;
}

.helium-tool-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.helium-tool-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.helium-tool-card-blackbox {
  border-left: 3px solid #06b6d4;
}

.helium-tool-card-xray {
  border-left: 3px solid var(--primary);
}

.helium-tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.helium-tool-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.helium-tool-card-blackbox .helium-tool-badge {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #0891b2;
}

[data-theme="dark"] .helium-tool-card-blackbox .helium-tool-badge {
  color: #67e8f9;
}

.helium-tool-card-xray .helium-tool-badge {
  background: rgba(94, 106, 210, 0.14);
  border: 1px solid rgba(94, 106, 210, 0.4);
  color: var(--primary-hover);
}

.helium-tool-source {
  font-size: 11px;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.helium-tool-criteria-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.helium-tool-criteria-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--overlay-subtle);
  border: 1px solid var(--hairline);
}

.helium-tool-criterion-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.helium-tool-criterion-rule {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  white-space: nowrap;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  margin-top: 4px;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--ink-subtle);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--primary);
  background: rgba(94, 106, 210, 0.06);
  color: var(--ink-muted);
  outline: none;
}

.dropzone.dragover {
  border-color: var(--primary-hover);
  background: rgba(94, 106, 210, 0.1);
  color: var(--ink);
}

.dropzone-icon {
  color: var(--ink-tertiary);
}

.dropzone-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}

.dropzone-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-subtle);
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.file-chip-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-meta {
  font-size: 12px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
}

.file-chip-clear {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-subtle);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.file-chip-clear:hover {
  color: var(--ink);
}

.status-line-error {
  color: var(--error-text);
}

.verdict-banner {
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--hairline);
}

.verdict-pass {
  background: linear-gradient(135deg, rgba(39, 166, 68, 0.14) 0%, rgba(39, 166, 68, 0.04) 100%);
  border-color: rgba(39, 166, 68, 0.35);
}

.verdict-fail {
  background: linear-gradient(135deg, rgba(220, 80, 80, 0.14) 0%, rgba(220, 80, 80, 0.04) 100%);
  border-color: rgba(220, 80, 80, 0.35);
}

.verdict-content {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.verdict-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
}

.verdict-pass .verdict-icon {
  background: rgba(39, 166, 68, 0.2);
  color: var(--success-text);
}

.verdict-fail .verdict-icon {
  background: rgba(220, 80, 80, 0.2);
  color: var(--error-text);
}

.verdict-label {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.verdict-pass .verdict-label {
  color: var(--success-text);
}

.verdict-fail .verdict-label {
  color: var(--error-text);
}

.verdict-subtitle {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--ink-muted);
}

.verdict-meta {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
}

.verdict-warning {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 180, 60, 0.15);
  color: #ffc966;
  font-size: 11px;
  font-weight: 500;
}

.helium-summary-grid {
  margin-bottom: 24px;
}

.helium-section-heading {
  margin: 24px 0 12px;
  font-weight: 600;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.criterion-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}

.criterion-pass {
  border-left: 3px solid var(--success);
}

.criterion-fail {
  border-left: 3px solid #dc5050;
}

.criterion-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.criterion-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.criterion-pass .criterion-icon {
  background: rgba(39, 166, 68, 0.18);
  color: var(--success-text);
}

.criterion-fail .criterion-icon {
  background: rgba(220, 80, 80, 0.18);
  color: var(--error-text);
}

.criterion-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.criterion-expected {
  margin: 0;
  font-size: 12px;
  color: var(--ink-subtle);
}

.criterion-actual {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--ink);
}

.criterion-details {
  margin-top: 10px;
  font-size: 12px;
}

.criterion-details summary {
  cursor: pointer;
  color: var(--ink-subtle);
}

.criterion-details ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
}

.criterion-details li {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.helium-table td.mono,
.helium-table th:nth-child(2) {
  font-family: var(--font-mono);
  font-size: 12px;
}

.helium-row-fail {
  border-left: 3px solid rgba(220, 80, 80, 0.6);
}

.helium-row-fail td:first-child {
  padding-left: calc(12px - 3px);
}

/* --- Video tutorial modal --- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
}

.video-modal.hidden {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: clamp(14px, 2.5vw, 20px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  box-shadow: var(--panel-shadow);
}

.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:hover {
  color: var(--ink);
  border-color: rgba(94, 106, 210, 0.45);
}

.video-modal-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.video-modal-title {
  margin: 0 44px 14px 0;
  font-size: clamp(15px, 2.5vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.video-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-modal-player {
  display: block;
  width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  border-radius: var(--radius-lg);
  background: #000;
  border: 1px solid var(--hairline);
  object-fit: contain;
}

@media (max-width: 720px) {
  .video-modal-panel {
    max-height: calc(100dvh - 16px);
  }

  .video-modal-player {
    max-height: calc(100dvh - 120px);
  }

  .panel {
    padding: 18px 16px;
  }

  .headline {
    font-size: clamp(24px, 7vw, 32px);
  }

  .subhead {
    font-size: 16px;
  }
}
