:root {
  --ink: #101828;
  --ink-strong: #071426;
  --muted: #667085;
  --soft: #f6f8fb;
  --soft-strong: #eef4f8;
  --surface: #ffffff;
  --surface-tint: #fbfcfe;
  --line: #d9e2ec;
  --line-strong: #c5d2df;
  --blue: #1d4ed8;
  --blue-dark: #173b8f;
  --blue-soft: #e8f0ff;
  --green: #0f8f72;
  --green-dark: #096b59;
  --green-soft: #e8f7f2;
  --gold: #b7791f;
  --gold-soft: #fff5df;
  --shadow: 0 20px 48px rgba(16, 24, 40, 0.12);
  --shadow-soft: 0 10px 28px rgba(16, 24, 40, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbfd 0%, #ffffff 320px),
    var(--soft);
  font-family: "Inter", "Roboto", "Open Sans", Arial, sans-serif;
  line-height: 1.6;
}

body[data-calculator] {
  padding-bottom: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  background: var(--ink-strong);
  border-radius: var(--radius);
  color: var(--surface);
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 100;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.nav-shell {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  align-items: center;
  color: var(--ink-strong);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
  color: var(--surface);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nav-links {
  align-items: center;
  background: rgba(246, 248, 251, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 4px;
  padding: 4px;
}

.nav-links a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
  padding: 9px 12px;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
  color: var(--ink-strong);
}

.breadcrumb {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 750;
  gap: 8px;
  padding-top: 18px;
}

.breadcrumb a {
  color: var(--blue);
}

.breadcrumb a:hover {
  color: var(--green-dark);
}

.breadcrumb span[aria-current="page"] {
  color: var(--ink-strong);
}

.hero-section {
  background:
    linear-gradient(135deg, rgba(232, 240, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 44%, rgba(232, 247, 242, 0.92) 100%);
  border-bottom: 1px solid var(--line);
  padding: 82px 0 58px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 58px;
  grid-template-columns: minmax(0, 1fr) 420px;
}

.hero-copy {
  max-width: 700px;
}

.hero-copy h1,
.page-hero h1 {
  color: var(--ink-strong);
  font-size: 3.35rem;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.hero-subtitle,
.page-hero p,
.section-heading p {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 18px 0 0;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.is-busy,
.button.is-confirmed,
.button.is-error {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--blue), #2563eb);
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.22);
  color: var(--surface);
}

.button-primary:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.button-secondary {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--line-strong);
  color: var(--ink-strong);
}

.button-secondary:hover {
  background: var(--surface);
  border-color: #aab8c8;
  box-shadow: var(--shadow-soft);
}

.button.is-busy {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--surface);
}

.button.is-confirmed {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-color: var(--green);
  box-shadow: 0 12px 24px rgba(15, 143, 114, 0.22);
  color: var(--surface);
}

.button.is-error {
  background: var(--gold-soft);
  border-color: #e3ba6f;
  color: #7c4a03;
}

.full-width {
  width: 100%;
}

.trust-row {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-row span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.05);
  font-size: 0.9rem;
  font-weight: 750;
  padding: 7px 12px;
}

.hero-proof-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  max-width: 560px;
}

.hero-proof-grid div {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.hero-proof-grid strong {
  color: var(--ink-strong);
  display: block;
  font-size: 1.45rem;
  line-height: 1;
}

.hero-proof-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
  margin-top: 6px;
}

.tool-preview {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(197, 210, 223, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 420px;
  padding: 24px;
}

.preview-topline {
  display: flex;
  gap: 7px;
}

.preview-topline span {
  background: var(--soft-strong);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.preview-metric,
.result-panel {
  background: linear-gradient(135deg, var(--ink-strong), #123a4f 62%, var(--green-dark));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--surface);
  position: relative;
}

.preview-metric {
  margin-top: 24px;
  padding: 24px;
}

.preview-metric p {
  color: #c9d7e5;
  margin: 0 0 8px;
}

.preview-metric strong {
  display: block;
  font-size: 2.7rem;
  line-height: 1;
}

.preview-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.preview-summary span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 750;
  gap: 4px;
  padding: 10px;
}

.preview-summary strong {
  color: var(--ink-strong);
  font-size: 0.98rem;
  line-height: 1.1;
}

.preview-bars {
  align-items: end;
  background: linear-gradient(180deg, #fbfcfe, var(--soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, 1fr);
  height: 148px;
  margin-top: 20px;
  padding: 18px;
}

.preview-bars span {
  background: linear-gradient(180deg, var(--blue), var(--green));
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 10px 18px rgba(15, 143, 114, 0.16);
}

.preview-callout {
  background: linear-gradient(135deg, var(--gold-soft), #ffffff);
  border: 1px solid #efd393;
  border-radius: var(--radius);
  margin-top: 18px;
  padding: 14px;
}

.preview-callout span {
  color: #7c4a03;
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-callout strong {
  color: var(--ink-strong);
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  margin-top: 4px;
}

.preview-lines {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.preview-lines span {
  background: var(--soft-strong);
  border-radius: 999px;
  height: 12px;
}

.preview-lines span:nth-child(1) {
  width: 78%;
}

.preview-lines span:nth-child(2) {
  width: 92%;
}

.preview-lines span:nth-child(3) {
  width: 58%;
}

.section-block {
  background: var(--surface);
  padding: 76px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--soft), #ffffff);
}

.section-heading {
  margin-bottom: 30px;
  max-width: 680px;
}

.section-heading h2,
.content-band h2 {
  color: var(--ink-strong);
  font-size: 2.1rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.tool-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.featured-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-card {
  align-items: start;
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 26px;
}

.featured-card .tool-icon {
  height: 52px;
  width: 52px;
}

.featured-card .tool-icon-home::before {
  left: 12px;
  top: 12px;
}

.featured-card .tool-icon-home::after {
  left: 17px;
  top: 25px;
}

.featured-card .tool-icon-debt::before {
  left: 13px;
  top: 11px;
}

.featured-card .tool-icon-debt::after {
  left: 13px;
  top: 29px;
}

.featured-card .tool-meta {
  display: inline-flex;
  margin: 0 0 12px;
}

.featured-card h3 {
  color: var(--ink-strong);
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0;
}

.featured-card p {
  color: var(--muted);
  margin: 12px 0 20px;
}

.tool-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  min-height: 276px;
  padding: 24px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  border-color: #a9bbcc;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.11);
  transform: translateY(-2px);
}

.tool-card-top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tool-meta {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 5px 9px;
}

.tool-card h2,
.tool-card h3 {
  color: var(--ink-strong);
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 18px 0 10px;
}

.tool-card p {
  color: var(--muted);
  margin: 0 0 22px;
}

.tool-card ul {
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin: -8px 0 22px;
  padding-left: 18px;
}

.tool-card li::marker {
  color: var(--green);
}

.tool-icon {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  height: 44px;
  position: relative;
  width: 44px;
}

.tool-icon::before,
.tool-icon::after {
  content: "";
  position: absolute;
}

.tool-icon-home {
  background: var(--blue-soft);
}

.tool-icon-home::before {
  border-color: transparent transparent var(--blue) transparent;
  border-style: solid;
  border-width: 0 14px 13px;
  left: 8px;
  top: 9px;
}

.tool-icon-home::after {
  background: var(--blue);
  border-radius: 2px;
  height: 15px;
  left: 13px;
  top: 22px;
  width: 18px;
}

.tool-icon-loan {
  background: var(--green-soft);
}

.tool-icon-loan::before {
  border: 3px solid var(--green);
  border-radius: 4px;
  height: 22px;
  left: 9px;
  top: 10px;
  width: 26px;
}

.tool-icon-loan::after {
  background: var(--green);
  border-radius: 999px;
  height: 6px;
  left: 18px;
  top: 18px;
  width: 8px;
}

.tool-icon-debt {
  background: var(--gold-soft);
}

.tool-icon-debt::before {
  background: var(--gold);
  border-radius: 999px;
  height: 4px;
  left: 10px;
  top: 14px;
  transform: rotate(-18deg);
  width: 24px;
}

.tool-icon-debt::after {
  background: var(--gold);
  border-radius: 999px;
  height: 4px;
  left: 10px;
  top: 25px;
  transform: rotate(18deg);
  width: 24px;
}

.tool-icon-interest {
  background: #eef4ff;
}

.tool-icon-interest::before {
  border: 3px solid var(--blue);
  border-radius: 50%;
  height: 21px;
  left: 10px;
  top: 10px;
  width: 21px;
}

.tool-icon-interest::after {
  background: var(--green);
  border-radius: 999px;
  height: 18px;
  left: 29px;
  top: 21px;
  transform: rotate(-45deg);
  width: 4px;
}

.text-link {
  color: var(--blue);
  display: inline-flex;
  font-weight: 850;
}

.text-link:hover {
  color: var(--green-dark);
}

.content-band {
  background: linear-gradient(180deg, var(--soft), #ffffff);
  border-top: 1px solid var(--line);
  padding: 78px 0;
}

.content-narrow {
  max-width: 820px;
}

.content-band p,
.policy-content p {
  color: var(--muted);
  margin: 16px 0 0;
}

.quick-start {
  align-items: center;
  background: linear-gradient(135deg, var(--soft), #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  margin-top: 32px;
  padding: 24px;
}

.quick-start h2,
.choice-grid h2 {
  color: var(--ink-strong);
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0;
}

.quick-start p,
.choice-grid p {
  color: var(--muted);
  margin: 12px 0 0;
}

.quick-start-links,
.choice-list,
.feature-list,
.principle-grid {
  display: grid;
  gap: 12px;
}

.quick-start-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-start-links a,
.choice-list a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-strong);
  font-weight: 850;
  padding: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.quick-start-links a:hover,
.choice-list a:hover {
  border-color: #9fb1c3;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.feature-list,
.principle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.feature-list div,
.principle-grid div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.feature-list h3,
.principle-grid h3 {
  color: var(--ink-strong);
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

.feature-list p,
.principle-grid p {
  margin-top: 10px;
}

.choice-grid {
  align-items: start;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
}

.choice-list a {
  display: grid;
  gap: 4px;
}

.choice-list span {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.choice-list strong {
  color: var(--ink-strong);
  font-size: 1rem;
}

.tips-section {
  background: var(--surface);
}

.home-trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.trust-statement {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
}

.trust-statement h2 {
  color: var(--ink-strong);
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0;
}

.trust-statement p {
  color: var(--muted);
  margin: 0;
}

.tips-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.latest-guides {
  border-top: 1px solid var(--line);
}

.latest-guides-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tip-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.tip-card span {
  color: var(--green-dark);
  display: block;
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 12px;
}

.tip-card h3 {
  color: var(--ink-strong);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0;
}

.tip-card h3 a:hover {
  color: var(--blue);
}

.tip-card p {
  color: var(--muted);
  margin: 12px 0 0;
}

.tip-card .text-link {
  margin-top: 18px;
}

.contact-card {
  background: linear-gradient(135deg, var(--blue-soft), var(--green-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 24px;
}

.contact-card h2 {
  color: var(--ink-strong);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0;
}

.page-hero {
  background: linear-gradient(135deg, rgba(232, 240, 255, 0.95) 0%, #ffffff 58%, rgba(232, 247, 242, 0.9) 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 48px;
}

.calculator-section {
  background: var(--surface);
  padding: 28px 0 74px;
}

.calculator-wrap {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  max-width: 1120px;
}

.calculator-guide,
.calculator-card,
.result-note {
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.calculator-guide {
  grid-column: 1 / -1;
  padding: 22px 24px;
}

.calculator-guide h2,
.result-note h2 {
  color: var(--ink-strong);
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0;
}

.calculator-guide p:last-child,
.result-note p {
  color: var(--muted);
  margin: 10px 0 0;
}

.result-note-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.result-note-list li {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(197, 210, 223, 0.78);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  line-height: 1.45;
  padding: 11px 12px;
}

.result-note-list strong {
  color: var(--ink-strong);
}

.result-note-warning {
  border-top: 1px solid rgba(197, 210, 223, 0.9);
  font-size: 0.9rem;
  padding-top: 12px;
}

.calculator-card {
  box-shadow: var(--shadow);
  padding: 28px;
}

.scenario-panel {
  background: linear-gradient(135deg, var(--blue-soft), var(--green-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
}

.scenario-panel h2 {
  color: var(--ink-strong);
  font-size: 1.08rem;
  line-height: 1.25;
  margin: 0;
}

.scenario-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reference-actions {
  border-bottom: 1px solid rgba(197, 210, 223, 0.9);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 16px;
}

.reference-button {
  background: linear-gradient(135deg, var(--ink-strong), #143d55 62%, var(--green-dark));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(7, 20, 38, 0.18);
  color: var(--surface);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 16px;
  text-align: left;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.reference-button:hover {
  box-shadow: 0 18px 34px rgba(7, 20, 38, 0.24);
  transform: translateY(-1px);
}

.reference-button span {
  color: #c9d7e5;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reference-button strong {
  color: var(--surface);
  font-size: 1rem;
  line-height: 1.25;
}

.chip-button,
.toggle-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.chip-button:hover,
.toggle-control:hover {
  border-color: #9fb1c3;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.09);
  transform: translateY(-1px);
}

.chip-button.is-selected,
.chip-button.is-applied,
.toggle-control.is-selected {
  background: linear-gradient(135deg, var(--ink-strong), var(--green-dark));
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(15, 143, 114, 0.2);
  color: var(--surface);
}

.chip-button.is-selected::before,
.chip-button.is-applied::before,
.toggle-control.is-selected::before {
  background: var(--surface);
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.toggle-control input {
  min-height: auto;
  width: auto;
}

.scenario-status {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 850;
  margin: 0;
  padding: 10px 12px;
}

.rate-source {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 4px 0 0;
}

.rate-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-option {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-strong);
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 12px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.rate-option:hover {
  border-color: #9fb1c3;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.rate-option span,
.rate-option small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.rate-option strong {
  color: var(--ink-strong);
  font-size: 1.3rem;
  line-height: 1.1;
}

.rate-source a {
  color: var(--blue);
  font-weight: 850;
}

.tool-modal-overlay {
  align-items: center;
  background: rgba(7, 20, 38, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 80;
}

.tool-modal-overlay[hidden] {
  display: none;
}

.tool-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(7, 20, 38, 0.32);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  width: min(720px, 100%);
}

.tool-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px 22px;
}

.tool-modal-header h2 {
  color: var(--ink-strong);
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0;
}

.modal-close {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-strong);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.tool-modal-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.modal-copy,
.modal-note {
  color: var(--muted);
  margin: 0;
}

.modal-note {
  background: var(--gold-soft);
  border: 1px solid #e3ba6f;
  border-radius: var(--radius);
  color: #7c4a03;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 12px;
}

.modal-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.modal-table {
  border-collapse: collapse;
  min-width: 640px;
  width: 100%;
}

.modal-table th,
.modal-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.modal-table th {
  background: var(--soft);
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.modal-table td {
  color: var(--muted);
}

.modal-table td:first-child {
  color: var(--ink-strong);
  font-weight: 850;
}

.modal-table tr:last-child td {
  border-bottom: 0;
}

.result-stack {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: -2px;
}

input,
select {
  background: var(--surface);
  border: 1px solid #bdcada;
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 50px;
  padding: 11px 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
}

input:hover,
select:hover {
  border-color: #9fb1c3;
}

input:focus,
select:focus,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.22);
  outline-offset: 2px;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.span-2 {
  grid-column: span 2;
}

.result-panel {
  box-shadow: 0 18px 36px rgba(7, 20, 38, 0.18);
  min-height: 236px;
  padding: 30px;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.result-panel.is-updated {
  box-shadow: 0 0 0 4px rgba(15, 143, 114, 0.2), 0 18px 36px rgba(7, 20, 38, 0.18);
  transform: translateY(-1px);
}

.result-note {
  border-left: 4px solid var(--green);
  padding: 20px;
}

.result-label {
  color: #c9d7e5;
  font-weight: 850;
  margin: 0 0 8px;
}

.result-panel > strong {
  display: block;
  font-size: 2.5rem;
  letter-spacing: 0;
  line-height: 1.08;
}

.result-details {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
}

.result-row {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.result-row span:first-child {
  color: #c9d7e5;
}

.result-row span:last-child {
  font-weight: 850;
  text-align: right;
}

.result-visual {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 20px;
  padding-top: 18px;
}

.result-visual-title {
  color: #dbe7f2;
  font-size: 0.9rem;
  font-weight: 850;
  margin: 0 0 12px;
}

.result-bar {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  display: flex;
  height: 14px;
  overflow: hidden;
}

.result-bar span {
  animation: grow-bar 640ms ease both;
  min-width: 3px;
  transform-origin: left center;
}

.segment-principal {
  background: #8ec5ff;
}

.segment-interest {
  background: #f8c86b;
}

.segment-tax {
  background: #a7f3d0;
}

.segment-insurance {
  background: #c4b5fd;
}

.segment-hoa {
  background: #f0abfc;
}

.segment-contribution {
  background: #6ee7b7;
}

.segment-expense {
  background: #fca5a5;
}

.segment-savings {
  background: #86efac;
}

.segment-loss {
  background: #fb7185;
}

.result-legend {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.result-legend div {
  align-items: center;
  color: #d8e4ef;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.result-legend strong {
  color: var(--surface);
  font-size: 0.92rem;
  text-align: right;
}

.legend-dot {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.result-insight {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #f5fbff;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 18px;
  padding: 14px;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  border-collapse: collapse;
  color: #d8e4ef;
  min-width: 100%;
  width: 100%;
}

.result-table th,
.result-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 9px 8px;
  text-align: left;
  white-space: nowrap;
}

.result-table th {
  color: #f3f8fc;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.result-table td:first-child {
  color: var(--surface);
  font-weight: 850;
}

.result-table tr:last-child td {
  border-bottom: 0;
}

@keyframes grow-bar {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.result-error {
  background: var(--gold-soft);
  border: 1px solid #f1cf92;
  border-radius: var(--radius);
  color: #7c4a03;
  font-weight: 750;
  padding: 16px;
}

.guide-stack {
  padding-bottom: 88px;
}

.guide-container {
  display: grid;
  gap: 18px;
  max-width: 920px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.guide-card h2 {
  color: var(--ink-strong);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0;
}

.guide-card p {
  color: var(--muted);
  margin: 12px 0 0;
}

.guide-card strong {
  color: var(--ink-strong);
}

.sticky-actions {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 10px;
  padding: 10px;
  width: 100%;
  z-index: 30;
}

.sticky-actions .button {
  flex: 1;
  min-height: 44px;
  padding-inline: 12px;
  white-space: nowrap;
}

.related-tools {
  padding-top: 64px;
}

.related-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-grid a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--blue);
  font-weight: 850;
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.related-grid a:hover {
  border-color: #a9bbcc;
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.09);
  transform: translateY(-1px);
}

.policy-content {
  max-width: 820px;
}

.policy-content h2 {
  color: var(--ink-strong);
  font-size: 1.35rem;
  margin: 28px 0 0;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content a {
  color: var(--blue);
  font-weight: 850;
}

.blog-index {
  min-height: 420px;
}

.blog-list {
  display: grid;
  gap: 18px;
}

.blog-card {
  align-items: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 28px;
}

.blog-card h2 {
  color: var(--ink-strong);
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0;
}

.blog-card h2 a:hover {
  color: var(--blue);
}

.blog-card p {
  color: var(--muted);
  margin: 14px 0 0;
}

.blog-card .button-primary,
.article-cta .button-primary {
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
  border-color: rgba(15, 143, 114, 0.42);
  box-shadow: 0 16px 30px rgba(15, 143, 114, 0.24), 0 8px 18px rgba(29, 78, 216, 0.16);
  justify-self: end;
  min-height: 54px;
  min-width: 168px;
  padding-inline: 22px;
}

.blog-card .button-primary::after,
.article-cta .button-primary::after {
  content: ">";
  font-size: 1rem;
  margin-left: 10px;
}

.blog-card .button-primary:hover,
.article-cta .button-primary:hover {
  background: linear-gradient(135deg, var(--green-dark), var(--blue-dark));
  box-shadow: 0 20px 36px rgba(15, 143, 114, 0.28), 0 10px 22px rgba(29, 78, 216, 0.18);
  transform: translateY(-2px);
}

.article-hero {
  padding-bottom: 54px;
}

.article-hero-grid {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
}

.article-hero-grid h1 {
  color: var(--ink-strong);
  font-size: 3rem;
  letter-spacing: 0;
  line-height: 1.06;
  margin: 0;
}

.article-hero-grid p {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 18px 0 0;
}

.article-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 10px;
  margin-top: 18px;
}

.article-meta span {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

.article-visual {
  background: linear-gradient(135deg, var(--ink-strong), #123a4f 62%, var(--green-dark));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 22px;
}

.article-visual div {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 14px;
}

.article-visual span {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--blue-dark);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.article-visual strong {
  color: var(--surface);
  line-height: 1.25;
}

.article-visual small {
  color: #c9d7e5;
  grid-column: 2;
  line-height: 1.35;
}

.article-section {
  padding-top: 58px;
}

.article-layout {
  align-items: start;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 780px) minmax(240px, 1fr);
}

.article-content {
  color: var(--muted);
  font-size: 1.02rem;
}

.article-content p,
.article-content li {
  color: var(--muted);
}

.article-content p {
  margin: 18px 0 0;
}

.article-content h2 {
  color: var(--ink-strong);
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 42px 0 0;
}

.article-content h3 {
  color: var(--ink-strong);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
}

.article-content ul,
.article-content ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.article-content li::marker {
  color: var(--green);
  font-weight: 850;
}

.article-content a {
  color: var(--blue);
  font-weight: 850;
}

.article-content a:hover {
  color: var(--green-dark);
}

.article-lede {
  color: var(--ink);
  font-size: 1.17rem;
  line-height: 1.7;
  margin-top: 0;
}

.article-callout {
  background: linear-gradient(135deg, var(--gold-soft), #ffffff);
  border: 1px solid #efd393;
  border-radius: var(--radius);
  margin-top: 24px;
  padding: 20px;
}

.article-callout p {
  margin-top: 10px;
}

.article-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 20px;
  overflow-x: auto;
}

.article-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.article-table th,
.article-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: var(--soft);
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.article-table td {
  color: var(--muted);
}

.article-table td:first-child {
  color: var(--ink-strong);
  font-weight: 850;
}

.article-table tr:last-child td {
  border-bottom: 0;
}

.article-content .source-list {
  list-style: none;
  padding-left: 0;
}

.article-content .source-list li {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.article-cta {
  align-items: center;
  background: linear-gradient(135deg, var(--ink-strong), #123a4f 58%, var(--green-dark));
  border: 1px solid rgba(110, 231, 183, 0.36);
  border-radius: var(--radius);
  box-shadow: 0 24px 52px rgba(7, 20, 38, 0.2);
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 52px 0 4px;
  padding: 30px;
}

.article-cta .eyebrow {
  color: #a7f3d0;
}

.article-cta h2 {
  color: var(--surface);
  font-size: 1.55rem;
  margin-top: 0;
}

.article-content .article-cta p:not(.eyebrow) {
  color: #d8e4ef;
}

.article-cta .button-primary {
  background: linear-gradient(135deg, #ffffff, #e8f7f2);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24), 0 0 0 4px rgba(255, 255, 255, 0.08);
  color: var(--ink-strong);
  font-size: 1rem;
  min-height: 60px;
  min-width: 220px;
  padding-inline: 26px;
}

.article-cta .button-primary::after {
  color: var(--green-dark);
  font-weight: 850;
}

.article-cta .button-primary:hover {
  background: var(--surface);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28), 0 0 0 4px rgba(167, 243, 208, 0.18);
  color: var(--ink-strong);
}

.article-related {
  background: linear-gradient(180deg, var(--surface), var(--surface-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-top: 28px;
  padding: 24px;
}

.article-related h2 {
  font-size: 1.35rem;
  margin-top: 0;
}

.article-related-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.article-related-grid a {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-strong);
  font-weight: 850;
  line-height: 1.35;
  padding: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.article-related-grid a:hover {
  border-color: #9fb1c3;
  box-shadow: var(--shadow-soft);
  color: var(--blue);
  transform: translateY(-1px);
}

.article-sidebar {
  position: sticky;
  top: 96px;
}

.article-sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  padding: 20px;
}

.article-sidebar-box a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.article-sidebar-box a:hover {
  color: var(--blue);
}

.site-footer {
  background: var(--ink-strong);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--surface);
  padding: 36px 0;
}

.footer-grid {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.footer-brand {
  color: var(--surface);
  margin-bottom: 10px;
}

.site-footer p {
  color: #aebdcc;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.footer-links a {
  color: #c7d2df;
  font-weight: 750;
}

.footer-links a:hover {
  color: var(--surface);
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .tool-preview {
    max-width: 560px;
  }

  .tool-grid,
  .tips-grid,
  .latest-guides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .calculator-wrap {
    grid-template-columns: 1fr;
    max-width: 820px;
  }

  .quick-start,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .trust-statement {
    grid-template-columns: 1fr;
  }

  .feature-list,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .article-hero-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  body[data-calculator] {
    padding-bottom: 92px;
  }

  .container {
    width: min(100% - 28px, 1120px);
  }

  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .brand {
    font-size: 0.98rem;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    font-size: 0.86rem;
    min-width: 0;
    padding-inline: 6px;
    text-align: center;
  }

  .hero-section,
  .page-hero {
    padding-top: 46px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .article-hero-grid h1 {
    font-size: 2.25rem;
  }

  .section-heading h2,
  .content-band h2 {
    font-size: 1.75rem;
  }

  .tool-grid,
  .featured-grid,
  .tips-grid,
  .latest-guides-grid,
  .article-related-grid,
  .field-grid,
  .related-grid,
  .quick-start-links,
  .reference-actions,
  .rate-options {
    grid-template-columns: 1fr;
  }

  .hero-proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-start,
  .featured-card,
  .tip-card,
  .contact-card,
  .blog-card,
  .article-cta {
    padding: 18px;
  }

  .blog-card,
  .article-cta {
    grid-template-columns: 1fr;
  }

  .blog-card .button-primary,
  .article-cta .button-primary {
    justify-self: stretch;
    width: 100%;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .scenario-actions {
    display: grid;
  }

  .sticky-actions {
    background: rgba(255, 255, 255, 0.94);
    bottom: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.18);
    left: 0;
    position: fixed;
    width: 100%;
  }

  .span-2 {
    grid-column: auto;
  }

  .tool-preview {
    min-height: 350px;
    padding: 18px;
  }

  .preview-metric strong,
  .result-panel > strong {
    font-size: 2.05rem;
  }

  .calculator-guide,
  .calculator-card,
  .result-note {
    padding: 20px;
  }

  .result-panel {
    min-height: 0;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .hero-proof-grid,
  .preview-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-links a {
    min-height: 38px;
  }
}
