/* About page (/about), on top of landing.css: same report direction
 * (docs/design/design-direction.md). Ink is the page's own accent; a model's colour
 * appears only on that model's real-life block. "Real life" (a broken assumption,
 * the gains lost) is drawn in the report's red. The logo's draw-in is the page's one
 * motion moment; reduced motion skips it (about.js never adds .will-draw).
 */

/* ---------- 1. The question ---------- */
.about-hero { max-width: var(--content); margin: 0 auto; padding: clamp(56px, 9vw, 128px) var(--gutter) 0; }
.about-hero h1 { max-width: 11em; margin: 0; font-size: var(--t-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.94; }
.about-hero .lede { max-width: 34em; }
.vote { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.vote button { font: inherit; font-weight: 600; cursor: pointer; }
.vote button[aria-pressed="true"] { background: var(--ink); color: #fff !important; }
.vote-reply { max-width: 34em; min-height: 3.2em; margin: 20px 0 0; padding-left: 16px; border-left: 4px solid transparent; color: var(--ink); font-size: var(--t-lead); line-height: 1.45; }
.vote-reply.is-shown { border-left-color: var(--ink); }

/* ---------- 2. The teaching market ---------- */
.market-figure { margin: 0; padding-top: 14px; border-top: 3px solid var(--ink); }
.market-figure h3, .more-assumptions h3, .coming h3 { margin: 0; font-size: var(--t-lead); letter-spacing: -0.015em; }
.switches { display: grid; gap: 2px; margin: 16px 0 0; padding: 0; list-style: none; }
.switch-row { padding: 12px 14px; background: var(--tone); transition: background 160ms var(--ease-out); }
.switch-row.is-broken { background: color-mix(in srgb, var(--bad) 9%, white); }
.switch { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.switch-state { flex-shrink: 0; min-width: 6.5em; padding: 4px 10px; border: 2px solid var(--ink); border-radius: var(--radius); font-size: var(--t-small); text-align: center; transition: background 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.switch[aria-pressed="true"] .switch-state { border-color: var(--bad); background: var(--bad); color: #fff; }
.switch:hover .switch-state { background: var(--ink); color: #fff; }
.switch[aria-pressed="true"]:hover .switch-state { background: #8f1c25; }
.switch-text { margin: 6px 0 0; color: var(--ink-2); font-size: 0.9375rem; }
.on-site { display: block; margin-top: 6px; color: var(--ink); font-weight: 600; }

.market-chart { margin: 16px -4px 0; }
.market-chart svg, .live svg { display: block; width: 100%; height: auto; overflow: visible; }
.grid line { stroke: var(--tone-2); stroke-width: 1; }
.grid line.zero { stroke: var(--ink-3); }
.tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.axis-title, .point-label { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.point-label { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.market-line { fill: none; stroke-width: 3; stroke-linecap: round; }
.line-demand { stroke: var(--ink); }
.line-supply { stroke: var(--ink-3); }
.line-perceived, .line-supply_cost, .line-marginal_revenue { stroke: var(--bad); stroke-width: 2.25; stroke-dasharray: 6 5; }
.line-marginal_revenue { stroke-dasharray: 2 4; }
.lost { fill: var(--bad); opacity: 0.16; }
.ideal-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.outcome-dot { fill: var(--bad); stroke: var(--paper); stroke-width: 2.5; }
.seller-dot { fill: var(--paper); stroke: var(--bad); stroke-width: 2.5; }
.guide { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 3 4; }

.market-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--t-small); font-weight: 600; }
.market-legend li { display: inline-flex; align-items: center; gap: 8px; }
.market-legend li::before { content: ""; width: 18px; height: 3px; background: var(--ink); }
.market-legend [data-line="supply"]::before { background: var(--ink-3); }
.market-legend [data-line="perceived"]::before, .market-legend [data-line="supply_cost"]::before, .market-legend [data-line="marginal_revenue"]::before { background: repeating-linear-gradient(90deg, var(--bad) 0 5px, transparent 5px 9px); }
.market-legend [data-line="lost"]::before { height: 12px; background: color-mix(in srgb, var(--bad) 22%, white); }
.market-legend li[hidden] { display: none; }

.readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 14px 0 0; }
.readout div { padding: 12px 14px; background: var(--tone); }
.readout dt { color: var(--ink-2); font-size: var(--t-small); font-weight: 600; }
.readout dd { margin: 2px 0 0; font-size: var(--t-h3); font-weight: 800; letter-spacing: -0.03em; }
.figure-sentence { min-height: 3em; margin: 14px 0 0; font-weight: 500; }
.figure-note { margin: 10px 0 0; color: var(--ink-2); font-size: var(--t-small); }

.more-assumptions { margin-top: 48px; }
.flip-list { display: grid; gap: 2px; margin: 16px 0 0; padding: 0; list-style: none; }
.flip-list li { background: var(--tone); }
.flip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; width: 100%; padding: 14px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.flip-name { font-weight: 700; }
.flip-theory { grid-column: 1; color: var(--ink-2); font-size: 0.9375rem; }
.flip-cue { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink); font-size: var(--t-small); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--bad); }
.flip[aria-expanded="true"] .flip-cue { text-decoration-color: var(--ink); }
.flip-reality { padding: 0 14px 14px; border-left: 4px solid var(--bad); margin-left: 14px; }
.flip-reality p { margin: 0; }
.flip-reality p + p { margin-top: 6px; }

/* ---------- 3. Why bother ---------- */
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: use; }
.uses li { padding: 20px; background: var(--tone); }
.uses h3 { margin: 0; font-size: var(--t-lead); letter-spacing: -0.015em; line-height: 1.2; }
.uses p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- 4. The name and the story ---------- */
.story { max-width: 46rem; margin: 0 auto; padding: clamp(96px, 14vw, 176px) var(--gutter) 0; text-align: center; }
.story-mark { display: grid; justify-items: center; gap: 18px; }
.story-logo { width: clamp(88px, 14vw, 128px); height: auto; color: var(--ink); }
.story-name { margin: 0; font-size: var(--t-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.94; }
.story-meaning { margin: 28px auto 0; max-width: 34em; color: var(--ink-2); font-size: var(--t-lead); line-height: 1.45; }
.story-title { margin: 64px 0 0; font-size: var(--t-h2); letter-spacing: -0.035em; line-height: 1.02; }
.story-text { margin: 20px 0 0; font-size: var(--t-lead); line-height: 1.5; text-align: left; }
.story-signature { margin: 24px 0 0; font-weight: 700; text-align: left; }
.story-signature::before { content: ""; display: inline-block; width: 28px; height: 3px; margin-right: 10px; vertical-align: middle; background: var(--ink); }

/* The draw-in: "=" is drawn, then its lower bar bends away and the point lands. */
.story-logo path { stroke-dasharray: 1; }
.will-draw .story-logo rect { transform-origin: center; transform: scale(0.86); opacity: 0; }
.will-draw .story-logo .mark-top, .will-draw .story-logo .mark-straight { stroke-dashoffset: 1; }
.will-draw .story-logo .mark-bottom { stroke-dashoffset: 1; }
.will-draw .story-logo .mark-dot { opacity: 0; transform-origin: 23.5px 24px; transform: scale(0); }
.will-draw .story-name { opacity: 0; transform: translateY(14px); }
.story-logo .mark-straight { opacity: 0; }
.will-draw .story-logo .mark-straight { opacity: 1; }
.is-drawn .story-logo rect { transform: none; opacity: 1; transition: transform 500ms var(--ease-out), opacity 300ms ease-out; }
.is-drawn .story-logo .mark-top { stroke-dashoffset: 0; transition: stroke-dashoffset 450ms var(--ease-out) 250ms; }
.is-drawn .story-logo .mark-straight { stroke-dashoffset: 0; opacity: 0; transition: stroke-dashoffset 450ms var(--ease-out) 450ms, opacity 250ms ease-out 1100ms; }
.is-drawn .story-logo .mark-bottom { stroke-dashoffset: 0; transition: stroke-dashoffset 600ms var(--ease-out) 1050ms; }
.is-drawn .story-logo .mark-dot { opacity: 1; transform: none; transition: opacity 120ms ease-out 1550ms, transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1) 1550ms; }
.is-drawn .story-name { opacity: 1; transform: none; transition: opacity 500ms ease-out 1700ms, transform 600ms var(--ease-out) 1700ms; }

/* ---------- 5. Real life ---------- */
.application { --accent: var(--ink); --accent-strong: var(--ink); --accent-soft: var(--tone); padding-top: 16px; border-top: 6px solid var(--accent); }
.application + .application { margin-top: 72px; }
.application[data-model="solow"] { --accent: var(--theme-solow-accent); --accent-strong: var(--theme-solow-strong); --accent-soft: var(--theme-solow-soft); }
.application[data-model="new-keynesian"] { --accent: var(--theme-new-keynesian-accent); --accent-strong: var(--theme-new-keynesian-strong); --accent-soft: var(--theme-new-keynesian-soft); }
.application[data-model="portfolio"] { --accent: var(--theme-portfolio-accent); --accent-strong: var(--theme-portfolio-strong); --accent-soft: var(--theme-portfolio-soft); }
.application h3 { margin: 4px 0 0; font-size: var(--t-h3); letter-spacing: -0.025em; line-height: 1.1; }
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin-top: 18px; }
.halves > div { padding: 14px; background: var(--tone); }
.halves p { margin: 0; }
.half-title { margin: 0 0 4px; color: var(--accent-strong); font-size: var(--t-small); font-weight: 700; }
.halves .half-title { margin-bottom: 4px; }
.live { margin-top: 20px; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker button { min-height: 40px; padding: 0 14px; border: 2px solid var(--accent); border-radius: var(--radius); background: transparent; color: var(--accent-strong); font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; transition: background 160ms var(--ease-out), color 160ms var(--ease-out); }
.picker button:hover { background: var(--accent-soft); }
.picker button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.live .readout dd { color: var(--accent-strong); }
.history-figure { margin: 0 0 20px; }
.history-line { fill: none; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; }
.line-inflation, .line-curve { stroke: var(--accent); }
.line-policy, .line-theory { stroke: var(--ink); }
.line-theory { stroke-dasharray: 6 5; }
.target-line, .floor-line { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 2 4; }
.floor-line { stroke: var(--bad); }
.history-legend [data-line="inflation"]::before, .history-legend [data-line="curve"]::before { background: var(--accent); }
.history-legend [data-line="theory"]::before { background: repeating-linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 9px); }
.history-legend [data-line="target"]::before { background: repeating-linear-gradient(90deg, var(--ink-3) 0 2px, transparent 2px 5px); }
.history-legend [data-line="floor"]::before { background: repeating-linear-gradient(90deg, var(--bad) 0 2px, transparent 2px 5px); }
.application .hike-picker { border-color: var(--accent); }
.application .hike-picker button { color: var(--accent-strong); }
.application .hike-picker button + button { border-left-color: var(--accent); }
.application .hike-picker button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.application .hike-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slider-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.slider-row label { color: var(--ink-2); font-size: 0.9375rem; font-weight: 600; }
.slider-row output { color: var(--accent-strong); font-size: var(--t-h3); font-weight: 800; letter-spacing: -0.02em; }
.slider-row input { grid-column: 1 / -1; width: 100%; height: 32px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.slider-row input:disabled { cursor: progress; opacity: 0.5; }
.live .readout { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.live-error { margin: 12px 0 0; color: var(--bad); font-weight: 600; }
.think { margin: 20px 0 16px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.think p { margin: 0; }
.think .half-title { margin-bottom: 4px; }

.coming { margin-top: 72px; padding-top: 14px; border-top: 3px solid var(--ink); }
.coming ul { display: grid; gap: 2px; margin: 16px 0 0; padding: 0; list-style: none; }
.coming li { display: grid; gap: 2px; padding: 12px 14px; background: var(--tone); }
.coming span { color: var(--ink-2); }

.about-closing { max-width: var(--content); margin: 0 auto; padding: clamp(96px, 12vw, 160px) var(--gutter) clamp(72px, 9vw, 112px); }
.about-closing h2 { margin: 0; font-size: var(--t-h2); letter-spacing: -0.035em; line-height: 1.02; }

@media (max-width: 720px) {
    .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uses, .halves { grid-template-columns: minmax(0, 1fr); }
    .story-text, .story-signature { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    .switch-row, .switch-state, .picker button { transition: none; }
}
