@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  color-scheme: dark;
  --ink: #f2f2ef;
  --muted: #8a919e;
  --line: #1e2432;
  --paper: #0a0b0e;
  --surface: #0f1119;
  --surface-soft: #131720;
  --field: #0c0e15;
  --accent: #e8956a;
  --accent-dark: #c96830;
  --button-ink: #1a0c00;
  --shadow: none;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.14);
  --danger: #f87171;
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #1c1a17;
  --muted: #6b6259;
  --line: #e4ddd6;
  --paper: #fdfbf8;
  --surface: #ffffff;
  --surface-soft: #faf7f3;
  --field: #fdfbf8;
  --accent: #c06020;
  --accent-dark: #984a14;
  --button-ink: #ffffff;
  --shadow: 0 18px 45px rgba(40, 30, 20, 0.12);
  --gold: #b45309;
  --gold-soft: rgba(180, 83, 9, 0.08);
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  /* background + blur moved to ::before so this element does NOT become a
     containing block for position:fixed children (the mobile nav panel).
     backdrop-filter on a direct element traps fixed descendants to it. */
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--button-ink);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
}

.nav-secondary {
  opacity: 0.64;
}

.hero {
  min-height: auto;
  padding: clamp(42px, 7vw, 96px) clamp(18px, 4vw, 56px) 60px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(880px, 100%);
  margin: 0 auto;
}

.home-hero {
  padding-bottom: clamp(56px, 8vw, 110px);
}

.home-hero-inner {
  display: grid;
  width: min(1680px, 100%);
  grid-template-columns: minmax(540px, 1fr) minmax(460px, 620px);
  align-items: center;
  gap: clamp(40px, 7vw, 140px);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 760;
}

h1 {
  max-width: 820px;
  margin: 14px 0 18px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(38px, 5.1vw, 65px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.home-main h1 {
  max-width: 940px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(44px, 4.2vw, 78px);
  font-weight: 400;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-support {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-process-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.5;
}

.hero-primary {
  min-width: 164px;
}

.hero-request-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.hero-preview-stage {
  display: grid;
  gap: 10px;
  align-self: center;
}

.hero-card-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-height: 36px;
}

.hero-card-controls button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.hero-card-controls button:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.hero-preview-card {
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 86%, var(--accent) 5%), var(--surface));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.hero-preview-card .ifc-header {
  padding: 20px 20px 14px;
}

.hero-preview-card .ifc-ticker {
  font-size: clamp(26px, 3.5vw, 36px);
}

.hero-preview-card .ifc-scenarios {
  margin: 0 20px 14px;
}

.hero-preview-card .ifc-thesis {
  margin: 0 20px 16px;
  font-size: 14px;
}

.hero-preview-card .pitch-actions {
  flex-shrink: 0;
  margin: 0 20px 8px;
}

.hero-preview-card .ifc-footer {
  margin-top: auto;
  flex-shrink: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-preview-card .ifc-footer-item:last-child {
  border-right: 0;
}

.hero-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero-preview-ticker {
  display: block;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 900;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.hero-preview-top p {
  margin: 7px 0 0;
  color: var(--muted);
}

.hero-preview-rank {
  min-width: 126px;
  padding: 10px;
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: 8px;
  text-align: right;
}

.hero-preview-rank small,
.hero-preview-section small,
.hero-preview-metrics small {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-preview-rank strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.hero-preview-rank span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hero-preview-view {
  display: inline-flex;
  align-items: center;
  align-self: start;
  justify-self: start;
  width: auto;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.hero-preview-section {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  overflow: hidden;
}

.hero-preview-section p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.hero-preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-preview-metrics span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field) 74%, transparent);
}

.hero-preview-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-preview-button {
  justify-content: center;
  align-self: end;
}

.hero-preview-metrics span:first-child small {
  color: var(--gold);
}

.hero-preview-metrics span:first-child strong {
  color: var(--gold);
}

.search-panel,
.report-shell,
.catalog,
.how-it-works,
.status-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 24px;
}

.ticker-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ticker-form-next {
  margin-top: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ticker-form-next[hidden] {
  display: none;
}

.selected-report-type {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ticker-input {
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: var(--field);
  color: var(--ink);
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--accent);
  color: var(--button-ink);
  font-weight: 760;
  cursor: pointer;
  text-decoration: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: var(--ink);
  color: var(--paper);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--line) 55%, var(--ink) 12%);
}

.button.ghost:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border-color: color-mix(in srgb, var(--line) 40%, var(--ink) 20%);
}

.status-box {
  margin-top: 18px;
  padding: 18px;
  box-shadow: none;
}

.status-box[hidden] {
  display: none;
}

.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price {
  font-size: 28px;
  font-weight: 800;
}

.result-actions {
  display: grid;
  gap: 18px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.order-selector.is-collapsed {
  display: none;
}

.order-card {
  min-height: 140px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.order-card:hover,
.order-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
}

.order-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-soft));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}

.order-card[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.68;
}

.order-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.order-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.order-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.generation-status {
  display: grid;
  gap: 10px;
}

.generation-status strong {
  font-size: 17px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.progress-percent {
  min-width: 44px;
  color: var(--accent);
  font-size: 13px !important;
  text-align: right;
}

.progress-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: report-progress 1.35s ease-in-out infinite alternate;
}

.progress-track.determinate span {
  animation: none;
  transform: none;
  transition: width 0.45s ease;
}

.job-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.job-steps li {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.job-steps li.active {
  color: var(--button-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.job-steps li.done {
  color: var(--button-ink);
  background: var(--accent);
  border-color: var(--accent);
  opacity: 0.72;
}

.ticker-form.is-locked {
  display: none;
}

@keyframes report-progress {
  from {
    transform: translateX(-55%);
  }

  to {
    transform: translateX(160%);
  }
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span,
.small {
  color: var(--muted);
  font-size: 13px;
}

.trust-row {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section {
  width: min(1120px, calc(100% - clamp(36px, 8vw, 112px)));
  margin: 0 auto;
  padding: 56px 0;
}

.home-main .section {
  width: min(1540px, calc(100% - clamp(48px, 7vw, 180px)));
}

.section h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading-row h2 {
  margin: 0;
}

.section-copy {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-carousel-shell {
  position: relative;
  overflow: hidden;
}

.catalog-carousel-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 92px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--paper));
}

.catalog-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding: 0 56px 0 0;
  scrollbar-width: none;
}

.catalog-grid::-webkit-scrollbar {
  display: none;
}

.catalog-card {
  display: grid;
  gap: 12px;
  flex: 0 0 min(360px, 82vw);
  min-height: 380px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  scroll-snap-align: start;
}

.catalog-grid-featured .catalog-card {
  flex-basis: min(410px, 86vw);
}

.popular-section {
  display: grid;
  gap: 18px;
}

.home-engagement-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.home-engagement-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 74%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
}

.home-main .home-engagement-grid .popular-section {
  align-content: start;
}

.home-main .home-engagement-grid .request-section {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.home-main .home-engagement-grid .request-copy,
.home-main .home-engagement-grid .section-copy {
  max-width: none;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading-row h2 {
  margin: 4px 0 0;
}

.popular-list {
  display: grid;
  gap: 10px;
}

.popular-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.popular-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
}

.popular-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 999px;
}

.popular-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.popular-main strong {
  font-size: 20px;
  letter-spacing: 0;
}

.popular-main small {
  color: var(--muted);
}

.auth-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.login-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

.login-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-dialog h2 {
  margin: 0;
}

.login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
}

.login-current {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.login-current span {
  color: var(--muted);
  font-size: 13px;
}

.login-dialog form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: 12px;
  align-items: end;
}

.login-dialog form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.login-dialog form label span {
  color: var(--muted);
  font-weight: 760;
}

.login-dialog form .email-input {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
}

.login-dialog form .button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 150px;
  min-height: 46px;
}

.login-dialog .status-box {
  margin-top: 2px;
}

.pitch-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pitch-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 88%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.pitch-actions button.active {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  color: var(--accent);
}

/* Read toggle — muted by default, green check when active */
.pitch-actions .read-toggle {
  color: var(--muted);
}
.pitch-actions .read-toggle.active {
  border-color: color-mix(in srgb, var(--positive, #16a34a) 55%, var(--line));
  color: var(--positive, #16a34a);
}

.pitch-actions button.danger {
  color: var(--danger);
}

/* ── Read / unread badge + feed heading layout ───────────────── */
.feed-heading-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-ink, #fff);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.unread-badge.all-read {
  background: color-mix(in srgb, var(--positive, #16a34a) 18%, var(--surface-soft));
  color: var(--positive, #16a34a);
}

/* Dimmed style for read idea feed cards */
.idea-feed-list .is-read {
  opacity: 0.5;
  transition: opacity 0.15s;
}
.idea-feed-list .is-read:hover,
.idea-feed-list .is-read:focus-within {
  opacity: 1;
}

.share-menu {
  position: fixed;
  z-index: 9999;
  /* top / left set dynamically by JS on open */
  display: grid;
  min-width: 176px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.share-menu[hidden] {
  display: none;
}

.share-menu button {
  justify-content: flex-start;
  border-radius: 6px;
}

.share-menu button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.pitch-state-icons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.pitch-state-icon {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.pitch-state-icon.saved {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
}

.pitch-state-icon.hidden {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 52%, var(--line));
}

.database-row.is-hidden {
  opacity: 0.58;
}

.report-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px clamp(28px, 5vw, 58px) 18px;
  border-bottom: 3px solid var(--accent);
  background: #0b2545;
}

.report-user-actions .pitch-actions {
  justify-content: flex-end;
  margin-top: 0;
  flex-shrink: 0;
}

.report-user-actions .pitch-actions button {
  min-height: 34px;
  padding: 7px 13px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.report-user-actions .pitch-actions button:hover {
  border-color: rgba(94, 234, 212, 0.72);
  background: rgba(94, 234, 212, 0.12);
}

.report-user-actions .pitch-actions button.active {
  border-color: rgba(94, 234, 212, 0.78);
  color: var(--accent);
}

/* .report-user-actions .share-menu right-alignment handled via JS */

.my-ideas-list {
  display: grid;
  gap: 14px;
}

.my-idea-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.my-idea-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.my-idea-main p {
  margin: 3px 0 0;
  color: var(--muted);
}

.my-idea-ticker {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  text-decoration: none;
}

.my-idea-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.my-idea-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.my-idea-grid span:last-child {
  border-right: 0;
}

.my-idea-grid small,
.my-idea-notes span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.my-idea-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-idea-flags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.my-idea-pitch {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.my-idea-notes {
  display: grid;
  gap: 6px;
}

.my-idea-notes textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.catalog-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.catalog-score {
  min-width: 116px;
  padding: 8px 10px;
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: 8px;
  text-align: right;
}

.catalog-score span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
  text-transform: uppercase;
}

.catalog-score strong {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1;
}

.ticker {
  font-size: 28px;
  font-weight: 850;
}

.pill {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--accent-dark);
  font-weight: 760;
  font-size: 12px;
}

.catalog-name {
  margin: 0;
}

.catalog-thesis {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.catalog-13f {
  max-width: 100%;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.catalog-hook {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.catalog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.catalog-metrics span {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.catalog-metrics small {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.catalog-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.rank-helper {
  max-width: 760px;
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 13px;
  line-height: 1.5;
}

.discovery-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.discovery-card {
  display: grid;
  grid-template-rows: auto minmax(54px, auto) 1fr;
  align-content: start;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.discovery-card h2 {
  margin: 0;
}

.discovery-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.discovery-card .button {
  align-self: start;
  justify-self: start;
}

.library-preview,
.feedback-section,
.request-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.library-preview-list {
  display: grid;
  gap: 10px;
}

.library-preview-list p {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.5;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-badges span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.request-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.request-form .button {
  width: 100%;
}

.request-panel {
  display: grid;
  gap: 14px;
}

.request-form label {
  display: grid;
  gap: 7px;
}

.request-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.request-form textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--ink);
  line-height: 1.45;
}

.request-status {
  min-height: 20px;
  margin: 0;
}

.home-main {
  --home-width: min(1520px, calc(100% - clamp(48px, 5vw, 112px)));
  min-height: 0;
}

.home-main .home-hero {
  padding: clamp(18px, 2vw, 28px) 0 clamp(18px, 2vw, 28px);
}

.home-main .home-hero-inner {
  width: var(--home-width);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 640px);
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.home-main h1 {
  max-width: 760px;
  margin: 12px 0 16px;
  font-size: clamp(44px, 3.2vw, 64px);
  line-height: 1;
}

.home-main .lede {
  max-width: 720px;
  font-size: clamp(16px, 1vw, 19px);
  line-height: 1.52;
}

.home-main .hero-support {
  max-width: 760px;
  font-size: clamp(14px, 0.9vw, 16px);
  line-height: 1.48;
}

.home-main .hero-actions {
  margin-top: 20px;
}

.home-main .hero-process-line {
  margin-top: 14px;
  font-size: 12px;
}

.home-main .hero-request-link {
  margin-top: 14px;
}

.home-main .hero-card-controls {
  min-height: 30px;
}

.home-main .hero-card-controls button {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.home-main .hero-preview-stage {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  justify-self: stretch;
}

.hero-preview-ifc-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-preview-ifc-wrap .idea-feed-card {
  box-shadow: none;
  border-radius: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  font-size: 13px;
}

.hero-preview-ifc-wrap .ifc-header { padding: 14px 18px 10px; }
.hero-preview-ifc-wrap .ifc-ticker { font-size: 22px; }
.hero-preview-ifc-wrap .ifc-scenarios { margin: 0 18px 12px; }
.hero-preview-ifc-wrap .ifc-thesis { margin: 0 18px 14px; font-size: 12.5px; line-height: 1.55; }
.hero-preview-ifc-wrap .ifc-stock-price-bar { display: none; }
.hero-preview-ifc-wrap .ifc-key-question { display: none; }
.hero-preview-ifc-wrap .ifc-footer { padding: 8px 18px; font-size: 11.5px; }

.home-main .hero-preview-ticker {
  font-size: clamp(34px, 2.8vw, 44px);
}

.home-main .hero-preview-rank {
  min-width: 104px;
  padding: 8px;
}

.home-main .hero-preview-rank strong {
  font-size: 18px;
}

.home-main .hero-preview-copy-grid {
  display: grid;
  min-height: 0;
  height: 190px;
  grid-template-rows: repeat(2, 90px);
  gap: 10px;
  overflow: hidden;
}

.home-main .hero-preview-section {
  min-height: 0;
  height: 90px;
  padding: 10px 12px;
}

.home-main .hero-preview-section p {
  font-size: 11px;
  line-height: 1.36;
  -webkit-line-clamp: 4;
}

.home-main .hero-preview-metrics span {
  height: 52px;
  padding: 8px 9px;
  overflow: hidden;
}

.home-main .hero-preview-metrics strong {
  margin-top: 4px;
  font-size: 12px;
  -webkit-line-clamp: 3;
}

.home-main .hero-preview-button {
  min-height: 38px;
  height: 38px;
}

.home-main .section {
  width: var(--home-width);
  padding: 22px 0;
}

.home-main .discovery-paths {
  padding-top: 22px;
  padding-bottom: 14px;
}

.home-main .discovery-card {
  grid-template-rows: auto minmax(44px, auto) auto;
  gap: 12px;
  min-height: 142px;
  padding: 16px;
}

.home-main .discovery-card h2 {
  font-size: 24px;
}

.home-main .discovery-card p {
  font-size: 13px;
  line-height: 1.45;
}

.home-main .discovery-card .button {
  min-height: 36px;
  padding: 0 14px;
}

.home-main .newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 680px);
  gap: 28px;
  align-items: end;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.home-main .newsletter h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.home-main .newsletter .small {
  margin: 0;
}

.home-main .newsletter .email-form {
  justify-self: end;
  width: min(680px, 100%);
}

.home-main .request-section {
  position: relative;
  align-items: center;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1fr);
  gap: clamp(28px, 4vw, 72px);
  padding: 22px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 72%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
}

.home-main .home-engagement-grid .request-section {
  padding: 20px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 74%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
}

.home-main .request-copy {
  max-width: 720px;
}

.home-main .request-section h2 {
  margin-bottom: 10px;
}

.home-main .request-form {
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-main .ticker-input {
  height: 46px;
  font-size: 16px;
}

.home-main .request-form .button {
  min-height: 42px;
}

.home-main .request-panel {
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field) 72%, transparent);
}

.home-main .request-status {
  min-height: 132px;
  max-height: 132px;
  overflow-y: auto;
  margin: 0;
  scrollbar-width: none;
}

/* Failed state: remove height cap so all content is visible without scrolling */
.home-main .request-status:has(.generation-status-failed) {
  min-height: 0;
  max-height: none;
  overflow-y: visible;
}

.home-main .request-status::-webkit-scrollbar {
  display: none;
}

.home-main .request-status[hidden] {
  display: none;
}

.home-main .generation-status {
  gap: 6px;
}

.home-main .generation-status-failed {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.home-main .generation-status strong {
  font-size: 14px;
}

.home-main .generation-status p.small {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

/* Hide "You can leave this tab" message in running state only */
.home-main .generation-status:not(.generation-status-failed) > p.small:last-child {
  display: none;
}

.home-main .progress-row {
  gap: 8px;
}

.home-main .job-steps {
  gap: 4px;
  margin: 0;
}

.home-main .job-steps li {
  min-height: 24px;
  padding: 4px 5px;
  font-size: 10px;
}

/* Retry button — secondary ghost style, not full-width like the primary CTA */
.retry-job-button {
  justify-self: start;
  min-height: 32px;
  padding: 6px 16px;
  font-size: 13px;
}

.home-main .retry-job-button {
  width: auto;
  min-height: 30px;
  padding: 5px 14px;
  font-size: 12px;
}

.home-main + .footer {
  width: 100%;
  margin: 0;
  padding: 24px clamp(18px, 4vw, 56px) 34px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

.home-main + .footer .footer-links {
  gap: 14px;
}

.home-main + .footer p {
  max-width: none;
}

.request-status a {
  color: var(--accent);
  font-weight: 760;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.step {
  padding: 18px 0;
  border-top: 2px solid var(--ink);
}

.step strong {
  display: block;
  margin-bottom: 8px;
}

.process-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: end;
}

.process-callout {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.05;
  font-weight: 860;
  max-width: 720px;
}

.workflow-cycle {
  position: relative;
  min-height: 620px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(88, 225, 207, 0.11), transparent 210px),
    rgba(255, 255, 255, 0.025);
}

.workflow-cycle-ring {
  position: absolute;
  inset: 40px;
  width: calc(100% - 80px);
  height: calc(100% - 80px);
  pointer-events: none;
}

.workflow-cycle-ring path {
  fill: none;
  stroke: rgba(88, 225, 207, 0.55);
  stroke-width: 3;
  stroke-dasharray: 10 12;
  marker-end: url("#workflow-arrow");
}

.workflow-cycle-ring marker path {
  fill: var(--accent);
}

.workflow-cycle-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(330px, 34vw);
  min-height: 210px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  border: 1px solid rgba(88, 225, 207, 0.4);
  border-radius: 999px;
  text-align: center;
  background: rgba(10, 18, 14, 0.92);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.workflow-cycle-center span,
.workflow-cycle-steps span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-cycle-center strong {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 42px);
  line-height: 0.95;
}

.workflow-cycle-center p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.workflow-cycle-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-cycle-steps li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(220px, 22vw);
  min-height: 112px;
  transform: translate(-50%, -50%);
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.workflow-cycle-steps li::after {
  content: ">";
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 850;
}

.workflow-cycle-steps li:nth-child(8)::after {
  content: "↺";
}

.workflow-cycle-steps strong {
  display: block;
  margin-top: 7px;
  padding-right: 24px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.workflow-cycle-steps small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.diligence-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.diligence-steps .step {
  min-height: 170px;
}

.process-disclaimer {
  max-width: 920px;
  margin-top: 28px;
  font-size: 15px;
}

.report-page {
  padding: 34px clamp(14px, 4vw, 46px) 72px;
  background:
    radial-gradient(circle at 50% 0%, rgba(11, 37, 69, 0.08), transparent 34rem),
    #eef2f5;
}

.report-shell {
  max-width: 1080px;
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  color: #1d2a35;
  border: 1px solid #d5d9dd;
  box-shadow: 0 24px 60px rgba(11, 37, 69, 0.14);
}

.report-shell.is-loaded {
  animation: reportFadeIn 160ms ease-out;
}

.report-loading-cover {
  padding: clamp(28px, 5vw, 58px);
  min-height: 320px;
  background: #0b2545;
}

.report-loading-body {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 40px);
}

.loading-kicker,
.loading-title,
.loading-subtitle,
.loading-line,
.loading-lens,
.loading-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.22), rgba(255,255,255,0.1));
  background-size: 240% 100%;
  animation: loadingShimmer 1.2s ease-in-out infinite;
}

.loading-kicker {
  width: 120px;
  height: 14px;
  margin-bottom: 42px;
}

.loading-title {
  width: min(620px, 72%);
  height: clamp(54px, 8vw, 84px);
  margin-bottom: 22px;
}

.loading-subtitle {
  width: min(420px, 56%);
  height: 34px;
  margin-bottom: 18px;
}

.loading-line {
  width: min(520px, 64%);
  height: 24px;
}

.loading-line.short {
  width: min(360px, 48%);
}

.loading-lens {
  width: 100%;
  height: 78px;
  margin-top: 52px;
  border-radius: 0;
}

.loading-card {
  height: 130px;
  background: linear-gradient(90deg, #eef2f5, #f8fafc, #eef2f5);
  background-size: 240% 100%;
  border: 1px solid #d5d9dd;
}

.loading-card.wide {
  height: 190px;
}

@keyframes loadingShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes reportFadeIn {
  from { opacity: 0.7; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-cover {
  padding: clamp(28px, 5vw, 58px) clamp(28px, 5vw, 58px) 18px;
  background: #0b2545;
  color: #ffffff;
}

.report-brand-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
  color: #dce7ef;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-brand-row strong {
  color: #ffffff;
  letter-spacing: 0.01em;
  text-transform: none;
}

.report-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(176px, 230px);
  align-items: start;
  gap: 22px;
}

.report-title-copy {
  min-width: 0;
}

.company-logo-mark {
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  color: color-mix(in srgb, var(--muted) 58%, var(--ink));
  opacity: 0.88;
}

.report-title-heading,
.ifc-identity-row,
.idea-identity-row,
.top-ranked-identity-row,
.table-ticker-link {
  display: flex;
  align-items: flex-start;
}

.report-title-heading {
  gap: 14px;
}

.report-company-logo {
  width: clamp(31px, 3.4vw, 40px);
  height: clamp(31px, 3.4vw, 40px);
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
}

.report-cover h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
}

.report-score-stack {
  justify-self: end;
  align-self: end;
  display: grid;
  justify-items: start;
  gap: 10px;
  width: min(230px, 100%);
}

.ai-score-badge {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.62);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  color: #ffffff;
}

.ai-score-badge span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-score-badge strong {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 28px;
  line-height: 0.95;
}

.ai-score-badge em {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.ai-score-badge .library-rank-fallback {
  font-size: 24px;
}

.report-view-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.report-view-pill.view-long {
  color: #5eead4;
  background: rgba(94, 234, 212, 0.08);
}

.report-view-pill.view-hold {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.report-view-pill.view-short {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.report-view-meta {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.25;
}

.report-view-meta span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.report-view-meta strong {
  color: #ffffff;
  font-weight: 850;
}

.report-subtitle {
  margin: 12px 0 0;
  color: #dce7ef;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.28;
}

.report-price-context,
.report-market-context {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.35;
}

.report-market-context {
  color: rgba(255, 255, 255, 0.72);
}

.report-industry-context {
  max-width: 760px;
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.35;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 0;
  background: rgba(11, 37, 69, 0.18);
}

.report-stat {
  min-height: 74px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.report-stat:nth-child(4n) {
  border-right: 0;
}

.report-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-stat strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.15;
}

.share-count-note {
  padding: 12px 16px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-top: 0;
  background: rgba(94, 234, 212, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.share-count-note strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-count-note p {
  margin: 0;
  max-width: 1040px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.quality-lens {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(19, 49, 92, 0.42);
}

.quality-lens-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.quality-lens-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quality-lens-pill {
  padding: 4px 10px;
  border: 1px solid rgba(94, 234, 212, 0.62);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quality-lens-type {
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.quality-lens p {
  max-width: 980px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.45;
}

.quality-lens-ownership {
  display: grid;
  gap: 3px;
}

.quality-lens-ownership p,
.quality-lens-13f {
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 13px !important;
  font-weight: 760;
}

.report-ai-notice {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  flex: 1 1 0;
  min-width: 0;
}

.market-snapshot {
  padding: clamp(22px, 3vw, 34px) clamp(28px, 4vw, 48px);
  border-bottom: 1px solid #d5d9dd;
  background: #f5f7fa;
  color: #0b2545;
}

.market-snapshot-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.market-snapshot-head span {
  display: block;
  margin-bottom: 5px;
  color: #1b998b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-snapshot-head h2 {
  margin: 0;
  color: #0b2545;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.05;
}

.snapshot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(214, 140, 26, 0.36);
  border-radius: 999px;
  background: rgba(214, 140, 26, 0.12);
  color: #8b4a00;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.market-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.snapshot-card {
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  break-inside: avoid;
  page-break-inside: avoid;
}

.snapshot-card h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d5d9dd;
  background: #0b2545;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.snapshot-card dl {
  margin: 0;
}

.snapshot-card dl div {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f5;
}

.snapshot-card dl div:last-child {
  border-bottom: 0;
}

.snapshot-card dt {
  color: #5c6b73;
  font-size: 12px;
  font-weight: 760;
}

.snapshot-card dd {
  margin: 0;
  min-width: 0;
  color: #0b2545;
}

.snapshot-card dd strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.snapshot-card dd span {
  display: block;
  margin-top: 3px;
  color: #5c6b73;
  font-size: 11px;
  line-height: 1.25;
}

.report-body {
  padding: clamp(28px, 4vw, 48px);
  background: #ffffff;
}

.report-body > .market-snapshot {
  margin: 0 0 clamp(22px, 3vw, 34px);
  border: 1px solid #d5d9dd;
  border-radius: 8px;
}

.financial-projection-snapshot {
  margin: 0 0 clamp(22px, 3vw, 34px);
  padding: clamp(22px, 3vw, 34px) clamp(22px, 4vw, 42px);
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2545;
  break-inside: avoid;
  page-break-inside: avoid;
}

.projection-table-scroll {
  overflow-x: auto;
}

.projection-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.25;
}

.projection-table th,
.projection-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #d5d9dd;
  text-align: right;
  vertical-align: top;
}

.projection-table thead th {
  background: #0b2545;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.projection-table thead th:first-child,
.projection-table tbody th {
  text-align: left;
}

.projection-table tbody tr:nth-child(even) {
  background: #f2f5f8;
}

.projection-table tbody th {
  width: 24%;
  color: #1d2a35;
  font-weight: 760;
}

.projection-table tbody th small {
  display: block;
  margin-top: 4px;
  color: #5c6b73;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.25;
}

.projection-table td {
  color: #1d2a35;
  font-variant-numeric: tabular-nums;
}

.projection-caption {
  margin: 9px 0 0;
  color: #5c6b73;
  font-size: 12px;
  font-style: italic;
  text-align: center;
}

.pdf-reader-section {
  display: grid;
  gap: 18px;
}

.pdf-download-section {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f5f7fa;
}

.pdf-reader-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.pdf-reader-header h2 {
  margin: 0 0 4px;
  color: #0b2545;
  font-size: 22px;
}

.pdf-reader-header .small {
  margin: 0;
  color: #5c6b73;
}

.pdf-download-section .button {
  min-width: 160px;
  background: #0b2545;
  color: #ffffff;
  border: 1px solid #0b2545;
}

.pdf-download-section .button:hover {
  background: #13315c;
  color: #ffffff;
}

.pdf-reader {
  width: 100%;
  height: min(82vh, 980px);
  min-height: 720px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #eef2f5;
}

.text-fallback {
  margin-top: 22px;
  border-top: 1px solid #d5d9dd;
  color: #1d2a35;
}

.text-fallback summary {
  padding: 18px 0;
  cursor: pointer;
  color: #0b2545;
  font-weight: 800;
}

.report-section {
  padding: 20px 0;
  border-bottom: 1px solid #d5d9dd;
}

.report-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
}

.report-section h2 {
  margin: 0 0 14px;
  color: #0b2545;
  font-size: 20px;
  line-height: 1.2;
}

.report-section-head h2 {
  margin: 0;
}

.flag-section-button {
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid #d5d9dd;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ffffff;
  color: #0b2545;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.flag-section-button:hover {
  border-color: #1b998b;
  color: #0f766e;
}

.flag-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 10, 8, 0.55);
}

.flag-dialog {
  width: min(520px, 100%);
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  color: #1d2a35;
  box-shadow: 0 22px 70px rgba(11, 37, 69, 0.22);
}

.flag-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.flag-dialog h3 {
  margin: 0 0 4px;
  color: #0b2545;
}

.flag-dialog form,
.flag-dialog label {
  display: grid;
  gap: 8px;
}

.flag-dialog form {
  gap: 14px;
}

.flag-dialog select,
.flag-dialog textarea,
.flag-dialog input {
  width: 100%;
  border: 1px solid #d5d9dd;
  border-radius: 7px;
  padding: 10px 12px;
  background: #ffffff;
  color: #1d2a35;
}

.flag-dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.flag-status {
  min-height: 18px;
  color: #5c6b73;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid #d5d9dd;
  border-radius: 999px;
  background: #ffffff;
  color: #0b2545;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.internal-flags-list {
  display: grid;
  gap: 14px;
}

.internal-flag-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.internal-flag-top,
.internal-flag-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.internal-flag-actions {
  justify-content: start;
  margin-top: 12px;
}

.internal-flag-actions select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--field);
  color: var(--ink);
}

.internal-flag-verification {
  max-height: 260px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.analytics-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.analytics-overview span,
.analytics-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.analytics-overview span {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.analytics-overview small,
.analytics-list span,
.analytics-table span {
  color: var(--muted);
}

.analytics-overview strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-card {
  padding: 16px;
}

.analytics-card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
}

.analytics-list {
  display: grid;
  gap: 8px;
}

.analytics-list div,
.analytics-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.analytics-list div:first-child,
.analytics-table div:first-child {
  border-top: 0;
}

.analytics-list strong,
.analytics-table strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-table {
  overflow-x: auto;
}

.analytics-table div {
  grid-template-columns: 1.1fr 0.7fr 1.5fr 0.6fr 0.8fr;
  min-width: 720px;
}

.report-section p,
.markdown-body p {
  color: #1d2a35;
  line-height: 1.62;
  margin: 0 0 14px;
}

.markdown-body h3 {
  margin: 0 0 12px;
  color: #0b2545;
  font-size: 18px;
  line-height: 1.2;
}

.markdown-body ul {
  margin: 0 0 16px 20px;
  color: #1d2a35;
  line-height: 1.62;
}

.markdown-body a {
  color: #13315c;
}

.markdown-table-scroll {
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.markdown-body table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 13px;
  break-inside: auto;
  page-break-inside: auto;
}

.report-figure {
  margin: 22px 0;
  padding: 12px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f5f7fa;
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.report-figure figcaption {
  margin-top: 8px;
  color: #5c6b73;
  font-size: 12px;
  text-align: center;
}

.markdown-body th {
  padding: 9px 10px;
  background: #0b2545;
  color: #ffffff;
  text-align: left;
}

.markdown-body td {
  padding: 9px 10px;
  border-bottom: 1px solid #d5d9dd;
  color: #1d2a35;
  vertical-align: top;
  break-inside: avoid;
  page-break-inside: avoid;
}

.markdown-body tr:nth-child(even) td {
  background: #f5f7fa;
}

.source-notes-list {
  display: grid;
  gap: 10px;
}

.source-note-card {
  padding: 14px 16px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f8fafc;
}

.source-note-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #0b2545;
}

.source-note-title-row strong {
  line-height: 1.25;
}

.source-note-number {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #0b2545;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.source-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0 34px;
}

.source-note-meta span {
  padding: 3px 8px;
  border: 1px solid #d5d9dd;
  border-radius: 999px;
  background: #ffffff;
  color: #5c6b73;
  font-size: 12px;
  font-weight: 750;
}

.source-note-card p {
  margin: 10px 0 0 34px;
  color: #1d2a35;
  font-size: 14px;
  line-height: 1.5;
}

.source-quality-notes {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d5d9dd;
}

.source-quality-notes p {
  color: #5c6b73;
  font-size: 13px;
}

.web-chart {
  margin: 22px 0 18px;
  padding: 20px;
  border: 1px solid rgba(11, 37, 69, 0.12);
  border-radius: 10px;
  background: #f7fafc;
  break-inside: avoid;
  page-break-inside: avoid;
}

.markdown-body tr {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

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

.report-section {
  orphans: 3;
  widows: 3;
}

.report-section h2,
.web-report-section h3,
.markdown-body h2,
.markdown-body h3 {
  break-after: avoid;
  page-break-after: avoid;
}

.top-scenario-slot:empty {
  display: none;
}

.top-thesis-slot:empty {
  display: none;
}

.report-intel-section {
  display: grid;
  gap: 16px;
  margin: 0 0 28px;
}

.report-intel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-intel-card,
.report-history-card {
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f8fafc;
  color: #1d2a35;
}

.report-intel-card {
  padding: 16px;
}

.report-history-card {
  padding: 18px;
}

.report-intel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-intel-heading span {
  color: #0b2545;
  font-size: 18px;
  font-weight: 850;
}

.report-intel-heading strong {
  color: #5c6b73;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quality-check-list,
.assumption-grid {
  display: grid;
  gap: 10px;
}

.quality-check,
.assumption-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #ffffff;
}

.quality-check {
  border-left: 4px solid #94a3b8;
}

.quality-check.good {
  border-left-color: #14b8a6;
}

.quality-check.watch {
  border-left-color: #f59e0b;
}

.quality-check.review {
  border-left-color: #ef4444;
}

.quality-check span,
.assumption-grid span,
.change-chip-row small {
  display: block;
  color: #5c6b73;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quality-check strong,
.assumption-grid strong,
.change-chip-row strong {
  display: block;
  margin-top: 4px;
  color: #0b2545;
  font-size: 14px;
  line-height: 1.25;
}

.quality-check small,
.assumption-grid small {
  display: block;
  margin-top: 5px;
  color: #5c6b73;
  font-size: 12px;
  line-height: 1.35;
}

.compact-audit-card {
  grid-column: 1 / -1;
}

.compact-audit-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-audit-list div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d5d9dd;
  border-radius: 7px;
  background: #ffffff;
}

.compact-audit-list span {
  display: block;
  color: #5c6b73;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.compact-audit-list strong {
  display: block;
  margin-top: 3px;
  color: #0b2545;
  font-size: 13px;
  line-height: 1.25;
}

.risk-card-list {
  display: grid;
  gap: 10px;
}

.risk-card {
  padding: 13px 14px;
  border: 1px solid #d5d9dd;
  border-left: 4px solid #0b2545;
  border-radius: 8px;
  background: #f8fafc;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.risk-card h3 {
  margin: 0 0 10px;
  color: #0b2545;
  font-size: 16px;
  line-height: 1.25;
}

.risk-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.risk-card dl div {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) 1fr;
  gap: 12px;
}

.risk-card dt {
  color: #5c6b73;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.risk-card dd {
  margin: 0;
  color: #1d2a35;
  font-size: 13px;
  line-height: 1.45;
}

.change-summary-text {
  margin: 0 0 12px;
  color: #1d2a35;
  line-height: 1.45;
}

.change-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.change-chip-row span {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #ffffff;
}

.target-history-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}

.history-grid {
  stroke: #d5d9dd;
  stroke-width: 1;
}

.history-line {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-axis-label,
.history-date-label,
.history-view-label {
  fill: #5c6b73;
  font-size: 12px;
}

.history-view-label {
  fill: #0b2545;
  font-weight: 800;
}

.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: #5c6b73;
  font-size: 12px;
  font-weight: 760;
}

.history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.top-thesis-stack {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
}

.top-thesis-card {
  padding: 18px 20px;
  border: 1px solid rgba(11, 37, 69, 0.14);
  border-left: 4px solid #0b2545;
  background: #ffffff;
  color: #0b2545;
  break-inside: avoid;
  page-break-inside: avoid;
}

.top-thesis-card span {
  display: block;
  margin-bottom: 8px;
  color: #0b2545;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-thesis-card p {
  margin: 0;
  color: #0b2545;
  font-size: 1rem;
  line-height: 1.55;
}

.stock-pitch-card,
.one-sentence-thesis-card {
  border-color: rgba(27, 153, 139, 0.2);
  border-left-color: #1b998b;
  background: #e8f3ed;
}

.stock-pitch-card span,
.one-sentence-thesis-card span {
  color: #0f766e;
}

.key-question-card {
  border-color: rgba(99, 102, 241, 0.2);
  border-left-color: #6366f1;
  background: #f0f0ff;
}

.key-question-card .key-question-label {
  color: #4338ca;
}

.key-question-card p {
  color: #1e1b4b;
  font-size: 1rem;
  font-style: italic;
}

.top-scenario-slot .web-chart {
  margin-top: 0;
}

.web-chart figcaption {
  margin-bottom: 16px;
  color: #0b2545;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scenario-asymmetry {
  margin: -6px 0 14px;
  color: #25384a;
  font-size: 0.9rem;
  line-height: 1.35;
}

.scenario-asymmetry strong {
  color: #0b2545;
  font-weight: 900;
}

.football-bars,
.scenario-bars {
  display: grid;
  gap: 14px;
}

.football-marker-axis {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 18px;
  min-height: 42px;
}

.football-marker-track {
  position: relative;
  min-height: 42px;
  border-left: 1px solid rgba(11, 37, 69, 0.18);
  border-right: 1px solid rgba(11, 37, 69, 0.18);
}

.football-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px solid #1b998b;
  z-index: 4;
}

.football-marker-base {
  border-left-color: #d68c1a;
}

.football-marker span {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 7px;
  border: 1px solid rgba(27, 153, 139, 0.36);
  border-radius: 999px;
  background: #ffffff;
  color: #0b2545;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(11, 37, 69, 0.08);
}

.football-marker-base span {
  border-color: rgba(214, 140, 26, 0.42);
}

.football-marker.is-below span {
  top: 21px;
}

.football-marker.edge-left span {
  transform: none;
}

.football-marker.edge-right span {
  left: auto;
  right: 0;
  transform: none;
}

.football-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  align-items: center;
  gap: 18px;
}

.football-label,
.scenario-label {
  color: #25384a;
  font-size: 0.9rem;
  font-weight: 800;
}

.football-track {
  position: relative;
  height: 34px;
  border-left: 1px solid rgba(11, 37, 69, 0.2);
  border-right: 1px solid rgba(11, 37, 69, 0.2);
  background: linear-gradient(90deg, rgba(11, 37, 69, 0.08) 1px, transparent 1px) 0 0 / 20% 100%;
}

.football-range {
  position: absolute;
  top: 9px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #23486f, #1b998b);
  z-index: 1;
}

.football-marker-line {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 0;
  border-left: 2px solid #1b998b;
  z-index: 3;
}

.football-marker-line-base {
  border-left-color: #d68c1a;
  border-left-style: dashed;
}

.football-low,
.football-high {
  position: absolute;
  top: -13px;
  transform: translateX(-50%);
  color: #0b2545;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.football-helper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  color: #5c6b73;
  font-size: 0.78rem;
  line-height: 1.35;
}

.scenario-row {
  display: grid;
  grid-template-columns: minmax(92px, 140px) 1fr auto minmax(70px, auto);
  align-items: center;
  gap: 14px;
}

.scenario-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(11, 37, 69, 0.08);
}

.scenario-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1b998b;
}

.scenario-row strong {
  color: #0b2545;
}

.scenario-row small {
  color: #5c6b73;
  font-weight: 800;
}

.financial-bars {
  display: flex;
  align-items: end;
  min-height: 220px;
  gap: 14px;
  padding: 12px 6px 0;
  border-bottom: 1px solid rgba(11, 37, 69, 0.18);
  background: linear-gradient(180deg, rgba(11, 37, 69, 0.05) 1px, transparent 1px) 0 0 / 100% 25%;
}

.financial-row {
  display: grid;
  flex: 1;
  min-width: 62px;
  align-items: end;
  gap: 8px;
}

.financial-series {
  display: grid;
  grid-template-columns: repeat(var(--series-count), minmax(8px, 1fr));
  align-items: end;
  height: 180px;
  gap: 4px;
}

.financial-series span {
  display: block;
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  background: #8da9c4;
}

.financial-series span:nth-child(2) {
  background: #0b2545;
}

.financial-series span:nth-child(3) {
  background: #1b998b;
}

.financial-series .empty {
  opacity: 0.12;
}

.financial-period {
  color: #5c6b73;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.financial-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #5c6b73;
  font-size: 0.8rem;
  font-weight: 800;
}

.financial-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.financial-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #8da9c4;
}

.financial-legend span:nth-child(2) i {
  background: #0b2545;
}

.financial-legend span:nth-child(3) i {
  background: #1b998b;
}

.thesis-box {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-left: 4px solid #1b998b;
  background: #e8f1ec;
}

.validation-warning-box {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-left: 4px solid #f0a202;
  background: #fff8e5;
  color: #1d2a35;
}

.web-report-section {
  padding: 20px 0;
  border-bottom: 1px solid #d5d9dd;
}

.web-report-section:first-child {
  padding-top: 4px;
}

.web-report-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #0b2545;
  font-size: 22px;
  letter-spacing: 0;
}

.web-report-section h3::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #d5d9dd;
}

.web-report-section p {
  max-width: 82ch;
  margin-bottom: 13px;
  color: #26352f;
  font-size: 15px;
  line-height: 1.72;
}

.markdown-body ol,
.markdown-body ul {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
  padding-left: 22px;
}

.markdown-body ol li,
.markdown-body ul li {
  padding: 12px 14px;
  border-left: 3px solid #1b998b;
  background: #f7fafc;
  color: #1d2a35;
  line-height: 1.55;
}

.web-report-section .numbered-point {
  padding-left: 14px;
  border-left: 2px solid #d5d9dd;
}

.insight-callout {
  margin: 18px 0 22px;
  padding: 22px 24px;
  border: 1px solid #cfe0d6;
  border-left: 5px solid #1b998b;
  border-radius: 8px;
  background: #e8f1ec;
}

.insight-callout h3 {
  margin-bottom: 10px;
  color: #0b2545;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-callout h3::after {
  display: none;
}

.insight-callout p {
  margin-bottom: 0;
}

.markdown-body sup,
.markdown-body a[href^="#source-"] {
  color: #0f766e;
  font-size: 0.78em;
  font-weight: 800;
  text-decoration: none;
  vertical-align: super;
}

.thesis-box span {
  display: block;
  margin-bottom: 8px;
  color: #0b2545;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.validation-warning-box span {
  display: block;
  margin-bottom: 8px;
  color: #0b2545;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.validation-warning-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

.thesis-box p {
  margin: 0;
  color: #1d2a35;
  line-height: 1.6;
}

.report-disclaimer {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid #d5d9dd;
  color: #607067;
  font-size: 12px;
  line-height: 1.55;
}

.report-disclaimer strong {
  display: block;
  margin-bottom: 6px;
  color: #0b2545;
  font-size: 12px;
}

.report-disclaimer p {
  margin: 6px 0 0;
}

.report-disclaimer a {
  display: inline-flex;
  margin-top: 8px;
  color: #0f766e;
  font-weight: 760;
}

.report-side-nav {
  pointer-events: none;
  position: fixed;
  inset: 50% 18px auto;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.report-side-arrow {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 54px;
  max-width: 220px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(11, 37, 69, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(11, 37, 69, 0.16);
  color: #0b2545;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.report-side-arrow:hover {
  border-color: rgba(27, 153, 139, 0.7);
  transform: translateY(-1px);
}

.report-side-arrow.disabled {
  pointer-events: none;
  opacity: 0.28;
}

.arrow-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #0b2545;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.arrow-copy {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.report-side-arrow.previous .arrow-copy {
  text-align: left;
}

.report-side-arrow.next .arrow-copy {
  text-align: right;
}

.arrow-copy small {
  color: #5c6b73;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arrow-copy strong {
  color: #0b2545;
  font-size: 13px;
  white-space: normal;
}

@media (max-width: 1400px) and (min-width: 901px) {
  .report-side-arrow {
    width: 56px;
    max-width: 56px;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
  }

  .report-side-arrow .arrow-copy {
    display: none;
  }
}

.report-meta {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.section-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.section-sources a {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.sources {
  margin-top: 26px;
  padding: 18px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.preview-notice {
  margin: 24px 0 8px;
  padding: 18px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #f5f7fa;
  color: #1d2a35;
}

.newsletter {
  border-top: 1px solid var(--line);
}

.database-page {
  width: min(1480px, calc(100% - clamp(28px, 6vw, 96px)));
  margin: 0 auto;
  padding: 56px 0;
}

.database-header h1 {
  margin-bottom: 14px;
}

.database-panel {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.database-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.database-section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 42px);
}

.database-toolbar {
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(210px, 0.62fr) minmax(300px, 0.86fr) minmax(80px, auto);
  align-items: center;
  gap: 16px 22px;
  margin-bottom: 16px;
}

.database-toolbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-height: 44px;
  justify-content: center;
}

.db-unread-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.db-unread-toggle::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}
.db-unread-toggle.active {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.db-unread-toggle.active::before {
  background: var(--accent);
  border-color: var(--accent);
}

.database-toolbar .email-input {
  width: 100%;
  height: 44px;
  align-self: end;
}

.saved-view-control {
  display: grid;
  gap: 5px;
  align-self: stretch;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.saved-view-control select {
  min-height: 44px;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

.library-view-control {
  display: grid;
  gap: 5px;
  align-self: stretch;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.database-toolbar [data-database-mode-hint] {
  display: none;
}

.library-view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.library-view-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.library-view-toggle button.active,
.library-view-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #07120f;
}

.library-view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.column-picker {
  position: relative;
  flex: 0 0 auto;
}

.column-picker-button {
  min-height: 44px;
  padding-inline: 16px;
}

.column-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 6px 12px;
  width: min(440px, 86vw);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.column-menu[hidden] {
  display: none;
}

.column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.column-option input {
  accent-color: var(--accent);
}

.table-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.table-scroll::-webkit-scrollbar {
  display: none;
}

.opportunity-map-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  max-height: 680px;
}

.opportunity-map {
  display: block;
  min-height: 620px;
}

.opportunity-map > rect {
  fill: var(--surface-soft);
}

.map-grid {
  stroke: color-mix(in srgb, var(--muted) 18%, transparent);
  stroke-width: 1;
}

.map-axis {
  stroke: color-mix(in srgb, var(--muted) 65%, transparent);
  stroke-width: 1.25;
}

.map-zero {
  stroke: color-mix(in srgb, var(--accent) 70%, transparent);
  stroke-dasharray: 4 6;
  stroke-width: 1.5;
}

.map-label-leader {
  stroke: color-mix(in srgb, var(--accent) 45%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  pointer-events: none;
}

.map-title,
.map-x-title,
.map-y-title,
.map-axis-label {
  fill: var(--muted);
  font-family: inherit;
}

.map-title {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.map-x-title,
.map-y-title {
  font-size: 13px;
  font-weight: 760;
}

.map-axis-label {
  font-size: 13px;
  font-weight: 650;
}

.opportunity-point circle {
  opacity: 0.88;
  stroke: var(--surface-soft);
  stroke-width: 1.5;
  transition: opacity 140ms ease, r 140ms ease;
}

.opportunity-point text {
  fill: color-mix(in srgb, var(--accent) 84%, var(--ink));
  font-size: 13px;
  font-weight: 760;
  paint-order: stroke;
  stroke: var(--surface-soft);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.idea-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.idea-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.idea-controls select,
.idea-arrows button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

.idea-controls select {
  min-width: 150px;
  padding: 0 12px;
}

.idea-arrows {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.idea-arrows button {
  width: 46px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 900;
}

.idea-carousel-shell {
  position: relative;
  overflow: hidden;
}

.idea-carousel-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 92px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}

.idea-stream {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 460px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 56px 14px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.idea-stream::-webkit-scrollbar {
  display: none;
}

.idea-card {
  display: flex;
  min-height: 500px;
  padding: 26px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.idea-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.idea-card-actions {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.idea-ticker {
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.idea-identity-row {
  gap: 12px;
  min-width: 0;
}

.idea-company-logo {
  width: 30px;
  height: 30px;
  margin-top: 2px;
}

.idea-name {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.25;
}

.idea-market-cap {
  margin-top: 6px;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.idea-card-multiples {
  margin-top: 4px;
  color: color-mix(in srgb, var(--accent) 72%, var(--muted));
  font-size: 11px;
  font-weight: 780;
  line-height: 1.25;
}

.idea-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, #34d399 60%, transparent);
  border-radius: 999px;
  color: #34d399;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.idea-badge.long,
.idea-badge.positive {
  border-color: color-mix(in srgb, #34d399 60%, transparent);
  color: #34d399;
}

.idea-badge.short {
  border-color: color-mix(in srgb, #c1292e 70%, transparent);
  color: #c1292e;
}

.idea-badge.hold,
.idea-badge.neutral,
.idea-badge.speculative {
  border-color: color-mix(in srgb, #f0a202 70%, transparent);
  color: #f0a202;
}

.idea-ai-score {
  display: grid;
  justify-items: end;
  gap: 2px;
  max-width: 142px;
  color: var(--muted);
  line-height: 1.05;
}

.idea-ai-score small {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.idea-ai-score strong {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.idea-ai-score em {
  margin-left: 1px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.idea-ai-score span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.idea-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.idea-metrics span {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.idea-metrics small {
  margin-right: 2px;
}

.idea-metrics strong {
  color: var(--ink);
}

.idea-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.idea-card-details span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.idea-card-details small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.idea-card-details strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.idea-ownership {
  max-width: 100%;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.idea-thesis {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.idea-link {
  display: inline-flex;
  margin-top: auto;
  padding-top: 22px;
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.idea-feed-page {
  width: min(1180px, calc(100% - clamp(28px, 6vw, 96px)));
}

.top-ranked-page {
  width: min(1180px, calc(100% - clamp(28px, 6vw, 96px)));
}

.top-ranked-list {
  display: grid;
  gap: 14px;
}

.top-ranked-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.top-ranked-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.top-ranked-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.top-ranked-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.top-ranked-identity-row {
  gap: 12px;
  min-width: 0;
}

.top-ranked-company-logo {
  width: 27px;
  height: 27px;
  margin-top: 0;
}

.top-ranked-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
}

.idea-feed-panel {
  padding: clamp(18px, 2.5vw, 26px);
}

.idea-feed-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.idea-feed-tabs.compact {
  margin: 8px 0 14px;
}

.idea-feed-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.idea-feed-tabs button.active,
.idea-feed-tabs button[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 15%, var(--surface-soft));
  color: var(--accent);
}

/* "For You" tab — visually distinct, hints at personalization */
.idea-feed-tabs .tab-for-you {
  border-color: color-mix(in srgb, #818cf8 50%, transparent);
  color: #818cf8;
  font-weight: 750;
}
.idea-feed-tabs .tab-for-you.active,
.idea-feed-tabs .tab-for-you[aria-selected="true"] {
  border-color: #818cf8;
  background: color-mix(in srgb, #818cf8 15%, var(--surface-soft));
  color: #818cf8;
}

.idea-feed-more-filters {
  margin-bottom: 14px;
}

.idea-feed-more-filters summary {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s, border-color 0.15s;
}

.idea-feed-more-filters summary:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.idea-feed-more-filters summary::-webkit-details-marker {
  display: none;
}

.idea-feed-more-filters summary::after {
  content: " +";
  color: var(--accent);
}

.idea-feed-more-filters[open] summary::after {
  content: " -";
}

.idea-feed-list {
  display: grid;
  gap: 22px;
}

/* ── Swipe nav bar (mobile only, shown via JS) ─────────────────────────────── */
.feed-swipe-nav {
  display: none; /* shown on mobile via JS unhide */
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 6px 0 14px;
}

.feed-swipe-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 17px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}

.feed-swipe-nav button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
}

.feed-swipe-nav button:disabled {
  opacity: 0.25;
  cursor: default;
}

.feed-swipe-nav span {
  min-width: 72px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ── Swipe deck (active on all screen sizes) ─────────────────────────────── */
.idea-feed-list.swipe-active {
  /* Switch away from grid: all children are position:absolute in swipe mode
     so grid adds no value and its abs-positioned-child containing-block rules
     can cause width:100% on cards to resolve against the wrong ancestor. */
  display: block;
  position: relative;
  overflow: hidden;
  /* height driven by JS; animate smoothly when card changes */
  transition: height 0.28s ease;
  /* Ensure container is never invisible before JS sets its height */
  min-height: 200px;
}

/* In swipe mode every card is stacked absolutely; default off-screen right */
.idea-feed-list.swipe-active .idea-feed-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

/* Current card — centered, interactive */
.idea-feed-list.swipe-active .idea-feed-card.swipe-current {
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
  cursor: grab;
}

.idea-feed-list.swipe-active .idea-feed-card.swipe-current:active {
  cursor: grabbing;
}

/* Already-seen cards — off-screen left */
.idea-feed-list.swipe-active .idea-feed-card.swipe-prev {
  transform: translateX(-100%);
  z-index: 1;
}

/* Upcoming cards stay on the right (default translateX(100%)) */
.idea-feed-list.swipe-active .idea-feed-card.swipe-next {
  z-index: 1;
}

/* ── Swipe hint overlays ──────────────────────────────────────────────────── */
.swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  border-radius: 8px;
  padding: 6px 12px;
  border: 3px solid currentColor;
  z-index: 10;
  transition: opacity 0.08s linear;
  white-space: nowrap;
}
.swipe-hint-save {
  left: 18px;
  color: #3fb950;
  transform: translateY(-50%) rotate(-12deg);
}
.swipe-hint-pass {
  right: 18px;
  color: #e5534b;
  transform: translateY(-50%) rotate(12deg);
}

/* ── Floating action bar ─────────────────────────────────────────────────── */
.swipe-fab-bar {
  display: none; /* shown when swipe-feed-active */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 300;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
}

/* Show FAB whenever swipe mode is active (all screen sizes) */
body.swipe-feed-active .swipe-fab-bar { display: flex; }
.fab-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 20px 2px;
}
.fab-progress-row .swipe-progress-track {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.fab-progress-row .swipe-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.35s ease;
}
.fab-progress-row .swipe-progress-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.fab-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 12px 4px;
}
.fab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:active { transform: scale(0.9); }
.fab-btn:hover  { background: var(--surface-soft); }
.fab-icon {
  font-size: 20px;
  line-height: 1;
}
.fab-label {
  display: none; /* icon-only */
}
.fab-pass  { color: #e5534b; }
.fab-save  { color: #34d399; }
.fab-read  { color: var(--accent); }
.fab-share { color: var(--text-secondary); }
.fab-fullscreen { color: var(--muted); font-size: 16px; opacity: 0.7; }

/* ── Swipe mode — all screen sizes ────────────────────────────────────────── */

/* Panel becomes a flex column so cards stack with filter chips below */
body.swipe-feed-active .idea-feed-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 80px; /* clear the FAB bar */
}

body.swipe-feed-active .swipe-progress-bar-wrap { display: none; } /* progress lives in FAB */

/* ── Card exit / entrance animations ─────────────────────────────────────── */
@keyframes swipeExitLeft {
  0%   { transform: translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateX(-120%) rotate(-20deg); opacity: 0; }
}
@keyframes swipeExitRight {
  0%   { transform: translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateX(120%) rotate(20deg); opacity: 0; }
}
@keyframes swipeRiseIn {
  0%   { transform: scale(0.97) translateY(8px); opacity: 0.55; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.idea-feed-card.swipe-exit-left {
  animation: swipeExitLeft 0.34s cubic-bezier(0.4, 0, 0.9, 0.6) forwards !important;
  pointer-events: none;
  z-index: 10;
}
.idea-feed-card.swipe-exit-right {
  animation: swipeExitRight 0.34s cubic-bezier(0.4, 0, 0.9, 0.6) forwards !important;
  pointer-events: none;
  z-index: 10;
}

/* ── Desktop swipe: immersive one-card-at-a-time experience ──────────────── */
@media (min-width: 768px) {
  /* Hide page chrome and FAB bar — card is the entire experience */
  body.swipe-feed-active .idea-feed-header    { display: none; }
  body.swipe-feed-active .database-section-heading { display: none; }
  body.swipe-feed-active .idea-feed-more-filters   { display: none; }
  body.swipe-feed-active .swipe-fab-bar        { display: none !important; }
  body.swipe-feed-active .swipe-desktop-nav    { display: none; }

  /* Filters hidden by default — shown when toggled */
  body.swipe-feed-active .idea-feed-tabs:not(.filters-open) {
    display: none !important;
  }
  body.swipe-feed-active .idea-feed-tabs.filters-open {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0 6px;
    animation: fadeIn 0.18s ease;
  }

  /* Panel: column-centered, card fills the view */
  body.swipe-feed-active .idea-feed-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 56px);
    padding: 20px 20px 36px;
    gap: 0;
  }

  /* Swipe topbar: filter toggle + counter */
  .swipe-topbar { display: none; }
  body.swipe-feed-active .swipe-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1050px;
    margin-bottom: 12px;
  }

  /* Card container — wider portrait card, fixed height so it never jumps */
  body.swipe-feed-active .idea-feed-list.swipe-active {
    max-width: 1050px;
    width: 100%;
    /* height driven by JS (max of all seen cards); CSS min ensures it never collapses */
    min-height: 640px;
  }

  /* Single-column portrait card layout overrides */
  body.swipe-feed-active .idea-feed-card {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    grid-template-rows: auto;
    border-radius: 18px;
  }

  /* Current card: floating shadow — no tilt, always fully visible */
  body.swipe-feed-active .idea-feed-card.swipe-current {
    box-shadow:
      0 2px 4px rgba(0,0,0,0.12),
      0 8px 24px rgba(0,0,0,0.3),
      0 28px 80px rgba(0,0,0,0.55);
    z-index: 10;
  }

  /* Reset any left-panel-specific overrides from previous layout */
  body.swipe-feed-active .ifc-header {
    grid-area: unset;
    border-right: none;
    border-radius: 18px 18px 0 0;
    padding: 22px 28px 16px;
  }
  body.swipe-feed-active .ifc-scenarios {
    grid-area: unset;
    margin: 0 28px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.swipe-feed-active .ifc-stock-price-bar {
    grid-area: unset;
    margin: 0 28px 14px;
    padding: 0;
    border-right: none;
  }
  body.swipe-feed-active .ifc-thesis {
    grid-area: unset;
    margin: 0 28px 16px;
    padding: 0;
    font-size: 15.5px;
    line-height: 1.7;
  }
  body.swipe-feed-active .ifc-key-question {
    grid-area: unset;
    margin: 0 24px 20px;
  }
  body.swipe-feed-active .ifc-footer {
    grid-area: unset;
    border-radius: 0 0 18px 18px;
    border-top: 1px solid var(--line);
    padding: 11px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
  }
  body.swipe-feed-active .ifc-footer-actions { margin-left: auto; }

  /* ── Stack depth: background card invisible — no ghost, no bleed-through ── */
  body.swipe-feed-active .idea-feed-card.swipe-next-1 {
    transform: translateX(4px) scale(0.96) translateY(10px);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
  }

  /* ── Keyboard hints bar ─────────────────────────────────────────────────── */
  .swipe-kb-hints { display: none; }
  body.swipe-feed-active .swipe-kb-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 16px;
    font-size: 11.5px;
    color: var(--muted);
    opacity: 0.55;
    user-select: none;
    letter-spacing: 0.01em;
  }
  body.swipe-feed-active .swipe-kb-hints kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
    border-radius: 4px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 750;
    margin-right: 5px;
    background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
  }

  /* ── Undo bar ───────────────────────────────────────────────────────────── */
  .swipe-undo-bar { display: none; }
  body.swipe-feed-active .swipe-undo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    min-height: 32px;
    font-size: 12px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }
  body.swipe-feed-active .swipe-undo-bar:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
  }
  body.swipe-feed-active .swipe-undo-bar .swipe-undo-label {
    letter-spacing: 0.01em;
  }
  body.swipe-feed-active .swipe-undo-bar .swipe-undo-label strong {
    color: var(--fg);
    font-weight: 700;
  }
  body.swipe-feed-active .swipe-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
  }
  body.swipe-feed-active .swipe-undo-btn:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: var(--accent);
  }

  /* ── Filter toggle ──────────────────────────────────────────────────────── */
  .swipe-filter-toggle { display: none; }
  body.swipe-feed-active .swipe-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
  }
  body.swipe-feed-active .swipe-filter-toggle:hover,
  body.swipe-feed-active .swipe-filter-toggle.active {
    border-color: var(--accent);
    color: var(--accent);
  }

  /* Compact counter */
  .swipe-counter-compact {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
  }
}

/* Desktop nav hidden by default (shown only when swipe-feed-active) */
.swipe-desktop-nav {
  display: none;
}

/* ── Mobile immersive swipe mode ─────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hide scenario boxes — numbers appear inline in the thesis text */
  .idea-feed-list.swipe-active .ifc-scenarios { display: none; }
  /* range bar kept visible — it's the primary price context on mobile */
  /* Hide per-card Save/Read/Share bar — FAB replaces it */
  .idea-feed-list.swipe-active .ifc-footer-actions { display: none; }
  /* Shrink valuation meta line — secondary info only */
  .idea-feed-list.swipe-active .ifc-size {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 1px;
  }

  /* ── Immersive layout: minimum chrome, maximum card ─────────── */
  body.swipe-feed-active .topbar               { display: none; } /* reclaim ~56px */
  body.swipe-feed-active .idea-feed-header        { display: none; }
  body.swipe-feed-active .database-section-heading { display: none; }
  body.swipe-feed-active .idea-feed-more-filters  { display: none; }
  body.swipe-feed-active .feed-swipe-nav          { display: none; }
  body.swipe-feed-active [data-idea-feed-count]   { display: none; }

  /* Remove page top padding — card starts at top of safe area */
  body.swipe-feed-active .database-page {
    padding-top: env(safe-area-inset-top, 8px);
  }

  /* Panel: no outer box framing, full bleed */
  body.swipe-feed-active .idea-feed-panel {
    padding-bottom: 100px; /* taller clearance for mobile FAB */
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
  }

  /* Order: card → filter chips */
  body.swipe-feed-active .idea-feed-list { order: 1; }
  body.swipe-feed-active .idea-feed-tabs { order: 2; }

  /* Hide rank pill (#4 of 23) on mobile swipe */
  body.swipe-feed-active .ifc-rank-pill { display: none; }

  /* Hide filter chips in fullscreen — card fills the whole screen */
  :fullscreen body.swipe-feed-active .idea-feed-tabs,
  :-webkit-full-screen body.swipe-feed-active .idea-feed-tabs { display: none; }

  /* Filter chips: scrollable row BELOW the card, edge-to-edge strip */
  body.swipe-feed-active .idea-feed-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 16px 12px;
    gap: 6px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    margin: 0;
  }
  body.swipe-feed-active .idea-feed-tabs::-webkit-scrollbar { display: none; }
  body.swipe-feed-active .idea-feed-tabs button {
    flex-shrink: 0;
    padding: 5px 13px;
    font-size: 12px;
    border-radius: 20px;
  }
}

/* ── Swipe progress bar (lives inside FAB bar) ───────────────────────────── */
/* standalone wrap kept for graceful fallback but hidden by default */
.swipe-progress-bar-wrap { display: none; }

/* Progressive-load sentinels — invisible, just trigger IntersectionObserver */
.feed-load-sentinel,
.db-load-sentinel {
  height: 1px;
  pointer-events: none;
}

/* ── Idea Feed Card ───────────────────────────────────────── */
.idea-feed-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

/* Header: ticker + badges */
.ifc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 12px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.ifc-identity {
  min-width: 0;
}

.ifc-identity-row {
  gap: 13px;
  min-width: 0;
}

.ifc-identity-row .company-logo-mark {
  margin-top: 1px;
}

.ifc-ticker {
  display: block;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.ifc-ticker:hover {
  color: var(--accent);
}

.ifc-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
  cursor: default;
}

.ifc-industry {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  cursor: default;
  opacity: 0.8;
}

.ifc-size {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
}
.ifc-size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
}
/* zero-height spacer — row break is achieved via flex-direction: column */
.ifc-size-row-break { display: none; }
.ifc-size-chunk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ifc-size-label {
  color: var(--muted);
  font-weight: 400;
}
.ifc-size-val {
  color: var(--ink);
  font-weight: 600;
}
.ifc-size-val.rev-growth-positive { color: #34d399; }
.ifc-size-val.rev-growth-negative { color: #f87171; }
.ifc-size-sep {
  color: var(--muted);
  font-size: 10px;
  margin: 0 1px;
}

.ifc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

.ifc-rank-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.ifc-rank-pill:hover {
  opacity: 0.85;
}

.ifc-idea-type {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
  white-space: normal;
  max-width: 180px;
}

/* Subtle brand attribution — visible in screenshots/social shares */
.ifc-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  opacity: 0.45;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.ifc-brand svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Scenario boxes */
.ifc-scenarios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 24px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ifc-scenario {
  padding: 12px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.ifc-scenario:last-child {
  border-right: 0;
}

.ifc-scenario small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ifc-scenario strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight: 800;
  line-height: 1;
}

.ifc-bull strong { color: #34d399; }
.ifc-base strong { color: var(--ink); }
.ifc-bear strong { color: #f87171; }
.ifc-ratio strong { color: #818cf8; }

/* Stock price range */
.ifc-stock-price-bar {
  margin: 0 24px 12px;
  min-width: 0;
  /* Clip labels that stray horizontally outside the bar bounds */
  overflow: hidden;
}

.ifc-stock-price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.ifc-stock-price-head strong {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ifc-stock-price-track {
  position: relative;
  height: 76px;
}

.ifc-stock-price-rail,
.ifc-stock-price-52w {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
}

.ifc-stock-price-rail {
  left: 0;
  right: 0;
  height: 4px;
  background: var(--line);
}

.ifc-stock-price-52w {
  height: 8px;
  background: color-mix(in srgb, var(--muted) 28%, var(--line));
}

.ifc-stock-price-marker {
  position: absolute;
  --marker-color: var(--muted);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 30px;
  border-radius: 999px;
  background: transparent; /* no stem — dots only via ::before */
  z-index: 1;
}

.ifc-stock-price-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--marker-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker-color) 22%, transparent);
}

.ifc-stock-price-marker--current {
  width: 0;
  height: 40px; /* keep height so label offsets work */
  background: transparent;
}

.ifc-stock-price-marker--base {
  --marker-color: #f59e0b;
}

.ifc-stock-price-marker--bull {
  --marker-color: #34d399;
}

.ifc-stock-price-marker--bear {
  --marker-color: #f87171;
}

.ifc-stock-price-marker--low52,
.ifc-stock-price-marker--high52 {
  --marker-color: color-mix(in srgb, var(--muted) 80%, var(--accent));
}

.ifc-stock-price-marker--current {
  --marker-color: var(--accent);
}

.ifc-stock-price-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 106px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.ifc-stock-price-marker--top .ifc-stock-price-label {
  bottom: 28px;
}

.ifc-stock-price-marker--bottom .ifc-stock-price-label {
  top: 28px;
}

.ifc-stock-price-marker--edge-left {
  transform: translate(0, -50%);
}

.ifc-stock-price-marker--edge-right {
  transform: translate(-100%, -50%);
}

.ifc-stock-price-marker--edge-left .ifc-stock-price-label {
  left: 0;
  transform: none;
  text-align: left;
}

.ifc-stock-price-marker--edge-right .ifc-stock-price-label {
  right: 0;
  left: auto;
  transform: none;
  text-align: right;
}

.ifc-stock-price-label b,
.ifc-stock-price-label small {
  display: block;
}

.ifc-stock-price-label b {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ifc-stock-price-label small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 10px;
}

/* Thesis paragraph */
.ifc-thesis {
  margin: 0 24px 14px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.62;
}

/* Key question */
.ifc-key-question {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 24px 14px;
  padding: 12px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, #3730a3 18%, var(--surface));
  border: 1px solid color-mix(in srgb, #818cf8 28%, transparent);
}

.ifc-kq-label {
  flex-shrink: 0;
  color: #818cf8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ifc-kq-text {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

/* Footer */
.ifc-footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  padding: 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 30%, transparent);
}

/* Catalyst: first item, gets as much space as it needs — never wraps */
.ifc-footer-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;        /* don't shrink — own min-content width */
  padding: 9px 16px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

/* Updated and Conviction are short labels — stay compact */
.ifc-footer-item.ifc-footer-updated,
.ifc-footer-item.ifc-footer-conviction {
  flex: 0 1 auto;
  min-width: 0;
}

/* Catalyst always gets first priority for space */
.ifc-footer-item.ifc-footer-catalyst {
  flex: 1 0 auto;
}

.ifc-footer-item:last-child {
  border-right: 0;
}

.ifc-footer-icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.8;
}

.ifc-footer-item > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ifc-footer strong {
  color: var(--ink);
  font-weight: 760;
}

.ifc-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 6px 14px 6px 8px;
  border-left: none;
}

.ifc-footer-actions .pitch-actions {
  margin-top: 0;
}

.ifc-footer-actions .pitch-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.pitch-view-link {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #0b2545;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.pitch-view-link:hover {
  opacity: 0.85;
}

.pitch-create-btn {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.pitch-create-btn:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.pitch-create-btn:disabled { opacity: 0.6; cursor: default; }

/* Filled/solid CTA for upgrading a card_quick to a full report */
.pitch-full-btn {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.pitch-full-btn:hover { opacity: 0.85; }
.pitch-full-btn:disabled { opacity: 0.6; cursor: default; }

/* Generate Pitch button — outlined accent, with arrow feel */
.pitch-generate-btn {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.pitch-generate-btn:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.pitch-generate-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.pitch-generate-btn.generating {
  opacity: 0.65;
  cursor: default;
  animation: pulse-opacity 1.6s ease-in-out infinite;
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 0.35; }
}

/* Generating badge — appears in card header */
.pitch-generating-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  animation: pulse-opacity 1.6s ease-in-out infinite;
}
.pitch-generating-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Toast notification container */
.pitch-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.pitch-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 240px;
  max-width: 340px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pitch-toast-ready {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.pitch-toast-ticker {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent);
  flex-shrink: 0;
}
.pitch-toast-msg {
  flex: 1;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.pitch-toast-link {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.pitch-toast-link:hover { opacity: 0.85; }
.pitch-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 4px;
  flex-shrink: 0;
  font-family: inherit;
}

/* Legacy selectors still referenced in top-ranked */
.top-ranked-market-cap {
  margin-top: 7px;
  color: color-mix(in srgb, var(--muted) 80%, var(--ink));
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.idea-feed-multiples,
.top-ranked-multiples {
  margin-top: 4px;
  color: color-mix(in srgb, var(--accent) 72%, var(--muted));
  font-size: 11px;
  font-weight: 780;
  line-height: 1.25;
}

.idea-feed-link {
  align-self: stretch;
  justify-content: center;
  white-space: nowrap;
}

.idea-badge.avoid {
  border-color: color-mix(in srgb, #c1292e 70%, transparent);
  color: #c1292e;
}

@media (max-width: 720px) {
  .idea-stream {
    grid-auto-columns: minmax(290px, 86vw);
  }

  .idea-card {
    min-height: 500px;
    padding: 22px;
  }

  .idea-card-details {
    grid-template-columns: 1fr;
  }

  /* New ifc card mobile */
  .ifc-scenarios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 16px;
    margin-right: 16px;
  }

  .ifc-scenario:nth-child(2) {
    border-right: 0;
  }

  .ifc-scenario:nth-child(3),
  .ifc-scenario:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .ifc-stock-price-bar,
  .ifc-thesis,
  .ifc-key-question {
    margin-left: 16px;
    margin-right: 16px;
  }

  .ifc-stock-price-track {
    height: 92px;
  }

  .ifc-stock-price-label {
    max-width: 74px;
    font-size: 9px;
    white-space: normal;
  }

  .ifc-header {
    padding: 12px 16px 8px;
  }

  .ifc-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ifc-footer-item {
    border-right: 0;
    border-bottom: none;
    padding: 7px 16px;
  }

  .ifc-footer-item:last-child {
    border-bottom: 0;
  }

  .ifc-footer-actions {
    justify-content: flex-start;
    margin-left: 0;
    padding: 6px 16px;
    border-left: 0;
    border-top: none;
  }

  .ifc-footer-item > span {
    white-space: normal;
  }
}

.opportunity-point:hover circle {
  opacity: 1;
  r: 7;
}

.database-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.25;
}

.database-table th,
.database-table td {
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.database-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--ink);
  background: var(--surface-soft);
  cursor: pointer;
  user-select: none;
  line-height: 1.05;
}

/* Sticky ticker column */
.database-table td.col-ticker {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.database-table th.col-ticker {
  position: sticky;
  left: 0;
  z-index: 3;
}

/* Subtle alternating stripe — compact mode only */
.database-table.compact-mode .database-row:nth-child(odd) td {
  background: color-mix(in srgb, var(--ink) 2%, transparent);
}

.database-table.compact-mode .database-row:nth-child(odd) td.col-ticker {
  background: color-mix(in srgb, var(--ink) 2%, var(--surface));
}

.database-row:hover td,
.database-row.expanded td {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* Sticky cell needs solid bg on hover to prevent bleed-through */
.database-row:hover td.col-ticker,
.database-row.expanded td.col-ticker {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.database-row:focus-visible td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.database-expansion-row td {
  padding: 0 7px 14px;
  white-space: normal;
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--accent) 8%);
}

.library-mini-card {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.database-table.expanded-mode .library-mini-card {
  padding: 16px 18px;
}

.mini-card-item {
  min-width: 0;
}

.mini-card-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-card-item p {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mini-card-link {
  align-self: center;
  justify-self: start;
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.database-table th.sorted::after {
  content: attr(data-direction);
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
}

.database-table th.sorted[data-priority]:not([data-priority=""])::before {
  content: attr(data-priority);
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
}

.database-table .th-stack {
  display: inline-block;
}

.database-table .th-subtext {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: none;
}

.database-table .col-ticker {
  width: 7%;
  min-width: 92px;
}

.table-ticker-link {
  align-items: center;
  gap: 12px;
  min-width: 86px;
}

.table-company-logo {
  width: 22px;
  height: 22px;
  color: color-mix(in srgb, var(--muted) 62%, var(--ink));
  opacity: 0.84;
}

.database-table .col-company-sector {
  width: 13%;
}

.database-table .col-view {
  width: 5%;
}

.database-table .col-ai-score {
  width: 8%;
}

.database-table .col-idea-type {
  width: 12%;
}

.database-table .col-size {
  width: 7%;
}

.database-table .col-market-cap,
.database-table .col-report-date,
.database-table .col-current-price,
.database-table .col-target,
.database-table .col-ai-trend,
.database-table .col-percent,
.database-table .col-asymmetry,
.database-table .col-return,
.database-table .col-catalyst,
.database-table .col-catalyst-type {
  width: 7%;
}

.database-table .col-link {
  width: 6%;
}

.database-table td.col-idea-type {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.database-table th .th-stack {
  white-space: normal;
}

.database-table th:has(.th-stack),
.database-table td.col-catalyst-type {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.2;
}

.database-table td.col-company-sector {
  white-space: normal;
}

.database-table td.col-company-sector {
  line-height: 1.3;
}

.database-table td.col-ai-trend {
  padding-right: 10px;
  line-height: 1.2;
  white-space: normal;
}

.database-table td.col-ai-trend strong {
  display: block;
}

.ai-score-cell {
  display: grid;
  gap: 2px;
  white-space: normal;
}

.ai-score-cell strong {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.ai-score-cell span {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
}

.table-subtext {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

.table-link {
  color: var(--accent);
  font-weight: 760;
  text-decoration: none;
}

.table-primary-link {
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.table-primary-link:hover {
  color: var(--accent);
}

/* Expand button in ticker cell — compact mode only, fades in on row hover */
.row-expand-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0 2px 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  vertical-align: middle;
  flex-shrink: 0;
}

.database-table.compact-mode .row-expand-btn {
  display: inline-flex;
  align-items: center;
}

.database-table.compact-mode .database-row:hover .row-expand-btn {
  opacity: 0.75;
}

.database-table.compact-mode .database-row.expanded .row-expand-btn {
  opacity: 1;
  transform: rotate(90deg);
}

/* Compact rows are fully clickable — show pointer on cells */
.database-table.compact-mode .database-row td {
  cursor: pointer;
}

.trend-up {
  color: var(--accent);
}

.trend-down {
  color: #f87171;
}

.trend-flat,
.trend-new {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .library-mini-card,
  .database-table.expanded-mode .library-mini-card {
    /* full-width — no grid columns to override */
  }

  .mini-card-link {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .library-mini-card,
  .database-table.expanded-mode .library-mini-card {
    width: 100%;
  }
}

@media print {
  .topbar,
  .report-side-nav,
  .report-side-arrow,
  .flag-section-button,
  .flag-dialog-backdrop {
    display: none;
  }

  body {
    background: #ffffff;
    color: #111111;
  }

  .report-page {
    padding: 0;
  }

  .report-shell {
    box-shadow: none;
    border: 0;
    max-width: none;
  }

  .report-cover {
    background: #0b2545 !important;
    color: #ffffff !important;
    print-color-adjust: exact;
  }

  .markdown-body tr,
  .markdown-body td,
  .markdown-body th,
  .report-figure,
  .web-chart,
  .risk-card,
  .compact-audit-card,
  .market-snapshot,
  .financial-projection-snapshot,
  .projection-table tr,
  .snapshot-card,
  .share-count-note {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .markdown-body table {
    break-inside: auto;
    page-break-inside: auto;
  }

  .report-section h2,
  .web-report-section h3,
  .markdown-body h2,
  .markdown-body h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
}

.settings-page {
  width: min(760px, calc(100% - clamp(36px, 8vw, 112px)));
  margin: 0 auto;
  padding: 56px 0;
}

.settings-panel h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.settings-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.settings-form label {
  display: grid;
  gap: 8px;
}

.settings-divider {
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.email-form {
  display: grid;
  grid-template-columns: minmax(0, 360px) auto;
  gap: 10px;
  max-width: 560px;
}

.email-input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--ink);
}

.inline-field {
  display: grid;
  gap: 7px;
  max-width: 520px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(18px, 4vw, 56px) 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.legal-footer {
  display: grid;
  gap: 8px;
}

.legal-footer strong {
  color: var(--ink);
  font-size: 12px;
}

.legal-footer p {
  max-width: 1240px;
  margin: 0;
}

.legal-footer a {
  width: fit-content;
  color: var(--accent);
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
}

.legal-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px clamp(18px, 4vw, 56px) 72px;
}

.legal-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.legal-hero h1 {
  margin: 0;
}

.legal-updated {
  color: var(--muted);
  font-size: 14px;
}

.legal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: clamp(20px, 3vw, 34px);
}

.legal-panel > p {
  max-width: 980px;
  color: var(--muted);
  line-height: 1.65;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.legal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: color-mix(in srgb, var(--panel) 82%, var(--field));
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.legal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.theme-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  opacity: 0.82;
}

@media (max-width: 900px) {
  .report-side-nav {
    inset: auto 16px 16px;
    transform: none;
  }

  .report-side-arrow {
    max-width: 48vw;
  }

  .arrow-copy strong {
    max-width: 120px;
    overflow-wrap: anywhere;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .process-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-hero-inner {
    grid-template-columns: 1fr;
  }

  .home-main .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-main .home-hero {
    padding-top: 22px;
    padding-bottom: 24px;
  }

  .home-main h1 {
    font-size: clamp(36px, 8vw, 52px);
  }

  .hero-preview-card {
    max-width: 560px;
  }

  .home-main .hero-preview-stage {
    width: 100%;
    max-width: 560px;
  }

  .home-main .hero-preview-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 540px;
    max-height: none;
  }

  .home-main .hero-preview-copy-grid {
    height: 190px;
    grid-template-rows: repeat(2, 90px);
  }

  .home-main .hero-preview-section {
    height: 90px;
  }

  .hero-preview-stage {
    max-width: 560px;
  }

  .library-preview,
  .feedback-section,
  .request-section,
  .home-main .request-section,
  .home-engagement-grid,
  .discovery-paths,
  .home-main .newsletter {
    grid-template-columns: 1fr;
  }

  .home-main .newsletter .email-form {
    justify-self: start;
  }

  .home-main .request-status {
    min-height: 150px;
    max-height: 150px;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .workflow-cycle {
    min-height: 0;
    padding: 22px;
  }

  .workflow-cycle-ring,
  .workflow-cycle-center {
    display: none;
  }

  .workflow-cycle-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .workflow-cycle-steps li {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    min-height: 112px;
    transform: none;
  }

  .workflow-cycle-steps li:nth-child(8)::after {
    content: "↺";
  }

  .diligence-steps {
    grid-template-columns: 1fr;
  }

  .diligence-steps .step {
    min-height: 0;
  }

  .top-ranked-head,
  .top-ranked-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-title-row {
    grid-template-columns: 1fr;
  }

  .report-score-stack {
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
  }

  .ai-score-badge {
    justify-self: stretch;
  }

  .report-intel-grid {
    grid-template-columns: 1fr;
  }

  .market-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .market-snapshot-head {
    align-items: start;
    flex-direction: column;
  }

  .report-stat:nth-child(2n) {
    border-right: 0;
  }

  .meta-grid,
  .order-selector,
  .job-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .report-side-arrow {
    padding: 8px;
  }

  .report-side-arrow .arrow-copy {
    display: none;
  }

  .topbar,
  .nav,
  .ticker-form,
  .hero-actions,
  .quote-row {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-score {
    text-align: left;
  }

  .catalog-metrics {
    grid-template-columns: 1fr;
  }

  .catalog-carousel-shell::after {
    display: none;
  }

  .catalog-grid-featured {
    display: grid;
    gap: 14px;
    overflow: visible;
    padding-right: 0;
    scroll-snap-type: none;
  }

  .catalog-grid-featured .catalog-card {
    width: 100%;
    min-height: 0;
    flex: none;
  }

  .hero-preview-top,
  .hero-preview-metrics {
    grid-template-columns: 1fr;
    display: grid;
  }

  .home-main .hero-preview-stage {
    max-width: 100%;
  }

  .home-main .hero-preview-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .home-main .hero-preview-copy-grid {
    height: 190px;
  }

  .home-main .hero-preview-metrics span {
    height: 62px;
  }

  .hero-preview-rank {
    text-align: left;
  }

  .top-ranked-card {
    grid-template-columns: 1fr;
  }

  .workflow-cycle {
    grid-template-columns: 1fr;
  }

  .workflow-cycle-steps {
    grid-template-columns: 1fr;
  }

  .workflow-cycle-steps li {
    min-height: 0;
  }

  .workflow-cycle-steps li::after {
    content: "v";
  }

  .workflow-cycle-steps li:nth-child(8)::after {
    content: "↺";
  }

  .snapshot-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .topbar {
    gap: 12px;
  }

  .nav {
    display: flex;
  }

  .ticker-form,
  .email-form,
  .report-stats,
  .meta-grid,
  .order-selector {
    grid-template-columns: 1fr;
  }

  .report-stat {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .analytics-overview,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    padding: 14px 16px 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 3px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a,
  .theme-toggle {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    color: var(--ink);
    font-size: 13px;
  }

  .hero {
    padding: 34px 16px 42px;
  }

  .home-main h1,
  h1 {
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.02;
  }

  .lede,
  .hero-support {
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-actions,
  .action-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .button,
  .action-row .button,
  .request-form .button,
  .email-form .button {
    width: 100%;
  }

  .section,
  .home-main .section,
  .idea-feed-page,
  .top-ranked-page,
  .database-page {
    width: calc(100% - 28px);
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .section-heading-row,
  .database-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .popular-card {
    grid-template-columns: 32px 1fr;
    align-items: start;
  }

  .login-dialog form {
    grid-template-columns: 1fr;
  }

  .login-dialog form .button {
    justify-self: stretch;
  }

  .my-idea-main {
    display: grid;
  }

  .my-idea-grid {
    grid-template-columns: 1fr 1fr;
  }

  .my-idea-grid span:nth-child(2n) {
    border-right: 0;
  }

  .my-idea-grid span {
    border-bottom: 1px solid var(--line);
  }

  .my-idea-grid span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .discovery-paths,
  .library-preview,
  .feedback-section,
  .request-section,
  .home-main .request-section,
  .home-engagement-grid,
  .home-main .newsletter,
  .legal-grid,
  .top-ranked-head,
  .top-ranked-footer {
    grid-template-columns: 1fr;
  }

  .home-main .request-section {
    padding: 16px;
  }

  .home-main .request-panel {
    padding: 14px;
  }

  .email-form,
  .ticker-form,
  .ticker-form-next {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
  }

  .ticker-input {
    height: 48px;
    font-size: 18px;
  }

  .job-steps,
  .home-main .job-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-main .hero-preview-card {
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-rows: auto auto auto auto auto;
  }

  .home-main .hero-preview-copy-grid,
  .home-main .hero-preview-section {
    height: auto;
    grid-template-rows: none;
  }

  .home-main .hero-preview-metrics span {
    height: auto;
  }

  .database-page {
    padding-top: 32px;
  }

  .database-panel {
    margin-top: 18px;
    padding: 12px;
  }

  .database-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .database-toolbar-meta {
    align-items: flex-start;
    min-height: 0;
  }

  .library-view-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .library-view-toggle,
  .column-picker,
  .column-picker-button {
    width: 100%;
  }

  .column-menu {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 56px));
    grid-template-columns: 1fr;
  }

  .table-scroll {
    margin: 0 -12px;
    padding: 0 12px 4px;
    overflow-x: auto;
  }

  .database-table {
    min-width: 1040px;
    table-layout: auto;
  }

  .database-table th,
  .database-table td {
    padding: 9px 8px;
  }

  .library-mini-card,
  .database-table.expanded-mode .library-mini-card {
    width: min(100%, calc(100vw - 56px));
  }

  .opportunity-map-scroll {
    max-height: 72vh;
  }

  .opportunity-map {
    min-width: 780px;
  }

  .idea-controls {
    align-items: stretch;
  }

  .idea-controls label,
  .idea-controls select,
  .idea-arrows,
  .idea-arrows button {
    width: 100%;
  }

  .idea-arrows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-page {
    padding: 0;
    background: #ffffff;
  }

  .report-shell {
    max-width: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .report-cover,
  .report-user-actions,
  .report-body,
  .market-snapshot,
  .financial-projection-snapshot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .report-brand-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }

  .report-title-row,
  .report-stats,
  .market-snapshot-grid,
  .report-intel-grid,
  .ownership-grid,
  .target-history-grid {
    grid-template-columns: 1fr;
  }

  .report-score-stack,
  .ai-score-badge {
    width: 100%;
  }

  .report-stat,
  .report-stat:nth-child(2n),
  .report-stat:nth-child(4n) {
    border-right: 0;
  }

  .report-body {
    font-size: 15px;
  }

  .markdown-body {
    overflow-wrap: anywhere;
  }

  .markdown-table-scroll {
    overflow-x: visible;
  }

  .responsive-markdown-table,
  .markdown-body .responsive-markdown-table thead,
  .markdown-body .responsive-markdown-table tbody,
  .markdown-body .responsive-markdown-table tr,
  .markdown-body .responsive-markdown-table th,
  .markdown-body .responsive-markdown-table td {
    display: block;
    width: 100%;
  }

  .markdown-body .responsive-markdown-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .markdown-body .responsive-markdown-table tr {
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid #d5d9dd;
    border-radius: 8px;
    background: #ffffff;
  }

  .markdown-body .responsive-markdown-table tr:nth-child(even) td {
    background: transparent;
  }

  .markdown-body .responsive-markdown-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #e4e8ec;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.42;
  }

  .markdown-body .responsive-markdown-table td:last-child {
    border-bottom: 0;
  }

  .markdown-body .responsive-markdown-table td::before {
    content: attr(data-label);
    display: block;
    margin: 0 0 4px;
    color: #0b2545;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .projection-table {
    min-width: 680px;
  }

  .report-side-nav {
    display: none;
  }

  .web-chart {
    padding: 14px;
    overflow-x: auto;
  }

  .valuation-chart {
    max-width: 100%;
    overflow-x: visible;
  }

  .football-marker-axis,
  .football-bars {
    min-width: 0;
  }

  .football-marker-axis {
    display: block;
    min-height: 54px;
  }

  .football-marker-axis > div:first-child {
    display: none;
  }

  .football-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .football-track {
    height: 40px;
  }

  .football-label,
  .scenario-label {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .football-marker span,
  .football-low,
  .football-high {
    font-size: 0.66rem;
  }

  .scenario-bars {
    min-width: 0;
  }

  .scenario-row {
    grid-template-columns: minmax(76px, 0.9fr) minmax(120px, 1.3fr);
    gap: 8px 10px;
  }

  .scenario-row strong,
  .scenario-row small {
    grid-column: 2;
    justify-self: end;
  }

  .legal-page {
    padding-top: 34px;
    padding-bottom: 44px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .section,
  .home-main .section,
  .idea-feed-page,
  .top-ranked-page,
  .database-page {
    width: calc(100% - 20px);
  }

  .hero {
    padding-left: 10px;
    padding-right: 10px;
  }

  .database-panel {
    padding: 10px;
  }

  .table-scroll {
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .database-table {
    min-width: 980px;
  }

  .report-cover,
  .report-body,
  .market-snapshot,
  .financial-projection-snapshot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* ── Report section heading hierarchy ────────────────────── */
.report-section .report-section-head {
  padding-bottom: 14px;
  border-bottom: 2px solid #e8ecef;
  margin-bottom: 18px;
}

.report-section .report-section-head h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: #0b2545;
}

.report-section .report-section-head h2::before {
  content: '';
  display: block;
  width: 24px;
  height: 3px;
  margin-bottom: 10px;
  background: #1b998b;
  border-radius: 2px;
}

.report-section .flag-section-button {
  margin-bottom: 2px;
}

/* ── Cover → body transition ──────────────────────────────── */
.report-body {
  border-top: 3px solid #1b998b;
}

/* ── Intel card color coding ──────────────────────────────── */
.report-intel-card--validation {
  border-top: 3px solid #1b998b;
}

.report-intel-card--assumptions {
  border-top: 3px solid #f59e0b;
}

.report-intel-card--change {
  border-top: 3px solid #3b82f6;
}

/* ── Risk cards: navy → amber ─────────────────────────────── */
.risk-card {
  border-left-color: #d97706;
}

/* ── Side nav arrow: text → SVG ───────────────────────────── */
.arrow-symbol {
  font-size: 0;
  line-height: 0;
}

/* ── Editorial serif headings ─────────────────────────────── */
.home-main h2,
.home-main .section > h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.report-body h1,
.report-body h2,
.report-body h3,
.report-cover h1,
.market-snapshot h2,
.snapshot-card h3 {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

/* ── Discovery card icons ─────────────────────────────────── */
.discovery-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  flex-shrink: 0;
}

.discovery-card {
  grid-template-rows: auto auto minmax(54px, auto) 1fr;
}

.home-main .discovery-card {
  grid-template-rows: auto auto minmax(44px, auto) auto;
}

/* ── Credibility strip ────────────────────────────────────── */
.cred-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.cred-strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.cred-strip-item:last-child {
  border-right: 0;
}

.cred-strip-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

.cred-strip-item strong {
  color: var(--ink);
  font-weight: 760;
}

/* ── Mobile nav ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 55%, var(--ink) 12%);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  /* Override the 760px grid topbar — keep brand + hamburger on one row */
  .topbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    gap: 0;
    z-index: 1000;
  }

  .nav-toggle {
    display: grid;
    position: relative;
    z-index: 1002;
  }

  /* Remove the pill-style nav that the 760px block adds */
  .nav a,
  .nav .theme-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 14px 28px;
    font-size: 15px;
    min-height: 0;
  }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 88vw);
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    padding: 72px 0 28px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
    transform: translateX(105%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    pointer-events: none;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav .theme-toggle {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
    min-height: auto;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    opacity: 1;
  }

  .topbar.nav-open .nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.44);
    z-index: 999;
  }

  .topbar.nav-open ~ .nav-backdrop,
  .nav-backdrop.visible {
    display: block;
  }

  /* Cred strip → 2 columns */
  .cred-strip {
    flex-wrap: wrap;
  }

  .cred-strip-item {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
  }

  .cred-strip-item:nth-child(2n) {
    border-right: 0;
  }

  .cred-strip-item:nth-child(3),
  .cred-strip-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  /* Report section headings — slightly smaller on tablet/phone */
  .report-section .report-section-head {
    align-items: end;
  }

  .report-section .report-section-head h2 {
    font-size: 20px;
  }

  /* Report cover h1 — tighter on narrow screens */
  .report-cover h1 {
    font-size: clamp(26px, 8vw, 40px);
  }

  /* Report stat labels — easier to scan */
  .report-stat span {
    font-size: 10px;
  }

  .report-stat strong {
    font-size: clamp(15px, 4vw, 21px);
  }
}

@media (max-width: 480px) {
  /* Cred strip → single column on small phones */
  .cred-strip-item {
    flex: 1 1 100%;
    border-right: 0;
  }

  .cred-strip-item + .cred-strip-item {
    border-top: 1px solid var(--line);
  }

  /* Restore correct top-border for 2-column rules (now overridden) */
  .cred-strip-item:nth-child(3),
  .cred-strip-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  /* Topbar brand text — prevent overflow at very narrow widths */
  .brand span {
    font-size: 15px;
  }

  /* Idea feed padding tighter */
  .idea-feed-panel {
    padding: 14px;
  }

  /* Report intel card tighter */
  .report-intel-card {
    padding: 14px;
  }

  /* Database panel a bit tighter */
  .database-panel {
    padding: 10px 8px;
  }
}
