.emi-form {
  margin-top: 0;
  scroll-margin-top: 120px;
}

.calc-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  /* gap: 24px; */
  align-items: start;
}

/* .calc-page {
  max-width: none;
  margin: 40px 30px 60px;
  width: auto;
} */

.calc-card {
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(11, 19, 38, 0.08);
  box-shadow: 0 14px 30px rgba(11, 19, 38, 0.08);
}

.calc-notes-link {
  color: #8e1447;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calc-notes-link:hover {
  color: #6f0f38;
}




.calc-title-row h2 {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.back-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  position: relative;
  top: 10px;
}

/* .calc-page {
  margin: 40px auto 60px;
} */
.emi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 28px;
  align-items: start;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #0b1326;
}

.slider-field {
  align-items: center;
}

.field.action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: center;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1d4ed8;
  border: 3px solid #1d4ed8;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

.range-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1d4ed8;
  border: 3px solid #1d4ed8;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

.value-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 2px solid #1d4ed8;
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 12px 22px rgba(29, 78, 216, 0.15);
}

.value-box input {
  width: 100%;
  max-width: 80px;
  border: none;
  outline: none;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: #1d4ed8;
  background: transparent;

}

.value-prefix,
.value-suffix {
  font-weight: 700;
  color: #1d4ed8;
}

.loan-field .value-box {
  min-width: 160px;
  padding: 10px 14px;
}

.loan-field .value-box input {
  max-width: 120px;
  font-size: 1.05rem;
}

.compact-field .value-box {
  min-width: 110px;
  padding: 6px 10px;
}

.compact-field .value-box input {
  max-width: 70px;
  font-size: 0.98rem;
}

.input-group {
  display: flex;
  align-items: center;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  height: 48px;
  background: #ffffff;
  overflow: hidden;
}

.input-group input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 14px;
  font-size: 1rem;
}

.input-group .prefix {
  width: 42px;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #0b1326;
  border-right: 1px solid #cfd6e4;
  background: #f7f9ff;
}

.error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #d1204d;
}

.reset-btn {
  width: 40%;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(216, 27, 96, 0.45);
  background: #d81b60;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 10px 20px rgba(216, 27, 96, 0.12);
  position: relative;
  left: 75%;
}

.reset-btn:hover {
  transform: translateY(-1px);
  background: #d81b60;
  box-shadow: 0 14px 28px rgba(216, 27, 96, 0.2);
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 260px));
  gap: 20px;
  justify-content: start;
  justify-items: start;
}

.results-card {
  margin-top: 12px;
  grid-column: 1 / -1;
  width: 100%;
}

.schedule-section {
  margin-top: 32px;
}

.schedule-section h2 {
  font-size: 1.15rem;
  /* margin-bottom: 14px; */
  margin-top: 20px;
  color: #0b1326;
}

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(11, 19, 38, 0.08);
  box-shadow: 0 12px 24px rgba(11, 19, 38, 0.08);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.schedule-table thead th {
  background: #8e1447;
  color: #ffffff;
  text-align: center;
  padding: 14px 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.schedule-table tbody td {
  text-align: center;
  padding: 12px 10px;
  border-top: 1px solid rgba(11, 19, 38, 0.08);
  color: #1d2946;
  font-size: 0.95rem;
}

.schedule-table tbody tr:nth-child(even) td {
  background: #fafbff;
}

.schedule-table tbody tr.total-row td {
  font-weight: 700;
  background: #f2f4ff;
}

.table-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.95rem;
  color: #1d2946;
}


.yearly-chart-card {
  margin-top: 24px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(11, 19, 38, 0.08);
  box-shadow: 0 12px 24px rgba(11, 19, 38, 0.08);
  padding: 18px 18px 14px;
}

.yearly-chart-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #0b1326;
}

.yearly-chart-canvas {
  position: relative;
  width: 100%;
  height: 320px;
}


@media (min-width: 901px) and (max-width: 1200px) {
  .emi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suggested-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .calc-notes,
  .calc-faq {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .emi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
  }

  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }

  .suggested-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .calc-notes,
  .calc-faq {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 22px;
    padding-right: 22px;
  }
}

@media (max-width: 768px) {
  .calc-title-row {
    gap: 10px;
    margin-bottom: 4px;
  }

  .back-link {
    width: 24px;
    height: 24px;
  }

  .calc-page {
    margin: 110px 16px 48px;
  }

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

  .slider-row {
    grid-template-columns: 1fr;
  }

  .value-box {
    justify-content: center;
    width: 100%;
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

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

  .yearly-chart-canvas {
    height: 260px;
  }

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

  .suggested-grid {
    grid-template-columns: 1fr;
  }
  .chart-center{
    top: 40%;
  }
  
  
  
  
  
  
  

  .calc-notes,
  .calc-faq {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 18px;
    padding-right: 18px;
  }

}


.faq-list {
  display: block;
}

.faq-item {
  border-bottom: 1px solid rgba(11, 19, 38, 0.08);
}

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

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  font-size: 1.1rem;
  color: #0b1326;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #0b1326;
  border-bottom: 2px solid #0b1326;
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(-135deg);
}

.faq-body {
  padding: 0 0 14px 0;
}

.faq-body p {
  font-size: 1.02rem;
  color: #1f2a4a;
  line-height: 1.9;
  /* max-width: 72ch; */
  margin: 0;
  letter-spacing: 0.01em;
}








.slider-row.single {
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 48px;
}

.select-box {
  width: 100%;
  justify-content: space-between;
  padding: 8px 12px;
  min-height: 48px;
}

.select-box select {
  width: 100%;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.98rem;
  color: #1d4ed8;
  outline: none;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}