/* Can I afford it, as a sentence (PV-005, js/afford-ui.js). Play mood: the answer wears a kind colour (green yes,
   amber wait, coral not yet) and the horizon fills in the same colour; everything else is the Money · Ledger surface.
   Linked just before pocket.css (it stays last): it reuses the Rent vs buy family (rv-*) and Runway's lists (rw-*).
   Design: docs/design/planning-v2/proto.html?screen=afford */

.af .rv-top { align-items: flex-start; }
.af-head { margin-right: auto; min-width: 0; }
.af-head .pl-tool-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.015em; }
.af-q { margin: 4px 0 0; font: 400 13.5px/1.45 var(--font-sans); color: var(--text-dim); }
.af .rv-save { flex: none; }

.af-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.af-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.af-ask { display: grid; gap: 16px; padding: 24px; }

/* the question: big, plain, Geist with tabular figures for the price */
.af-sent { margin: 0; font: 600 26px/1.38 var(--font-sans); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.af-ask .sp-hint { margin: -8px 0 0; }
.af-name { display: flex; align-items: flex-end; gap: 10px; }
.af-name[hidden] { display: none; }
.af-name label { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; font: 500 13px var(--font-sans); color: var(--text-mid); }
.af-name input { min-height: 44px; padding: 0 12px; border-radius: var(--r-input); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 500 15px var(--font-sans); }
.af-name input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }

/* the answer: one word in a kind colour, and the line under it */
.af-verdict { display: grid; gap: 6px; }
.af-word { font: 600 64px/.95 var(--font-sans); letter-spacing: -.05em; }
.af-word.is-ok { color: var(--green); }
.af-word.is-warn { color: var(--yellow); }
.af-word.is-bad { color: var(--red); }
.af-word.is-mute { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--text); }
.af-say { margin: 0; max-width: 46ch; font: 500 20px/1.4 var(--font-sans); letter-spacing: -.01em; color: var(--text-mid); text-wrap: pretty; }
.af-say b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* the horizon: today → the day you want it → the day it is ready */
.af-horizon { position: relative; height: 92px; margin: 0 6px; }
.af-horizon:empty { display: none; }
.af-track, .af-fill { position: absolute; left: 0; top: 44px; height: 4px; border-radius: 2px; }
.af-track { right: 0; background: var(--border); }
.af-fill.is-ok { background: var(--green); } .af-fill.is-warn { background: var(--yellow); }
.af-pt { position: absolute; top: 36px; width: 20px; margin-left: -10px; }
.af-pt i { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--text-dim); }
.af-pt.is-goal i { box-shadow: inset 0 0 0 3px var(--accent); }
.af-pt.is-ready i { background: var(--green); box-shadow: none; }
.af-pt span { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 500 11px var(--font-mono); color: var(--text-dim); }
.af-pt.is-up span { top: auto; bottom: 28px; }
.af-pt.is-l span { left: -4px; transform: none; }
.af-pt.is-r span { left: auto; right: -4px; transform: none; }

/* the assumptions line: smaller, under a rule */
.af-assume { margin: 0; padding-top: 14px; border-top: 1px solid var(--border); font: 500 14.5px/1.5 var(--font-sans); color: var(--text-mid); }

.af-left { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-input); background: var(--green-dim); font: 500 13.5px var(--font-sans); color: var(--text); }
.af-left b { font-weight: 600; }

@media (max-width: 1100px) {
  .af-body { display: flex; flex-direction: column; align-items: stretch; }
  .af-head .pl-tool-title { font-size: 28px; }
  .af-q { font-size: 13px; }
}
@media (max-width: 768px) {
  .af-ask { padding: 20px 18px; gap: 14px; }
  .af-sent { font-size: 22px; }
  .af-word { font-size: 52px; }
  .af-word.is-mute { font-size: 26px; }
  .af-say { font-size: 17px; }
}
