/*
  DiviMetrics — Report Polish Pass
  Animations + Color Accents + UI Polish
  Loaded last, overrides earlier styles.
*/

/* ═══════════════════════════════════════════════════════════════
   1. ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

/* Keyframes — zdefiniowane w _motion.css */

/* Scroll-triggered fade-in for report sections */
.report-main > .report-section,
.report-main > .collapsible,
.report-main > .report-page {
  animation: dm-fade-up 0.5s ease-out both;
}
.report-main > .report-section:nth-child(1),
.report-main > .collapsible:nth-child(1),
.report-main > .report-page:nth-child(1) { animation-delay: 0.05s; }
.report-main > .report-section:nth-child(2),
.report-main > .collapsible:nth-child(2),
.report-main > .report-page:nth-child(2) { animation-delay: 0.1s; }
.report-main > .report-section:nth-child(3),
.report-main > .collapsible:nth-child(3),
.report-main > .report-page:nth-child(3) { animation-delay: 0.15s; }
.report-main > .report-section:nth-child(4),
.report-main > .collapsible:nth-child(4),
.report-main > .report-page:nth-child(4) { animation-delay: 0.2s; }
.report-main > .report-section:nth-child(5),
.report-main > .collapsible:nth-child(5),
.report-main > .report-page:nth-child(5) { animation-delay: 0.25s; }
.report-main > .report-section:nth-child(n+6),
.report-main > .collapsible:nth-child(n+6),
.report-main > .report-page:nth-child(n+6) { animation-delay: 0.3s; }

/* Hero entrance */
.report-hero {
  animation: dm-fade-up 0.4s ease-out both;
}

/* Pulsing signal dot — draws attention to the verdict */
.hero-signal-badge .signal-dot {
  animation: dm-pulse-glow 2.5s ease-in-out infinite;
}

/* Animated confidence/score bars */
.hero-conf-fill,
.score-seg-fill,
.risk-inline-fill,
.smart-verdict-fill,
.report-current-progress-bar {
  animation: dm-bar-grow 0.8s ease-out 0.3s both;
}

/* Hover transitions — smoother cards */
.data-card,
.table-card,
.kf-earnings,
.hero-fact,
.info-item,
.trade-card,
.news-item,
.scenario-range-bar {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.data-card:hover,
.table-card:hover,
.kf-earnings:hover,
.hero-fact:hover,
.info-item:hover,
.trade-card:hover,
.news-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Nav items — smoother active transition */
.report-nav-item {
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease, border-left-color 0.2s ease;
}

/* Collapsible chevron rotation — smoother */
.collapsible-chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer effect on key numbers (subtle) */
.hero-signal-badge,
.risk-inline-score,
.snap-score {
  background: linear-gradient(90deg, var(--text-bright) 0%, var(--text-bright) 40%, color-mix(in srgb, var(--accent) 30%, var(--text-bright)) 50%, var(--text-bright) 60%, var(--text-bright) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dm-shimmer 4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   2. COLOR & ACCENT
   ═══════════════════════════════════════════════════════════════ */

/* Gradient accent text for key numbers */
.report-header-v2 .rh-ticker,
.report-header-v2 .rh-price-value {
  background: linear-gradient(135deg, var(--text-bright) 0%, color-mix(in srgb, var(--accent) 50%, var(--text-bright)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Colored border-left on data cards based on semantic class */
.data-card.pos,
.hero-fact.pos,
.info-item.pos { border-left: 2px solid var(--green); }
.data-card.neg,
.hero-fact.neg,
.info-item.neg { border-left: 2px solid var(--red); }
.data-card.neutral,
.hero-fact.neutral { border-left: 2px solid var(--amber); }

/* Glow effect on hero signal badge */
.hero-signal-badge {
  text-shadow: 0 0 20px color-mix(in srgb, var(--signal-color, var(--accent)) 30%, transparent);
}

/* Accent gradient on section divider line — more vibrant */
.report-section-divider-line {
  background: linear-gradient(90deg, transparent, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--green)), transparent);
  height: 1px;
}

/* Section number — gradient accent */
.report-page-header::before,
.report-main > .collapsible > .collapsible-header > .collapsible-title::before,
.report-main > .report-section > .report-section-divider > .report-section-divider-label::before {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--green)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-semibold);
}

/* Key facts strip — subtle accent glow on top border */
.key-facts-strip {
  border-top: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: 0 -4px 20px -8px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Report panel — subtle accent top border */
.report-panel {
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 30px -10px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Scenario markers — glow */
.scenario-marker.base {
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
}
.scenario-marker.current {
  box-shadow: 0 0 8px color-mix(in srgb, var(--green) 50%, transparent);
}

/* Trade cards — colored left border by type */
.trade-card:has(.trade-badge.buy) { border-left: 2px solid var(--green); }
.trade-card:has(.trade-badge.sell) { border-left: 2px solid var(--red); }

/* Risk bar — gradient fill */
.risk-inline-fill {
  background: linear-gradient(90deg, var(--green) 0%, var(--amber) 50%, var(--red) 100%) !important;
}

/* Score bar segments — colored fills */
.score-seg-fill { border-radius: 2px; }

/* Nav active — tylko typografia, bez tła */
.report-nav-item.active {
  background: transparent;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════
   3. UI POLISH
   ═══════════════════════════════════════════════════════════════ */

/* Tighter section spacing — more rhythm */
.report-main > .report-section,
.report-main > .collapsible {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
}

/* Section headers — better hierarchy */
.report-page-header,
.report-main > .collapsible > .collapsible-header > .collapsible-title,
.report-main > .report-section > .report-section-divider > .report-section-divider-label {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

/* Sharper separators between data rows */
.data-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
.data-row:hover {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* Thesis items — tighter, cleaner */
.thesis-item {
  padding: 10px 0;
  transition: background 0.12s ease;
}
.thesis-item:hover {
  background: rgba(255, 255, 255, 0.015);
}

/* Table headers — subtle bottom border for separation */
.report-main .table thead tr,
.earnings-table thead tr,
.analyst-table thead tr {
  border-bottom: 2px solid var(--border-strong);
}

/* Table rows — hover highlight */
.report-main .table tbody tr,
.earnings-table tbody tr,
.analyst-table tbody tr {
  transition: background 0.12s ease;
}
.report-main .table tbody tr:hover,
.earnings-table tbody tr:hover,
.analyst-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* Report panel scrollbar — accent-tinted */
.report-panel::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.report-panel::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 60%, var(--border));
}

/* Hero body — subtle inner glow */
.hero-body {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Key facts metrics — tighter gap, better alignment */
.kf-metric {
  transition: background 0.15s ease;
}
.kf-metric:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-inset));
}

/* Snapshot panel — accent border glow */
.report-snapshot,
.hero-snapshot {
  box-shadow: 0 0 20px -8px color-mix(in srgb, var(--accent) 15%, transparent), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Empty states — softer, more inviting */
.empty-state {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  color: var(--text-dim);
  font-size: var(--fs-sm);
  padding: var(--space-6);
}

/* News items — left accent on hover */
.news-item {
  border-left: 2px solid transparent;
  transition: border-left-color 0.15s ease, background 0.15s ease;
}
.news-item:hover {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 3%, var(--bg-panel));
}

/* Scenario range bar — better visual */
.scenario-range-track {
  height: 6px;
  border-radius: 3px;
}
.scenario-range-fill {
  border-radius: 3px;
  opacity: 0.3;
}

/* Buttons — smoother hover with slight lift */
.action-btn,
.btn {
  transition: all 0.15s ease;
}
.action-btn:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.action-btn:active,
.btn:active {
  transform: translateY(0);
}

/* Loading spinner — accent color */
.spinner {
  border-color: var(--border) !important;
  border-top-color: var(--accent) !important;
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  .report-main > .report-section,
  .report-main > .collapsible,
  .report-main > .report-page,
  .report-hero {
    animation: none !important;
  }
  .hero-signal-badge .signal-dot {
    animation: none !important;
  }
  .hero-conf-fill,
  .score-seg-fill,
  .risk-inline-fill,
  .smart-verdict-fill,
  .report-current-progress-bar {
    animation: none !important;
  }
  .hero-signal-badge,
  .risk-inline-score,
  .snap-score {
    animation: none !important;
    -webkit-text-fill-color: initial;
    background: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   4. TOOLTIPS — body-level portal, so tooltips can float over sidebars
   ═══════════════════════════════════════════════════════════════ */

.dm-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
  position: relative;
}

.dm-tooltip svg,
.dm-tooltip svg * {
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
  pointer-events: none;
}

.dm-tooltip:hover svg {
  color: var(--accent) !important;
  transform: scale(1.15);
}

/* Hide CSS-only pseudo tooltips — we use the JS portal */
.dm-tooltip::after,
.dm-tooltip::before {
  display: none !important;
}

/* Portal element is appended to document.body */
.dm-tooltip-portal {
  position: fixed;
  z-index: 9999;
  max-width: 300px;
  width: max-content;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  line-height: 1.5;
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(4px);
  white-space: normal;
  text-align: left;
}

.dm-tooltip-portal.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Allow labels to extend without clipping */
.data-card-label,
.score-seg-label,
.metric-v2-label {
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.data-row .data-label {
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   5. RESEARCH DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.research-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  animation: dm-fade-up 0.4s ease-out both;
}

.research-dash-intro {
  text-align: center;
  margin-bottom: var(--space-6);
  padding-top: var(--space-2);
}

.research-dash-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}

.research-dash-subtitle {
  font-size: var(--fs-base);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

.research-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.research-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.research-panel:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.research-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.research-panel-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.research-panel-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.research-panel-source {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.research-panel-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.research-panel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.research-radar-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 120px;
}

.research-radar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.research-radar-item:hover {
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-inset));
}

.research-radar-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.research-radar-ticker {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.research-radar-name {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.research-radar-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.research-radar-badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.research-radar-badge.buy {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

.research-radar-badge.sell {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
}

.research-radar-value {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  white-space: nowrap;
}

.research-radar-empty {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-6);
}

.research-opportunities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.research-opp-card {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.research-opp-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.research-opp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.research-opp-ticker {
  font-family: var(--mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.research-opp-signal {
  font-size: var(--fs-xs);
  padding: 2px 6px;
}

.research-opp-name {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-bottom: var(--space-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.research-opp-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.research-opp-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-bright);
}

.research-opp-label {
  font-family: inherit;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.research-news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.research-news-item {
  display: block;
  padding: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.research-news-item:hover {
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-inset));
}

.research-news-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-bright);
  margin-bottom: 4px;
  line-height: 1.35;
}

.research-news-meta {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Pulpit — układ redakcyjny ── */
.pulpit {
  max-width: min(var(--content-read-max), 100%);
  margin-inline: auto;
  padding-inline: var(--report-gutter-inline);
}

.pulpit-masthead {
  margin-bottom: var(--section-gap, var(--space-6));
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.pulpit-masthead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.pulpit-edition {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.pulpit-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pulpit-quicknav-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.pulpit-quicknav-link:hover {
  border-color: var(--border-strong);
  color: var(--text-bright);
  background: var(--shade-surface-hover);
}

.pulpit-headline {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-bright);
}

.pulpit-dek {
  margin: 0;
  max-width: 52ch;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
}

.pulpit-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-4);
  margin-bottom: var(--section-gap, var(--space-6));
  align-items: stretch;
}

.pulpit-spotlight {
  min-height: 280px;
}

.pulpit-spotlight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-5);
  background: var(--shade-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--motion-duration-xs, 0.18s) var(--ease-out, ease);
}

.pulpit-spotlight-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pulpit-spotlight-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: var(--fw-medium);
}

.pulpit-spotlight-kicker::before {
  content: '';
  width: 3px;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
}

.pulpit-spotlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.pulpit-spotlight-ticker {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  line-height: 1.1;
}

.pulpit-spotlight-name {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.pulpit-spotlight-score {
  text-align: right;
  flex-shrink: 0;
}

.pulpit-spotlight-score-num {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.pulpit-spotlight-score-num.hot { color: var(--green); }
.pulpit-spotlight-score-num.good { color: var(--accent-light); }

.pulpit-spotlight-score-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulpit-spotlight-story {
  flex: 1;
  margin-bottom: var(--space-4);
}

.pulpit-spotlight-story h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: var(--text-bright);
}

.pulpit-spotlight-story p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text);
}

.pulpit-spotlight-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  margin-bottom: var(--space-4);
  font-family: var(--mono);
  font-size: var(--fs-sm);
}

.pulpit-spotlight-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pulpit-spotlight-stat span:first-child {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.pulpit-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.pulpit-spotlight-actions .btn {
  font-size: var(--fs-sm);
}

.pulpit-news-lead-slot {
  min-height: 280px;
}

.pulpit-news-lead-slot .pulpit-empty,
.pulpit-news-lead-slot .pulpit-skeleton-article {
  height: 100%;
  min-height: 280px;
}

.pulpit-news-lead {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: var(--space-5);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

a.pulpit-news-lead:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.pulpit-news-lead-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: var(--fw-medium);
}

.pulpit-news-lead-kicker::before {
  content: '';
  width: 3px;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
}

.pulpit-news-lead-title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--text-bright);
}

.pulpit-news-lead-excerpt {
  flex: 1;
  margin: 0 0 var(--space-4);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
}

.pulpit-news-lead-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.pulpit-news-lead-cta {
  color: var(--accent-light);
  font-weight: var(--fw-semibold);
}

.pulpit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: var(--space-5);
  align-items: start;
}

.pulpit-section {
  margin-bottom: var(--space-4);
}

.pulpit-section-head {
  margin-bottom: var(--space-4);
}

.pulpit-section-head--inline,
.pulpit-section-head--compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.pulpit-section-kicker {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: var(--fw-medium);
}

.pulpit-section-title {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.pulpit-section-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
}

.pulpit-watchlist-strip {
  margin-bottom: var(--section-gap, var(--space-6));
  padding: var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pulpit-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.pulpit-news-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), transform var(--motion-duration-xs, 0.18s) ease;
}

.pulpit-news-card:hover {
  border-color: var(--border-strong);
  background: var(--shade-surface-hover);
  transform: translateY(-2px);
}

.pulpit-news-card-bar {
  width: 24px;
  height: 2px;
  margin-bottom: var(--space-3);
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.85;
}

.pulpit-news-card-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: var(--text-bright);
}

.pulpit-news-card-excerpt {
  flex: 1;
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pulpit-news-card-date {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.pulpit-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: calc(var(--header-height, 56px) + var(--space-3));
}

.pulpit-aside-block {
  margin-bottom: 0 !important;
}

.pulpit-brief-group + .pulpit-brief-group {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.pulpit-brief-label {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pulpit-brief-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
}

.pulpit-brief-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  cursor: pointer;
  transition: opacity var(--transition-base);
}

.pulpit-brief-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pulpit-brief-item:hover {
  opacity: 0.92;
}

.pulpit-brief-num {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  padding-top: 2px;
}

.pulpit-brief-body {
  min-width: 0;
}

.pulpit-brief-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.pulpit-brief-ticker {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.pulpit-brief-badge {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.pulpit-brief-badge.buy {
  background: color-mix(in srgb, var(--green) 15%, transparent);
  color: var(--green);
}

.pulpit-brief-badge.sell {
  background: color-mix(in srgb, var(--red) 15%, transparent);
  color: var(--red);
}

.pulpit-brief-headline {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pulpit-brief-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.pulpit-radar-mini {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pulpit-radar-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.pulpit-radar-mini-item:hover {
  border-color: var(--border-strong);
  background: var(--shade-surface-hover);
}

.pulpit-radar-mini-left {
  min-width: 0;
}

.pulpit-radar-mini-ticker {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.pulpit-radar-mini-hook {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.pulpit-radar-mini-score {
  font-family: var(--mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

.pulpit-radar-mini-score.hot { color: var(--green); }
.pulpit-radar-mini-score.good { color: var(--accent-light); }

.pulpit-skeleton {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  padding: var(--space-6);
  text-align: center;
  background: var(--bg-inset);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.pulpit-skeleton-hero,
.pulpit-skeleton-article {
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulpit-empty {
  padding: var(--space-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.5;
}

.pulpit-empty button {
  margin-top: var(--space-2);
}

@media (max-width: 1023px) {
  .pulpit-hero-grid,
  .pulpit-layout,
  .pulpit-news-grid {
    grid-template-columns: 1fr;
  }

  .pulpit-aside {
    position: static;
  }

  .research-dash-grid {
    grid-template-columns: 1fr;
  }
  .research-opportunities {
    grid-template-columns: 1fr;
  }
  .research-radar-name {
    max-width: 160px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Wycena — jedna kolumna, wspólna szerokość
   ═══════════════════════════════════════════════════════════════ */

.report-page.valuation-page .report-page-body,
.report-page-body.valuation-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  grid-template-columns: none !important;
}

.report-page.valuation-page .report-page-body > *,
.valuation-body > * {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  grid-column: auto !important;
  box-sizing: border-box;
}

.valuation-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  align-items: stretch;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.valuation-hero-primary,
.valuation-hero .val-stat {
  padding: var(--section-pad) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(96px, 10vw, 128px);
  min-width: 0;
  background: transparent;
}

.valuation-hero-primary {
  border-right: none;
}

.valuation-hero .val-stat {
  border-left: 1px solid var(--border);
  gap: 4px;
}

.valuation-hero-kicker,
.val-stat-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.valuation-hero-value,
.val-stat-value {
  font-family: var(--mono);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.valuation-hero-value {
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  font-weight: var(--fw-semibold);
  color: var(--accent);
}

.val-stat-value {
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.5rem);
  color: var(--text-bright);
}

.valuation-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.valuation-hero-mos {
  font-family: var(--mono);
  font-size: var(--fs-sm);
}

.valuation-hero-mos.pos { color: var(--green); }
.valuation-hero-mos.neg { color: var(--red); }

.val-stat-sub {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 4px;
}

.books-method {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.priced-in-bar {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md);
  padding: 20px 28px !important;
}

.priced-in-status {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-bright);
  margin-bottom: 16px;
}

.priced-in-legend {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.priced-in-leg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.priced-in-leg-kicker {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.priced-in-leg-val {
  font-family: var(--mono);
  font-size: var(--fs-lg);
  color: var(--text-bright);
}

.priced-in-leg.books .priced-in-leg-val { color: var(--accent); }
.priced-in-leg.scenario .priced-in-leg-val { color: var(--amber, #eab438); }

.catalyst-risk-box {
  background: var(--bg-inset) !important;
  border: 1px solid var(--border) !important;
  border-left: 2px solid var(--amber, #eab438) !important;
  border-radius: var(--radius-md);
  padding: 16px 20px !important;
}

.catalyst-risk {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

.valuation-body > .table-card,
.valuation-body > .valuation-methods-card {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md);
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

.val-table-head {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 16px 20px 8px;
}

.valuation-table {
  width: 100%;
}

.valuation-table .val-method-name {
  display: block;
  color: var(--text-bright);
}

.valuation-table .val-method-role {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  margin-top: 4px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.valuation-table .val-method-role.role-primary {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.valuation-table .val-method-role.role-street {
  color: var(--amber, #eab438);
  border-color: color-mix(in srgb, var(--amber, #eab438) 35%, var(--border));
}

.valuation-table tr.val-row-primary td {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.val-table-note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.data-card-desc {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-top: var(--space-2);
}

@media (max-width: 720px) {
  .valuation-hero,
  .priced-in-legend {
    grid-template-columns: 1fr;
  }
  .valuation-hero-primary,
  .valuation-hero .val-stat {
    border: none;
    border-bottom: 1px solid var(--border);
    min-height: 0;
  }
}

/* ── Research hub ─────────────────────────────────────────────── */
.report-page-body > .research-hub {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

.research-hub {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.research-hub > .research-disclaimer {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
}

.research-block {
  padding: var(--space-4);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.research-block-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  margin: 0 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.research-block-intro {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.research-digest {
  padding: var(--space-4);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
}

.research-digest-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.research-digest-list {
  margin: 0;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text);
}

.research-digest-item.digest-signal { color: var(--gold); }
.research-digest-item.digest-upside { color: var(--green); }
.research-digest-item.digest-catalyst { color: var(--accent); }

.research-calendar-table .research-event-detail {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  max-width: 280px;
}

.research-event-when {
  white-space: nowrap;
  font-size: var(--fs-sm);
}

.research-priced-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.research-priced-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.research-priced-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.research-priced-value {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.research-priced-interp {
  font-size: var(--fs-sm);
  color: var(--text);
  margin: 0;
  line-height: 1.55;
}

.research-smart-summary {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text);
  padding: var(--space-3);
  border-left: 3px solid var(--border);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.research-smart-summary.conf-high { border-left-color: var(--green); }
.research-smart-summary.conf-medium { border-left-color: var(--amber); }
.research-smart-summary.conf-low { border-left-color: var(--text-dim); }

.research-align-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.research-align-tag {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  color: var(--gold);
}

.research-cluster-badge {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.research-recent-buys {
  margin-top: var(--space-3);
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

.research-buy-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  padding: var(--space-1) 0;
}

.research-buy-name { color: var(--text-bright); }
.research-buy-meta { color: var(--text-dim); }
.research-buy-val { color: var(--green); font-variant-numeric: tabular-nums; }

.research-checklist {
  margin: 0;
  padding-left: var(--space-4);
}

.research-checklist-item {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: 1.55;
  margin-bottom: var(--space-2);
}

.research-sources {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.research-source-row {
  display: grid;
  grid-template-columns: 72px 160px 1fr;
  gap: var(--space-3);
  align-items: start;
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.research-source-row:last-child { border-bottom: none; }

.research-source-label { color: var(--text-bright); font-weight: var(--fw-medium); }
.research-source-note { color: var(--text-dim); line-height: 1.45; }

.source-tier {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.source-tier.tier-model { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.source-tier.tier-street { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.source-tier.tier-sec { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.source-tier.tier-narrative { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.source-tier.tier-data { background: rgba(148, 163, 184, 0.12); color: var(--text-dim); }

.compare-thesis-box {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compare-thesis-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.compare-thesis-summary {
  font-size: var(--fs-sm);
  color: var(--text);
  margin: 0 0 var(--space-3);
  line-height: 1.55;
}

.compare-thesis-winners {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.compare-thesis-badge {
  font-size: var(--fs-xs);
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.wl-digest {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  max-width: 200px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .research-priced-grid,
  .research-source-row {
    grid-template-columns: 1fr;
  }
}

/* ── Report layers + mobile nav + trader view ── */
.report-main {
  display: flex;
  flex-direction: column;
}

.report-layer {
  margin-bottom: var(--stack-gap);
}

/* Sekcje wewnątrz warstwy — bez podwójnego odstępu na końcu */
.report-layer .report-page {
  margin-bottom: var(--stack-gap);
  padding-bottom: var(--stack-gap);
}
.report-layer .report-page:last-child {
  margin-bottom: 0;
  padding-bottom: var(--stack-gap);
}

/* 04 Kurs — bezpośrednio po warstwie Decyzja, bez dodatkowej przerwy */
.report-layer-decision + .report-page[id^="sec-price-"] {
  margin-top: 0;
}

.report-main > .report-page[id^="sec-price-"] {
  order: 10;
}

/* Spacer na końcu scrollu — musi być po wszystkich warstwach (order 0 = przerwa przed wykresem) */
.report-end-spacer {
  order: 100;
  flex-shrink: 0;
}

.report-panel.report-trader-view .report-main > .report-page[id^="sec-price-"] {
  order: 2;
}

.report-layer-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.report-chart-section { order: 10; }
.report-layer-evidence { order: 11; }
.report-layer-model { order: 20; }

.report-panel.report-trader-view .report-layer-evidence { order: 11; }

.report-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  gap: 4px;
  justify-content: space-around;
}

.report-mobile-nav button {
  flex: 1;
  padding: 8px 4px;
  font-size: var(--fs-xs);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

.report-mobile-nav button:hover { color: var(--accent); }

@media (max-width: 900px) {
  body.report-open .report-mobile-nav { display: flex; }
  body.report-open .report-end-spacer { height: min(40vh, 360px); }
}

/* Priced-in visual bar */
.research-priced-bar { margin-bottom: var(--space-4); }

.research-priced-track {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 28px 8px 8px;
}

.research-priced-marker {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.research-priced-marker span {
  display: block;
  padding: 2px 6px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.research-priced-marker.current span { border-color: var(--accent); color: var(--accent-light); }
.research-priced-marker.books span { border-color: var(--gold); color: var(--gold); }
.research-priced-marker.street span { border-color: #60a5fa; color: #60a5fa; }

.research-digest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-2); }

.smart-money-teaser {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.smart-money-teaser .btn-sm {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
}

/* Pulpit watchlist digest */
.pulpit-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.pulpit-wl-card {
  padding: var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.pulpit-wl-card:hover { border-color: var(--accent); }

.pulpit-wl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.pulpit-wl-ticker {
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

.pulpit-wl-catalyst {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}

/* Pulpit — ostatnie analizy */
.pulpit-recent-section {
  margin-bottom: var(--section-gap);
}

.pulpit-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.pulpit-recent-card {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--motion-duration-xs, 0.18s) ease;
}

.pulpit-recent-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.pulpit-recent-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.pulpit-recent-ticker {
  display: block;
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  color: var(--text-bright);
}

.pulpit-recent-name {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 2px;
}

.pulpit-recent-stats {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: var(--space-2);
}

.pulpit-recent-when {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

/* Pulpit — Radar watchlist */
.pulpit-watchlist-radar {
  margin-bottom: var(--section-gap);
}

.pulpit-watchlist-radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}

.pulpit-wl-radar-card {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.pulpit-wl-radar-card:hover { border-color: var(--accent); }

.pulpit-wl-radar-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.pulpit-wl-radar-hook {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
}

/* ── Audytowalność wyceny (post-ChatGPT review) ── */
.valuation-audit {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--bg-elevated, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.valuation-audit-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  margin-bottom: var(--space-2);
}

.valuation-audit-intro {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.valuation-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.valuation-audit-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle, var(--border));
}

.valuation-audit-table .audit-k {
  color: var(--text-dim);
  width: 42%;
}

.valuation-audit-table .audit-v {
  color: var(--text-bright);
  text-align: right;
}

.valuation-audit-note,
.scenario-params-note {
  font-size: var(--fs-xs, 0.75rem);
  color: var(--text-dim);
  margin: var(--space-3) 0 0;
  line-height: 1.45;
}

.audit-link {
  color: var(--accent);
  text-decoration: underline;
}

.scenario-params-card {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.scenario-params-title {
  font-weight: var(--fw-bold);
  color: var(--text-bright);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
}

.scenario-params-table th,
.scenario-params-table td {
  font-size: var(--fs-sm);
}

.thesis-factors {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated, rgba(255,255,255,0.02));
}

.thesis-factors-title {
  font-size: var(--fs-xs, 0.75rem);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}

.thesis-factors-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thesis-factor {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  font-size: var(--fs-sm);
}

.thesis-factor.positive .tf-name { color: var(--green); }
.thesis-factor.negative .tf-name { color: var(--red); }

.thesis-factors-note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin: var(--space-2) 0 0;
}

.snap-score-explain {
  font-size: var(--fs-xs, 0.75rem);
  color: var(--text-dim);
  margin-top: var(--space-1);
}

.research-priced-footnote {
  font-size: var(--fs-xs, 0.75rem);
  color: var(--text-dim);
  margin-top: var(--space-2);
  line-height: 1.4;
}

.hero-asof, .hero-horizon, .hero-quality {
  display: block;
  font-size: var(--fs-xs, 0.75rem);
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.4;
}

.iv-history { margin: var(--space-4) 0; }
.iv-history-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-bright); margin-bottom: var(--space-2); }
.iv-history-dots { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.iv-history-dot {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg);
}
.iv-h-date { font-size: var(--fs-xs); color: var(--text-dim); }
.iv-h-val { font-size: var(--fs-sm); color: var(--text-bright); }
.iv-history-note, .street-bridge, .research-disclaimer, .snap-signal-note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
  margin: var(--space-2) 0 0;
}
.street-bridge { padding: var(--space-3); border-left: 3px solid var(--accent); }
.thesis-kill { margin-top: var(--space-3); }
.thesis-kill-title, .thesis-kill h3 { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: var(--space-2); }
.thesis-kill ul { margin: 0; padding-left: 1.1em; color: var(--text); font-size: var(--fs-sm); line-height: 1.5; }
.thesis-confirm { margin-top: var(--space-3); }
.thesis-confirm-title, .thesis-confirm h3 { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: var(--space-2); color: var(--green); }
.thesis-confirm ul, .research-checklist.confirm { margin: 0; padding-left: 1.1em; color: var(--text); font-size: var(--fs-sm); line-height: 1.5; }
.thesis-framework .thesis-kill + .thesis-confirm { margin-top: var(--space-4); }

/* ── Plany dostępu: scroll-wall (gość / limit free) ── */
.report-access-walled {
  position: relative;
}
.report-access-below {
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.report-access-walled.is-walled .report-access-below {
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}
.report-access-wall {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.report-access-walled.is-walled .report-access-wall {
  display: flex;
}
.report-access-wall-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
}
.report-access-modal {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  padding: var(--space-6);
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.report-access-modal-kicker {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 var(--space-2);
}
.report-access-modal-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-xl);
  color: var(--text-bright);
  line-height: 1.25;
}
.report-access-modal-text {
  margin: 0 auto var(--space-5);
  max-width: 22em;
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.report-access-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}
body.report-wall-open {
  overflow: hidden;
}
body.report-wall-open .app-main {
  overflow: hidden;
}
.nav-tab-gated,
.sidebar-nav-item.nav-tab-gated,
.app-mobile-nav-item.nav-tab-gated {
  opacity: 0.72;
}
.nav-tab-locked,
.sidebar-nav-item.nav-tab-locked,
.app-mobile-nav-item.nav-tab-locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.top-bar-plan {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.top-bar-plan--pro {
  color: var(--accent-light);
  border-color: color-mix(in srgb, var(--accent-light) 40%, var(--border));
}
.top-bar-user {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.top-bar-user:hover {
  color: var(--accent-light);
}

/* ── In-app gate (jak scroll-wall raportu — fixed modal + blur tła) ── */
.tab-content.tab-gated {
  position: relative;
  min-height: min(70vh, 640px);
}
.tab-content.tab-gated.is-walled .tab-access-below {
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.tab-access-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.tab-access-gate.is-open,
.tab-content.tab-gated.is-walled .tab-access-gate {
  display: flex;
}
.tab-access-gate-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tab-access-gate-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  padding: var(--space-6);
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.tab-access-gate-kicker {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 var(--space-2);
}
.tab-access-gate-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-xl);
  color: var(--text-bright);
  line-height: 1.25;
}
.tab-access-gate-text {
  margin: 0 auto var(--space-5);
  max-width: 22em;
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.tab-access-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}
body.tab-wall-open {
  overflow: hidden;
}
body.tab-wall-open .app-main {
  overflow: hidden;
}

/* Podgląd za gate — karty wyglądają jak prawdziwa treść */
.gate-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  padding: var(--space-2) 0;
}
.gate-preview-card {
  padding: var(--space-4);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
}
.gate-preview-card .scanner-card-head,
.gate-preview-card .scanner-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}
.gate-preview-card .scanner-card-meta,
.portfolio-row.gate-preview-card {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-family: var(--mono);
}
.gate-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.gate-preview-metrics .pf-metric {
  padding: var(--space-4);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
}
.gate-preview-metrics .pf-metric-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}
.gate-preview-metrics .pf-metric-value {
  font-family: var(--mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-bright);
}

