
:root{
  /* The app's own color names, used by every component and by the charts drawn in JS
     (results.js, montecarlo.js). Values match the landing page (css/landing.css):
     navy-black text, soft blue-gray rules, brand navy from the logo. */
  --ink:#152238; --ink-soft:#43506a;
  --paper:#fff; --paper-raised:#f7f9fc;
  --canvas:#f5f8fc;               /* page background behind the white cards */
  --card:#fff;
  --rule:#e2e8f0; --rule-soft:#edf1f6;
  --rg:#2F5FA0; --rg-soft:#d8e3f2;
  --rm:#C08A2B; --rm-soft:#f4e9d3;
  --cash:#0F9AA8;
  --muted:#6b7588; --danger:#dc3545; --good:#198754;
  /* brand navy from the logo, shared with the landing page */
  --brand:#14294D; --brand-2:#3A74B8; --brand-soft:#e7eef8;
  --c-lifestyle:#1F3B66; --c-discretionary:#0F9AA8; --c-family:#8A5BA8; --c-philanthropy:#C2603A;
  --radius:14px; --radius-sm:10px;
  --shadow-sm:0 1px 2px rgba(21,34,56,.04), 0 4px 16px -8px rgba(21,34,56,.12);
  --shadow:0 18px 50px -18px rgba(21,34,56,.28);
  --focus-ring:0 0 0 4px rgba(58,116,184,.15);
}
:root{ --bs-font-sans-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{background:var(--canvas); color:var(--ink); font-family:var(--bs-font-sans-serif); font-size:17px; line-height:1.5; -webkit-font-smoothing:antialiased;}
/* Inter with tabular figures keeps numbers lined up in stats and inputs; the dense
   tables keep the monospace font. */
.tnum{font-variant-numeric:tabular-nums;}

.wrap{max-width:1360px; margin:0 auto; padding:44px 36px 120px;}
.app-shell{display:flex; align-items:stretch; min-height:calc(100vh - 68px);}
.sidebar{width:240px; flex:0 0 240px; background:var(--card); border-right:1px solid var(--rule);}
.sidebar:empty{display:none;}
.sidebar-backdrop{display:none;}
@media (max-width: 991.98px){
  .sidebar:not(:empty){
    position:fixed; top:0; left:0; height:100vh; z-index:1045;
    transform:translateX(-100%); transition:transform .25s ease;
    box-shadow:none;
  }
  .sidebar.show{transform:translateX(0); box-shadow:var(--shadow);}
  .sidebar-backdrop.show{
    display:block; position:fixed; inset:0; background:rgba(21,34,56,0.4); z-index:1044;
  }
}
.sidebar-inner{position:sticky; top:0; max-height:100vh; overflow-y:auto;}
.sidebar .nav-link{color:var(--ink-soft); border-radius:var(--radius-sm); font-size:15px; font-weight:500; padding:8px 12px; margin-bottom:2px; transition:background .15s, color .15s;}
.sidebar .nav-link:hover{color:var(--brand); background:var(--brand-soft);}
.sidebar .nav-link.active{color:var(--brand); font-weight:600; background:var(--brand-soft);}
.sidebar hr{border-color:var(--rule); opacity:1;}
.dash-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; margin-top:28px;}
.dash-card{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:20px 22px; box-shadow:var(--shadow-sm);}
.dash-card i{display:block; width:12px; height:12px; border-radius:50%; margin-bottom:14px;}
.dash-card-label{font-family:var(--bs-font-sans-serif); font-size:13px; color:var(--muted); margin-bottom:4px; font-weight:500;}
.dash-card-val{font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:21px; color:var(--ink); font-weight:700; letter-spacing:-.01em;}
.app-main{flex:1 1 auto; min-width:0;}
.app-main .wrap{margin:0; max-width:none;}
.page-col{max-width:880px; margin:0 auto;}
.view{display:none;}

h1.page-title{font-family:var(--bs-font-sans-serif); font-weight:800; font-size:36px; margin:0 0 8px; letter-spacing:-.025em; color:var(--ink);}
.page-sub{color:var(--ink-soft); font-size:17px; margin:0 0 32px; max-width:600px;}
.methodology-toc{display:grid; grid-template-columns:1fr 1fr; gap:8px 28px; margin:0 0 40px; padding:22px 26px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.methodology-toc a{font-family:var(--bs-font-sans-serif); font-size:14.5px; color:var(--ink-soft); text-decoration:none; border-bottom:1px dotted transparent;}
@media (max-width: 767.98px){
  .methodology-toc{grid-template-columns:1fr;}
}
.methodology-toc a:hover{color:var(--brand); border-bottom-color:var(--rule);}
.method-section{margin:0 0 40px; padding-top:8px; scroll-margin-top:20px;}
.method-section h2{font-family:var(--bs-font-sans-serif); font-weight:700; letter-spacing:-.01em; font-size:21px; color:var(--ink); margin:0 0 14px; padding-bottom:10px; border-bottom:1px solid var(--rule);}
.method-section p{font-size:15.5px; line-height:1.65; color:var(--ink); margin:0 0 14px;}
.method-section ul{margin:0 0 14px; padding-left:22px;}
.method-section li{font-size:15.5px; line-height:1.65; color:var(--ink); margin-bottom:8px;}
.method-section code{font-family:var(--bs-font-monospace); font-size:13.5px; background:var(--brand-soft); color:var(--brand); padding:1px 6px; border-radius:5px;}
section.block{margin-top:56px;}
.block-head{display:flex; align-items:baseline; gap:14px; border-bottom:1px solid var(--rule); padding-bottom:12px; margin-bottom:22px;}
.block-head h2{font-family:var(--bs-font-sans-serif); font-weight:700; letter-spacing:-.02em; font-size:25px; margin:0; color:var(--ink);}
.block-note{color:var(--muted); font-size:15.5px; max-width:640px; margin:-10px 0 22px;}

.field{display:flex; flex-direction:column; gap:6px;}
.field-check{justify-content:center;}
.check-label{display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink); cursor:pointer;}
.check-label input[type="checkbox"]{width:16px; height:16px; cursor:pointer; accent-color:var(--brand);}
.radio-row input[type="radio"]{accent-color:var(--brand);}
.field label{font-size:13.5px; color:var(--ink-soft); font-weight:600; line-height:1.3; min-height:2.4em; display:flex; align-items:flex-end;}
.field .hint{font-size:12.5px; color:var(--muted);}
input[type=number], input[type=text], input[type=date], input[type=email], input[type=password], input[type=tel], select{
  font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:16px; color:var(--ink);
  background:var(--card); border:1.5px solid #d5dde8; border-radius:var(--radius-sm); padding:9px 12px; outline:none; width:100%;
  transition:border-color .15s, box-shadow .15s;
}
input[type=number]:hover, input[type=text]:hover, input[type=date]:hover, select:hover{border-color:#b9c6d8;}
input:focus, select:focus{border-color:var(--brand-2); box-shadow:var(--focus-ring);}
select{font-family:var(--bs-font-sans-serif); font-size:15.5px;}
.assumptions{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:20px; background:var(--card); border:1px solid var(--rule); padding:24px 26px; border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.composition-note{margin-top:6px; font-size:13.5px; font-family:var(--bs-font-sans-serif) !important; color:var(--ink-soft); padding:6px 10px !important;}
.composition-note::placeholder{color:var(--muted); font-style:italic;}
.readonly-note{font-family:var(--bs-font-monospace); font-size:15px; color:var(--ink-soft); padding:9px 12px; background:var(--paper-raised); border:1.5px dashed var(--rule); border-radius:var(--radius-sm);}

.btn{display:inline-flex; align-items:center; gap:8px; border:1.5px solid #c7d4e6; color:var(--brand); background:var(--card); padding:10px 20px; border-radius:999px; font-family:var(--bs-font-sans-serif); font-size:15px; font-weight:600; cursor:pointer; transition:background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;}
.btn:hover{border-color:var(--brand); background:var(--brand-soft); color:var(--brand);}
.btn:active{transform:translateY(1px);}
.btn.primary{background:var(--brand); border-color:var(--brand); color:#fff; box-shadow:0 8px 20px -10px rgba(20,41,77,.7);}
.btn.primary:hover{background:var(--brand-2); border-color:var(--brand-2); color:#fff;}
.btn.small{padding:6px 14px; font-size:13.5px;}
.btn.danger{border-color:#f1c3c8; color:var(--danger);}
.btn.danger:hover{border-color:var(--danger); background:#fdecee; color:var(--danger);}
.sidebar-toggle-btn{display:inline-flex; align-items:center; justify-content:center; border:none; background:none; color:var(--brand); font-size:20px; line-height:1; padding:6px 10px; border-radius:var(--radius-sm); cursor:pointer;}
.sidebar-toggle-btn:hover, .sidebar-toggle-btn:focus-visible{background:var(--brand-soft);}

.client-table{width:100%; border-collapse:separate; border-spacing:0; margin-top:8px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden;}
.client-table th{text-align:left; font-size:12.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); font-weight:600; padding:14px 0 12px; border-bottom:1px solid var(--rule); background:var(--paper-raised);}
.client-table td{padding:16px 0; border-bottom:1px solid var(--rule-soft); vertical-align:middle;}
.client-table th:first-child, .client-table td:first-child{padding-left:22px;}
.client-table th:last-child, .client-table td:last-child{padding-right:22px; text-align:right;}
.client-table tr:last-child td{border-bottom:none;}
.client-table tbody tr:hover td{background:var(--paper-raised);}
@media (max-width: 767.98px){
  /* Below this width the table reflows into a stacked card per client, rather
     than trying to scroll a cramped row horizontally: column headers don't
     mean anything once there's only one column, so they're hidden, and each
     row becomes its own block with a single divider -- the per-cell divider
     is turned off in favor of that one divider per client. */
  .client-table, .client-table thead, .client-table tbody, .client-table th, .client-table td, .client-table tr{
    display:block;
  }
  .client-table thead{display:none;}
  .client-table tr{border-bottom:1px solid var(--rule); padding:16px 18px;}
  .client-table tr:last-child{border-bottom:none;}
  .client-table td, .client-table td:first-child, .client-table td:last-child{padding:2px 0; border-bottom:none; text-align:left;}
  .client-table td:last-child{display:flex; gap:10px; margin-top:12px;}
}
.client-name{font-family:var(--bs-font-sans-serif); font-size:17.5px; font-weight:600; color:var(--ink); cursor:pointer;}
.client-name:hover{color:var(--brand-2);}
.client-meta{font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:14.5px; color:var(--ink-soft);}
.badge{display:inline-block; font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:12.5px; font-weight:600; padding:4px 10px; border-radius:999px;}
.badge.funded{background:#e3f4ea; color:var(--good);}
.badge.underfunded{background:#fbe7e9; color:var(--danger);}
.badge.neutral{background:var(--rule-soft); color:var(--ink-soft);}
.empty-state{border:1.5px dashed #cfd9e6; border-radius:var(--radius); padding:36px 24px; text-align:center; color:var(--muted); margin-top:8px; font-size:15.5px; background:rgba(255,255,255,.6);}

.form-card{max-width:560px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:30px 30px 26px; box-shadow:var(--shadow-sm);}
/* The New Client form's title/subtitle otherwise span the full page-col width
   while the (narrower) card beneath them is centered within it -- scoped here
   rather than changing .page-title/.page-sub globally, since every other page
   using those classes has full-width content where that's the correct look. */
#view-newclient .page-title, #view-newclient .page-sub{max-width:560px; margin-left:auto; margin-right:auto;}
.form-card .field{margin-bottom:20px;}
.radio-row{display:flex; gap:18px; margin-bottom:10px;}
.radio-row label{display:flex; align-items:center; gap:6px; font-size:15px; color:var(--ink-soft); cursor:pointer; font-weight:500;}

.client-banner{border-bottom:1px solid var(--rule); padding-bottom:18px; margin-bottom:4px;}
.client-banner h1{margin:0 0 6px;}
.client-banner .meta{font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:14.5px; color:var(--muted);}

.subtabs{display:flex; gap:26px; border-bottom:1px solid var(--rule); margin:22px 0 28px;}
.subtabs button{background:none; border:none; font-family:var(--bs-font-sans-serif); font-size:15px; font-weight:500; color:var(--ink-soft); padding:0 0 11px; cursor:pointer; border-bottom:2px solid transparent; transition:color .15s;}
.subtabs button:hover{color:var(--brand);}
.subtabs button.active{color:var(--brand); border-bottom-color:var(--brand-2); font-weight:600;}
.tab-panel{display:none;}
.tab-panel.active{display:block;}

.result-subtabs{display:flex; gap:26px; border-bottom:1px solid var(--rule); margin:8px 0 32px;}
.result-subtabs button{background:none; border:none; font-family:var(--bs-font-sans-serif); font-size:15px; font-weight:500; color:var(--ink-soft); padding:0 0 11px; cursor:pointer; border-bottom:2px solid transparent; transition:color .15s;}
.result-subtabs button:hover{color:var(--brand);}
.result-subtabs button.active{color:var(--brand); border-bottom-color:var(--brand-2); font-weight:600;}
.result-tab-panel{display:none;}
.result-tab-panel.active{display:block;}

.assets-card{max-width:420px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:22px 24px; box-shadow:var(--shadow-sm);}

.subsection-head{margin-bottom:4px;}
.subsection + .subsection{margin-top:44px; padding-top:32px; border-top:1px solid var(--rule-soft);}
.subsection-head h3{font-family:var(--bs-font-sans-serif); font-weight:700; letter-spacing:-.015em; font-size:22px; margin:0;}

.asset-row{display:grid; grid-template-columns:2fr 1fr auto; gap:14px; align-items:end; padding:16px 0; border-bottom:1px solid var(--rule-soft);}
.asset-row:first-child{padding-top:0;}
/* accounts add type and owner columns; liabilities reuse .asset-row without them */
.asset-row .remove-btn, .income-row .remove-btn{margin-bottom:6px;}

.income-row{display:grid; grid-template-columns:1fr; gap:14px; align-items:end; padding:16px 0; border-bottom:1px solid var(--rule-soft);}
.income-row:first-child{padding-top:0;}
@media (min-width: 768px){
  .account-row{grid-template-columns:2fr 1fr 1.3fr 1fr auto;}
  .liability-row{grid-template-columns:2fr 1fr 1fr auto;}
  .income-row{grid-template-columns:1.5fr 1fr 1fr 0.7fr 0.7fr 1.3fr auto;}
}
@media (max-width: 767.98px){
  .asset-row{grid-template-columns:1fr; gap:8px;}
  .income-row{grid-template-columns:1fr; gap:8px;}
  .asset-row .remove-btn, .income-row .remove-btn{justify-self:start;}
}

.coverage-card{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:22px 24px; margin-bottom:28px; box-shadow:var(--shadow-sm);}
.coverage-card h4{font-family:var(--bs-font-sans-serif); font-weight:700; font-size:18px; margin:0 0 4px;}
.coverage-axis{display:flex; justify-content:space-between; font-family:var(--bs-font-monospace); font-size:12.5px; color:var(--muted); margin:14px 0 6px;}
.coverage-row{display:flex; align-items:center; gap:12px; margin-bottom:6px;}
.coverage-row-label{width:150px; flex:none; font-size:14px; color:var(--ink-soft); font-family:var(--bs-font-sans-serif); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.coverage-strip{display:flex; gap:1px; flex:1;}
.coverage-cell{height:16px; flex:1 0 4px; min-width:3px; border-radius:2px; background:var(--rule-soft);}
.coverage-warnings{margin-top:16px; padding-top:14px; border-top:1px solid var(--rule-soft);}
.coverage-warnings ul{margin:0; padding-left:18px; font-size:14.5px;}
.coverage-warnings li{margin-bottom:6px;}
.coverage-warnings li.warn{color:var(--danger);}
.coverage-warnings li.ok{color:var(--good);}

.cat-section{margin-bottom:36px;}
.cat-section-head{display:flex; align-items:center; gap:10px; margin-bottom:14px;}
.cat-section-head h3{font-family:var(--bs-font-sans-serif); font-weight:700; letter-spacing:-.015em; font-size:21px; margin:0;}
.cat-section .btn.small{margin-top:2px;}

.goal{border:1px solid var(--rule); border-radius:var(--radius); margin-bottom:16px; background:var(--card); overflow:hidden; box-shadow:var(--shadow-sm);}
.goal-top-row{display:flex; justify-content:space-between; align-items:center; padding:16px 20px 0;}
.goal-head{display:flex; align-items:center; gap:10px;}
.cat-chip{width:10px; height:10px; border-radius:50%; flex:none;}
.goal-name-input{width:280px; font-family:var(--bs-font-sans-serif); font-size:16px; font-weight:600; color:var(--ink); border:1.5px solid transparent; background:transparent; border-radius:var(--radius-sm); padding:7px 10px;}
@media (max-width: 767.98px){
  .goal-top-row{flex-wrap:wrap; gap:10px;}
  .goal-head{flex:1 1 auto; min-width:0;}
  .goal-name-input{width:100%; min-width:0;}
}
.goal-name-input::placeholder{color:var(--muted); font-weight:500; font-style:italic;}
.goal-name-input:hover{border-color:#d5dde8;}
.goal-name-input:focus{background:var(--card);}
.goal-fields{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:16px 20px; padding:14px 20px 18px;}
.remove-btn{background:none; border:1.5px solid var(--rule); color:var(--muted); font-size:13px; font-weight:500; padding:6px 12px; border-radius:999px; cursor:pointer; font-family:var(--bs-font-sans-serif); transition:border-color .15s, color .15s, background .15s;}
.remove-btn:hover{border-color:#f1c3c8; background:#fdecee; color:var(--danger);}
.goal-out{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); border-top:1px solid var(--rule-soft); background:var(--paper-raised);}
.goal-out > div{padding:14px 20px; border-right:1px solid var(--rule-soft);}
.goal-out > div:last-child{border-right:none;}
.goal-out .num{font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:18.5px; font-weight:700; letter-spacing:-.01em;}
.goal-out .lbl{font-size:12.5px; color:var(--muted); margin-top:2px;}
.funded{color:var(--good);}
.underfunded{color:var(--danger);}
.ladder-strip{display:flex; gap:1px; padding:14px 20px 0; flex-wrap:wrap;}
.ladder-cell{height:20px; flex:1 0 8px; min-width:8px; border-radius:2px;}
.ladder-legend{display:flex; gap:16px; padding:8px 20px 16px; font-size:13px; color:var(--muted); flex-wrap:wrap;}
.ladder-legend span{display:inline-flex; align-items:center; gap:5px;}
.ladder-legend i{width:9px; height:9px; display:inline-block; border-radius:2px;}
.add-row{display:flex; gap:10px; flex-wrap:wrap; margin-top:6px;}

.chart-wrap{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:24px 26px 20px; box-shadow:var(--shadow-sm);}
.legend{display:flex; gap:22px; flex-wrap:wrap; margin-bottom:14px; font-size:14px; color:var(--ink-soft);}
.legend span{display:inline-flex; align-items:center; gap:6px;}
.swatch{width:14px; height:3px; display:inline-block; border-radius:2px;}
.dot-swatch{width:9px; height:9px; border-radius:50%; display:inline-block;}
.summary-grid{display:grid; grid-template-columns:1fr 1fr; gap:36px;}
.stat-row{display:flex; gap:16px; margin-bottom:22px; flex-wrap:wrap;}
.stat{display:inline-block; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:18px 22px; box-shadow:var(--shadow-sm); min-width:220px;}
.stat-row > .stat{flex:1 1 180px; min-width:180px;}
.stat .num{font-family:var(--bs-font-sans-serif); font-variant-numeric:tabular-nums; font-size:28px; font-weight:800; letter-spacing:-.02em;}
.stat .lbl{font-size:13.5px; color:var(--muted); margin-top:2px; max-width:220px;}
.bar-outer{height:34px; width:100%; background:var(--rule-soft); border-radius:8px; overflow:hidden; display:flex;}
.donut-wrap{display:flex; align-items:center; gap:24px; margin-bottom:8px;}
.allocation-centered{display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; margin:40px 0 44px; padding:36px 24px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.alloc-title{font-family:var(--bs-font-sans-serif); font-size:16px; font-weight:700; color:var(--ink); margin:0; letter-spacing:-.01em;}
.allocation-centered .bar-caption{justify-content:center; gap:28px; font-size:15.5px;}
.allocation-centered .cat-bars{width:100%; max-width:640px; margin-top:10px;}
.funding-table-wrap{max-width:760px; margin:0 auto; overflow-x:auto; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:18px 24px 8px; box-shadow:var(--shadow-sm);}
.funding-table tr:last-child td{border-bottom:none;}
.mc-table-wrap{max-height:420px; overflow-y:auto; overflow-x:auto; border:1px solid var(--rule); border-radius:var(--radius); margin-top:18px; background:var(--card); box-shadow:var(--shadow-sm);}
.mc-table-wrap table{width:100%;}
.mc-table-wrap thead th{position:sticky; top:0; background:var(--paper-raised); z-index:1; padding-top:10px;}
.mc-table-wrap .funding-table td, .mc-table-wrap .funding-table th{padding-left:16px; padding-right:16px;}

.cf-table-wrap{max-height:640px; overflow:auto; border:1px solid var(--rule); border-radius:var(--radius); margin-top:18px; background:var(--card); box-shadow:var(--shadow-sm);}
.cf-table{border-collapse:collapse; font-family:var(--bs-font-monospace); font-size:13.5px; white-space:nowrap;}
.cf-table th, .cf-table td{padding:8px 14px; text-align:right; border-bottom:1px solid var(--rule-soft);}
.cf-table th:first-child, .cf-table td:first-child{
  text-align:left; font-family:var(--bs-font-sans-serif); position:sticky; left:0; background:var(--paper); z-index:1;
  border-right:1px solid var(--rule); min-width:220px;
}
.cf-table thead th{position:sticky; top:0; background:var(--paper-raised); z-index:2; color:var(--ink-soft); font-weight:600;}
.cf-table thead th:first-child{z-index:3;}
.cf-table tr.cf-section td:first-child{font-weight:700; color:var(--brand); font-family:var(--bs-font-sans-serif); padding-top:16px;}
.cf-table tr.cf-item td:first-child{padding-left:26px; color:var(--ink-soft);}
.cf-table tr.cf-subtotal td{font-weight:600; border-top:1px solid var(--rule); background:var(--paper-raised);}
.cf-table tr.cf-subtotal td:first-child{background:var(--paper-raised);}
.cf-table tr.cf-boundary td{font-weight:700; background:var(--brand-soft); color:var(--brand); border-top:1px solid #c7d4e6; border-bottom:1px solid #c7d4e6;}
.cf-table tr.cf-boundary td:first-child{background:var(--brand-soft);}
.cf-dash{color:var(--muted);}
.minvol-compare{display:flex; gap:48px; margin-top:6px; max-width:760px; flex-wrap:wrap;}
.minvol-col{flex:1; min-width:260px;}
.minvol-col-head{font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); margin-bottom:10px;}
.bar-rm{background:var(--rm); height:100%;}
.bar-rg{background:var(--rg); height:100%;}
.bar-caption{display:flex; justify-content:space-between; font-family:var(--bs-font-monospace); font-size:14px; margin-top:8px; color:var(--ink-soft);}
.cat-bars{margin-top:26px;}
.cat-bar-row{margin-bottom:24px; text-align:left;}
.cat-bar-row.surplus-row{margin-top:20px; padding-top:20px; border-top:1.5px dashed #cfd9e6;}
.cat-bar-row-head{display:flex; justify-content:space-between; align-items:baseline; gap:16px; margin-bottom:8px; font-size:15.5px;}
.cat-bar-row-head .cat-name{display:flex; align-items:center; gap:8px; color:var(--ink); font-weight:600;}
.cat-bar-row-head .cat-name i{width:9px; height:9px; border-radius:50%; display:inline-block; flex:none;}
.cat-bar-row-head .amt{font-family:var(--bs-font-monospace); color:var(--ink-soft); white-space:nowrap;}
.cat-bar-track{height:14px; background:var(--rule-soft); border-radius:99px; overflow:hidden; display:flex;}
.cat-bar-split{display:flex; justify-content:space-between; font-family:var(--bs-font-monospace); font-size:13.5px; color:var(--muted); margin-top:6px;}
.funding-table{width:100%; border-collapse:collapse; font-size:15px;}
.funding-table th{text-align:left; font-size:12.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); font-weight:600; padding-bottom:10px; border-bottom:1px solid var(--rule);}
.funding-table td{padding:10px 0; border-bottom:1px solid var(--rule-soft); font-family:var(--bs-font-monospace);}
.funding-table td.name{font-family:var(--bs-font-sans-serif); font-weight:500; display:flex; align-items:center; gap:8px;}
.funding-table td.name i{width:8px; height:8px; border-radius:50%; display:inline-block;}

.save-flash{font-size:13.5px; font-weight:600; color:var(--good); font-family:var(--bs-font-sans-serif); opacity:0; transition:opacity .3s;}
.save-flash.show{opacity:1;}

.modal-overlay{position:fixed; inset:0; background:rgba(21,34,56,0.45); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); display:none; align-items:center; justify-content:center; z-index:1100; padding:20px;}
.modal-overlay.show{display:flex;}
.modal-card{background:var(--card); border:1px solid var(--rule); border-radius:18px; padding:30px 32px; max-width:440px; box-shadow:var(--shadow);}
.modal-card h3{font-family:var(--bs-font-sans-serif); font-weight:700; letter-spacing:-.015em; font-size:21px; margin:0 0 10px;}
.modal-card p{color:var(--ink-soft); font-size:15.5px; margin:0 0 24px; line-height:1.5;}
.modal-actions{display:flex; gap:10px; justify-content:flex-end;}
footer{margin-top:64px; padding-top:20px; border-top:1px solid var(--rule); color:var(--muted); font-size:13.5px; max-width:660px;}

.storage-toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); max-width:calc(100% - 32px); background:var(--danger); color:#fff; padding:12px 18px; border-radius:var(--radius-sm); font-size:14.5px; font-weight:500; box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:opacity .3s; z-index:1100;}
.storage-toast.show{opacity:1; pointer-events:auto; cursor:pointer;}
.storage-toast.info{background:var(--brand);}

/* ================= top bar (matches the landing page nav) ================= */
.topnav{position:sticky; top:0; z-index:1040; display:flex; align-items:center; justify-content:space-between; gap:20px; height:68px; padding:0 28px; background:rgba(255,255,255,.86); backdrop-filter:saturate(180%) blur(14px); -webkit-backdrop-filter:saturate(180%) blur(14px); border-bottom:1px solid var(--rule);}
.topnav .brand{display:flex; align-items:center; gap:10px; cursor:pointer; color:var(--brand);}
.topnav .brand img{display:block;}
.topnav .brand .wordmark{font-size:22px;}
.topnav .brand .tagline{color:var(--muted); font-size:13px; font-weight:500; margin-left:4px; padding-left:12px; border-left:1px solid var(--rule); white-space:nowrap;}
.topnav nav{display:flex; gap:6px; align-items:center;}
.topnav nav a{font-size:15px; font-weight:500; color:var(--ink-soft); text-decoration:none; cursor:pointer; padding:8px 14px; border-radius:999px; white-space:nowrap; transition:background .15s, color .15s;}
.topnav nav a:hover{color:var(--brand); background:var(--brand-soft);}
.topnav nav a.active{color:var(--brand); background:var(--brand-soft); font-weight:600;}
body.signed-out .topnav nav{display:none;}
body.signed-out .topnav .brand{pointer-events:none;}
@media (max-width: 767.98px){
  .topnav{height:58px; padding:0 10px; gap:6px;}
  .topnav .brand .tagline, .topnav .brand .wordmark{display:none;}
  .topnav .brand img{width:32px; height:22px;}
  .topnav nav{gap:2px; overflow-x:auto; scrollbar-width:none;}
  .topnav nav a{font-size:12.5px; padding:6px 6px;}
  .sidebar-toggle-btn{padding:4px 6px;}
}
/* the sticky top bar is 68px tall: keep the sidebar and in-page jump links clear of it */
html{scroll-padding-top:84px;}
@media (min-width: 992px){ .sidebar-inner{top:68px; max-height:calc(100vh - 68px);} }

/* ================= sign in ================= */
body.signed-out{background:radial-gradient(900px 480px at 85% -10%, #dbe8f8 0%, transparent 60%), radial-gradient(700px 420px at -10% 10%, #e9f4ee 0%, transparent 60%), linear-gradient(180deg, #f7faff 0%, #eef4fb 100%) fixed; min-height:100vh;}
body.signed-out .topnav{background:rgba(255,255,255,.6); border-bottom-color:transparent;}
.auth-landscape{display:none;}
body.signed-out .auth-landscape{display:block; position:fixed; left:0; right:0; bottom:0; width:100%; height:240px; z-index:0; pointer-events:none;}
body.signed-out .app-shell{position:relative; z-index:1;}
#view-auth{padding:24px 0 260px;}
.auth-card{max-width:440px; margin:0 auto; background:var(--card); border:1px solid var(--rule); border-radius:20px; padding:40px 40px 32px; box-shadow:0 24px 60px -24px rgba(21,34,56,.35);}
.auth-logo{display:block; margin:0 auto 18px;}
.auth-title{font-size:28px; font-weight:800; letter-spacing:-.02em; text-align:center; color:var(--ink); margin:0;}
.auth-sub{font-size:15.5px; color:var(--ink-soft); text-align:center; margin:8px 0 28px;}
.auth-card .field{margin-bottom:18px;}
.auth-card .field label{min-height:0; font-size:14px; color:var(--ink);}
.auth-card input[type=email], .auth-card input[type=password]{padding:11px 14px;}
.auth-label-row{display:flex; justify-content:space-between; align-items:baseline;}
.auth-name-row{display:grid; grid-template-columns:1fr 1fr; gap:0 14px;}
.auth-card .field label .optional{font-weight:500; color:var(--muted); margin-left:4px;}
@media (max-width: 400px){ .auth-name-row{grid-template-columns:1fr;} }
#view-auth .auth-label-row a{font-size:13.5px; font-weight:500; color:var(--brand-2); cursor:pointer; text-decoration:none;}
#view-auth .auth-label-row a:hover{text-decoration:underline;}
.auth-card .hint{line-height:1.45;}
.auth-msg{font-size:14px; color:var(--good); margin:0 0 10px; min-height:1.2em; text-align:center;}
.auth-msg.error{color:var(--danger);}
.auth-legal{font-size:13px; color:var(--muted); text-align:center; margin:14px 0 0; line-height:1.5;}
#view-auth .auth-legal a{color:var(--brand-2); text-decoration:underline;}
.btn.auth-submit{width:100%; justify-content:center; padding:13px 18px; font-size:16px;}
.btn.auth-submit:disabled{opacity:.6; cursor:wait;}
.auth-switch{display:flex; justify-content:center; margin:22px 0 0; padding-top:20px; border-top:1px solid var(--rule-soft); font-size:14.5px;}
#view-auth .auth-switch a{color:var(--ink-soft); cursor:pointer; text-decoration:none;}
.auth-switch a b{color:var(--brand-2); font-weight:600;}
.auth-switch a:hover b, .auth-switch a:hover{color:var(--brand);}
.auth-home{display:none; font-size:14.5px; font-weight:500; color:var(--ink-soft); text-decoration:none;}
.auth-home:hover{color:var(--brand);}
body.signed-out .topnav .auth-home{display:inline-block; padding:8px 14px; border-radius:999px;}
body.signed-out .topnav .auth-home:hover{background:var(--brand-soft);}
@media (max-width: 600px){
  #view-auth{padding:4px 0 180px;}
  .auth-card{padding:30px 22px 24px; border-radius:16px;}
  body.signed-out .auth-landscape{height:150px;}
}

/* ================= account menu (avatar + dropdown) ================= */
.topnav nav{margin-left:auto;}
.user-menu{position:relative; flex:none;}
body.signed-out .user-menu{display:none;}
.avatar-btn{width:38px; height:38px; border-radius:50%; border:0; padding:0; cursor:pointer; display:grid; place-items:center; background:linear-gradient(135deg, var(--brand-2), var(--brand)); color:#fff; font-weight:700; font-size:16px; box-shadow:0 0 0 2px #fff, 0 0 0 3.5px #c7d4e6; transition:box-shadow .15s;}
.avatar-btn:hover, .avatar-btn[aria-expanded="true"]{box-shadow:0 0 0 2px #fff, 0 0 0 3.5px var(--brand-2);}
.avatar-btn:focus-visible{outline:none; box-shadow:0 0 0 2px #fff, 0 0 0 5px var(--brand-2);}
.user-menu-panel{position:absolute; right:0; top:calc(100% + 10px); width:270px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow); padding:8px; z-index:1050;}
.user-menu-head{display:flex; align-items:center; gap:12px; padding:10px 10px 12px; margin-bottom:4px; border-bottom:1px solid var(--rule-soft);}
.avatar-lg{flex:none; width:40px; height:40px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg, var(--brand-2), var(--brand)); color:#fff; font-weight:700; font-size:17px;}
.user-menu-id{min-width:0; display:flex; flex-direction:column;}
.user-menu-id b{font-size:14.5px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.user-menu-id span{font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.user-menu-item{display:flex; align-items:center; gap:10px; width:100%; border:0; background:none; text-align:left; padding:9px 10px; border-radius:var(--radius-sm); font-family:var(--bs-font-sans-serif); font-size:14.5px; font-weight:500; color:var(--ink); cursor:pointer;}
.user-menu-item svg{width:18px; height:18px; fill:none; stroke:var(--ink-soft); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.user-menu-item:hover, .user-menu-item:focus-visible{background:var(--brand-soft); color:var(--brand); outline:none;}
.user-menu-item:hover svg, .user-menu-item:focus-visible svg{stroke:var(--brand);}
.user-menu-divider{margin:6px 4px; border:0; border-top:1px solid var(--rule); opacity:1;}
@media (max-width: 767.98px){
  .avatar-btn{width:32px; height:32px; font-size:14px;}
  .user-menu-panel{position:fixed; right:10px; top:62px; width:min(270px, calc(100vw - 20px));}
}

/* ================= profile page ================= */
.profile-col{max-width:760px;}
.profile-card{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:26px 28px; margin-bottom:20px;}
.profile-card-head{margin-bottom:18px;}
.profile-card-head h2{font-size:19px; font-weight:700; letter-spacing:-.015em; margin:0 0 4px; color:var(--ink);}
.profile-card-head p{font-size:14.5px; color:var(--muted); margin:0;}
.profile-card-head p b{color:var(--ink); font-weight:600;}
.profile-grid{display:grid; grid-template-columns:1fr 1fr; gap:16px 18px;}
.profile-grid .span-2{grid-column:1 / -1;}
.profile-grid .field label{min-height:0;}
.profile-actions{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:20px;}
.profile-msg{font-size:14px; color:var(--good); font-weight:500;}
.profile-msg.error{color:var(--danger);}
.profile-pending{margin:-6px 0 18px; padding:10px 14px; border-radius:var(--radius-sm); background:#fff7e6; border:1px solid #f6dca8; color:#7a5300; font-size:14px;}
@media (max-width: 600px){
  .profile-card{padding:22px 18px;}
  .profile-grid{grid-template-columns:1fr;}
}

/* ================= workspace step buttons ================= */
.ws-actions{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-top:32px; border-top:1px solid var(--rule); padding-top:24px;}
.ws-actions-right{display:flex; gap:10px; flex-wrap:wrap; margin-left:auto;}
@media (max-width: 600px){
  /* phones: next step first and full width, then View results, then Back to clients */
  .ws-actions{flex-direction:column-reverse; align-items:stretch;}
  .ws-actions-right{flex-direction:column-reverse; margin-left:0;}
  .ws-actions .btn{justify-content:center;}
}

/* ================= GoalEra wordmark (matches assets/goalera-logo.svg) ================= */
.wordmark{font-family:'Plus Jakarta Sans', 'Segoe UI', Helvetica, sans-serif; font-weight:700; color:var(--brand); letter-spacing:-.02em; line-height:1; white-space:nowrap;}
.wordmark span{font-weight:400; color:var(--brand-2);}

/* ================= household editor (New client + Household tab) ================= */
.household-editor .field{margin-bottom:16px;}
.household-card{max-width:760px;}
.he-person{border:1px solid var(--rule); border-radius:var(--radius-sm); padding:14px 18px 2px; margin:0 0 16px; background:var(--paper-raised);}
.he-person legend{float:none; width:auto; font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--brand-2); padding:0 6px; margin:0 0 4px -6px;}
.he-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 16px;}
.he-grid .field label{min-height:0;}
.he-married-row{display:flex; flex-direction:column; gap:4px; margin:0 0 14px;}
.he-married-row .hint{font-size:12.5px; color:var(--muted);}
.he-plan-preview{margin:0 0 16px; font-size:13.5px; color:var(--brand-2) !important; font-weight:500;}
.household-actions{align-items:center;}
@media (max-width: 600px){ .he-grid{grid-template-columns:1fr;} }

/* cash-flow column headers: ages under each year */
.cf-ages{display:block; font-weight:500; font-size:11.5px; color:var(--muted); font-family:var(--bs-font-sans-serif);}

/* inherited IRA / Roth: extra fields on their own line under the account row */
.inherited-fields{grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, minmax(150px, 1fr)); gap:14px; align-items:end; padding:12px 14px; background:var(--brand-soft); border-radius:var(--radius-sm);}
.inherited-fields .field label{min-height:0;}
.inherited-fields .inherited-note{grid-column:1 / -1; margin:0; font-size:12.5px; color:var(--ink-soft);}
.inherited-check{grid-column:1 / -1; display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink); cursor:pointer;}
.inherited-check input{width:16px; height:16px; accent-color:var(--brand);}
.tax-profile-grid{max-width:900px;}
.tax-profile-grid .state-note{grid-column:1 / -1; margin:0; font-size:13px; color:var(--ink-soft);}
.basis-fields{grid-column:1 / -1; display:grid; grid-template-columns:minmax(160px,220px) 1fr; gap:14px; align-items:end; padding:10px 14px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm);}
.basis-fields .field label{min-height:0;}
.basis-note{margin:0 0 10px; font-size:12.5px; color:var(--ink-soft);}
@media (max-width: 767.98px){ .inherited-fields, .basis-fields{grid-template-columns:1fr;} }

/* ================= annual reports (Cash Flow, Taxes) ================= */
.rpt-actions{display:flex; justify-content:flex-end; margin:-8px 0 12px;}
.rpt-table-wrap{max-height:640px; overflow:auto; border:1px solid var(--rule); border-radius:var(--radius); background:var(--card); box-shadow:var(--shadow-sm);}
.rpt-table{width:100%; border-collapse:collapse; font-size:13.5px; white-space:nowrap;}
.rpt-table th{position:sticky; top:0; z-index:1; background:var(--paper-raised); color:var(--ink-soft); font-weight:600; font-size:12px; text-align:right; padding:10px 12px; border-bottom:1px solid var(--rule); white-space:normal; min-width:92px; vertical-align:bottom;}
.rpt-table td{padding:7px 12px; text-align:right; border-bottom:1px solid var(--rule-soft); font-family:var(--bs-font-monospace);}
.rpt-table th.t, .rpt-table td.t{text-align:left; font-family:var(--bs-font-sans-serif);}
.rpt-table th:first-child, .rpt-table td:first-child{min-width:52px;}
.rpt-table td.t{color:var(--ink-soft);}
.rpt-table tbody tr:hover td{background:var(--brand-soft);}
.rpt-table tfoot td{position:sticky; bottom:0; background:var(--paper-raised); font-weight:700; border-top:1px solid var(--rule); border-bottom:none; font-family:var(--bs-font-monospace);}
.rpt-table tfoot td:first-child{font-family:var(--bs-font-sans-serif);}
.rpt-table tr.rpt-shortfall td{background:#fdecee;}
.rpt-warning{margin:0 0 12px; padding:10px 14px; border-radius:var(--radius-sm); background:#fdecee; border:1px solid #f1c3c8; color:var(--danger); font-size:14px;}

/* secondary figure under a stat, e.g. "(82% without future savings)" */
.stat .sub{font-size:13px; color:var(--muted); font-weight:500; margin-top:2px;}

/* ================= savings (Income tab), extra income options ================= */
.windfall-row{display:grid; grid-template-columns:1fr; gap:14px; align-items:end; padding:16px 0; border-bottom:1px solid var(--rule-soft);}
.windfall-row .remove-btn{margin-bottom:6px;}
@media (min-width: 768px){ .windfall-row{grid-template-columns:2fr 1.2fr 0.8fr auto;} }
.saving-row{display:grid; grid-template-columns:1fr; gap:14px; align-items:end; padding:16px 0; border-bottom:1px solid var(--rule-soft);}
.saving-row:first-child{padding-top:0;}
.saving-row .remove-btn{margin-bottom:6px;}
.amt-unit{display:flex; gap:6px;}
.amt-unit input{flex:1 1 auto; min-width:0;}
.amt-unit select{flex:0 0 auto; width:auto;}
.saving-noemployer .hint{display:flex; align-items:center; min-height:44px;}
.saving-extras{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:10px 24px; align-items:flex-end; padding:10px 14px; background:#eef8f2; border:1px solid #cfe8da; border-radius:var(--radius-sm);}
.saving-extras .field{min-width:240px; margin:0;}
.saving-extras .field label{min-height:0;}
.saving-extras .savings-note{flex:1 1 320px;}
.savings-note{margin:0; font-size:12.5px; color:var(--ink-soft);}
.savings-warn{color:#9a5b00; font-weight:600;}
.account-savings-note{grid-column:1 / -1; margin:-4px 0 0; font-size:12.5px; color:var(--ink-soft);}
@media (min-width: 768px){ .saving-row{grid-template-columns:2fr 1.3fr 1.3fr 0.6fr 0.7fr auto;} }
@media (max-width: 767.98px){ .saving-row{gap:8px;} .saving-row .remove-btn{justify-self:start;} }
.field label .optional{font-weight:500; color:var(--muted); margin-left:4px;}
.income-extras{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:14px 28px; align-items:flex-end; padding:10px 14px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm);}
.income-extras .field{min-width:220px;}
.ss-extras .ss-note{flex:1 1 280px; margin:0 0 6px; font-size:12.5px; color:var(--ink-soft);}
.income-extras .field label{min-height:0;}
.income-extras select{max-width:200px;}

/* ================= report builder ================= */
.report-card{max-width:620px; width:100%; max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); display:flex; flex-direction:column; overflow:hidden;}
/* Only the section list scrolls, so the title, quick picks and Download button always show. */
.report-card > *{flex:0 0 auto;}
.report-card > p{margin:0 0 14px;}
.report-presets{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:14px; font-size:13.5px; color:var(--muted);}
.report-presets .btn{padding-left:11px; padding-right:11px;}
.report-presets .btn.active{background:var(--brand-soft); border-color:var(--brand-2);}
.report-section-list{display:flex; flex-direction:column; gap:6px; margin:0 -6px 14px; padding:8px 6px; flex:1 1 auto !important; min-height:120px; overflow-y:auto; border-top:1px solid var(--rule-soft); border-bottom:1px solid var(--rule-soft);}
.report-row{display:flex; align-items:center; gap:8px; border-radius:var(--radius-sm);}
.report-row .report-section{flex:1; min-width:0;}
.report-row.dragging{opacity:.4;}
.report-row.drop-before{box-shadow:0 -3px 0 var(--brand-2);}
.report-row.drop-after{box-shadow:0 3px 0 var(--brand-2);}
.report-drag{flex:none; width:24px; height:32px; border:0; background:none; color:var(--muted); font-size:16px; cursor:grab; border-radius:6px; padding:0;}
.report-drag:hover{background:var(--paper-raised); color:var(--ink);}
.report-drag.is-fixed{cursor:default;}
.report-move{display:flex; gap:4px; flex:none;}
.report-move-spacer{width:64px; flex:none;}
.report-presets .report-reset{margin-left:auto;}
.report-section{display:flex; gap:10px; align-items:flex-start; padding:9px 11px; border:1px solid var(--rule); border-radius:var(--radius-sm); cursor:pointer; background:var(--card);}
.report-section:hover{border-color:var(--brand-2);}
.report-section input{margin-top:3px; accent-color:var(--brand); width:16px; height:16px; flex:none;}
.report-section.is-locked{cursor:default; opacity:.7;}
.report-section-text{display:flex; flex-direction:column; min-width:0;}
.report-section-text b{font-size:14px; font-weight:600; color:var(--ink);}
.report-section-text small{font-size:12px; color:var(--muted); line-height:1.35;}
.report-section-title{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.report-tag{display:inline-block; padding:0 6px; border-radius:999px; background:#fff1d6; color:#8a5a00; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; vertical-align:2px;}
.report-remember{margin-bottom:6px;}
.report-msg{min-height:1.2em; font-size:13.5px; color:var(--good); margin:0 0 10px !important;}
.report-msg.error{color:var(--danger);}


/* ================= what-if scenarios ================= */
.results-banner{display:flex; align-items:flex-end; justify-content:space-between; gap:16px;}
.whatif-toggle{flex:0 0 auto;}
body.whatif-open .whatif-toggle{background:var(--brand-soft); border-color:var(--brand);}
.scenario-strip{margin:18px 0 6px; padding:14px 18px; background:var(--card); border:1px solid var(--rule); border-left:4px solid var(--brand); border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.sc-head{display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-bottom:10px;}
.sc-pill{background:var(--brand); color:#fff; font-size:12.5px; font-weight:600; padding:3px 10px; border-radius:999px;}
.sc-note{font-size:12.5px; color:var(--muted);}
.sc-stress{font-size:12.5px; font-weight:600; color:var(--danger); background:#fdecee; padding:3px 10px; border-radius:999px;}
.sc-metrics{display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:10px 18px;}
.sc-label{font-size:12px; color:var(--muted); margin-bottom:2px;}
.sc-values{font-family:var(--bs-font-monospace); font-variant-numeric:tabular-nums; font-size:14px; display:flex; flex-wrap:wrap; align-items:baseline;}
.sc-base{color:var(--muted);}
.sc-arrow{color:var(--muted); margin:0 6px;}
.sc-new{font-weight:700; color:var(--ink);}
.sc-new.up{color:var(--good);}
.sc-new.down{color:var(--danger);}

.whatif-panel{position:fixed; top:68px; right:0; bottom:0; width:340px; z-index:900; background:var(--card); border-left:1px solid var(--rule); box-shadow:-8px 0 24px rgba(21,34,56,0.08); overflow-y:auto; padding:0 18px 24px;}
.whatif-panel[hidden]{display:none;}
.wi-head{position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; background:var(--card); padding:16px 0 10px; border-bottom:1px solid var(--rule-soft);}
.wi-head h3{margin:0; font-size:18px; font-weight:700;}
.wi-close{border:0; background:none; font-size:18px; color:var(--muted); cursor:pointer; padding:4px 8px; border-radius:var(--radius-sm);}
.wi-close:hover{background:var(--paper-raised); color:var(--ink);}
.wi-section{padding:14px 0; border-bottom:1px solid var(--rule-soft);}
.wi-section h4{font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft); margin:0 0 10px;}
.wi-field{display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--ink-soft); min-width:0;}
.wi-field input, .wi-field select, .wi-onetime input, .wi-onetime select{width:100%; min-width:0; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.wi-wide + .wi-wide{margin-top:10px;}
.wi-pair{display:grid; grid-template-columns:1.4fr 1fr; gap:10px;}
.wi-pair + .wi-pair{margin-top:10px;}
.wi-claim{margin-top:8px;}
.wi-claim + .wi-pair{margin-top:12px;}
.wi-triple{display:grid; grid-template-columns:repeat(3, 1fr); gap:8px;}
.wi-range{display:flex; flex-direction:column; gap:6px;}
.wi-range input{width:100%; accent-color:var(--brand);}
.wi-range output{font-family:var(--bs-font-monospace); font-size:13.5px; color:var(--ink);}
.wi-onetime{display:grid; grid-template-columns:1fr 1fr auto; gap:6px; padding:10px; margin-bottom:8px; background:var(--paper-raised); border-radius:var(--radius-sm);}
.wi-onetime [data-wi="oneTime.label"]{grid-column:2 / 4;}
.wi-onetime .remove-btn{padding:4px 8px;}
.wi-footer{padding-top:14px;}
.wi-save{display:flex; gap:8px;}
.wi-save input{flex:1; min-width:0; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm);}
.wi-actions{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;}
.wi-apply{width:100%; margin-top:10px;}
.wi-footer .hint{margin:10px 0 0; font-size:12px;}
@media (min-width: 1200px){ body.whatif-open #view-results{margin-right:340px;} }
@media (max-width: 1199.98px){
  .whatif-panel{top:auto; left:0; width:auto; height:62vh; border-left:0; border-top:1px solid var(--rule); border-radius:14px 14px 0 0; box-shadow:0 -10px 30px rgba(21,34,56,0.18);}
  body.whatif-open #view-results{padding-bottom:62vh;}
}

/* ================= Social Security page ================= */
.ss-h{font-size:16px; font-weight:700; margin:28px 0 10px; color:var(--ink);}
.ss-pv-toggle{display:inline-flex; margin:4px 0 0;}
.rpt-table tr.ss-chosen td{background:var(--brand-soft); font-weight:600;}
.rpt-table tr.ss-current td{border-top:2px solid var(--rule); font-style:italic;}
.ss-chart{margin-top:14px; padding:16px 18px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius);}
.ss-chart .legend{margin-bottom:6px;}
.ss-breakevens{margin:6px 0 0; padding-left:18px; font-size:13.5px; color:var(--ink-soft);}
#ssReportHost .hint{display:block; margin:8px 0 0; font-size:13px; color:var(--muted); max-width:820px;}
.ss-chart svg{display:block; width:100%; max-width:820px; height:auto; max-height:320px;}

/* ================= help ================= */
.help-q{display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; margin-left:6px; padding:0; vertical-align:middle; border:1px solid var(--rule); border-radius:50%; background:var(--paper); color:var(--muted); font:600 11px/1 var(--bs-font-sans-serif); cursor:pointer; flex:0 0 auto;}
.help-q:hover, .help-q:focus-visible{border-color:var(--brand); color:var(--brand); background:var(--brand-soft); outline:none;}
h2 .help-q, h3 .help-q{width:20px; height:20px; font-size:12px; margin-left:8px; position:relative; top:-2px;}

.help-search{display:block; width:100%; max-width:640px; margin:6px 0 24px; padding:10px 14px; font-size:15px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card);}
.help-page{max-width:1120px; margin:0 auto;}
.help-layout{display:grid; grid-template-columns:240px minmax(0, 1fr); gap:36px; align-items:start;}
.help-nav{position:sticky; top:84px; display:flex; flex-direction:column; gap:2px;}
.help-nav-item{text-align:left; border:0; background:none; padding:8px 12px; border-radius:var(--radius-sm); font-size:14.5px; color:var(--ink-soft); cursor:pointer;}
.help-nav-item:hover{background:var(--paper-raised); color:var(--ink);}
.help-nav-item.active{background:var(--brand-soft); color:var(--brand); font-weight:600;}
.help-article{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:26px 30px; box-shadow:var(--shadow-sm);}
.help-title{font-size:24px; font-weight:700; letter-spacing:-.015em; margin:0 0 4px;}
.help-summary{color:var(--muted); margin:0 0 8px;}
.help-section{padding:16px 0 4px; border-top:1px solid var(--rule-soft); margin-top:12px; scroll-margin-top:84px; border-radius:var(--radius-sm); transition:background .6s;}
.help-section h3{font-size:17px; font-weight:700; margin:0 0 8px;}
.help-section p, .help-section li{font-size:15px; line-height:1.6; color:var(--ink);}
.help-section ol, .help-section ul{padding-left:22px; margin:0 0 10px;}
.help-section li{margin-bottom:4px;}
.help-tip{margin:10px 0 6px; padding:10px 14px; background:var(--brand-soft); border-left:3px solid var(--brand); border-radius:var(--radius-sm); font-size:14.5px;}
.help-flash{background:#fff7d6;}
.help-hit{display:flex; flex-direction:column; gap:2px; width:100%; text-align:left; border:1px solid var(--rule-soft); background:var(--paper); border-radius:var(--radius-sm); padding:10px 14px; margin-top:10px; cursor:pointer;}
.help-hit:hover{border-color:var(--brand);}
.help-hit span{font-size:13px; color:var(--muted);}
@media (max-width: 860px){
  .help-layout{grid-template-columns:1fr; gap:16px;}
  .help-nav{position:static; flex-direction:row; flex-wrap:wrap; gap:6px;}
  .help-nav-item{border:1px solid var(--rule); font-size:13.5px; padding:6px 10px;}
  .help-article{padding:20px;}
}

.help-drawer{position:fixed; top:68px; right:0; bottom:0; width:420px; max-width:100%; z-index:1150; background:var(--card); border-left:1px solid var(--rule); box-shadow:-10px 0 30px rgba(21,34,56,0.14); display:flex; flex-direction:column;}
.help-drawer[hidden]{display:none;}
.help-drawer-head{display:flex; justify-content:space-between; align-items:center; padding:12px 18px; border-bottom:1px solid var(--rule-soft);}
.help-drawer-body{overflow-y:auto; padding:6px 22px 30px;}
.help-drawer-body .help-title{font-size:20px; margin-top:12px;}
.help-drawer-body .help-section p, .help-drawer-body .help-section li{font-size:14.5px;}

.clients-actions{display:flex; flex-wrap:wrap; gap:10px;}
.onboarding{margin-top:24px; padding:20px 22px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm); max-width:760px;}
.onb-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px;}
.onb-head h2{font-size:18px; font-weight:700; margin:0;}
.onb-head p{margin:2px 0 0; font-size:13.5px; color:var(--muted);}
.onb-dismiss{border:0; background:none; color:var(--muted); font-size:13.5px; cursor:pointer; padding:4px 6px;}
.onb-dismiss:hover{color:var(--ink); text-decoration:underline;}
.onb-bar{height:6px; margin:12px 0 6px; background:var(--paper-raised); border-radius:999px; overflow:hidden;}
.onb-bar div{height:100%; background:var(--good); border-radius:999px; transition:width .4s;}
.onb-steps{list-style:none; margin:0; padding:0;}
.onb-steps li{display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--rule-soft);}
.onb-steps li:last-child{border-bottom:0;}
.onb-check{flex:0 0 22px; width:22px; height:22px; border:2px solid var(--rule); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff;}
.onb-steps li.done .onb-check{background:var(--good); border-color:var(--good);}
.onb-text{flex:1; display:flex; flex-direction:column; min-width:0;}
.onb-text b{font-size:14.5px;}
.onb-text span{font-size:13px; color:var(--muted);}
.onb-steps li.done .onb-text b{color:var(--muted); text-decoration:line-through;}

/* ================= estate ================= */
.heir-row{display:grid; grid-template-columns:1fr; gap:14px; align-items:end; padding:14px 0; border-bottom:1px solid var(--rule-soft);}
.heir-row .remove-btn, .other-asset-row .remove-btn{margin-bottom:6px;}
.estate-will{margin-top:18px; padding:14px 16px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm); max-width:760px;}
.estate-will .hint{margin:2px 0 12px 26px; font-size:12.5px;}
.estate-cost{max-width:280px;}
.estate-warn{color:#9a5b00;}
.benef-row{display:grid; grid-template-columns:1fr; gap:10px 14px; align-items:end; padding:12px 0; border-bottom:1px solid var(--rule-soft);}
.benef-name{font-weight:600; align-self:center;}
.benef-name .hint{display:block; font-weight:400; font-size:12.5px;}
.benef-joint{margin:0; align-self:center; font-size:13.5px; color:var(--muted);}
@media (min-width: 768px){
  .heir-row{grid-template-columns:2fr 1.2fr 1fr auto;}
  .benef-row{grid-template-columns:1.6fr 1.2fr 1.2fr;}
  .benef-row .benef-joint{grid-column:2 / 4;}
  .other-asset-row{grid-template-columns:1.6fr 1.3fr 1fr 1fr auto;}
}
.estate-controls{display:flex; flex-wrap:wrap; gap:14px 28px; align-items:center; margin:4px 0 10px;}
.estate-ctl-label{display:block; font-size:12px; color:var(--muted); margin-bottom:4px;}
.seg{display:inline-flex; border:1px solid var(--rule); border-radius:999px; padding:3px; background:var(--card);}
.seg-btn{border:0; background:none; padding:6px 14px; border-radius:999px; font-size:13.5px; color:var(--ink-soft); cursor:pointer;}
.seg-btn.active{background:var(--brand); color:#fff; font-weight:600;}
.estate-stats{margin-top:16px;}
.estate-warnings{margin:14px 0 0; padding:12px 16px 12px 34px; background:#fff7e6; border:1px solid #f3d9a4; border-radius:var(--radius-sm); font-size:14px; color:#7a4b00;}
.estate-warnings li + li{margin-top:4px;}
.estate-flow{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:14px; overflow-x:auto;}
.estate-flow svg{display:block; min-width:760px;}
.estate-legend{margin-top:8px;}

/* ================= reordering goals ================= */
.goal-drag{flex:0 0 auto; border:0; background:none; padding:4px 2px; margin-left:-4px; color:var(--muted); font-size:18px; line-height:1; cursor:grab; border-radius:var(--radius-sm);}
.goal-drag:hover, .goal-drag:focus-visible{color:var(--ink); background:var(--paper-raised); outline:none;}
.goal-drag:active{cursor:grabbing;}
.goal-actions{display:flex; align-items:center; gap:6px; flex:0 0 auto;}
.goal-move{width:30px; height:30px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); color:var(--ink-soft); font-size:14px; line-height:1; cursor:pointer;}
.goal-move:hover:not([disabled]){border-color:var(--brand); color:var(--brand);}
.goal-move[disabled]{opacity:.35; cursor:default;}
.goal.dragging{opacity:.4;}
.goal.drop-before{box-shadow:0 -3px 0 0 var(--brand);}
.goal.drop-after{box-shadow:0 3px 0 0 var(--brand);}
.goal.goal-moved{animation:goalMoved .9s ease;}
@keyframes goalMoved{from{background:var(--brand-soft);} to{background:var(--card);}}
.goal-locked .goal-head{min-height:40px;}
.goal-locked-name{font-size:17px; font-weight:600;}
.goal-locked-tag{font-size:12px; color:var(--muted); background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:999px; padding:3px 10px;}
.goal-locked-note{margin:4px 0 4px; font-size:14px; color:var(--ink-soft);}
.loan-fields{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:10px 20px; align-items:flex-end; padding:10px 14px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm);}
.loan-fields .field{min-width:170px; margin:0;}
.loan-fields .field label{min-height:0;}
.loan-included{margin-bottom:10px;}
.loan-note{flex:1 1 100%; margin:0; font-size:12.5px; color:var(--ink-soft);}
.mix-add{grid-column:1 / -1; margin-top:-4px; display:flex; align-items:center;}
.mix-fields{grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:10px 16px; align-items:flex-end; padding:10px 14px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm);}
.mix-fields .field{width:110px; margin:0;}
.mix-fields .field label{min-height:0;}
.mix-note{flex:1 1 240px; margin:0 0 8px; font-size:12.5px; color:var(--ink-soft);}
.alloc-verdict{margin:16px 0 4px; font-size:15px;}
#currentAllocHost > p{text-align:center;}
.alloc-verdict.ok{color:var(--good);}
#currentAllocHost .hint{font-size:13px; color:var(--muted); margin:4px 0 0;}
.alloc-compare{display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:20px; max-width:860px; margin:0 auto;}
.alloc-donut{background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow-sm); text-align:center;}
.alloc-donut h4{margin:0 0 6px; font-size:15px; font-weight:700;}
.alloc-donut svg{display:block; margin:0 auto;}
.alloc-legend{list-style:none; margin:10px 0 0; padding:0; text-align:left;}
.alloc-legend li{display:grid; grid-template-columns:14px 1fr auto auto; gap:8px; align-items:center; padding:5px 0; border-top:1px solid var(--rule-soft); font-size:14px;}
.alloc-legend .swatch{width:12px; height:12px; border-radius:3px;}
.alloc-legend b{font-family:var(--bs-font-monospace); font-weight:600;}
.alloc-amt{font-family:var(--bs-font-monospace); color:var(--muted); font-size:13px; min-width:92px; text-align:right;}
.alloc-terms{margin:18px auto 0; max-width:860px; padding:14px 18px; background:var(--paper-raised); border:1px solid var(--rule-soft); border-radius:var(--radius-sm);}
.alloc-terms h4{margin:0 0 6px; font-size:14px; font-weight:700;}
.alloc-terms p{margin:0 0 6px; font-size:14px; line-height:1.55; color:var(--ink-soft);}
.alloc-terms p:last-child{margin-bottom:0;}

/* ================= recommendations ================= */
.recs-block{max-width:900px; margin-top:22px;}
.recs-head{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px;}
.recs-label{display:block; font-size:16px; font-weight:700; color:var(--ink);}
.recs-block > .hint{margin:2px 0 8px; font-size:13px;}
.recs-text{width:100%; min-height:72px; padding:10px 12px; font:inherit; font-size:15px; line-height:1.5; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); resize:vertical;}
.recs-item{padding:14px 16px; margin-bottom:12px; background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); box-shadow:var(--shadow-sm);}
.recs-item-head{display:flex; align-items:center; gap:10px; margin-bottom:8px;}
.recs-num{flex:0 0 26px; height:26px; border-radius:50%; background:var(--brand); color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center;}
.recs-title{flex:1; min-width:0; font-size:16px; font-weight:600; padding:8px 10px; border:1px solid var(--rule); border-radius:var(--radius-sm);}
.recs-step{display:grid; grid-template-columns:1fr 170px 160px auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid var(--rule-soft);}
.recs-step input, .recs-step select{padding:8px 10px; border:1px solid var(--rule); border-radius:var(--radius-sm); font-size:14.5px; background:var(--card); min-width:0;}
.recs-note{max-width:900px;}
@media (max-width: 767.98px){ .recs-step{grid-template-columns:1fr 1fr;} .recs-step input[type="text"]{grid-column:1 / -1;} }
.wi-solver select{width:100%; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.wi-solve-target{display:flex; align-items:center; gap:6px; margin:8px 0 10px;}
.wi-solve-target select{flex:1; width:auto;}
.wi-solve-target input{width:64px; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm);}
.wi-solve-result p{margin:10px 0 8px; font-size:14px; line-height:1.5;}
#recsSaved{font-size:13px; color:var(--muted); margin:12px 0 0;}
#rothReportHost .hint, #ssReportHost .ss-chart .hint{display:block; margin:8px 0 0; font-size:13px; color:var(--muted); max-width:860px;}
.roth-heir{width:72px; padding:6px 8px; font-size:14px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card);}
#healthReportHost .hint{display:block; margin:8px 0 0; font-size:13px; color:var(--muted); max-width:860px;}
.health-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); border:1px solid var(--rule-soft); border-radius:var(--radius-sm); background:var(--paper-raised); margin:16px 0 4px;}
.health-cards > div{padding:14px 20px; border-right:1px solid var(--rule-soft);}
.health-cards > div:last-child{border-right:none;}
.health-cards .num{font-variant-numeric:tabular-nums; font-size:18.5px; font-weight:700;}
.health-cards .lbl{font-size:12.5px; color:var(--muted); margin-top:2px;}
.health-path{margin:0; padding-left:20px; font-size:14px; color:var(--ink-soft);}
.health-path li{margin:2px 0;}
.goal-health .goal-locked-note{padding:0 20px 14px;}
.health-check{display:flex; align-items:center; gap:8px; min-height:44px; font-size:14px; font-weight:400; cursor:pointer;}
.health-check input{width:16px; height:16px;}

/* ---- support tickets + admin ---- */
#view-support textarea, .tk-reply textarea{width:100%; padding:10px 12px; font:inherit; font-size:15px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); color:var(--ink); resize:vertical;}
#view-support select{width:100%;}
.tk-empty{color:var(--muted); font-size:14px; margin:4px 0;}
.tk-list{list-style:none; margin:0; padding:0;}
.tk-list li + li{border-top:1px solid var(--rule-soft);}
.tk-row{display:flex; align-items:center; gap:14px; width:100%; padding:12px 4px; background:none; border:0; text-align:left; font:inherit; color:var(--ink); cursor:pointer; border-radius:var(--radius-sm);}
.tk-row:hover, .tk-row:focus-visible{background:var(--paper-raised);}
.tk-row-main{flex:1; min-width:0; display:flex; flex-direction:column;}
.tk-row-main b{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.tk-row-main small{color:var(--muted); font-size:13px;}
.tk-row-date{color:var(--muted); font-size:13px; min-width:64px; text-align:right;}
.tk-status{display:inline-block; font-size:12px; font-weight:600; padding:2px 9px; border-radius:999px; background:var(--paper-raised); border:1px solid var(--rule-soft); color:var(--ink-soft); white-space:nowrap;}
.tk-open{background:var(--rg-soft); border-color:transparent; color:#0a4fb5;}
.tk-answered{background:#d1e7dd; border-color:transparent; color:#126b42;}
.tk-thread-head{display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; margin-bottom:14px;}
.tk-thread-title{flex:1; min-width:220px;}
.tk-thread-title h2{font-size:19px; margin:2px 0 4px;}
.tk-meta{font-size:13px; color:var(--muted);}
.tk-messages{list-style:none; margin:0 0 16px; padding:0; display:flex; flex-direction:column; gap:10px;}
.tk-msg{border:1px solid var(--rule-soft); border-radius:var(--radius-sm); padding:12px 14px; background:var(--card);}
.tk-from-admin{background:var(--brand-soft); border-color:transparent;}
.tk-msg-head{display:flex; justify-content:space-between; gap:12px; font-size:13px; color:var(--muted); margin-bottom:6px;}
.tk-msg-head b{color:var(--ink);}
.tk-msg-body{white-space:pre-wrap; font-size:15px; line-height:1.5; overflow-wrap:anywhere;}
.tk-actions{display:flex; align-items:center; gap:12px; margin-top:10px;}
.tk-filters{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px;}
.tk-summary{font-size:14px; color:var(--ink-soft); margin:0 0 12px;}
#view-admin #adminHost{background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:18px 20px;}
#adminHost .hint{display:block; margin:10px 0 0; font-size:13px; color:var(--muted);}
.admin-tabs{display:flex; gap:4px; border-bottom:1px solid var(--rule); margin:0 0 16px;}
.admin-tab{background:none; border:0; border-bottom:2px solid transparent; padding:10px 14px; font:inherit; font-weight:600; color:var(--muted); cursor:pointer; margin-bottom:-1px;}
.admin-tab.active{color:var(--ink); border-bottom-color:var(--brand);}
@media (max-width:600px){ .tk-row{flex-wrap:wrap;} .tk-row-date{min-width:0;} }
#view-admin .page-col{max-width:1180px;}
.admin-users .au-name{font-weight:600;}
.admin-users .au-email{display:block; color:var(--muted); font-size:12.5px;}

/* ---- firm branding ---- */
.br-logo-row{display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin:0 0 20px;}
.br-logo-preview{width:240px; height:96px; border:1px dashed var(--rule); border-radius:var(--radius-sm); background:var(--paper-raised); display:flex; align-items:center; justify-content:center; padding:10px; color:var(--muted); font-size:13px;}
.br-logo-preview img{max-width:100%; max-height:100%; object-fit:contain;}
.br-logo-actions{display:flex; flex-wrap:wrap; gap:8px; align-items:center; flex:1; min-width:220px;}
.br-logo-actions .hint{flex-basis:100%; font-size:12.5px; color:var(--muted);}
.br-upload{cursor:pointer; margin:0;}
.br-upload:focus-within, #brLogoFile:focus + .br-upload{outline:2px solid var(--brand); outline-offset:2px;}
.br-color{display:flex; gap:8px; align-items:center;}
.br-color input[type=color]{width:56px; height:40px; padding:2px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); cursor:pointer;}
.br-swatch{display:inline-block; width:14px; height:14px; border-radius:3px; vertical-align:-2px;}
#brandingForm textarea{width:100%; padding:10px 12px; font:inherit; font-size:15px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); color:var(--ink); resize:vertical;}
.firm-logo{max-height:36px; max-width:200px; object-fit:contain; display:block;}
.firm-powered{font-size:11.5px; color:var(--muted); margin-left:10px; white-space:nowrap;}
.fee-row{grid-template-columns:minmax(180px, 240px) 1fr; align-items:end;}
.fee-note{margin:0 0 10px; font-size:14px; color:var(--ink-soft);}
@media (max-width:600px){ .fee-row{grid-template-columns:1fr;} }
.report-scenario-pick{grid-column:1 / -1; margin:0 0 2px; padding:10px 14px; border:1px dashed var(--rule); border-radius:var(--radius-sm); display:flex; flex-wrap:wrap; align-items:center; gap:6px 18px; font-size:14px;}
.report-scn-head{flex-basis:100%; font-weight:600; font-size:13px; color:var(--ink-soft);}
.report-scn-head small{font-weight:400; color:var(--muted);}

/* ---- life insurance needs ---- */
#lifeInsHost .hint{display:block; margin:12px 0 0; font-size:13px; color:var(--muted); max-width:860px;}
.lifeins-card{border:1px solid var(--rule-soft); border-radius:var(--radius); background:var(--card); padding:4px 20px 18px; margin:16px 0;}
.lifeins-head{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap;}
.lifeins-head .ss-h{display:flex; align-items:center; gap:8px; margin:18px 0 10px; white-space:nowrap;}
#lifeInsHost .lifeins-age{width:80px; flex:none; padding:5px 8px; font-size:16px; font-weight:700; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--card); color:var(--ink);}
.lifeins-verdict{font-size:15px; margin:0 0 12px; color:var(--ink);}
.lifeins-card .btn{margin-top:12px;}
.lifeins-card .rpt-table-wrap{max-width:820px;}
.cf-charts{display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:16px; margin:0 0 18px;}
.cf-charts figure{margin:0; background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius-sm); padding:12px 14px 6px;}
.cf-charts figcaption{display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:14px; font-weight:600; color:var(--ink); margin-bottom:4px;}
.cf-legend{font-size:12px; font-weight:400; color:var(--muted); display:flex; align-items:center; gap:5px;}
.cf-legend i{display:inline-block; width:10px; height:10px; border-radius:2px; margin-left:8px;}
.cf-headline{margin:0 0 14px; padding:10px 14px; border-left:3px solid var(--good); background:#d1e7dd; border-radius:var(--radius-sm); font-size:14.5px; color:var(--ink);}

/* ---- time segments ---- */
.ts-cards{display:grid; grid-template-columns:repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap:12px; margin:6px 0 10px;}
.ts-card{background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:14px 14px 12px; display:flex; flex-direction:column; gap:6px; min-width:0;}
.ts-surplus{background:var(--paper-raised); border-style:dashed;}
.ts-card-head{display:flex; justify-content:space-between; align-items:baseline; gap:8px;}
.ts-card-head b{font-size:16px; color:var(--ink);}
.ts-range{display:flex; justify-content:space-between; gap:8px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--brand-2);}
.ts-range span + span{font-weight:500; color:var(--muted); text-transform:none; letter-spacing:0; white-space:nowrap;}
.ts-note{font-size:13px; line-height:1.4; color:var(--ink-soft); margin:0 0 4px;}
.ts-empty .ts-amt{color:var(--muted);}
.ts-empty{background:var(--paper-raised);}
.rpt-table tr.ts-row-empty td{color:var(--muted);}
.ts-card-head span{font-size:12.5px; color:var(--muted); white-space:nowrap;}
.ts-amt{font-size:21px; font-weight:700; font-variant-numeric:tabular-nums; color:var(--ink);}
.ts-sub{font-size:12.5px; color:var(--muted); line-height:1.4;}
.ts-mix{display:flex; height:10px; border-radius:999px; overflow:hidden; background:var(--rule-soft);}
.ts-mix i{display:block; height:100%;}
.ts-goals{list-style:none; margin:4px 0 0; padding:0; font-size:13px; color:var(--ink-soft);}
.ts-goals li{display:flex; align-items:center; gap:6px; margin:2px 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ts-goals li i{display:inline-block; width:8px; height:8px; border-radius:50%; flex:none;}
.ts-goals .ts-more{color:var(--muted); font-size:12.5px;}
.ts-legend{display:flex; gap:16px; font-size:12.5px; color:var(--muted); margin:0 0 8px;}
.ts-legend i{display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px;}
#timeSegHost .hint{display:block; margin:10px 0 0; font-size:13px; color:var(--muted); max-width:860px;}
.ts-explain{font-size:14.5px; color:var(--ink-soft); max-width:860px; line-height:1.55; margin:0;}
.ts-surplus .ts-goals li{white-space:normal;}
.sidebar .sb-group{font-size:12.5px; font-weight:700; color:var(--ink); padding:10px 12px 4px; letter-spacing:.01em;}
.sidebar .sb-group ~ .sb-group{margin-top:8px; border-top:1px solid var(--rule); padding-top:12px;}
.dm-thr{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:14px; font-weight:400; margin-top:8px;} .dm-thr input{width:70px !important;}
#mcDownMarketHost{margin:18px 0 6px;}
.dm-note{font-size:14px; color:var(--ink-soft); max-width:860px; line-height:1.5; margin:6px 0 10px;}
.dm-table{max-width:760px;}

/* ---- Planning Lab ---- */
.dc-layout{display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:20px; align-items:start;}
.dc-metrics{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:14px;}
.dc-metric{background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:12px 16px;}
.dc-metric-lbl{font-size:12.5px; color:var(--muted);}
.dc-metric-val{font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; color:var(--ink); margin:2px 0;}
.dc-metric-val.dc-text{font-size:17px; line-height:1.3; margin:6px 0 4px;}
.dc-metric-base{font-size:12.5px; color:var(--muted);}
.dc-wait{color:var(--muted);}
.dc-chart-card{position:relative; background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:14px 16px 10px;}
.dc-chart-head{display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:14.5px; color:var(--ink); margin-bottom:4px;}
.dc-legend{font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:5px;}
.dc-legend i{display:inline-block; width:10px; height:10px; border-radius:2px; margin-left:10px;}
.dc-chart svg{display:block; width:100%; height:auto;}
.dc-readout{font-size:13.5px; color:var(--ink-soft); min-height:20px; padding:6px 2px 0;}
.dc-band{fill:var(--brand-2); opacity:0; pointer-events:none;}
.dc-hovering .dc-band{opacity:.09;}
.dc-bar{transition:opacity .12s;}
.dc-hovering .dc-bar{opacity:.35;}
.dc-hovering .dc-bar.on{opacity:1;}
.dc-tip{position:absolute; z-index:5; pointer-events:none; min-width:200px; background:var(--card); border:1px solid var(--rule-soft); border-radius:8px; box-shadow:0 6px 20px rgba(20,41,77,.16); padding:8px 12px; font-size:13px; color:var(--ink-soft);}
.dc-tip-head{display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-bottom:5px; margin-bottom:4px; border-bottom:1px solid var(--rule-soft); color:var(--ink);}
.dc-tip-head span{font-size:12px; color:var(--muted);}
.dc-tip-row{display:flex; justify-content:space-between; gap:16px; padding:1px 0; font-variant-numeric:tabular-nums;}
.dc-tip-row.strong{font-weight:700; color:var(--ink);}
#decisionHost .hint{display:block; margin:10px 0 0; font-size:13px; color:var(--muted);}
.dc-side{background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:14px 16px; position:sticky; top:84px; max-height:calc(100vh - 100px); overflow-y:auto;}
.dc-side-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:15px;}
.dc-group{border-top:1px solid var(--rule-soft); padding:10px 0 4px;}
.dc-group h4{font-size:12.5px; font-weight:700; color:var(--ink); margin:0 0 6px; text-transform:uppercase; letter-spacing:.04em;}
.dc-ctl{margin:0 0 12px;}
.dc-ctl-head{display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:13.5px; color:var(--ink-soft);}
.dc-ctl-head output{font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums;}
.dc-ctl input[type=range]{width:100%; accent-color:var(--brand-2); margin:4px 0 0;}
.dc-ctl select{width:100%; margin-top:4px;}
.dc-ctl-foot{display:flex; justify-content:space-between; font-size:11.5px; color:var(--muted);}
.dc-money{display:inline-flex; align-items:center; gap:2px; border:1px solid var(--rule); border-radius:var(--radius-sm); padding:2px 8px; background:var(--paper); font-weight:700; color:var(--ink);}
.dc-money:focus-within{border-color:var(--brand-2); box-shadow:var(--focus-ring);}
.dc-money input{width:84px; border:0; outline:0; background:transparent; font:inherit; font-variant-numeric:tabular-nums; text-align:right; padding:2px 0; color:inherit;}
.dc-field{display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--ink-soft); margin:0 0 10px;}
.dc-field select, .dc-group > select{width:100%; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.dc-top{border-top:0; padding-top:4px;}
.dc-side .wi-section{padding:10px 0; border-bottom:0; border-top:1px solid var(--rule-soft);}
.dc-side .wi-section h4{font-size:12.5px; color:var(--ink); letter-spacing:.04em; margin:0 0 6px;}
.dc-side .wi-solve-target select{min-width:0;}
.dc-side .wi-solve-target input{width:52px; flex:none;}
.dc-note{font-size:12px; color:var(--muted); margin:-2px 0 8px;}
.dc-acc{border-top:1px solid var(--rule-soft);}
.dc-acc > summary{display:flex; align-items:center; gap:8px; padding:11px 2px; cursor:pointer; list-style:none; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink);}
.dc-acc > summary::-webkit-details-marker{display:none;}
.dc-acc > summary::after{content:""; margin-left:auto; width:8px; height:8px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); transition:transform .15s; margin-right:4px;}
.dc-acc[open] > summary::after{transform:rotate(-135deg);}
.dc-acc > summary:hover{color:var(--brand-2);}
.dc-acc > summary:focus-visible{outline:2px solid var(--brand-2); outline-offset:2px; border-radius:4px;}
.dc-acc-dot{width:7px; height:7px; border-radius:50%; background:var(--brand-2); flex:none;}
.dc-acc-body{padding:0 0 10px;}
.dc-acc .wi-solver{border-top:0; padding-top:0;}
.dc-acc .wi-solver > h4{display:none;}
.dc-person h5{font-size:13.5px; font-weight:700; color:var(--ink-soft); margin:6px 0 6px;}
.dc-person + .dc-person{border-top:1px dashed var(--rule-soft); padding-top:6px;}
.dc-acc-body > select{width:100%; font-size:14px; padding:6px 8px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.dc-onetime{display:grid; grid-template-columns:1fr 108px 30px; gap:6px; padding:8px; margin-bottom:8px; background:var(--paper-raised); border-radius:var(--radius-sm);}
.dc-onetime select, .dc-onetime input[type=number], .dc-onetime input[type=text]:not(.dc-money input){width:100%; min-width:0; font-size:13.5px; padding:5px 7px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.dc-onetime [data-dcot="label"]{grid-column:1 / 2;}
.dc-onetime .dc-money{grid-column:2 / 4; padding:0 7px; font-weight:400; font-size:13.5px; background:var(--paper);}
.dc-onetime .dc-money input{width:100%; text-align:left;}
.dc-onetime .remove-btn{padding:4px 8px;}
.dc-newgoal, .dc-windfall{grid-template-columns:1fr 84px 30px;}
.dc-newgoal [data-dcot="label"], .dc-windfall [data-dcot="label"]{grid-column:1 / 3;}
.dc-newgoal .dc-money, .dc-windfall .dc-money{grid-column:auto;}
.dc-windfall .dc-money{grid-column:1 / 2;}
.dc-windfall [data-dcot="year"]{grid-column:2 / 4;}
.dc-years{display:flex; align-items:center; gap:3px; font-size:12px; color:var(--muted); grid-column:3 / 4; white-space:nowrap;}
.dc-newgoal{grid-template-columns:1fr 72px 62px;}
.dc-newgoal .remove-btn{justify-self:end;}
.dc-years input{width:34px !important; padding:5px 3px !important; text-align:center;}
.dc-goal{padding:8px 0; border-bottom:1px dashed var(--rule-soft);}
.dc-goal:last-of-type{border-bottom:0;}
.dc-goal-name{display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer; margin:0 0 6px;}
.dc-goal-name input{width:16px; height:16px; accent-color:var(--brand); flex:none;}
.dc-goal-fields{display:flex; align-items:center; gap:6px; padding-left:24px;}
.dc-goal-fields .dc-money{font-weight:600; font-size:14px; padding:2px 7px;}
.dc-goal-fields .dc-money input{width:70px;}
.dc-onetime .dc-money input, .dc-onetime .dc-money{font-size:13.5px;}
.dc-goal-unit{font-size:12px; color:var(--muted); white-space:nowrap;}
.dc-goal-start{display:flex; align-items:center; gap:4px; font-size:12.5px; color:var(--muted); margin:0 0 0 auto;}
.dc-goal-start input{width:70px; font-size:13.5px; padding:4px 4px 4px 6px; border:1px solid var(--rule); border-radius:var(--radius-sm); background:var(--paper);}
.dc-goal-meta{font-size:12px; color:var(--muted); padding:4px 0 0 24px;}
.dc-goal-plan{color:var(--brand-2); font-weight:600;}
.dc-goal.is-off .dc-goal-name span{text-decoration:line-through; color:var(--muted);}
.dc-goal.is-off .dc-goal-fields, .dc-goal.is-off .dc-goal-meta{opacity:.45;}
.dc-acc [data-dcadd]{margin-top:8px;}
.dc-cat-swatch{display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:7px; vertical-align:0;}
.dc-planned{color:var(--brand-2); font-weight:600;}
.dc-save{border-top:1px solid var(--rule-soft); padding-top:12px; display:flex; flex-wrap:wrap; gap:8px;}
.dc-save input{flex:1 1 100%;}
.dc-legend i.dc-line{width:16px; height:0; border-top:2px dashed #E0773C; border-radius:0;}
.dc-toggle{display:inline-flex; background:var(--paper-raised); border:1px solid var(--rule); border-radius:999px; padding:3px;}
.dc-toggle button{border:0; background:none; font:inherit; font-size:13.5px; font-weight:600; color:var(--ink-soft); padding:6px 14px; border-radius:999px; cursor:pointer;}
.dc-toggle button.active{background:var(--card); color:var(--ink); box-shadow:0 1px 3px rgba(21,34,56,.15);}
.dc-chart-head{align-items:center;}
.dc-legend{flex-wrap:wrap;}
.dc-legend i.dc-line-red{border-top:2px solid var(--ink);}
.dc-table-card{margin-top:14px; background:var(--card); border:1px solid var(--rule-soft); border-radius:var(--radius); padding:12px 14px;}
.dc-table{margin:0;}
.dc-chart{touch-action:pan-y;}
.dc-table-scroll{max-height:380px; overflow:auto; border:1px solid var(--rule-soft); border-radius:var(--radius-sm); position:relative;}
.dc-table-scroll table{margin:0;}
.dc-table-scroll thead th{position:sticky; top:0; background:var(--paper-raised); z-index:1;}
.dc-table-scroll tr.dc-row-on td{background:var(--brand-soft);}

/* ---- presentation mode ---- */
.results-actions{display:flex; gap:8px; align-items:center;}
body.presenting .topnav nav,
body.presenting #userMenu,
body.presenting #presentBtn,
body.presenting #editGoalsBtn,
body.presenting #backToClientsFromResults,
body.presenting #backToClientsFromWs,
body.presenting .help-q{display:none !important;}
body.presenting #navBrand{pointer-events:none; cursor:default;}
.present-exit{position:fixed; right:18px; bottom:18px; z-index:1200; border:1px solid var(--rule); background:var(--card); color:var(--ink-soft); font:inherit; font-size:13px; font-weight:600; padding:8px 14px; border-radius:999px; box-shadow:0 2px 10px rgba(21,34,56,.15); cursor:pointer; opacity:.75;}
.present-exit:hover, .present-exit:focus-visible{opacity:1; color:var(--ink);}
.present-exit[hidden]{display:none;}

/* ---- Planning Lab on tablets and phones ---- */
/* The figures go 2 × 2 when the chart column is narrow (iPad landscape, with the sidebar). */
.dc-main{container-type:inline-size;}
@container (max-width: 640px){ .dc-metrics{grid-template-columns:repeat(2, minmax(0, 1fr));} }
/* Tablet portrait and phones: one column, in the order figures, chart, adjustments, table, so
   the controls sit right under the chart. */
@media (max-width: 1100px){
  .dc-layout{grid-template-columns:minmax(0, 1fr); gap:14px;}
  .dc-main{display:contents;}
  .dc-metrics{order:1; margin-bottom:0;}
  .dc-chart-card{order:2;}
  .dc-side{order:3; position:static; max-height:none; overflow:visible;}
  .dc-table-card{order:4; margin-top:0;}
  #decisionHost .dc-main > .hint{order:5; margin-top:0;}
}
@media (max-width: 600px){
  .dc-metrics{grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px;}
  .dc-metric{padding:10px 12px;}
  .dc-metric-val{font-size:20px;}
  .dc-metric-val.dc-text{font-size:15px;}
  .dc-chart-card{padding:10px 10px 8px;}
  .dc-side{padding:12px;}
  .dc-table-card{padding:8px;}
}

/* ---- phones: top bar and page heading ---- */
.user-menu-nav{display:none;}
@media (max-width: 600px){
  /* The Clients / Assumptions / Methodology / Help links move into the account menu. */
  .topnav nav{display:none;}
  .user-menu{margin-left:auto;}
  .user-menu-nav{display:block;}
  .wrap{padding:24px 16px 96px;}
  h1.page-title{font-size:26px; line-height:1.15;}
  .results-banner{flex-direction:column; align-items:flex-start; gap:12px;}
  section.block{margin-top:36px;}
  .block-head h2{font-size:21px;}
}
@media (max-width: 600px){
  /* Overview's goal-category rows: the "(67% of household)" note drops under the amount. */
  .cat-bar-row-head .amt{white-space:normal; text-align:right; font-size:13px;}
  .cat-bar-row-head .amt span{display:block;}
}

/* ---- "How we got this" (Overview › recommended allocation) ---- */
.alloc-explain{margin:22px 0 0; text-align:left; border-top:1px solid var(--rule-soft); padding-top:14px;}
.alloc-explain > summary{display:inline-flex; align-items:center; gap:8px; cursor:pointer; list-style:none; font-size:14.5px; font-weight:600; color:var(--brand-2); padding:6px 14px; border:1px solid var(--rule); border-radius:999px; background:var(--card);}
.alloc-explain > summary::-webkit-details-marker{display:none;}
.alloc-explain > summary::after{content:""; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:-3px 2px 0 2px; transition:transform .15s;}
.alloc-explain[open] > summary::after{transform:rotate(-135deg); margin-top:3px;}
.alloc-explain > summary:hover{border-color:var(--brand-2);}
.ex-body{margin-top:14px;}
.ex-steps{margin:0 0 16px; padding-left:20px; font-size:14.5px; line-height:1.55; color:var(--ink-soft); display:grid; gap:4px;}
.ex-steps b{color:var(--ink);}
.ex-table td.t{white-space:normal; min-width:260px;}
.ex-goal{display:flex; align-items:center; gap:7px; font-weight:600; color:var(--ink); font-family:var(--bs-font-sans-serif);}
.ex-goal i{width:9px; height:9px; border-radius:50%; flex:none;}
.ex-why{display:block; font-size:12.5px; line-height:1.45; color:var(--muted); margin-top:2px; font-family:var(--bs-font-sans-serif);}
.ex-note{font-size:13.5px; color:var(--danger); margin:10px 0 0;}
.ex-glide{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; margin-top:12px; font-size:13px; color:var(--ink-soft);}
.ex-glide b{color:var(--ink); margin-right:2px;}
.ex-glide span{white-space:nowrap; font-variant-numeric:tabular-nums;}
.ex-glide em{font-style:normal; color:var(--muted); margin-right:3px;}
.alloc-explain .rpt-table-wrap{max-height:none;} /* the whole table, not a scroll box */

/* ---- tables inside help articles ---- */
.help-table-wrap{overflow-x:auto; margin:6px 0 10px; border:1px solid var(--rule); border-radius:var(--radius-sm);}
.help-table{width:100%; border-collapse:collapse; font-size:14px; line-height:1.45;}
.help-table th{text-align:left; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:var(--paper-raised); padding:9px 12px; border-bottom:1px solid var(--rule);}
.help-table td{padding:10px 12px; border-bottom:1px solid var(--rule-soft); vertical-align:top; color:var(--ink-soft);}
.help-table tr:last-child td{border-bottom:0;}
.help-table td:first-child{color:var(--ink); min-width:150px;}
.help-table td:last-child{color:var(--muted); min-width:150px;}

/* ---- quick start ---- */
.qs-card{max-width:680px;}
.qs-h{display:flex; align-items:baseline; gap:10px; font-size:17px; font-weight:700; color:var(--ink); margin:26px 0 12px; padding-top:18px; border-top:1px solid var(--rule-soft);}
.qs-h:first-child{margin-top:0; padding-top:0; border-top:0;}
.qs-h span{display:inline-grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--brand); color:#fff; font-size:13px; flex:none;}
.qs-h small{font-size:12.5px; font-weight:500; color:var(--muted);}
.qs-grid{display:grid; grid-template-columns:1fr 1fr; gap:4px 16px;}
.qs-grid .field{display:flex; flex-direction:column; gap:5px; margin-bottom:12px; font-size:13.5px; color:var(--ink-soft);}
.qs-money{display:flex; align-items:center; gap:4px; border:1px solid var(--rule); border-radius:var(--radius-sm); padding:0 10px; background:var(--paper); color:var(--muted);}
.qs-money:focus-within{border-color:var(--brand-2); box-shadow:var(--focus-ring);}
.qs-money input{border:0; outline:0; background:transparent; padding:8px 0; width:100%; min-width:0; font:inherit; font-size:15px; color:var(--ink); font-variant-numeric:tabular-nums;}
.qs-person{margin-bottom:6px;}
.qs-person > b{display:block; font-size:14px; color:var(--ink); margin:0 0 6px;}
.qs-card .qs-hint{display:block; margin:-4px 0 12px !important; font-size:13px; line-height:1.45; color:var(--muted);}
.qs-goal{display:grid; grid-template-columns:1.2fr 1.15fr 1fr 74px 56px auto; gap:6px; align-items:center; margin-bottom:8px;}
.qs-goal > input, .qs-goal > select, .qs-years input{border:1px solid var(--rule); border-radius:var(--radius-sm); padding:8px 8px; font-size:14px; background:var(--paper); min-width:0; width:100%;}
.qs-goal .qs-money input{padding:7px 0; font-size:14px;}
.qs-years{display:flex; align-items:center; gap:4px; font-size:12.5px; color:var(--muted);}
.qs-years input{padding:8px 4px; text-align:center;}
.qs-msg{color:var(--danger); font-size:14px; min-height:1.2em; margin:14px 0 4px;}
@media (max-width: 600px){
  .qs-grid{grid-template-columns:1fr;}
  .qs-goal{grid-template-columns:1fr 1fr; padding:8px; background:var(--paper-raised); border-radius:var(--radius-sm);}
  .qs-goal [data-g="label"]{grid-column:1 / 3;}
}

/* ---- guided tour ---- */
.tour-layer{position:fixed; inset:0; z-index:1300;}
.tour-block{position:absolute; inset:0;} /* the page can't be clicked while touring */
.tour-layer.tour-dim .tour-block{background:rgba(21,34,56,.45);}
.tour-spot{position:fixed; border-radius:12px; box-shadow:0 0 0 3px var(--brand-2), 0 0 0 9999px rgba(21,34,56,.45); pointer-events:none; transition:top .25s, left .25s, width .25s, height .25s;}
.tour-card{position:fixed; width:min(380px, calc(100vw - 24px)); background:var(--card); border-radius:14px; box-shadow:0 18px 50px -12px rgba(21,34,56,.45); padding:18px 20px 16px; transition:top .25s, left .25s;}
.tour-card.tour-center{left:50% !important; top:50% !important; transform:translate(-50%, -50%);}
.tour-card.tour-corner{left:auto !important; top:auto !important; right:20px; bottom:20px;}
.tour-count{font-size:12px; font-weight:700; color:var(--brand-2); text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px;}
.tour-card h3{font-size:18px; font-weight:700; color:var(--ink); margin:0 0 6px;}
.tour-card p{font-size:14.5px; line-height:1.55; color:var(--ink-soft); margin:0 0 14px;}
.tour-actions{display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap;}
.tour-skip{margin-right:auto; border:0; background:none; padding:4px 0; font:inherit; font-size:13.5px; color:var(--muted); cursor:pointer;}
.tour-skip:hover{color:var(--ink);}
@media (max-width: 600px){
  .tour-card, .tour-card.tour-corner{left:12px !important; right:12px; top:auto !important; bottom:12px; width:auto; transform:none;}
}
@media (prefers-reduced-motion: reduce){ .tour-spot, .tour-card{transition:none;} }

/* ---- Planning Lab: what a scenario changes; saved scenarios ---- */
.dc-scn-info:empty{display:none;}
.dc-scn-info{margin:-2px 0 12px; padding:10px 12px; background:var(--brand-soft); border-radius:var(--radius-sm); font-size:13px; color:var(--ink-soft);}
.dc-scn-head{margin-bottom:4px; color:var(--ink);}
.dc-changes{margin:0 0 8px; padding-left:18px; font-size:12.5px; line-height:1.45; color:var(--ink-soft); display:grid; gap:2px;}
.dc-scn-info .dc-changes:last-child{margin-bottom:0;}
.dc-saved{padding:10px 0; border-bottom:1px dashed var(--rule-soft);}
.dc-saved:last-child{border-bottom:0;}
.dc-saved-head{display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink); margin-bottom:4px;}
.dc-saved-tag{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--brand-2); background:var(--brand-soft); padding:1px 7px; border-radius:999px;}
.dc-saved-actions{display:flex; gap:6px;}

/* ---- two-step verification ---- */
.auth-code{font-size:22px !important; letter-spacing:.3em; text-align:center; font-variant-numeric:tabular-nums;}
.mfa-status{display:flex; align-items:center; gap:8px; font-size:14.5px; color:var(--ink-soft); margin:0 0 10px;}
.mfa-status b, .mfa-status{font-weight:600;}
.mfa-dot{width:9px; height:9px; border-radius:50%; background:var(--muted); flex:none;}
.mfa-status.on{color:var(--ink);}
.mfa-status.on .mfa-dot{background:var(--good);}
.mfa-list{list-style:none; margin:0 0 10px; padding:0; border:1px solid var(--rule); border-radius:var(--radius-sm);}
.mfa-list li{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border-bottom:1px solid var(--rule-soft);}
.mfa-list li:last-child{border-bottom:0;}
.mfa-list li span{display:flex; flex-direction:column; font-size:14px; color:var(--ink);}
.mfa-list small{font-size:12.5px; color:var(--muted);}
.mfa-hint{margin:0 0 12px !important;}
.mfa-steps{margin:0 0 10px; padding-left:20px; font-size:14.5px; line-height:1.55; color:var(--ink-soft);}
.mfa-qr{display:inline-block; padding:10px; background:#fff; border:1px solid var(--rule); border-radius:var(--radius-sm); margin:0 0 8px 20px;}
.mfa-qr img{display:block;}
.mfa-secret{margin:0 0 14px 20px !important;}
.mfa-secret code{font-size:13px; background:var(--paper-raised); padding:2px 6px; border-radius:4px; word-break:break-all;}
.mfa-code{width:140px !important; font-size:18px !important; padding:6px 10px; border:1px solid var(--rule); border-radius:var(--radius-sm);}
