/* ============================================================================
   Deck detail page — header, blocks, SCQA, reasons, demands, KPI, rhetoric,
   sidebar, related, legacy lightbox/gallery fallbacks.
   ============================================================================ */

.deck-article { max-width: 100%; }

/* ─── Deck header ─────────────────────────────────────────────────── */
.deck-header {
  padding-bottom: 32px;
  margin-bottom: 40px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
}
.deck-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}
.deck-target {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  font-weight: var(--w-normal);
  letter-spacing: -0.028em;
  margin-bottom: 22px;
  color: var(--text-0);
  text-wrap: balance;
}
.ticker.big {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: var(--w-medium);
  padding: 4px 10px;
  margin-left: 12px;
  vertical-align: middle;
  color: var(--accent);
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 var(--hairline) var(--accent-line);
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.deck-oneliner {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--text-2);
  max-width: 780px;
  margin-bottom: 28px;
  font-style: italic;
}
.deck-scores-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.score-big { display: flex; align-items: baseline; gap: 6px; }
.score-letter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.score-value {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--text-0);
  font-weight: var(--w-normal);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.score-name {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 2px;
}
.spacer { flex: 1; }


/* ─── Body layout (main + sidebar) ────────────────────────────────── */
.deck-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 980px) {
  .deck-body { grid-template-columns: 1fr; gap: 32px; }
}

.block {
  padding-bottom: 36px;
  margin-bottom: 36px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
}
.block:last-child { box-shadow: none; }
.block-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--w-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.block-notes p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  font-style: italic;
}
.deck-summary {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-0);
  max-width: 780px;
}


/* ─── SCQA ────────────────────────────────────────────────────────── */
.scqa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) { .scqa-grid { grid-template-columns: 1fr; } }

.scqa-card {
  padding: 18px 20px;
  background: var(--bg-1);
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1),
              inset 2px 0 0 var(--accent);
  border-radius: var(--r-3);
}
.scqa-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.scqa-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-0);
}


/* ─── Reasons list (numbered) ─────────────────────────────────────── */
.reasons-list {
  list-style: none;
  counter-reset: reason;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reasons-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-1);
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-4);
}
.reason-num {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1;
  color: var(--accent);
  font-style: italic;
  font-variant-numeric: tabular-nums;
}
.reasons-list li p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-0);
}


/* ─── Demands list ────────────────────────────────────────────────── */
.demands-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.demands-list li {
  padding: 12px 16px;
  box-shadow: inset 2px 0 0 var(--border-1);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-0);
  transition: box-shadow var(--dur-fast) ease;
}
@media (hover: hover) {
  .demands-list li:hover { box-shadow: inset 2px 0 0 var(--accent); }
}


/* ─── KPI table ───────────────────────────────────────────────────── */
.kpi-table {
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-4);
  overflow: hidden;
}
.kpi-row {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 16px;
  padding: 12px 16px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
  font-size: 13px;
  transition: background-color var(--dur-fast) ease;
}
.kpi-row:last-child { box-shadow: none; }
@media (hover: hover) {
  .kpi-row:hover { background: var(--bg-1); }
}
.kpi-metric {
  color: var(--text-2);
  font-weight: var(--w-medium);
  padding-right: 12px;
  box-shadow: inset -1px 0 0 var(--border-1);
}
.kpi-detail {
  font-size: 12px;
  color: var(--text-0);
  line-height: 1.5;
}


/* ─── Rhetorical grid (pattern membership) ────────────────────────── */
.rhetoric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.rhet-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-1);
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-3);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-fast) var(--ease-out-soft),
              background-color var(--dur-fast) var(--ease-out-soft),
              transform var(--dur-fast) var(--ease-out-soft);
}
.rhet-cell .rhet-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text-4);
}
.rhet-cell .rhet-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: var(--w-medium);
  color: var(--text-3);
  line-height: 1.3;
}

/* Active = accent-faint background + accent icon + check mark on right */
.rhet-cell.is-true {
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 var(--hairline) var(--accent-line);
  padding-right: 30px; /* room for the check */
}
.rhet-cell.is-true .rhet-icon  { color: var(--accent); }
.rhet-cell.is-true .rhet-label { color: var(--text-0); font-weight: var(--w-semi); }

.rhet-check {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--accent);
  line-height: 0;
}

@media (hover: hover) {
  .rhet-cell:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 var(--hairline) var(--border-2), var(--shadow-1);
    background: var(--bg-2);
  }
  .rhet-cell.is-true:hover {
    box-shadow: inset 0 0 0 var(--hairline) var(--accent), var(--shadow-1);
    background: color-mix(in oklch, var(--accent) 12%, var(--bg-1));
  }
}


/* ─── Deck sidebar (metadata, peers, valuation tags) ──────────────── */
.deck-side {
  position: sticky;
  top: 80px;
  padding-left: 24px;
  box-shadow: inset 1px 0 0 var(--border-1);
}
@media (max-width: 980px) {
  .deck-side { position: static; padding-left: 0; box-shadow: 0 calc(-1 * var(--hairline)) 0 var(--border-1); padding-top: 32px; }
}
.side-block {
  padding-bottom: 20px;
  margin-bottom: 20px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
}
.side-block:last-child { box-shadow: none; }
/* Closing ask: quoted, but in the body sans (not serif italic) so it stays
   consistent with the rest of the sidebar's typography. */
.side-closing-ask {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-1);
  padding-left: 12px;
  box-shadow: inset 2px 0 0 var(--accent-line);
  font-style: normal;
  font-family: inherit;
}
.side-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--w-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.side-firm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--bg-1);
  border-radius: var(--r-3);
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1);
  transition: background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) {
  .side-firm:hover { background: var(--bg-2); box-shadow: inset 0 0 0 var(--hairline) var(--border-2); }
}
.side-firm strong { font-size: 14px; color: var(--text-0); }
.side-firm .dim { font-size: 11px; }
.side-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: 12px;
}
.side-dl dt { color: var(--text-3); }
.side-dl dd { color: var(--text-2); font-variant-numeric: tabular-nums; }

.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-peer {
  background: color-mix(in oklch, var(--info) 10%, transparent);
  color: var(--info);
  box-shadow: inset 0 0 0 var(--hairline) color-mix(in oklch, var(--info) 28%, transparent);
}
.tag-val {
  background: color-mix(in oklch, var(--success) 8%, transparent);
  color: var(--success);
  box-shadow: inset 0 0 0 var(--hairline) color-mix(in oklch, var(--success) 28%, transparent);
}


/* ─── Related section ─────────────────────────────────────────────── */
.related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  margin-top: 56px;
  padding-top: 48px;
  box-shadow: 0 calc(-1 * var(--hairline)) 0 var(--border-1);
}
.related-col .section-title { font-size: 22px; margin-bottom: 16px; }


/* ─── Legacy lightbox / slides-gallery (old-style deck page) ──────── */

.slides-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.slide-thumb {
  position: relative;
  padding: 0;
  background: var(--bg-1);
  box-shadow: 0 0 0 var(--hairline) var(--border-1);
  border: 0;
  border-radius: var(--r-3);
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  aspect-ratio: 16/10;
}
@media (hover: hover) {
  .slide-thumb:hover {
    box-shadow: 0 0 0 var(--hairline) var(--accent), var(--shadow-3);
    transform: translateY(-2px);
  }
}
.slide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #FFFFFF;
}
.slide-page {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 7px;
  background: rgba(10, 10, 11, 0.88);
  color: #FFFFFF;
  font-size: 10px;
  letter-spacing: 0.03em;
  border-radius: 3px;
  backdrop-filter: blur(6px);
}
