/* =======================================================================
   Base / Defaults
======================================================================= */

:root {
  /* tweakable tokens if you want later */
  --brand-red: #e63946;
  /* brand color */
  --brand-red-dark: #b92d38;
  --brand-blue: #1e3a5f;
  /* brand color */
  --gray-100: #fafafa;
  /* brand color */
  --gray-200: #f7f7f7;
  --gray-300: #cacaca;
  --gray-400: #ccc;
  --gray-500: #8d99ae;
  /* brand color */
  --bg: #edf2f4;
  /* brand color */
  --text: #333;
  --basic-500: #3E6EA1;
  --bbc-500: #2E2E3A;
  --mc-500: #C74449;
  --grad-height: 250px;
}

html,
body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0 5px;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg);
  padding-top: var(--nav-height, 56px);
}


/* Typography */
h1 {
  padding: 20px;
  text-align: center;
}

h2 {
  padding-top: 5px;
}

span {
  font-weight: bold;
}

footer>p>span {
  font-weight: normal;
}

span.spanOutput {
  color: #e90400;
}

span.optionName {
  color: black;
  font-weight: normal;
}

/* Footer */
footer {
  width: 100%;
}

body>footer>p {
  text-align: center;
  margin-bottom: 0;
  padding-bottom: 10px;
}

/* Utility */
.lip {
  border-top: 1px solid var(--gray-500);
  padding-top: 18px;
}

.outputLine {
  margin-top: 5px;
  font-style: italic;
}

.brand-red {
  color: var(--brand-red);
}

/* Warnings */
input.warn {
  background-color: #fff3cd;
  /* light yellow */
  border: 2px solid #ffa500;
  /* orange border */
}

/* Global form controls (simple) */
label {
  display: block;
  margin-bottom: 5px;
}

input[type="text"] {
  width: 50px;
  padding: 5px;
  margin-bottom: 10px;
  border: 1px solid var(--gray-400);
  border-radius: 4px;
}

input[type="number"] {
  width: 70px;
  margin: 3px 0;
  padding: 5px;
  border: 1px solid var(--gray-400);
  border-radius: 5px;
}

input[type="number"].auto-size {
  width: auto;
  min-width: 50px;
}

/* Chrome / Safari / Edge */
input[type="number"].autosize::-webkit-outer-spin-button,
input[type="number"].autosize::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"].autosize {
  -moz-appearance: textfield;
}

/* Hide program labels until JS says they're ready */
[data-program][data-variant] {
  visibility: hidden;
}

/* When labels are ready, reveal them */
.prog-labels-ready [data-program][data-variant] {
  visibility: visible;
}

#amountPaid,
#amountPaid1 {
  width: 60px;
}

/* Dates */
.dateInput[type="text"] {
  width: 90px;
}

/* Layout wrappers */
.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 90%;
  margin: 12px auto;
  justify-content: space-between;
  align-items: stretch;
  padding: 20px;
  background-color: var(--gray-100);
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  max-width: 1200px;
}

.moreContainer {
  margin: 20px auto;
  max-width: 600px;
  background-color: var(--gray-100);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.moreCenter {
  margin: 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* space between Logout + Reset buttons */
}

.settingsLabel {
  margin: 0;
  display: inline;
}

.calc-guide-btn {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  cursor: pointer;
  margin-top: 6px;
  font-weight: 600;
}

.calc-guide-btn:hover {
  background: #f5f5f5;
}

.page-hero-inner .calc-guide-btn{
  margin: 0;
  margin-left: 20px;
  margin-bottom: 10px;
}


.page-hero {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero-inner {
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  background: var(--gray-100);
  overflow: hidden;
  border-radius: 6px;
  margin: 0 auto 12px;
  margin-top: 10px;
}

.page-hero h1 {
  margin: 0;
  padding: 20px;
  text-align: left;
  /* matches your app style */
}

.program-basic {
  border-top: 11px solid var(--basic-500);
  background: linear-gradient(to bottom,
      color-mix(in srgb, var(--basic-500) 31%, transparent) 0%, var(--gray-100) 65%) top / 100% var(--grad-height) no-repeat, var(--gray-100);
  border-right: 2px solid var(--basic-500);
  border-left: 2px solid var(--basic-500);
  border-bottom: 2px solid var(--basic-500);
}


.program-bbc {
  border-top: 11px solid var(--bbc-500);
  background: linear-gradient(to bottom,
      color-mix(in srgb, var(--bbc-500) 31%, transparent) 0%, var(--gray-100) 65%) top / 100% var(--grad-height) no-repeat, var(--gray-100);
  border-right: 2px solid var(--bbc-500);
  border-left: 2px solid var(--bbc-500);
  border-bottom: 2px solid var(--bbc-500);
}


.program-mc {
  border-top: 11px solid var(--mc-500);
  background: linear-gradient(to bottom,
      color-mix(in srgb, var(--mc-500) 31%, transparent) 0%, var(--gray-100) 65%) top / 100% var(--grad-height) no-repeat, var(--gray-100);
  border-right: 2px solid var(--mc-500);
  border-left: 2px solid var(--mc-500);
  border-bottom: 2px solid var(--mc-500);
}


/* Fallback for browsers without color-mix() */
@supports not (background: color-mix(in srgb, red 50%, white)) {
  .program-basic {
    background:
      linear-gradient(to bottom, rgba(62, 110, 161, 0.23) 0%, var(--bg) 65%) top / 100% var(--grad-height) no-repeat, var(--bg);
  }

  .program-bbc {
    background:
      linear-gradient(to bottom, rgba(17, 17, 24, 0.18) 0%, var(--bg) 52%) top / 100% var(--grad-height) no-repeat, var(--bg);
  }

  .program-mc {
    background:
      linear-gradient(to bottom, rgba(199, 68, 73, 0.23) 0%, var(--bg) 65%) top / 100% var(--grad-height) no-repeat, var(--bg);
  }
}

/* Thin color strip for program cards/headers */
.strip {
  height: 10px;
}

.strip.basic {
  background: var(--basic-500);
}

.strip.bbc {
  background: var(--bbc-500);
}

.strip.mc {
  background: var(--mc-500);
}

.strip.settings {
  background: rgb(252, 177, 15);
}

.strip.legacy {
  background: var(--legacy-500);
}

.strip.more {
  background: var(--brand-blue);
}

.acct-line {
  margin: .5rem 20px;
  opacity: .8;
}

/* --- CTA overlay for first-time users --- */

/* Make sure any potential host can anchor the overlay */
#regularCalculator,
#legacyCalculator,
#calculatorSlider,
#calculatorInput {
  position: relative;
}

/* Temporarily disable interactions underneath the overlay */
.calc-disabled {
  pointer-events: none;
}

/* ==========================================================================
   Color Picker (Settings)
========================================================================== */

.color-picker>span {
  display: block;
  margin-top: 0px;
  font-weight: normal;
  text-decoration: underline;
  margin-bottom: 5px;
}

.color-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  max-width: calc(10 * 26px + 12 * 6px);
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background-size: cover;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch.selected {
  border-color: #fafafa;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.program-row {
  margin-bottom: 10px;
  border-bottom: 2px solid lightgray;
}

/* ==========================================================================
   Call To Action (home page)
========================================================================== */
/* The overlay itself */
.cta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gray-100);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .05);
  backdrop-filter: blur(2px);
  border-radius: 8px;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 20;
  pointer-events: auto;
}

.cta-overlay.show {
  opacity: 1;
}

.cta-card {
  max-width: 520px;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

.cta-card h3 {
  margin: 0 0 8px;
}

.cta-card p {
  margin: 0 0 12px;
}

.cta-actions {
  display: flex;
  gap: 8px;
}

.cta-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #bbb;
  cursor: pointer;
}

.headliner {
  padding: 20px 0 0;
  font-size: 2.5rem;
  width: 100%;
  text-align: left;
}

.headliner h3:nth-child(odd) {
  font-size: 3.74rem;
}

.headliner h3:nth-child(even) {
  font-size: 2.5rem;
}

.sub-headline {
  padding: 0;
  text-align: left;
  font-size: 1.75rem;
  margin-bottom: 15px;
  width: 100%;
  color: #555;
}

/* Panels / Cards */
#leftColumn,
#regularCalculator,
#christmasEventCalculator {
  box-sizing: border-box;
  padding: 0 20px 20px;
  flex: 1;
  margin: 10px;
  background-color: var(--gray-100);
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  width: calc(50% - 20px);
}


/* Left column contains two cards styled like independent containers */
#leftColumn {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#leftColumn .option-card {
  background: var(--gray-100);
  border-radius: 6px;
  padding: 0 20px 20px;
  border: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, .3);
}

#leftColumn .option-card:nth-child(2) {
  margin-bottom: 0;
}

/* Card component */
.option-card {
  position: relative;
  background-color: var(--gray-200);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.card-title {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: underline;
}

.card-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-bottom label {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

/* Specific tweak in Christmas calculator */
#christmasEventCalculator .card-bottom input[type="number"] {
  margin: 0 6px 0 -4px;
}

/* ==========================================================================
   Reset Warning
========================================================================== */
#resetWarning {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.25s ease,
    opacity 0.25s ease,
    margin-top 0.25s ease;
}

/* when warning should be shown */
#resetWarning.show {
  max-height: 80px;
  /* big enough to fit its content */
  opacity: 1;
  margin-top: 8px;
}

/* ==========================================================================
   Home page
========================================================================== */

/* ===== Global rhythm & wrappers ===== */
.section {
  padding: 64px 0;
}

@media (max-width: 900px) {
  .section {
    padding: 48px 0;
  }
}

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

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== Bands (use these on <section> as classes) ===== */
.band {
  background: #fff;
}

.band--alt {
  background: var(--gray-100, #fafafa);
}

.band--dark {
  background: var(--nav-bg, #1e3a5f);
  color: var(--nav-text, #fafafa);
}

.band--dark a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Section headings (accent line) ===== */
.section h3 {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section h3::after {
  content: "";
  display: block;
  height: 2px;
  width: 60px;
  background: var(--brand-red, #e63946);
  border-radius: 2px;
}

/* ===== CTA strip (goes right under hero) ===== */
.cta {
  background-color: rgba(30, 58, 95, .12);
  padding: 18px 0;
}

.cta .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

@media (max-width: 700px) {
  .cta .wrap {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.cta-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: .2px;
}

.cta-buttons {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

#developer .dev>div {
  max-width: 58ch;
}


/* Buttons used in CTA (lightweight, no conflict with site) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .04s ease-in-out, background .15s ease-in-out, border-color .15s ease-in-out;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand-red, #e63946);
  color: #fff;
  border-color: rgba(0, 0, 0, .05);
}

.btn--primary:hover {
  filter: brightness(0.96);
}

.btn--ghost {
  background: #fff;
  color: #333;
  border-color: var(--gray-300, #cacaca);
}

.btn--ghost:hover {
  background: #f9f9f9;
}

/* Layout helper */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Container so buttons can be positioned over the scroller */
.carousel {
  position: relative;
}

.h-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 40%, 360px);
  gap: 16px;
  overflow-x: auto;

  /* was: padding: 50px 0;  */
  /* give it horizontal padding instead */
  padding: 50px 32px;

  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;

  mask-image: linear-gradient(90deg,
      transparent 0,
      #000 24px,
      #000 calc(100% - 32px),
      transparent 100%);

  scrollbar-width: none;
}

.h-scroll>* {
  scroll-snap-align: start;
}

/* remove the breathing-room margins; padding now handles it */
.h-scroll> :first-child {
  margin-left: 0;
}

.h-scroll> :last-child {
  margin-right: 0;
}



.h-scroll::-webkit-scrollbar {
  display: none;
}


/* Carousel buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  font-size: 18px;
  line-height: 1;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.04);
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.carousel-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .22), 0 0 0 5px rgba(230, 57, 70, .25);
}

.carousel-btn.prev {
  left: -6px;
}

.carousel-btn.next {
  right: -6px;
}

/* Keep buttons inside on small screens */
@media (max-width: 600px) {
  .carousel-btn.prev {
    left: 4px;
  }

  .carousel-btn.next {
    right: 4px;
  }
}

/* Soft cards (quotes + info) */
.soft-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);

  display: flex;
  flex-direction: column;
  justify-content: center;
  /* vertical centering */
  align-items: center;
  /* optional, centers text horizontally */
  text-align: center;
  /* optional, for alignment */
  height: 100%;
  /* or a fixed height if needed */
}


.band--dark .soft-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
  color: var(--gray-100, #fafafa);
}

.soft-card .quote {
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: .2px;
}

.soft-card .meta {
  margin: 0;
  opacity: .75;
  font-size: .95rem;
}


/* Keep buttons inside on small screens */
@media (max-width: 600px) {
  .carousel-btn.prev {
    left: 4px;
  }

  .carousel-btn.next {
    right: 4px;
  }
}


/* Developer block */
.dev {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.dev img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  border: 3px solid rgba(255, 255, 255, .65);
}

@media (max-width: 520px) {
  .dev {
    grid-template-columns: 1fr;
  }

  .dev img {
    width: 96px;
    height: 96px;
  }
}

/* Section heading rhythm */
.section h3+.lead {
  margin-top: 6px;
}

/* Button focus (accessibility, brand colors) */
.btn {
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .22), 0 0 0 5px rgba(230, 57, 70, .25);
}

.btn--primary:hover {
  filter: none;
  background: var(--brand-red-dark, #b92d38);
}

.btn--ghost:hover {
  background: #f4f6f8;
  border-color: var(--gray-400, #ccc);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 6px;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--brand-blue, #1e3a5f), rgba(30, 58, 95, .15));
  border-radius: 2px;
}

.timeline-year {
  margin: 1.5rem 0 .25rem;
  font-weight: 700;
  opacity: .7;
  border-bottom: 2px solid gray;
  width: 50%;
}


.tl-item {
  position: relative;
  padding: 12px 0 12px 12px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 15px;
  width: 10px;
  height: 10px;
  background: var(--brand-red, #e63946);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, .18);
}

.tl-item time {
  display: inline-block;
  font-size: .9rem;
  opacity: .7;
  margin-bottom: 2px;
}

.tl-item strong {
  display: block;
  margin: 0 0 2px;
}

.tl-item span {
  display: block;
  color: #555;
}

.band--dark .tl-item span {
  color: rgba(255, 255, 255, .8);
}

/* sliding container */
.timeline .tl-inner {
  overflow: hidden;
  transition: max-height .6s ease;
  will-change: max-height;
  padding-left: 9px;
}

/* Soft fade when collapsed (matches band backgrounds) */
.timeline.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

.band--alt .timeline.is-collapsed::after {
  background: linear-gradient(to bottom, rgba(250, 250, 250, 0), var(--gray-100, #fafafa));
}

.band--dark .timeline.is-collapsed::after {
  background: linear-gradient(to bottom, rgba(30, 58, 95, 0), var(--nav-bg, #1e3a5f));
}

/* Toggle button below the timeline */
.tl-toggle {
  position: relative;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--gray-300, #cacaca);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  z-index: 10;
}

.tl-toggle:hover {
  background: #f9f9f9;
}

.tl-toggle:active {
  transform: translateY(1px);
}

.tl-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .22), 0 0 0 5px rgba(230, 57, 70, .25);
}

/* Little arrow that flips */
.tl-toggle::after {
  content: "▾";
  font-size: 12px;
  opacity: .7;
  transition: transform .2s ease;
}

.tl-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}




/* Video placeholder polish */
#demo .wrap>div>div {
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}

/* Subtle band separation */
.band+.band,
.band+.band--alt,
.band--alt+.band,
.band--alt+.band--alt,
.band--dark+.band,
.band--dark+.band--alt {
  border-top: 1px solid rgba(0, 0, 0, .04);
}



.hero--image {
  width: 100%;
  aspect-ratio: 956 / 357;
  min-height: 250px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0;
  transition: border-radius .35s ease, box-shadow .35s ease;

  /* Desktop/base image */
  background: url("../images/bannerMain.webp") center/cover no-repeat;
}

/* Make sure content is on top of everything */
.hero--image>* {
  position: relative;
  z-index: 3;
}


/* Mobile image layer – fades in/out */
.hero--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/bannerMain2.webp") center/cover no-repeat;
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 1;
}

/* Single gradient overlay – constant, no fading */
.hero--image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  pointer-events: none;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0));
  z-index: 2;
}

/* Under 600px, fade the mobile image in */
@media (max-width: 600px) {
  .hero--image::before {
    opacity: 1;
  }
}



.hero__content {
  position: relative;
  z-index: 4;
  /* height: 100%;  <-- remove this line */
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 32px);

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: .35rem;
  /* tighter stack without forcing height */
  color: #fff;
}

.hero__content h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 800;
  text-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  padding-left: 0;
}

.hero__content p {
  margin: 0 0 4px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  text-shadow: 0 3px 8px rgba(0, 0, 0, .45);
}

@media (min-width: 1600px) {
  .hero--image {
    max-height: 680px;
    max-width: 1900px;
    margin: 0 auto;
    background-position: center;

    border-radius: 22px;
    /* <-- rounded corners here */
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    /* optional polish */
  }
}

/* respect users who reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hero--image {
    transition: none;
  }

  .btn,
  .soft-card {
    transition: none;
  }

  .h-scroll {
    scroll-behavior: auto;
  }

  .carousel-btn {
    transition: none;
  }

  .tl-toggle {
    transition: none;
  }

  .timeline .tl-inner {
    transition: none !important;
    max-height: none !important;
  }

  .timeline.is-collapsed::after {
    display: none !important;
  }
}

/* Optional: center text on small screens */
@media (max-width: 768px) {
  .hero__content {
    align-items: center;
    text-align: center;
  }
}



/* =======================================================================
   Buttons / Interactive
======================================================================= */

#calculateButton {
  display: block;
  width: 50%;
  max-width: 480px;
  padding: 12px 16px;
  background-color: var(--brand-red);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  border: 1px solid var(--brand-red-dark);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: width 0.3s ease, max-width 0.3s ease;
  height: 3rem;
}

#calculateButton:hover {
  background-color: #cc0000;
  border-color: #a30000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

#calculateButton:active {
  background-color: var(--gray-500);
  color: #fff;
  border-color: #6c757d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15) inset;
}


.copyButton {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  color: #555;
  border-radius: 6px;
  vertical-align: middle;
  position: relative;
  /* so tooltip positions correctly */
}

/* Hover styles */
.copyButton:hover:not(:disabled) {
  color: var(--brand-red);
  background-color: rgba(0, 0, 0, .05);
}

.copyButton:active:not(:disabled) {
  color: #fff;
  background-color: var(--brand-red);
}

/* Disabled state */
.copyButton:disabled {
  opacity: .4;
  cursor: default;
}

/* Tooltip base */
.copyButton:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 105%;
  /* show above */
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
}

/* Override tooltip when disabled */
.copyButton:disabled:hover::after {
  content: attr(data-disabled-title);
  background: #666;
}


.copy-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Password reset button styling for Settings page */
#passwordResetBtn {
  padding: 10px 12px;
  border: 1px solid var(--neutral, #ccc);
  background: #fafafa;
  border-radius: 6px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  transition: all 0.2s ease;
}

#passwordResetBtn:hover:not(:disabled) {
  background: #f0f0f0;
}

#passwordResetBtn:disabled {
  background: #e0e0e0;
  border-color: #ccc;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}



/* actual glowing border effect */
.resultsBox:has(.copyButton:not(:disabled):hover) {
  border-color: var(--brand-red);
  transition: border-color 0.2s ease;
}

/* Full row centering helper */
.full-row {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
}

/* =======================================================================
   Toggles / Switch
======================================================================= */



.switch-stack {
  max-width: 320px;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background-color: var(--gray-100);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  transition:
    max-height 0.3s ease;
}


/* Rows inside the stack */
.switch-row {
  display: flex;
  align-items: center;
  padding: 10px;
}


.switch-stack.rounded-bottom {
  border-radius: 10px;
}

.settingsSwitch.switch-stack {
  max-width: 200px;
  margin: 0 auto;
}

.settingsSwitch.switch-stack .event-label {
  width: 50px;
}

/* Smooth view toggle between Calculator Input and Slider */
.view-panel {
  overflow: hidden;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    max-height 0.28s ease,
    padding-top 0.28s ease,
    padding-bottom 0.28s ease,
    margin-top 0.28s ease,
    margin-bottom 0.28s ease;
}

.view-panel.is-hidden {
  opacity: 0;
  transform: translateY(4px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
}


.event-label {
  margin: 0 10px;
  font-size: 14px;
  color: #666;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  min-width: 60px;
  flex-shrink: 0;
}


.switch input {
  display: none;
}

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

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  top: 2px;
  background-color: #fff;
  border-radius: 50%;
  transition: .4s;
}

input:checked+.slider {
  background-color: var(--gray-500);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

/* =======================================================================
   Tooltips / Notes / Results
======================================================================= */

.help-note {
  font-size: 12px;
  color: #555;
  opacity: .9;
  margin: 6px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-note .info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-weight: 700;
  font-size: 12px;
  border-radius: 50%;
  background: var(--gray-500);
  color: #fff;
}

.has-inline-tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.has-inline-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  min-width: 180px;
  max-width: 320px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
  white-space: pre-wrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease-in-out;
  z-index: 20;
}

.has-inline-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 122%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  transition: opacity .15s ease-in-out;
  z-index: 21;
}

.has-inline-tooltip:hover::after,
.has-inline-tooltip:hover::before,
.has-inline-tooltip:focus-visible::after,
.has-inline-tooltip:focus-visible::before {
  opacity: 1;
}

.result-value {
  color: #e90400;
  font-weight: bold;
}

.result-value--neutral {
  color: #333;
  font-weight: 600;
}

/* Decorative */
.metallic {
  background: linear-gradient(45deg, #ffeb99 5%, #fff5cc 10%, #e6c200 30%, #d4af37 50%, #e6c200 70%, #fff5cc 80%, #b8860b 95%);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, .5);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
}

/* ===== Summary Modal (fixed popup) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: min(560px, 92vw);
  background: var(--gray-100, #fafafa);
  border: 1px solid var(--gray-300, #cacaca);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-300, #cacaca);
  background: #fff;
}

.modal-title {
  font-weight: 700;
}

.modal-close {
  border: 1px solid var(--gray-300, #cacaca);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.modal-close:hover {
  background: #f4f4f4;
}

.modal-body {
  padding: 14px 16px 16px;
}

.modal-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 520px) {
  .modal-grid2 {
    grid-template-columns: 1fr;
  }
}

.modal-cell,
.modal-row {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--gray-300, #cacaca);
  border-radius: 10px;
}

/* ---------- SmartBelt Toast ---------- */
.sb-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.sb-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.sb-toast.success {
  background: rgba(24, 133, 63, .95);
}

.sb-toast.error {
  background: rgba(199, 68, 73, .95);
}

.sb-toast.info {
  background: rgba(0, 0, 0, .85);
}

/* ---------- SmartBelt Label Toast (input modal) ---------- */
.sb-label-toast {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.sb-label-toast.show {
  opacity: 1;
  pointer-events: auto;
}

.sb-label-box {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  min-width: 280px;
  max-width: 92vw;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  box-sizing: border-box;
  overflow: hidden;
}

.sb-label-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.sb-label-box input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  display: block;
}

.sb-label-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sb-label-actions button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #f4f4f4;
  cursor: pointer;
  font-weight: 600;
}

.sb-label-actions button:hover {
  background: #eee;
}

/* Actions row inside the switch stack */
.switch-actions {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Make them share the row */
.switch-actions .btn {
  flex: 1;
  min-width: 0;
  padding: 10px 10px;
  /* slightly tighter so it fits */
}





/* =======================================================================
   Calculator: Loading / Positioning
======================================================================= */

#regularCalculator,
#christmasEventCalculator {
  position: relative;
}

#regularCalculatorLoading {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 250, .85);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: var(--text);
}

/* =======================================================================
   Clear all button
======================================================================= */
/* Clear All button (top-right of each panel) */
.clear-panel-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 6px;
  border: 1px solid var(--brand-red-dark);
  background: var(--brand-red);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  z-index: 11;
  /* above #regularCalculatorLoading (z-index:10) */
}

.clear-panel-btn:hover {
  background-color: #cc0000;
  border-color: #a30000;
}

.clear-panel-btn:active {
  background-color: var(--gray-500);
  border-color: #6c757d;
}

.clear-panel-btn:disabled {
  opacity: .5;
  cursor: default;
}

/* Tooltip for Clear All buttons */
.clear-panel-btn {
  position: absolute;
}

/* Tooltip when enabled */
.clear-panel-btn:hover:not(:disabled)::after {
  content: attr(data-title);
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  background: #666;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
}


/* Tooltip when disabled */
.clear-panel-btn:disabled:hover::after {
  content: attr(data-disabled-title);
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  background: #666;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
}

/* Keep hover visuals only when enabled */
.clear-panel-btn:hover:not(:disabled) {
  background-color: #cc0000;
  border-color: #a30000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

.clear-panel-btn:active:not(:disabled) {
  background-color: var(--gray-500);
  border-color: #6c757d;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15) inset;
}

/* Disabled: freeze visuals but allow tooltip */
.clear-panel-btn:disabled {
  cursor: default;
  opacity: .5;
}

.clear-panel-btn:disabled:hover,
.clear-panel-btn:disabled:active {
  background: var(--brand-red);
  border-color: var(--brand-red-dark);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transform: none;
}



/* =======================================================================
   Calculator Slider 
======================================================================= */
#calculatorSlider {
  max-width: 900px;
  width: 100%;
  margin: 10px auto;
  background-color: var(--gray-100);
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
}

#calculatorSlider>h2 {
  padding-top: 0;
  text-align: center;
}

.slider-right>h3,
.slider-left>h3 {
  margin-top: 5px;
  margin-bottom: 15px;
}

#calculatorSlider.option-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 1300px;
  padding: 12px;
  overflow: hidden;
}

/* Grid: left / middle / right + bottom slider row */
#calculatorSlider .slider-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

#calculatorSlider .slider-left,
#calculatorSlider .slider-middle,
#calculatorSlider .slider-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  margin: 10px;
  background-color: var(--gray-200);
  border: 1px solid var(--gray-300);
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
}

#calculatorSlider .slider-left {
  grid-column: 1;
}

#calculatorSlider .slider-middle {
  grid-column: 2;
}

#calculatorSlider .slider-right {
  grid-column: 3;
}

#calculatorSlider .slider-bottom {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* =========================
   LEFT COLUMN
   ========================= */

#calculatorSlider .slider-left .card-inputs {
  display: flex;
  flex-direction: column;
  /* stack Credit + Monthly Credit */
  align-items: flex-start;
  /* left edge alignment */
  gap: 10px;
}

/* Credit (label + input) */
#calculatorSlider .input-with-suffix {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  /* left align the row */
  gap: 10px;
  /* space between "Credit:" and input */
  text-align: left;
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
}

/* Monthly Credit (label + value) */
#calculatorSlider .monthly-credit {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  /* left align the row */
  gap: 10px;
  /* space between label and value */
  text-align: left;
  flex: 0 0 auto;
  margin-left: 0;
  min-width: 0;
  white-space: nowrap;
}

/* Ensure left labels don't inherit fixed widths or right-align */
#calculatorSlider .slider-left .field-label,
#calculatorSlider .slider-left .monthly-credit .metric-label {
  min-width: auto;
  text-align: left;
}

#sliderCredit {
  padding-right: 0;
  width: 82px;
}

/* =========================
   Metrics + labels (shared)
   ========================= */

#calculatorSlider .metric {
  min-width: 200px;
}

#calculatorSlider .metric-label {
  color: #555;
  font-weight: 600;
}

#calculatorSlider .metric-label-center {
  text-align: center;
}

#calculatorSlider .metric-label-inline {
  color: #555;
  font-weight: 600;
  min-width: 80px;
}

/* Inputs (middle column) */
#calculatorSlider .desired-input {
  box-sizing: border-box;
  width: 110px;
  padding: 5px;
  border: 1px solid var(--gray-400);
  border-radius: 4px;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
}

#calculatorSlider .metric-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#calculatorSlider .desired-input:focus {
  outline: none;
  border-color: var(--gray-500);
  box-shadow: 0 0 0 2px rgba(141, 153, 174, .2);
}

/* +/- controls */
#calculatorSlider #valueControls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#calculatorSlider #valueControls button {
  border: 1px solid var(--gray-400);
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  width: 42px;
  border-radius: 6px;
  background: #f4f4f4;
}

#calculatorSlider #valueControls button:hover {
  background: #e9e9e9;
}

/* =========================
   RIGHT COLUMN
   ========================= */

#calculatorSlider .metric-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

#calculatorSlider .metric-line,
#calculatorSlider .card-inputs {
  min-width: 0;
}

#calculatorSlider .metric-line .copyButton,
#calculatorSlider .metric-line .icon-slot {
  width: 42px;
  flex: 0 0 42px;
}

/* =========================
   Range styling (if used)
   ========================= */

#calculatorSlider input[type="range"] {
  width: 100%;
  height: 20px;
  box-shadow: 0 0 1px rgba(0, 0, 0, .6);
}

#calculatorSlider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #007BFF;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* Slider input stack (if used) */
#sliderInput {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#sliderInput button {
  border: 1px solid var(--gray-400);
  padding: 5px;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
  width: 40px;
}


/* =======================================================================
   Suffix Inputs
======================================================================= */

.input-with-suffix {
  position: relative;
  display: inline-block;
}

.input-with-suffix input {
  padding-right: 40px;
  width: 70px;
  font-size: 14px;
}

.input-suffix {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-80%);
  /* unchanged per your note */
  pointer-events: none;
  color: #555;
  font-size: .85rem;
}


/* Named widths */
#discountValueA,
#discountValueB,
#discountValueC,
#discountValueD,
#discountValueE,
#discountValueF {
  width: 60px;
}

#downPaymentB,
#downPaymentC,
#downPaymentD,
#downPaymentE,
#downPaymentF {
  width: 50px;
}





/* base element */
#slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--slider-bg, #e5e7eb);
  /* JS sets --slider-bg */
}

/* WebKit track */
#slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: var(--slider-bg, var(--slider-track));
}

/* Firefox track */
#slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--slider-bg, var(--slider-track));
}

/* (optional) thumb so it doesn’t hide track */
#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #9ca3af;
  margin-top: -5px;
  /* centers on 8px track */
}

#slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #9ca3af;
}



.slider-hint {
  margin: 0 0 12px 0;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.3;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;

  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 12px;
  transition:
    max-height 0.25s ease,
    opacity 0.2s ease,
    padding 0.25s ease;
}

.slider-hint.show {
  max-height: 100px;
  /* safely bigger than text */
  opacity: 1;
  padding: 8px 12px;
}



.content-section {
  display: none;
}

/* ensure the shown tab actually renders */
.content-section.active {
  display: block;
}

/* if you use element.hidden in JS, guarantee it's hidden regardless of classes */
[hidden] {
  display: none !important;
}


.content-section.active {
  display: block;
}

input[type="date"] {
  padding: 5px;
  width: 110px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

input.settingsInput {
  width: 75px;
}


p {
  margin: 10px 0;
}

#timeLeft,
#extendedTimeUsed,
#oldEndDate,
#newEndDate {
  font-weight: bold;
}


/* Style the dynamically generated input containers */
.option-container {
  padding: 1px 0;
  margin-bottom: 1px;
}

.inline-field {
  display: inline-flex;
  align-items: center;
}

.discount-input {
  width: 100px;
  text-align: left;
  margin-right: 4px;
}

/* Growable width with smooth resize */
.input-with-suffix>.downpayment-input {
  width: 6ch;
  /* initial size, overridden inline */
  min-width: 50px;
  max-width: 220px;
  padding-right: 10px;
  transition: width .1s ease, background-color .2s ease;
  /* gives breathing room inside field */
  box-sizing: content-box;
  /* ensures JS width math matches visible size */
}


.buttonContainer {
  display: flex;
  /* Arrange button and message side by side */
  justify-content: center;
  /* Center the entire container horizontally */
  align-items: center;
  /* Align button and message vertically */
  margin: 20px 0;
  /* Add spacing above and below */
}

/* disabled state */
#copyBtn:disabled {
  background: #a3a3a3;
  opacity: 0.4;
  /* subtle fade */
  cursor: default;
}

#copyBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  /* larger clickable area */
  color: #555;
  border-radius: 6px;
  /* optional: subtle rounded hitbox */
}

#copyBtn:hover:not(:disabled) {
  color: var(--brand-red);
  background-color: rgba(0, 0, 0, 0.05);
}

#copyBtn:active:not(:disabled) {
  color: #fff;
  background-color: var(--brand-red);
  /* solid red while pressed */
}

.logoutButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  background-color: transparent;
  color: var(--brand-red);
  border: 2px solid var(--brand-red);
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  padding: 10px 30px;
  transition: all 0.2s ease;
  margin: 0 auto;
}



.logoutButton:hover {
  background-color: var(--brand-red);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.logoutButton:active {
  background-color: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset;
}


#section3 .svg-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-left: 0.4em;
  vertical-align: -0.2em;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}



.saveButton {
  display: block;
  max-width: 300px;
  margin: 0 auto;
  background-color: var(--brand-red);
  color: #fff;
  border: 1px solid var(--brand-red-dark);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 10px 30px;
  font-weight: bold;
}

.saveButton:hover {
  background-color: #cc0000;
  /* deeper red */
  border-color: #a30000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.saveButton:active {
  background-color: #8d99ae;
  /* muted gray-blue for pressed state */
  color: #fff;
  /* keep text white for contrast */
  border-color: #6c757d;
  /* darker gray border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset;
  /* "pressed in" look */
}


#savedMessage {
  font-size: 25px;
  color: green;
  opacity: 0;
  /* Initially hidden */
  transition: opacity 0.5s ease-in-out;

  /* Position it at the bottom right of the screen */
  position: fixed;
  bottom: 10px;
  right: 10px;

  /* Ensure it's on top of everything */
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 5px 5px 5px grey;
  padding: 5px 10px;
  border-radius: 5px;
}

.settingsLabel {
  margin: 0;
  display: inline;
}

.option-separator {
  border: none;
  /* Remove all default borders */
  border-top: 2px dotted #000;
  /* Black dashed line */
  color: transparent;
  /* Ensure no color bleed from text or other styles */
  background-color: transparent;
  /* Remove background color to prevent shading */
  height: 0;
  /* Collapse any vertical space */
  margin: 10px 0;
  /* Adjust spacing */
}


.option-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px;
}

.omit-container {
  display: flex;
  align-items: center;
  flex: 0 0 40px;
  /* Fixed width for checkbox + label */
}

.omit-container input {
  margin-right: 5px;
}

.input-container {
  flex: 1;
  /* Take remaining space */
  display: flex;
  flex-direction: column;
}

.box-info {
  text-align: center;
  font-style: italic;
  padding: 0 10px;
}

#section2 input[type="number"] {
  width: 60px;
}

#section1 input[type="number"] {
  width: 50px;
}

.percent-input {
  width: 60px;
  text-align: left;
  position: relative;
}

/* Wrap input inside a container for % sign */
.percent-container {
  position: relative;
  display: inline-block;
}

.percent-container::after {
  content: "%";
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  /* Adjust color if needed */
  pointer-events: none;
}

/* Don't dim the whole card */
.option-container.disabled-option {
  opacity: 1;
  /* was 0.5 */
}

/* Dim ONLY the inputs area when disabled */
.option-container.disabled-option .input-container {
  opacity: 0.5;
  pointer-events: none;
  /* optional: make the inputs inert */
}

/* Keep the omit checkbox fully visible & usable */
.option-container.disabled-option .omit-container {
  opacity: 1;
  pointer-events: auto;
}

.option-disabled-note {
  background: #f8f8f8;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9rem;
  color: #666;
  margin: 6px 0;
  text-align: center;
}


.headliner h3 {
  margin: 0;
}

h3 {
  margin-top: 40px;
  margin-bottom: 10px;
}

#section2 h3 {
  margin-top: 10px;
}

.resultsBox {
  position: relative;
  /* makes it the positioning parent */
  width: 50%;
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  margin-top: 0px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-error {
  border: 2px solid #C74449;
  background: #fff5f5;
}

.error-msg {
  color: #C74449;
  font-size: 12px;
  margin-top: 4px;
}


/* =======================================================================
   Responsive
======================================================================= */

@media (max-width: 900px) {
  #calculatorSlider .slider-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #calculatorSlider .card-inputs {
    flex-wrap: wrap;
    /* allow stacking on small screens */
  }

  #calculatorSlider .slider-right,
  #calculatorSlider .slider-middle,
  #calculatorSlider .slider-left {
    grid-column: 1;
  }

  /* Make each row a single line: Label : Control */
  #calculatorSlider .input-with-suffix,
  #calculatorSlider .monthly-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 0;
  }


  #calculatorSlider .slider-middle {
    align-items: stretch;
  }

  #calculatorSlider .metric {
    min-width: 0;
  }

}

@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  .container {
    flex-direction: column;
    align-items: stretch;
  }

  #calculatorSlider.option-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    /* safety net for any tiny overflow */
  }

  /* clear all button avoid overlap on small screens if H2 is close */
  #regularCalculator h2,
  #christmasEventCalculator h2 {
    padding-right: 90px;
    /* room for the button */
  }


  #leftColumn,
  #regularCalculator,
  #christmasEventCalculator {
    width: 100%;
    margin: 10px 0;
  }

  #calculateButton {
    width: 100%;
    max-width: none;
    transition: width 0.3s ease, max-width 0.3s ease;
  }

  .timeline-year {
    width: 90%;
  }

}