/* ─── Strategic Readiness Dashboard (Analysis Page) ─── */

/* ─── Ultra-Premium Strategic Dashboard ─── */

.analysis-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 1;
}

/* Background Aurora */
.glow-bg {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 108, 250, 0.15) 0%, rgba(0,0,0,0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* ── Bento Box Grid (Hero) ── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "diet";
  gap: 20px;
}
@media (max-width: 800px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "diet";
  }
}

.bento-card {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(124, 108, 250, 0.15);
}

.bento-primary {
  justify-content: center;
  align-items: center;
  padding: 48px;
  background: linear-gradient(180deg, #09090b 0%, #111114 100%);
}

.bento-header {
  width: 100%;
  margin-bottom: auto;
}
.bento-primary .bento-header {
  text-align: center;
  margin-bottom: 30px;
}

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #fff;
  letter-spacing: -0.02em;
}

.bento-subtext {
  font-size: 0.85rem;
  color: #a1a1aa; /* Cool gray */
  margin: 0;
  line-height: 1.4;
}

/* Diet Bar */
.diet-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: auto;
  margin-bottom: 12px;
  background: var(--bg-dark);
}
.diet-segment {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.diet-easy { background: var(--easy); }
.diet-medium { background: var(--medium); }
.diet-hard { background: var(--hard); }

.diet-legend {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Circular Chart */
.circle-chart {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 20px auto;
  filter: drop-shadow(0 0 20px rgba(124, 108, 250, 0.2));
}
.circle-chart-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.04em;
}
.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}
.circle-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 2.5;
}
.circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), stroke 0.3s;
}

.curation-val {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin: auto 0;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}

.premium-status-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Hitlist Section (Premium Grid) ── */
.hitlist-section {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.section-header {
  margin-bottom: 30px;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  color: #fff;
}
.section-desc {
  font-size: 0.9rem;
  color: #a1a1aa;
  margin: 0;
}

.hitlist-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.segmented-control {
  display: flex;
  background: rgba(25, 25, 30, 0.6);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}
.segmented-control .segment {
  background: transparent;
  border: none;
  color: #a1a1aa;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.segmented-control .segment.active {
  background: #27272a; /* iOS style physical toggle */
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.segmented-control .segment-pure-sheet {
  border: 1px solid rgba(124, 108, 250, 0.35);
  color: #c4b5fd;
  background: rgba(124, 108, 250, 0.08);
}
.segmented-control .segment-pure-sheet:hover {
  background: rgba(124, 108, 250, 0.18);
  color: #fff;
}
.segmented-control .segment-pure-sheet.active {
  background: linear-gradient(135deg, rgba(124, 108, 250, 0.4) 0%, rgba(99, 102, 241, 0.3) 100%);
  color: #fff;
  border-color: rgba(124, 108, 250, 0.6);
  box-shadow: 0 0 12px rgba(124, 108, 250, 0.3);
}

/* Keep the preset definitions discoverable without adding another panel. */
.segment-with-tooltip {
  position: relative;
  z-index: 2;
}
.segment-with-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  width: max-content;
  max-width: min(330px, calc(100vw - 40px));
  padding: 10px 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  background: rgba(15, 13, 22, 0.98);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.03);
  color: #d9d1ef;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}
.segment-with-tooltip:hover::after,
.segment-with-tooltip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ── Premium Custom Dropdowns ── */
.premium-dropdown {
  position: relative;
  user-select: none;
}
#topic-filter-wrapper {
  min-width: 220px;
}
.premium-dropdown-trigger {
  background: rgba(25, 25, 30, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
  color: #a1a1aa;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.premium-dropdown-trigger:hover,
.premium-dropdown.open .premium-dropdown-trigger {
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.premium-dropdown.open .premium-dropdown-trigger {
  box-shadow: 0 0 0 2px rgba(124, 108, 250, 0.2);
}

.premium-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 100;
  flex-direction: column;
  padding: 6px;
}
.premium-dropdown.open .premium-dropdown-menu {
  display: flex;
}
.premium-dropdown-item {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #a1a1aa;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.premium-dropdown-item:hover {
  background: rgba(124, 108, 250, 0.15);
  color: #fff;
}
.premium-dropdown-item.active {
  background: rgba(124, 108, 250, 0.25);
  color: #fff;
}
.premium-dropdown.dropdown-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* ── Curated Study Sheet Banner & Badges ── */
.sheet-progress-banner {
  background: linear-gradient(135deg, rgba(124, 108, 250, 0.1) 0%, rgba(20, 20, 26, 0.8) 100%);
  border: 1px solid rgba(124, 108, 250, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.sheet-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.sheet-progress-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sheet-banner-badge {
  background: rgba(124, 108, 250, 0.22);
  color: #c4b5fd;
  border: 1px solid rgba(124, 108, 250, 0.4);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.sheet-banner-stat {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f4f4f5;
}
.sheet-diff-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
.diff-pill {
  padding: 2px 8px;
  border-radius: 4px;
}
.diff-easy-pill {
  color: var(--easy);
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.25);
}
.diff-medium-pill {
  color: var(--medium);
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.25);
}
.diff-hard-pill {
  color: var(--hard);
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.25);
}
.sheet-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.sheet-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c6cfa 0%, #2ecc71 100%);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-category-badge {
  display: inline-block;
  background: rgba(124, 108, 250, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(124, 108, 250, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.hitlist-table-container {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
}
.hitlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.hitlist-table th, .hitlist-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.03); /* Whisper thin lines */
}
.hitlist-table th {
  background: rgba(255,255,255,0.02);
  color: #71717a; /* Muted gray */
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hitlist-table tr:last-child td {
  border-bottom: none;
}
.hitlist-table tbody tr {
  transition: background 0.2s;
}
.hitlist-table tbody tr:hover {
  background: rgba(255,255,255,0.03); /* Subtle row highlight */
}

.rank-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 4px; /* Squircle */
  font-size: 0.75rem;
  font-weight: 600;
  color: #a1a1aa;
}

.pb-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}
/* Neon dot statuses */
.status-pill {
  position: relative;
  padding-left: 16px;
  color: #a1a1aa;
}
.status-pill::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-pill.unsolved::before {
  background: #52525b; /* muted gray dot */
}
.status-pill.solved {
  color: #2ecc71; /* Emerald */
}
.status-pill.solved::before {
  background: #2ecc71;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

/* ── Hitlist Topic Tags ── */
.hitlist-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 300px;
}
.hitlist-topic-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  white-space: nowrap;
}
.hitlist-topic-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ── Insights Row ── */
.insights-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.insight-card {
  background: #09090b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}
.insight-card:hover {
  transform: translateY(-2px);
}
.insight-card h3 {
  font-size: 1.05rem;
  margin: 0 0 12px 0;
  color: #fff;
  padding-left: 32px;
}
.trap-icon {
  position: absolute;
  top: 22px;
  left: 20px;
  font-size: 1.1rem;
}
.trap-card { border-top: 2px solid #f39c12; }
.blind-card { border-top: 2px solid #ff4a4a; }

.insight-text {
  font-size: 0.85rem;
  color: #a1a1aa;
  line-height: 1.6;
}
.highlight-topic {
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Vulnerability Matrix ── */
.vulnerability-section {
  background: #09090b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.vuln-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.vuln-table th, .vuln-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.vuln-table th {
  color: #71717a;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.vuln-status {
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85rem;
}

.hidden { display: none !important; }

/* ── Custom Tags Input UI ── */
.custom-tags-input-wrapper {
  position: relative;
  min-width: 250px;
  max-width: 450px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  align-items: center;
  min-height: 36px;
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-tags-input-wrapper.open .tags-container,
.tags-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 108, 250, 0.2);
}

.company-pill {
  background: rgba(124, 108, 250, 0.15);
  border: 1px solid rgba(124, 108, 250, 0.3);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.company-pill-remove {
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-weight: bold;
  transition: color 0.15s;
}
.company-pill-remove:hover {
  color: #fc8174;
}

.invisible-search {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.85rem;
  min-width: 100px;
  padding: 2px 0;
}
.invisible-search::placeholder {
  color: var(--text-muted);
}

.custom-options-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-width: 250px;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 100;
  flex-direction: column;
}
.custom-tags-input-wrapper.open .custom-options-panel {
  display: flex;
}

.custom-options-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px 0;
}
.custom-options-list::-webkit-scrollbar { width: 6px; }
.custom-options-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.custom-option {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.85rem;
  color: var(--text-light);
}
.custom-option:hover {
  background: rgba(124, 108, 250, 0.2);
  color: #fff;
}

.loading-companies {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Mobile Responsive — Analysis Page ─── */
@media (max-width: 768px) {

  /* ── Container ── */
  .analysis-container { margin: 20px auto; gap: 24px; padding: 0 12px; }

  /* ── Bento Cards ── */
  .bento-card { padding: 20px; }
  .bento-primary { padding: 24px; }
  .bento-card h3 { font-size: 1rem; }
  .circle-chart { width: 110px; height: 110px; }
  .circle-chart-inner { font-size: 1.75rem; }
  .curation-val { font-size: 2.2rem; }
  .premium-status-badge { top: 14px; right: 14px; font-size: 0.6rem; padding: 4px 8px; }
  .diet-legend { flex-wrap: wrap; gap: 8px; font-size: 0.78rem; }

  /* ── Section Headers ── */
  .section-header h2 { font-size: 1.2rem; }
  .section-desc { font-size: 0.82rem; }

  /* ── Hitlist Section ── */
  .hitlist-section { padding: 20px 14px; }
  .hitlist-controls { gap: 10px; }

  /* Segmented control — wrap scope buttons */
  .segmented-control { flex-wrap: wrap; gap: 2px; }
  .segmented-control .segment { padding: 5px 10px; font-size: 0.72rem; }

  /* Dropdowns */
  .premium-dropdown-trigger { font-size: 0.75rem; padding: 6px 10px; }

  /* ── Hitlist Table ── */
  .hitlist-table { font-size: 0.8rem; }
  .hitlist-table th, .hitlist-table td { padding: 10px 8px; }
  .hitlist-table th { font-size: 0.65rem; }

  /* Hide Topics (3), Difficulty (4), Frequency (5) — keep only Rank, Problem, Status */
  .hitlist-table th:nth-child(3),
  .hitlist-table td:nth-child(3),
  .hitlist-table th:nth-child(4),
  .hitlist-table td:nth-child(4),
  .hitlist-table th:nth-child(5),
  .hitlist-table td:nth-child(5) { display: none !important; }

  /* Compact rank badge */
  .rank-badge { width: 20px; height: 20px; line-height: 20px; font-size: 0.65rem; }

  /* ── Unsolved Toggle ── */
  .unsolved-toggle-wrapper { font-size: 0.78rem; }

  /* ── Insights Row ── */
  .insights-row { grid-template-columns: 1fr; }
  .insight-card { padding: 18px; }
  .insight-card h3 { font-size: 0.95rem; padding-left: 28px; }
  .trap-icon { font-size: 1rem; top: 18px; left: 16px; }

  /* ── Vulnerability Matrix ── */
  .vulnerability-section { padding: 20px 14px; }
  .vuln-table { font-size: 0.8rem; }
  .vuln-table th, .vuln-table td { padding: 8px 8px; }
  .vuln-table th { font-size: 0.65rem; }

  /* ── Custom Tags Input ── */
  .custom-tags-input-wrapper { min-width: 150px; max-width: 100%; }
  .tags-container { padding: 5px 8px; min-height: 32px; }
  .invisible-search { min-width: 80px; font-size: 0.78rem; }
  .company-pill { font-size: 0.68rem; padding: 2px 6px; }

  /* ── Topic Filter Dropdown ── */
  #topic-filter-wrapper { min-width: 160px; }
}

/* ─── Strategic analysis visual layer ─── */
.analysis-container { max-width: 1380px; margin: 48px auto 70px; padding: 0 20px; gap: 22px; }
.analysis-intro { position: relative; z-index: 1; padding: 16px 8px 4px; }
.analysis-intro h1 { max-width: 720px; margin-bottom: 12px; }
.analysis-hero { grid-template-columns: repeat(2, 1fr); grid-template-areas: 'readiness diet'; gap: 14px; margin: 0; padding: 0; }
.analysis-hero .bento-card { min-height: 276px; padding: 26px; }
.analysis-hero .bento-primary { align-items: stretch; background: linear-gradient(145deg, rgba(31,23,56,0.82), rgba(10,9,17,0.88)); }
.analysis-hero .bento-primary::before { content: ''; position: absolute; width: 190px; height: 190px; right: -40px; top: -50px; border-radius: 50%; background: rgba(139,92,246,0.16); filter: blur(30px); }
.analysis-hero .bento-header { display: block; margin-bottom: 0; padding-right: 145px; }
.analysis-hero .bento-card h3 { margin: 0 0 5px; }
.analysis-hero .bento-header .bento-subtext { margin-top: 5px; }
.circle-chart { width: 158px; height: 158px; margin: 21px auto 16px; filter: drop-shadow(0 0 22px rgba(139,92,246,0.28)); }
.circle-chart-inner { font-family: 'JetBrains Mono', monospace; font-size: 2rem; }
.circle-bg { stroke: rgba(255,255,255,0.08); stroke-width: 2.4; }.circle { stroke: #9b78ff; stroke-width: 2.4; }
.premium-status-badge { top: 25px; right: 25px; color: #c9b9ff; background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.25); }
.analysis-hero .diet-bar { margin-top: auto; }.analysis-hero .diet-legend { margin-top: 12px; }

.hitlist-section, .vulnerability-section { padding: 27px; border-color: rgba(255,255,255,0.09); border-radius: 20px; background: rgba(10,9,14,0.72); backdrop-filter: blur(20px); box-shadow: var(--shadow-premium); }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }.section-header h2 { margin: 0 0 4px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.14rem; letter-spacing: -0.04em; }.section-desc { font-size: 0.76rem; color: var(--text-muted); }
.hitlist-controls { align-items: stretch; gap: 8px; margin-bottom: 18px; padding: 7px; border: 1px solid rgba(255,255,255,0.07); border-radius: 15px; background: rgba(255,255,255,0.025); }
.segmented-control { align-items: center; padding: 3px; border: 0; background: transparent; }.segmented-control .segment { padding: 8px 12px; font-size: 0.7rem; border-radius: 9px; }.segmented-control .segment.active { color: #ddd3ff; background: rgba(139,92,246,0.21); box-shadow: inset 0 0 0 1px rgba(139,92,246,0.22); }
.hitlist-controls .premium-dropdown-trigger, .hitlist-controls .tags-container { height: 38px; border-radius: 10px; background: rgba(255,255,255,0.035); }.hitlist-controls .premium-dropdown-trigger { font-size: 0.7rem; }.tags-container { border-color: rgba(255,255,255,0.08); }.custom-tags-input-wrapper { max-width: 270px; }.custom-options-panel, .premium-dropdown-menu { background: rgba(15,13,22,0.96); border-color: rgba(255,255,255,0.12); box-shadow: 0 20px 45px rgba(0,0,0,0.45); }.company-pill { border-radius: 7px; }
.toggle-switch-lbl { color: var(--text-secondary) !important; font-size: 0.7rem !important; padding: 0 7px; }.toggle-switch-lbl input { accent-color: var(--accent); }
.hitlist-table-container, .table-container { border-color: rgba(255,255,255,0.07); border-radius: 14px; background: rgba(0,0,0,0.16); }.hitlist-table th, .vuln-table th { padding: 13px 15px; font-size: 0.61rem; color: var(--text-muted); background: rgba(255,255,255,0.025); }.hitlist-table td, .vuln-table td { padding: 14px 15px; border-bottom-color: rgba(255,255,255,0.045); }.hitlist-table tbody tr { transition: background 180ms ease, transform 180ms ease; }.hitlist-table tbody tr:hover { background: linear-gradient(90deg, rgba(139,92,246,0.10), rgba(255,255,255,0.025) 28%, transparent); }.hitlist-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }.rank-badge { border-radius: 7px; color: #b5adca; background: rgba(255,255,255,0.06); font-family: 'JetBrains Mono', monospace; }.hitlist-topic-tag { padding: 3px 7px; border-radius: 6px; color: #aaa0d1; background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.14); }.status-pill { font-size: 0.69rem; }.status-pill.solved { color: var(--easy); }

.insights-row { gap: 14px; }.insight-card { padding: 22px; border-color: rgba(255,255,255,0.09); border-radius: 18px; background: rgba(10,9,14,0.72); backdrop-filter: blur(20px); }.insight-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.16); }.trap-card { border-top: 2px solid var(--medium); background: linear-gradient(145deg, rgba(42,30,14,0.46), rgba(10,9,14,0.74)); }.blind-card { border-top: 2px solid var(--hard); background: linear-gradient(145deg, rgba(46,19,27,0.42), rgba(10,9,14,0.74)); }.insight-card h3 { padding-left: 31px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.91rem; }.trap-icon { top: 20px; left: 19px; }.insight-text { color: var(--text-secondary); font-size: 0.77rem; }.highlight-topic { color: #e8e1ff; background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.16); }
.vulnerability-section { padding-bottom: 18px; }.vuln-table th, .vuln-table td { padding: 13px 15px; }.vuln-table tbody tr:hover { background: rgba(255,255,255,0.025); }.vuln-status { border-radius: 7px; background: rgba(255,255,255,0.04); font-size: 0.69rem; }
.back-dashboard-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); text-decoration: none; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; font-size: 0.71rem; transition: 180ms ease; }.back-dashboard-link:hover { color: #fff; border-color: rgba(139,92,246,0.32); background: rgba(139,92,246,0.10); }.back-dashboard-link span { color: #b8a5ff; }

@media (max-width: 920px) { .analysis-container { margin-top: 30px; }.analysis-hero { grid-template-columns: 1fr 1fr; }.hitlist-controls { flex-wrap: wrap; }.segmented-control { flex-wrap: wrap; }.toggle-switch-lbl { margin-left: 0 !important; } }
@media (max-width: 600px) { .analysis-container { margin: 24px auto 48px; padding: 0 12px; gap: 15px; }.analysis-intro { padding: 7px 2px 4px; }.analysis-intro h1 { font-size: 2.3rem; }.analysis-hero { grid-template-columns: 1fr; grid-template-areas: 'readiness' 'diet'; }.analysis-hero .bento-card { min-height: 250px; padding: 21px; }.hitlist-section, .vulnerability-section { padding: 18px 13px; }.section-header { display: block; }.section-header h2 { font-size: 1rem; }.section-desc { margin-top: 6px; }.hitlist-controls { padding: 6px; }.segmented-control { width: 100%; }.segmented-control .segment { flex: 1; padding-inline: 7px; }.custom-tags-input-wrapper, #topic-filter-wrapper { width: 100%; max-width: none; }.hitlist-controls .premium-dropdown { flex: 1; }.hitlist-table { min-width: 620px; }.hitlist-table-container { overflow-x: auto; }.insight-card { padding: 18px; }.back-dashboard-link { padding: 7px 9px; font-size: 0.65rem; } }

/* Keep the readiness badge clear of the heading and subtitle. */
.analysis-hero .premium-status-badge { top: 24px; right: 24px; }
.analysis-hero .bento-primary .circle-chart { margin-top: 27px; }
.analysis-hero .hitlist-table th, .analysis-hero .hitlist-table td { vertical-align: middle; }

@media (max-width: 600px) {
  .analysis-hero .bento-header { padding-right: 115px; }
  .analysis-hero .bento-primary .circle-chart { margin-top: 30px; }
}

/* Keep long hitlist content inside its own column. */
.hitlist-table { table-layout: fixed; }
.hitlist-table th:nth-child(1), .hitlist-table td:nth-child(1) { width: 5%; }
.hitlist-table th:nth-child(2), .hitlist-table td:nth-child(2) { width: 37%; }
.hitlist-table th:nth-child(3), .hitlist-table td:nth-child(3) { width: 31%; }
.hitlist-table th:nth-child(4), .hitlist-table td:nth-child(4) { width: 10%; }
.hitlist-table th:nth-child(5), .hitlist-table td:nth-child(5) { width: 9%; }
.hitlist-table th:nth-child(6), .hitlist-table td:nth-child(6) { width: 8%; }
.hitlist-table td:nth-child(2) { overflow: visible; }
.hitlist-table td:nth-child(2) a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hitlist-topics { max-height: 48px; overflow: hidden; align-content: flex-start; }
.hitlist-table td:nth-child(4), .hitlist-table td:nth-child(5), .hitlist-table td:nth-child(6) { white-space: nowrap; }
.hitlist-table td.pb-status { display: table-cell; vertical-align: middle; }
.hitlist-table td.pb-status .status-pill { display: inline-flex; align-items: center; }
.hitlist-problem-title { min-width: 0; }
.hitlist-company-chips { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 8px; max-height: 24px; overflow: visible; }
.hitlist-company-chip, .hitlist-company-more { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(54,227,154,0.18); border-radius: 6px; background: rgba(54,227,154,0.07); color: #9edfc2; font-size: 0.61rem; line-height: 1.2; white-space: nowrap; }
.hitlist-company-more { position: relative; border-color: rgba(139,92,246,0.28); background: rgba(139,92,246,0.1); color: #c9b9ff; cursor: help; outline: none; }
.hitlist-company-more::before { content: ''; position: absolute; left: 0; top: 100%; width: 100%; height: 9px; }
.hitlist-company-more:hover, .hitlist-company-more:focus-visible { border-color: rgba(139,92,246,0.58); background: rgba(139,92,246,0.2); color: #fff; }
.hitlist-company-popover { position: absolute; left: 0; top: calc(100% + 9px); z-index: 20; display: flex; flex-direction: column; gap: 9px; width: 270px; padding: 12px; border: 1px solid rgba(139,92,246,0.3); border-radius: 12px; background: rgba(15,13,22,0.98); box-shadow: 0 18px 38px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.03); color: var(--text-light); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px); transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease; }
.hitlist-company-more:hover .hitlist-company-popover, .hitlist-company-more:focus-visible .hitlist-company-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.hitlist-company-popover-title { color: var(--text-muted); font-size: 0.61rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hitlist-company-popover-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 170px; overflow-y: auto; padding-right: 3px; }
.hitlist-company-popover-chip { padding: 4px 7px; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; background: rgba(255,255,255,0.05); color: #d8d0e9; font-size: 0.64rem; line-height: 1.2; }

@media (max-width: 600px) {
  .hitlist-table { min-width: 620px; }
  .hitlist-table th:nth-child(2), .hitlist-table td:nth-child(2) { width: 37%; }
  .hitlist-table th:nth-child(3), .hitlist-table td:nth-child(3) { width: 31%; }
}

/* ─── Final mobile layout pass ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .analysis-hero { grid-template-columns: 1fr; grid-template-areas: 'readiness' 'diet'; }
  .analysis-hero .bento-card { min-height: 0; }
}

@media (max-width: 600px) {
  .analysis-intro h1 { font-size: clamp(2rem, 10vw, 2.55rem); line-height: 1.02; }
  .analysis-intro p { font-size: 0.8rem; line-height: 1.65; }

  .analysis-hero { gap: 12px; }
  .analysis-hero .bento-card { padding: 18px; }
  .analysis-hero .bento-header { padding-right: 104px; }
  .analysis-hero .premium-status-badge { top: 18px; right: 18px; max-width: 98px; padding: 5px 8px; font-size: 0.56rem; text-align: center; }
  .analysis-hero .bento-primary .circle-chart { width: 126px; height: 126px; margin: 24px auto 12px; }
  .circle-chart-inner { font-size: 1.65rem; }
  .analysis-hero .diet-summary { margin-top: 25px; }

  .section-header { margin-bottom: 16px; }
  .section-header h2 { font-size: 0.98rem; }
  .section-desc { max-width: 34ch; font-size: 0.7rem; line-height: 1.55; }

  .hitlist-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 7px;
  }

  .hitlist-controls .segmented-control {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .hitlist-controls .segmented-control::-webkit-scrollbar { display: none; }
  .hitlist-controls .segmented-control .segment { flex: 0 0 auto; }
  .custom-tags-input-wrapper, #topic-filter-wrapper,
  .hitlist-controls .premium-dropdown, .toggle-switch-lbl { width: 100%; min-width: 0; max-width: none; }
  .custom-tags-input-wrapper, #topic-filter-wrapper { grid-column: 1 / -1; }
  .hitlist-controls .premium-dropdown { display: block; }
  .toggle-switch-lbl { grid-column: 1 / -1; justify-content: flex-start; min-height: 36px; }

  .hitlist-table-container, .table-container, .vulnerability-section .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hitlist-table, .vuln-table { min-width: 620px; }
  .hitlist-table th, .hitlist-table td, .vuln-table th, .vuln-table td { padding: 11px 10px; }
  .hitlist-company-popover { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: min(240px, 45vh); }
  .hitlist-company-popover-list { max-height: 155px; }
  .insights-row { grid-template-columns: 1fr; gap: 10px; }
  .insight-card { min-width: 0; }
}


/* ─── Unified Linear / Vercel Workspace Overrides ────────────────────────── */
.analysis-container {
  max-width: 1280px;
  margin: 24px auto 64px;
  padding: 0 24px;
  gap: 18px;
}

.analysis-workspace-header {
  margin-bottom: 0;
}

.analysis-workspace-header h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0;
}

.analysis-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.analysis-summary-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.analysis-summary-cell:last-child {
  border-right: 0;
}

.analysis-readiness-cell {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.compact-analysis-ring {
  width: 64px;
  height: 64px;
  margin: 0;
  flex-shrink: 0;
  filter: none;
}

.compact-analysis-ring .circle-chart-inner {
  font-size: 0.92rem;
}

.analysis-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analysis-summary-topline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-status-badge {
  position: static !important;
  padding: 2px 8px;
  font-size: 0.68rem;
  border-radius: 6px;
}

.analysis-diet-cell .diet-bar {
  margin: 2px 0;
}

.analysis-diet-cell .diet-legend {
  margin-top: 2px;
  font-size: 0.76rem;
}

.hitlist-section,
.vulnerability-section,
.insight-card {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
  padding: 20px;
}

.insight-card:hover {
  transform: none;
  border-color: var(--border-light);
}

.trap-card,
.blind-card {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}

.hitlist-controls {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
}

.hitlist-table-container,
.table-container {
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hitlist-table tbody tr:hover,
.vuln-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025) !important;
}

.hitlist-table tbody tr:hover td:first-child {
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .analysis-container {
    padding: 0 12px;
  }
  .analysis-summary-strip {
    grid-template-columns: 1fr;
  }
  .analysis-summary-cell {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .analysis-summary-cell:last-child {
    border-bottom: 0;
  }
}

/* ─── Hitlist Redesign: 2-Tier Controls & Calm Scannable Rows ─────────────── */
.hitlist-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-header-copy h2 {
  margin: 0 0 3px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-header-copy .section-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hitlist-progress-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.hitlist-progress-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hitlist-progress-bar {
  width: 72px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hitlist-progress-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--easy);
  transition: width 0.35s ease;
}

.hitlist-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 16px;
}

.hitlist-scope-row {
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: visible;
}

.hitlist-scope-row .segmented-control {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 4px;
  flex-wrap: wrap;
}

.hitlist-scope-row .segmented-control .segment {
  padding: 9px 13px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hitlist-scope-row .segmented-control .segment:hover {
  color: var(--text-primary);
}

.hitlist-scope-row .segmented-control .segment.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.hitlist-scope-row .segmented-control .segment-pure-sheet {
  border: 0;
  border-bottom: 2px solid transparent;
  color: #c4b5fd;
  background: transparent;
}

.hitlist-scope-row .segmented-control .segment-pure-sheet.active {
  border-bottom-color: var(--accent);
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.hitlist-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hitlist-filter-row .premium-dropdown-trigger {
  height: 34px;
  border-radius: 7px;
  background: var(--bg-void);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  padding: 0 10px;
}

.hitlist-filter-row .tags-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 34px;
  height: auto;
  border-radius: 7px;
  background: var(--bg-void);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  padding: 4px 10px;
}

.hitlist-filter-row .invisible-search {
  height: 22px;
  line-height: 22px;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
}

.hitlist-filter-row #topic-filter-wrapper {
  min-width: 190px;
}

#topic-placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
  margin-right: 6px;
}

.toggle-switch-lbl {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
  user-select: none;
  padding: 0 4px !important;
  position: relative;
}

.toggle-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-track {
  width: 30px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d4d4d8;
  transition: transform 0.18s ease, background 0.18s ease;
}

.toggle-switch-input:checked + .toggle-switch-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch-input:checked + .toggle-switch-track::after {
  transform: translateX(13px);
  background: #fff;
}

.toggle-switch-input:focus-visible + .toggle-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Calm Table Rows */
.hitlist-table th,
.hitlist-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.hitlist-table th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.rank-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.hitlist-problem-title a {
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.hitlist-problem-title a:hover {
  color: #c4b5fd;
}

.hitlist-company-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hitlist-company-names {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hitlist-company-more-inline {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.71rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: help;
  white-space: nowrap;
  flex-shrink: 0;
}

.hitlist-company-more-inline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 9px;
}

.hitlist-company-more-inline:hover,
.hitlist-company-more-inline:focus-visible {
  border-color: rgba(124, 108, 250, 0.45);
  color: #fff;
}

.hitlist-company-more-inline:hover .hitlist-company-popover,
.hitlist-company-more-inline:focus-visible .hitlist-company-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.hitlist-topics {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  max-height: none;
  overflow: hidden;
}

/* 7-column layout overrides for Pure Sheet mode */
.hitlist-table.is-pure-sheet th:nth-child(1),
.hitlist-table.is-pure-sheet td:nth-child(1) { width: 5%; }
.hitlist-table.is-pure-sheet th:nth-child(2),
.hitlist-table.is-pure-sheet td:nth-child(2) { width: 28%; }
.hitlist-table.is-pure-sheet th:nth-child(3),
.hitlist-table.is-pure-sheet td:nth-child(3) { width: 16%; }
.hitlist-table.is-pure-sheet th:nth-child(4),
.hitlist-table.is-pure-sheet td:nth-child(4) { width: 23%; overflow: hidden; }
.hitlist-table.is-pure-sheet th:nth-child(5),
.hitlist-table.is-pure-sheet td:nth-child(5) { width: 9%; }
.hitlist-table.is-pure-sheet th:nth-child(6),
.hitlist-table.is-pure-sheet td:nth-child(6) { width: 10%; }
.hitlist-table.is-pure-sheet th:nth-child(7),
.hitlist-table.is-pure-sheet td:nth-child(7) { width: 9%; white-space: nowrap; }

.hitlist-table.is-pure-sheet td:nth-child(5),
.hitlist-table.is-pure-sheet td:nth-child(6),
.hitlist-table.is-pure-sheet td:nth-child(7) {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hitlist-table.is-pure-sheet {
    min-width: 760px;
  }
}

.hitlist-topic-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  white-space: nowrap;
}

.hitlist-topic-more {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 3px;
}

.hitlist-freq-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.hitlist-freq-bar {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  flex-shrink: 0;
}

.hitlist-freq-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.85;
}

.status-pill.solved::before {
  box-shadow: none;
}

.trap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: 21px;
  left: 20px;
}

.trap-icon-warn {
  color: var(--medium);
}

.trap-icon-risk {
  color: var(--hard);
}

@media (max-width: 600px) {
  .hitlist-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hitlist-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .hitlist-filter-row .custom-tags-input-wrapper,
  .hitlist-filter-row #topic-filter-wrapper,
  .hitlist-filter-row .toggle-switch-lbl {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

/* ─── Option A: Linear-Style Structured List & Flat Canvas ───────────────── */
.analysis-container {
  max-width: 1120px;
  margin: 28px auto 72px;
  padding: 0 24px;
}

.hitlist-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.hitlist-section-header {
  margin-bottom: 18px;
}

.section-header-copy h1,
.section-header-copy h2 {
  margin: 0 0 4px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #f4f4f5;
}

.section-header-copy .section-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hitlist-stream {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hitlist-empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hitlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.14s ease;
}

.hitlist-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.hitlist-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.row-status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.row-status-dot.solved {
  background: rgba(0, 230, 118, 0.14);
  color: var(--easy);
  border: 1px solid rgba(0, 230, 118, 0.45);
}

.row-status-dot.unsolved {
  border: 1.5px solid #3f3f46;
  background: transparent;
}

.row-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  width: 24px;
  flex-shrink: 0;
}

.row-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.row-title {
  color: #f4f4f5;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-title:hover {
  color: #c4b5fd;
}

.row-companies {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.row-companies-more {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: help;
}

.row-companies-more::before {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 9px;
}

.row-companies-more:hover,
.row-companies-more:focus-visible {
  color: #fff;
  border-color: rgba(124, 108, 250, 0.45);
}

.row-companies-more:hover .hitlist-company-popover,
.row-companies-more:focus-visible .hitlist-company-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.hitlist-row-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.row-topics {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-diff {
  width: 56px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.row-metric {
  width: 68px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: #d4d4d8;
  white-space: nowrap;
}

/* Grouped Pure Sheet Sections */
.sheet-group + .sheet-group {
  margin-top: 14px;
}

.sheet-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-group-title {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.sheet-group-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

@media (max-width: 820px) {
  .row-companies {
    display: none;
  }
  .row-topics {
    max-width: 150px;
  }
}

@media (max-width: 600px) {
  .analysis-container {
    margin: 18px auto 48px;
    padding: 0 12px;
  }
  .hitlist-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 8px;
  }
  .hitlist-row-left {
    width: 100%;
  }
  .hitlist-row-right {
    width: 100%;
    padding-left: 48px;
    justify-content: space-between;
    gap: 10px;
  }
  .row-topics {
    max-width: none;
    flex: 1;
  }
  .row-diff,
  .row-metric {
    width: auto;
    text-align: left;
  }
}

/* Unified Linear Dropdown Popovers */
.premium-dropdown-menu,
.custom-options-panel {
  background: #111114 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.premium-dropdown-menu {
  padding: 4px;
}

.premium-dropdown-item {
  padding: 7px 10px;
  font-size: 0.8rem;
  border-radius: 5px;
}

.premium-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.premium-dropdown-item.active {
  background: rgba(124, 108, 250, 0.18);
  color: #e4ddff;
}

/* Consistent single-line filter inputs & uniform popover items */
.hitlist-filter-row .custom-tags-input-wrapper {
  min-width: 210px;
}

.hitlist-filter-row #topic-filter-wrapper {
  min-width: 210px;
}

.hitlist-filter-row .tags-container {
  min-height: 34px;
  padding: 4px 10px;
  gap: 5px;
}

.hitlist-filter-row .invisible-search {
  min-width: 24px;
  width: 24px;
  flex: 1 1 24px;
  height: 24px;
  line-height: 24px;
  font-size: 0.78rem;
}

.hitlist-filter-row .custom-tags-input-wrapper.open .tags-container,
.hitlist-filter-row .tags-container:focus-within,
.hitlist-filter-row .premium-dropdown.open .premium-dropdown-trigger {
  border-color: rgba(124, 108, 250, 0.55);
  box-shadow: none;
}

.custom-options-list {
  padding: 4px;
}

.custom-option {
  padding: 7px 10px;
  font-size: 0.8rem;
  border-radius: 5px;
  color: var(--text-secondary);
}

.custom-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.custom-option.is-disabled {
  justify-content: space-between;
  color: var(--text-muted);
  opacity: 0.6;
  cursor: not-allowed;
}

.custom-option.is-disabled:hover {
  background: transparent;
  color: var(--text-muted);
}

.custom-option-hint {
  font-size: 0.68rem;
  color: #c4b5fd;
  background: rgba(124, 108, 250, 0.14);
  padding: 1px 6px;
  border-radius: 4px;
}
