/* ═══════════════════════════════════════════════════════════════
   Issue page — additions only.
   Layout / colour / typography all come from /css/style.css so the
   DB-driven page sits inside the same light editorial theme as the
   hardcoded issues. This file only adds the few atoms not already
   in the design system.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Loading ─── */
.issue-loading { display:flex; gap:0.4rem; justify-content:center; align-items:center; padding:6rem 0; }
.issue-loading-dot { width:8px; height:8px; border-radius:50%; background:var(--amber); animation:issuePulse 1.4s ease-in-out infinite; }
.issue-loading-dot:nth-child(2) { animation-delay:0.2s; }
.issue-loading-dot:nth-child(3) { animation-delay:0.4s; }
@keyframes issuePulse { 0%, 80%, 100% { opacity:0.2; } 40% { opacity:1; } }

/* ─── Feature cover image (centred, inside the Feature .letter box,
       sitting below the decorative “ glyph that the letter renders top-left) ─── */
.feature-image {
  display: block;
  max-width: 78%;
  height: auto;
  margin: 3rem auto 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
@media (max-width: 600px) {
  .feature-image { max-width: 100%; margin: 2.5rem auto 1.25rem; }
}

/* ─── Worked-example source tag (sits inside .teardown-meta) ─── */
.deal-source-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-text);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 4px;
  white-space: nowrap;
}

/* ─── Per-issue accent (driven from pkh_issues.theme_color via inline var
       on #issue-root). Only the eyebrow, the small-caps section-label dots,
       and the headline italic pick this up; semantic colours (verdict pills,
       amber tags, indicative banners) stay on the global tokens. ─── */
#issue-root .issue-flag { color: var(--issue-accent, var(--amber)); }
#issue-root .issue-flag::before,
#issue-root .issue-flag::after { background: var(--issue-accent, var(--amber)); }
#issue-root .issue-title em { color: var(--issue-accent, var(--amber)); }
#issue-root .section-label { color: var(--issue-accent, var(--amber)); }
#issue-root .section-label .dot { background: var(--issue-accent, var(--amber)); }

/* ─── Loss styling for negative profit / ROI on cash ─── */
.teardown-num-value.loss { color: var(--red); }

/* ─── All-in row emphasis in the rental cost-stack grid ─── */
.teardown-num-value.allin { font-weight: 700; color: var(--text); }

/* ─── Rental strategy grid (Issue #3 Deal of the Month) ─── */
.strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 1.75rem 1.25rem;
}
.strategy {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.1rem 1.25rem;
}
.strategy-primary { border-color: var(--green-border, var(--green)); background: var(--green-bg); }
.strategy-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.strategy-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.strategy-row:first-of-type { border-top: 0; }
.strategy-row span { color: var(--text-muted); }
.strategy-row strong { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.strategy-note {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.strategy-basis {
  margin: -0.5rem 1.75rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 600px) {
  .strategy-grid  { grid-template-columns: 1fr; margin: 0 1rem 1rem; }
  .strategy-basis { margin: -0.25rem 1rem 1rem; }
}

/* ─── Rental_comparison: BLOCKED HMO column (Issue #7 Nottingham) ─── */
.strategy.strategy-blocked {
  border: 1px dashed var(--border);
  background: var(--bg-light, #FAFAFA);
  opacity: 0.85;
}
.strategy.strategy-blocked .strategy-row { color: var(--text-muted); }
.strategy.strategy-blocked .strategy-row span,
.strategy.strategy-blocked .strategy-row strong {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  color: var(--text-muted);
}
.strategy-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid var(--red);
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.7rem;
  line-height: 1.35;
  text-decoration: none;
}
.strategy-tag-legal {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border, var(--green));
  border-radius: 3px;
  vertical-align: middle;
}

/* ─── Rental_comparison: three-conditions panel (Issue #7 Lincoln) ─── */
.three-conditions { margin: 0 1.75rem 1.25rem; }
.three-conditions-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.three-conditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.three-condition {
  border: 1px solid var(--green-border, var(--green));
  background: var(--green-bg);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.three-condition-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.45rem;
}
.three-condition-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
@media (max-width: 600px) {
  .three-conditions      { margin: 0 1rem 1rem; }
  .three-conditions-grid { grid-template-columns: 1fr; }
}

/* ─── Radar: "now in force" state (Issue #8 — Section 21 went live 1 May) ─── */
.radar-countdown.radar-countdown-live {
  color: var(--red);
  font-weight: 600;
}

/* ─── Trap panel extensions (Issue #7 Nottingham — overpayment + lesson) ─── */
.trap-panel-note {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.trap-panel-note strong { color: var(--text); }
.trap-panel-lesson {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--red-text);
  font-style: italic;
  line-height: 1.5;
}

/* ─── Rental_btl: deductions breakdown panel (Issue #6 Bolton) ─── */
.deductions-panel { margin: 0 1.75rem 1.25rem; }
.deductions-panel-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.deductions-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.85rem 1.15rem;
}
.deductions-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.deductions-row:first-child { border-top: 0; }
.deductions-row span { color: var(--text-muted); }
.deductions-row strong { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.deductions-row.deductions-total {
  border-top: 2px solid var(--border);
  margin-top: 0.25rem;
}
.deductions-row.deductions-total span { color: var(--text); font-weight: 600; }

/* ─── Rental_btl: EPC trap panel (Issue #6 Halifax) ─── */
.trap-panel {
  margin: 0 1.75rem 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--red);
  border-left-width: 3px;
  background: var(--red-bg);
  border-radius: 6px;
}
.trap-panel-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.trap-panel-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.trap-panel-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.trap-panel-stat {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 0.7rem 0.5rem;
}
.trap-panel-stat-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 0.3rem;
}
.trap-panel-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--red);
}
.trap-panel-target {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 600px) {
  .deductions-panel { margin: 0 1rem 1rem; }
  .trap-panel       { margin: 0 1rem 1rem; padding: 1rem 1.1rem; }
  .trap-panel-stats { grid-template-columns: 1fr; }
}

/* ─── Bridged-flip card: headline-vs-real callout (walk-away) ─── */
.headline-vs-real {
  margin: 0 1.75rem 1.25rem;
  padding: 0.95rem 1.15rem;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.headline-vs-real-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.35rem;
}
.headline-vs-real-text { color: var(--text); }

/* ─── Bridged-flip card: finance panel (loan, fees, interest, total) ─── */
.finance-panel { margin: 0 1.75rem 1.25rem; }
.finance-panel-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.finance-panel .teardown-numbers { margin: 0; }
.finance-panel-product {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.finance-panel-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .headline-vs-real { margin: 0 1rem 1rem; padding: 0.85rem 1rem; }
  .finance-panel    { margin: 0 1rem 1rem; }
}

/* ─── Sourcing card: sourcer's economics callout (fee + time) ─── */
.sourcer-economics {
  margin: 0 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--issue-accent, var(--amber));
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.25rem 1.5rem 1.1rem;
}
.sourcer-economics-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--issue-accent, var(--amber));
  margin-bottom: 0.85rem;
}
.sourcer-economics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.sourcer-economics-stat { text-align: center; }
.sourcer-economics-stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.sourcer-economics-stat-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--text);
}

/* ─── Sourcing card: investor return (after fee) block ─── */
.investor-return { margin: 0 1.75rem 1.25rem; }
.investor-return-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.investor-return-suffix { color: var(--text-muted); font-weight: 500; }
.investor-return .teardown-numbers { margin: 0; }
.investor-return-note {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .sourcer-economics      { margin: 0 1rem 1rem; padding: 1.1rem 1.25rem 1rem; }
  .sourcer-economics-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .investor-return        { margin: 0 1rem 1rem; }
}

/* ─── Rental walk-away contrast block (gross-vs-net) ─── */
.strategy-contrast {
  margin: 0 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.5rem;
}
.strategy-contrast-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem;
  align-items: center;
}
.strategy-contrast-side {
  text-align: center;
  padding: 1.1rem 0.75rem;
  border-radius: var(--radius);
}
.bait-side  { background: var(--amber-bg); border: 1px solid var(--amber-border); }
.truth-side { background: var(--red-bg);   border: 1px solid var(--red); }
.strategy-contrast-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.bait-side  .strategy-contrast-label { color: var(--amber-text); }
.truth-side .strategy-contrast-label { color: var(--red-text); }
.strategy-contrast-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
}
.truth-side .strategy-contrast-value { color: var(--red); }
.strategy-contrast-sub {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.strategy-contrast-arrow {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text-muted);
  text-align: center;
}
.strategy-leasehold {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.strategy-leasehold strong { color: var(--text); }
@media (max-width: 600px) {
  .strategy-contrast      { margin: 0 1rem 1rem; padding: 1.1rem; }
  .strategy-contrast-row  { grid-template-columns: 1fr; }
  .strategy-contrast-arrow{ transform: rotate(90deg); }
}

/* ─── Risk-flag extensions (existing has .ok and .warning) ─── */
.risk-flag.fail { background: var(--red-bg); color: var(--red-text); }
.risk-flag.bait { background: var(--amber-bg); color: var(--amber-text); font-weight: 600; border: 1px solid var(--amber-border); }

/* ─── Indicative banner for spotlights with unverified figures ─── */
.indicative-banner {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0 1.75rem 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--amber-text);
  line-height: 1.5;
}
.indicative-banner-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  flex-shrink: 0;
}

/* ─── Spotlight extras (existing has the base layout) ─── */
.spotlight-tools {
  padding: 0.75rem 1.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
}

/* ─── Clinic situation (small grey context line) ─── */
.scenario-situation {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.55;
}

/* ─── PS block — same surface as .letter without the avatar ─── */
.ps-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
}
.ps-block p { margin-bottom: 0.85rem; }
.ps-block p:last-child { margin-bottom: 0; }
.ps-block strong { color: var(--text); }

/* ─── Next-issue card ─── */
.next-issue {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.next-issue-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.next-issue-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--text); }

/* ─── Teardown CTA (matches .teardown-cta from style.css for consistency) ─── */
.deal-cta-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.deal-cta-link:hover { background: #FEF0D4; }
