/* "From Power Laws to Platform Economics" in the site's Modernist dress. Type and controls stay
   ink; the three layers and the cards take their marks from the SPAN chord (--c1 --c2 --c3). */
.pw {
  --muted: var(--ink-muted);
  --faint: color-mix(in srgb, var(--color-text) 58%, transparent);
  --hair: color-mix(in srgb, var(--color-text) 20%, transparent);
  --mono: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  --m1: var(--c1, #E03A2F); --m2: var(--c2, #F6C327); --m3: var(--c3, #2F5DA8);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding: 16px 0 40px;
}
.pw .section { padding: 48px 0 8px; border-top: 2px solid var(--color-text); }
.pw .section:first-child { border-top: 0; }
.pw .section-number { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.pw .section-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 28px; max-width: 24ch; text-wrap: balance; }
.pw .section > p { font-size: 18px; font-weight: 700; max-width: 56ch; margin: 28px 0 0; padding-left: 16px; border-left: 4px solid var(--color-text); }
.pw h3, .pw h4 { font-weight: 800; }
.pw strong { font-weight: 800; }

/* the three layers, stepped like the original pyramid */
.pw .theory-pyramid { display: grid; gap: 12px; }
.pw .pyramid-level { position: relative; padding: 18px 20px 18px 64px; border-top: 2px solid var(--color-text); background: var(--color-surface); }
.pw .pyramid-level::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--lc); }
.pw .level-1 { --lc: var(--m1); }
.pw .level-2 { --lc: var(--m2); margin-left: 32px; }
.pw .level-3 { --lc: var(--m3); margin-left: 64px; }
@media (max-width: 720px) { .pw .level-2, .pw .level-3 { margin-left: 0; } }
.pw .level-number { position: absolute; left: 22px; top: 18px; font-family: var(--mono); font-size: 22px; }
.pw .pyramid-level h3 { font-size: 21px; margin: 0 0 8px; }
.pw .pyramid-level p { margin: 0 0 8px; max-width: 70ch; }
.pw .pyramid-level p:not(:first-of-type) { color: var(--muted); }
.pw .mechanism { margin-top: 12px; padding: 10px 14px; background: var(--color-bg); border-left: 2px solid var(--color-text); font-family: var(--mono); font-size: 13px; }

/* cards in rows */
.pw .comparison-grid, .pw .tensions, .pw .em-grid, .pw .takeaways-grid, .pw .theory-grid { display: grid; gap: 24px; margin: 8px 0 24px; }
.pw .comparison-grid, .pw .em-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pw .tensions, .pw .takeaways-grid, .pw .theory-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pw .comparison-card, .pw .tension-card, .pw .em-card, .pw .takeaway-card, .pw .theory-box { border-top: 2px solid var(--color-text); padding-top: 14px; }
.pw .card-label, .pw .tension-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pw .comparison-card h4, .pw .tension-card h4, .pw .em-card h4, .pw .takeaway-card h4, .pw .theory-box h4 { font-size: 19px; margin: 0 0 10px; }
.pw .tension-card p, .pw .em-card p, .pw .takeaway-card p { color: var(--muted); font-size: 16px; margin: 0; }
.pw .comparison-card ul, .pw .theory-box ul, .pw .app-solution ul { list-style: none; margin: 0; padding: 0; }
.pw .comparison-card li, .pw .theory-box li, .pw .app-solution li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid var(--hair); font-size: 16px; }
.pw .comparison-card li:last-child, .pw .theory-box li:last-child, .pw .app-solution li:last-child { border-bottom: 0; }
.pw .comparison-card li::before { content: '→'; position: absolute; left: 0; color: var(--m1); font-weight: 800; }
.pw .em-card { border-top-width: 6px; }
.pw .em-card.formal { border-top-color: var(--m3); }
.pw .em-card.informal { border-top-color: var(--m1); }
.pw .em-card.dpi { border-top-color: var(--m2); }
.pw .takeaway-card { border-top-width: 6px; }
.pw .takeaway-card:nth-child(1) { border-top-color: var(--m1); }
.pw .takeaway-card:nth-child(2) { border-top-color: var(--m2); }
.pw .takeaway-card:nth-child(3) { border-top-color: var(--m3); }
.pw .takeaway-card:nth-child(4) { border-top-color: var(--color-text); }
.pw .theory-box.know li::before { content: '✓'; position: absolute; left: 0; color: var(--m3); font-weight: 800; }
.pw .theory-box.missing li::before { content: '?'; position: absolute; left: 2px; color: var(--m1); font-weight: 800; }

/* the gap and the application: framed panels */
.pw .gap-section, .pw .application { margin: 32px 0 16px; padding: 24px; background: var(--color-surface); border-top: 6px solid var(--m2); }
.pw .application { border-top-color: var(--m3); }
.pw .gap-title, .pw .application h3 { font-size: 24px; font-weight: 900; letter-spacing: -0.01em; margin: 0 0 20px; }
.pw .gap-content, .pw .application-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .pw .gap-content, .pw .application-grid { grid-template-columns: 1fr; } }
.pw .gap-left h4, .pw .gap-right h4, .pw .app-context h4, .pw .app-solution h4 { font-size: 18px; margin: 0 0 10px; }
.pw .gap-left p, .pw .app-context p { color: var(--muted); margin: 0 0 12px; }
.pw .gap-right, .pw .app-solution { padding: 16px 18px; background: var(--color-bg); border-left: 4px solid var(--color-text); }
.pw .gap-right p { margin: 0 0 10px; }
.pw .app-solution li::before { content: '✓'; position: absolute; left: 0; color: var(--m3); font-weight: 800; }
.pw .theory-note { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 16px; }

/* table */
.pw .table-wrapper { overflow-x: auto; border-top: 2px solid var(--color-text); margin: 8px 0 24px; }
.pw table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; min-width: 640px; }
.pw th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--color-text); }
.pw td { padding: 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.pw td:first-child { font-weight: 700; }

/* sources */
.pw .footer { margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--color-text); font-size: 14px; color: var(--muted); }
.pw .footer p { margin: 4px 0; }
.pw .footer .footer-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text); margin-bottom: 10px; }
