html {
  overflow-x: hidden;
}

body.analysis-page {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background: #f6f1e3;
  color: #24384d;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.analysis-page .fin-container {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 18px auto 22px;
  padding: 5px 9px 10px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e7d8b7;
  border-radius: 18px;
  clip-path: inset(0 round 18px);
  gap: 0;
}

.analysis-page .fin-card,
.analysis-page .fin-card.outline,
.analysis-page .analysis-focus-card,
.analysis-page .totals-card,
.analysis-page .save-card {
  margin: 0;
  padding: 8px 0 9px;
  background: transparent;
  border: 0;
  border-radius: 0;
  clip-path: inset(0);
}

.analysis-page .fin-card + .fin-card,
.analysis-page .fin-card + .callout,
.analysis-page .callout + .fin-card {
  margin-top: 10px;
  padding-top: 8px;
}

.report-toolbar,
.print-report-header {
  margin: 0;
}

.print-report-header {
  display: none;
}

.financial-workflow-only,
.irs-financial-forms-card,
.print-substantiation,
.print-report-footer {
  display: none;
}

body.financial-analysis-irs-forms .irs-financial-forms-card {
  display: block;
}

body.financial-analysis-workflow .financial-workflow-only {
  display: block;
}

body.financial-analysis-workflow .financial-workflow-only[hidden] {
  display: none !important;
}

body.financial-analysis-workflow summary .financial-workflow-only {
  display: inline;
}

body.financial-analysis-workflow .print-report-footer {
  display: none;
}

.analysis-page #save-profile-card,
.analysis-page #irs-financial-forms {
  width: min(100%, 980px);
  max-width: 980px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  clip-path: none;
}

.analysis-page #save-profile-card {
  margin-top: 0;
  margin-bottom: 10px;
  padding: 0 9px;
}

.analysis-page #irs-financial-forms {
  margin-top: 0;
  margin-bottom: 24px;
  padding: 0 9px;
}

.analysis-page #irs-financial-forms .section-heading {
  margin-bottom: 12px;
}

.irs-form-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; }
.irs-form-options article { border:1px solid #d8ccb1; border-radius:8px; padding:12px 14px; background:#fffdf7; }
.irs-form-options h3 { color:#0a2948; margin:0 0 4px; }
.irs-form-options p { margin:0; color:#4a5562; }
.irs-form-options .coming-soon { opacity:.68; }
.irs-form-options article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  align-items: center;
  min-height: 92px;
}

.irs-form-options h3 {
  grid-column: 1 / -1;
}

.irs-form-options .irs-form-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid #b98518;
  border-radius: 6px;
  background: #edbd43;
  color: #071425;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  justify-self: end;
}

.financial-action-back {
  background: #0b315f;
  color: #ffffff;
  border-color: #0a2f58;
}
.irs-form-options .irs-form-action:not(:disabled):hover {
  filter: brightness(0.97);
}
.irs-form-options .irs-form-action:disabled,
.irs-form-options .irs-form-action.muted-gold {
  background: #dfc77c;
  border-color: #c6a752;
  color: #5c4a1d;
  box-shadow: none;
  cursor: not-allowed;
}

.legacy-investment-title {
  display: none;
}

.legacy-print-report-title {
  display: none;
}

.legacy-primary-additional-control {
  display: none;
}

.analysis-page .income-decrease-question {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 2px 0 7px;
  color: #173b67;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.25;
}

body.financial-analysis-workflow .income-decrease-question {
  display: flex;
}

.analysis-page .income-decrease-question label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
}

.analysis-page .income-decrease-question input {
  width: auto;
  min-height: 0;
  margin: 0;
  transform: scale(1.08);
}

.analysis-page .income-decrease-proof {
  max-width: 820px;
  margin: 0 auto 7px;
  color: #821b1b;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.28;
  text-align: center;
}

.analysis-page .asset-total-summary {
  margin-top: 7px;
  color: #123d73;
  text-align: right;
  font-weight: 700;
}

.analysis-page #tbl-expense-comparison tbody td:first-child {
  position: relative;
}

.expense-substantiation-warning {
  position: absolute;
  top: 50%;
  right: 6px;
  width: min(225px, 58%);
  transform: translateY(-50%);
  color: #b42318;
  font-size: 0.76rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.02;
  text-align: right;
  white-space: normal;
  margin: 0;
  padding: 0;
}

.expense-substantiation-warning.two-line {
  max-height: 20px;
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 0.9;
}

.analysis-page .fin-card h2,
.analysis-page .totals-card h2,
.analysis-page .save-card h2 {
  margin: 0 0 6px;
  color: #123d73;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.analysis-page .fin-card h3 {
  margin: 0 0 6px;
  color: #123d73;
  font-size: 1.08rem;
  font-weight: 750;
}

.analysis-page .subtext {
  margin: 0 0 8px;
  color: #3f556a;
  font-size: 0.99rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
}

.analysis-page .subtext.stacked span {
  display: block;
}

.analysis-page .subtext.narrow,
.analysis-page .subtext.center {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 2px;
}

.analysis-page .income-main-heading {
  margin-bottom: 2px;
}

.analysis-page .income-main-heading h2 {
  margin: 0;
  color: #123d73;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.analysis-page .callout,
.analysis-page .household-note,
.analysis-page .section-note-box,
.analysis-page .occupancy-toggle {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid #dcc180;
  border-radius: 14px;
  background: #f7ebcf;
  color: #413113;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.household-note span + span {
  display: block;
}

.analysis-page .callout {
  margin: 4px auto 10px;
  width: min(100%, 1040px);
  box-sizing: border-box;
  padding: 14px 18px;
  line-height: 1.55;
  font-size: 0.95rem;
  text-align: left;
}

.analysis-page .table-block,
.analysis-page #business-section {
  margin-top: 10px;
}

.analysis-page details[data-fin-accordion] {
  margin-top: 6px;
  padding-top: 0;
}

.analysis-page details[data-fin-accordion] + details[data-fin-accordion] {
  margin-top: 4px;
  border-top: 1px solid #e4d1a6;
  padding-top: 5px;
}

.analysis-page details.pl-nested {
  margin: 7px 0 0 14px;
  padding: 6px 8px 7px 10px;
  border: 1px solid #d8e2ee;
  border-left: 4px solid #2d63bc;
  background: #f8fbff;
}

.simplified-business-table {
  margin: 8px 0 12px;
}

.simplified-business-table input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .analysis-page .fin-container {
    width: calc(100% - 20px);
  }
}

.analysis-page details.pl-nested + details.pl-nested {
  border-top: 1px solid #d8e2ee;
}

.analysis-page details.pl-nested > summary {
  font-size: 0.96rem;
  color: #174b82;
}

.analysis-page details[data-fin-accordion] > summary {
  position: relative;
  margin: 0 0 5px;
  padding-left: 18px;
  color: #123d73;
  font-size: 1.1rem;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.analysis-page .pl-table th:nth-child(1),
.analysis-page .pl-table td:nth-child(1) { width: 28%; }
.analysis-page .pl-table th:nth-child(2),
.analysis-page .pl-table td:nth-child(2) { width: 17%; }
.analysis-page .pl-table th:nth-child(3),
.analysis-page .pl-table td:nth-child(3) { width: 18%; }
.analysis-page .pl-table th:nth-child(4),
.analysis-page .pl-table td:nth-child(4) { width: 22%; }
.analysis-page .pl-table th:nth-child(5),
.analysis-page .pl-table td:nth-child(5) { width: 15%; }

.analysis-page [data-pl-custom-range] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.analysis-page [data-pl-custom-range] select {
  width: auto;
  min-width: 52px;
  padding: 0 2px;
  font-size: 0.82rem;
}

.analysis-page details[data-fin-accordion] > summary::-webkit-details-marker {
  display: none;
}

.analysis-page details[data-fin-accordion] > summary::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: #123d73;
  font-size: 0.95rem;
}

.analysis-page details[data-fin-accordion][open] > summary::before {
  content: "▾";
}

.analysis-page .fin-table {
  width: 100%;
  margin-top: 2px;
  border-collapse: separate;
  border-spacing: 0;
  border-top: 1px solid #efe4c8;
  border-left: 1px solid #efe4c8;
  table-layout: fixed;
  font-size: 0.92rem;
}

.analysis-page .fin-table tr {
  position: relative;
}

.analysis-page .fin-table th,
.analysis-page .fin-table td {
  border: 0;
  border-right: 1px solid #efe4c8;
  border-bottom: 1px solid #efe4c8;
  padding: 3px 18px 3px 8px;
  height: 24px;
  vertical-align: middle;
  text-align: left;
}

.analysis-page .fin-table th {
  background: #fbf5e2;
  color: #4d3a0f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.analysis-page .fin-table td {
  color: #31475d;
  font-weight: 500;
}

.analysis-page .fin-table.striped tbody tr:nth-child(odd) td {
  background: #fffefb;
}

.analysis-page .fin-table.striped tbody tr:nth-child(even) td {
  background: #fefcf7;
}

.analysis-page .fin-table .small,
.analysis-page .micro.small {
  font-size: 0.68rem;
  font-weight: 500;
  font-style: italic;
}

.analysis-page .fin-table .indent {
  padding-left: 14px;
}

.analysis-page .fin-table input,
.analysis-page .fin-table select,
.analysis-page .fin-table textarea,
.analysis-page .case-row input,
.analysis-page .case-row textarea {
  width: 100%;
  min-height: 22px;
  padding: 1px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #18324d;
  font-size: 0.9rem;
}

.analysis-page .fin-table textarea,
.analysis-page .case-row textarea {
  min-height: 64px;
  resize: vertical;
}

.analysis-page .fin-table input:focus,
.analysis-page .fin-table select:focus,
.analysis-page .fin-table textarea:focus,
.analysis-page .case-row input:focus,
.analysis-page .case-row textarea:focus {
  outline: none;
  border-color: transparent;
  background: transparent;
}

.analysis-page .fin-table input[readonly],
.analysis-page .fin-table textarea[readonly],
.analysis-page .proposed-input[readonly] {
  background: transparent;
  color: #123d73;
}

.analysis-page .fin-table input.calculated-field[readonly] {
  color: #0f3f69;
  font-weight: 750;
  text-align: center;
}

.analysis-page .monthly-net-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.analysis-page .calculated-helper {
  color: #5d7185;
  font-size: 0.66rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
  max-width: 150px;
  white-space: normal;
}

.analysis-page .household-table select,
.analysis-page .fin-table select {
  font-size: 0.9rem;
}

.analysis-page #tbl-expenses-1 th:nth-child(2),
.analysis-page #tbl-expenses-1 td:nth-child(2),
.analysis-page #tbl-expenses-2 th:nth-child(2),
.analysis-page #tbl-expenses-2 td:nth-child(2) {
  text-align: center;
}

.analysis-page #tbl-expenses-1 td:nth-child(2) input,
.analysis-page #tbl-expenses-2 td:nth-child(2) input {
  text-align: center;
}

.analysis-page .review-table th:first-child,
.analysis-page .review-table td:first-child {
  width: 40%;
}

.analysis-page .review-table th:nth-child(2),
.analysis-page .review-table th:nth-child(3),
.analysis-page .review-table th:nth-child(4),
.analysis-page .review-table td:nth-child(2),
.analysis-page .review-table td:nth-child(3),
.analysis-page .review-table td:nth-child(4) {
  width: 20%;
}

.analysis-page #tbl-expense-comparison th:nth-child(n + 2),
.analysis-page #tbl-expense-comparison td:nth-child(n + 2),
.analysis-page #tbl-totals th:nth-child(n + 2),
.analysis-page #tbl-totals td:nth-child(n + 2) {
  text-align: center;
}

.analysis-page #tbl-expense-comparison td:nth-child(4) .proposed-input,
.analysis-page #tbl-totals td:nth-child(4) .proposed-input {
  text-align: center;
}

.analysis-page .read-value,
.analysis-page .money {
  color: #20364a;
  font-weight: 500;
}

.analysis-page .read-value.total,
.analysis-page .money.total,
.analysis-page .total-row .money {
  font-weight: 700;
}

.analysis-page .line-note {
  display: block;
  margin-top: 2px;
  color: #5d7185;
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.2;
}

.analysis-page .total-row td {
  background: #fffdf8;
}

.row-remove {
  position: absolute;
  right: 5px;
  top: 4px;
  background: transparent;
  border: 0;
  color: #b52d2d;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  transition: transform 0.08s ease, filter 0.08s ease, box-shadow 0.08s ease, color 0.12s ease;
}

.row-remove:hover {
  filter: brightness(0.92);
}

.row-remove:active {
  transform: translateY(1px) scale(0.96);
}

.fin-table td:last-child { position: relative; padding-right: 36px; }

.monthly-net-heading { width: 100%; }
.calculated-helper {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
}

.simplified-top-level { margin-top: 10px; }

.row-remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(181, 45, 45, 0.18);
}

.analysis-page .cta-row,
.analysis-page .section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.analysis-page .cta-row.left,
.analysis-page .section-actions {
  justify-content: flex-start;
}

.analysis-page .btn-primary,
.analysis-page .btn-secondary {
  clip-path: inset(0 round 8px);
}

.analysis-page .btn-gold {
  background: #f2c14e;
  color: #071425;
  border-color: #c8921e;
}

.analysis-page .save-actions .print-report-action {
  background: #eef1f4;
  color: #24313f;
  border-color: #b8c0ca;
}

.analysis-page .irs-form-options .irs-form-action:not(:disabled) {
  background: #edbd43;
  border-color: #b98518;
  color: #071425;
}

.analysis-page .irs-form-options .irs-form-action:disabled,
.analysis-page .irs-form-options .irs-form-action.muted-gold {
  background: #dfc77c;
  border-color: #c6a752;
  color: #5c4a1d;
}

body.analysis-page.profile-linked-workspace #save-draft-button,
.analysis-page #save-draft-button,
.analysis-page .btn-secondary {
  background: #123d73;
  color: #fff;
  border-color: #123d73;
}

.analysis-page .save-actions .btn-secondary,
.analysis-page .save-actions .print-report-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #b8c0ca;
  border-radius: 8px;
  background: #eef1f4;
  color: #24313f;
  font-size: 13.3333px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

.analysis-page .save-actions .financial-action-back,
.analysis-page .save-actions .financial-reset-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #0a2f58;
  border-radius: 8px;
  background: #0b315f;
  color: #ffffff;
  font-size: 13.3333px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

.analysis-page .save-actions #save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #1554a5;
  border-radius: 8px;
  background: #1f6fd1;
  color: #ffffff;
  font-size: 13.3333px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: none;
  white-space: nowrap;
}

.report-toolbar-bottom .btn-secondary {
  background: #2d63bc;
  border-color: #2d63bc;
}

.analysis-page .occupancy-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px auto 8px;
  color: #413113;
  font-weight: 700;
}

.analysis-page .occupancy-toggle-label,
.analysis-page .occupancy-toggle label {
  font-size: 0.9rem;
}

.analysis-page .occupancy-toggle input {
  width: auto;
  min-height: 0;
  margin-right: 4px;
}

.analysis-page .save-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.analysis-page .save-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.analysis-page .save-mode-options {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0;
  flex: 1 1 320px;
}

.analysis-page .checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #123d73;
  font-size: 0.94rem;
  font-weight: 700;
}

.analysis-page .checkbox-field input {
  width: auto;
  min-height: 0;
}

.analysis-page .standard-include-control {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: #123d73;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.analysis-page .standard-include-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.05;
  white-space: nowrap;
}

.analysis-page .standard-include-control input {
  width: 11px;
  height: 11px;
  min-height: 0;
  margin: 0;
}

.analysis-page .save-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analysis-page .case-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 520px;
  margin: 0;
}

.analysis-page .case-row[hidden] {
  display: none;
}

.analysis-page .case-row input,
.analysis-page .case-row textarea,
.analysis-page #case-search {
  border: 1px solid #d7c18d;
  border-radius: 8px;
  background: #fffdf8;
  padding: 6px 8px;
}

.analysis-page .case-row input:focus,
.analysis-page .case-row textarea:focus,
.analysis-page #case-search:focus {
  border-color: transparent;
}

.analysis-page #financial-title {
  border: 1px solid #c8921e;
  border-radius: 8px;
  background: #fff7e0;
  padding: 6px 8px;
}

.analysis-page #financial-title:focus {
  border-color: #123d73;
}

.analysis-page .case-row label {
  color: #1f3549;
  font-size: 0.88rem;
  font-weight: 600;
}

.analysis-page .case-search-shell {
  position: relative;
}

.analysis-page #case-search-results {
  width: 100%;
  max-height: min(260px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 10;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e3d5b6;
  border-radius: 8px;
  display: none;
  box-sizing: border-box;
  box-shadow: 0 10px 20px rgba(7, 20, 37, 0.12);
}

.analysis-page #case-search-results.visible {
  display: block;
}

.analysis-page #case-search-results li {
  padding: 6px 8px;
  color: #20364a;
  font-size: 0.88rem;
  cursor: pointer;
}

.analysis-page #case-search-results li:hover,
.analysis-page #case-search-results li:focus {
  background: #f8f2e3;
}

.analysis-page .case-selection-summary {
  color: #4d6071;
  font-size: 0.84rem;
  font-weight: 600;
}

.analysis-page .status-banner {
  min-height: 22px;
  margin: 0;
  padding: 4px 0;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: #2456a8;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.analysis-page .status-banner.status-success {
  background: transparent;
  border-color: transparent;
  color: #155e4b;
}

.analysis-page .status-banner.status-error {
  background: transparent;
  border-color: transparent;
  color: #a62424;
}

.analysis-page .status-banner:empty {
  display: none;
}

.analysis-page .save-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  flex: 0 1 auto;
  min-width: 0;
  width: 100%;
}

.analysis-page .save-actions [hidden] {
  display: none !important;
}

body.analysis-page.financial-analysis-workflow .save-mode-options {
  display: none !important;
}

.analysis-page .financial-action-btn {
  min-width: 0;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font-weight: 750;
  font-size: 0.86rem;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: none;
}

.analysis-page .financial-action-btn:disabled {
  opacity: 0.68;
  cursor: wait;
}

.analysis-page .financial-action-save {
  background: #0b315f;
  border-color: #0b315f;
}

.analysis-page .financial-action-assign {
  background: #1f6fd1;
  border-color: #1f6fd1;
}

.analysis-page .financial-action-print {
  background: #eef1f4;
  border-color: #cfd6de;
  color: #24313f;
}

body.analysis-page.financial-analysis-workflow .standalone-title-row {
  display: none;
}

.analysis-page .save-print {
  display: flex;
  justify-content: flex-end;
  flex: 1 1 160px;
}

body.analysis-page.profile-linked-workspace .save-mode-options {
  display: none;
}

body.analysis-page.profile-linked-workspace .case-row {
  display: none;
}

.analysis-page #tbl-expense-comparison td .read-value.note-small {
  font-size: 0.9rem;
}

.analysis-page .save-print .btn-secondary {
  background: #2d63bc;
  border-color: #2d63bc;
}

.analysis-page .income-section details[data-fin-accordion] + details[data-fin-accordion] {
  margin-top: 0;
}

.analysis-page #tbl-expense-comparison th,
.analysis-page #tbl-expense-comparison td,
.analysis-page #tbl-totals th,
.analysis-page #tbl-totals td {
  height: 22px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.analysis-page #tbl-expense-comparison .proposed-input,
.analysis-page #tbl-totals .proposed-input,
.analysis-page [data-expense-totals-proposed] {
  width: 100%;
  min-height: 22px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 1px 6px;
  text-align: center;
  color: #18324d;
  outline: none;
}

.analysis-page #tbl-expense-comparison .proposed-input[readonly],
.analysis-page #tbl-totals .proposed-input[readonly] {
  background: transparent;
}

@media (max-width: 900px) {
  .analysis-page .fin-container {
    margin: 0 10px 22px;
    padding: 5px 5px 8px;
  }

  .analysis-page .fin-card {
    padding: 4px 1px 5px;
  }

  .analysis-page .save-toolbar {
    align-items: flex-start;
  }

  .analysis-page .save-mode-options,
  .analysis-page .save-actions,
  .analysis-page .save-print {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  body.analysis-page.financial-analysis-workflow .financial-primary-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .analysis-page .financial-action-btn {
    flex: 0 1 auto;
    min-width: 0;
  }

  .irs-form-options article {
    grid-template-columns: 1fr;
  }

  .irs-form-options .irs-form-action {
    justify-self: start;
  }

  .analysis-page .fin-table {
    font-size: 0.88rem;
  }

  .analysis-page .fin-table th,
  .analysis-page .fin-table td {
    padding: 5px 6px;
  }

  .analysis-page .review-table th:first-child,
  .analysis-page .review-table td:first-child,
  .analysis-page .review-table th:nth-child(2),
  .analysis-page .review-table th:nth-child(3),
  .analysis-page .review-table th:nth-child(4),
  .analysis-page .review-table td:nth-child(2),
  .analysis-page .review-table td:nth-child(3),
  .analysis-page .review-table td:nth-child(4) {
    width: auto;
  }
}

@media (max-width: 640px) {
  .analysis-page .save-actions {
    width: 100%;
    justify-content: center;
  }
}

@page {
  size: letter portrait;
  margin: 0.55in 0.5in 0.72in;
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.55in 0.5in 0.72in;
  }

  body.analysis-page {
    background: #fff;
    color: #000;
    display: block;
    font-size: 10pt;
    line-height: 1.3;
    min-height: auto;
    height: auto !important;
    overflow: visible !important;
    orphans: 3;
    widows: 3;
  }

  body.analysis-page .tt-header,
  body.analysis-page .tt-footer,
  body.analysis-page .tt-hero,
  body.analysis-page .tt-nav,
  body.analysis-page .dashboard-nav-grid,
  body.analysis-page .dashboard-nav-row,
  body.analysis-page .tt-bottom-back,
  body.analysis-page [data-nav-back],
  body.analysis-page [data-print-hide],
  body.analysis-page .report-toolbar,
  body.analysis-page .save-toolbar,
  body.analysis-page .save-actions,
  body.analysis-page .save-print,
  body.analysis-page .save-mode-options,
  body.analysis-page .case-row,
  body.analysis-page .status-banner,
  body.analysis-page .cta-row,
  body.analysis-page .section-actions,
  body.analysis-page .row-remove,
  body.analysis-page .tt-tour-layer,
  body.analysis-page .dashboard-tour-menu,
  body.analysis-page #irs-financial-forms,
  body.analysis-page #save-profile-card,
  body.analysis-page a[href*="financial-analysis"],
  body.analysis-page a[aria-label="Back"],
  body.analysis-page button {
    display: none !important;
  }

  .print-report-header {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-report-header h2 {
    margin: 1px 0 0;
    color: #123d73;
    font-size: 15pt;
    line-height: 1.2;
    text-align: left;
  }

  .print-report-header p {
    margin: 0;
    color: #000;
    font-size: 9pt;
  }

  .print-brand-row {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .print-report-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  .print-brand-name {
    color: #123d73 !important;
    font-size: 8.5pt !important;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  .print-gold-divider {
    height: 2px;
    margin: 6px 0 5px;
    background: #b98a2e;
  }

  .print-report-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }

  .print-perspectives {
    margin-top: 3px !important;
    color: #465a70 !important;
    font-size: 8pt !important;
    font-weight: 650;
  }

  .print-perspectives span { color: #b98a2e; padding: 0 3px; }

  .analysis-page .fin-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    clip-path: none;
    display: block;
    gap: 0;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
  }

  .analysis-page .fin-card,
  .analysis-page .fin-card.outline,
  .analysis-page .analysis-focus-card,
  .analysis-page .totals-card,
  .analysis-page .save-card,
  .analysis-page details[data-fin-accordion],
  .analysis-page .table-block,
  .analysis-page .callout,
  .analysis-page .household-note,
  .analysis-page .section-note-box,
  .analysis-page .standard-include-control {
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    clip-path: none;
    overflow: visible !important;
    max-height: none !important;
    transform: none !important;
  }

  .analysis-page .fin-card,
  .analysis-page .fin-card.outline,
  .analysis-page .analysis-focus-card,
  .analysis-page .totals-card,
  .analysis-page .save-card {
    margin: 0 0 10px;
    padding: 0 0 8px;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .analysis-page .fin-card + .fin-card,
  .analysis-page .fin-card + .callout,
  .analysis-page .callout + .fin-card {
    margin-top: 0;
    padding-top: 0;
  }

  .analysis-page details[data-fin-accordion] {
    margin-top: 5px;
    padding-top: 0;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .analysis-page details[data-fin-accordion] > table { display: table !important; }
  .analysis-page details[data-fin-accordion] > :not(summary):not(table) { display: block !important; }

  .analysis-page details[data-fin-accordion] > summary {
    display: block !important;
    margin: 0 0 4px;
    padding-left: 0;
    color: #000;
    cursor: default;
  }

  .analysis-page details[data-fin-accordion] > summary::before,
  .analysis-page details[data-fin-accordion] > summary::-webkit-details-marker {
    display: none !important;
  }

  .analysis-page h1,
  .analysis-page h2,
  .analysis-page h3,
  .analysis-page summary,
  .analysis-page .table-title,
  .analysis-page .card-header {
    break-after: avoid;
    page-break-after: avoid;
    color: #000;
  }

  .analysis-page .fin-card h2,
  .analysis-page .totals-card h2,
  .analysis-page .save-card h2 {
    margin: 0 0 5px;
    color: #000;
    font-size: 13pt;
    line-height: 1.2;
    text-align: left;
  }

  .analysis-page .fin-card h3 {
    margin: 7px 0 4px;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.2;
  }

  .analysis-page .subtext,
  .analysis-page .callout,
  .analysis-page .household-note,
  .analysis-page .section-note-box,
  .analysis-page .occupancy-toggle {
    margin: 0 0 6px;
    padding: 0;
    background: #fff;
    border: 0;
    color: #000;
    font-size: 9pt;
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
  }

  .analysis-page .fin-table th,
  .analysis-page .fin-table td {
    background: #fff !important;
    color: #000;
    border: 0 !important;
    border-right: 0.8pt solid #66717f !important;
    border-bottom: 0.8pt solid #66717f !important;
    height: auto;
    padding: 2px 4px;
    vertical-align: top;
  }

  .analysis-page .fin-table {
    width: 100%;
    margin-top: 3px;
    break-inside: auto;
    page-break-inside: auto;
    table-layout: fixed;
    font-size: 8.4pt;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-top: 0.8pt solid #66717f !important;
    border-left: 0.8pt solid #66717f !important;
  }

  .analysis-page .fin-table thead {
    display: table-header-group;
  }

  .analysis-page .fin-table tbody,
  .analysis-page .fin-table tfoot {
    break-inside: auto;
    page-break-inside: auto;
  }

  .analysis-page .fin-table tr,
  .analysis-page .fin-table th,
  .analysis-page .fin-table td {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .analysis-page .vehicle-card h2,
  .analysis-page .vehicle-card #tbl-vehicles thead:first-of-type {
    break-after: avoid;
    page-break-after: avoid;
  }

  .analysis-page .vehicle-card.print-compact-vehicle-section {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .analysis-page .expense-comparison-card {
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .analysis-page #tbl-expense-comparison,
  .analysis-page #tbl-totals {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .analysis-page .expense-comparison-card h2,
  .analysis-page .totals-card h2,
  .print-substantiation h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .analysis-page #tbl-expense-comparison tbody td:first-child {
    padding-right: 5px;
  }

  .expense-substantiation-warning {
    position: static;
    display: block;
    width: auto;
    transform: none;
    margin-top: 1px;
    font-size: 6.2pt;
    line-height: 1.05;
    text-align: left;
  }

  .analysis-page .fin-table input,
  .analysis-page .fin-table select,
  .analysis-page .fin-table textarea,
  .analysis-page .money,
  .analysis-page .read-value {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: #000;
    font: inherit;
    height: auto;
    min-height: 0;
    padding: 0;
    width: 100%;
  }

  .analysis-page .fin-table textarea {
    min-height: 28px;
  }

  .analysis-page .line-note,
  .analysis-page .fin-table .small,
  .analysis-page .micro.small {
    color: #000;
    font-size: 7.5pt;
  }

  .analysis-page #tbl-expense-comparison th,
  .analysis-page #tbl-expense-comparison td,
  .analysis-page #tbl-totals th,
  .analysis-page #tbl-totals td {
    height: auto;
    padding-top: 1.6px;
    padding-bottom: 1.6px;
    line-height: 1.1;
  }

  .analysis-page #tbl-expense-comparison .proposed-input,
  .analysis-page #tbl-totals .proposed-input {
    line-height: 1.1;
  }

  .analysis-page .totals-card {
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 0;
  }

  .analysis-page .print-force-break-before {
    break-before: page !important;
    page-break-before: always !important;
  }

  .print-substantiation:not([hidden]) {
    display: block !important;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1.5pt solid #b98a2e;
    break-before: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-substantiation h2 {
    margin: 0 0 5px;
    color: #123d73;
    font-size: 12pt;
  }

  .print-substantiation ul {
    margin: 0;
    padding-left: 18px;
    font-size: 8.5pt;
  }

  .print-substantiation li {
    margin: 0 0 3px;
    break-inside: avoid;
  }

  .above-standard-print-warning {
    color: #b42318;
    font-style: italic;
  }

  .print-report-footer {
    display: block;
    margin-top: 12px;
    padding-top: 5px;
    border-top: 0.75pt solid #b98a2e;
    color: #596675;
    font-size: 6.8pt;
    line-height: 1.25;
  }

  body.analysis-page .financial-workflow-only { display: none !important; }
  body.analysis-page .irs-financial-forms-card { display: none !important; }
  body.analysis-page .save-toolbar { display: none !important; }
  body.analysis-page.financial-analysis-workflow .financial-workflow-only { display: block !important; }
  body.analysis-page.financial-analysis-irs-forms .irs-financial-forms-card { display: block !important; }
  body.analysis-page.financial-analysis-workflow summary .financial-workflow-only { display: inline !important; }
  body.analysis-page .income-decrease-question,
  body.analysis-page .income-decrease-proof { display: none !important; }
  body.analysis-page .print-omit-empty { display: none !important; }
}
