/* Core value equation, v4. The article uses the site's body vocabulary (.ws-body);
   this file styles the equation and the year-over-year table. Scoped under .cve-article. */

.cve-article { max-width: 64rem; }
.cve-article .cve-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-7); }
.cve-article .ws-app { min-height: 0; }
.cve-article .ws-section { padding-top: var(--space-8); }
.cve-article .ws-section:first-of-type { padding-top: 0; }
.cve-article .cve-aka { font-size: 14px; color: var(--fg-2); margin-bottom: var(--space-2); }

/* ── The equation ────────────────────────────────────────────────────── */
.cve-article .cve-stage { display: grid; gap: var(--space-5); margin: var(--space-6) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--rule-strong); }
.cve-article .cve-stage-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.cve-article .cve-stage-title { font: 600 21px/1.28 var(--font-sans); letter-spacing: -.01em; }
.cve-article .cve-stage-year { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.cve-article .cve-year-pill { font: 600 15px/1.2 var(--font-sans); font-variant-numeric: tabular-nums; padding-right: var(--space-2); }

.cve-article .cve-eq { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1fr); align-items: stretch; }
.cve-article .cve-cell { display: flex; flex-direction: column; gap: var(--space-2); min-height: 300px; padding: var(--space-5); background: var(--bg-page); border: 1px solid var(--rule); color: var(--fg-1); border-radius: var(--radius-sheet); }
.cve-article .cve-cell.invest { background: var(--bg-page); border-color: var(--bg-page); }
.cve-article .cve-cell.outcome { border-top: 3px solid var(--bp-primary); }
.cve-article .cve-cell-tag { font: 600 12.5px/1.3 var(--font-sans); color: var(--fg-2); }
.cve-article .cve-cell-head { margin: 0 0 var(--space-4); font: 600 21px/1.25 var(--font-sans); letter-spacing: -.01em; color: var(--fg-1); }
.cve-article .cve-rows { margin-top: auto; display: grid; }
.cve-article .cve-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--space-3); align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); }
.cve-article .cve-row .k { font: 600 13px/1.2 var(--font-sans); color: var(--fg-2); }
.cve-article .cve-row .v { font: 600 21px/1.2 var(--font-sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-align: right; color: var(--fg-1); }
.cve-article .cve-input {
  width: 100%; min-width: 0; padding: 2px 0; margin: 0; background: transparent; border: 0; border-bottom: 1px solid var(--rule-input); border-radius: 0;
  font: inherit; color: inherit; text-align: right; font-variant-numeric: tabular-nums;
}
.cve-article .cve-input:hover { border-bottom-color: var(--rule-strong); }
.cve-article .cve-input:focus-visible { outline: none; border-bottom: 2px solid var(--focus); padding-bottom: 1px; }
.cve-article .cve-cell.outcome .cve-row .v { color: var(--fg-accent); }

.cve-article .cve-invest-list { list-style: none; margin: auto 0 0; padding: 0; display: grid; }
.cve-article .cve-invest-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--space-2); align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); margin: 0; }
.cve-article .cve-invest-list .num { font: 400 13px/1.2 var(--font-sans); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.cve-article .cve-invest-list .name { font: 600 17px/1.3 var(--font-sans); }
.cve-article .cve-invest-list .name em { display: block; margin-top: 2px; font: 400 13px/1.4 var(--font-sans); font-style: normal; color: var(--fg-2); }

.cve-article .cve-op { align-self: center; justify-self: center; font: 300 46px/1 var(--font-sans); color: var(--fg-2); user-select: none; }
.cve-article .cve-op.equals { color: var(--fg-1); }

.cve-article .cve-r40 { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--rule-strong); }
.cve-article .cve-r40.hidden { display: none; }
.cve-article .cve-r40 .meta { display: grid; gap: 2px; }
.cve-article .cve-r40 .label { font: 600 13px/1.2 var(--font-sans); }
.cve-article .cve-r40 .formula { font-size: 12.5px; color: var(--fg-2); }
.cve-article .cve-r40 .val { font: 600 21px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.cve-article .cve-r40 .val.pass { color: var(--status-positive); }

.cve-article .cve-stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6); font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.cve-article .cve-stage-foot p { margin: 0; max-width: 60ch; font-size: 14px; }
.cve-article .cve-stage-foot strong { color: var(--fg-1); }

.cve-article .cve-cell.cve-flash { animation: cve-flash .15s ease-out; }
@keyframes cve-flash { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 960px) {
  .cve-article .cve-eq { grid-template-columns: minmax(0, 1fr); }
  .cve-article .cve-op { padding: var(--space-2) 0; font-size: 36px; }
  .cve-article .cve-cell { min-height: 0; }
}

/* Year-over-year table: the active year's column is marked */
.cve-article .cve-compound th.is-active, .cve-article .cve-compound td.is-active { color: var(--fg-accent); font-weight: 600; }
.cve-article .cve-compound td { font-variant-numeric: tabular-nums; }

@media print {
  .cve-article .cve-actions, .cve-article .cve-stage-year { display: none; }
  .cve-article .cve-cell.invest { background: transparent; border: 1px solid var(--rule); }
}
