/* Scoped classes: calc-ny-* */
.calc-ny-container {
    font-family: 'Poppins',sans-serif;
    max-width: 70%;
    margin: 2rem auto;
    background: #fff;
    border: 4px solid transparent;
    border-image: linear-gradient(45deg,#FF6B6B,#FFD93D,#6BCB77,#4D96FF) 1;
    border-radius: 1.5rem;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.calc-header { display:flex;justify-content:space-between;align-items:center; }

.calc-header h1 {
    font-weight: 700;
    color: #333;
    margin: 20px auto;
}
#mode-toggle { background:none;border:none;font-size:1.2rem;cursor:pointer; }


.info-carousel {
    position: relative;
    overflow: hidden;
    height: 2.5rem;
    margin: 40px 0;
}
.info-carousel .slide { position:absolute;width:100%;padding:0.5rem; background:linear-gradient(145deg,#4D96FF,#6BCB77); color:#fff; text-align:center; opacity:0; transition:opacity 0.5s; }
.info-carousel .slide.active { opacity:1; }
.info-carousel .prev,.info-carousel .next { position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,0.3);border:none;color:#fff;padding:0.3rem;cursor:pointer;border-radius:50%; }
.info-carousel .prev { left:0.5rem; }
.info-carousel .next { right:0.5rem; }

.form-ny { display:grid; gap:1rem; }
.field { position:relative; }
.field label { display:block;font-weight:500;margin-bottom:0.3rem;color:#333; }
.field input, .field select { width:100%; padding:0.6rem 1rem; border-radius:2rem; border:2px solid #eee;
  box-shadow: inset 4px 4px 8px rgba(0,0,0,0.05), inset -4px -4px 8px rgba(255,255,255,0.8);
  outline:none; }
.field .tooltip { position:absolute; top:0; right:0; background:#333; color:#fff; padding:0.2rem 0.4rem; border-radius:0.5rem; font-size:0.75rem; opacity:0;
  transition:opacity 0.2s; }
.field:hover .tooltip { opacity:1; }

.slider-field input[type=range] { -webkit-appearance:none; width:100%; height:8px; background:linear-gradient(45deg,#FF6B6B,#FFD93D,#6BCB77,#4D96FF); border-radius:4px; outline:none; }
.slider-field input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; background:#333; border-radius:50%; cursor:pointer; }


.actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin: 40px 0;
}
.actions button { flex:1;padding:0.6rem;font-weight:600;color:#fff;border:none;border-radius:2rem;
  background:linear-gradient(145deg,#4D96FF,#6BCB77);cursor:pointer;transition:transform 0.2s; }
.actions button:hover { transform:translateY(-2px); }

.results-ny { margin-top:2rem; }
.results-ny h2 { display:flex;align-items:center;gap:0.5rem;color:#333; }
.results-ny .grid { display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem; }

#amort-chart { width:100%; height:200px; }

/* ≤ 992px */
@media (max-width: 992px) {
  .calc-ny-container {
    max-width: 90%;
    padding: 25px;
  }
  .calc-header h1 {
    font-size: 1.8rem;
  }
  .info-carousel {
    height: 2rem;
    margin: 32px 0;
  }
  .info-carousel .slide {
    padding: 0.4rem;
    font-size: 0.9rem;
  }
  .info-carousel .prev,
  .info-carousel .next {
    padding: 0.4rem;
    font-size: 1rem;
  }
  .form-ny {
    gap: 0.8rem;
  }
  .field label {
    font-size: 0.9rem;
  }
  .field input,
  .field select {
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
  }
  .slider-field input[type=range] {
    height: 6px;
  }
  .slider-field input[type=range]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
  }
  .actions {
    gap: 0.7rem;
  }
  .actions button {
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    margin: 32px 0;
  }
  .results-ny h2 {
    font-size: 1.3rem;
  }
  .results-ny .grid {
    gap: 0.8rem;
  }
  #amort-chart {
    height: 180px;
  }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .calc-ny-container {
    max-width: 95%;
    padding: 20px;
  }
  .calc-header h1 {
    font-size: 1.6rem;
  }
  .info-carousel {
    height: 1.8rem;
    margin: 28px 0;
  }
  .info-carousel .slide {
    padding: 0.35rem;
    font-size: 0.85rem;
  }
  .info-carousel .prev,
  .info-carousel .next {
    padding: 0.35rem;
    font-size: 0.9rem;
  }
  .form-ny {
    gap: 0.6rem;
  }
  .field label {
    font-size: 0.85rem;
  }
  .field input,
  .field select {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  .slider-field input[type=range] {
    height: 6px;
  }
  .slider-field input[type=range]::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
  }
  .actions {
    gap: 0.6rem;
    flex-wrap: wrap;
  }
  .actions button {
    padding: 0.5rem;
    font-size: 0.9rem;
    margin: 4px 0;
  }
  .results-ny h2 {
    font-size: 1.2rem;
  }
  .results-ny .grid {
    gap: 0.6rem;
    grid-template-columns: 1fr;
  }
  #amort-chart {
    height: 160px;
  }
}

/* ≤ 600px */
@media (max-width: 600px) {
  .calc-ny-container {
    max-width: 100%;
    margin: 1rem auto;
    padding: 15px;
  }
  .calc-header h1 {
    font-size: 1.4rem;
  }
  .info-carousel {
    height: 1.6rem;
    margin: 24px 0;
  }
  .info-carousel .slide {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
  .info-carousel .prev,
  .info-carousel .next {
    padding: 0.3rem;
    font-size: 0.85rem;
  }
  .form-ny {
    gap: 0.5rem;
  }
  .field label {
    font-size: 0.8rem;
  }
  .field input,
  .field select {
    padding: 0.4rem;
    font-size: 0.85rem;
  }
  .slider-field input[type=range] {
    height: 5px;
  }
  .slider-field input[type=range]::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
  }
  .actions {
    flex-direction: column;
    gap: 0.5rem;
  }
.actions button {
    padding: 0.4rem;
    font-size: 0.85rem;
    margin: 4px 0;
}
  .results-ny h2 {
    font-size: 1.1rem;
  }
  .results-ny .grid {
    gap: 0.5rem;
  }
  #amort-chart {
    height: 140px;
  }
}

/* ≤ 400px */
@media (max-width: 400px) {
  .calc-ny-container {
    margin: 1rem;
    padding: 12px;
  }
  .calc-header h1 {
    font-size: 1.2rem;
  }
  .info-carousel {
    height: 1.4rem;
    margin: 20px 0;
  }
  .info-carousel .slide {
    padding: 0.25rem;
    font-size: 0.75rem;
  }
  .info-carousel .prev,
  .info-carousel .next {
    padding: 0.25rem;
    font-size: 0.8rem;
  }
  .form-ny {
    gap: 0.4rem;
  }
  .field label {
    font-size: 0.75rem;
  }
  .field input,
  .field select {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
  .slider-field input[type=range] {
    height: 4px;
  }
  .slider-field input[type=range]::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
  }
  .actions {
    gap: 0.4rem;
  }
  .actions button {
    padding: 0.3rem;
    font-size: 0.8rem;
    margin: 20px 0;
  }
  .results-ny h2 {
    font-size: 1rem;
  }
  .results-ny .grid {
    gap: 0.4rem;
  }
  #amort-chart {
    height: 120px;
  }
}