/* BenchMarcus's forecasts: the charts, the picker, the Forecast view and its levers (app-forecast-*.js,
   app-paid-forecast.js). On View A's tokens, so the light theme mostly follows; the rules at the foot set what it
   can't (line colours that must hold 3:1 on white). No style attributes: positions are custom properties. */

/* ---- line colours: you, then up to five rivals, then "before your changes" */
.fc-t0{--fc:var(--yellow)}
.fc-t1{--fc:var(--cyan)}
.fc-t2{--fc:var(--blue)}
.fc-t3{--fc:var(--violet)}
.fc-t4{--fc:#FF9C9C}
.fc-t5{--fc:#F6A85E}
.fc-tb{--fc:var(--dim)}

/* ---- blocks on the other views */
.fc-sec .pd-list-head{margin-bottom:4px}
.fc-wait{min-height:2.5em}
.fc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:12px}
.fc-fig{margin:0;border:1px solid var(--line2);border-radius:14px;padding:12px 14px 10px;background:rgba(15,42,71,.72);min-width:0}
.fc-fig-h{font-family:Inter,sans-serif;font-size:.95rem;font-weight:600;letter-spacing:0;margin:0 0 4px;color:var(--fg)}
.fc-cap{color:var(--dim);font-size:.88rem;margin:6px 0 0}
.fc-card .pd-card-big{font-size:1.8rem}

/* ---- the chart */
.fc-chart{position:relative}
.fc-plot{touch-action:pan-y}
.fc-svg{display:block;max-width:100%;overflow:visible}
.fc-svg text{font-family:Inter,sans-serif;font-size:11px;fill:var(--dim)}
.fc-gline{stroke:var(--line);stroke-width:1}
.fc-zero{stroke:var(--line2);stroke-width:1.2}
.fc-strip{fill:rgba(255,245,91,.06)}
.fc-svg .fc-strip-l{fill:var(--dim);font-size:10.5px;letter-spacing:.02em}
.fc-line{fill:none;stroke:var(--fc);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.fc-line.is-you{stroke-width:3}
.fc-line.is-ahead{stroke-dasharray:6 4}
.fc-line.is-base{stroke-width:1.6;stroke-dasharray:3 4}
.fc-dot{fill:var(--fc);stroke:var(--bg);stroke-width:1.5}
.fc-dot.is-ahead{fill:var(--bg);stroke:var(--fc);stroke-width:2}
.fc-band{fill:var(--fc);opacity:.14;stroke:none}
.fc-mark{fill:none;stroke:var(--red);stroke-width:2}
.fc-svg .fc-mark-l{fill:var(--fg);font-weight:600}
.fc-guide{stroke:var(--dim2);stroke-width:1;stroke-dasharray:2 3}
.fc-tip{position:absolute;top:6px;left:var(--tx,0);z-index:2;min-width:150px;max-width:260px;padding:8px 10px;border:1px solid var(--line2);border-radius:10px;background:var(--card2);box-shadow:0 10px 26px rgba(0,0,0,.35);pointer-events:none;font-size:.84rem}
.fc-tip.is-left{transform:translateX(-100%)}
.fc-tip p{margin:0}
.fc-tip-h{color:var(--dim);font-size:.78rem;margin-bottom:4px !important}
.fc-tip-row{display:flex;align-items:center;gap:6px;white-space:nowrap}
.fc-tip-row b{margin-left:auto;padding-left:10px}
.fc-tip-dot{width:8px;height:8px;border-radius:50%;background:var(--fc);flex:none}
.fc-figs{margin-top:6px}
.fc-figs summary{min-height:36px;display:inline-flex;align-items:center;cursor:pointer;color:var(--cyan);font-size:.86rem;font-weight:600}
.fc-figs .pd-tablewrap{margin-top:4px}
.fc-figs-t td.is-ahead{font-style:italic}

/* ---- the picker */
.fc-pick{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:6px 0 4px}
.fc-pick-l{font-size:.87rem;color:var(--dim);margin-right:2px}
.fc-chips{display:contents}
.fc-chip{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:2px 6px 2px 12px;border-radius:999px;border:1px solid var(--line2);font-size:.88rem;font-weight:600}
.fc-chip.is-you{padding-right:12px}
.fc-chip-dot{width:10px;height:10px;border-radius:50%;background:var(--fc)}
.fc-chip-x{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:50%;background:transparent;color:var(--dim);font:inherit;font-size:1.1rem;cursor:pointer}
.fc-chip-x:hover{background:var(--line);color:var(--fg)}
.fc-add{min-height:34px;padding:2px 12px;border-radius:999px;border:1px dashed var(--line2);background:transparent;color:var(--cyan);font:inherit;font-size:.88rem;font-weight:600;cursor:pointer}
.fc-add:disabled{color:var(--dim2);cursor:default}
.fc-add-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:5;width:min(420px,100%);max-height:320px;overflow:auto;padding:10px;border:1px solid var(--line2);border-radius:12px;background:var(--card2);box-shadow:0 16px 40px rgba(0,0,0,.4)}
.fc-add-q{width:100%;min-height:40px;padding:6px 10px;border-radius:8px;border:1px solid var(--line2);background:var(--bg2);color:var(--fg);font:inherit;margin-bottom:6px}
.fc-add-list{list-style:none;margin:0;padding:0}
.fc-add-item{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-height:44px;padding:6px 8px;border:0;border-radius:8px;background:transparent;color:var(--fg);font:inherit;text-align:left;cursor:pointer}
.fc-add-item:hover,.fc-add-item:focus-visible{background:var(--line)}
.fc-add-item:disabled{color:var(--dim2);cursor:default}
.fc-add-name{font-weight:600}
.fc-chip-x:focus-visible,.fc-add:focus-visible,.fc-add-item:focus-visible,.fc-step:focus-visible,.fc-fmt-b:focus-visible,.fc-tab:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}

/* ---- the Forecast view */
.fc-for{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 4px}
.fc-for label{color:var(--dim);font-size:.92rem}
.fc-sel{min-height:40px;padding:4px 10px;border-radius:8px;border:1px solid var(--line2);background:var(--bg2);color:var(--fg);font:inherit;max-width:100%}
.fc-q{margin:8px 0 0;padding:8px 12px;border-left:3px solid var(--line2);border-radius:0 8px 8px 0;font-size:.92rem;max-width:90ch}
.fc-q.is-good{border-left-color:var(--good,#9BC0E8)}
.fc-q.is-even{border-left-color:var(--blue)}
.fc-q.is-bad{border-left-color:var(--yellow);background:rgba(255,245,91,.06)}
.fc-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:22px;align-items:stretch;margin-top:26px}
/* The forecast comes first in the page; on a wide screen "What if…" takes the left-hand column. */
.fc-layout > .fc-side{grid-column:1;grid-row:1}
.fc-layout > .fc-main{grid-column:2;grid-row:1}
.fc-side-changes{display:none}
.fc-side{padding:14px 14px 4px;border:1px solid var(--line2);border-radius:16px;background:rgba(11,32,57,.82)}
.fc-side .pd-h2{margin-bottom:4px}
.fc-main{min-width:0}
.fc-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.fc-tabs-l{font-size:.87rem;color:var(--dim);margin-right:2px}
.fc-main-chart{border:1px solid var(--line2);border-radius:16px;padding:12px 14px 8px;background:rgba(15,42,71,.72)}
.fc-changes{margin:12px 0 0;color:var(--dim);font-size:.92rem}
.fc-changes.is-on{color:var(--fg);font-weight:600}
.fc-keys{display:flex;flex-wrap:wrap;gap:6px 18px;list-style:none;margin:10px 0 0;padding:0 4px;font-size:.84rem;color:var(--dim)}
.fc-key{display:inline-flex;align-items:center;gap:8px}
.fc-key-line{width:22px;height:0;border-top:3px solid var(--fc)}
.fc-key.is-base .fc-key-line{border-top-style:dashed;border-top-width:2px}
.fc-key-band{width:22px;height:10px;border-radius:3px;background:var(--fc);opacity:.25}
.fc-key-strip{width:22px;height:12px;border-radius:3px;background:rgba(255,245,91,.12)}
.fc-how{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px 24px}
.fc-how li{border-top:1px solid var(--line);padding-top:8px}
.fc-how p{margin:0}
.fc-how-t{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.fc-how-x{color:var(--dim);font-size:.9rem;margin-top:2px !important}
#fc-how:focus{outline:none}
/* The Powdr card, blue like the other views' (.sv-next in app-paid-simple.css). */
.fc-powdr{margin-top:28px}
.fc-powdr .sv-next-sub{max-width:70ch}
.fc-disc{margin-top:22px}

/* ---- the levers */
.fc-quick{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 6px}
.fc-quick-l{width:100%;margin:0;font-size:.85rem;color:var(--dim)}
.fc-quick-b{min-height:34px;font-size:.84rem}
.fc-group{border-top:1px solid var(--line);margin:10px 0 0;padding:2px 0 0;min-width:0}
.fc-group-l{display:flex;align-items:center;min-height:40px;cursor:pointer;font-size:.82rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--cyan);list-style:none}
.fc-group-l::-webkit-details-marker{display:none}
/* The chevron: points down when folded, up when open. */
.fc-group-l::after{content:"";flex:none;width:7px;height:7px;margin:0 6px 3px auto;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .15s ease}
.fc-group[open] > .fc-group-l::after{margin-bottom:-3px;transform:rotate(225deg)}
.fc-group-l:hover{color:var(--fg)}
.fc-group-n{text-transform:none;letter-spacing:0;color:var(--yellow);font-weight:600;margin-left:4px}
.fc-lever{padding:8px 0;border-bottom:1px solid var(--line)}
.fc-lever:last-child{border-bottom:0}
.fc-lever.is-set .fc-lever-l::after{content:"changed";margin-left:8px;padding:0 7px;border-radius:999px;background:var(--yellow);color:var(--bg);font-size:.72rem;font-weight:700;vertical-align:1px}
.fc-lever-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.fc-lever-l{display:block;font-weight:600;font-size:.94rem}
.fc-lever-in{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.fc-lever-in > .fc-byyear{margin-left:auto}
.fc-num-box{display:inline-flex;align-items:center;gap:4px}
.fc-num{width:7.5em;min-height:36px;padding:4px 8px;border-radius:8px;border:1px solid var(--line2);background:var(--bg2);color:var(--fg);font:inherit;font-variant-numeric:tabular-nums;text-align:right}
.fc-num:focus-visible{outline:2px solid var(--yellow);outline-offset:1px}
/* The − and + buttons step the field, so the browser's own spinner goes. */
.fc-num{appearance:textfield;-moz-appearance:textfield}
.fc-num::-webkit-inner-spin-button,.fc-num::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.fc-step{width:32px;height:32px;border-radius:8px;border:1px solid var(--line2);background:transparent;color:var(--fg);font:inherit;font-size:1rem;cursor:pointer}
.fc-unit{font-size:.84rem;color:var(--dim);min-width:2.5em}
.fc-fmt{display:inline-flex;border:1px solid var(--line2);border-radius:999px;overflow:hidden}
.fc-fmt-b{min-height:30px;min-width:38px;padding:0 10px;border:0;background:transparent;color:var(--dim);font:inherit;font-size:.82rem;font-weight:600;cursor:pointer}
.fc-fmt-b[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.fc-hint{margin:4px 0 0;font-size:.8rem;color:var(--dim2)}
.fc-byyear{min-height:32px}
.fc-years{display:grid;gap:6px;margin:4px 0 2px;padding-left:10px;border-left:2px solid var(--line)}
.fc-year{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fc-year-l{min-width:4em;font-size:.86rem;color:var(--dim)}
.fc-loan-terms{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 10px;margin-top:6px;font-size:.86rem}
.fc-loan-terms label{color:var(--dim)}
.fc-loan-terms .fc-num{width:5.5em}
.fc-reset{margin:12px 0 10px}

/* A wide screen: "What if…" is exactly as tall as the forecast beside it (user, 6 Nov 2026: it ran on far below the
   chart and left a gap beside it). Size containment keeps the levers out of the row's height, so the chart's column
   sets it and the panel stretches to match; the levers scroll inside the panel, under its heading, with "Clear all
   changes" pinned at the foot. The hints are for screen readers only here (the label, the unit and the slider say
   enough; a lever that replaces a figure shows it in the empty field), and the quick ideas are smaller, so they take
   three lines rather than five. */
@media (min-width:961px){
  .fc-side{contain:size;display:flex;flex-direction:column;min-height:440px;padding:14px 0 0;overflow:hidden;background:var(--bg2)}
  .fc-side > .pd-h2,.fc-side > .pd-sub{padding:0 16px}
  .fc-side > .pd-sub{margin-bottom:2px}
  .fc-levers{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin;padding:0 16px}
  .fc-levers .fc-reset{position:sticky;bottom:0;z-index:2;margin:6px -16px 0;padding:10px 16px 12px;border-top:1px solid var(--line);background:var(--bg2);box-shadow:0 -14px 14px -12px rgba(0,0,0,.45)}
  .fc-side .fc-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .fc-quick{gap:6px 5px;margin-top:6px}
  .fc-quick-b{min-height:30px;padding:2px 10px;font-size:.8rem}
  .fc-lever{padding:6px 0 4px}
  .fc-lever-top{margin-bottom:2px}
}

@media (max-width:960px){
  .fc-layout{grid-template-columns:minmax(0,1fr)}
  .fc-layout > .fc-side,.fc-layout > .fc-main{grid-column:auto;grid-row:auto}
  /* The chart is above, out of sight: what the changes do stays in view at the foot of the levers. */
  .fc-side-changes.is-on{display:block;position:sticky;bottom:0;margin:8px -14px 0;padding:10px 14px;background:var(--card2);border-top:1px solid var(--line2);border-radius:0 0 16px 16px}
}
@media (max-width:860px){.fc-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){.fc-add-panel{width:100%}}
@media print{.fc-pick,.fc-side,.fc-tabs,.fc-figs,.fc-powdr{display:none}.fc-layout{grid-template-columns:minmax(0,1fr)}.fc-layout > .fc-main{grid-column:auto;grid-row:auto}}
@media (prefers-reduced-motion:reduce){.fc-group-l::after{transition:none}}

/* ---- light theme: line colours that hold on white, and panels on cards */
html[data-pf-theme="light"] .fc-t0{--fc:#A87800}
html[data-pf-theme="light"] .fc-t4{--fc:#B42318}
html[data-pf-theme="light"] .fc-t5{--fc:#B5530A}
html[data-pf-theme="light"] .fc-strip{fill:rgba(11,32,57,.035)}
html[data-pf-theme="light"] :is(.fc-fig,.fc-main-chart,.fc-side){background:var(--card)}
html[data-pf-theme="light"] .fc-tip,html[data-pf-theme="light"] .fc-add-panel{background:#FFFFFF;box-shadow:0 12px 30px rgba(11,32,57,.18)}
html[data-pf-theme="light"] .fc-key-strip{background:rgba(11,32,57,.08)}
html[data-pf-theme="light"] .fc-q.is-bad{background:rgba(245,196,0,.10);border-left-color:#B08600}
html[data-pf-theme="light"] .fc-lever.is-set .fc-lever-l::after{color:#0B2039}
@media (min-width:961px){html[data-pf-theme="light"] .fc-levers .fc-reset{box-shadow:0 -14px 14px -12px rgba(11,32,57,.16)}}
html[data-pf-theme="light"] .fc-group-n{color:var(--pf-ink-you)}
html[data-pf-theme="light"] :is(.fc-chip-x,.fc-add,.fc-add-item,.fc-step,.fc-fmt-b,.fc-tab,.fc-num):focus-visible{outline-color:#0B2039}
