@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #fff;
  color: #1a1a1a;
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.header-logo {
  height: 36px;
  width: auto;
  display: block;
}

header .subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.input-panel {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
  overflow: visible;
}

.input-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.input-panel h3 {
  font-size: 0.95rem;
  margin: 20px 0 12px;
  color: #555;
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.1);
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-group.half {
  flex: 1;
}

.tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #555;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
  max-width: 260px;
  white-space: normal;
  z-index: 10;
  margin-bottom: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.btn-calculate {
  width: 100%;
  padding: 13px;
  background: #B11217;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-calculate:hover {
  background: #961014;
}

.btn-calculate:focus {
  outline: none;
}

.btn-calculate:active {
  transform: scale(0.99);
}

.results-panel {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
  min-height: 400px;
}

.results-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  color: #999;
  font-size: 0.95rem;
  text-align: center;
}

.results-content h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.sdlt-rates-note {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 2px;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.results-content .address-line {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 4px;
}

.results-content .deal-ref-line {
  font-size: 0.9rem;
  color: #555;
  font-weight: 600;
  margin-bottom: 20px;
}

.history-card-ref {
  font-weight: 400;
  color: #888;
  font-size: 0.85em;
}

.compare-card-ref {
  font-weight: 400;
  color: #999;
  font-size: 0.85em;
}

.print-deal-ref {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-top: 4px;
}

.scenario-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.scenario-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  background: #fff;
  color: #555;
}

.scenario-tab.active {
  border-color: #B11217;
  background: #fef2f2;
  color: #B11217;
}

.scenario-tab:hover {
  border-color: #B11217;
}

.result-section {
  margin-bottom: 24px;
}

.result-section h3 {
  font-size: 0.9rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0f2f5;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}

.result-row .label {
  color: #555;
}

.result-row .value {
  font-weight: 600;
  color: #1a1a1a;
}

.result-row.total {
  border-top: 2px solid #1a1a1a;
  margin-top: 6px;
  padding-top: 10px;
  font-size: 1rem;
}

.result-row.total .value {
  color: #B11217;
  font-size: 1.1rem;
}

.yield-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.yield-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.yield-card .yield-label {
  font-size: 0.78rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yield-card .yield-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 4px;
}

.yield-card .yield-value.yield-good {
  color: #1a9a4a;
}

.yield-card .yield-value.yield-below {
  color: #B11217;
}

.yield-card .yield-value.yield-near {
  color: #1a1a1a;
}

.offer-box {
  background: #fef8f8;
  border: 2.5px solid #B11217;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(177,18,23,0.1);
}

.offer-box .offer-label {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 8px;
}

.offer-box .offer-price {
  font-size: 2rem;
  font-weight: 800;
  color: #B11217;
  letter-spacing: -0.5px;
}

.offer-box .offer-note {
  font-size: 0.82rem;
  color: #777;
  margin-top: 10px;
}

.offer-box.not-achievable {
  background: #fafafa;
  border-color: #ccc;
  box-shadow: none;
}

.offer-box.not-achievable .offer-price {
  color: #999;
  font-size: 1rem;
  font-weight: 600;
}

.sdlt-band-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 6px;
}

.sdlt-band-table th {
  text-align: left;
  padding: 6px 8px;
  background: #f8f9fb;
  color: #555;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}

.sdlt-band-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.sdlt-band-table .rate-col {
  text-align: center;
}

.sdlt-band-table .amount-col {
  text-align: right;
  font-weight: 600;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comparison-col {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.comparison-col h4 {
  font-size: 0.85rem;
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid #f0f2f5;
  color: #B11217;
}

.cost-item-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.cost-item-row .cost-item-label {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.88rem;
}

.cost-item-row .cost-item-amount {
  width: 100px;
  padding: 8px 10px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.88rem;
  text-align: right;
}

.cost-item-row .cost-item-label:focus,
.cost-item-row .cost-item-amount:focus {
  outline: none;
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.1);
}

.btn-remove-item {
  width: 28px;
  height: 28px;
  border: none;
  background: #fee;
  color: #B11217;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-remove-item:hover {
  background: #fcc;
}

.btn-remove-placeholder {
  width: 28px;
  flex-shrink: 0;
}

.btn-add-item {
  width: 100%;
  padding: 8px;
  background: #f8f9fb;
  border: 1.5px dashed #ccc;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #555;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-add-item:hover {
  border-color: #B11217;
  background: #fef2f2;
  color: #B11217;
}

.cost-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  padding: 6px 0 4px;
  border-top: 1px solid #eee;
  margin-bottom: 4px;
}

.disclaimer {
  margin: 28px 0;
  padding: 16px 20px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #6d5e00;
}

.map-section {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
}

.map-section h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: #1a1a1a;
}

#mapContainer {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #eee;
}

.address-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
}

.address-dropdown-item {
  padding: 10px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.address-dropdown-item:last-child {
  border-bottom: none;
}

.address-dropdown-item:hover,
.address-dropdown-item.active {
  background: #fef2f2;
  color: #B11217;
}

.btn-save-pdf {
  width: 100%;
  padding: 13px;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, color 0.2s;
}

.btn-save-pdf:hover {
  background: #1a1a1a;
  color: #fff;
}

.btn-save-pdf-inline {
  padding: 8px 18px;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.btn-save-pdf-inline:hover {
  background: #1a1a1a;
  color: #fff;
}

.results-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}

.results-header-row h2 {
  margin-bottom: 4px;
}

.deal-rating {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f8f9fb;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.deal-rating-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.deal-rating-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deal-rating-label {
  font-size: 1.05rem;
  font-weight: 700;
}

.deal-rating-detail {
  font-size: 0.8rem;
  color: #777;
}

.mortgage-header {
  cursor: pointer;
  user-select: none;
}

.mortgage-header:hover {
  color: #B11217;
}

.mortgage-arrow {
  font-size: 0.7rem;
  margin-left: 2px;
  transition: transform 0.2s;
}

.mortgage-fields {
  padding: 12px 0 4px;
}

.mortgage-include-row {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.buyer-type-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
  margin-top: 4px;
}

.buyer-type-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: #f5f5f5;
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.buyer-type-btn.active {
  background: #B11217;
  color: #fff;
}

.buyer-type-btn:hover:not(.active) {
  background: #e8e8e8;
}

.purchase-type-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
  margin-top: 4px;
}

.purchase-type-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: #f5f5f5;
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.purchase-type-btn.active {
  background: #B11217;
  color: #fff;
}

.purchase-type-btn:hover:not(.active) {
  background: #e8e8e8;
}

.target-offer-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 4px;
}

.target-yield-input {
  flex: 1;
  margin-bottom: 0 !important;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  min-width: 44px;
  height: 24px;
  margin-top: 28px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #B11217;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.btn-start-again {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: #fff;
  color: #B11217;
  border: 2px solid #B11217;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-start-again:hover {
  background: #B11217;
  color: #fff;
}

.btn-mortgage-calc {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-mortgage-calc:hover {
  background: #333;
}

.borrowing-summary {
  padding: 12px 14px;
  margin-top: 10px;
  background: #f0f2f5;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.borrowing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.borrowing-row.borrowing-highlight {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ddd;
}

.borrowing-highlight .borrowing-label {
  font-weight: 700;
  color: #1a1a1a;
}

.borrowing-highlight .borrowing-value {
  font-size: 1rem;
  color: #0a7a2e;
}

.borrowing-row.borrowing-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.borrowing-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
}

.borrowing-total .borrowing-label {
  font-weight: 700;
  color: #1a1a1a;
}

.borrowing-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}

.borrowing-total .borrowing-value {
  font-size: 1.05rem;
  color: #B11217;
}

.toggle-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
  user-select: none;
}

.toggle-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #B11217;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-checkbox-label {
  line-height: 1.4;
}

.letting-agent-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.letting-agent-row input[type="number"] {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.letting-agent-row input[type="number"]:focus {
  outline: none;
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.1);
}

.vat-checkbox {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  background: #f8f9fb;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  transition: border-color 0.2s, background 0.2s;
}

.vat-checkbox:has(input:checked) {
  border-color: #B11217;
  background: #fef2f2;
  color: #B11217;
}

.maintenance-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
  margin-top: 4px;
  margin-bottom: 8px;
}

.maint-mode-btn {
  flex: 1;
  padding: 6px 10px;
  border: none;
  background: #f5f5f5;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.maint-mode-btn.active {
  background: #B11217;
  color: #fff;
}

.maint-mode-btn:hover:not(.active) {
  background: #e8e8e8;
}

.cash-flow-indicator {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 8px;
}

.cash-flow-indicator.cash-flow-positive {
  background: #e6f9ed;
  color: #1a9a4a;
}

.cash-flow-indicator.cash-flow-negative {
  background: #fef2f2;
  color: #B11217;
}

.cash-flow-positive {
  color: #1a9a4a;
}

.cash-flow-negative {
  color: #B11217;
}

.stress-test-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #ddd;
}

.stress-test-section h4 {
  font-size: 0.82rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.refinance-section {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fafbfc;
}

.refinance-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.refinance-header:hover {
  color: #B11217;
}

.refinance-arrow {
  font-size: 0.7rem;
  margin-left: auto;
  transition: transform 0.2s;
}

.refinance-inputs {
  padding: 12px 0;
}

.refinance-inputs .form-group {
  margin-bottom: 10px;
}

.refinance-inputs label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  display: block;
}

.refinance-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.88rem;
}

.refinance-inputs input:focus {
  outline: none;
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.1);
}

.collapsible-section {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fafbfc;
}

.collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.collapsible-header:hover {
  color: #B11217;
}

.collapsible-arrow {
  font-size: 0.7rem;
  margin-left: auto;
  transition: transform 0.2s;
}

.s24-inputs,
.cg-inputs {
  padding: 12px 0;
}

.s24-inputs .form-group,
.cg-inputs .form-group {
  margin-bottom: 10px;
}

.s24-inputs label,
.cg-inputs label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  display: block;
}

.s24-inputs select,
.cg-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.88rem;
  background: #fff;
}

.s24-inputs select:focus,
.cg-inputs input:focus {
  outline: none;
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.1);
}

.cg-projection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.cg-projection-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border: 1px solid #eee;
}

.cg-projection-period {
  font-size: 0.78rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.cg-projection-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
}

.cg-projection-equity {
  font-size: 0.85rem;
  color: #1a9a4a;
  font-weight: 600;
  margin-top: 4px;
}

.print-report {
  display: none;
}

.mode-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mode-btn {
  padding: 10px 24px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  border-color: #B11217;
  background: #fef2f2;
  color: #B11217;
}

.mode-btn:hover {
  border-color: #B11217;
}

.yield-basis-note {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-bottom: 8px;
  font-style: italic;
}

.yield-gauge {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.yield-gauge svg {
  display: block;
}

.sdlt-comparison-chart {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.sdlt-comparison-chart h3 {
  font-size: 0.9rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e8e8e8;
}

.sdlt-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sdlt-bar-row:last-child {
  margin-bottom: 0;
}

.sdlt-bar-label {
  width: 80px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  text-align: right;
  flex-shrink: 0;
}

.sdlt-bar-track {
  flex: 1;
  height: 22px;
  background: #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.sdlt-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
  min-width: 4px;
}

.sdlt-bar-investor {
  background: #B11217;
}

.sdlt-bar-ftb {
  background: #0d7377;
}

.sdlt-bar-standard {
  background: #b8860b;
}

.sdlt-bar-amount {
  width: 80px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  flex-shrink: 0;
}

.sdlt-standalone-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.sdlt-standalone-tabs .scenario-tab {
  flex: 1;
}

.sdlt-only {
  display: none !important;
}

.simple-only {
  display: none !important;
}

body.sdlt-mode .sdlt-only {
  display: block !important;
}

body.sdlt-mode .analyser-only {
  display: none !important;
}

body.simple-mode .simple-only {
  display: block !important;
}

body.simple-mode .full-only {
  display: none !important;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mode-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.dark-mode-toggle {
  background: none;
  border: 2px solid #ddd;
  color: #555;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background: #f0f2f5;
  border-color: #bbb;
  color: #333;
}

.btn-share {
  padding: 8px 18px;
  background: #0d7377;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
  position: relative;
}

.btn-share:hover {
  background: #0a5a5d;
}

.btn-share.copied {
  background: #1a9a4a;
}

.results-header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.history-section {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
}

.history-section h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-clear-history {
  padding: 6px 14px;
  background: #fee;
  color: #B11217;
  border: 1.5px solid #B11217;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-clear-history:hover {
  background: #fcc;
}

.history-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8f9fb;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  border: 1px solid #eee;
}

.history-card:hover {
  background: #fef2f2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.history-card-grade {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.history-card-info {
  flex: 1;
  min-width: 0;
}

.history-card-address {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-card-details {
  font-size: 0.78rem;
  color: #777;
  margin-top: 2px;
}

.history-card-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: #fee;
  color: #B11217;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.history-card-delete:hover {
  background: #fcc;
}

.history-empty {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header {
    padding: 14px 0;
  }

  .header-logo {
    height: 30px;
  }

  header .subtitle {
    font-size: 0.82rem;
  }

  .container {
    padding: 0 12px;
  }

  .header-inner {
    gap: 8px;
  }

  .mode-toggle-row {
    gap: 8px;
  }

  .dark-mode-toggle {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .mode-toggle {
    gap: 6px;
  }

  .mode-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .input-panel {
    padding: 18px;
    border-radius: 10px;
  }

  .results-panel {
    padding: 18px;
    border-radius: 10px;
    min-height: 200px;
  }

  .layout {
    gap: 14px;
    margin-top: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group input,
  .form-group select {
    padding: 12px;
    font-size: 16px;
    min-height: 44px;
  }

  .btn-calculate {
    min-height: 48px;
    font-size: 1rem;
  }

  .scenario-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }

  .scenario-tab {
    padding: 10px 8px;
    font-size: 0.78rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sdlt-standalone-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }

  .sdlt-standalone-tabs .scenario-tab {
    min-height: 44px;
  }

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

  .yield-cards {
    grid-template-columns: 1fr;
  }

  .yield-card {
    padding: 14px;
  }

  .results-header-row {
    flex-direction: column;
    gap: 10px;
  }

  .results-header-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .offer-box .offer-price {
    font-size: 1.4rem;
  }

  .sdlt-bar-label {
    width: 60px;
    font-size: 0.75rem;
  }

  .sdlt-bar-amount {
    width: 65px;
    font-size: 0.78rem;
  }

  .history-section {
    padding: 18px;
    border-radius: 10px;
  }

  .history-card {
    padding: 10px 12px;
  }

  .map-section {
    padding: 18px;
    border-radius: 10px;
  }

  #mapContainer {
    height: 250px;
  }

  .btn-save-pdf {
    min-height: 48px;
  }

  .cost-item-row .cost-item-amount {
    width: 80px;
  }

  .letting-agent-row {
    flex-direction: column;
    gap: 8px;
  }

  .letting-agent-row input[type="text"],
  .letting-agent-row input[type="number"] {
    min-height: 44px;
    font-size: 16px;
  }

  .refinance-inputs input,
  .s24-inputs select,
  .cg-inputs input {
    font-size: 16px;
  }

  .vat-checkbox {
    align-self: flex-start;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .btn-add-item,
  .btn-remove-item,
  .btn-clear-history,
  .history-card-delete {
    min-height: 44px;
  }

  .buyer-type-toggle,
  .purchase-type-toggle,
  .mode-toggle,
  .maint-mode-toggle {
    max-width: 100%;
  }

  .result-section {
    overflow-x: hidden;
    word-wrap: break-word;
  }

  .refinance-inputs .form-row,
  .cg-projection-grid {
    grid-template-columns: 1fr;
  }

  .refinance-inputs .form-group.half {
    min-width: 100%;
  }

  button,
  .btn-calculate,
  .btn-share,
  .btn-save-pdf,
  .btn-save-pdf-inline {
    max-width: 100%;
  }

  input,
  select,
  textarea {
    max-width: 100%;
  }

  .sdlt-bar-row {
    flex-wrap: wrap;
  }

  .cost-item-row {
    flex-wrap: wrap;
  }

  .cost-item-row .cost-item-label,
  .cost-item-row .cost-item-amount {
    font-size: 16px;
  }
}

/* Compare Deals Overlay */
.compare-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.compare-container {
  background: #fff;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.compare-header h2 {
  font-size: 1.4rem;
  color: #1a1a1a;
}

.compare-header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-compare-pdf {
  padding: 6px 16px;
  background: #B11217;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-compare-pdf:hover {
  background: #8e0f13;
}

.btn-compare-pdf:disabled {
  opacity: 0.6;
  cursor: wait;
}

.compare-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.compare-close:hover {
  background: #ddd;
}

.compare-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.compare-sort label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.compare-sort select {
  padding: 8px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
}

.compare-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-card {
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: border-color 0.2s;
}

.compare-card:hover {
  border-color: #ccc;
}

.compare-card-best {
  border-color: #0a7a2e;
  background: linear-gradient(135deg, rgba(10,122,46,0.03), rgba(10,122,46,0.01));
}

.compare-rank {
  position: absolute;
  top: -10px;
  left: 16px;
  background: #666;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}

.rank-gold { background: #d4a017; }
.rank-silver { background: #8a8a8a; }
.rank-bronze { background: #b87333; }

.compare-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.compare-card-grade {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compare-card-address {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
}

.compare-card-label {
  font-size: 0.82rem;
  color: #777;
  display: flex;
  align-items: center;
  gap: 8px;
}

.best-deal-badge {
  background: #0a7a2e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.compare-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compare-metric-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.compare-metric-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
}

.compare-highlight {
  color: #B11217;
}

.compare-positive {
  color: #0a7a2e;
}

.compare-negative {
  color: #B11217;
}

.compare-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.compare-card-buyer {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
}

.compare-card-date {
  font-size: 0.78rem;
  color: #aaa;
}

.btn-compare-deals {
  background: #B11217;
  color: #fff;
  border: none;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 12px;
  vertical-align: middle;
  transition: background 0.2s;
}

.btn-compare-deals:hover {
  background: #8e0e13;
}

/* Dark mode for compare overlay */
body.dark .compare-container {
  background: #1e1e1e;
}

body.dark .compare-header h2 {
  color: #eee;
}

body.dark .btn-compare-pdf {
  background: #B11217;
  color: #fff;
}

body.dark .btn-compare-pdf:hover {
  background: #d41920;
}

body.dark .compare-close {
  background: #333;
  color: #eee;
}

body.dark .compare-close:hover {
  background: #444;
}

body.dark .compare-sort label {
  color: #aaa;
}

body.dark .compare-sort select {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}

body.dark .compare-card {
  border-color: #333;
  background: #242424;
}

body.dark .compare-card:hover {
  border-color: #555;
}

body.dark .compare-card-best {
  border-color: #0a7a2e;
  background: linear-gradient(135deg, rgba(10,122,46,0.08), rgba(10,122,46,0.02));
}

body.dark .compare-card-address {
  color: #eee;
}

body.dark .compare-card-label {
  color: #888;
}

body.dark .compare-metric-label {
  color: #777;
}

body.dark .compare-metric-value {
  color: #ddd;
}

body.dark .compare-card-date {
  color: #666;
}

body.dark .compare-card-footer {
  border-top-color: #333;
}

body.dark .compare-card-buyer {
  color: #777;
}

/* Mobile responsive for compare */
@media (max-width: 600px) {
  .compare-overlay {
    padding: 20px 10px;
  }
  
  .compare-container {
    padding: 20px 16px;
  }
  
  .compare-card-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .compare-sort select {
    font-size: 16px;
  }
}

@media print {
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  header,
  .input-panel,
  .results-panel,
  .map-section,
  .history-section,
  .disclaimer,
  .scenario-tabs,
  .btn-calculate,
  .btn-save-pdf,
  .btn-save-pdf-inline,
  .btn-share,
  .btn-add-item,
  .btn-remove-item,
  .tooltip,
  .address-dropdown,
  .mode-toggle,
  .yield-gauge,
  .sdlt-comparison-chart,
  .sdlt-standalone-tabs {
    display: none !important;
  }

  .print-report {
    display: block !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .print-report .print-header {
    text-align: center;
    border-bottom: 3px solid #B11217;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .print-report .print-filename {
    font-size: 8.5pt;
    color: #888;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 10px;
    word-break: break-all;
  }

  .print-report .print-header h1 {
    font-size: 22pt;
    color: #000;
    margin-bottom: 4px;
  }

  .print-report .print-date {
    font-size: 9pt;
    color: #555;
    margin-bottom: 4px;
  }

  .print-report .print-address {
    font-size: 12pt;
    font-weight: 600;
    color: #333;
  }

  .print-report .print-section {
    page-break-inside: avoid;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd;
  }

  .print-report .print-section:last-of-type {
    border-bottom: none;
  }

  .print-report h2 {
    font-size: 14pt;
    color: #B11217;
    border-bottom: 1.5px solid #B11217;
    padding-bottom: 4px;
    margin-bottom: 10px;
    margin-top: 0;
  }

  .print-report h3 {
    font-size: 12pt;
    color: #333;
    margin: 12px 0 6px;
  }

  .print-report h4 {
    font-size: 10pt;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px 0 4px;
  }

  .print-report table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin-bottom: 8px;
    page-break-inside: avoid;
  }

  .print-report th {
    text-align: left;
    padding: 4px 8px;
    background: #f5f5f5 !important;
    border-bottom: 1.5px solid #ccc;
    font-weight: 600;
    color: #333;
    font-size: 9pt;
  }

  .print-report td {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
  }

  .print-report td:last-child,
  .print-report th:last-child {
    text-align: right;
  }

  .print-report .total-row td {
    border-top: 2px solid #000;
    border-bottom: none;
    padding-top: 6px;
    font-weight: 700;
  }

  .print-report .print-total {
    font-size: 10pt;
    margin: 4px 0 8px;
  }

  .print-report .print-scenario {
    page-break-inside: avoid;
    margin-bottom: 8px;
  }

  .print-report .print-disclaimer {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 8pt;
    color: #555;
    page-break-inside: avoid;
  }

  .print-report .print-deal-rating {
    margin: 6px 0 10px;
    padding: 6px 0;
    font-size: 11pt;
  }

  .print-report .print-deal-grade {
    font-size: 16pt;
    font-weight: 800;
    margin-right: 6px;
  }

  .print-report .print-deal-label {
    font-weight: 700;
    font-size: 11pt;
    margin-right: 6px;
  }

  .print-report .print-deal-detail {
    font-size: 9pt;
    color: #555;
  }

  @page {
    margin: 15mm 12mm;
    size: A4;
  }
}

body.dark {
  background: #1a1a2e;
  color: #e8e8e8;
}

body.dark header {
  background: #1e1e2f;
  border-bottom-color: #333;
}

body.dark header .subtitle {
  color: #aaa;
}

body.dark .header-logo {
  filter: brightness(0) invert(1);
}

body.dark .input-panel,
body.dark .results-panel,
body.dark .map-section,
body.dark .history-section,
body.dark .disclaimer {
  background: #16213e;
  box-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

body.dark .input-panel h2,
body.dark .results-content h2,
body.dark .map-section h2,
body.dark .history-section h2 {
  color: #e8e8e8;
}

body.dark .input-panel h3 {
  color: #a0a0b0;
  border-top-color: #2a2a4a;
}

body.dark .form-group label {
  color: #c0c0d0;
}

body.dark .form-group input {
  background: #1a1a2e;
  border-color: #2a2a4a;
  color: #e8e8e8;
}

body.dark .form-group input:focus {
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.2);
}

body.dark .cost-item-row .cost-item-label,
body.dark .cost-item-row .cost-item-amount {
  background: #1a1a2e;
  border-color: #2a2a4a;
  color: #e8e8e8;
}

body.dark .cost-item-row .cost-item-label:focus,
body.dark .cost-item-row .cost-item-amount:focus {
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177,18,23,0.2);
}

body.dark .cost-total-row {
  color: #c0c0d0;
  border-top-color: #2a2a4a;
}

body.dark .btn-add-item {
  background: #1a1a2e;
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .btn-add-item:hover {
  border-color: #B11217;
  background: rgba(177,18,23,0.1);
  color: #B11217;
}

body.dark .btn-remove-item {
  background: rgba(177,18,23,0.15);
}

body.dark .btn-remove-item:hover {
  background: rgba(177,18,23,0.3);
}

body.dark .dark-mode-toggle {
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .dark-mode-toggle:hover {
  background: #16213e;
  border-color: #444;
  color: #e0e0e0;
}

body.dark .mode-btn {
  background: #16213e;
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .mode-btn.active {
  border-color: #B11217;
  background: rgba(177,18,23,0.15);
  color: #B11217;
}

body.dark .mode-btn:hover {
  border-color: #B11217;
}

body.dark .tooltip {
  background: #2a2a4a;
  color: #a0a0b0;
}

body.dark .tooltip:hover::after {
  background: #0f0f23;
  color: #e8e8e8;
}

body.dark .results-placeholder {
  color: #a0a0b0;
}

body.dark .sdlt-rates-note {
  color: #666;
}

body.dark .results-content .address-line {
  color: #a0a0b0;
}

body.dark .results-content .deal-ref-line {
  color: #c8c8d8;
}

body.dark .history-card-ref {
  color: #8888a0;
}

body.dark .compare-card-ref {
  color: #9090a8;
}

body.dark .scenario-tab {
  background: #16213e;
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .scenario-tab.active {
  border-color: #B11217;
  background: rgba(177,18,23,0.15);
  color: #B11217;
}

body.dark .scenario-tab:hover {
  border-color: #B11217;
}

body.dark .result-section h3 {
  color: #a0a0b0;
  border-bottom-color: #2a2a4a;
}

body.dark .result-row .label {
  color: #a0a0b0;
}

body.dark .result-row .value {
  color: #e8e8e8;
}

body.dark .result-row.total {
  border-top-color: #e8e8e8;
}

body.dark .comparison-col {
  border-color: #2a2a4a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

body.dark .comparison-col h4 {
  border-bottom-color: #2a2a4a;
}

body.dark .yield-basis-note {
  color: #a0a0b0;
}

body.dark .yield-card {
  background: #1a1a2e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

body.dark .yield-card .yield-label {
  color: #a0a0b0;
}

body.dark .yield-card .yield-value {
  color: #e8e8e8;
}

body.dark .yield-card .yield-value.yield-near {
  color: #e8e8e8;
}

body.dark .deal-rating {
  background: #1a1a2e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

body.dark .deal-rating-detail {
  color: #a0a0b0;
}

body.dark .sdlt-comparison-chart {
  background: #1a1a2e;
}

body.dark .sdlt-comparison-chart h3 {
  color: #a0a0b0;
  border-bottom-color: #2a2a4a;
}

body.dark .sdlt-bar-label {
  color: #a0a0b0;
}

body.dark .sdlt-bar-track {
  background: #2a2a4a;
}

body.dark .sdlt-bar-amount {
  color: #e8e8e8;
}

body.dark .sdlt-band-table th {
  background: #1a1a2e;
  color: #a0a0b0;
  border-bottom-color: #2a2a4a;
}

body.dark .sdlt-band-table td {
  border-bottom-color: #2a2a4a;
  color: #e8e8e8;
}

body.dark .offer-box {
  background: rgba(177,18,23,0.08);
  border-color: #B11217;
}

body.dark .offer-box .offer-label {
  color: #a0a0b0;
}

body.dark .offer-box .offer-note {
  color: #a0a0b0;
}

body.dark .offer-box.not-achievable {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

body.dark .offer-box.not-achievable .offer-price {
  color: #a0a0b0;
}

body.dark .btn-save-pdf {
  background: #16213e;
  color: #e8e8e8;
  border-color: #e8e8e8;
}

body.dark .btn-save-pdf:hover {
  background: #e8e8e8;
  color: #16213e;
}

body.dark .btn-save-pdf-inline {
  background: #16213e;
  color: #e8e8e8;
  border-color: #e8e8e8;
}

body.dark .btn-save-pdf-inline:hover {
  background: #e8e8e8;
  color: #16213e;
}

body.dark .toggle-checkbox {
  color: #c0c0d0;
}

body.dark .toggle-checkbox-label {
  color: #c0c0d0;
}

body.dark .mortgage-include-row {
  border-bottom-color: #2a2a4a;
}

body.dark .buyer-type-toggle {
  border-color: #2a2a4a;
}

body.dark .buyer-type-btn {
  background: #1a1a2e;
  color: #a0a0b0;
}

body.dark .buyer-type-btn.active {
  background: #B11217;
  color: #fff;
}

body.dark .buyer-type-btn:hover:not(.active) {
  background: #2a2a4a;
}

body.dark .purchase-type-toggle {
  border-color: #2a2a4a;
}

body.dark .purchase-type-btn {
  background: #1a1a2e;
  color: #a0a0b0;
}

body.dark .purchase-type-btn.active {
  background: #B11217;
  color: #fff;
}

body.dark .purchase-type-btn:hover:not(.active) {
  background: #2a2a4a;
}

body.dark .toggle-slider {
  background: #444;
}

body.dark .btn-start-again {
  background: transparent;
  color: #B11217;
  border-color: #B11217;
}

body.dark .btn-start-again:hover {
  background: #B11217;
  color: #fff;
}

body.dark .btn-mortgage-calc {
  background: #B11217;
}

body.dark .btn-mortgage-calc:hover {
  background: #e0343b;
}

body.dark .borrowing-summary {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

body.dark .borrowing-row.borrowing-highlight {
  border-top-color: #2a2a4a;
}

body.dark .borrowing-highlight .borrowing-label {
  color: #e0e0f0;
}

body.dark .borrowing-highlight .borrowing-value {
  color: #4ade80;
}

body.dark .borrowing-row.borrowing-total {
  border-top-color: #2a2a4a;
}

body.dark .borrowing-label {
  color: #a0a0b0;
}

body.dark .borrowing-total .borrowing-label {
  color: #e0e0f0;
}

body.dark .borrowing-value {
  color: #e0e0f0;
}

body.dark .vat-checkbox {
  background: #1a1a2e;
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .vat-checkbox:has(input:checked) {
  border-color: #B11217;
  background: rgba(177,18,23,0.1);
  color: #B11217;
}

body.dark .letting-agent-row input[type="number"] {
  background: #1a1a2e;
  border-color: #2a2a4a;
  color: #e8e8e8;
}

body.dark .mortgage-header {
  color: #a0a0b0;
}

body.dark .mortgage-header:hover {
  color: #B11217;
}

body.dark .mortgage-arrow {
  color: #a0a0b0;
}

body.dark .cash-flow-indicator.cash-flow-positive {
  background: rgba(26,154,74,0.15);
}

body.dark .cash-flow-indicator.cash-flow-negative {
  background: rgba(177,18,23,0.15);
}

body.dark .address-dropdown {
  background: #16213e;
  border-color: #2a2a4a;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

body.dark .address-dropdown-item {
  color: #e8e8e8;
  border-bottom-color: #2a2a4a;
}

body.dark .address-dropdown-item:hover,
body.dark .address-dropdown-item.active {
  background: rgba(177,18,23,0.1);
  color: #B11217;
}

body.dark #mapContainer {
  border-color: #2a2a4a;
}

body.dark .disclaimer {
  background: rgba(255,248,225,0.08);
  border-color: #2a2a4a;
  color: #a0a0b0;
}

body.dark .history-card {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

body.dark .history-card:hover {
  background: rgba(177,18,23,0.08);
}

body.dark .history-card-address {
  color: #e8e8e8;
}

body.dark .history-card-details {
  color: #a0a0b0;
}

body.dark .history-card-delete {
  background: rgba(177,18,23,0.15);
}

body.dark .history-card-delete:hover {
  background: rgba(177,18,23,0.3);
}

body.dark .btn-clear-history {
  background: rgba(177,18,23,0.15);
}

body.dark .btn-clear-history:hover {
  background: rgba(177,18,23,0.3);
}

body.dark .history-empty {
  color: #a0a0b0;
}

body.dark .yield-gauge svg path[stroke="#e8e8e8"] {
  stroke: #2a2a4a;
}

body.dark .yield-gauge svg text[fill="#777"] {
  fill: #a0a0b0;
}

body.dark .maint-mode-btn { background: #333; color: #bbb; }
body.dark .maint-mode-btn.active { background: #B11217; color: #fff; }
body.dark .maint-mode-btn:hover:not(.active) { background: #444; }

body.dark .maintenance-toggle {
  border-color: #2a2a4a;
}

body.dark .yield-gauge svg line[stroke="#1a1a1a"] {
  stroke: #e8e8e8;
}

body.dark .stress-test-section { border-top-color: #444; }
body.dark .stress-test-section h4 { color: #999; }
body.dark .refinance-section { background: #2a2a2a; border-color: #444; }
body.dark .refinance-inputs input { background: #333; border-color: #555; color: #e0e0e0; }
body.dark .refinance-inputs label { color: #bbb; }
body.dark .collapsible-section { background: #2a2a2a; border-color: #444; }
body.dark .s24-inputs select,
body.dark .cg-inputs input { background: #333; border-color: #555; color: #e0e0e0; }
body.dark .s24-inputs label,
body.dark .cg-inputs label { color: #bbb; }
body.dark .cg-projection-card { background: #333; border-color: #444; }
body.dark .cg-projection-value { color: #e0e0e0; }
body.dark .cg-projection-period { color: #999; }
