/* ============================================================
   AI Focus — dark-theme styling, matching existing dashboard.
   Scoped under .aif-* to avoid clashing with screener/MI Rank.
   ============================================================ */

.aif-container {
  padding: 16px 20px 32px;
  color: #e5e7eb;
  max-width: 1400px;
  margin: 0 auto;
}

.aif-header { margin-bottom: 18px; }

.aif-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.aif-title {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 4px 0;
  color: #f9fafb;
}

.aif-subtitle {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.4;
}

.aif-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aif-last-updated {
  font-size: 12px;
  color: #9ca3af;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.aif-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.aif-edit-btn:hover { background: #2d3748; border-color: #4b5563; color: #f3f4f6; }
.aif-edit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.aif-edit-btn svg { flex-shrink: 0; }

/* Summary bar */
.aif-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  font-size: 12px;
}
.aif-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d1d5db;
}
.aif-summary-item strong { color: #f9fafb; font-weight: 700; }
.aif-summary-item .aif-mini-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.aif-summary-sep {
  width: 1px; height: 14px; background: #374151;
}
.aif-leaders {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 11px; color: #9ca3af;
  margin-left: auto;
}
.aif-leader-item strong { color: #f3f4f6; }

/* Controls */
.aif-controls {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin: 10px 0 14px;
}

.aif-filter-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.aif-pill {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #374151;
  border-radius: 999px;
  color: #9ca3af;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.aif-pill:hover { border-color: #6b7280; color: #e5e7eb; }
.aif-pill.active {
  background: #1d4ed8; border-color: #1d4ed8; color: #fff;
}

.aif-sort-wrap { display: flex; align-items: center; gap: 8px; }
.aif-sort-label { font-size: 12px; color: #9ca3af; }
.aif-sort-select {
  background: #1f2937; color: #e5e7eb;
  border: 1px solid #374151; border-radius: 6px;
  padding: 5px 8px; font-size: 12px; cursor: pointer;
}

/* Loading / empty */
.aif-loading, .aif-empty {
  padding: 40px 20px; text-align: center; color: #9ca3af;
}

/* Per-category section */
.aif-category {
  margin-top: 22px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1220;
}
.aif-category-header {
  padding: 10px 14px;
  background: linear-gradient(180deg, #111827 0%, #0f1720 100%);
  border-bottom: 1px solid #1f2937;
  display: flex; align-items: center; justify-content: space-between;
}
.aif-category-name {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 14px; font-weight: 800;
  color: #f3f4f6;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.aif-category-stat {
  font-size: 11px; color: #9ca3af;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Table */
/* Iter 12R — table widened to 13 columns (added Fwd P/E, EPS Yr+1, Fwd PEG).
   Padding and column widths tightened so the full row fits within typical
   desktop dashboard widths (≥1280px) without horizontal scroll. We still
   keep overflow-x:auto as a fallback for very narrow viewports. */
.aif-table-wrap { overflow-x: auto; }
.aif-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}
.aif-table thead th {
  text-align: left;
  padding: 8px 7px;
  background: #0f1720;
  color: #9ca3af;
  font-weight: 600; font-size: 10.5px;
  letter-spacing: 0.02em; text-transform: uppercase;
  border-bottom: 1px solid #1f2937;
  white-space: nowrap;
}
.aif-table tbody td {
  padding: 8px 7px;
  border-bottom: 1px solid #111827;
  color: #e5e7eb;
  vertical-align: middle;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}
.aif-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.aif-table tbody tr:hover { background: #111827; }
.aif-table tbody tr.aif-row-expanded { background: #0d1526; }
.aif-table tbody tr.aif-row-expanded:hover { background: #111c30; }
.aif-ticker { font-weight: 700; color: #f9fafb; white-space: nowrap; }
.aif-ticker-text { display: inline-block; vertical-align: middle; }
/* Iter 12R — cap company name width and truncate with ellipsis to free up
   horizontal space for the three new valuation columns. Hover shows the
   full name via the title attribute on the cell. */
.aif-company {
  color: #9ca3af; font-size: 11.5px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Iter 12R — valuation cells are right-aligned numeric columns. */
.aif-table td.aif-val,
.aif-table th.aif-val { text-align: center; }

/* Iter 12AI — column headers with a title tooltip get a help cursor so the
   user notices they are hoverable for an explanation (Fwd P/E, Growth+1,
   Fwd PEG, RSI). */
.aif-table th[title] { cursor: help; }
.aif-table .aif-val .aif-na { color: #4b5563; }
.aif-table .aif-val .aif-pos { color: #10b981; }
.aif-table .aif-val .aif-neg { color: #C24A4A; }

/* Iter 12V — RSI ≥ 80 "Extended" badge: red pill that keeps the numeric
   value readable while clearly flagging an overbought condition. */
.aif-table .aif-rsi-extended {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(194, 74, 74, 0.18);
  color: #f87171;
  border: 1px solid rgba(194, 74, 74, 0.45);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  cursor: default;
}

/* ── Chart-icon button (opens watchlist chart, fully expanded) ── */
.aif-chart-btn {
  background: transparent;
  border: 0;
  padding: 2px 4px;
  margin: 0 0 0 4px;
  color: #6b7280;
  cursor: pointer;
  vertical-align: middle;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .12s ease, background .12s ease, transform .12s ease;
}
.aif-chart-btn:hover { color: #4F98A3; background: rgba(79,152,163,0.12); transform: scale(1.08); }
.aif-chart-btn:focus-visible { outline: 2px solid #4F98A3; outline-offset: 2px; }
.aif-chart-btn svg { display: block; }

/* ── Subtle breakdown-hint chevron (signals row click expands details) ── */
.aif-breakdown-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: #4b5563;
  vertical-align: middle;
  pointer-events: auto; /* keep tooltip; click bubbles to row */
  transition: color .12s ease, transform .15s ease;
}
.aif-row:hover .aif-breakdown-hint { color: #9ca3af; }
.aif-row.aif-row-expanded .aif-breakdown-hint { color: #d1d5db; }
.aif-breakdown-hint svg { display: block; }

/* ── Favourite star ────────────────────────────────────────── */
.aif-fav {
  background: transparent;
  border: 0;
  padding: 0 6px 0 0;
  margin: 0;
  font-size: 15px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  vertical-align: middle;
  transition: color .12s ease, transform .12s ease;
}
.aif-fav:hover { color: #fbbf24; transform: scale(1.15); }
.aif-fav.on { color: #fbbf24; }
.aif-fav.on:hover { color: #f59e0b; }
.aif-fav.signed-out { color: #4b5563; }
.aif-fav.signed-out:hover { color: #9ca3af; transform: none; }
.aif-fav:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 3px; }

.aif-pill-favs { color: #fbbf24; border-color: #78350f; }
.aif-pill-favs:hover { border-color: #f59e0b; color: #fcd34d; }
.aif-pill-favs.active { background: #78350f; border-color: #b45309; color: #fef3c7; }

.aif-fav-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(17, 24, 39, 0.96);
  color: #f9fafb;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #374151;
  font-size: 13px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.aif-fav-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.aif-num { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 12px; }
.aif-num-pos { color: #10b981; }
.aif-num-neg { color: #C24A4A; }

/* Score cell with horizontal bar */
.aif-score-cell {
  position: relative;
  min-width: 100px;
}
.aif-score-bar {
  position: relative;
  height: 18px;
  background: #1f2937;
  border-radius: 4px;
  overflow: hidden;
}
.aif-score-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: #10b981;
  transition: width 0.3s;
}
.aif-score-fill.mid { background: #f59e0b; }
.aif-score-fill.low { background: #C24A4A; }
.aif-score-value {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px; font-weight: 700;
  color: #f9fafb;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Setup label pill colors */
.aif-label-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.aif-label-strong-extended {
  background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4);
}
.aif-label-strong-buyable {
  background: rgba(16, 185, 129, 0.18); color: #34d399; border-color: rgba(16, 185, 129, 0.45);
}
.aif-label-constructive {
  background: rgba(5, 150, 105, 0.15); color: #6ee7b7; border-color: rgba(5, 150, 105, 0.4);
}
.aif-label-pullback {
  background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.4);
}
.aif-label-neutral {
  background: rgba(107, 114, 128, 0.18); color: #d1d5db; border-color: rgba(107, 114, 128, 0.4);
}
.aif-label-early {
  background: rgba(20, 184, 166, 0.15); color: #5eead4; border-color: rgba(20, 184, 166, 0.4);
}
.aif-label-weakening {
  background: rgba(234, 88, 12, 0.15); color: #fb923c; border-color: rgba(234, 88, 12, 0.4);
}
.aif-label-breakdown {
  background: rgba(194,74,74, 0.15); color: #fca5a5; border-color: rgba(194,74,74, 0.4);
}
.aif-label-unavailable {
  background: rgba(55, 65, 81, 0.3); color: #6b7280; border-color: #374151;
}

/* Check dots */
.aif-checks {
  display: inline-flex; gap: 3px; align-items: center;
}
.aif-check-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #374151;
}
.aif-check-dot.passed { background: #10b981; }
.aif-check-dot.failed { background: #C24A4A; }

/* Expanded row with full check breakdown */
.aif-checks-detail {
  padding: 12px 16px;
  background: #0b1220;
  border-bottom: 1px solid #111827;
  border-left: 3px solid #1d4ed8;
}
.aif-checks-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 16px;
}
.aif-checks-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #d1d5db;
  padding: 3px 0;
}
.aif-check-icon {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 10px; font-weight: 700; color: #fff;
}
.aif-check-icon.passed { background: #10b981; }
.aif-check-icon.failed { background: #C24A4A; }
.aif-check-pts { color: #6b7280; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 11px; margin-left: auto; }

/* ── Admin inline ticker editor ──────────────────────────────── */
.aif-editor {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  margin: 14px 0 18px;
  overflow: hidden;
  animation: aifEditorSlide 180ms ease-out;
}
.aif-editor[hidden] { display: none !important; }
@keyframes aifEditorSlide {
  from { opacity: 0; transform: translateY(-6px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0);    max-height: 2000px; }
}
.aif-editor-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #1f2937;
  background: #0f172a;
}
.aif-editor-header h3 { margin: 0; color: #f9fafb; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.aif-editor-close {
  background: none; border: none; color: #9ca3af;
  font-size: 22px; cursor: pointer; line-height: 1;
}
.aif-editor-close:hover { color: #f3f4f6; }
.aif-editor-body {
  padding: 14px 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.aif-editor-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid #1f2937;
  background: #0f172a;
}

.aif-edit-category { margin-bottom: 18px; }
.aif-edit-category-name {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  color: #9ca3af; letter-spacing: 0.05em; margin-bottom: 8px;
}
.aif-edit-ticker-list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.aif-edit-ticker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: #1f2937; border: 1px solid #374151; border-radius: 4px;
  font-size: 12px; color: #e5e7eb;
}
.aif-edit-ticker strong { color: #f9fafb; font-weight: 700; }
.aif-edit-ticker-name { color: #9ca3af; font-size: 11px; }
.aif-edit-ticker-remove {
  background: none; border: none; color: #6b7280;
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px;
}
.aif-edit-ticker-remove:hover { color: #C24A4A; }

.aif-edit-add {
  display: flex; align-items: center; margin-top: 6px;
}
.aif-edit-add-btn {
  background: transparent; color: #93c5fd;
  border: 1px dashed #374151; border-radius: 4px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.aif-edit-add-btn:hover {
  border-color: #1d4ed8; color: #fff; background: rgba(29, 78, 216, 0.15);
}

.aif-btn {
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
}
.aif-btn-primary { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.aif-btn-primary:hover { background: #1e40af; }
.aif-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.aif-btn-secondary { background: #1f2937; color: #d1d5db; border-color: #374151; }
.aif-btn-secondary:hover { background: #2d3748; color: #f3f4f6; }

/* ── Info icon + methodology panel (visible to all users) ───── */
.aif-title { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aif-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid #374151;
  border-radius: 50%;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  vertical-align: middle;
}
.aif-info-btn:hover,
.aif-info-btn[aria-expanded="true"] {
  background: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}
.aif-info-btn svg { display: block; }

.aif-info-panel {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  margin: 14px 0 18px;
  overflow: hidden;
  animation: aifEditorSlide 180ms ease-out;
}
.aif-info-panel[hidden] { display: none !important; }
.aif-info-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #1f2937;
  background: #0f172a;
}
.aif-info-header h3 {
  margin: 0;
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.aif-info-close {
  background: none; border: none; color: #9ca3af;
  font-size: 22px; cursor: pointer; line-height: 1;
}
.aif-info-close:hover { color: #f3f4f6; }
.aif-info-body {
  padding: 14px 16px 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.aif-info-lead {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #9ca3af;
  line-height: 1.5;
}
.aif-info-section { margin-bottom: 16px; }
.aif-info-section:last-child { margin-bottom: 0; }
.aif-info-subtitle {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}
.aif-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 6px;
  overflow: hidden;
}
.aif-info-table th,
.aif-info-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid #1f2937;
  color: #d1d5db;
}
.aif-info-table tbody tr:last-child td { border-bottom: none; }
.aif-info-table thead th {
  background: #0f172a;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aif-info-table td.aif-info-num,
.aif-info-table th.aif-info-num {
  text-align: right;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f3f4f6;
  width: 90px;
}

@media (max-width: 720px) {
  .aif-title-row { flex-direction: column; }
  .aif-controls { flex-direction: column; align-items: stretch; }
  .aif-sort-wrap { justify-content: flex-end; }
  .aif-info-body { max-height: 70vh; }
}

/* ───────────────────────────────────────────────────────────────────────────
   Iter 12AB / 12AC — Standout 10 panel + Theme rollup strip
   Visser-framework synthesis. Rendered at the top of the AI Focus body when
   no specific theme/favourites filter is active.
   ─────────────────────────────────────────────────────────────────────────── */

.aif-standout-panel {
  margin: 0 0 16px 0;
  padding: 14px 16px 16px 16px;
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.10) 0%, rgba(20, 184, 166, 0.03) 100%);
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 12px;
}
.aif-standout-head { margin-bottom: 10px; }
.aif-standout-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5eead4;
  text-transform: uppercase;
}
.aif-standout-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.45;
}
.aif-standout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 8px;
}
.aif-standout-card {
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 9px 10px 11px 10px;
  cursor: pointer;
  transition: border-color 120ms, transform 120ms, background 120ms;
}
.aif-standout-card:hover {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(15, 23, 42, 0.78);
  transform: translateY(-1px);
}
.aif-standout-rank {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}
.aif-standout-tk {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.aif-standout-theme {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 1px;
}
.aif-standout-score {
  font-size: 20px;
  font-weight: 700;
  color: #5eead4;
  margin-top: 6px;
  font-variant-numeric: tabular-nums lining-nums;
}
.aif-standout-meta {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.aif-standout-bar {
  margin-top: 8px;
  height: 3px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.aif-standout-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #5eead4 100%);
  border-radius: 999px;
}

/* Theme rollup strip */
.aif-theme-rollup {
  margin: 0 0 18px 0;
  padding: 4px 16px;
  background: rgba(15, 23, 42, 0.40);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
}
/* Iter 12AK.14 — collapsible header button (replaces the static title). */
.aif-theme-rollup-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #94a3b8;
  text-align: left;
}
.aif-theme-rollup-toggle:hover { color: #cbd5e1; }
.aif-theme-rollup-toggle:focus-visible {
  outline: 1px solid rgba(94, 234, 212, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}
.aif-theme-rollup-title {
  font-size: 11.5px;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.aif-theme-rollup-chev {
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 160ms ease;
  color: inherit;
  opacity: 0.8;
}
.aif-theme-rollup-toggle[aria-expanded="true"] .aif-theme-rollup-chev {
  transform: rotate(180deg);
}
/* When expanded, give the list some breathing room below the header. */
.aif-theme-rollup-toggle[aria-expanded="true"] {
  padding-bottom: 8px;
}
.aif-theme-rollup-list[hidden] { display: none; }
.aif-theme-rollup-toggle[aria-expanded="true"] + .aif-theme-rollup-list {
  padding-bottom: 8px;
}
.aif-theme-rollup-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}
.aif-theme-row {
  display: grid;
  grid-template-columns: 130px 1fr 45px;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms;
}
.aif-theme-row:hover { background: rgba(148, 163, 184, 0.08); }
.aif-theme-name {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 500;
}
.aif-theme-bar {
  height: 8px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.aif-theme-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.6) 0%, #5eead4 100%);
  border-radius: 999px;
  transition: width 240ms ease-out;
}
.aif-theme-val {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Iter 12AD — Standout 10 methodology popover */
.aif-standout-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aif-standout-info {
  background: transparent;
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #5eead4;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.aif-standout-info:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: rgba(94, 234, 212, 0.7);
  color: #99f6e4;
}
.aif-standout-info[aria-expanded="true"] {
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(94, 234, 212, 0.85);
}

/* Iter 12AJ — Save-to-watchlist button, right-aligned in the standout title
   row. Same visual language as the info icon (teal accent, transparent fill)
   so it reads as a peer action rather than a CTA. */
.aif-standout-save {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(20, 184, 166, 0.10);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 999px;
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, border-color 120ms, color 120ms, transform 120ms;
}
.aif-standout-save:hover:not([disabled]) {
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(94, 234, 212, 0.75);
  color: #ccfbf1;
}
.aif-standout-save:active:not([disabled]) { transform: translateY(1px); }
.aif-standout-save[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.aif-standout-save svg { display: block; }

/* Iter 12AJ — self-contained toast pill (only used when the global
   window.showToast helper isn't loaded on this page). */
.aif-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.aif-toast.show { opacity: 1; transform: translateY(0); }
.aif-toast-success { border-color: rgba(16, 185, 129, 0.55); }
.aif-toast-warn    { border-color: rgba(234, 179, 8,  0.55); color: #fde68a; }
.aif-toast-error   { border-color: rgba(239, 68, 68,  0.55); color: #fecaca; }

.aif-standout-method {
  margin: 10px 0 14px 0;
  padding: 14px 16px 16px 16px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(94, 234, 212, 0.30);
  border-radius: 10px;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
}
.aif-method-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5eead4;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.aif-method-body p { margin: 0 0 10px 0; }
.aif-method-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 12px 0;
}
.aif-method-table th,
.aif-method-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}
.aif-method-table th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.aif-method-table td:first-child {
  width: 60px;
  color: #5eead4;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.aif-method-table td:nth-child(2) {
  width: 145px;
  color: #e2e8f0;
  font-weight: 500;
}
.aif-method-section {
  margin-top: 10px;
  margin-bottom: 4px;
}
.aif-method-list {
  margin: 0 0 6px 18px;
  padding: 0;
}
.aif-method-list li {
  margin: 3px 0;
}
.aif-method-sources {
  color: #94a3b8;
  font-size: 12px;
}
.aif-method-framework {
  color: #64748b;
  font-size: 11.5px;
  font-style: italic;
  margin-top: 10px;
}
