:root {
  --primary-color: #61C0BF;
  --panel-width: 300px;
  --rm-bg-dark: #0e0f10;
  --rm-text-dark: #fff;
  --rm-bg-light: #f7f7f9;
  --rm-text-light: #111;
  --rm-accent: #61C0BF;   /* your teal */
  --rm-muted: #cfd8dc;    /* pill bg for light theme */
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #f8f9fa;
    cursor: pointer;
    margin-left: 1rem;
}

#theme-toggle:focus {
    outline: none;
    box-shadow: none;
}

.form-tile {
  background-color: #1c1c1c;
  color: white;
}

/* Dark theme */
[data-bs-theme="dark"] .form-tile {
  background-color: #1c1c1c;
  color: #ffffff;
}

/* Light theme */
[data-bs-theme="light"] .form-tile {
  background-color: #f8f9fa;
  color: #212529;
}

/* Consistent tooltip styling for custom tooltips */
.tooltip.field-tooltip {
  --bs-tooltip-bg: #000;
  --bs-tooltip-color: #fff;
  --bs-tooltip-opacity: 1;
}

.tooltip.field-tooltip .tooltip-inner {
  background-color: var(--bs-tooltip-bg) !important;
  color: var(--bs-tooltip-color) !important;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
}

.tooltip.field-tooltip .tooltip-arrow::before {
  border-top-color: var(--bs-tooltip-bg) !important;
}

[data-bs-theme="dark"] .tooltip.field-tooltip {
  --bs-tooltip-bg: #fff;
  --bs-tooltip-color: #111;
}

[data-bs-theme="dark"] .tooltip.field-tooltip .tooltip-arrow::before {
  border-top-color: #fff !important;
}

.wealth-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.35rem;
  color: inherit;
}

.wealth-hint-icon:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.wealth-hint-link {
  font-size: 0.9rem;
  text-decoration: underline;
  color: var(--primary-color);
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline;
}

.wealth-hint-link:hover,
.wealth-hint-icon:hover {
  color: var(--primary-color);
}

.wealth-hint-popover {
  --bs-popover-max-width: 420px;
  --bs-popover-body-padding-x: 1rem;
  --bs-popover-body-padding-y: 0.85rem;
  --bs-popover-border-color: rgba(0, 0, 0, 0.08);
  --bs-popover-box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.15);
  max-width: min(420px, calc(100vw - 24px));
  margin-top: 8px;
}

.wealth-hint-popover .popover-body {
  font-size: 0.92rem;
  line-height: 1.4;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

[data-bs-theme="dark"] .wealth-hint-popover {
  --bs-popover-bg: #2a2f36;
  --bs-popover-body-color: #f5f6f8;
  --bs-popover-border-color: #39414b;
  --bs-popover-box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.45);
}

.wealth-hint-list {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.wealth-hint-list li {
  margin-bottom: 0.4rem;
}

.wealth-hint-panel {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.5rem;
  padding: 0.75rem 0.85rem;
  background-color: rgba(15, 23, 42, 0.03);
}

.wealth-hint-panel[open] {
  background-color: rgba(97, 192, 191, 0.1);
  border-color: rgba(97, 192, 191, 0.35);
}

[data-bs-theme="dark"] .wealth-hint-panel {
  border-color: rgba(148, 163, 184, 0.25);
  background-color: rgba(15, 23, 42, 0.35);
}

[data-bs-theme="dark"] .wealth-hint-panel[open] {
  background-color: rgba(97, 192, 191, 0.18);
  border-color: rgba(97, 192, 191, 0.45);
}

.wealth-hint-summary {
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.wealth-hint-summary::marker,
.wealth-hint-summary::-webkit-details-marker {
  display: none;
}

.wealth-hint-summary::before {
  content: "▸";
  font-size: 1rem;
  transition: transform 0.2s ease;
  color: currentColor;
  opacity: 0.85;
}

.wealth-hint-panel[open] .wealth-hint-summary::before {
  transform: rotate(90deg);
}

.example-callout {
  border-left: 4px solid var(--primary-color);
  background-color: rgba(97, 192, 191, 0.12);
}

[data-bs-theme="dark"] .example-callout {
  background-color: rgba(97, 192, 191, 0.18);
  border-color: rgba(97, 192, 191, 0.7);
  color: #e8f6f5;
}



body {
  background-color: #000;
}

[data-bs-theme="dark"] body {
  background-color: #121212;
}

[data-bs-theme="light"] body {
  background-color: #ffffff;
}

.ad-tile {
  background-color: #2c2c2c;
  color: #fff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}

[data-bs-theme="light"] .ad-tile {
  background-color: #f1f1f1;
  color: #000;
}

.test-ad {
  background-color: #3a3a3a;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

#theme-toggle { color: #000 !important; }


[data-bs-theme="light"] .test-ad {
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.test-ad a.btn {
  margin-top: 0.5rem;
  display: inline-block;
}

.custom-submit {
  background-color: #61C0BF !important;
  border: none !important;
  color: white !important;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 0.25rem;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  width: 100%;
  user-select: none;
  line-height: 1.5;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.custom-submit:hover,
.custom-submit:focus {
  background-color: #4fa9a8 !important;
  border-color: #4fa9a8 !important;
  color: white !important;
}

@media (max-width: 480px) {
  #cookie-banner {
    left: 5%;
    right: 5%;
    max-width: none !important;
  }
}

#info-toggle:hover {
  background-color: #4fa9a8; /* Darker teal on hover */
}


#info-toggle .arrow {
  transition: transform 0.3s ease;
}

#info-toggle.open .arrow {
  transform: rotate(180deg);
}

#info-toggle.open .label {
  display: none;
}

/* === Sliding Info Panel === */
#info-panel {
  position: fixed;
  top: 0;
  right: calc(-1 * var(--panel-width));
  width: var(--panel-width);
  height: 100%;
  background-color: var(--bs-body-bg, #1c1c1c);
  color: var(--bs-body-color, #ffffff);
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
  padding: 5rem 1.25rem 1.25rem 1.25rem;  /* 🔧 Top padding increased */
  z-index: 1000;
  overflow-y: auto;
  transition: right 0.3s ease-in-out;
}

#info-panel.open {
  right: 0;
}

/* === Info Tile Styling === */
.info-tile {
  background-color: var(--bs-secondary-bg, #1e1e1e);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] .info-tile {
  background-color: #1e1e1e;
  color: #f1f1f1;
}

[data-bs-theme="light"] .info-tile {
  background-color: #f5f5f5;
  color: #222;
}

.info-tile h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.info-tile p {
  margin: 0;
  font-size: 0.95rem;
}

.info-link {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Light theme */
html[data-bs-theme="light"] .dismiss-tile {
  color: #000 !important; /* black for visibility */
}

/* Dark theme */
html[data-bs-theme="dark"] .dismiss-tile {
  color: #ccc !important; /* light grey for contrast */
}

.dismiss-tile {
  float: right;
  background-color: transparent !important;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

.dismiss-tile:hover {
  border-color: #999;
}

.dismiss-tile:hover {
  color: #ccc;
}

#info-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: white;
  padding: 0.75rem 0.75rem;
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
  cursor: pointer;
  z-index: 9999;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}

#info-toggle .label {
  margin-right: 0.5rem;
}

button,
.btn,
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

button:hover,
.btn:hover,
.btn-primary:hover {
  background-color: #4fa9a8 !important;
  border-color: #4fa9a8 !important;
}

/* Keep Accept All button in teal */
.btn-accept {
  background-color: var(--primary-color);
  border: none;
  color: white;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
}

.btn-accept:hover {
  background-color: #4fa9a8;
}

#mapModal .modal-body { padding: 0; }
#mapModal #mapIframe { border: 0; width: 100%; height: 85vh; }

/* Accordion header and Reject button go back to dark */
.cookie-dark-button,
.accordion-button.cookie-accordion {
  background-color: #1e1e1e !important;
  color: white !important;
  border-left: 4px solid var(--bs-secondary-color, #444) !important;
  border-radius: 999px;
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
}

.cookie-dark-button:hover,
.accordion-button.cookie-accordion:hover {
  background-color: #2a2a2a !important;
  color: #ddd !important;
}
/* General pill-shaped dark button fix */
.cookie-dark-button,
.accordion-button.cookie-accordion {
  background-color: #1e1e1e !important;
  color: white !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.875rem !important;
  box-shadow: none !important;
}

/* Remove focus glow or default outline */
.cookie-dark-button:focus,
.accordion-button.cookie-accordion:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Hover effect for dark buttons */
.cookie-dark-button:hover,
.accordion-button.cookie-accordion:hover {
  background-color: #2a2a2a !important;
  color: #ddd !important;
}

/* General form pill input styling */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="search"],
input[type="tel"] {
  background-color: transparent !important;
  color: inherit;
  border: 2px solid #ccc;
  border-radius: 999px !important;
  padding: 0.5rem 1rem;
  width: 100%;
  font-size: 1rem;
  box-shadow: none !important;
  outline: none !important;
}

/* On focus, highlight with primary color */
input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(97, 192, 191, 0.25) !important;
}

input:-webkit-autofill {
  box-shadow: 0 0 0px 1000px transparent inset !important;
  -webkit-text-fill-color: inherit !important;
}

input[type="checkbox"].form-check-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  box-shadow: none;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background-color: transparent;
  border: 2px solid white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease-in-out;
  padding: 0;
}

input[type="checkbox"].form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.custom-checkbox-input {
  display: none;
}

.custom-checkbox-label {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  font-size: 1rem;
  color: white;
}

/* Outer circle */
.custom-checkbox-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 2px solid white;
  background-color: transparent;
  transition: all 0.2s ease-in-out;
}

/* Checkmark (hidden by default) */
.custom-checkbox-label::after {
  content: "✔";
  position: absolute;
  left: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Show checkmark on checked */
.custom-checkbox-input:checked + .custom-checkbox-label::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.custom-checkbox-input:checked + .custom-checkbox-label::after {
  opacity: 1;
}

.custom-checkbox-label::after {
  content: "\f00c"; /* fa-check unicode */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.nav-link.active {
  font-weight: bold;
  text-decoration: underline;
}

.navbar .nav-link {
  font-size: 0.8rem; /* Bootstrap default ~1rem */
}

.navbar {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.navbar.custom-navbar {
  --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.25);
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme='dark'] .navbar.custom-navbar {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.25);
}

.navbar-toggler.custom-toggler {
  border-color: var(--bs-navbar-toggler-border-color);
}

.navbar-toggler.custom-toggler .navbar-toggler-icon {
  background-image: var(--bs-navbar-toggler-icon-bg);
}

.navbar .nav-link {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.beta-label {
  font-size: 0.75rem;
  color: #fff;
  background-color: #000;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-weight: 600;
}

.back-to-top {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

/* High specificity and override for theme-based styling */
html[data-bs-theme="dark"] .back-to-top {
  color: #ffffff !important;
}

html[data-bs-theme="light"] .back-to-top {
  color: #000000 !important;
}

/* LIGHT THEME Checkbox override */
[data-bs-theme="light"] input[type="checkbox"].form-check-input {
  background-color: #ffffff !important;
  border: 2px solid #000000 !important;
}

/* Optional: tick remains teal (already using var(--primary-color)) */
[data-bs-theme="light"] input[type="checkbox"].form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

#main-footer {
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#main-footer.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}


#main-footer a {
  color: #000;
  text-decoration: none;
}

#main-footer a:hover {
  text-decoration: underline;
}

#main-footer .fw-bold {
  font-weight: 600;
}

#site-footer {
  background-color: var(--bs-tertiary-bg); /* auto-adjusting Bootstrap variable */
  color: var(--bs-body-color);
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
  z-index: 999;
  padding: 0.5rem 0.25rem;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

#site-footer.visible {
  transform: translateY(0);
}

#site-footer a {
  color: var(--bs-body-color);
  text-decoration: none;
  font-weight: 500;
}

#site-footer a:hover {
  text-decoration: underline;
}

#site-footer h6 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#site-footer .container {
  padding-left: 1rem;
  padding-right: 1rem;
}

html,
body {
  height: 100%;
}

main.container::after {
  content: '';
  display: block;
  height: 100px; /* space to allow swipe up/down on short pages */
}

@media (min-width: 768px) {
  #site-footer {
    position: static !important;
    transform: none !important;
  }
}

/* === THEME-BASED INPUT BORDERS (Bootstrap 5.3) === */

/* DARK */
html[data-bs-theme="dark"] input,
html[data-bs-theme="dark"] select,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background-color: transparent !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important; /* white borders in dark mode */
}

/* LIGHT */
html[data-bs-theme="light"] input,
html[data-bs-theme="light"] select,
html[data-bs-theme="light"] textarea,
html[data-bs-theme="light"] .form-control,
html[data-bs-theme="light"] .form-select {
  background-color: #ffffff !important;
  color: #212529 !important;
  border: 1px solid #000000 !important; /* crisp black borders in light mode */
}

/* Focus (both themes) */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color, #61C0BF) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Dark select dropdown options */
html[data-bs-theme="dark"] select option {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
}

.consent__row input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 20px;
  background: #555;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
}
.consent__row input[type="checkbox"]:checked {
  background: #61C0BF;
}
.consent__row input[type="checkbox"]::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.consent__row input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

/* Hide-anything utility */
.hidden { display: none !important; }

/* (Optional) scoped version if you prefer */
.consent__panel.hidden { display: none !important; }

/* =========================
   CONSENT BANNER (Theme-aware)
   ========================= */
.consent.hidden { display:none !important; }
.consent {
  position: fixed;
  inset: auto 0 0 0;         /* full-width bottom bar */
  z-index: 99999;            /* above everything */
  background: var(--rm-bg-dark);
  color: var(--rm-text-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
}
.consent a { color: var(--rm-accent); text-decoration: underline; }
.consent__inner { max-width: 1100px; margin: 0 auto; padding: 16px; }
.consent__title { margin: 0 0 6px 0; font-size: 1.05rem; font-weight: 600; }
.consent__text { margin: 0 0 10px 0; }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons that look good in both themes */
.consent .btn { border: 0; padding: 8px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;}
.consent .btn-primary { background: var(--rm-accent); color: #000; }
.consent .btn-secondary {
  background: #2b2b2b; color: #fff;
}
[data-bs-theme="light"] .consent .btn-secondary {
  background: #e0e0e0; color: #111;
}
.consent .btn-link { background: transparent; color: inherit; text-decoration: underline; padding: 0; }

/* Preferences panel */
.consent__panel { margin-top: 10px; padding: 10px; background: #1a1b1e; border-radius: 8px; }
[data-bs-theme="light"] .consent__panel { background: #f0f2f4; }
.consent__row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.consent__panel-actions { margin-top: 8px; }

/* Slider toggles (scoped; won’t clash with form-check-input) */
.consent__row input[type="checkbox"] {
  appearance: none;
  width: 42px; height: 24px; border-radius: 999px;
  position: relative; cursor: pointer; outline: none;
  background: #555;                                /* dark/off default */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.consent__row input[type="checkbox"]::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  transition: transform .2s ease;
}
.consent__row input[type="checkbox"]:checked { background: var(--rm-accent); }
.consent__row input[type="checkbox"]:checked::before { transform: translateX(18px); }

/* Light theme "off" state shouldn't be white-on-white */
[data-bs-theme="light"] .consent { background: var(--rm-bg-light); color: var(--rm-text-light); border-top-color: rgba(0,0,0,0.08); }
[data-bs-theme="light"] .consent__row input[type="checkbox"]::before {
    background: #000;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);}

/* Utility: keep it truly hidden when needed */
.hidden { display: none !important; }
.consent__panel.hidden { display: none !important; }

/* Kill legacy/old cookie popups if they’re still injected */
#cookie-banner, .cookie-banner, .cc-window, #cookie-consent { display: none !important; }

[data-bs-theme="light"] #info-toggle {
    color: #000 !important;
    background-color: var(--rm-muted); /* optional: make it stand out */
}
[data-bs-theme="dark"] #info-toggle {
    color: white !important;
}

/* Stop flex from shrinking buttons + make pills wide enough */
.consent__actions .btn {
  flex: 0 0 auto;            /* don't shrink */
  display: inline-flex;
  align-items: center;
  white-space: nowrap;       /* keep word on one line */
  padding: 10px 22px;        /* wider pill */
  border-radius: 999px;      /* pill shape */
  line-height: 1;
  min-width: max-content;    /* ensure the word fits */
}

/* Make the link-style button look like a pill, not a text link */
.consent .btn-link {
  text-decoration: none;     /* no underline on the pill */
  background: #2b2b2b;
  color: #fff;
}
[data-bs-theme="light"] .consent .btn-link {
  background: var(--rm-muted);
  color: #111;
}

#viabilityModal .modal-content { background: #111; } /* optional dark modal background */
#viabilityModal .modal-body { padding: 0; }
.brandbar { background:#61C0BF; color:#fff; min-height:48px; position: sticky; top:0; z-index:2; }
.brandbar .title { font-weight:600; }
.brandlink { color:#fff; text-decoration: underline; }
.brandlink-btn { background:none; border:none; padding:0; color:#fff; text-decoration: underline; cursor:pointer; }
#viabilityMapContainer { height: calc(80vh - 48px); width: 100%; } /* adjust height to taste */
@media print {
  body *:not(#viabilityModal) { visibility: hidden; }
  #viabilityModal, #viabilityModal * { visibility: visible; }
  #viabilityModal .btn-close, #viabilityModal .actions a { display:none !important; }
}

#shareCard { position: relative; }

 .options-sheet {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 12px);
  opacity: 0;
  width: min(920px, calc(100vw - 32px));
  z-index: 1060;
  border-radius: 14px;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
.options-sheet.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

  /* When placed under the form: normal full-width card */
  .options-inline {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 1rem;
  }

#optionsToggle .icon {
  display: inline-flex;
  align-items: center;
  margin-left: .5rem;
}
#optionsToggle .icon i {
  transition: transform .2s ease;
}
#optionsToggle[aria-expanded="true"] .icon i {
  transform: rotate(180deg);
}

@media (max-width: 767.98px) {
  #optionsToggle.floating {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 160px;
    z-index: 1062;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }
}

  /* Just wide enough for 2–3 letters without hogging space */
  .partners-filters .form-label { line-height: 1.2; }
  .partners-filters input,
  .partners-filters select {
    width: 100%;
  }

/* === Enhanced styling for Advanced calculator === */
.view-toggle {
  display: flex;
  gap: 0.75rem;
}

.view-toggle__btn {
  flex: 1 1 0;
  border-radius: 999px;
  border: 1px solid rgba(97, 192, 191, 0.55);
  background: rgba(97, 192, 191, 0.14);
  color: var(--primary-color);
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  transition: all 0.25s ease;
  box-shadow: none;
}

.view-toggle__btn:not(.is-active) {
  opacity: 0.65;
}

.view-toggle__btn.is-active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(97, 192, 191, 0.35);
  border-color: rgba(97, 192, 191, 0.75);
  opacity: 1;
}

.view-toggle__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

[data-bs-theme="dark"] .view-toggle__btn {
  border-color: rgba(97, 192, 191, 0.35);
  background: rgba(97, 192, 191, 0.12);
  color: rgba(234, 250, 250, 0.9);
}

[data-bs-theme="dark"] .view-toggle__btn.is-active {
  color: #0b1a1a;
}

/* Card & section styling */
[data-bs-theme="light"] .card.shadow-sm {
  background: #fdfdfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(9, 28, 32, 0.06);
}

[data-bs-theme="dark"] .card.shadow-sm {
  background: #151c1d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

[data-bs-theme="light"] .card.shadow-sm .text-muted {
  color: #4e6b6a !important;
}

[data-bs-theme="dark"] .card.shadow-sm .text-muted {
  color: rgba(224, 238, 238, 0.78) !important;
}

/* Typography accents */
h1, h2, h3, h4, h5, h6,
.card-title,
.section-heading {
  color: var(--primary-color);
}

.text-primary {
  color: var(--primary-color) !important;
}

[data-bs-theme="dark"] .text-primary {
  color: var(--primary-color) !important;
}

/* Table refinements */
[data-bs-theme="light"] .table thead.table-light {
  background: rgba(243, 246, 247, 0.95);
  color: #324344;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .table thead.table-light {
  background: rgba(24, 31, 33, 0.98);
  color: rgba(226, 236, 236, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .table thead,
[data-bs-theme="dark"] .table thead tr,
[data-bs-theme="dark"] .table thead th {
  background: rgba(20, 27, 29, 0.98) !important;
  color: rgba(226, 236, 236, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .table {
  --bs-table-bg: rgba(11, 15, 17, 0.85);
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  color: rgba(231, 243, 243, 0.9);
}

[data-bs-theme="light"] .table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Range inputs */
input[type="range"] {
  accent-color: var(--primary-color);
}

input[type="range"]::-webkit-slider-thumb {
  background: var(--primary-color);
  border: 2px solid #ffffff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(97, 192, 191, 0.45);
}

input[type="range"]::-moz-range-thumb {
  background: var(--primary-color);
  border: 2px solid #ffffff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(97, 192, 191, 0.45);
}

[data-bs-theme="dark"] input[type="range"]::-webkit-slider-thumb,
[data-bs-theme="dark"] input[type="range"]::-moz-range-thumb {
  border-color: rgba(10, 22, 23, 0.9);
}

/* Timeline panel */
#timelineGuardrailSummary {
  border-radius: 14px;
  border: 1px solid rgba(97, 192, 191, 0.35);
}

/* Buttons */
.btn-primary,
.btn-outline-primary:focus,
.btn-outline-primary:hover {
  box-shadow: 0 12px 25px rgba(97, 192, 191, 0.35);
}

.btn-outline-primary,
.btn-outline-secondary {
  border-radius: 999px;
}
