/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: var(--radius-sm);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-strong); color: var(--white); }
.btn-primary:hover { background: #166534; }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }

/* ===== Header / navigation ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo-text { display: inline-flex; color: var(--navy); }
.logo-text span { color: var(--green-strong); }

.nav-list { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--navy); font-weight: 500; text-decoration: none; font-size: 0.97rem;
}
.nav-list a:hover { background: var(--offwhite); }
.nav-list a[aria-current="page"] { color: var(--green-strong); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--navy); border-radius: var(--radius-sm); cursor: pointer;
}
.icon-btn:hover { background: var(--offwhite); }
.menu-toggle { display: none; }

/* ===== Search panel ===== */
.search-panel { border-top: 1px solid var(--border); background: var(--offwhite); padding: 0.9rem 0; }
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: 0.6rem; }
.search-form input {
  flex: 1; min-width: 0; padding: 0.8rem 1rem; font: inherit; color: var(--navy);
  border: 1px solid #CBD5E1; border-radius: var(--radius-sm); background: var(--white);
}

/* ===== Hero ===== */
.hero { background: var(--offwhite); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-eyebrow {
  display: inline-block; background: var(--green-light); color: #14532D;
  font-weight: 600; font-size: 0.85rem; padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero p.lead { font-size: 1.15rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0 1rem; }
.hero-note { font-size: 0.95rem; color: var(--muted); margin: 0; }
.hero-art { max-width: 520px; margin-inline: auto; width: 100%; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* ===== Mobile navigation ===== */
@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 0.85rem 0.75rem; font-size: 1.05rem; }
}

/* ===== Sections ===== */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--offwhite); }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); margin: 0; }
.section-cta { margin: 2rem 0 0; text-align: center; }

.grid { display: grid; gap: 1.25rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

/* ===== Category cards ===== */
.cat-card {
  display: block; padding: 1.5rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--gray);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cat-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card h3 { margin: 1rem 0 0.4rem; }
.cat-card p { margin: 0 0 1rem; }
.cat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--green-light); color: #14532D;
}
.cat-link { color: var(--green-strong); font-weight: 600; }

/* ===== Article cards (homepage, category pages) ===== */
.article-card {
  position: relative;
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.article-thumb {
  display: flex; align-items: center; justify-content: center;
  height: 150px; background: var(--green-light); color: #14532D;
}
.article-thumb.is-navy { background: var(--navy); color: #86EFAC; }
.article-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.article-cat {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--green-strong); margin-bottom: 0.4rem;
}
.article-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.article-card h3 a { color: var(--navy); text-decoration: none; }
.article-card h3 a::after { content: ""; position: absolute; inset: 0; }
.article-card p { font-size: 0.95rem; flex: 1; }
.article-meta { display: flex; gap: 0.75rem; font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ===== Tools and tips ===== */
.tool-card, .tip-card {
  display: block; padding: 1.5rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--gray);
}
a.tool-card { transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
a.tool-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card.is-soon { background: var(--offwhite); }
.tool-card p { margin: 0 0 1rem; }
.tip-card p { margin: 0; }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.25rem 0.65rem; border-radius: 999px;
  background: #E2E8F0; color: var(--navy); margin-bottom: 0.75rem;
}
.badge-green { background: var(--green-light); color: #14532D; }
.tip-feature {
  background: var(--green-light); border: 1px solid #BBF7D0;
  border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.25rem;
}
.tip-quote { font-size: 1.25rem; font-weight: 600; color: var(--navy); margin: 0; max-width: 40em; }

/* ===== Newsletter ===== */
.newsletter { background: var(--navy); color: #E2E8F0; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.newsletter h2 { color: var(--white); }
.newsletter-inner { display: grid; gap: 2rem; align-items: center; }
.newsletter label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--white); }
.newsletter input[type="email"] {
  width: 100%; padding: 0.85rem 1rem; font: inherit; color: var(--navy);
  border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--white);
}
.newsletter a { color: #86EFAC; }
.nl-consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.9rem 0 1rem; font-size: 0.9rem; }
.nl-consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.nl-consent label { font-weight: 400; margin: 0; color: #E2E8F0; }
.nl-status { margin: 0.9rem 0 0; font-weight: 600; min-height: 1.5em; }
.nl-status.is-error { color: #FECACA; }
.nl-status.is-ok { color: #86EFAC; }
@media (min-width: 900px) { .newsletter-inner { grid-template-columns: 1fr 1fr; } }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: #CBD5E1; padding: 3rem 0 0; border-top: 1px solid #1E3A5F; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-brand { color: var(--white); font-weight: 800; font-size: 1.3rem; margin: 0 0 0.25rem; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #CBD5E1; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid #1E3A5F; margin-top: 2rem; padding: 1.25rem 0; font-size: 0.9rem; }
.footer-bottom p { margin: 0; }

/* ===== Article pages ===== */
.article-layout { width: min(100% - 2rem, 760px); margin: 0 auto; padding: 2rem 0 4rem; }
.article h1 { margin-bottom: 0.75rem; }
.article-intro { font-size: 1.2rem; color: var(--gray); }
.article > .article-meta { margin-bottom: 1.5rem; }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.25rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; }

.article-hero {
  display: flex; align-items: center; justify-content: center; height: 180px;
  background: var(--green-light); color: #14532D; border-radius: var(--radius); margin-bottom: 1.5rem;
}

.toc { background: var(--offwhite); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.toc-title { font-weight: 700; color: var(--navy); margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }

.article-content h2 { margin-top: 2.25rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.article-content ul, .article-content ol { padding-left: 1.4rem; margin: 0 0 1em; }
.article-content li { margin-bottom: 0.4rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
.article-content table { border-collapse: collapse; width: 100%; min-width: 320px; }
.article-content caption { text-align: left; font-weight: 600; color: var(--navy); padding-bottom: 0.5rem; }
.article-content th, .article-content td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; }
.article-content thead th { background: var(--offwhite); }
.article-content td { text-align: right; }
.article-content thead th:last-child { text-align: right; }
.article-content tr.total th, .article-content tr.total td { background: var(--green-light); font-weight: 700; color: #14532D; }

.note { background: var(--green-light); border-radius: var(--radius-sm); padding: 1rem 1.25rem; }

.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.8rem 1rem; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.faq details p { margin: 0.6rem 0 0; }

.disclaimer-note { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 2.5rem; }

.related { margin-top: 3rem; }
.related-card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
}
.related-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.related-title { font-weight: 700; color: var(--navy); }

/* ===== Ads: hidden until approved; then add class "ads-on" to <body> ===== */
.ad-slot { display: none; margin: 2rem 0; text-align: center; }
body.ads-on .ad-slot { display: block; }
.ad-label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.article-sidebar { display: none; }
@media (min-width: 1100px) {
  body.ads-on .article-layout { width: min(100% - 2rem, 1100px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; }
  body.ads-on .article-sidebar { display: block; }
  body.ads-on .article-sidebar .ad-slot { position: sticky; top: calc(var(--header-h) + 1.5rem); margin-top: 0; }
}
/* ===== Listing pages ===== */
.page-hero { background: var(--offwhite); padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--border); }
.page-hero .lead { font-size: 1.15rem; max-width: 40em; margin-bottom: 0; }
.blog-search { display: flex; gap: 0.6rem; max-width: 34rem; margin-top: 1.5rem; }
.blog-search input {
  flex: 1; min-width: 0; padding: 0.8rem 1rem; font: inherit; color: var(--navy);
  border: 1px solid #CBD5E1; border-radius: var(--radius-sm); background: var(--white);
}
.listing-status { margin: 0.75rem 0 0; min-height: 1.5em; color: var(--muted); font-weight: 600; }
.empty { grid-column: 1 / -1; padding: 2rem; background: var(--offwhite); border: 1px dashed #CBD5E1; border-radius: var(--radius); text-align: center; margin: 0; }
/* ===== Calculators ===== */
.calc-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .calc-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .calc-side { position: sticky; top: calc(var(--header-h) + 1rem); } }

.calc-form, .results, .assumptions { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.calc-form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.calc-form legend { font-weight: 700; color: var(--navy); font-size: 1.1rem; padding: 0; margin-bottom: 0.75rem; }
.calc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.calc-top label { font-weight: 600; color: var(--navy); }
.calc-top select, .field input {
  font: inherit; color: var(--navy); background: var(--white);
  border: 1px solid #94A3B8; border-radius: var(--radius-sm); padding: 0.65rem 0.8rem;
}
.calc-hint { font-size: 0.9rem; color: var(--muted); margin: 0 0 1.25rem; }
.field-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field label { display: block; font-weight: 500; color: var(--navy); margin-bottom: 0.35rem; font-size: 0.95rem; }
.money-input { display: flex; align-items: center; border: 1px solid #94A3B8; border-radius: var(--radius-sm); background: var(--white); }
.money-input:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.money-input .currency-symbol { padding-left: 0.8rem; color: var(--muted); font-weight: 600; }
.money-input input { border: 0; flex: 1; min-width: 0; width: 100%; background: transparent; outline: none; }
.field input[aria-invalid="true"] { color: #B91C1C; }
.field:has(input[aria-invalid="true"]) .money-input { border-color: #B91C1C; }
.field-error { color: #B91C1C; font-size: 0.85rem; margin: 0.3rem 0 0; }
.form-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-weight: 600; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.results { margin-bottom: 1.25rem; }
.results:focus { outline: none; }
.results:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.results h2, .assumptions h2 { font-size: 1.3rem; }
.results h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.results-empty { color: var(--muted); margin: 0; }
.totals { margin: 0; display: grid; gap: 0.5rem; }
.totals > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.totals dt { color: var(--gray); }
.totals dd { margin: 0; font-weight: 700; color: var(--navy); text-align: right; }
.totals small { font-weight: 400; color: var(--muted); }
.totals .remaining { border-bottom: 0; border-radius: var(--radius-sm); padding: 0.85rem 1rem; font-size: 1.1rem; }
.is-positive { background: var(--green-light); }
.is-negative { background: #FEF2F2; }
.is-neutral { background: var(--offwhite); }
.remaining-note { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; margin: 0.75rem 0 0; }
.is-negative.remaining-note { color: #991B1B; }
.breakdown { list-style: none; margin: 0; padding: 0; }
.breakdown li { margin-bottom: 0.9rem; }
.breakdown-row { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; color: var(--navy); }
.bar { height: 10px; background: var(--offwhite); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 0.3rem 0; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.breakdown-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.assumptions ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.assumptions li { margin-bottom: 0.4rem; font-size: 0.95rem; }
.field > select, .field > input {
  width: 100%; font: inherit; color: var(--navy); background: var(--white);
  border: 1px solid #94A3B8; border-radius: var(--radius-sm); padding: 0.65rem 0.8rem;
}
.narrow { max-width: 640px; }
.unsub-status { font-weight: 600; color: var(--navy); margin: 1rem 0 0; min-height: 1.5em; }
.field > textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--white);
  border: 1px solid #94A3B8; border-radius: var(--radius-sm); padding: 0.65rem 0.8rem; resize: vertical;
}
.calc-form .field { margin-bottom: 1.1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { font-weight: 600; min-height: 1.5em; margin: 0 0 1rem; }
.contact-status.is-ok { color: #14532D; }
.contact-status.is-error { color: #B91C1C; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.25rem; font-size: 1.1rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
/* ===== Footer logo ===== */
.footer-logo {
  display: inline-block; background: var(--white);
  border-radius: var(--radius); padding: 0.5rem; margin-bottom: 1.25rem;
}
.footer-logo img { width: 150px; height: auto; border-radius: 8px; }
/* ===== Redesign: trust strip ===== */
.trust { background: var(--white); border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; gap: 1rem; padding: 1.5rem 0; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.trust-grid p { margin: 0; display: flex; flex-direction: column; gap: 0.15rem; padding-left: 1rem; border-left: 3px solid var(--green); }
.trust-grid strong { color: var(--navy); }
.trust-grid span { font-size: 0.95rem; color: var(--muted); }

/* ===== Redesign: tool cards ===== */
.tool-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 0.9rem;
  background: var(--green-light); color: #14532D;
}
.tool-card.is-soon .tool-icon { background: #E2E8F0; color: var(--muted); }
.tool-card { display: flex; flex-direction: column; align-items: flex-start; }
.tool-card h3, .tool-title { margin: 0 0 0.4rem; font-size: 1.2rem; }
.tool-card .cat-link { margin-top: auto; }
.tool-card.is-soon { border-style: dashed; }

/* ===== Redesign: tips ===== */
.tip-card { border-left: 4px solid var(--green); }
.tip-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.tip-feature { border-left: 6px solid var(--green-strong); }

/* ===== Redesign: newsletter ===== */
.newsletter form {
  background: #0F2F57; border: 1px solid #1E3A5F;
  border-radius: var(--radius); padding: 1.5rem;
}
.newsletter input[type="email"]:focus-visible { outline: 3px solid #86EFAC; outline-offset: 2px; }
.newsletter .btn-primary { background: var(--green-strong); }
.newsletter .btn-primary:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
/* ===== Redesign Phase 4: article cards ===== */
.article-thumb { height: auto; aspect-ratio: 16 / 9; }
.article-thumb svg { width: 64px; height: 64px; }
.article-card { height: 100%; }
.article-card h3 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; line-height: 1.3;
}
.article-card .article-body p:first-of-type {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; flex: 1 1 auto; color: var(--gray);
}
.article-card .article-meta { flex: 0 0 auto; margin-top: 0.75rem; }
.article-card h3 a:focus-visible { outline: none; }
.article-card:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; border-color: var(--green); }
.article-card:hover .article-thumb svg { transform: scale(1.06); }
.article-thumb svg { transition: transform 0.25s; }

/* ===== Redesign Phase 4: article page readability ===== */
.article-content { font-size: 1.0625rem; line-height: 1.75; }
.article-content p { margin-bottom: 1.1em; }
.article-content a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-content a:hover { color: #166534; text-decoration-thickness: 2px; }
.article-content h2 { line-height: 1.25; }
.article-content tbody th { color: var(--navy); font-weight: 600; }

.toc a { text-underline-offset: 3px; }
.toc li { margin-bottom: 0.35rem; break-inside: avoid; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 2rem; } }

.faq details[open] { background: var(--offwhite); }
.faq summary { padding: 0.15rem 0; }

.related-card { height: 100%; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.related-card:hover { transform: translateY(-2px); }
.related-card:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.related-title { font-size: 1.05rem; line-height: 1.35; }

/* Reserve space for ads so the page does not jump when they load */
body.ads-on .ad-unit { min-height: 250px; }
/* ===== Redesign Phase 5: calculators ===== */
.calc-form { padding: 1.75rem; }
.calc-form fieldset { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.calc-form fieldset:first-of-type { border-top: 0; padding-top: 0.25rem; }
.calc-form legend {
  display: flex; align-items: center; gap: 0.6rem; float: left; width: 100%;
}
.calc-form legend::before {
  content: ""; width: 6px; height: 1.2em; border-radius: 3px; background: var(--green);
}
.calc-form legend + * { clear: both; }

.field input::placeholder, .money-input input::placeholder { color: #64748B; opacity: 1; }
.money-input:hover { border-color: var(--navy); }
.calc-top select:hover, .field > select:hover, .field > input:hover { border-color: var(--navy); }
.calc-top select:focus-visible, .field > select:focus-visible, .field > input:focus-visible,
.field > textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.results-empty {
  padding: 1.25rem; border: 1px dashed #CBD5E1; border-radius: var(--radius-sm);
  background: var(--offwhite);
}
.results h2 { margin-bottom: 0.75rem; }

.totals .remaining {
  padding: 1rem 1.1rem; font-size: 1.15rem; border-left: 6px solid transparent;
}
.totals .remaining dd { font-size: 1.5rem; }
.totals .remaining.is-positive { border-left-color: var(--green-strong); }
.totals .remaining.is-negative { border-left-color: #B91C1C; }
.totals .remaining.is-neutral { border-left-color: var(--navy); }
.totals .remaining.is-negative dd { color: #991B1B; }
.remaining-note { line-height: 1.55; }
.remaining-note.is-positive { color: #14532D; }

.bar { height: 12px; }
.breakdown-row { font-size: 0.97rem; }

@media (max-width: 599px) {
  .calc-actions .btn { flex: 1 1 100%; }
  .calc-form, .results, .assumptions { padding: 1.25rem; }
  .totals .remaining dd { font-size: 1.3rem; }
}

@media print {
  .site-header, .site-footer, .skip-link, .calc-form, .assumptions, .page-hero .breadcrumb { display: none !important; }
  .calc-layout { display: block; }
  .results { border: 0; padding: 0; }
  .bar span, .is-positive, .is-negative, .is-neutral {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
