/* Lane C compliance overrides (PE-0050 body copy >=14px, PE-0071 phone figures >=14px, PE-0068 44px phone targets). Loaded last. */
.page-sub,.dn-long,.card .sub,.note,.empty,.method-desc,.kpi .d,.pocket .meta,.pocket .prov,.legend .it,.legend .it .pc,.sec-head .hint,.brand small,.nl,.tbl td,.stat-row .s .sub,.card p,main p,main li{font-size:14px}
main .s,main .kpi .d,.dash-note span,.demo-note span{font-size:14px}
.brand small{font-size:12px}
@media (max-width:760px){
  main .kpi .v,main .big-num,main .pocket .amt,main .stat-row .s .v,main .legend .vl,main .legend .it .vl{font-size:max(14px,1em)}
  main .btn,main button.btn,main button[type=submit],main select,main select.cell,main .btn.sm,main .sel,#toast button{min-height:44px}
  main input[type=checkbox]{width:24px;height:24px}
  main .tbl input[type=checkbox]{min-width:24px;min-height:24px}
}
main [style*="font-size:12"],main [style*="font-size:13"],main [style*=".s{"],#sidebar [style*="font-size:12"],#sidebar [style*="font-size:13"]{font-size:14px !important}
main .s,main td,main th+td,main p,main .page-sub,main .dn-long,main .demo-bar span{font-size:14px !important}
.brand small{font-size:14px !important}
@media (max-width:760px){ main p,main td{font-size:14px !important} }
:root{--text-xs:14px}
.rd14{font-size:14px !important}
@media (max-width:760px){
  main button,main select,main .btn,main .btn.sm,main button.sm{min-height:44px !important;min-width:44px !important}
  main input[type=checkbox],main input[type=radio]{width:44px !important;height:44px !important;min-width:44px;margin:0}
}
/* PE-0037: spreadsheet-style cells keep a visible resting boundary (>=3:1) */
input.cell,select.cell,textarea.cell{border:1px solid var(--control-line) !important}
[data-demoted]{transition:none !important}
@media (max-width:760px){ main a.lnk{display:inline-flex;align-items:center;min-height:44px;min-width:44px} }

/* PE-0072: stepped add forms on a phone */
[data-st][hidden]{display:none !important}
.st-act{display:contents}
.step-nav{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;width:100%;margin-top:var(--space-2)}
.step-nav .step-count{margin-right:auto;font-size:var(--text-sm);color:var(--ink-soft)}

.ml-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 12px}

.tr-stages{display:flex;gap:6px;margin:0 0 8px}.tr-stage{font-size:12px;font-weight:700;padding:3px 10px;border-radius:99px;border:1px solid var(--control-line);color:var(--ink-soft)}.tr-stage.on{background:var(--color-primary);color:var(--color-on-primary,white);border-color:transparent}
/* PE-0050/PE-0071 (fix5): every phone text size from app.css/cloud.css below 14px is raised to 14px at <=760px (old-brand look otherwise unchanged; svg chart axis text excluded) */
@media (max-width:760px){
  .brand small,
  .nav-label,
  .nav-item,
  .nav-badge,
  .side-wx .t1,
  .greeting,
  .page-sub,
  .sel,
  .stepper span,
  .sec-head .hint,
  .card .sub,
  .kpi .l,
  .kpi .d,
  .wx .eyebrow,
  .wx .score,
  .factor,
  .factor i,
  .chip,
  .btn,
  .btn.sm,
  .field,
  .card input[type=text],
  .card input[type=number],
  .card input[type=date],
  .card select,
  .card input[type=month],
  label.lbl,
  .cell,
  .tbl th,
  .tbl td,
  .row-line.head,
  .note,
  .empty,
  .legend .it,
  .legend .it .pc,
  .legend-inline,
  #tip,
  #tip b,
  .method .n,
  .method .w,
  .method-desc,
  .pocket .meta,
  .pocket .prov,
  .stat-row.three .s .l,
  .stat-row .s .l,
  .tab,
  .wx-strip .m,
  .today,
  .sel.loc,
  .today-chip,
  .theme-sw button,
  body.nav-min .nav-badge,
  .stepper .st-lbl,
  .stepper .st-lbl i,
  .picker .pk-grid button,
  .stepper .picker .pk-today,
  .mode-pill,
  .mode-sw button,
  .comfy-badge,
  .notes-foot,
  .ob-ck,
  .ob-tx,
  .ob-tx span,
  .hp-sec,
  details.hw,
  .gl,
  .tx-tbl td.c-sub,
  .row-line .sp,
  .bk-foot,
  .td,
  .td-wins,
  #tour-root .tr-pop,
  .tr-foot,
  #tour-offer .to-box,
  .pt-price span,
  .pt-fine,
  .pl-auto,
  .pl-mini span,
  .pl-mini b,
  .pl-hb,
  .pl-tbl td,
  .pl-tbl th,
  .pl-strat .t small,
  .pl-strat .row,
  .pl-swipe,
  table.pl-tbl:not(.pl-wide-t) td,
  table.pl-tbl:not(.pl-wide-t) th,
  table.pl-tbl:not(.pl-wide-t) td:first-child,
  table.pl-tbl:not(.pl-wide-t) th:first-child,
  table.pl-tbl:not(.pl-wide-t) [data-l]::before,
  .ov-status,
  .demo-note .btn,
  .ov-hero .l,
  .ov-hero .s,
  .wx p,
  .factor::before,
  .pt-sheet .buy-steps b,
  .pt-auth-card .buy-steps b
  {font-size:14px !important}
  main [style*="font-size:10"],main [style*="font-size:11"],#sidebar [style*="font-size:10"],#sidebar [style*="font-size:11"],main [style*="font-size:.7"],main [style*="font-size:.8"]{font-size:14px !important}
  .tabbar button,.tabbar button span,.help-btn,.wx .score small,#pt-consent,#pt-consent *,.stat-row .s .l,.kpi .l{font-size:14px !important}
  main small,#sidebar small,.pt-modal small,.pt-sheet small{font-size:14px !important}
}

/* PE-0173 (fix5): visible field labels (a11y-d.js visibleLabels) */
label.lbl.fld{display:flex;flex-direction:column;gap:4px;flex:1 1 150px;min-width:0;font-size:14px;font-weight:600;color:var(--ink-soft)}
label.lbl.fld>input,label.lbl.fld>select,label.lbl.fld>textarea{width:100%;min-width:0;box-sizing:border-box;font-weight:400;color:var(--ink)}
.form-row:has(>label.fld){align-items:flex-end}
.fld-t{font-size:14px}
/* table rows that turn into cards on a phone have no column header any more: their cell labels become visible */
@media (max-width:760px){
  .tx-tbl td label.tdl,.tbl-income td label.tdl,table.pl-tbl:not(.pl-wide-t) td label.tdl{position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none;white-space:normal;margin:0 0 2px;display:block;font-size:14px;font-weight:600;color:var(--ink-soft)}
}
td label.tdl-v{display:block;font-size:14px;font-weight:600;color:var(--ink-soft);margin:0 0 2px}
td:has(>label.tdl),th:has(>label.tdl){position:relative}
/* the 14px floor makes the forecast card taller: keep the key block on the first phone screen (tests/phone-layout.mjs) */
@media (max-width:760px){ .wx .eyebrow{letter-spacing:.02em} .factor{padding-top:3px;padding-bottom:3px} .wx .factors{gap:5px} }

/* TASK4: on a phone the "what is left" figure comes before the weather card, so the key block is above the fold at 390x844 with web fonts loaded (FR copy is longer) */
@media (max-width:760px){
  div:has(> .wx ~ .ov-hero){display:flex;flex-direction:column}
  div:has(> .wx ~ .ov-hero) > .wx ~ *{order:2}
  div:has(> .wx ~ .ov-hero) > .wx{order:1}
  div:has(> .wx ~ .ov-hero) > .wx ~ .ov-hero{order:0}
}

/* TASK4 (r3fix): on a phone the round profile icon in the top bar is the account entry; the "Sign in" chip is not repeated in the page header */
@media (max-width:760px){ .pt-chip.pt-signin{display:none} }

/* TASK4: a button that becomes the screen's primary does not fade its colours (a fade is a half-contrast frame for ~150ms, and it flaked the contrast checks on a slow deploy) */
.btn.primary{transition:transform .15s,box-shadow .15s}

/* TASK9: savings new-pocket form shows visible labels; desktop pocket cards get room for Target */
.np-f{display:flex;flex-direction:column;gap:4px;min-width:0}.np-l{font-size:14px;font-weight:600;color:var(--ink-soft)}
.form-row .np-f input{width:100%}
@media (min-width:901px){.pocket .top{flex-wrap:wrap}.pocket .top>div[style*='flex:1']{flex:1 1 100% !important}.pocket .top input.cell[type=number]{min-width:120px}}
.pocket .top>.amt{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;width:100%}
.pocket .top>.amt>div{margin:0 !important}
.pocket .top>.amt input.num{width:96px !important;text-align:right}


/* TASK8: plan name input stays inside its card on a phone */
@media (max-width:760px){#plans-tbl td:first-child input{width:100%;min-width:0;box-sizing:border-box}}
/* TASK8: dark weather card was a muddy olive; use the deep warm tone already in the tokens (text pairs re-checked by tests/contrast.mjs) */
html[data-theme=dark] .wx-sun{background:linear-gradient(135deg,var(--hc-3a3418),var(--hc-2e2a14))}
html[data-theme=dark] .wx-comfy{background:linear-gradient(135deg,var(--hc-4a3f16),var(--hc-3a3114))}
/* line-by-line table: the column header row cannot sit above stacked cells on a phone, every cell is already labelled */
@media (max-width:760px){.row-line.head{display:none}}
/* TASK8: subscriptions list on a phone: name on its own line, monthly and yearly under it (the yearly column was cut off) */
@media (max-width:760px){
  .sub-tbl,.sub-tbl tbody{display:block;width:100%}
  .sub-tbl tr{display:grid;grid-template-columns:1fr auto;gap:2px var(--space-3);padding:var(--space-2) 0;border-bottom:1px solid var(--line)}
  .sub-tbl td{display:block;padding:0;border:0;white-space:nowrap}
  .sub-tbl td:first-child{grid-column:1/-1;white-space:normal}
  .sub-tbl td.r{text-align:left}.sub-tbl td.r+td.r{text-align:right}
}
/* TASK8: phone checkboxes keep their 44px tap area but draw a normal 26px box (a bare 44px native box looked like an empty hole) */
@media (max-width:760px){
  main input[type=checkbox]{-webkit-appearance:none;appearance:none;position:relative;background:transparent;border:0;cursor:pointer}
  main input[type=checkbox]::before{content:'';position:absolute;inset:9px;border:2px solid var(--control-line);border-radius:7px;background:var(--surface)}
  main input[type=checkbox]:checked::before{background:var(--brand);border-color:var(--brand)}
  main input[type=checkbox]:checked::after{content:'';position:absolute;left:16px;top:11px;width:7px;height:14px;border:solid white;border-width:0 3px 3px 0;transform:rotate(45deg)}
  main input[type=checkbox]:focus-visible{outline:2px solid var(--brand);outline-offset:1px;border-radius:8px}
}
/* TASK8: "+ Add to Bills" text ran out of its button (button shrank inside a flex row; longer in French) */
main .r>button.btn{flex:0 0 auto;width:auto;max-width:100%;white-space:normal;font-family:inherit}
/* TASK8: net worth tables keep the date on one line; value column keeps its room */
@media (max-width:760px){.nw-tbl td:nth-child(3),.nw-tbl th:nth-child(3){white-space:nowrap}.nw-tbl td,.nw-tbl th{padding-left:4px;padding-right:4px;font-size:14px !important;letter-spacing:0}.nw-tbl td.r,.nw-tbl td.mono{white-space:nowrap}}
/* TASK8: budget-settings lists no longer scroll sideways inside their card on a desktop (the Expected / mo column was cut off) */
@media (min-width:761px){.pl-tbl td input,.pl-tbl td select{min-width:0 !important;width:100%;box-sizing:border-box}.pl-tbl td{min-width:0}}
/* TASK8: savings plan fields 2 x 2 on a phone (four full-width rows made the card very long) */
@media (max-width:760px){.pl-goal-f{display:grid !important;grid-template-columns:1fr 1fr;gap:var(--space-3)}.pl-goal-f .lbl{min-width:0}.pl-goal-f input{width:100% !important;min-width:0;box-sizing:border-box}}
