/* MortiCalc — FinTech SaaS design system (skill.md V2) */

:root {
  --mc-primary: #2563eb;
  --mc-primary-hover: #1d4ed8;
  --mc-primary-soft: #eff6ff;
  --mc-bg: #f8fafc;
  --mc-ink: #0f172a;
  --mc-muted: #64748b;
  --mc-line: #e2e8f0;
  --mc-card: #ffffff;
  --mc-wash: #f8fafc;
  --mc-success: #22c55e;
  --mc-success-soft: #f0fdf4;
  --mc-font: "Inter", "Manrope", system-ui, -apple-system, sans-serif;
  --mc-display: "Manrope", "Inter", system-ui, sans-serif;
  --mc-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  --mc-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --mc-radius: 16px;
  --mc-radius-sm: 10px;
  --mc-pi: #2563eb;
  --mc-tax: #f59e0b;
  --mc-ins: #8b5cf6;
  --mc-pmi: #06b6d4;
  --mc-hoa: #64748b;
  --mc-container: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mortgage-body {
  margin: 0;
  min-height: 100vh;
  color: var(--mc-ink);
  font-family: var(--mc-font);
  font-size: 16px;
  line-height: 1.6;
  background: var(--mc-bg);
  -webkit-font-smoothing: antialiased;
}

body.mortgage-body.embed-mode {
  background: var(--mc-card);
}

.mc-page {
  min-height: 100%;
}

/* ——— Header ——— */
.mc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 2px 10px rgba(15, 23, 42, 0.03);
}

.mc-header-inner {
  max-width: var(--mc-container);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 768px) {
  .mc-header-inner {
    padding: 0 24px;
  }
}

.mc-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.mc-brand-logo {
  display: block;
  width: auto;
  height: 36px;
  max-width: min(220px, 55vw);
  object-fit: contain;
}

.mc-nav {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .mc-nav {
    display: flex;
  }
}

.mc-nav a {
  color: var(--mc-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.mc-nav a:hover {
  color: var(--mc-ink);
  background: var(--mc-wash);
}

.mc-header-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.mc-header-cta:hover {
  background: var(--mc-primary-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* ——— Main / Hero ——— */
.mc-main {
  max-width: var(--mc-container);
  margin: 0 auto;
  padding: 20px 20px 64px;
}

@media (min-width: 768px) {
  .mc-main {
    padding: 24px 24px 72px;
  }
}

.mc-hero {
  max-width: none;
  margin-bottom: 16px;
}

.mc-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mc-primary);
}

.mc-title {
  margin: 0;
  font-family: var(--mc-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--mc-ink);
}

.mc-lead {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mc-muted);
}

/* ——— Left / Right layout ——— */
.mc-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 1024px) {
  .mc-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 340px);
    gap: 24px;
  }
}

.mc-left {
  min-width: 0;
}

.mc-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 1024px) {
  .mc-side-col {
    position: sticky;
    top: 76px;
  }
}

/* ——— Cards ——— */
.mc-card {
  border-radius: var(--mc-radius);
  background: var(--mc-card);
  padding: 18px;
  box-shadow: var(--mc-shadow);
  margin-top: 15px;
}

@media (min-width: 640px) {
  .mc-card {
    padding: 22px;
  }
}

/* ——— Steps ——— */
.mc-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.mc-step-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mc-line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  background: var(--mc-wash);
  color: var(--mc-muted);
  text-decoration: none;
  line-height: 1.3;
  transition: all 0.15s;
}

a.mc-step-btn:hover {
  border-color: #bfdbfe;
  color: var(--mc-primary);
  background: var(--mc-primary-soft);
}

span.mc-step-btn {
  cursor: default;
}

.mc-step-btn.is-active {
  border-color: var(--mc-primary);
  background: var(--mc-primary);
  color: #fff;
}

.mc-step-btn.is-done {
  border-color: #bfdbfe;
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
}

/* ——— Panel / Fields ——— */
.mc-panel-title {
  margin: 0;
  font-family: var(--mc-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mc-ink);
}

.mc-panel-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--mc-muted);
}

.mc-field {
  margin-top: 14px;
}

.mc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-ink);
}

.mc-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--mc-muted);
}

.mc-input-wrap {
  display: flex;
  align-items: center;
  border: none;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-wash);
  overflow: hidden;
  transition: box-shadow 0.15s, background 0.15s;
}

.mc-input-wrap:focus-within {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mc-affix {
  padding: 0 4px 0 12px;
  color: var(--mc-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.mc-affix-right,
.mc-input-wrap .mc-affix:last-child {
  padding: 0 12px 0 4px;
}

.mc-input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--mc-ink);
  background: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.mc-input:disabled {
  opacity: 0.55;
}

.mc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--mc-primary) 0%,
    var(--mc-primary) var(--slider-pct, 0%),
    #e2e8f0 var(--slider-pct, 0%),
    #e2e8f0 100%
  );
  outline: none;
}

.mc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mc-primary);
  box-shadow: var(--mc-shadow-sm);
  cursor: pointer;
}

.mc-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mc-primary);
  box-shadow: var(--mc-shadow-sm);
  cursor: pointer;
}

.mc-row-2 {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .mc-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.mc-loan-box {
  margin-top: 14px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-primary-soft);
  padding: 12px 14px;
  font-size: 13px;
}

.mc-loan-box span {
  color: var(--mc-muted);
  font-weight: 500;
}

.mc-loan-box strong {
  display: block;
  margin-top: 2px;
  font-family: var(--mc-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--mc-ink);
}

.mc-program-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

@media (min-width: 640px) {
  .mc-program-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.mc-program {
  text-align: left;
  border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius-sm);
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.mc-program:hover {
  border-color: #93c5fd;
}

.mc-program.is-active {
  border-color: var(--mc-primary);
  background: var(--mc-primary-soft);
  box-shadow: 0 0 0 1px var(--mc-primary);
}

.mc-program strong {
  display: block;
  color: var(--mc-ink);
  font-weight: 600;
  font-size: 15px;
}

.mc-program span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-toggle-row {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding: 3px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-wash);
  width: fit-content;
}

.mc-toggle {
  border: 0;
  border-radius: 7px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--mc-muted);
  transition: all 0.15s;
}

.mc-toggle.is-active {
  background: #fff;
  color: var(--mc-ink);
  box-shadow: var(--mc-shadow-sm);
}

.mc-pmi-box {
  margin-top: 14px;
  border-radius: var(--mc-radius-sm);
  padding: 12px 14px;
  background: var(--mc-wash);
}

.mc-pmi-box.is-required {
  background: var(--mc-primary-soft);
}

.mc-pmi-box .mc-field {
  margin-top: 10px;
}

.mc-pmi-box h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.mc-pmi-box p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--mc-muted);
}

.mc-note a,
.mc-link {
  color: var(--mc-primary);
  text-decoration: none;
  font-weight: 500;
}

.mc-note a:hover {
  text-decoration: underline;
}

.mc-extra-box {
  margin-top: 12px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-success-soft);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-extra-box strong {
  color: #15803d;
  font-weight: 600;
}

/* ——— Buttons ——— */
.mc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--mc-line);
}

.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--mc-radius-sm);
  height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}

.mc-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mc-btn-ghost {
  height: auto;
  padding: 12px 16px;
  background: transparent;
  color: var(--mc-muted);
  font-weight: 500;
  font-size: 15px;
}

.mc-btn-ghost:hover:not(:disabled) {
  color: var(--mc-ink);
  background: var(--mc-wash);
}

.mc-btn-accent {
  background: var(--mc-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.mc-btn-accent:hover:not(:disabled) {
  background: var(--mc-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.mc-btn-ink {
  background: var(--mc-ink);
  color: #fff;
}

.mc-btn-ink:hover {
  opacity: 0.9;
}

.mc-btn-outline {
  border: 1.5px solid var(--mc-line);
  background: #fff;
  color: var(--mc-ink);
  box-shadow: none;
}

.mc-btn-outline:hover:not(:disabled) {
  border-color: var(--mc-primary);
  color: var(--mc-primary);
  background: var(--mc-primary-soft);
}

.mc-btn-block {
  width: 100%;
}

/* ——— Charts ——— */
.mc-chart-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 3px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-wash);
  width: fit-content;
}

.mc-tab {
  border: 0;
  border-radius: 7px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--mc-muted);
  transition: all 0.15s;
}

.mc-tab.is-active {
  background: #fff;
  color: var(--mc-ink);
  box-shadow: var(--mc-shadow-sm);
}

.mc-muted {
  color: var(--mc-muted);
  font-size: 14px;
}

.mc-donut-wrap {
  position: relative;
  width: 100%;
  max-width: 180px;
  margin: 8px auto;
}

.mc-donut-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.mc-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.mc-donut-center span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mc-muted);
}

.mc-donut-center strong {
  font-family: var(--mc-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.mc-legend {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.mc-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--mc-line);
  font-size: 13px;
}

.mc-legend-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mc-muted);
  font-weight: 500;
}

.mc-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.mc-legend-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--mc-ink);
}

.mc-balance-chart {
  width: 100%;
  height: 160px;
  margin-top: 4px;
}

.mc-balance-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mc-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
  text-align: center;
}

.mc-mini-stat {
  border-radius: 8px;
  background: var(--mc-wash);
  padding: 8px 6px;
}

.mc-mini-stat span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-muted);
}

.mc-mini-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mc-compare {
  margin-top: 14px;
  border-radius: var(--mc-radius-sm);
  background: var(--mc-wash);
  padding: 12px 14px;
}

.mc-compare > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-muted);
}

.mc-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
}

.mc-compare-grid p {
  margin: 0;
  color: var(--mc-muted);
  font-weight: 500;
}

.mc-compare-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--mc-ink);
}

.mc-data-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mc-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mc-primary);
  background: var(--mc-primary-soft);
  text-decoration: none;
  transition: background 0.15s;
}

.mc-chip:hover {
  background: #dbeafe;
}

/* ——— Result Dashboard ——— */
.mc-result {
  border-radius: var(--mc-radius);
  background: #fff;
  padding: 18px;
  box-shadow: var(--mc-shadow);
}

.mc-result-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mc-primary);
}

.mc-result-total {
  margin: 4px 0 0;
  font-family: var(--mc-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.mc-result-total .mc-per {
  margin-left: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mc-muted);
  letter-spacing: 0;
}

.mc-result-loan {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-bar {
  display: flex;
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mc-wash);
}

.mc-bar > i {
  display: block;
  height: 100%;
}

.mc-result .mc-legend {
  margin-top: 8px;
}

.mc-result-note {
  margin: 10px 0 0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.mc-result-note.is-pmi {
  background: var(--mc-primary-soft);
  color: #1e40af;
}

.mc-result-note.is-ok {
  background: var(--mc-success-soft);
  color: #166534;
}

.mc-mobile-bar {
  display: none;
}

@media (max-width: 1023px) {
  .mc-layout {
    display: flex;
    flex-direction: column;
  }

  .mc-side-col {
    order: 2;
  }

  .mc-left {
    order: 1;
  }
}

/* ——— SEO / Trust / FAQ ——— */
.mc-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--mc-line);
}

.mc-section-title {
  margin: 0;
  font-family: var(--mc-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mc-section-lead {
  margin: 12px 0 0;
  max-width: 640px;
  font-size: 16px;
  color: var(--mc-muted);
}

.mc-feature-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .mc-feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .mc-feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mc-feature {
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: var(--mc-shadow-sm);
  border: 1px solid var(--mc-line);
}

.mc-feature-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.mc-feature h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.mc-feature p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mc-muted);
}

.mc-trust {
  margin-top: 48px;
  border-radius: var(--mc-radius);
  background: #fff;
  padding: 32px;
  box-shadow: var(--mc-shadow);
}

.mc-trust h2 {
  margin: 0;
  font-family: var(--mc-display);
  font-size: 24px;
  font-weight: 700;
}

.mc-trust-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .mc-trust-list {
    grid-template-columns: 1fr 1fr;
  }
}

.mc-trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mc-ink);
}

.mc-trust-list li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--mc-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.mc-faq {
  margin-top: 48px;
}

.mc-faq-item {
  border-bottom: 1px solid var(--mc-line);
}

.mc-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--mc-ink);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.mc-faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--mc-muted);
}

.mc-faq-item[open] summary::after {
  content: "−";
}

.mc-faq-item p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--mc-muted);
  line-height: 1.6;
}

.mc-disclaimer {
  margin-top: 48px;
  border-radius: 16px;
  background: var(--mc-wash);
  padding: 24px;
  font-size: 14px;
  color: var(--mc-muted);
}

.mc-disclaimer strong {
  display: block;
  color: var(--mc-ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.mc-disclaimer p {
  margin: 0;
}
.ads_box {
  text-align: center;
  z-index: 1;
  margin-top: 0;
  max-width: 100%;
}
.ad-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-2);
  color: var(--muted-2);
  font-size: 13px;
  font-style: italic;
  user-select: none;
  max-width: 750px !important;
  margin: 0 auto;
}
.ad-label {
  color: rgb(145 69 69 / 55%);
  text-align: center;
  margin-bottom: 5px;
}
.ad-label span {
  flex-shrink: 0;
  padding: 0 2px;
}
.ad-label::after, .ad-label::before {
  content: "";
  flex: 1;
  border-top: 1px dashed rgb(18 17 17 / 18%);
}

/* ——— Reference pages ——— */
.mc-ref {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px 80px;
}

@media (min-width: 640px) {
  .mc-ref {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.mc-ref h1 {
  margin: 12px 0 0;
  font-family: var(--mc-display);
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mc-ref > .mc-lead {
  max-width: 560px;
}

.mc-ref-table-wrap {
  margin-top: 32px;
  overflow-x: auto;
  border-radius: var(--mc-radius);
  background: #fff;
  box-shadow: var(--mc-shadow);
}

.mc-amort-panel {
  margin-top: 24px;
  border-radius: var(--mc-radius);
  background: #fff;
  border: 1px solid var(--mc-line);
  box-shadow: var(--mc-shadow);
  overflow: hidden;
}

.mc-amort-panel .mc-ref-table-wrap {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.mc-amort-summary {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .mc-amort-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .mc-amort-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

.mc-stat {
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--mc-shadow-sm);
  border: 1px solid var(--mc-line);
}

.mc-stat span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-muted);
}

.mc-stat strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mc-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.mc-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--mc-line);
  background: #fff;
}

.mc-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.mc-table th {
  padding: 14px 16px;
  background: var(--mc-wash);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-muted);
}

.mc-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--mc-line);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.mc-table tbody tr:hover {
  background: var(--mc-primary-soft);
}

.mc-table-foot {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--mc-line);
  background: var(--mc-wash);
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-ref .mc-btn {
  margin-top: 32px;
}

.mc-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.mc-actions-row .mc-btn {
  margin-top: 0;
}

.mc-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  background: var(--mc-wash);
}

.mc-pager-bottom {
  border-top: 1px solid var(--mc-line);
}

.mc-amort-panel > .mc-pager:first-child {
  border-bottom: 1px solid var(--mc-line);
}

.mc-pager-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--mc-muted);
}

.mc-pager-info strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--mc-ink);
  letter-spacing: -0.01em;
}

.mc-pager-of {
  font-weight: 500;
}

.mc-pager-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.mc-pager-range,
.mc-pager-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--mc-muted);
  font-variant-numeric: tabular-nums;
}

.mc-pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--mc-shadow-sm);
}

.mc-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--mc-ink);
  text-decoration: none;
  background: #fff;
  border: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.mc-pager-btn:hover:not(.is-disabled) {
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
}

.mc-pager-btn.is-disabled {
  color: #cbd5e1;
  pointer-events: none;
}

.mc-pager-select-wrap {
  display: inline-flex;
  border-left: 1px solid var(--mc-line);
  border-right: 1px solid var(--mc-line);
}

.mc-pager-select {
  height: 34px;
  min-width: 5.5rem;
  border: 0;
  border-radius: 0;
  padding: 0 28px 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.mc-pager-select:hover {
  background-color: var(--mc-wash);
}

.mc-pager-select:focus {
  outline: 0;
  background-color: var(--mc-primary-soft);
  color: var(--mc-primary);
}

.mc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes mc-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mc-fade {
  animation: mc-fade-up 0.35s ease-out both;
}

.mc-panel[hidden] {
  display: none !important;
}
