/* ==========================================================================
   Mortgage Calculator — Page Styles
   Imports the shared component library, then adds only what is specific
   to this calculator's layout. This file is the template every future
   calculator's style.css should follow: import shared, then extend.
   ========================================================================== */
@import url("../../css/style.css");

/* ---- Page intro ---- */
.calc-intro{ padding: 32px 0 24px; }
.calc-intro h1{ font-size: 26px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 6px; }
.calc-intro p{ font-size: 14px; color: var(--text-secondary); max-width: 560px; }

/* ---- Two-column calculator layout ---- */
.calc-layout{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
  padding-bottom: var(--space-6);
}

/* ---- Results card ---- */
.results-card{ position: sticky; top: 76px; }
.hero-result{ padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); }
.hero-result .label{ font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); margin-bottom: var(--space-1); }
.hero-result .amount{ font-size: 40px; font-weight: 700; letter-spacing: -0.6px; font-family: var(--font-mono); }
.hero-result .amount span{ font-size: 20px; font-weight: 600; color: var(--text-tertiary); }
.hero-result .caption{ font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

.metrics-row{
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}
.metrics-row .metric .label{ font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-tertiary); margin-bottom: 4px; }
.metrics-row .metric .value{ font-family: var(--font-mono); font-weight: 700; font-size: 16px; }

/* ---- Donut (pure CSS, no chart library) ---- */
.breakdown{ display: flex; align-items: center; gap: var(--space-5); margin-bottom: var(--space-4); }
.donut{
  --p1: 0; --p2: 0; --p3: 0; --p4: 0;
  width: 108px; height: 108px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    var(--primary) 0 var(--p1),
    var(--success) var(--p1) var(--p2),
    var(--text-tertiary) var(--p2) var(--p3),
    var(--border-strong) var(--p3) var(--p4)
  );
  position: relative;
}
.donut::after{
  content: "";
  position: absolute; inset: 16px;
  border-radius: 50%;
  background: var(--surface);
}
.breakdown-legend{ flex: 1; min-width: 0; }

/* ---- Insights ---- */
.insights-title{ font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); margin: var(--space-4) 0 var(--space-2); }

/* ---- Lower sections ---- */
.section-block{ padding: var(--space-5) 0; border-top: 1px solid var(--border); }
.section-block:first-child{ border-top: none; }
.section-block-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }

.formula-box{
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  line-height: 1.8;
  overflow-x: auto;
}
.formula-box .comment{ color: var(--text-tertiary); }

.faq-item .accordion-trigger{ font-size: 14px; }
.faq-answer{ font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

.related-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
