/* Monitree 1.3.2 product system
   One typography, spacing, card and row language across every page.
   Loaded after the legacy stylesheet so future visual work has one home. */

:root{
  --mt-bg:#f5f7f4;
  --mt-surface:#ffffff;
  --mt-surface-soft:#fafbf8;
  --mt-ink:#17201a;
  --mt-muted:#647064;
  --mt-line:#dfe6dc;
  --mt-line-strong:#cfd9cc;
  --mt-shadow:0 12px 32px rgba(22,32,24,.055);
  --mt-shadow-hover:0 16px 40px rgba(22,32,24,.085);
  --mt-radius-lg:22px;
  --mt-radius-md:16px;
  --mt-radius-sm:12px;
  --mt-gap-page:16px;
  --mt-gap-section:14px;
  --mt-blue:#2563eb;
  --mt-blue-soft:#edf4ff;
  --mt-blue-line:#cbdcff;
  --mt-orange:#c96a08;
  --mt-orange-soft:#fff5e7;
  --mt-orange-line:#f2d4aa;
  --mt-green:#07875f;
  --mt-green-soft:#eaf8f2;
  --mt-green-line:#bfe8d7;
  --mt-slate:#46535b;
  --mt-slate-soft:#f0f3f4;
  --mt-slate-line:#d4dde0;
  --mt-danger:#b42318;
  --mt-danger-soft:#fff3f2;
  --mt-focus:0 0 0 3px rgba(37,99,235,.22);
}

html{background:var(--mt-bg);}
body{
  background:var(--mt-bg)!important;
  color:var(--mt-ink)!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  line-height:1.45!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,select,textarea{font:inherit;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:none!important;
  box-shadow:var(--mt-focus)!important;
}
[hidden]{display:none!important;}

/* Page isolation: no page can leak into another page, even when legacy classes set display:grid. */
.page{display:none!important;min-width:0;}
.page.active-page{display:grid!important;gap:var(--mt-gap-page)!important;}

.workspace{
  max-width:1440px!important;
  padding:24px 30px 44px!important;
}
.topbar{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:14px!important;
  margin-bottom:18px!important;
  padding-bottom:16px!important;
  border-bottom:1px solid var(--mt-line)!important;
}
.topbar-heading{min-width:0;}
.topbar .eyebrow{
  margin:0 0 3px!important;
  color:var(--mt-muted)!important;
  font-size:10.5px!important;
  line-height:1.2!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
  font-weight:800!important;
}
.topbar h2{
  margin:0!important;
  color:var(--mt-ink)!important;
  font-size:clamp(24px,2.2vw,31px)!important;
  line-height:1.08!important;
  letter-spacing:-.035em!important;
  font-weight:850!important;
}
.page-subtitle{
  margin:5px 0 0!important;
  color:var(--mt-muted)!important;
  font-size:13px!important;
  line-height:1.35!important;
  max-width:720px;
}
.page-date{
  display:block!important;
  margin-top:4px!important;
  color:#788376!important;
  font-size:11.5px!important;
  line-height:1.3!important;
}
.topbar-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;}

/* Navigation */
.sidebar{gap:18px!important;padding:20px!important;}
.nav{gap:5px!important;}
.nav-group-label{margin:8px 10px 2px!important;font-size:9.5px!important;letter-spacing:.12em!important;}
.nav-item{min-height:44px!important;border-radius:12px!important;padding:9px 11px!important;}
.nav-item span{font-size:13.5px!important;font-weight:750!important;}
.nav-item small{font-size:10.5px!important;line-height:1.15!important;}
.nav-item[aria-current="page"]{background:#233425!important;color:#fff!important;}
.sidebar-footer{padding:11px!important;border-radius:14px!important;}
.sidebar-version{display:block;margin-top:4px;font-size:10.5px!important;}

/* Shared content hierarchy */
.page-command-bar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  min-height:42px!important;
  padding:0 2px!important;
}
.page-command-bar p{
  margin:0!important;
  color:var(--mt-muted)!important;
  font-size:13px!important;
  line-height:1.4!important;
  max-width:760px!important;
}
.panel,
.review-card-final,
.handoff-section,
.income-person-section,
.category-bucket-section,
.budget-table-section{
  background:var(--mt-surface)!important;
  border:1px solid var(--mt-line)!important;
  border-radius:var(--mt-radius-lg)!important;
  box-shadow:var(--mt-shadow)!important;
}
.panel{padding:18px!important;}
.section-heading,
.section-heading-simple{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0 0 12px!important;
}
.section-heading>div,.section-heading-simple>div{min-width:0;}
.section-heading h3,
.section-heading-simple h3,
.panel>h3,
.help-card h3,
.data-action-card h3,
.data-rollover-card h3,
.data-guard-head h3{
  margin:0!important;
  color:var(--mt-ink)!important;
  font-size:18px!important;
  line-height:1.18!important;
  letter-spacing:-.022em!important;
  font-weight:820!important;
}
.section-heading p,
.section-heading-simple p,
.panel p,
.help-card li,
.data-action-card p,
.data-rollover-card p,
.data-guard-head p{
  margin:4px 0 0!important;
  color:var(--mt-muted)!important;
  font-size:12.7px!important;
  line-height:1.42!important;
}
.eyebrow{
  color:var(--mt-muted)!important;
  font-size:10px!important;
  line-height:1.2!important;
  letter-spacing:.09em!important;
  font-weight:820!important;
}
.info-dot{vertical-align:2px;}

/* Buttons and inputs */
.button,
.row-action{
  min-height:36px!important;
  border-radius:10px!important;
  padding:8px 12px!important;
  font-size:12.5px!important;
  line-height:1.1!important;
  font-weight:780!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
.button.primary{background:#17201a!important;color:#fff!important;box-shadow:none!important;}
.button.primary:hover{background:#243026!important;}
.button.secondary,.row-action{background:#fff!important;color:var(--mt-ink)!important;border:1px solid var(--mt-line-strong)!important;box-shadow:none!important;}
.button.secondary:hover,.row-action:hover{background:#f7f9f6!important;border-color:#bdc9ba!important;}
.button.compact,.row-action{min-height:32px!important;padding:7px 10px!important;font-size:12px!important;}
.row-action.delete-action{color:#8f241d!important;background:#fff!important;border-color:#e5c7c4!important;border-radius:10px!important;}
.row-action.delete-action:hover{background:var(--mt-danger-soft)!important;border-color:#d9a8a4!important;}
input,select,textarea{
  border:1px solid var(--mt-line-strong)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--mt-ink)!important;
  font-size:13.5px!important;
}
label>span,label{font-size:11px!important;line-height:1.25!important;color:var(--mt-muted)!important;}

/* Overview */
.dashboard-position-panel,.health-panel{margin:0!important;}
.position-grid-final{gap:12px!important;}
.position-card{
  border:1px solid var(--mt-line)!important;
  border-radius:18px!important;
  padding:16px!important;
  box-shadow:none!important;
  text-align:left!important;
}
.position-card:hover{transform:translateY(-1px);box-shadow:var(--mt-shadow-hover)!important;}
.position-card.income-position{background:linear-gradient(135deg,#fff 0%,var(--mt-blue-soft) 100%)!important;border-left:4px solid var(--mt-blue)!important;}
.position-card.budget-position{background:linear-gradient(135deg,#fff 0%,var(--mt-orange-soft) 100%)!important;border-left:4px solid var(--mt-orange)!important;}
.position-card.remainder-position{background:linear-gradient(135deg,#fff 0%,var(--mt-green-soft) 100%)!important;border-left:4px solid var(--mt-green)!important;}
.position-card-head span{font-size:10px!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:var(--mt-muted)!important;font-weight:800!important;}
.position-card-head strong{font-size:12.5px!important;color:var(--mt-muted)!important;font-weight:650!important;}
.position-values strong{font-size:clamp(20px,2vw,26px)!important;font-variant-numeric:tabular-nums;}
.section-grid.two-col{gap:14px!important;}

/* One summary system for Income, Categories and Budget */
.product-summary-grid,
.income-top-comp-grid,
.income-person-summary,
.category-overview-v39,
.budget-overview-v41{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}
.product-summary-card,
.income-comp-group,
.category-overview-card,
.budget-overview-card{
  --mt-accent:var(--mt-slate);
  --mt-soft:var(--mt-slate-soft);
  --mt-accent-line:var(--mt-slate-line);
  position:relative!important;
  min-width:0!important;
  min-height:122px!important;
  padding:14px 14px 13px 17px!important;
  border:1px solid var(--mt-accent-line)!important;
  border-left:4px solid var(--mt-accent)!important;
  border-radius:17px!important;
  background:linear-gradient(135deg,#fff 0%,var(--mt-soft) 100%)!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.product-summary-card::before,.income-comp-group::before,.category-overview-card::before,.budget-overview-card::before{display:none!important;content:none!important;}
.product-summary-card.needs,.category-overview-card.needs,.budget-overview-card.needs,.income-comp-group.baseline{--mt-accent:var(--mt-blue);--mt-soft:var(--mt-blue-soft);--mt-accent-line:var(--mt-blue-line);}
.product-summary-card.wants,.category-overview-card.wants,.budget-overview-card.wants,.income-comp-group.variable{--mt-accent:var(--mt-orange);--mt-soft:var(--mt-orange-soft);--mt-accent-line:var(--mt-orange-line);}
.product-summary-card.savings,.category-overview-card.savings,.budget-overview-card.savings,.income-comp-group.total{--mt-accent:var(--mt-green);--mt-soft:var(--mt-green-soft);--mt-accent-line:var(--mt-green-line);}
.product-summary-card.combined,.category-overview-card.combined,.budget-overview-card.combined,.income-comp-group.pension{--mt-accent:var(--mt-slate);--mt-soft:var(--mt-slate-soft);--mt-accent-line:var(--mt-slate-line);}
.product-summary-card>span,
.category-overview-card>span,
.budget-overview-card>span,
.income-comp-heading>span{
  display:block!important;
  color:var(--mt-muted)!important;
  font-size:10px!important;
  line-height:1.2!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
  font-weight:820!important;
}
.category-overview-card>strong,.budget-overview-card>strong{
  display:block!important;
  margin:8px 0 4px!important;
  color:var(--mt-ink)!important;
  font-size:clamp(20px,2vw,25px)!important;
  line-height:1.05!important;
  letter-spacing:-.025em!important;
  font-variant-numeric:tabular-nums!important;
}
.category-overview-card>small,.budget-overview-card>small,.income-comp-heading>small{
  color:var(--mt-muted)!important;
  font-size:11px!important;
  line-height:1.3!important;
}
.income-comp-pair,.income-pension-summary-row{border-radius:11px!important;padding:8px 9px!important;}
.income-comp-pair b,.income-pension-summary-row b{font-variant-numeric:tabular-nums!important;}
.context-note.income-guide-v30{margin:10px 0 0!important;padding:9px 11px!important;border-radius:12px!important;font-size:12px!important;}

/* One group system */
.income-person-list,.category-board,.budget-table-board{display:grid!important;gap:14px!important;}
.income-person-section,.category-bucket-section,.budget-table-section{
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
}
.product-group-header,
.income-person-header,
.category-bucket-banner,
.budget-table-headline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:0!important;
  padding:13px 15px!important;
  border:0!important;
  border-bottom:1px solid var(--mt-line)!important;
  background:var(--mt-surface-soft)!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.product-group-header h3,.income-person-header h3,.budget-table-headline h3,.category-bucket-banner strong{
  margin:0!important;
  color:var(--mt-ink)!important;
  font-size:16px!important;
  line-height:1.18!important;
  letter-spacing:-.015em!important;
  font-weight:800!important;
}
.product-group-header small,.income-person-header small,.category-bucket-banner small,.budget-table-headline span{
  color:var(--mt-muted)!important;
  font-size:11.5px!important;
  line-height:1.3!important;
  font-weight:600!important;
}
.income-person-summary{padding:12px 14px 14px!important;}
.income-source-list,.category-compact-list,.budget-table-body{display:grid!important;gap:8px!important;padding:0 12px 12px!important;}

/* One line-item surface and one rail */
.product-line-row,
.income-source-row-v66,
.category-row-compact,
.budget-row-v41,
.review-queue-row-v45,
.handoff-row-v47{
  --mt-row-accent:var(--mt-slate);
  --mt-row-soft:var(--mt-slate-soft);
  position:relative!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:11px 12px 11px 14px!important;
  border:1px solid var(--mt-line)!important;
  border-left:4px solid var(--mt-row-accent)!important;
  border-radius:15px!important;
  background:linear-gradient(105deg,var(--mt-row-soft) 0%,#fff 34%,#fff 100%)!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.product-line-row.needs,.category-row-compact.needs,.budget-row-v41.needs,.handoff-row-v47.needs{--mt-row-accent:var(--mt-blue);--mt-row-soft:var(--mt-blue-soft);}
.product-line-row.wants,.category-row-compact.wants,.budget-row-v41.wants,.handoff-row-v47.wants{--mt-row-accent:var(--mt-orange);--mt-row-soft:var(--mt-orange-soft);}
.product-line-row.savings,.category-row-compact.savings,.budget-row-v41.savings,.handoff-row-v47.savings{--mt-row-accent:var(--mt-green);--mt-row-soft:var(--mt-green-soft);}
.income-source-row-v66.income-core{--mt-row-accent:var(--mt-blue);--mt-row-soft:var(--mt-blue-soft);}
.income-source-row-v66.income-variable{--mt-row-accent:var(--mt-orange);--mt-row-soft:var(--mt-orange-soft);}
.product-line-row::before,.income-source-row-v66::before,.category-row-compact::before,.budget-row-v41::before,.handoff-row-v47::before,.review-queue-row-v45::before{display:none!important;content:none!important;}
.product-line-row:hover{border-color:var(--mt-line-strong)!important;box-shadow:0 8px 22px rgba(22,32,24,.05)!important;}
.product-line-row strong{color:var(--mt-ink)!important;font-size:14px!important;line-height:1.22!important;font-weight:780!important;}
.product-line-row small,.product-line-row p,.product-line-row em{color:var(--mt-muted)!important;font-size:11.5px!important;line-height:1.34!important;}
.record-actions{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  width:auto!important;
  min-width:max-content!important;
}

/* Income rows */
.income-source-row-v66{
  display:grid!important;
  grid-template-columns:minmax(235px,1.05fr) minmax(500px,2.55fr) auto!important;
  gap:12px!important;
  align-items:center!important;
}
.income-source-main{min-width:0!important;}
.income-source-main>div{min-width:0!important;}
.income-source-main small{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;margin-top:4px!important;}
.income-type-text{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.income-description-full{display:block!important;margin:5px 0 0!important;white-space:normal!important;overflow:visible!important;}
.income-line-values-v66{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(116px,1fr))!important;
  gap:8px!important;
  min-width:0!important;
}
.income-line-values-v66>section{
  min-width:0!important;
  min-height:68px!important;
  padding:8px 9px!important;
  border:1px solid rgba(217,226,214,.9)!important;
  border-radius:11px!important;
  background:rgba(255,255,255,.82)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.income-line-values-v66>section>span{
  color:var(--mt-muted)!important;
  font-size:9.5px!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  font-weight:820!important;
}
.income-line-values-v66>section>strong{margin:3px 0 1px!important;font-size:16px!important;font-variant-numeric:tabular-nums!important;}
.income-line-values-v66>section>small{font-size:10.5px!important;}
.income-pension-cell .pension-line{display:grid!important;grid-template-columns:auto 1fr!important;gap:6px!important;align-items:baseline!important;}
.income-pension-cell .pension-line b{text-align:right!important;white-space:nowrap!important;}

/* Category rows */
.category-tools{
  display:flex!important;
  align-items:end!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin:0!important;
  padding:12px!important;
  border:1px solid var(--mt-line)!important;
  border-radius:15px!important;
  background:var(--mt-surface)!important;
}
.category-tools label{width:min(220px,100%)!important;display:grid!important;gap:5px!important;}
.category-tools select{max-width:none!important;}
.category-row-compact{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(145px,.32fr) auto!important;
  gap:12px!important;
  align-items:center!important;
}
.category-identity{display:flex!important;align-items:flex-start!important;gap:10px!important;min-width:0!important;}
.category-identity>div{min-width:0!important;}
.cat-icon{width:32px!important;height:32px!important;min-width:32px!important;border-radius:10px!important;background:rgba(255,255,255,.78)!important;border:1px solid rgba(217,226,214,.9)!important;display:grid!important;place-items:center!important;font-size:16px!important;}
.category-description{display:block!important;margin-top:4px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.category-value{text-align:right!important;min-width:0!important;}
.category-value-line{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;}
.category-value strong{font-size:17px!important;font-variant-numeric:tabular-nums!important;white-space:nowrap!important;}
.category-value small{display:block!important;margin-top:2px!important;}

/* Budget filters and rows */
.budget-items-workbench{
  margin:0!important;
  padding:12px!important;
  border:1px solid var(--mt-line)!important;
  border-radius:16px!important;
  background:var(--mt-surface)!important;
  box-shadow:none!important;
}
.budget-toolbar{
  display:grid!important;
  grid-template-columns:minmax(240px,1.4fr) repeat(4,minmax(120px,.55fr)) auto!important;
  gap:8px!important;
  align-items:end!important;
  margin:0!important;
}
.budget-toolbar label{display:grid!important;gap:5px!important;min-width:0!important;}
.budget-filter-summary{margin-top:8px!important;}
.budget-table-section{padding:0 0 12px!important;}
.budget-table-header-v41,.budget-row-v41{
  grid-template-columns:minmax(260px,1.4fr) minmax(180px,.9fr) minmax(100px,.48fr) minmax(105px,.5fr) minmax(115px,.55fr) auto!important;
}
.budget-table-header-v41{
  display:grid!important;
  gap:12px!important;
  align-items:end!important;
  padding:9px 14px 7px 18px!important;
  color:var(--mt-muted)!important;
  font-size:9.5px!important;
  line-height:1.2!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
  font-weight:820!important;
}
.budget-table-header-v41 span:nth-child(3),.budget-table-header-v41 span:nth-child(4),.budget-table-header-v41 span:nth-child(5){text-align:right!important;}
.budget-row-v41{display:grid!important;gap:12px!important;align-items:center!important;}
.budget-cell{min-width:0!important;}
.budget-cell>strong{display:block!important;}
.paid-cell,.monthly-cell,.schedule-cell{text-align:right!important;}
.paid-cell strong,.monthly-cell strong{font-size:16px!important;font-variant-numeric:tabular-nums!important;white-space:nowrap!important;}
.bucket-token{flex:0 0 auto!important;}
.budget-item-title{min-width:0!important;}
.budget-item-title strong,.category-cell strong{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}

/* Review and Handoff */
.review-page-final,.handoff-page{display:grid!important;gap:14px!important;}
.review-card-final{padding:17px!important;}
.review-final-head{margin-bottom:12px!important;}
.review-scope-grid,.review-filter-grid,.handoff-progress-grid{gap:10px!important;}
.review-scope-card,.review-filter-tile,.handoff-progress-card{
  border:1px solid var(--mt-line)!important;
  border-radius:15px!important;
  background:var(--mt-surface-soft)!important;
  box-shadow:none!important;
}
.review-queue-row-v45{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;}
.review-row-actions-v45{display:flex!important;gap:6px!important;}
.handoff-section{padding:17px!important;}
.handoff-bucket-group{display:grid!important;gap:8px!important;}
.handoff-bucket-heading{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  padding:4px 2px!important;
  border:0!important;
  background:transparent!important;
}
.handoff-bucket-heading span{font-size:11px!important;text-transform:uppercase!important;letter-spacing:.07em!important;font-weight:820!important;color:var(--mt-muted)!important;}
.handoff-row-v47{display:grid!important;grid-template-columns:auto minmax(0,1fr) minmax(115px,.25fr)!important;gap:11px!important;align-items:center!important;}
.handoff-money{text-align:right!important;}

/* Data */
.data-page{gap:16px!important;}
.data-section{display:grid!important;gap:12px!important;}
.data-actions-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.data-action-card{
  min-height:154px!important;
  padding:15px!important;
  display:grid!important;
  grid-template-rows:1fr auto auto!important;
  gap:9px!important;
  border-radius:18px!important;
}
.data-action-card h3{font-size:16px!important;}
.data-action-card p{font-size:12px!important;}
.data-action-card .button{justify-self:start!important;}
.data-action-primary{background:linear-gradient(135deg,#fff 0%,var(--mt-green-soft) 100%)!important;border-color:var(--mt-green-line)!important;}
.data-support-grid{display:grid!important;grid-template-columns:minmax(0,1.55fr) minmax(230px,.45fr)!important;gap:10px!important;align-items:stretch!important;}
.data-health-card{padding:16px!important;}
.data-health-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
.data-rollover-card{padding:15px!important;display:flex!important;align-items:flex-start!important;gap:11px!important;min-height:0!important;}
.data-rollover-icon{width:34px;height:34px;min-width:34px;border-radius:11px;background:var(--mt-slate-soft);color:var(--mt-slate);display:grid;place-items:center;font-size:18px;}
.data-rollover-card h3{font-size:15px!important;}
.data-guard-card{padding:15px!important;background:var(--mt-surface-soft)!important;}
.data-guard-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;margin-bottom:10px!important;}
.data-guard-head h3{font-size:15px!important;}
.data-guard-actions{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:6px!important;}
.activity-dashboard-v58{display:grid!important;gap:8px!important;}
.activity-metrics-v61,.activity-metrics-v60,.activity-metrics-v58{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;}
.activity-metric-v61,.activity-metric-v60,.activity-metric-v58{min-width:0!important;padding:8px 9px!important;border-radius:12px!important;}
.activity-details-v61 summary,.activity-details-v60 summary{min-height:38px!important;padding:8px 10px!important;}
.activity-settings-form-v61,.activity-settings-form-v59{grid-template-columns:minmax(160px,.55fr) minmax(250px,1fr) auto!important;gap:9px!important;align-items:end!important;}
.activity-table-checks-v61,.activity-table-checks-v59{display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
.activity-table-checks-v61 label,.activity-table-checks-v59 label{border-radius:999px!important;min-height:32px!important;padding:6px 9px!important;}

/* Help */
.help-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;}
.help-card{padding:18px!important;min-height:0!important;}
.help-label{display:inline-flex!important;margin-bottom:8px!important;color:var(--mt-muted)!important;font-size:10px!important;letter-spacing:.09em!important;text-transform:uppercase!important;font-weight:820!important;}
.help-card ul{margin:11px 0 0!important;padding-left:18px!important;display:grid!important;gap:7px!important;}
.help-card li{margin:0!important;}

/* Footer */
.app-footer{
  margin-top:18px!important;
  padding-top:14px!important;
  border-top:1px solid var(--mt-line)!important;
  color:var(--mt-muted)!important;
  font-size:10.5px!important;
}

@media (max-width:1180px){
  .product-summary-grid,.income-top-comp-grid,.income-person-summary,.category-overview-v39,.budget-overview-v41{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .data-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .data-support-grid{grid-template-columns:1fr!important;}
  .income-source-row-v66{grid-template-columns:minmax(220px,1fr) minmax(360px,1.6fr)!important;}
  .income-source-row-v66 .record-actions{grid-column:1/-1!important;justify-content:flex-end!important;}
  .income-line-values-v66{grid-template-columns:repeat(2,minmax(120px,1fr))!important;}
  .budget-toolbar{grid-template-columns:minmax(220px,1fr) repeat(2,minmax(130px,.5fr))!important;}
  .budget-toolbar .clear-filter-btn{justify-self:start!important;}
  .budget-table-header-v41,.budget-row-v41{grid-template-columns:minmax(230px,1.2fr) minmax(160px,.8fr) minmax(95px,.45fr) minmax(100px,.48fr) minmax(105px,.5fr) auto!important;}
  .help-grid{grid-template-columns:1fr!important;}
}

@media (max-width:900px){
  .workspace{padding:18px 20px 36px!important;}
  .topbar{grid-template-columns:auto minmax(0,1fr)!important;}
  .topbar-actions{grid-column:1/-1!important;justify-content:flex-start!important;}
  .section-grid.two-col{grid-template-columns:1fr!important;}
  .category-row-compact{grid-template-columns:minmax(0,1fr) auto!important;}
  .category-row-compact .record-actions{grid-column:1/-1!important;justify-content:flex-end!important;}
  .budget-table-header-v41{display:none!important;}
  .budget-row-v41{grid-template-columns:minmax(0,1.4fr) minmax(150px,.7fr) auto!important;align-items:start!important;}
  .budget-row-v41 .paid-cell,.budget-row-v41 .monthly-cell,.budget-row-v41 .schedule-cell{text-align:left!important;}
  .budget-row-v41 .paid-cell{grid-column:1;}
  .budget-row-v41 .monthly-cell{grid-column:2;}
  .budget-row-v41 .schedule-cell{grid-column:2;grid-row:2;}
  .budget-row-v41 .record-actions{grid-column:3;grid-row:1/span 2;}
  .activity-settings-form-v61,.activity-settings-form-v59{grid-template-columns:1fr 1fr!important;}
}

@media (max-width:760px){
  .workspace{padding:14px 14px 30px!important;}
  .topbar{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:10px!important;margin-bottom:14px!important;padding-bottom:12px!important;}
  .topbar h2{font-size:24px!important;}
  .page-subtitle{font-size:12.5px!important;}
  .topbar-actions{display:grid!important;grid-template-columns:1fr auto 1fr!important;width:100%!important;}
  .topbar-actions .button,.topbar-actions .cloud-pill{min-width:0!important;width:100%!important;}
  .page-command-bar{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;}
  .page-command-bar .button{width:100%!important;}
  .panel,.review-card-final,.handoff-section,.income-person-section,.category-bucket-section,.budget-table-section{border-radius:18px!important;}
  .panel{padding:14px!important;}
  .section-heading,.section-heading-simple{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;}
  .product-summary-grid,.income-top-comp-grid,.income-person-summary,.category-overview-v39,.budget-overview-v41{grid-template-columns:1fr!important;}
  .product-summary-card,.income-comp-group,.category-overview-card,.budget-overview-card{min-height:0!important;padding:13px 13px 12px 16px!important;}
  .product-group-header,.income-person-header,.category-bucket-banner,.budget-table-headline{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;padding:12px 13px!important;}
  .income-person-summary{padding:10px!important;}
  .income-source-list,.category-compact-list,.budget-table-body{padding:0 9px 9px!important;}
  .income-source-row-v66,.category-row-compact,.budget-row-v41,.review-queue-row-v45,.handoff-row-v47{grid-template-columns:1fr!important;gap:8px!important;padding:10px 10px 10px 13px!important;}
  .income-line-values-v66{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .record-actions,.income-source-row-v66 .record-actions,.category-row-compact .record-actions,.budget-row-v41 .record-actions{grid-column:auto!important;grid-row:auto!important;justify-content:flex-start!important;width:100%!important;min-width:0!important;}
  .record-actions .row-action{flex:1 1 auto!important;}
  .category-value{text-align:left!important;}
  .category-value-line{justify-content:flex-start!important;}
  .category-tools{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;}
  .category-tools label{width:100%!important;}
  .budget-toolbar{grid-template-columns:1fr!important;}
  .budget-row-v41 .paid-cell,.budget-row-v41 .monthly-cell,.budget-row-v41 .schedule-cell{grid-column:auto!important;grid-row:auto!important;text-align:left!important;}
  .handoff-money{text-align:left!important;}
  .data-actions-grid,.data-health-list,.activity-metrics-v61,.activity-metrics-v60,.activity-metrics-v58{grid-template-columns:1fr!important;}
  .data-action-card{min-height:0!important;}
  .data-action-card .button{width:100%!important;justify-self:stretch!important;}
  .data-guard-head{display:grid!important;grid-template-columns:1fr!important;}
  .data-guard-actions{display:grid!important;grid-template-columns:1fr!important;}
  .data-guard-actions .button,.data-guard-actions a{width:100%!important;}
  .activity-settings-form-v61,.activity-settings-form-v59{grid-template-columns:1fr!important;}
  .activity-table-checks-v61,.activity-table-checks-v59{display:grid!important;grid-template-columns:1fr!important;}
  .activity-table-checks-v61 label,.activity-table-checks-v59 label{border-radius:10px!important;}
  .review-row-actions-v45{width:100%!important;}
  .review-row-actions-v45 .button{flex:1!important;}
  .app-footer{display:grid!important;gap:3px!important;text-align:center!important;}
}

@media (max-width:460px){
  .income-line-values-v66{grid-template-columns:1fr!important;}
  .topbar-actions{grid-template-columns:1fr 64px 1fr!important;}
}


/* Monitree 1.3.2 consolidated visual system
   Summary cards use colour through borders and soft fills, never a left rail.
   Detailed records use exactly one semantic rail and one shared metric language. */
:root{
  --mt-record-radius:14px;
  --mt-record-gap:4px;
  --mt-record-rail:3px;
  --mt-record-shadow:0 2px 8px rgba(22,32,24,.032);
  --mt-record-shadow-hover:0 7px 18px rgba(22,32,24,.06);
  --mt-metric-bg:rgba(255,255,255,.74);
  --mt-metric-line:rgba(214,224,211,.84);
}

/* Remove every legacy pseudo rail before defining the one canonical record rail. */
.position-card::before,
.position-card::after,
.income-comp-group::before,
.income-comp-group::after,
.category-overview-card::before,
.category-overview-card::after,
.budget-overview-card::before,
.budget-overview-card::after,
.income-source-row::before,
.income-source-row::after,
.category-row-compact::before,
.category-row-compact::after,
.budget-row-v41::before,
.budget-row-v41::after,
.category-bucket-section::before,
.category-bucket-section::after,
.budget-table-section::before,
.budget-table-section::after,
.category-bucket-banner::before,
.category-bucket-banner::after,
.budget-table-headline::before,
.budget-table-headline::after{
  content:none!important;
  display:none!important;
  width:0!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Summary cards: no vertical rails. Colour comes from a quiet border and wash. */
.position-card,
.income-comp-group.product-summary-card,
.category-overview-card.product-summary-card,
.budget-overview-card.product-summary-card{
  border-left-width:1px!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.position-card.income-position,
.income-comp-group.baseline,
.category-overview-card.needs,
.budget-overview-card.needs{
  --mt-summary-soft:rgba(239,246,255,.9);
  --mt-summary-line:#bdd3ff;
  background:linear-gradient(135deg,var(--mt-summary-soft) 0%,rgba(255,255,255,.98) 88%)!important;
  border-color:var(--mt-summary-line)!important;
}
.position-card.budget-position,
.income-comp-group.variable,
.category-overview-card.wants,
.budget-overview-card.wants{
  --mt-summary-soft:rgba(255,247,237,.92);
  --mt-summary-line:#f2c68e;
  background:linear-gradient(135deg,var(--mt-summary-soft) 0%,rgba(255,255,255,.98) 88%)!important;
  border-color:var(--mt-summary-line)!important;
}
.position-card.remainder-position,
.income-comp-group.total,
.category-overview-card.savings,
.budget-overview-card.savings{
  --mt-summary-soft:rgba(240,253,244,.92);
  --mt-summary-line:#b9e6d2;
  background:linear-gradient(135deg,var(--mt-summary-soft) 0%,rgba(255,255,255,.98) 88%)!important;
  border-color:var(--mt-summary-line)!important;
}
.income-comp-group.pension,
.category-overview-card.combined,
.budget-overview-card.combined{
  --mt-summary-soft:rgba(246,248,249,.96);
  --mt-summary-line:#d3dde0;
  background:linear-gradient(135deg,var(--mt-summary-soft) 0%,#fff 88%)!important;
  border-color:var(--mt-summary-line)!important;
}
.product-summary-grid,
.income-top-comp-grid,
.income-person-summary,
.category-overview-v39,
.budget-overview-v41{
  gap:9px!important;
}
.product-summary-card,
.income-comp-group,
.category-overview-card,
.budget-overview-card{
  min-height:118px!important;
  padding:14px!important;
  border-radius:16px!important;
}

/* Overview cards follow the same rail-free summary treatment. */
.position-grid-final{
  grid-template-columns:minmax(0,1.12fr) minmax(0,1.12fr) minmax(210px,.72fr)!important;
  gap:10px!important;
}
.position-card{padding:15px!important;border-radius:17px!important;}
.position-card,.position-values,.position-values>div{min-width:0!important;}
.position-values strong{
  font-size:clamp(18px,1.55vw,24px)!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  letter-spacing:-.02em!important;
}
.position-values small{white-space:nowrap!important;}

/* Group shells are neutral. The small token carries semantic context once. */
.income-person-list,.category-board,.budget-table-board{gap:12px!important;}
.income-person-section,.category-bucket-section,.budget-table-section{
  margin:0!important;
  padding:0!important;
  border:1px solid var(--mt-line)!important;
  border-left:1px solid var(--mt-line)!important;
  border-radius:var(--mt-radius-lg)!important;
  overflow:hidden!important;
  background:var(--mt-surface)!important;
  box-shadow:var(--mt-shadow)!important;
}
.income-person-title,
.category-bucket-section>.category-bucket-banner,
.budget-table-section>.budget-table-headline{
  padding:12px 14px!important;
  border:0!important;
  border-bottom:1px solid var(--mt-line)!important;
  background:var(--mt-surface-soft)!important;
  box-shadow:none!important;
}
.category-bucket-section>.category-bucket-banner,
.budget-table-section>.budget-table-headline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.category-bucket-banner>div,
.budget-table-headline>div{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
.category-bucket-banner>div>span,
.bucket-heading-token{
  width:27px!important;
  height:27px!important;
  min-width:27px!important;
  display:inline-grid!important;
  place-items:center!important;
  border-radius:8px!important;
  border:1px solid var(--mt-line-strong)!important;
  background:#fff!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:850!important;
}
.category-bucket-section.needs .category-bucket-banner>div>span,
.budget-table-section.needs .bucket-heading-token{color:var(--mt-blue)!important;border-color:var(--mt-blue-line)!important;background:var(--mt-blue-soft)!important;}
.category-bucket-section.wants .category-bucket-banner>div>span,
.budget-table-section.wants .bucket-heading-token{color:var(--mt-orange)!important;border-color:var(--mt-orange-line)!important;background:var(--mt-orange-soft)!important;}
.category-bucket-section.savings .category-bucket-banner>div>span,
.budget-table-section.savings .bucket-heading-token{color:var(--mt-green)!important;border-color:var(--mt-green-line)!important;background:var(--mt-green-soft)!important;}
.category-bucket-banner small,
.budget-table-headline small{white-space:nowrap!important;text-align:right!important;}

/* Income person header is always title then summary, never a compressed split. */
.income-person-header.product-group-header,
.income-person-header-v65,
.income-person-header-v66{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  padding:0!important;
  background:var(--mt-surface)!important;
}
.income-person-title{
  display:flex!important;
  align-items:baseline!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
.income-person-title h3,.income-person-title small{margin:0!important;}
.income-person-summary,
.income-person-summary-v65,
.income-person-summary-v66,
.income-person-summary-v67,
.income-person-summary-v68,
.income-person-summary-v70,
.income-person-summary-v120{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
  padding:11px 12px 12px!important;
  margin:0!important;
}

/* One line-item shell. This is the only place a semantic left rail is used. */
.income-source-list,.category-compact-list,.budget-table-body{
  display:grid!important;
  gap:var(--mt-record-gap)!important;
  padding:0 9px 9px!important;
}
article.income-source-row.income-source-row-v66.product-line-row,
article.category-row-compact.product-line-row,
article.budget-row-v41.product-line-row{
  --mt-record-accent:var(--mt-slate);
  --mt-record-wash:rgba(245,247,248,.68);
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  border:1px solid var(--mt-line)!important;
  border-left:var(--mt-record-rail) solid var(--mt-record-accent)!important;
  border-radius:var(--mt-record-radius)!important;
  background:linear-gradient(100deg,var(--mt-record-wash) 0%,rgba(255,255,255,.96) 42%,#fff 100%)!important;
  box-shadow:var(--mt-record-shadow)!important;
  overflow:hidden!important;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
article.income-source-row.income-source-row-v66.product-line-row.income-core,
article.category-row-compact.product-line-row.needs,
article.budget-row-v41.product-line-row.needs{
  --mt-record-accent:var(--mt-blue);
  --mt-record-wash:rgba(239,246,255,.78);
}
article.income-source-row.income-source-row-v66.product-line-row.income-variable,
article.category-row-compact.product-line-row.wants,
article.budget-row-v41.product-line-row.wants{
  --mt-record-accent:var(--mt-orange);
  --mt-record-wash:rgba(255,247,237,.8);
}
article.category-row-compact.product-line-row.savings,
article.budget-row-v41.product-line-row.savings{
  --mt-record-accent:var(--mt-green);
  --mt-record-wash:rgba(240,253,244,.8);
}
article.income-source-row.income-source-row-v66.product-line-row:hover,
article.category-row-compact.product-line-row:hover,
article.budget-row-v41.product-line-row:hover{
  border-color:var(--mt-line-strong)!important;
  border-left-color:var(--mt-record-accent)!important;
  box-shadow:var(--mt-record-shadow-hover)!important;
  transform:translateY(-1px)!important;
}

/* Shared content hierarchy inside records. */
.record-identity{min-width:0!important;}
.record-identity strong,
.budget-item-title strong,
.category-title-line strong{
  color:var(--mt-ink)!important;
  font-size:14px!important;
  line-height:1.22!important;
  font-weight:800!important;
}
.record-identity small,
.record-context small,
.budget-cell small{
  color:var(--mt-muted)!important;
  font-size:10.75px!important;
  line-height:1.3!important;
}
.record-metric{
  min-width:0!important;
  min-height:58px!important;
  padding:7px 9px!important;
  border:1px solid var(--mt-metric-line)!important;
  border-radius:10px!important;
  background:var(--mt-metric-bg)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  box-shadow:none!important;
}
.record-metric>span,
.record-metric-label{
  color:var(--mt-muted)!important;
  font-size:9.25px!important;
  line-height:1.15!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  font-weight:820!important;
}
.record-metric>strong,
.record-metric .category-value-line strong{
  margin:3px 0 1px!important;
  color:var(--mt-ink)!important;
  font-size:15.5px!important;
  line-height:1.15!important;
  font-variant-numeric:tabular-nums!important;
  white-space:nowrap!important;
}
.record-actions{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  width:auto!important;
  min-width:max-content!important;
}
.income-source-row-v66 .row-action,
.category-row-compact .row-action,
.budget-row-v41 .row-action{
  min-height:30px!important;
  padding:6px 9px!important;
  border-radius:9px!important;
  font-size:11.5px!important;
  line-height:1!important;
}
.subtle-copy{
  width:23px!important;
  height:23px!important;
  min-width:23px!important;
  padding:0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  opacity:.55!important;
  font-size:12px!important;
  line-height:1!important;
  box-shadow:none!important;
}
.subtle-copy:hover,.subtle-copy:focus-visible{opacity:1!important;background:rgba(255,255,255,.86)!important;}

/* Income records: richer metrics, same shell. */
.income-source-row.income-source-row-v66.product-line-row{
  display:grid!important;
  grid-template-columns:minmax(270px,1.15fr) minmax(0,1.85fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  padding:10px 11px 10px 13px!important;
}
.income-source-main{min-width:0!important;}
.income-source-main small{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;margin-top:4px!important;}
.income-type-text{display:inline!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.income-description-full{display:block!important;margin:4px 0 0!important;white-space:normal!important;overflow:visible!important;}
.income-source-row-v66 .income-line-values,
.income-source-row-v66 .income-line-values-v65,
.income-source-row-v66 .income-line-values-v66{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(112px,1fr))!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
}
.income-line-values-v66>section{min-height:58px!important;}
.income-pension-cell .pension-line{display:grid!important;grid-template-columns:auto 1fr!important;gap:6px!important;align-items:baseline!important;}
.income-pension-cell .pension-line b{text-align:right!important;white-space:nowrap!important;}
.income-source-row-v66 .income-actions.record-actions{justify-self:end!important;}

/* Category records: same shell and metric surface, without repeating N/W/S in every title. */
.category-row-compact.product-line-row{
  display:grid!important;
  grid-template-columns:minmax(300px,1fr) 148px auto!important;
  gap:10px!important;
  align-items:center!important;
  padding:9px 10px 9px 12px!important;
}
.category-identity{display:flex!important;align-items:flex-start!important;gap:9px!important;min-width:0!important;}
.category-identity>div{min-width:0!important;}
.category-title-line{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;}
.category-title-line strong{min-width:0!important;overflow-wrap:anywhere!important;}
.category-row-compact .cat-icon{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.78)!important;
  border:1px solid var(--mt-metric-line)!important;
  display:grid!important;
  place-items:center!important;
  font-size:16px!important;
}
.category-description{display:block!important;margin-top:3px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.category-value{text-align:left!important;}
.category-value-line{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:4px!important;}
.category-value.record-metric{min-height:58px!important;}

/* Budget records: same shell and metric surfaces, with a precise shared grid. */
.budget-table-header-v41,
.budget-row-v41.product-line-row{
  grid-template-columns:minmax(270px,1.38fr) minmax(175px,.88fr) minmax(96px,.45fr) minmax(102px,.48fr) minmax(108px,.52fr) auto!important;
  column-gap:9px!important;
}
.budget-table-header-v41{
  display:grid!important;
  align-items:end!important;
  padding:8px 10px 6px 13px!important;
  color:var(--mt-muted)!important;
  font-size:9.25px!important;
  line-height:1.2!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  font-weight:820!important;
}
.budget-table-header-v41 span{min-width:0!important;text-align:left!important;}
.budget-row-v41.product-line-row{
  display:grid!important;
  align-items:center!important;
  row-gap:4px!important;
  padding:8px 9px 8px 11px!important;
}
.budget-cell{min-width:0!important;}
.budget-cell>strong{display:block!important;}
.budget-item-title strong,.category-cell strong{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.category-cell.record-context{padding:0 2px!important;}
.paid-cell,.monthly-cell,.schedule-cell{text-align:left!important;}
.paid-cell strong,.monthly-cell strong{font-size:15px!important;}
.budget-row-v41 .record-metric{min-height:54px!important;padding:6px 8px!important;}

/* Existing operational layout fixes retained in one place. */
.data-support-grid{grid-template-columns:minmax(0,1.65fr) minmax(240px,.5fr)!important;align-items:start!important;}
.data-health-card,.data-rollover-card{grid-column:auto!important;width:auto!important;max-width:none!important;}
.data-rollover-card{align-self:start!important;min-height:0!important;}
.data-health-list .health-line{
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(120px,.4fr) minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
  padding:10px 11px!important;
  border:1px solid var(--mt-line)!important;
  border-radius:12px!important;
  background:var(--mt-surface-soft)!important;
}
.data-health-list .health-label{min-width:0!important;font-size:11px!important;font-weight:780!important;color:var(--mt-muted)!important;line-height:1.35!important;}
.data-health-list .health-detail{min-width:0!important;text-align:left!important;font-size:12.5px!important;font-weight:650!important;color:var(--mt-ink)!important;line-height:1.4!important;overflow-wrap:anywhere!important;}
.page-actions-only{min-height:0!important;justify-content:flex-end!important;padding:0!important;margin-top:-2px!important;}

@media(max-width:1180px){
  .income-person-summary,
  .income-person-summary-v65,
  .income-person-summary-v66,
  .income-person-summary-v67,
  .income-person-summary-v68,
  .income-person-summary-v70,
  .income-person-summary-v120{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .income-source-row.income-source-row-v66.product-line-row{grid-template-columns:1fr!important;}
  .income-source-row-v66 .income-actions.record-actions{justify-self:start!important;}
  .budget-table-header-v41,.budget-row-v41.product-line-row{
    grid-template-columns:minmax(230px,1.2fr) minmax(155px,.76fr) minmax(92px,.43fr) minmax(98px,.46fr) minmax(102px,.48fr) auto!important;
  }
  .data-support-grid{grid-template-columns:1fr!important;}
}

@media(max-width:900px){
  .position-grid-final{grid-template-columns:1fr!important;}
  .position-values strong{font-size:22px!important;}
  .category-row-compact.product-line-row{grid-template-columns:minmax(0,1fr) 145px!important;}
  .category-row-compact .record-actions{grid-column:1/-1!important;justify-content:flex-start!important;}
  .budget-table-header-v41{display:none!important;}
  .budget-row-v41.product-line-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;}
  .budget-row-v41 .item-name-cell,.budget-row-v41 .category-cell,.budget-row-v41 .record-actions{grid-column:1/-1!important;}
  .budget-row-v41 .schedule-cell{grid-column:1/-1!important;}
  .budget-row-v41 .record-actions{justify-content:flex-start!important;}
}

@media(max-width:760px){
  .product-summary-grid,.income-top-comp-grid,.income-person-summary,.category-overview-v39,.budget-overview-v41{gap:7px!important;}
  .product-summary-card,.income-comp-group,.category-overview-card,.budget-overview-card{min-height:0!important;padding:12px!important;}
  .income-person-title{display:grid!important;gap:3px!important;}
  .income-person-summary,
  .income-person-summary-v65,
  .income-person-summary-v66,
  .income-person-summary-v67,
  .income-person-summary-v68,
  .income-person-summary-v70,
  .income-person-summary-v120{grid-template-columns:1fr!important;padding:9px!important;}
  .income-source-list,.category-compact-list,.budget-table-body{gap:4px!important;padding:0 7px 7px!important;}
  article.income-source-row.income-source-row-v66.product-line-row,
  article.category-row-compact.product-line-row,
  article.budget-row-v41.product-line-row{padding:9px 9px 9px 11px!important;}
  .income-line-values-v66{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .income-source-row-v66 .income-actions.record-actions,
  .category-row-compact .category-actions-inline.record-actions,
  .budget-row-v41 .budget-row-actions.record-actions{
    display:flex!important;
    width:auto!important;
    min-width:0!important;
    justify-self:start!important;
    justify-content:flex-start!important;
    gap:6px!important;
    grid-column:1/-1!important;
  }
  .income-source-row-v66 .income-actions.record-actions .row-action,
  .category-row-compact .category-actions-inline.record-actions .row-action,
  .budget-row-v41 .budget-row-actions.record-actions .row-action{width:auto!important;min-width:0!important;flex:0 0 auto!important;}
  .category-row-compact.product-line-row{grid-template-columns:1fr!important;}
  .category-value.record-metric{width:100%!important;}
  .category-bucket-section>.category-bucket-banner,
  .budget-table-section>.budget-table-headline{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;}
  .category-bucket-banner small,.budget-table-headline small{text-align:left!important;white-space:normal!important;}
  .budget-row-v41.product-line-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .budget-row-v41 .item-name-cell,.budget-row-v41 .category-cell,.budget-row-v41 .schedule-cell,.budget-row-v41 .record-actions{grid-column:1/-1!important;}
  .data-health-list .health-line{grid-template-columns:1fr!important;gap:3px!important;}
  .page-actions-only{display:flex!important;justify-content:stretch!important;}
  .page-actions-only .button{width:100%!important;}
  .topbar-actions{grid-template-columns:minmax(0,1fr) 72px!important;gap:6px!important;}
  #privacyToggleBtn{grid-column:1!important;grid-row:1!important;}
  #currencySelect{grid-column:2!important;grid-row:1!important;}
  #refreshCloudBtn{grid-column:1/-1!important;grid-row:2!important;min-height:32px!important;}
}

@media(max-width:460px){
  .income-line-values-v66{grid-template-columns:1fr!important;}
}

/* 1.3.2 legacy conflict lock
   The legacy stylesheet contains highly specific release selectors. These rules
   lock the final computed result without adding a second visual system. */
.income-dashboard-v120 .income-comp-group::before,
.income-person-summary-v120 .income-comp-group::before,
.category-overview-v39 .category-overview-card::before,
.budget-overview-v41 .budget-overview-card::before{
  content:none!important;
  display:none!important;
  width:0!important;
  background:transparent!important;
}

.income-dashboard-v120 .income-comp-group.baseline,
.income-person-summary-v120 .income-comp-group.baseline,
.category-overview-v39 .category-overview-card.needs,
.budget-overview-v41 .budget-overview-card.needs{
  background:linear-gradient(135deg,rgba(239,246,255,.9) 0%,rgba(255,255,255,.98) 88%)!important;
  border:1px solid #bdd3ff!important;
}
.income-dashboard-v120 .income-comp-group.variable,
.income-person-summary-v120 .income-comp-group.variable,
.category-overview-v39 .category-overview-card.wants,
.budget-overview-v41 .budget-overview-card.wants{
  background:linear-gradient(135deg,rgba(255,247,237,.92) 0%,rgba(255,255,255,.98) 88%)!important;
  border:1px solid #f2c68e!important;
}
.income-dashboard-v120 .income-comp-group.total,
.income-person-summary-v120 .income-comp-group.total,
.category-overview-v39 .category-overview-card.savings,
.budget-overview-v41 .budget-overview-card.savings{
  background:linear-gradient(135deg,rgba(240,253,244,.92) 0%,rgba(255,255,255,.98) 88%)!important;
  border:1px solid #b9e6d2!important;
}
.income-dashboard-v120 .income-comp-group.pension,
.income-person-summary-v120 .income-comp-group.pension,
.category-overview-v39 .category-overview-card.combined,
.budget-overview-v41 .budget-overview-card.combined{
  background:linear-gradient(135deg,rgba(246,248,249,.96) 0%,#fff 88%)!important;
  border:1px solid #d3dde0!important;
}

.category-bucket-section.needs>.category-bucket-banner,
.category-bucket-section.wants>.category-bucket-banner,
.category-bucket-section.savings>.category-bucket-banner,
.budget-table-section.needs>.budget-table-headline,
.budget-table-section.wants>.budget-table-headline,
.budget-table-section.savings>.budget-table-headline{
  background:var(--mt-surface-soft)!important;
  border-bottom:1px solid var(--mt-line)!important;
}

article.category-row-compact.product-line-row.needs,
article.budget-row-v41.product-line-row.needs{
  background:linear-gradient(100deg,rgba(239,246,255,.78) 0%,rgba(255,255,255,.96) 42%,#fff 100%)!important;
  border-left-color:var(--mt-blue)!important;
}
article.category-row-compact.product-line-row.wants,
article.budget-row-v41.product-line-row.wants{
  background:linear-gradient(100deg,rgba(255,247,237,.8) 0%,rgba(255,255,255,.96) 42%,#fff 100%)!important;
  border-left-color:var(--mt-orange)!important;
}
article.category-row-compact.product-line-row.savings,
article.budget-row-v41.product-line-row.savings{
  background:linear-gradient(100deg,rgba(240,253,244,.8) 0%,rgba(255,255,255,.96) 42%,#fff 100%)!important;
  border-left-color:var(--mt-green)!important;
}

article.category-row-compact.product-line-row .category-value.record-metric,
article.budget-row-v41.product-line-row .budget-cell.record-metric,
article.income-source-row.income-source-row-v66.product-line-row .income-line-values-v66>section.record-metric{
  min-width:0!important;
  min-height:54px!important;
  padding:7px 9px!important;
  border:1px solid var(--mt-metric-line)!important;
  border-radius:10px!important;
  background:var(--mt-metric-bg)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  text-align:left!important;
  box-shadow:none!important;
}
article.category-row-compact.product-line-row .category-value.record-metric{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}
article.budget-row-v41.product-line-row .budget-cell.record-metric strong,
article.budget-row-v41.product-line-row .budget-cell.record-metric small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* 1.3.2 text-fit lock: metadata may wrap, but never clips or overlaps. */
.income-source-row-v66 .income-source-main small,
.income-source-row.refined-income-row .income-source-main small{
  flex-wrap:wrap!important;
  white-space:normal!important;
  overflow:visible!important;
}
.income-source-row-v66 .income-type-text,
.income-source-row.refined-income-row .income-type-text{
  display:inline!important;
  max-width:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.income-comp-pair small,
.income-pension-summary-row small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* 1.3.2 rail audit: overview and progress surfaces use colour without a rail. */
.dashboard-position-panel .position-card::before,
.dashboard-position-panel .position-card::after,
.attention-summary-card::before,
.attention-summary-card::after,
.bucket-card::before,
.bucket-card::after,
.category-summary-bucket::before,
.category-summary-bucket::after,
.handoff-progress-card::before,
.handoff-progress-card::after{
  content:none!important;
  display:none!important;
  width:0!important;
  min-width:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
.dashboard-position-panel .position-card{
  border-left-width:1px!important;
  box-shadow:none!important;
}
.attention-summary-card,
.bucket-card,
.category-summary-bucket,
.handoff-progress-card{
  border-left-width:1px!important;
}
.income-dashboard-v120 .income-comp-group,
.income-person-summary-v120 .income-comp-group,
.income-dashboard-v120 .income-comp-group.pension,
.income-person-summary-v120 .income-comp-group.pension{
  border-left-width:1px!important;
  box-shadow:none!important;
}

/* Review and Handoff records use the same single border rail as core records. */
.review-queue-row-v45,
.handoff-row-v47{
  --mt-record-accent:var(--mt-slate);
  --mt-record-wash:rgba(245,247,248,.68);
  border:1px solid var(--mt-line)!important;
  border-left:var(--mt-record-rail) solid var(--mt-record-accent)!important;
  border-radius:var(--mt-record-radius)!important;
  background:linear-gradient(100deg,var(--mt-record-wash) 0%,rgba(255,255,255,.96) 42%,#fff 100%)!important;
  box-shadow:var(--mt-record-shadow)!important;
}
.review-queue-row-v45.income-core,
.review-queue-row-v45.needs,
.handoff-row-v47.needs{--mt-record-accent:var(--mt-blue);--mt-record-wash:rgba(239,246,255,.78);}
.review-queue-row-v45.wants,
.handoff-row-v47.wants{--mt-record-accent:var(--mt-orange);--mt-record-wash:rgba(255,247,237,.8);}
.review-queue-row-v45.savings,
.handoff-row-v47.savings{--mt-record-accent:var(--mt-green);--mt-record-wash:rgba(240,253,244,.8);}
.review-queue-row-v45::before,
.review-queue-row-v45::after,
.handoff-row-v47::before,
.handoff-row-v47::after{
  content:none!important;
  display:none!important;
  width:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Exact legacy pseudo selectors: summary surfaces never carry a left rail. */
.position-card.income-position::before,
.position-card.budget-position::before,
.position-card.remainder-position::before,
.attention-summary-card.attention::before,
.attention-summary-card.clear::before,
.attention-summary-card.needs::before,
.attention-summary-card.wants::before,
.attention-summary-card.savings::before,
.bucket-card.needs::before,
.bucket-card.wants::before,
.bucket-card.savings::before,
.category-summary-bucket.needs::before,
.category-summary-bucket.wants::before,
.category-summary-bucket.savings::before,
.handoff-v1247 .handoff-progress-card::before{
  content:none!important;
  display:none!important;
  width:0!important;
  min-width:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

/* Pension metric reserves enough width for employee and employer values. */
.income-line-values-v66:has(.income-pension-cell){
  grid-template-columns:repeat(3,minmax(105px,1fr)) minmax(138px,1.2fr)!important;
}
.income-pension-cell .pension-line em,
.income-pension-cell .pension-line b{
  font-size:9.75px!important;
  line-height:1.2!important;
}
@media(max-width:1180px){
  .income-line-values-v66:has(.income-pension-cell){grid-template-columns:repeat(2,minmax(120px,1fr))!important;}
}
@media(max-width:460px){
  .income-line-values-v66:has(.income-pension-cell){grid-template-columns:1fr!important;}
}
