.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a { color: #526074; font-size: 14px; font-weight: 750; text-decoration: none; }
.header-nav a:hover { color: var(--blue); }

.hero-badges { margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.hero-badges li { padding: 8px 11px; border: 1px solid rgba(1,98,247,.16); border-radius: 999px; color: #15549e; background: rgba(255,255,255,.68); font-size: 11px; font-weight: 800; }

.calculator-shell { grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); }
.input-card { overflow: visible; }
.card-heading { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-heading .section-title { margin-bottom: 0; }
.card-heading > span { padding-top: 4px; color: #778195; font-size: 11px; }
.compact-heading { margin-bottom: 18px; }
.form-divider { height: 1px; margin: 28px 0; background: #dce1e8; }

.field-range {
  --range-progress: 0%;
  width: calc(100% - 6px);
  height: 18px;
  margin: -2px 3px -3px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.field-range::-webkit-slider-runnable-track { height: 5px; border-radius: 99px; background: linear-gradient(90deg,var(--sky) 0 var(--range-progress),#d8dde5 var(--range-progress) 100%); }
.field-range::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -6.5px; border: 3px solid #fff; border-radius: 50%; appearance: none; background: var(--sky); box-shadow: 0 2px 6px rgba(8,29,59,.22); }
.field-range::-moz-range-track { height: 5px; border-radius: 99px; background: #d8dde5; }
.field-range::-moz-range-progress { height: 5px; border-radius: 99px; background: var(--sky); }
.field-range::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--sky); box-shadow: 0 2px 6px rgba(8,29,59,.22); }
.range-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #737e90; font-size: 10px; }
.range-meta strong { color: var(--ink); font-size: 11px; }

.advanced-options { border: 1px solid #dce1e8; border-radius: 16px; background: rgba(255,255,255,.5); }
.advanced-options > summary { min-height: 54px; padding: 13px 16px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.advanced-options > summary::-webkit-details-marker { display: none; }
.advanced-options > summary span { color: var(--ink); font-size: 13px; font-weight: 800; }
.advanced-options > summary small { color: #778195; font-size: 10px; }
.advanced-options > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid #647083; border-bottom: 2px solid #647083; transform: rotate(45deg); transition: transform .18s ease; }
.advanced-options[open] > summary::after { transform: rotate(225deg); }
.advanced-content { padding: 0 16px 16px; }

.emphasized-check { padding: 14px 16px; border: 1px solid #dce1e8; border-radius: 16px; background: rgba(255,255,255,.5); }
.emphasized-check strong { display: block; color: var(--ink); margin-bottom: 2px; }
.emphasized-check.is-checked { border-color: #90bffd; background: #edf5ff; }
.previous-choice { grid-template-columns: repeat(3,minmax(0,1fr)); }
.previous-choice .choice span { height: 100%; }

.result-card { min-height: 100%; }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.result-top > span { padding: 6px 9px; border-radius: 999px; color: #d8e8f9; background: rgba(255,255,255,.11); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.refund-structure { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.refund-structure > p { margin: 0; color: #aebdce; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bar-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.bar-legend span { display: flex; align-items: center; gap: 6px; color: #bac6d4; font-size: 10px; }
.bar-legend b { color: white; }
.bar-legend i,.result-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.housing-dot { background: var(--sky); }
.interest-dot { background: #79bdf6; }
.total-dot { border: 1px solid rgba(255,255,255,.55); background: #fff; }
.result-row span { display: flex; align-items: center; gap: 10px; }
.result-explanation { margin: 20px 0 0; padding: 14px 15px; border-left: 2px solid var(--sky); color: #c3cedb; background: rgba(255,255,255,.07); font-size: 12px; line-height: 1.55; }
.result-explanation strong { color: white; }
.result-disclaimer { margin: 14px 0 0; color: #8292a7; font-size: 9px; line-height: 1.45; }

.breakdown-section { margin-top: 24px; padding: 34px; border: 1px solid #e0e5ec; border-radius: 30px; background: #fff; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.section-heading > span { padding: 8px 11px; border-radius: 999px; color: #0b65ce; background: #edf5ff; font-size: 11px; font-weight: 800; }
.deduction-cards { margin-top: 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.deduction-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid #e0e5ec; border-radius: 22px; background: #f7f9fc; }
.deduction-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--sky); }
.deduction-card.interest::before { background: #79bdf6; }
.deduction-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.deduction-card-head span { font-size: 14px; font-weight: 850; }
.deduction-card-head b { color: #6e7a8e; font-size: 9px; text-transform: uppercase; }
.deduction-card-value { display: block; margin: 14px 0 18px; font-size: 32px; letter-spacing: -.04em; }
.deduction-card dl { margin: 0; display: grid; gap: 10px; }
.deduction-card dl div { padding-top: 10px; border-top: 1px solid #e0e5ec; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.deduction-card dt { color: #687487; font-size: 11px; }
.deduction-card dd { margin: 0; text-align: right; font-size: 12px; font-weight: 800; }
.calculation-path { margin-top: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.calculation-path article { min-width: 0; padding: 16px; border-radius: 18px; display: flex; align-items: flex-start; gap: 11px; background: #f1f3f6; }
.calculation-path article > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--blue); font-size: 11px; font-weight: 850; }
.calculation-path strong { display: block; font-size: 12px; }
.calculation-path p { margin: 5px 0 0; color: #687487; font-size: 10px; line-height: 1.45; }

.action-panel { position: relative; margin-top: 16px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.action-button { min-height: 48px; padding: 10px 12px; border: 1px solid #d7dde6; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #4f5b6d; background: #fff; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.action-button:hover { border-color: #8cbbf9; color: var(--blue); }
.action-button.report { color: #ef4f4f; }
.action-status { position: absolute; top: 100%; left: 0; right: 0; margin: 6px 0 0; text-align: center; color: #667285; font-size: 10px; }
.action-icon { position: relative; width: 17px; height: 17px; flex: 0 0 auto; color: var(--sky); }
.icon-save { border: 1.7px solid currentColor; border-radius: 2px; }
.icon-save::before { content: ""; position: absolute; left: 3px; top: -1px; width: 8px; height: 5px; border: 1.5px solid currentColor; background: #fff; }
.icon-save::after { content: ""; position: absolute; left: 3px; bottom: 2px; width: 8px; height: 5px; border: 1.5px solid currentColor; }
.icon-link::before,.icon-link::after { content: ""; position: absolute; width: 9px; height: 12px; border: 1.7px solid currentColor; border-radius: 3px; }
.icon-link::before { left: 1px; top: 4px; }
.icon-link::after { right: 1px; top: 0; background: #fff; }
.icon-print::before { content: ""; position: absolute; left: 1px; top: 6px; width: 15px; height: 8px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-print::after { content: ""; position: absolute; left: 4px; top: 0; width: 9px; height: 14px; border: 1.7px solid currentColor; background: #fff; }
.icon-pdf { border: 1.7px solid currentColor; border-radius: 2px; }
.icon-pdf::after { content: "P"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-style: normal; font-weight: 900; }
.icon-alert { border: 1.7px solid currentColor; border-radius: 50%; }
.icon-alert::before { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-style: normal; font-weight: 900; }

.content { margin-top: 28px; }
.info-grid { margin: 22px 0 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.info-grid section { padding: 18px; border: 1px solid #e0e5ec; border-radius: 18px; background: #f8fafc; }
.info-grid h3 { margin-top: 0; }
.info-grid p { margin-bottom: 0; font-size: 13px; }
.source-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.source-cards section { padding: 18px; border-radius: 18px; background: #f1f5fa; }
.source-cards section > span { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.source-cards h3 { margin: 8px 0 6px; font-size: 15px; }
.source-cards p { margin: 0; font-size: 12px; line-height: 1.55; }
.process-list { padding: 0 !important; list-style: none; counter-reset: process; }
.process-list li { position: relative; min-height: 64px; padding: 14px 16px 14px 58px; border-bottom: 1px solid #e2e6eb; counter-increment: process; }
.process-list li::before { content: counter(process); position: absolute; left: 8px; top: 13px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue); font-size: 12px; font-weight: 850; }
.process-list strong,.process-list span { display: block; }
.process-list strong { color: var(--ink); }
.process-list span { margin-top: 3px; }
.documents-list { columns: 2; gap: 34px; }
.documents-list li { break-inside: avoid; margin-bottom: 8px; }
.official-links { padding-left: 0 !important; list-style: none; }
.official-links li { border-bottom: 1px solid #e2e6eb; }
.official-links a { padding: 12px 0; display: block; font-weight: 700; text-decoration: none; }
.official-links a::after { content: " ↗"; }

@media (max-width: 920px) {
  .calculator-shell { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .action-panel { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .header-nav a:first-child { display: none; }
  .deduction-cards,.info-grid { grid-template-columns: 1fr; }
  .calculation-path { grid-template-columns: 1fr; }
  .source-cards { grid-template-columns: 1fr; }
  .documents-list { columns: 1; }
}

@media (max-width: 540px) {
  .header-nav a { font-size: 11px; }
  .hero-badges { gap: 6px; }
  .hero-badges li { padding: 7px 9px; font-size: 9px; }
  .card-heading { display: block; }
  .card-heading > span { display: block; margin-top: 6px; }
  .previous-choice { grid-template-columns: 1fr; }
  .result-value { font-size: 46px; }
  .result-actions { grid-template-columns: 1fr; }
  .breakdown-section { padding: 24px 18px; border-radius: 24px; }
  .section-heading { display: block; }
  .section-heading > span { width: fit-content; margin-top: 12px; display: block; }
  .section-heading h2 { font-size: 24px; }
  .deduction-card { padding: 20px 18px; }
  .deduction-card-head { display: block; }
  .deduction-card-head b { margin-top: 6px; display: block; }
  .deduction-card-value { font-size: 28px; }
  .action-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .action-panel .mobile-hide { display: none; }
  .action-button { font-size: 10px; }
}

@media print {
  .site-header,.breadcrumbs,.hero-badges,.result-actions,.action-panel,.content,.site-footer { display: none !important; }
  body { background: white; }
  .page { width: 100%; padding: 0; }
  .hero { padding: 0 0 20px; border: 0; background: none; }
  .calculator-shell { grid-template-columns: 1fr 1fr; }
  .input-card,.result-card,.breakdown-section { break-inside: avoid; box-shadow: none; }
  .result-card { position: static; color-adjust: exact; -webkit-print-color-adjust: exact; }
}
