/* SmartMortgageCalc home experience: an editorial guide that opens into a working calculator. */
:root {
  --smc-home-ink: #0f172a;
  --smc-home-spruce: #0b1d3a;
  --smc-home-leaf: #1d4ed8;
  --smc-home-mist: #f1f5f9;
  --smc-home-paper: #ffffff;
  --smc-home-citrine: #f59e0b;
}

.smc-home-hero {
  position: relative;
  padding: clamp(32px, 5vw, 64px) 0 28px;
  background: var(--smc-home-mist);
  border-bottom: 1px solid #e2e8f0;
}

.smc-home-hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--smc-home-citrine);
  content: "";
}

.smc-home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: center;
}

.smc-home-copy {
  max-width: 660px;
}

.smc-home-kicker {
  margin: 0 0 14px;
  color: var(--smc-home-leaf);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.smc-home-copy h1 {
  max-width: 640px;
  margin: 0;
  color: var(--smc-home-ink);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.02;
  text-wrap: balance;
}

.smc-home-deck {
  max-width: 570px;
  margin: 20px 0 0;
  color: #475569;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.7;
}

.smc-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.smc-home-primary,
.smc-home-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 750;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.smc-home-primary {
  color: var(--smc-home-ink);
  background: var(--smc-home-citrine);
  border-color: #d97706;
}

.smc-home-primary:hover {
  color: var(--smc-home-ink);
  background: #fbbf24;
  transform: translateY(-1px);
}

.smc-home-secondary {
  color: var(--smc-home-spruce);
  background: transparent;
  border-color: #cbd5e1;
}

.smc-home-secondary:hover {
  color: var(--smc-home-spruce);
  background: rgba(255, 255, 255, .7);
  border-color: #94a3b8;
}

.smc-home-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  color: #475569;
  font-size: .82rem;
  list-style: none;
}

.smc-home-promises li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.smc-home-promises li::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1d4ed8;
  content: "";
}

.smc-home-visual {
  position: relative;
  min-width: 0;
  padding: 0 12px 42px 0;
}

.smc-home-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.48 / 1;
  margin: 0;
  border-radius: 14px 14px 42px 14px;
  background: #e2e8f0;
  box-shadow: 0 18px 36px rgba(11, 29, 58, .14);
}

.smc-home-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
}

.smc-home-photo figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 5px;
  color: #fff;
  background: rgba(11, 29, 58, .72);
  font-size: .72rem;
}

.smc-home-preview {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(380px, calc(100% - 20px));
  padding: 17px 18px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: var(--smc-home-paper);
  box-shadow: 0 12px 30px rgba(11, 29, 58, .15);
}

.smc-home-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: .78rem;
  font-weight: 650;
}

.smc-home-preview-state {
  padding: 3px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #475569;
  font-size: .68rem;
  font-weight: 700;
}

.smc-home-preview-amount {
  display: block;
  margin: 8px 0 1px;
  color: var(--smc-home-spruce);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 780;
  letter-spacing: -.045em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.smc-home-preview-note {
  margin: 0;
  color: #64748b;
  font-size: .74rem;
}

.smc-home-preview-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.smc-home-preview-facts div { min-width: 0; }
.smc-home-preview-facts span,
.smc-home-preview-facts strong { display: block; }
.smc-home-preview-facts span { color: #64748b; font-size: .68rem; }
.smc-home-preview-facts strong {
  overflow: hidden;
  color: var(--smc-home-ink);
  font-size: .78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.smc-home-preview-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-top: 6px;
  color: var(--smc-home-spruce);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}

.smc-home-preview-link:hover { text-decoration: underline; }

.smc-explore-strip {
  display: grid;
  grid-template-columns: minmax(170px, .85fr) repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 34px;
}

.smc-explore-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 12px 6px 0;
}

.smc-explore-intro h2 {
  margin: 0;
  color: var(--smc-home-ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.3;
}

.smc-explore-intro p {
  margin: 4px 0 0;
  color: #475569;
  font-size: .78rem;
  line-height: 1.45;
}

.smc-explore-card {
  display: flex;
  min-width: 0;
  min-height: 70px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--smc-home-ink);
  background: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.smc-explore-card:hover {
  color: var(--smc-home-ink);
  background: #fff;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.smc-explore-card strong { font-size: .82rem; font-weight: 750; }
.smc-explore-card span { color: #64748b; font-size: .72rem; line-height: 1.35; }

/* Calculator as one workspace: inputs and the result are visible together. */
.smc-calculator-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 16px 26px;
  align-items: start;
  scroll-margin-top: 88px;
  padding: clamp(20px, 3vw, 32px) !important;
  background: var(--smc-home-paper) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(11, 29, 58, .06) !important;
}

.smc-calculator-workspace > .card-title,
.smc-calculator-workspace > .smc-planner-lead,
.smc-calculator-workspace > [role="note"],
.smc-calculator-workspace > .quick-scenarios-panel,
.smc-calculator-workspace > .hypothetical-scenario-box {
  grid-column: 1 / -1;
}

.smc-calculator-workspace > .card-title {
  margin: 0 !important;
  color: var(--smc-home-ink) !important;
  font-size: clamp(1.35rem, 2vw, 1.7rem) !important;
  line-height: 1.2;
}

.smc-planner-lead {
  margin: -9px 0 0;
  color: #475569;
  font-size: .9rem;
}

.smc-planning-notice {
  padding: 12px 14px !important;
  border: 1px solid #fde68a !important;
  border-left: 3px solid #d97706 !important;
  border-radius: 6px !important;
  color: #475569 !important;
  background: #fffbeb !important;
  font-size: .82rem !important;
  line-height: 1.55;
}

.smc-planning-notice strong { color: var(--smc-home-ink); }

.smc-calculator-workspace > .quick-scenarios-panel {
  margin: 0 !important;
  padding: 11px 13px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
}

.smc-calculator-workspace #mortgage-form {
  grid-column: 1;
  min-width: 0;
  margin: 0;
}

.smc-calculator-workspace #mortgage-form > .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.smc-calculator-workspace .form-label {
  color: #334155;
  font-size: .84rem;
}

.smc-calculator-workspace input:not([type="checkbox"]),
.smc-calculator-workspace select {
  min-height: 44px;
  border-color: #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.smc-calculator-workspace .input-wrapper {
  border-radius: 6px;
}

.smc-calculator-workspace .btn-row {
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.smc-calculator-workspace .btn-primary {
  color: #0f172a;
  background: var(--smc-home-citrine);
  border: 1px solid #d97706;
  box-shadow: none;
}

.smc-calculator-workspace .btn-primary:hover {
  color: #0f172a;
  background: #fbbf24;
  box-shadow: 0 5px 12px rgba(11, 29, 58, .1);
}

.smc-calculator-workspace .btn-secondary {
  border-color: #cbd5e1;
}

.smc-more-inputs {
  grid-column: 1 / -1;
  margin-top: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.smc-more-inputs > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  color: var(--smc-home-ink);
  cursor: pointer;
  font-size: .87rem;
  font-weight: 750;
  list-style: none;
}

.smc-more-inputs > summary::-webkit-details-marker,
.smc-breakdown-details > summary::-webkit-details-marker { display: none; }

.smc-more-inputs > summary::after,
.smc-breakdown-details > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.smc-more-inputs[open] > summary::after,
.smc-breakdown-details[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.smc-more-inputs > summary:focus-visible,
.smc-breakdown-details > summary:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.smc-more-inputs-copy {
  margin: 0;
  padding: 0 13px 12px;
  color: #475569;
  font-size: .78rem;
  line-height: 1.45;
}

.smc-more-inputs .form-grid {
  padding: 0 13px 15px;
}

.smc-planner-result {
  position: sticky;
  top: 88px;
  grid-column: 2;
  grid-row: 5;
  padding: 20px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

.smc-planner-result .payment-header {
  display: block;
  padding: 0 0 15px;
  border-bottom: 1px solid #cbd5e1;
}

.smc-planner-result .payment-header-info { gap: 7px; }
.smc-planner-result .payment-title {
  margin: 0 !important;
  color: #475569;
  font-family: var(--font-sans);
  font-size: .83rem !important;
  font-weight: 650 !important;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none !important;
}

.smc-planner-result .payment-amount {
  color: var(--smc-home-spruce);
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4vw, 3.1rem);
  font-weight: 780;
  letter-spacing: -.05em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.smc-planner-result .payment-header-actions { margin-top: 11px; }
.smc-planner-result .btn-download-report {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 6px;
  border-color: #cbd5e1;
  color: var(--smc-home-spruce);
  background: #fff;
  box-shadow: none;
}

.smc-planner-result .breakdown-list {
  gap: 0;
  padding: 12px 0 0;
}

.smc-planner-result .breakdown-item {
  padding: 7px 0;
  border-bottom: 1px solid #e2e8f0;
}

.smc-planner-result .breakdown-item:last-child { border-bottom: 0; }
.smc-planner-result .breakdown-label { color: #475569; font-size: .8rem; }
.smc-planner-result .breakdown-val { color: var(--smc-home-ink); font-size: .84rem; font-weight: 750; }
.smc-planner-result .payment-header-actions .btn-download-report { font-size: .78rem; }

.smc-breakdown-details {
  margin-top: 14px;
  border-top: 1px solid #cbd5e1;
}

.smc-breakdown-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--smc-home-spruce);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
  list-style: none;
}

.smc-breakdown-details .smc-breakdown-content { padding-bottom: 3px; }
.smc-breakdown-details table { min-width: 590px; }
.smc-breakdown-details .info-callout { font-size: .77rem !important; }

.smc-calculator-workspace > .hypothetical-scenario-box {
  margin-top: 2px;
  border-radius: 9px;
}

@media (max-width: 980px) {
  .smc-home-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 28px; }
  .smc-explore-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .smc-explore-intro { grid-column: 1 / -1; padding: 0 0 3px; }
  .smc-calculator-workspace { grid-template-columns: minmax(0, 1fr) minmax(290px, .84fr); gap: 14px 18px; }
}

@media (max-width: 760px) {
  .smc-home-hero { padding: 28px 0 22px; }
  .smc-home-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .smc-home-copy h1 { max-width: 600px; font-size: clamp(2.2rem, 9vw, 3.2rem); }
  .smc-home-visual { max-width: 620px; padding-right: 0; margin-bottom: 32px; }
  .smc-home-preview { right: 0; }
  .smc-explore-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
  .smc-explore-intro { grid-column: 1 / -1; }
  .smc-explore-card { min-height: 68px; }
  .smc-calculator-workspace { grid-template-columns: minmax(0, 1fr); padding: 18px 14px !important; }
  .smc-calculator-workspace > #mortgage-form,
  .smc-calculator-workspace > .smc-planner-result,
  .smc-calculator-workspace > .hypothetical-scenario-box { grid-column: 1; grid-row: auto; }
  .smc-planner-result { position: static; }
}

@media (max-width: 480px) {
  .smc-home-actions { align-items: stretch; flex-direction: column; }
  .smc-home-primary, .smc-home-secondary { width: 100%; }
  .smc-home-visual { padding-bottom: 52px; }
  .smc-home-photo { aspect-ratio: 1.35 / 1; border-bottom-right-radius: 28px; }
  .smc-home-preview { padding: 14px; }
  .smc-home-preview-facts { gap: 6px; }
  .smc-home-preview-facts span { font-size: .64rem; }
  .smc-home-preview-facts strong { font-size: .72rem; }
  .smc-explore-strip { gap: 7px; }
  .smc-explore-card { padding: 10px; }
  .smc-calculator-workspace #mortgage-form > .form-grid { grid-template-columns: minmax(0, 1fr); }
  .smc-calculator-workspace .quick-scenarios-panel { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .smc-home-primary, .smc-home-secondary, .smc-explore-card,
  .smc-more-inputs > summary::after,
  .smc-breakdown-details > summary::after {
    transition: none !important;
  }
}

.smc-home-shareline {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.smc-home-shareline .smc-social-bar {
  justify-content: flex-end;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  color: #64748b;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.smc-home-shareline .smc-social-label { color: #475569; }
.smc-home-shareline .smc-social-actions { gap: 6px; }
.smc-home-shareline .smc-share-btn {
  color: #475569;
  background: rgba(255, 255, 255, .5);
  border-color: #cbd5e1;
}
.smc-home-shareline .smc-share-btn:hover {
  color: var(--smc-home-spruce);
  background: #fff;
  border-color: #94a3b8;
}

.smc-more-inputs > summary {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.smc-more-inputs-label { color: var(--smc-home-ink); }
.smc-more-inputs-hint {
  color: #64748b;
  font-size: .76rem;
  font-weight: 500;
}

.smc-calculator-workspace .scenario-toggle-text-button {
  display: block;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.smc-calculator-workspace .scenario-toggle-text-button:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 4px;
  border-radius: 5px;
}

@media (max-width: 560px) {
  .smc-home-shareline { justify-content: flex-start; }
  .smc-home-shareline .smc-social-bar { align-items: flex-start; }
  .smc-more-inputs-hint { flex-basis: 100%; }
}

.smc-calculator-workspace #mortgage-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.smc-calculator-workspace .scenario-toggle-header { cursor: default; }
.smc-calculator-workspace .scenario-toggle-text-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
}
.smc-calculator-workspace .scenario-toggle-copy {
  color: #475569;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.45;
}
.smc-calculator-workspace .scenario-optional-tag {
  padding: 2px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  color: #475569;
  background: #f1f5f9;
  font-size: .68rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .smc-calculator-workspace #mortgage-form .form-grid { grid-template-columns: minmax(0, 1fr); }
}
