
body .text-b li {
    color: #000 !important;
}

/* Base styles for heading paragraphs */
p.h1, p.h2, p.h3, p.h4, p.h5, p.h6 {
    display: block;
    font-weight: bold;
    margin-top: 0;
}
p.h1 { font-size: 2em; margin-bottom: 0.67em; }
p.h2 { font-size: 1.5em; margin-bottom: 0.83em; }
p.h3 { font-size: 1.17em; margin-bottom: 1em; }
p.h4 { font-size: 1em; margin-bottom: 1.33em; }
p.h5 { font-size: 0.83em; margin-bottom: 1.67em; }
p.h6 { font-size: 0.67em; margin-bottom: 2.33em; }

/* === Calculator Title === */
.title {
    text-align: center;
    font-size: 2em;
    padding-top: 70px;
    padding-bottom: 70px;
    max-width: 1140px;
}
.grid_Box {
    display: flex;
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto;
}
.calculator_row {
    display: flex;
    gap: 20px;
}
.content_Area h2 {
    color: #fff;
    font-size: 17px;
}
.content_Area {
    width: 100%;
}
.image_Area {
    width: 100%;
    text-align: -webkit-right;
}
.content_Area h2 {
    font-family: "Verdana", Sans-serif;
    font-size: 65px;
    font-weight: 600;
    line-height: 85px;
    color: #FFFFFF;
}
.image_Area img {
    width: 100%;
    max-width: 518px;
}
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #000000 !important;
}

.card-header p.h5 {
    color: #ffffff !important;
    margin: 0;
    font-weight: 600;
}
.card {
    background-color: rgb(255 255 255);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.input-group-text {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #000000 !important;
}
input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
    width: 100%;
    border: 1px solid #dee2e6 !important;
    border-radius: 3px;
    padding: .5rem 1rem;
    transition: all .3s;
}
.text-center.mb-4 {
    color: #fff !important;
    background-color: #5ebb46;
    padding: 30px;
}
.calculator-wrapper .container {
    background-color: #ffffff !important;
    padding: 0rem !important;
}
.calculator-wrapper {
	padding: 2rem;
    background-color: #f3f4f6 !important;
}
.calculator-wrapper p.h2 {
    color: #fff !important;
}


form#penaltyCalculator {
    padding: 0rem 2rem;
}
.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--teal) !important;
    color: #000000 !important;
}
label.form-check-label {
    font-size: 14px;
    line-height: 20px;
}
.card-header {
    background-color: #5ebb46 !important;
}
button.btn.btn-primary.btn-lg.px-4 {
    display: inline-block;
    font-weight: 400;
    color: #5ebb46;
    text-align: center;
    white-space: nowrap;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid #5ebb46;
    padding: .5rem 1rem;
    font-size: 1rem;
    border-radius: 3px;
    transition: all .3s;
	margin-bottom: 40px;
}
.button.btn.btn-primary.btn-lg.px-4:hover {
    background-color: #5ebb46 !important;
    border-color: #5ebb46;
    color: #fff !important;
}
.btn-primary:hover {
    background-color: #0da98b !important;
    border-color: #0da98b !important;
    color: #fff !important;
}
.single-calculator main#content {
    padding: 8% 0% 3% 0%;
    max-width: 100%;
}
.single-calculator .page-header {

    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 400px;
    display: flex;
    padding: 30px;
    align-content: center;
    align-items: center;
    justify-content: center;
    text-align: left;
    font-family: "Verdana", Sans-serif;
    font-size: 27px;
    font-weight: 600;
    line-height: 85px;
    color: #FFFFFF;
}
@media (max-width: 768px) {
  .single-calculator .page-header {
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 400px;
    display: flex;
    padding: 30px;
    align-content: center;
    align-items: center;
    justify-content: center;
    text-align: left;
    font-family: "Verdana", Sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 85px;
    color: #FFFFFF;
  }

  .calculator_row {
    display: flex;
    gap: 20px;
    flex-direction: column;
    padding: 20px;
  }

  .content_Area p.h3 {
    font-family: "Verdana", Sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 48px;
    color: #FFFFFF;
  }

  .calculator_grid {
    max-width: 100%;
    width: 100%;
  }

  .title {
    font-size: 1.5em;
  }

  .grid_Box {
    padding: 12px;
    flex-direction: column;
  }
}



:root {
--wpforms-field-border-radius: 3px;
--wpforms-field-border-style: solid;
--wpforms-field-border-size: 1px;
--wpforms-field-background-color: #ffffff;
--wpforms-field-border-color: rgba( 0, 0, 0, 0.25 );
--wpforms-field-border-color-spare: rgba( 0, 0, 0, 0.25 );
--wpforms-field-text-color: rgba( 0, 0, 0, 0.7 );
--wpforms-field-menu-color: #ffffff;
--wpforms-label-color: rgba( 0, 0, 0, 0.85 );
--wpforms-label-sublabel-color: rgba( 0, 0, 0, 0.55 );
--wpforms-label-error-color: #d63637;
--wpforms-button-border-radius: 3px;
--wpforms-button-border-style: none;
--wpforms-button-border-size: 1px;
--wpforms-button-background-color: #066aab;
--wpforms-button-border-color: #066aab;
--wpforms-button-text-color: #ffffff;
--wpforms-page-break-color: #066aab;
--wpforms-background-image: none;
--wpforms-background-position: center center;
--wpforms-background-repeat: no-repeat;
--wpforms-background-size: cover;
--wpforms-background-width: 100px;
--wpforms-background-height: 100px;
--wpforms-background-color: rgba( 0, 0, 0, 0 );
--wpforms-background-url: none;
--wpforms-container-padding: 0px;
--wpforms-container-border-style: none;
--wpforms-container-border-width: 1px;
--wpforms-container-border-color: #000000;
--wpforms-container-border-radius: 3px;
--wpforms-field-size-input-height: 43px;
--wpforms-field-size-input-spacing: 15px;
--wpforms-field-size-font-size: 16px;
--wpforms-field-size-line-height: 19px;
--wpforms-field-size-padding-h: 14px;
--wpforms-field-size-checkbox-size: 16px;
--wpforms-field-size-sublabel-spacing: 5px;
--wpforms-field-size-icon-size: 1;
--wpforms-label-size-font-size: 16px;
--wpforms-label-size-line-height: 19px;
--wpforms-label-size-sublabel-font-size: 14px;
--wpforms-label-size-sublabel-line-height: 17px;
--wpforms-button-size-font-size: 17px;
--wpforms-button-size-height: 41px;
--wpforms-button-size-padding-h: 15px;
--wpforms-button-size-margin-top: 10px;
--wpforms-container-shadow-size-box-shadow: none;

				}

/* === CSS Variables - Modern Design System === */
:root {
  --primary: #0f172a; /* Slate 900 */
  --primary-light: #1e293b;
  --accent: #ef3b43; /* Blue 600 */
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-sub: #64748b;
  --success: #5ebb46;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* === Main Calculator Wrapper === */
.ctc-wrapper {
  font-family: 'Verdana', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  color: var(--text-main);
  min-height: 800px;
  contain: layout;
}

.ctc-wrapper * {
  box-sizing: border-box;
}
/* === Calculator Header === */
/* Header */
.ctc-header {
  text-align: center;
  margin-bottom: 50px;
}

.ctc-header p.h2 {
  margin: 0 0 24px 0;
  color: var(--primary);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
/* === Toggle Switch - Premium Sleek === */
.ctc-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #f0f4f9;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.ctc-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  margin: 0 8px;
}

.ctc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ctc-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e2e8f0;
  transition: background 0.4s ease;
  border-radius: 999px;
}

.ctc-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

input:checked + .ctc-slider {
  background: #2563eb;
}

input:checked + .ctc-slider:before {
  transform: translateX(26px) translateY(-50%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ctc-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-sub);
    padding: 6px 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

/* === Form Controls ===*/
.ctc-controls-wrapper {
  display: flex;
  justify-content: center;
}
.ctc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
  padding: 24px;
  background: #5ebb46;
  border-radius: var(--radius);
  border: 1px solid #3da599;
  color: #fff;
  min-width: 50%;
}

.ctc-form-group {
  flex: 1;
  min-width: 250px;
}

.ctc-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ctc-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: #0f172a;
  transition: all 0.2s;
  font-weight: 500;
}

.ctc-input option {
  color: #0f172a;
  background: #fff;
}

.ctc-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.ctc-checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
}

.ctc-checkbox-group input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.ctc-checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  text-transform: none;
}

/* === Grid Layout === */
.ctc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  contain: layout style;
  position: relative;
}

.ctc-person-column p.h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctc-person-column p.h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
}

.ctc-person-column.hidden {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* === Accordion Components === */
.ctc-accordion-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.ctc-accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    background: var(--bg-soft);
    transition: background 0.2s;
}

.ctc-accordion-toggle:hover {
    background: #f1f5f9;
}

.ctc-accordion-header-content {
    display: flex;
    flex-direction: column;
}

.ctc-accordion-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.2rem;
}

.ctc-accordion-total {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-top: 2px;
}

.ctc-chevron {
    color: var(--text-sub);
    transition: transform 0.2s;
}

.ctc-chevron.expanded {
    transform: rotate(180deg);
}

.ctc-accordion-content {
    max-height: 1000px;
    transition: max-height 0.3s ease-in-out, opacity 0.3s;
    opacity: 1;
}

.ctc-accordion-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.ctc-accordion-inner {
    padding: 16px;
    border-top: 1px solid var(--border);
}

/* === Form Fields === */
.ctc-field {
  margin-bottom: 16px;
}

.ctc-field-with-toggle {
  margin-bottom: 16px;
}

.ctc-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* .ctc-field-label-row label:first-child {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 0;
} */

.ctc-ei-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-sub);
}

.ctc-ei-checkbox {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.ctc-ei-label {
  font-weight: 500;
  white-space: nowrap;
}

.ctc-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-sub);
  font-weight: 500;
}

/* === Tooltip Component === */
.ctc-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  color: #94a3b8;
  transition: color 0.2s;
}

.ctc-tooltip:hover {
  color: #64748b;
}

.ctc-tooltip svg {
  display: block;
}

.ctc-tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  width: 220px;
  text-align: center;
  z-index: 100;
  transition: opacity 0.2s, visibility 0.2s;
}

.ctc-tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #fff;
}

.ctc-tooltip-text::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top-color: #e2e8f0;
}

.ctc-tooltip:hover .ctc-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.ctc-input-wrapper {
  position: relative !important;
  display: block !important;
}

.ctc-input-symbol {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.ctc-input-field {
  width: 100% !important;
  padding: 12px 16px 12px 42px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  transition: all 0.2s !important;
  background: #fff !important;
  color: var(--text-main) !important;
  box-sizing: border-box !important;
}

.ctc-input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* === Results Section === */
.ctc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  background: transparent;
  padding: 0;
}

/* === Layout Components === */
.ctc-inputs-wrapper {
  position: relative;
  min-height: 500px;
  contain: layout;
}

/* === Responsive Layout - Desktop === */
@media (min-width: 800px) {
  .ctc-inputs-wrapper.single-person-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
  }

  .ctc-inputs-wrapper.single-person-layout .ctc-grid {
    flex: 0.5;
  }

  .ctc-results.single-person {
    flex: 1;
  }

  .ctc-results.single-person .ctc-result-card {
    padding-top: 16px;
  }

  .ctc-results.single-person .ctc-result-header {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
}

/* === Tablet Layout === */
@media (max-width: 799px) {
  .ctc-inputs-wrapper.single-person-layout {
    display: block;
  }

  .ctc-grid {
    grid-template-columns: 1fr;
  }

  .ctc-results {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }
}

/* === Calculation Details === */
.ctc-calculation-details-container {
  margin-top: 30px;
}

.ctc-calculation-details-container:empty {
  display: none;
  margin-top: 0;
}

/* === Disclaimer Note === */
.ctc-disclaimer-note {
  margin-top: 24px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* === Responsive Display Classes === */
.ctc-mobile-only {
  display: none;
}

.ctc-desktop-only {
  display: block;
}

@media (max-width: 991px) {
  .ctc-mobile-only {
    display: block;
  }

  .ctc-desktop-only {
    display: none;
  }
}

.ctc-details-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.ctc-details-card .ctc-calculation-details {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.ctc-details-card .ctc-result-header {
  margin-bottom: 16px;
}

.ctc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.ctc-result-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.ctc-result-header {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctc-result-header::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

/* === Statistics Display === */
.ctc-top-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 70px;
  margin-bottom: 10px;
}

.ctc-big-stat {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
}

.ctc-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 700;
}

.ctc-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
}

.ctc-big-stat .ctc-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

@media (min-width: 1100px) {
  .ctc-big-stat .ctc-value {
    font-size: 2.2rem;
  }

  .ctc-label {
    font-size: 0.85rem;
  }
}

.ctc-sub-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ctc-sub-stat {
  display: flex;
  flex-direction: column;
}

.ctc-rate-caveat {
  font-size: 0.65rem;
  color: var(--text-sub);
  vertical-align: super;
  margin-left: 1px;
}

.ctc-rate-caveats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding-left: 2px;
}

.ctc-caveat-text {
  font-size: 0.65rem;
  color: var(--text-sub);
  font-style: italic;
}

.ctc-disclaimers {
  margin-top: 24px;
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--teal);
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.ctc-disclaimers p {
  margin: 0 0 8px 0;
}

.ctc-disclaimers ul {
  margin: 8px 0;
  padding-left: 20px;
}

.ctc-disclaimers li {
  margin-bottom: 4px;
}

.ctc-disclaimer-final {
  margin-top: 12px !important;
  font-style: italic;
  color: #6c757d;
}

/* === Note Positioning === */
.ctc-note-inline {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--teal);
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-top: 16px;
  min-height: 60px;
  will-change: opacity;
  transition: opacity 0.2s ease;
  display: block;
}

.ctc-note-inline p {
  margin: 0;
}

/* Note positioning - below (shown on mobile below calc details) */
.ctc-note-below {
  display: block;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--teal);
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-top: 16px;
}

.ctc-note-below p {
  margin: 0;
}

/* === Note Display Logic === */
@media (min-width: 992px) {
  .ctc-note-inline {
    display: block;
    opacity: 1;
    visibility: visible;
  }
  .ctc-note-below {
    display: block;
  }
}

/* === Mobile Layout === */
@media (max-width: 991px) {
  .ctc-note-inline {
    display: block;
  }
  .ctc-note-below {
    display: block;
  }
}

/* === Partner Mode Adjustments === */
.ctc-wrapper.has-partner .ctc-note-inline {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
}

.ctc-wrapper.has-partner .ctc-note-below {
  display: block;
}

.ctc-sub-stat .ctc-label {
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.ctc-sub-stat .ctc-value {
  font-size: 1.3rem;
}

.ctc-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* === Pie Chart Visualization === */
.ctc-pie-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
  margin: 12px 0;
}
@media (max-width: 768px) {
  .ctc-pie-container {
    flex-direction: column;
    gap: 12px;
  }
}

.ctc-pie-chart {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.ctc-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctc-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.ctc-pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ctc-pie-legend-label {
  color: var(--text-sub);
  font-weight: 500;
  min-width: 60px;
}

.ctc-pie-legend-pct {
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Solo mode - bigger pie chart when no partner */
.ctc-pie-container-solo .ctc-pie-chart {
  width: 180px;
  height: 180px;
}

.ctc-pie-container-solo .ctc-pie-legend-item {
  font-size: 0.85rem;
}

.ctc-pie-container-solo .ctc-pie-legend-label {
  min-width: 80px;
}

@media (min-width: 1100px) {
  .ctc-pie-chart {
    width: 150px;
    height: 150px;
  }

  .ctc-pie-container-solo .ctc-pie-chart {
    width: 220px;
    height: 220px;
  }

  .ctc-pie-legend-item {
    font-size: 0.85rem;
  }

  .ctc-pie-legend-label {
    min-width: 80px;
  }

  .ctc-pie-container-solo .ctc-pie-legend-item {
    font-size: 0.95rem;
  }

  .ctc-pie-container-solo .ctc-pie-legend-label {
    min-width: 90px;
  }
}

.ctc-breakdown-section {
  margin-top: 20px;
}

.ctc-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ctc-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-sub);
}

.ctc-section-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.ctc-breakdown-table {
  font-size: 0.95rem;
}

.ctc-table-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--text-sub);
  font-weight: 500;
}

.ctc-table-row span:last-child {
    color: var(--text-main);
    font-weight: 600;
}

.ctc-breakdown-item {
  font-size: 0.85rem;
  color: #78909c;
  font-weight: 400;
}

.ctc-breakdown-item span:last-child {
    color: #546e7a;
}

.ctc-table-row.highlight {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
  font-weight: 700;
  font-size: 1.1rem;
}

.text-green { color: var(--success); }
.text-red { color: var(--danger); }

.combined-card {
  border: 2px solid var(--primary);
  background: #f8fafc;
}

/* === Calculation Details Component === */
.ctc-calculation-details {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.ctc-calc-toggle {
    background: none;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}
.ctc-calc-toggle:hover {
    text-decoration: underline;
}

.ctc-calc-toggle svg {
    transition: transform 0.3s;
}

.ctc-calc-toggle-hide {
    display: none;
}

.ctc-calculation-details.open .ctc-calc-toggle-hide {
    display: inline;
}

.ctc-calculation-details.open .ctc-calc-toggle-show {
    display: none;
}

.ctc-calculation-details.open .ctc-calc-toggle svg {
    transform: rotate(180deg);
}

.ctc-calc-content {
    display: none;
    padding-top: 16px;
    font-size: 0.9rem;
}

.ctc-calculation-details.open .ctc-calc-content {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ctc-calc-content p.h4 {
    margin: 16px 0 8px 0;
    font-size: 0.95rem;
    color: var(--primary);
}

.ctc-calc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    table-layout: auto;
    font-size: 0.85rem;
}

.ctc-calc-table th {
    text-align: left;
    color: var(--text-sub);
    font-size: 0.75rem;
    padding: 6px 6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ctc-calc-table th:last-child {
    text-align: right;
}

.ctc-calc-table td {
    padding: 6px 6px;
    border-bottom: 1px solid #000000;
}

.ctc-calc-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.ctc-calc-table tr:last-child td {
    border-bottom: none;
}

/* === Table Layouts === */
.ctc-income-table {
    table-layout: auto;
}

.ctc-income-table td:first-child {
    width: auto;
}

.ctc-income-table td:nth-child(2) {
    width: auto;
}

.ctc-income-table td:last-child {
    width: auto;
    text-align: right;
}

.ctc-tax-table {
    table-layout: auto;
}

.ctc-tax-table th {
    white-space: nowrap;
    font-size: 0.7rem;
}

.ctc-tax-table th:nth-child(2),
.ctc-tax-table th:nth-child(3),
.ctc-tax-table th:nth-child(4),
.ctc-tax-table th:nth-child(5) {
    text-align: right;
}

.ctc-tax-table td:nth-child(2),
.ctc-tax-table td:nth-child(3),
.ctc-tax-table td:nth-child(4),
.ctc-tax-table td:nth-child(5) {
    text-align: right;
    white-space: nowrap;
}

.ctc-credits-header {
    background: #f1f5f9;
}

.ctc-credits-header th {
    color: var(--text-sub);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 8px 6px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ctc-credits-header th:nth-child(1) { text-align: left; }
.ctc-credits-header th:nth-child(2),
.ctc-credits-header th:nth-child(3),
.ctc-credits-header th:nth-child(4) { text-align: right; }

.ctc-surtax-row td,
.ctc-health-premium-row td {
    color: var(--danger);
    font-weight: 500;
}

.ctc-calc-subtotal td {
    background: #f8fafc;
    border-top: 2px solid var(--border);
    border-bottom: none;
    padding: 10px 8px;
}

.ctc-calc-subtotal td.text-right {
    text-align: right;
}

.ctc-calc-total td {
    border-top: 2px solid var(--primary);
    padding: 12px 8px;
    color: var(--primary);
    font-size: 1rem;
}

.ctc-calc-total td:last-child {
    text-align: right;
}

/* === Mobile Responsive Styles === */
@media (max-width: 768px) {
  .ctc-wrapper {
    padding: 16px;
  }

  .ctc-header p.h2 {
    font-size: 1.5rem;
  }

  .ctc-controls {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .ctc-form-group {
    min-width: 100%;
  }

  .ctc-grid {
    gap: 24px;
    grid-template-columns: 1fr;
  }

  .ctc-results {
    padding: 0;
    grid-template-columns: 1fr;
  }

  .ctc-top-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ctc-result-card,
  .ctc-details-card {
    padding: 12px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    margin-bottom: 16px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* === Table Responsive Styles === */
  .ctc-calc-table {
    font-size: 0.75rem;
    overflow-x: auto;
    display: block;
  }

  .ctc-calc-table thead,
  .ctc-calc-table tbody,
  .ctc-calc-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .ctc-calc-table th,
  .ctc-calc-table td {
    padding: 8px 4px;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ctc-tax-table {
    min-width: 500px;
  }

  .ctc-tax-table th,
  .ctc-tax-table td {
    padding: 6px 3px;
    font-size: 0.65rem;
  }

  .ctc-income-table {
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }

  .ctc-income-table thead,
  .ctc-income-table tbody,
  .ctc-income-table tr {
    display: table;
    width: 100%;
    table-layout: auto;
  }

  .ctc-credits-header th {
    font-size: 0.6rem;
    padding: 6px 3px;
    letter-spacing: 0;
  }

  /* Mobile table wrapper for horizontal scroll */
  .ctc-calc-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ctc-calc-content::-webkit-scrollbar {
    height: 4px;
  }

  .ctc-calc-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
  }

  .ctc-calc-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }

  .ctc-calc-content td {
    /* warp */
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .ctc-result-card,
  .ctc-details-card {
    padding: 6px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Extra small screens table optimization */
  .ctc-calc-table {
    font-size: 0.65rem;
  }

  .ctc-calc-table th,
  .ctc-calc-table td {
    padding: 4px 2px;
    font-size: 0.6rem;
  }

  .ctc-tax-table {
    min-width: 450px;
  }

  .ctc-tax-table th,
  .ctc-tax-table td {
    padding: 4px 2px;
    font-size: 0.55rem;
  }

  .ctc-credits-header th {
    font-size: 0.5rem;
    padding: 4px 2px;
  }

  .ctc-calc-subtotal td,
  .ctc-calc-total td {
    padding: 6px 2px;
    font-size: 0.7rem;
  }

  /* Hide less important table columns on very small screens */
  .ctc-tax-table th:nth-child(3),
  .ctc-tax-table td:nth-child(3) {
    display: none;
  }

  /* Make table container scrollable */
  .ctc-calc-content {
    max-width: calc(100vw - 20px);
    overflow-x: auto;
  }

  .ctc-calc-table {
    min-width: 300px;
    margin-bottom: 10px;
  }
}

/* === Province & Territory Links === */
.ctc-province-links {
  margin-top: 40px;
  padding: 28px 32px;
  background: #f7f8fa;
  border-top: 2px solid #e0e4ea;
  border-radius: 8px;
}

.ctc-province-links-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ctc-province-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.ctc-province-link-item {
  margin: 0;
  padding: 0;
}

.ctc-province-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border: 1px solid #c8cdd6;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #1a4fa0;
  text-decoration: none;
  background: #fff;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.ctc-province-flag {
  width: 24px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}

.ctc-province-link:hover,
.ctc-province-link:focus {
  background: #1a4fa0;
  color: #fff;
  border-color: #1a4fa0;
  text-decoration: none;
  outline: none;
}

@media (max-width: 600px) {
  .ctc-province-links {
    padding: 20px 16px;
  }

  .ctc-province-link-list {
    gap: 8px 10px;
  }

  .ctc-province-link {
    font-size: 0.8rem;
    padding: 4px 11px;
  }
}
