/* HouseWise — deep green & slate with a warm ochre accent. Fonts self-hosted (SIL OFL). */
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --green: #1f3d33;
  --green-2: #2c5546;
  --slate: #34434b;
  --slate-2: #5b6b73;
  --ochre: #c7843d;
  --ochre-dark: #9a5f22;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #ddd6c8;
  --mist: #e8efe9;
  --ink: #1d2427;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 1.125rem; line-height: 1.65; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--green-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ochre-dark); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--green); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: .3em 0 .4em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.4em 0 .4em; font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
.preview-banner { background: var(--ochre); color: #1d1408; text-align: center; font-size: .95rem; font-weight: 600; padding: .4rem 1rem; }

.site-header { background: var(--green); color: #fff; border-bottom: 4px solid var(--ochre); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.brand-accent { color: #f0c58f; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.nav a { color: #e9f0eb; text-decoration: none; font-weight: 600; font-size: 1rem; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--ochre); }

main { display: block; padding-bottom: 3rem; }
.hero { background: linear-gradient(180deg, var(--green) 0%, var(--green-2) 100%); color: #f4efe4; padding: 3rem 0 3.2rem; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero .lead { color: #e3ebe6; max-width: 62ch; }
.hero .button { margin-top: .6rem; }
.hero-points { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: 1rem; color: #d7e3dc; }
.hero-points li::before { content: "✓ "; color: #f0c58f; font-weight: 700; }
.lead { font-size: 1.2rem; }
.button { display: inline-block; background: var(--ochre); color: #1d1408; font-weight: 700; text-decoration: none; padding: .7rem 1.2rem; border-radius: 6px; border: 0; cursor: pointer; font-size: 1.05rem; font-family: var(--sans); }
.button:hover { background: #d9964f; color: #1d1408; }
.button.secondary { background: transparent; color: var(--green); border: 2px solid var(--green); }

.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem 1.5rem; border-top: 5px solid var(--green); }
.panel.warm { border-top-color: var(--ochre); }
.panel h2 { margin-top: 0; }
.panel .when { display: block; font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--slate-2); margin-top: .2rem; }
.plain-list { list-style: none; padding: 0; margin: .5rem 0; }
.plain-list li { padding: .45rem 0; border-bottom: 1px solid #eee8dc; }
.plain-list li:last-child { border-bottom: 0; }
.muted, .muted a { color: var(--slate-2); }
.how { background: var(--mist); border-radius: 10px; padding: 1.4rem 1.6rem; margin-top: 2rem; }
.how h2 { margin-top: 0; }
.ticks { padding-left: 1.2rem; }
.ticks li { margin: .35rem 0; }

.breadcrumb ol { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .95rem; color: var(--slate-2); }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; color: var(--slate-2); }
.meta { color: var(--slate-2); font-size: .95rem; }
.disclosure { background: #fbf3e6; border-left: 4px solid var(--ochre); padding: .8rem 1rem; margin: 1rem 0 1.5rem; font-size: 1rem; border-radius: 0 6px 6px 0; }
.disclosure p { margin: 0; }
.prose p, .prose li { max-width: 70ch; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border: 1px solid var(--line); vertical-align: top; background: var(--card); }
.prose thead th { background: var(--green); color: #fff; font-weight: 600; }
.prose tbody tr:nth-child(even) td { background: #faf8f3; }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1rem; background: var(--mist); border-left: 4px solid var(--green-2); border-radius: 0 6px 6px 0; }
.prose blockquote p { margin: .3rem 0; }
.prose code { background: #efe9dc; padding: 0 .25rem; border-radius: 3px; font-size: .95em; }
.sources { font-size: .98rem; }
.tool-link { background: var(--mist); border: 1px solid #c9d8cd; padding: .8rem 1rem; border-radius: 8px; font-weight: 600; }
.related { margin-top: 2.5rem; }
.card-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .7rem 1rem; }
.card-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.card-grid .card { padding: 1rem 1.2rem; border-left: 4px solid var(--green-2); }
.card-title { font-size: 1.2rem; margin: .2rem 0 .4rem; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.kicker { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ochre-dark); margin: 0; }

.site-footer { background: var(--slate); color: #dfe6e9; padding: 2rem 0 2.4rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0; }
.small { font-size: .92rem; }
.footer-note { max-width: 80ch; }

/* Grant estimator */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.4rem; margin: 1rem 0 2rem; }
.calc fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem 1rem; margin: 0 0 1rem; }
.calc legend { font-weight: 700; color: var(--green); padding: 0 .3rem; }
.calc label { display: block; margin: .35rem 0; }
.calc select, .calc input[type="number"] { font: inherit; padding: .4rem .5rem; border: 1px solid #b9b2a3; border-radius: 6px; background: #fff; max-width: 100%; }
.calc .hint { font-size: .95rem; color: var(--slate-2); margin: .2rem 0 .4rem; }
.result { background: var(--green); color: #fff; border-radius: 10px; padding: 1.1rem 1.3rem; }
.result h2 { color: #fff; margin: 0 0 .4rem; font-size: 1.4rem; }
.result .total { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: #f0c58f; margin: .2rem 0 .6rem; }
.result table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.result td { padding: .3rem 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.result td:last-child { text-align: right; white-space: nowrap; }
.result .note { font-size: .95rem; color: #d7e3dc; }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .nav { gap: .2rem .9rem; }
  .nav a { font-size: .95rem; }
  .hero { padding: 2rem 0 2.2rem; }
}
@media print { .site-header, .site-footer, .preview-banner, .related { display: none; } }
.aff-box{border:1px solid #d6dde3;border-radius:8px;padding:.9rem 1.1rem;margin:1.5rem 0;background:#f7f9fb}
.aff-box .aff-title{font-weight:600;margin:0 0 .4rem}.aff-box .aff-label{font-weight:400;font-size:.85em;color:#555}
.aff-box ul{margin:0;padding-left:1.2rem}.aff-box li{margin:.25rem 0}
.aff-notice{font-size:.9rem;background:#fff8e6;border-left:3px solid #e0a800;padding:.5rem .8rem;margin:1rem 0}
