/* ─── /tools pages ──────────────────────────────────────────────────────────── */

.tools-page {
  min-height: 100vh;
  background: #f8f7f4;
  font-family: 'DM Sans', sans-serif;
  color: #0f1629;
}

/* ─── Hero band ──────────────────────────────────────────────────────────────── */
.tools-hero {
  background: #0f1629;
  color: #fff;
  padding: 64px 24px 56px;
  text-align: center;
}
.tools-hero .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 16px;
  display: block;
}
.tools-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  color: #fff;
}
.tools-hero p {
  font-size: 17px;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.tools-hero-cta {
  display: inline-block;
  background: #f59e0b;
  color: #0f1629;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.tools-hero-cta:hover { background: #fbbf24; }

/* ─── Index card grid ───────────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}
.tool-card {
  background: #fff;
  border: 1px solid #e8e5df;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.2s, transform 0.15s;
}
.tool-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.tool-card-icon {
  width: 48px;
  height: 48px;
  background: #fef3c7;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}
.tool-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #0f1629;
}
.tool-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}
.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f59e0b;
  text-decoration: none;
}
.tool-card-link:hover { color: #d97706; }
.tool-card-link svg { transition: transform 0.15s; }
.tool-card:hover .tool-card-link svg { transform: translateX(3px); }

/* ─── Calculator page ────────────────────────────────────────────────────────── */
.calc-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.calc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 32px;
}
.calc-back:hover { color: #0f1629; }

.calc-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e8e5df;
}
.calc-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  margin: 0 0 10px;
  color: #0f1629;
}
.calc-header p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 640px) {
  .calc-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Input panel ────────────────────────────────────────────────────────────── */
.calc-inputs {
  background: #fff;
  border: 1px solid #e8e5df;
  border-radius: 12px;
  padding: 28px;
}
.calc-inputs h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 20px;
}

.calc-field {
  margin-bottom: 22px;
}
.calc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}
.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  background: #fafaf9;
  color: #0f1629;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.calc-field input:focus,
.calc-field select:focus {
  border-color: #f59e0b;
  background: #fff;
}
.calc-field .hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 5px;
}

/* Range slider */
.calc-slider-wrap {
  margin-top: 4px;
}
.calc-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #f59e0b 0%, #f59e0b var(--pct, 50%), #e5e7eb var(--pct, 50%), #e5e7eb 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  accent-color: #f59e0b;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #f59e0b;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.calc-slider-value {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}
.calc-slider-label {
  font-size: 18px;
  font-weight: 700;
  color: #0f1629;
  margin-top: 8px;
  font-family: 'DM Serif Display', serif;
}

/* ─── Results panel ──────────────────────────────────────────────────────────── */
.calc-results {
  position: sticky;
  top: 24px;
}
.calc-results-card {
  background: #fff;
  border: 1.5px solid #e8e5df;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}
.calc-results-card h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 20px;
}

/* DSCR band / qual band */
.band-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.band-badge.green  { background: #d1fae5; color: #065f46; }
.band-badge.yellow { background: #fef3c7; color: #92400e; }
.band-badge.red    { background: #fee2e2; color: #991b1b; }

.result-big {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #0f1629;
  margin: 0 0 4px;
  line-height: 1;
}
.result-label {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.result-row:last-child { border-bottom: none; }
.result-row-key { color: #64748b; }
.result-row-val { font-weight: 600; color: #0f1629; }

/* Product recommendation */
.product-rec {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.product-rec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #166534;
  margin-bottom: 4px;
}
.product-rec-name {
  font-size: 16px;
  font-weight: 600;
  color: #0f1629;
  margin: 0 0 4px;
}
.product-rec-desc {
  font-size: 12px;
  color: #166534;
  margin: 0;
  line-height: 1.5;
}

/* Narrative explainer */
.narrative {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  margin-top: 12px;
  padding: 14px;
  background: #f8f7f4;
  border-radius: 8px;
}

/* Email gate CTA */
.calc-email-gate {
  background: #fff;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 16px;
}
.calc-email-gate h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #0f1629;
}
.calc-email-gate p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 18px;
}
.calc-email-form {
  display: flex;
  gap: 10px;
}
.calc-email-form input[type="email"] {
  flex: 1;
  padding: 11px 13px;
  font-size: 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  outline: none;
  font-family: inherit;
}
.calc-email-form input[type="email"]:focus {
  border-color: #f59e0b;
}
.calc-email-btn {
  background: #f59e0b;
  color: #0f1629;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s;
}
.calc-email-btn:hover { background: #fbbf24; }
.calc-email-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.calc-email-success {
  display: none;
  padding: 16px;
  background: #d1fae5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #065f46;
}
.calc-email-success.visible { display: block; }
.calc-email-error {
  display: none;
  font-size: 12px;
  color: #dc2626;
  margin-top: 8px;
}
.calc-email-error.visible { display: block; }

/* ─── Tool pages shared layout ──────────────────────────────────────────────── */
.tools-footer-cta {
  background: #0f1629;
  color: #fff;
  text-align: center;
  padding: 56px 24px;
}
.tools-footer-cta h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  margin: 0 0 10px;
  color: #fff;
}
.tools-footer-cta p {
  font-size: 15px;
  color: #94a3b8;
  margin: 0 0 24px;
}
.tools-footer-cta a {
  display: inline-block;
  background: #f59e0b;
  color: #0f1629;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
}