/* ==========================================
   NRR CALCULATOR PAGE STYLES (nrr- prefix)
   ========================================== */

/* ===== HERO ===== */
.nrr-hero {
  text-align: center;
  padding: 72px 0 32px;
  background: var(--bg-cream);
}
.nrr-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-text);
  margin-bottom: 24px;
  letter-spacing: 0.2px;
}
.nrr-hero__title {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 16px;
}
.nrr-hero__sub {
  font-size: 19px;
  color: var(--gray-text);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===== CALCULATOR ===== */
.nrr-calc-section {
  padding: 24px 0 64px;
  background: var(--bg-cream);
}
.nrr-calc {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
}
@media (max-width: 800px) {
  .nrr-calc { grid-template-columns: 1fr; }
}

/* ----- Inputs side ----- */
.nrr-calc__inputs {
  padding: 36px 36px 28px;
  border-right: 1px solid var(--border);
}
@media (max-width: 800px) {
  .nrr-calc__inputs { border-right: none; border-bottom: 1px solid var(--border); }
}

.nrr-calc__period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.nrr-calc__period-label {
  font-size: 13px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.nrr-calc__period-value {
  font-size: 13px;
  background: var(--bg-light-blue);
  color: #1e40af;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 500;
}

.nrr-field {
  margin-bottom: 18px;
}
.nrr-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}
.nrr-field__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  color: var(--gray-text);
  font-size: 11px;
  font-weight: 600;
  cursor: help;
  position: relative;
}
.nrr-field__help:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  width: 240px;
  text-align: left;
  z-index: 10;
  line-height: 1.4;
  pointer-events: none;
}
.nrr-field__help:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--dark);
  z-index: 10;
}
.nrr-field__input {
  position: relative;
  display: flex;
  align-items: center;
}
.nrr-field__currency {
  position: absolute;
  left: 14px;
  color: var(--gray-text);
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
}
.nrr-field input {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  padding: 12px 14px 12px 28px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  color: var(--dark);
  background: white;
}
.nrr-field input:focus {
  border-color: var(--orange);
}
.nrr-field input::placeholder {
  color: var(--light-gray);
  font-weight: 400;
}
.nrr-field--error input {
  border-color: #dc2626;
}

.nrr-calc__methodology {
  font-size: 13px;
  color: var(--gray-text);
  margin-top: 8px;
}
.nrr-calc__methodology a {
  color: var(--orange);
  font-weight: 500;
}
.nrr-calc__methodology a:hover {
  text-decoration: underline;
}

/* ----- Outputs side ----- */
.nrr-calc__outputs {
  padding: 36px;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nrr-result {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.nrr-result__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 8px;
}
.nrr-result__value {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--dark);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.nrr-result__hint {
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.4;
}
.nrr-result--secondary .nrr-result__value {
  font-size: 36px;
}

/* Result state colors */
.nrr-result--top .nrr-result__value { color: #15803d; }
.nrr-result--good .nrr-result__value { color: #166534; }
.nrr-result--ok .nrr-result__value { color: var(--dark); }
.nrr-result--low .nrr-result__value { color: #b45309; }
.nrr-result--bad .nrr-result__value { color: #b91c1c; }

/* Expansion gap (Nikita's add) */
.nrr-gap {
  background: linear-gradient(135deg, #FFF8F0 0%, #fff 100%);
  border: 1px solid #FED7AA;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 4px;
}
.nrr-gap__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 8px;
}
.nrr-gap__copy {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 6px;
}
.nrr-gap__copy strong {
  font-weight: 700;
  color: var(--dark);
}
.nrr-gap__sub {
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.4;
}

/* CTA */
.nrr-cta {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.nrr-cta__lede {
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 14px;
  line-height: 1.4;
}
.nrr-cta__lede em {
  font-style: italic;
  font-weight: 600;
  color: var(--orange);
}
.nrr-cta__btn {
  width: 100%;
}
.nrr-cta__fineprint {
  font-size: 12px;
  color: var(--light-gray);
  margin-top: 10px;
  line-height: 1.4;
}

/* ===== TRUST BAR ===== */
.nrr-trust {
  padding: 48px 0;
  background: white;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.nrr-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
@media (max-width: 600px) {
  .nrr-trust__grid { grid-template-columns: repeat(2, 1fr); }
}
.nrr-trust__num {
  font-size: 36px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.nrr-trust__lab {
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.3;
}

/* ===== EDUCATIONAL ===== */
.nrr-edu {
  padding: 80px 0;
  background: var(--bg-cream);
}
.nrr-edu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 800px) {
  .nrr-edu__grid { grid-template-columns: 1fr; gap: 40px; }
}
.nrr-edu h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
  line-height: 1.2;
}
.nrr-edu p {
  font-size: 16px;
  color: var(--gray-text);
  line-height: 1.6;
  margin-bottom: 14px;
}
.nrr-edu__formula {
  background: white;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.nrr-edu__formula code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--dark);
}
.nrr-edu__list {
  margin: 0 0 16px;
}
.nrr-edu__list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
  color: var(--gray-text);
}
.nrr-edu__list li:last-child {
  border-bottom: none;
}
.nrr-edu__list strong {
  color: var(--dark);
  font-weight: 600;
  margin-right: 6px;
}
.nrr-edu__cite {
  font-size: 14px;
}
.nrr-edu__cite a {
  color: var(--orange);
  font-weight: 500;
}
.nrr-edu__cite a:hover {
  text-decoration: underline;
}

/* ===== MODAL ===== */
.nrr-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nrr-modal[aria-hidden="false"] {
  display: flex;
}
.nrr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  animation: nrrFadeIn 0.2s ease-out;
}
.nrr-modal__panel {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px;
  z-index: 1;
  animation: nrrSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 600px) {
  .nrr-modal__panel { padding: 28px 22px; }
}
.nrr-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--gray-text);
  cursor: pointer;
  transition: background 0.15s;
}
.nrr-modal__close:hover {
  background: var(--border-light);
  color: var(--dark);
}
.nrr-modal__title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.nrr-modal__sub {
  font-size: 15px;
  color: var(--gray-text);
  margin-bottom: 24px;
  line-height: 1.5;
}

@keyframes nrrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes nrrSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== FORM ===== */
.nrr-form__row {
  margin-bottom: 16px;
}
.nrr-form__row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}
.nrr-form__row input,
.nrr-form__row select {
  font-family: var(--font-main);
  font-size: 15px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  color: var(--dark);
  background: white;
  appearance: none;
}
.nrr-form__row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.nrr-form__row input:focus,
.nrr-form__row select:focus {
  border-color: var(--orange);
}
.nrr-form__row--error input,
.nrr-form__row--error select {
  border-color: #dc2626;
}
.nrr-form__err {
  display: block;
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  min-height: 0;
}
.nrr-form__err--global {
  margin: 12px 0;
  font-size: 13px;
  text-align: center;
}
.nrr-form__row--inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nrr-form__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-text);
  cursor: pointer;
  line-height: 1.4;
}
.nrr-form__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}
.nrr-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nrr-form__submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
}
.nrr-form__legal {
  font-size: 11px;
  color: var(--light-gray);
  line-height: 1.5;
  text-align: center;
  margin-top: 14px;
}
.nrr-form__legal a {
  color: var(--gray-text);
  text-decoration: underline;
}

/* ===== SUCCESS ===== */
.nrr-success__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 50%;
  margin: 0 auto 18px;
}
.nrr-success__lede {
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}
.nrr-success__badge {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-cream);
}
.nrr-success__badge img {
  display: block;
  width: 100%;
  height: auto;
}
.nrr-success__share {
  margin-bottom: 28px;
  text-align: center;
}
.nrr-success__sharelabel {
  font-size: 13px;
  color: var(--gray-text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.nrr-success__sharebtns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.nrr-success__sharebtn {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.nrr-success__sharebtn:hover {
  background: var(--bg-cream);
  border-color: var(--orange);
}
.nrr-success__crm {
  background: var(--bg-cream);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.nrr-success__crm h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.nrr-success__crm p {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 14px;
  line-height: 1.5;
}
