/* Readability and alignment refinements; the established brand palette stays intact. */
:root{--text-secondary:#526569;--text-link:#17695f;--control-border:#b2c4bc}
.budget-info,.mobile-wordmark,.mobile-access{display:none}
/* Financial dates, labels and guidance stay readable on the light cards. */
.sub,.sectionnote,.cat-sub,.cat-amount small,.debt-mini small,.activityrow small,.itemrow small,.card-details small,.household small,.household .role,.hint,.page-intro,.footer,.breadcrumbs,.profile small,.side-card p,.v2-mini,.v2-caption,.v2-field-help,.v2-budget-period,.v2-pane p,.v2-setup-section p,.v2-choice small,.v2-summary small,.v2-dialog p,.bills-row small,.bills-type-label,.bills-category-type,.bills-entry-field>small,.v2-method-row small,.mobile-pages nav small,.money-card .kicker,.money-card .bottomline{color:var(--text-secondary)}
.sectionnote,.cat-sub,.cat-amount small,.debt-mini small,.activityrow small,.itemrow small,.card-details small,.household small,.hint,.v2-mini,.v2-field-help,.v2-method-row small{font-size:13px;line-height:1.5}
.metric label,.metric small,.tile small,.tile span,.v2-form label,.v2-input label,.field,.bills-select,.v2-budget-period,.v2-allocation-totals small{color:var(--text-secondary);line-height:1.5}
.metric label,.metric small,.tile small,.tile span,.v2-form label,.field{font-size:13px}
.metric.warn small,.notice,.preview{color:#805b30}.bills-overdue small:first-of-type{color:#994322}
.v2-note,.v2-banner,.mutedbox{color:#45615a}.v2-note,.v2-banner{font-size:13px;line-height:1.6}
.v2-choice small{font-size:13px;line-height:1.5}.v2-step:not(.active){color:var(--text-secondary)}
.side-card button,.sectionhead button,.bills-text-link,.v2-toolbar button{color:var(--text-link)}
.mobilebar button{color:#526569}.mobilebar button.active{color:#17695f}
.v2-method-row,.v2-budget,.memberRow,.household,.formgrid,.formgrid>*,.v2-form>*,.field{min-width:0}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{box-sizing:border-box;max-inline-size:100%;min-inline-size:0}
input::placeholder,textarea::placeholder{color:#647578;opacity:1}
/* Give the native date editor a bounded border of its own. The native picker
   and input value remain intact, including Safari's date editor. */
.date-field-control{display:block;inline-size:100%;min-inline-size:0;max-inline-size:100%;box-sizing:border-box;margin-top:7px;border:1px solid var(--control-border);border-radius:10px;background:#fff;overflow:hidden;height:44px}
.date-field-control>input[type=date]{display:block;appearance:none;-webkit-appearance:none;inline-size:100%;width:100%;min-inline-size:0;max-inline-size:100%;box-sizing:border-box;border:0!important;border-radius:0!important;background:transparent!important;margin:0!important;padding:0 12px!important;height:100%!important;min-height:0!important;text-align:start;line-height:1.4;font-family:inherit;font-weight:500;color:#284047;outline:none}
.date-field-control>input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left;margin:0}
.date-field-control>input[type=date]::-webkit-datetime-edit{padding:0;min-width:0}
.date-field-control:focus-within{outline:3px solid #41997f;outline-offset:2px}
.date-field-control:has(input:disabled){background:#f0f5f1}
.date-field-control:has(input:disabled)>input{color:#526569}
@media(max-width:960px){
  .cloudbar{grid-template-columns:minmax(0,1fr) 72px;grid-template-rows:auto 46px;gap:6px 10px;padding:10px 12px;min-height:0;align-items:center}
  .cloudbar>label{display:contents}
  .cloudbar .space-label{grid-column:1;grid-row:1;font-size:12px;font-weight:650;color:#36564e;line-height:1.4}
  .cloudbar select{grid-column:1;grid-row:2;height:46px;min-height:46px;margin:0;padding:0 10px;border-radius:10px;font-size:16px!important;font-weight:600}
  .cloudbar>#role{display:none}
  .cloudbar>#saveStatus{grid-column:2;grid-row:1;max-width:none;font-size:12px;line-height:1.4;justify-self:end;text-align:right;color:#526569}
  #saveStatus[data-state=saved]::before{content:'✓ ';color:#17695f}
  #workspaceMenu{grid-column:2;grid-row:2;min-height:46px;height:46px;padding:0 8px;font-size:14px;border-radius:10px;background:#fff}
  .mobile-access{display:block;font-size:13px;line-height:1.5;margin:0 4px 6px;padding:8px 8px 12px;border-bottom:1px solid #e0e7dc;color:#526569}
  .mobile-access b{color:#173b31}
  .cloudbar>.barActions{width:250px}
  .breadcrumbs{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
  .breadcrumbs .desktop-name,.breadcrumbs .crumb-separator{display:none}
  .mobile-wordmark{display:inline-block;font-size:23px;line-height:1.2;font-weight:800;letter-spacing:-1px;color:#173c3c;white-space:nowrap}
  .mobile-wordmark>span{color:#9b6b3e}
  .breadcrumbs #crumb{font-size:14px;font-weight:600;color:#526569}
  .top-actions{grid-template-columns:44px minmax(0,1fr) auto;gap:8px;align-items:center}
  .top-actions #v2Mode{display:none}
  .top-actions #period.chip,.top-actions #billsBell,.top-actions #addTop{height:46px;min-height:46px;margin:0;border-radius:10px;box-sizing:border-box}
  .top-actions #period.chip{width:100%;font-size:16px!important;font-weight:600;line-height:1.25;padding:0 8px;color:#284047}
  .top-actions #billsBell{width:44px;min-width:44px;padding:10px}
  .top-actions #addTop{padding:0 11px;font-size:16px;line-height:1.25;font-weight:650;display:flex;align-items:center;justify-content:center;gap:4px}
  .budget-info{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:38px;margin:5px 0 0;color:#526569;font-size:13px;line-height:1.5}
  .budget-info>span{min-width:0;overflow-wrap:anywhere}
  .budget-info button{border:0;background:none;color:#17695f;padding:7px 0;font-size:13px;line-height:1.5;min-height:38px;text-decoration:underline;text-underline-offset:3px;white-space:normal;text-align:right}
  .sectionnote,.sub,.cat-sub,.cat-amount small,.debt-mini small,.activityrow small,.itemrow small,.card-details small,.household small,.hint,.v2-mini,.v2-field-help,.v2-method-row small,.bills-row small,.v2-note,.v2-banner,.v2-pane p,.v2-budget-help{font-size:14px;line-height:1.5}
  #overview>.heading .sub{font-size:14px}
  .cat-name,.activityrow strong,.debt-mini b,.household b,.itemrow b{font-size:15px;line-height:1.4}
  .cat-amount strong,.activityrow .amt,.debt-mini>b,.itemrow strong{font-size:16px}
  .bills-type-label,.bills-category-type,.v2-budget-period,.bills-entry-field>small,.mobile-pages nav small{font-size:13px;line-height:1.5}
  .v2-form label,.field,.bills-select,.bills-search-label,.bills-dialog .bills-details>label{font-size:14px;line-height:1.5}
  .v2-form input:not([type=checkbox]),.v2-form select,.field input,.field select,.bills-select select,.bills-details input,.bills-search-label input{width:100%;min-width:0;max-width:100%;height:46px;min-height:46px;border:1px solid var(--control-border);border-radius:10px;box-sizing:border-box;padding:0 12px;font-size:16px!important;line-height:1.4;font-weight:500;margin-top:7px}
  .field .amountinput{font-size:26px!important;font-weight:720}
  .date-field-control{height:46px;min-height:46px;margin-top:7px}
  .field .date-field-control>input[type=date],.v2-form .date-field-control>input[type=date],.bills-details .date-field-control>input[type=date]{width:100%;height:100%!important;min-height:0!important;margin:0!important;border:0!important}
  .metric label,.metric small{font-size:14px;line-height:1.5}.metric label{margin-bottom:8px;min-height:3em}.metric strong{font-size:20px;line-height:1.25}.metric{padding:14px 10px}.summary{align-items:stretch;margin:16px 0 0;gap:8px}
  .tile small,.tile span{font-size:14px}.v2-allocation-totals small{font-size:12px}.v2-allocation-totals strong{font-size:17px;line-height:1.4}
  .hero-label,.hero p{font-size:14px;line-height:1.5}.hero-top>span:last-child,.hero-pill,.hero-link{font-size:12px}.hero-top{flex-wrap:wrap}.hero-link{font-size:14px}.hero .big{line-height:1.1}
  .types button{font-size:14px;line-height:1.4}.form-actions button,.v2-actions button{font-size:15px}
  .sectionhead{gap:10px}.sectionhead button{font-size:14px}.v2-toolbar button{font-size:14px}.bills-row b{font-size:15px}.bills-row-actions button{font-size:13px;white-space:normal}.bills-row-actions{max-width:45%}
  .mobilebar button{font-size:12px}.mobile-pages nav small{font-size:14px}
}
@media(max-width:360px){
  #addTop .add-label{display:none}.top-actions #addTop{width:44px;padding:0;font-size:23px}
  .metric label,.metric small{font-size:14px}.metric strong{font-size:18px}.metric{padding:12px 8px}
}
.modal-panel,.v2-dialog{scrollbar-gutter:stable}
.sectionhead{gap:12px;align-items:flex-start}.sectionhead>div{min-width:0;flex:1}.sectionhead>button{flex:none;white-space:nowrap}

/* Summary rows share tracks so wrapped labels cannot shift the amounts. */
.summary{grid-template-rows:auto auto 1fr;row-gap:8px}
.summary>.metric{display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:8px;text-align:left}
.summary>.metric label{color:#17695f;font-weight:650;line-height:1.5;min-height:0;margin:0}
.summary>.metric strong{display:block;align-self:start;line-height:1.25}
.summary>.metric small{margin:0;align-self:start;line-height:1.5}
/* Keep projected income separate from the action; savings remains in its tile. */
.hero-bottom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.hero-pill{justify-self:start;max-width:100%;overflow-wrap:anywhere;line-height:1.5}
.hero-link{margin-left:0;justify-self:end;min-height:44px}
@media(max-width:960px){
  .hero-bottom{grid-template-columns:minmax(0,1fr);gap:6px}
  .hero-link{justify-self:start;text-align:left;padding:8px 0}
  .v2-actions.v2-actions--pay-schedule{grid-template-columns:minmax(0,1fr)}
  .v2-actions--pay-schedule>button{grid-column:1/-1;width:100%;min-height:48px;margin:0;padding:12px;line-height:1.4}
}
