/* Guide figures, week 4 (Nov 19): ACH entry classes, card consent marks, UK cancellation bars, late fee bars, couples'
   cash by month. Base .gf styles and keys live in web/static/web/site.css. Same motion rules: plays once on first
   view (.mo + motion-gate.js), paused off-screen, still with reduced motion. */
/* ACH entry classes */
.gf-sec-row{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.gf-sec-row li{display:grid;justify-items:center;text-align:center;gap:8px;padding:16px 10px;border-radius:14px;background:#fff;border:1px solid var(--line)}
.gf-sec-how{display:grid;gap:2px}.gf-sec-how b{font-size:13.5px}.gf-sec-how small{font-size:11.5px;color:var(--muted)}
.gf-sec-arrow{width:2px;height:20px;background:var(--line);position:relative}
.gf-sec-arrow::after{content:"";position:absolute;left:-4px;bottom:-2px;border:5px solid transparent;border-top:6px solid var(--line);border-bottom:0}
.gf-sec-code{font:700 15px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em;color:#fff;background:var(--sage,#5B3FD9);border-radius:8px;padding:7px 12px}
.gf-sec-row li:last-child .gf-sec-code{background:var(--deep,#1C1452)}
.gf-sec-note{font-size:11.5px;color:var(--ink-2);line-height:1.35}
/* card consent marks */
.gf-cof-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;align-items:start}
.gf-co{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:grid;gap:8px;font-size:13px}
.gf-co-k{margin:0;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.gf-co-t{font-size:15px}
.gf-co-l{margin:0;display:flex;gap:8px;align-items:flex-start;color:var(--ink-2);line-height:1.4}
.gf-co-l i,.gf-co-key i{flex:none;width:20px;height:20px;border-radius:50%;background:var(--sage,#5B3FD9);color:#fff;font:700 11px/20px var(--font);text-align:center;font-style:normal}
.gf-co-l u{color:var(--sage,#5B3FD9)}
.gf-co-chk{display:flex;gap:8px;align-items:center;margin-top:4px;font-weight:600}
.gf-co-box{width:16px;height:16px;border-radius:4px;background:var(--sage,#5B3FD9);box-shadow:inset 0 0 0 4px var(--sage,#5B3FD9),inset 0 0 0 6px #fff}
.gf-co-btn{display:block;text-align:center;padding:10px;border-radius:10px;background:var(--sage,#5B3FD9);color:#fff;font-weight:650;margin-top:4px}
.gf-co-key{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:13.5px}
.gf-co-key li{display:flex;gap:10px;align-items:center}
/* UK cancellation bars */
.gf-uks-row{display:grid;grid-template-columns:150px minmax(0,1fr);column-gap:14px;row-gap:3px;align-items:center;padding:7px 0}
.gf-uks-row small{grid-column:2;font-size:12px;color:var(--muted)}.gf-uks-row small b{color:var(--ink);font-weight:650}
.gf-uks-bar{display:flex;height:16px;border-radius:6px;overflow:hidden;background:#fff;box-shadow:inset 0 0 0 1.5px var(--sage,#5B3FD9)}
.gf-uks-bar .keep{background:var(--sage,#5B3FD9);transform-origin:left center}
.gf-uks-bar .back{flex:1}
/* late fee bars */
.gf-late-h{margin:14px 0 8px;font-size:12.5px;font-weight:650;color:var(--ink-2)}.gf-late-h:first-of-type{margin-top:0}
.gf-late-lane{grid-template-columns:160px minmax(0,1fr) 72px;row-gap:3px}
.gf-late-lane small{grid-column:2/-1;font-size:12px;color:var(--muted)}
.gf-late-lane.ok .gf-bar i{background:var(--ok,#1F7A55)}.gf-late-lane.bad .gf-bar i{background:#C2410C}
.gf-late-stack{display:flex}.gf-late-stack i{border-radius:0!important}
.gf-late-stack .int{background:var(--sage,#5B3FD9)}.gf-late-stack .fix{background:var(--deep,#1C1452);box-shadow:inset 2px 0 0 #fff}
/* couples' cash by month */
.gf-cash-row{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:end;padding:6px 0}
.gf-cash-bars{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:4px;height:110px;align-items:end;border-bottom:1px solid var(--line)}
.gf-cash-bars li{position:relative;height:calc(var(--h) * 1%);min-height:0;border-radius:4px 4px 0 0;background:var(--sage,#5B3FD9);transform-origin:bottom}
.gf-cash-bars.lumpy li{background:#C2410C}
.gf-cash-bars li em{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:3px;font-style:normal;font-size:11px;font-weight:650;white-space:nowrap;color:var(--ink)}
.gf-cash-axis{display:flex;justify-content:space-between;margin:6px 0 0 164px;font-size:11.5px;color:var(--muted)}
@media (max-width:640px){
  .gf-sec-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gf-cof-grid{grid-template-columns:minmax(0,1fr)}
  .gf-uks-row,.gf-cash-row{grid-template-columns:minmax(0,1fr)}.gf-uks-row small{grid-column:1}
  .gf-late-lane{grid-template-columns:minmax(0,1fr) 64px}.gf-late-lane .gf-lbl{grid-column:1/-1}.gf-late-lane small{grid-column:1/-1}
  .gf-cash-axis{margin-left:0}.gf-cash-bars{gap:2px;height:90px}
}
@media (prefers-reduced-motion:no-preference){
  .gf.mo .gf-sec-row li,.gf.mo .gf-co-key li,.gf.mo .gf-co-l{animation:gf-fade .7s ease-out calc(.15s + var(--i,0) * 110ms) both}
  .gf.mo .gf-co-l i{animation:gf-pop .5s cubic-bezier(.22,1,.36,1) calc(.3s + var(--i,0) * 110ms) both}
  .gf.mo .gf-uks-bar .keep{animation:gf-grow .9s cubic-bezier(.22,1,.36,1) calc(.1s + var(--i,0) * 130ms) both}
  .gf.mo .gf-cash-bars li{animation:gf-rise .8s cubic-bezier(.22,1,.36,1) calc(.1s + var(--i,0) * 50ms) both}
}
@media print{.gf.mo *{animation:none!important}}

/* ---------- week 5: fee curve, plan shapes, change blocks, clause journey, retainer shapes ---------- */
/* fee curve */
.gf-curve-plot{position:relative;height:200px;margin:4px 0 0 52px}
.gf-curve-plot svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.gf-curve-y{position:absolute;left:-52px;top:0;bottom:0;width:46px;font-size:11.5px;color:var(--muted)}
.gf-curve-y span{position:absolute;right:0;transform:translateY(-50%)}.gf-curve-y span:nth-child(1){top:0}.gf-curve-y span:nth-child(2){top:50%}.gf-curve-y span:nth-child(3){top:100%}
.gf-line.card{stroke:var(--sage,#5B3FD9)}.gf-line.ach{stroke:var(--ok,#1F7A55)}
.gf-cap-line{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 4;vector-effect:non-scaling-stroke}
.gf-curve-tag{position:absolute;right:0;font-size:12px;font-weight:700;white-space:nowrap}
.gf-curve-tag.card{top:-4px;color:var(--sage,#5B3FD9);transform:translateY(-100%)}
.gf-curve-tag.ach{bottom:10px;color:var(--ok-ink,#196447)}
.gf-curve-cap{position:absolute;top:38%;transform:translateX(8px);font-size:11.5px;color:var(--ink-2);white-space:nowrap}
.gf-curve-x{display:flex;justify-content:space-between;margin:8px 0 0 52px;font-size:11.5px;color:var(--muted)}
.gf-key-line.ach{border-top-color:var(--ok,#1F7A55)}
/* plan shapes */
.gf-shape-row{display:grid;grid-template-columns:170px minmax(0,1fr);gap:16px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.gf-shape-row:first-of-type{border-top:0}
.gf-shape-row .gf-lbl{display:grid;gap:1px}.gf-shape-row .gf-lbl b{font-size:13.5px}.gf-shape-row .gf-lbl small{font-size:12px;color:var(--muted)}
.gf-shape-line{position:relative;height:18px;margin-right:8px}
.gf-shape-line::before{content:"";position:absolute;left:0;right:0;top:8px;height:2px;background:var(--line)}
.gf-shape-line i{position:absolute;top:3px;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:var(--sage,#5B3FD9);box-shadow:0 0 0 3px #FBF9F6}
.gf-shape-line i.dep{background:var(--ink);margin-left:0}
.gf-shape-ev{position:absolute;right:-6px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 3px var(--champ-ink,#7A5E26)}
.gf-key-dot.date{box-shadow:inset 0 0 0 3px var(--champ-ink,#7A5E26)}
.gf-shape-axis{position:relative;height:16px;margin:6px 8px 0 186px;font-size:11.5px;color:var(--muted)}
.gf-shape-axis span{position:absolute;white-space:nowrap}.gf-shape-axis span:nth-child(1){left:0}.gf-shape-axis span:nth-child(2){left:91.7%;transform:translateX(-100%)}.gf-shape-axis span:nth-child(3){right:-8px}
/* change blocks */
.gf-chg-row{display:grid;gap:5px;padding:9px 0}
.gf-chg-h{display:flex;justify-content:space-between;gap:12px;font-size:13px}.gf-chg-h b{font-weight:650}
.gf-chg-bar{display:flex;gap:3px;height:22px}
.gf-chg-bar i{flex:none;border-radius:4px;background:var(--sage,#5B3FD9);transform-origin:left center}
.gf-chg-bar i.paid{background:#8E879E}
.gf-chg-row.up .gf-chg-bar i:not(.paid){background:#C2410C}.gf-chg-row.down .gf-chg-bar i:not(.paid){background:var(--ok,#1F7A55)}
.gf-chg-row small{font-size:12px;color:var(--muted)}
.gf-key-sq.paid{background:#8E879E}.gf-key-sq.down{background:var(--ok,#1F7A55)}
/* clause journey */
.gf-jour-row{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1.3fr 1fr .8fr;gap:12px;position:relative}
.gf-jour-row>li{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;position:relative}
.gf-jour-row>li+li::before{content:"";position:absolute;left:-12px;top:22px;width:12px;height:2px;background:var(--line)}
.gf-jour-st{display:block;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--sage,#5B3FD9);margin-bottom:10px}
.gf-jour-row ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.gf-jour-row ul li{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;line-height:1.35}
.gf-jour-row ul i{flex:none;width:20px;height:20px;border-radius:50%;background:var(--fill);color:var(--ink);font:700 11px/20px var(--font);text-align:center;font-style:normal}
/* retainer shapes */
.gf-ret-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.gf-ret-c{display:grid;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}
.gf-ret-c b{font-size:13.5px}.gf-ret-c small{font-size:12px;color:var(--muted);line-height:1.4}
.gf-ret-c svg{width:100%;height:90px;overflow:visible}
@media (max-width:640px){
  .gf-curve-plot{height:170px;margin-left:46px}.gf-curve-y{left:-46px;width:40px}.gf-curve-x{margin-left:46px}
  .gf-curve-cap{top:6%}  /* above the card line on phones */
  .gf-shape-row{grid-template-columns:minmax(0,1fr);gap:8px}.gf-shape-axis{margin-left:8px}.gf-shape-axis span:nth-child(3){display:none}
  .gf-jour-row{grid-template-columns:minmax(0,1fr)}.gf-jour-row>li+li::before{left:22px;top:-12px;width:2px;height:12px}
  .gf-ret-grid{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:no-preference){
  .gf.mo .gf-shape-line i,.gf.mo .gf-shape-ev{animation:gf-pop .5s cubic-bezier(.22,1,.36,1) calc(.2s + var(--i,0) * 150ms) both}
  .gf.mo .gf-chg-bar i{animation:gf-grow .7s cubic-bezier(.22,1,.36,1) calc(.1s + var(--i,0) * 140ms) both}
  .gf.mo .gf-jour-row>li,.gf.mo .gf-ret-c{animation:gf-fade .7s ease-out calc(.15s + var(--i,0) * 140ms) both}
  .gf.mo .gf-curve-tag,.gf.mo .gf-curve-cap{animation:gf-fade .6s ease-out 1.2s both}
}

/* ---------- UX audit fixes (Nov 19), all figures: contrast >= 4.5:1, nothing under 11px, no colliding labels ---------- */
/* week 1 calendar strip: readable day names; labels under a cell get the figure's own background */
.gf-cal-row li small{font-size:11px;color:#55505F}
.gf-cal-row li.start small{color:#E4E1EA}
.gf-cal-row em{color:var(--ink)}
/* Direct Debit weekend cells */
.gf-dd-row li.we small,.gf-dd-row li.we b{color:#55505F}
/* labels that sit beside a coloured mark carry their own background */
.gf-fca-svc em{font-size:11px;background:#FBF9F6;padding:0 3px;border-radius:3px;color:#6B5220}
.gf-cash-bars li em{font-size:11px;background:#FBF9F6;padding:0 2px;border-radius:3px;color:var(--ink)}
/* cancellation chart: room above the plot for the top label; fewer x labels on narrow screens */
.gf-scale-plot{margin-top:26px}
@media (max-width:640px){.gf-scale-x span.t3{display:none}.gf-scale-x span.t2{display:inline}.gf-fca-line{margin-bottom:22px}}
.gf-cash-bars{margin-top:20px}
.gf-cash-bars li:first-child em{left:0;transform:none}
.gf-cash-bars li:nth-last-child(-n+3) em{left:auto;right:0;transform:none}
