/* Farm.house — site styles
   Palette: Limewash #F2F4EF · Paper #FFFFFF · Roofline #22302B · Field #1E4A37 · Barn #A8352B · Marigold #E3A72F · Denim #3D6A87
   Type: Zilla Slab (wood-type display) + Atkinson Hyperlegible (body) */
:root {
  --limewash: #F2F4EF;
  --paper: #FFFFFF;
  --roofline: #22302B;
  --field: #1E4A37;
  --field-soft: #DCE7DE;
  --barn: #A8352B;
  --marigold: #E3A72F;
  --marigold-soft: #F8E7BF;
  --denim: #3D6A87;
  --muted: #55625C;
  --rule: rgba(34, 48, 43, .18);
  --rule-strong: rgba(34, 48, 43, .55);
  --display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--limewash); color: var(--roofline); font: 400 1.0625rem/1.6 var(--body); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--denim); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--field); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--roofline); }
h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--marigold); color: var(--roofline); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Owner banner (every page) */
.owner-banner { background: var(--roofline); color: var(--limewash); font-size: .9rem; text-align: center; padding: 7px 14px; }
.owner-banner a { color: var(--marigold); font-weight: 700; text-decoration: none; }
.owner-banner a:hover { text-decoration: underline; color: #FFD77A; }

/* Header */
.site-header { background: var(--limewash); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--roofline); font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.02em; }
.brand:hover { color: var(--roofline); }
.brand svg { width: 34px; height: 34px; }
.brand .dot { color: var(--barn); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--roofline); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); font-weight: 700; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--field-soft); color: var(--field); }
.nav .more { position: relative; }
.nav .more > button { font: inherit; font-weight: 700; font-size: .98rem; background: none; border: 0; padding: 8px 10px; color: var(--roofline); cursor: pointer; border-radius: var(--radius); }
.nav .more > button:hover { background: var(--field-soft); }
.nav .more-menu { display: none; position: absolute; right: 0; top: 100%; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); min-width: 210px; padding: 6px; box-shadow: 0 10px 30px rgba(34,48,43,.14); }
.nav .more-menu a { display: block; font-weight: 400; }
.nav .more.open .more-menu { display: block; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--roofline); border-radius: var(--radius); padding: 6px 12px; font: 700 1rem var(--body); color: var(--roofline); }
@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--limewash); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 10px 22px 18px; }
  .nav.open { display: flex; }
  .nav .more-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 12px; background: transparent; }
  .nav .more > button { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--body); padding: 12px 20px; border-radius: var(--radius); border: 2px solid var(--roofline); background: var(--marigold); color: var(--roofline); text-decoration: none; cursor: pointer; }
.btn:hover { background: #F0B845; color: var(--roofline); text-decoration: none; }
.btn.secondary { background: transparent; }
.btn.secondary:hover { background: var(--paper); }
.btn.field { background: var(--field); color: var(--limewash); border-color: var(--field); }
.btn.field:hover { background: #276048; color: #fff; }
.btn.small { padding: 8px 14px; font-size: .92rem; }
.btn[disabled] { opacity: .55; cursor: wait; }
.nav .btn { color: var(--roofline); padding: 9px 16px; margin-left: 6px; }
.nav .btn:hover { background: #F0B845; color: var(--roofline); }

/* Sections */
section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.band-paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-field { background: var(--field); color: var(--limewash); }
.band-field h2, .band-field h3 { color: #fff; }
.band-field a { color: var(--marigold); }
.lede { font-size: 1.22rem; color: var(--muted); max-width: 60ch; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .35em; }
.prose table { margin: 1.2em 0; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--marigold); background: var(--paper); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
[data-hb-sqft] { display: block; }
.grid-2 > .panel, .grid-2 > .tool { align-self: start; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } section { padding: 46px 0; } }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: .95rem; color: var(--muted); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } .hero h1 { max-width: none; } }

/* Live builder panel */
.builder { background: var(--paper); border: 2px solid var(--roofline); border-radius: 6px; overflow: hidden; }
.builder .canvas { border-bottom: 2px solid var(--roofline); background: #E9EFEF; }
.builder .canvas svg { width: 100%; }
.builder .controls { padding: 16px 18px 6px; display: grid; gap: 14px; }
.builder .row { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 12px; }
.builder label, .builder .lab { font-weight: 700; font-size: .95rem; }
.builder input[type=range] { width: 100%; accent-color: var(--field); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--rule-strong); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: 700 .88rem var(--body); cursor: pointer; color: var(--roofline); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { border-color: var(--roofline); background: var(--roofline); color: var(--limewash); }
.chip .sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); display: inline-block; }
.builder .estimate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 18px; flex-wrap: wrap; }
.builder .estimate .fig { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
.builder .estimate .fig small { display: block; font-family: var(--body); font-weight: 400; font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) { .builder .row { grid-template-columns: 1fr; gap: 6px; } }

/* Quilt (four paths) */
.quilt { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--roofline); border-radius: 6px; overflow: hidden; background: var(--paper); }
.quilt a { display: block; text-decoration: none; color: var(--roofline); padding: 22px 22px 26px; border-right: 2px solid var(--roofline); }
.quilt a:last-child { border-right: 0; }
.quilt a:hover { background: var(--limewash); color: var(--roofline); }
.quilt svg { width: 72px; height: 72px; margin-bottom: 14px; }
.quilt h3 { margin-bottom: .3em; }
.quilt p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) { .quilt { grid-template-columns: 1fr 1fr; } .quilt a:nth-child(2) { border-right: 0; } .quilt a:nth-child(-n+2) { border-bottom: 2px solid var(--roofline); } }
@media (max-width: 520px) { .quilt { grid-template-columns: 1fr; } .quilt a { border-right: 0; border-bottom: 2px solid var(--roofline); } .quilt a:last-child { border-bottom: 0; } }

/* Lists of things */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.list li { border-bottom: 1px solid var(--rule); padding: 16px 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: baseline; }
.list li h3, .list li h4 { margin: 0; font-size: 1.2rem; }
.list li p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.list li .meta { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.list a { color: var(--roofline); text-decoration: none; }
.list a:hover { color: var(--field); text-decoration: underline; }

.panel { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 24px; }
.panel.flat { border-color: var(--rule); }
.note { background: var(--marigold-soft); border-left: 4px solid var(--marigold); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--field-soft); color: var(--field); }
.tag.barn { background: #F3DCD8; color: var(--barn); }
.tag.denim { background: #DCE6EE; color: var(--denim); }

/* Plans gallery */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 22px; }
.filters label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.filters select, .filters input { min-width: 140px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 22px; }
.plan { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.plan .pic { border-bottom: 1px solid var(--rule); }
.plan .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan h3 { font-size: 1.25rem; margin: 0; }
.plan .specs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; color: var(--muted); }
.plan .specs b { color: var(--roofline); }
.plan .cost { font-weight: 700; }
.plan .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 30px; text-align: center; background: var(--paper); border: 1px dashed var(--rule-strong); border-radius: 6px; }

/* Dialog */
dialog { border: 2px solid var(--roofline); border-radius: 8px; padding: 0; max-width: 760px; width: calc(100% - 28px); background: var(--paper); color: var(--roofline); }
dialog::backdrop { background: rgba(34,48,43,.55); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
dialog .dlg-body { padding: 18px; max-height: 76vh; overflow: auto; }
.x { background: none; border: 2px solid var(--roofline); border-radius: var(--radius); font: 700 1rem var(--body); padding: 4px 10px; cursor: pointer; color: var(--roofline); }

/* Forms */
form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { form .fields { grid-template-columns: 1fr; } }
label.f { display: grid; gap: 5px; font-weight: 700; font-size: .95rem; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea { font: 400 1rem var(--body); color: var(--roofline); background: var(--paper); border: 2px solid rgba(34,48,43,.42); border-radius: var(--radius); padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--field); outline: 3px solid var(--marigold); outline-offset: 0; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--field); }
.form-status { margin-top: 12px; font-weight: 700; }
.form-status.ok { color: var(--field); }
.form-status.err { color: var(--barn); }
.hp { position: absolute; left: -5000px; }
.success-box { background: var(--field-soft); border: 2px solid var(--field); border-radius: 6px; padding: 22px; }

/* Lead wizard */
.wizard { background: var(--paper); border: 2px solid var(--roofline); border-radius: 8px; overflow: hidden; }
.wizard .progress { height: 8px; background: var(--field-soft); }
.wizard .progress span { display: block; height: 100%; width: 33%; background: var(--field); transition: width .3s ease; }
.wizard .steps-label { display: flex; justify-content: space-between; padding: 12px 22px 0; font-size: .9rem; color: var(--muted); }
.wizard .step { padding: 18px 22px 24px; }
.wizard .step[hidden] { display: none; }
.intent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .intent-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .intent-grid { grid-template-columns: 1fr; } }
.intent { text-align: left; border: 2px solid rgba(34,48,43,.35); background: var(--limewash); border-radius: 6px; padding: 14px; cursor: pointer; font: inherit; color: var(--roofline); }
.intent b { display: block; font-family: var(--display); font-size: 1.15rem; }
.intent span { font-size: .9rem; color: var(--muted); }
.intent[aria-pressed="true"] { border-color: var(--field); background: var(--field-soft); box-shadow: inset 0 0 0 1px var(--field); }
.wizard .nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: .92rem; color: var(--muted); }
.trust span::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--field); border-radius: 2px; margin-right: 7px; transform: rotate(45deg); }

/* Tables & tools */
table { border-collapse: collapse; width: 100%; background: var(--paper); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--display); font-size: 1.02rem; background: var(--limewash); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule-strong); border-radius: 6px; }
.tool { background: var(--paper); border: 2px solid var(--roofline); border-radius: 8px; padding: 22px; }
.tool .out { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--rule-strong); }
.bigfig { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.checklist label { display: flex; gap: 12px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; flex: none; margin-top: 3px; accent-color: var(--field); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.video { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px; overflow: hidden; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #1d2522 center / cover no-repeat; cursor: pointer; border: 0; width: 100%; padding: 0; display: block; }
.yt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; background: var(--barn); border-radius: 10px; }
.yt::before { content: ""; position: absolute; left: 50%; top: 50%; margin: -10px 0 0 -6px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; z-index: 1; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt.playing::before, .yt.playing::after { display: none; }
.video .body { padding: 12px 14px 14px; }
.video h3 { font-size: 1.05rem; margin: 0 0 4px; font-family: var(--body); line-height: 1.35; }
.video p { margin: 0; color: var(--muted); font-size: .88rem; }

/* Ads */
.ad-slot { margin: 28px auto; text-align: center; min-height: 0; }
.ad-label { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }

/* Breadcrumbs & article */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.article-head { padding: 40px 0 10px; }
.article-meta { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.article-layout > article { justify-self: start; width: 100%; }
.article-layout aside { position: relative; }
.article-layout aside .sticky { position: sticky; top: 92px; display: grid; gap: 18px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.toc { font-size: .95rem; }
.toc ol { padding-left: 1.2em; margin: 6px 0 0; }

/* Countdown */
.countdown { display: inline-flex; gap: 14px; font-family: var(--display); font-weight: 700; font-size: 1.6rem; }
.countdown span small { display: block; font-family: var(--body); font-weight: 400; font-size: .78rem; color: var(--muted); }

/* Donation */
.amounts { display: flex; flex-wrap: wrap; gap: 10px; }
.amounts .chip { font-size: 1rem; padding: 9px 18px; }

/* Footer */
.site-footer { background: var(--field); color: #E3ECE5; padding: 54px 0 28px; margin-top: 40px; }
.site-footer a { color: #F2F4EF; text-decoration: none; }
.site-footer a:hover { color: var(--marigold); text-decoration: underline; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .95rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.2); margin-top: 36px; padding-top: 18px; font-size: .86rem; color: #C5D3C9; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.site-footer input { background: #F2F4EF; }
.site-footer .btn { width: 100%; margin-top: 8px; }
@media (max-width: 960px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Cookie notice */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--paper); border: 2px solid var(--roofline); border-radius: 8px; padding: 16px 18px; z-index: 60; box-shadow: 0 12px 34px rgba(34,48,43,.25); display: none; }
.cookie.show { display: block; }
.cookie p { margin: 0 0 10px; font-size: .93rem; }
.cookie .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sticky mobile CTA */
.sticky-cta { display: none; }
@media (max-width: 720px) {
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--roofline); padding: 10px 14px; gap: 10px; align-items: center; justify-content: space-between; color: var(--limewash); font-size: .92rem; }
  .sticky-cta .btn { padding: 9px 14px; }
  body.has-sticky { padding-bottom: 64px; }
}

/* Print */
@media print { .owner-banner, .site-header, .site-footer, .ad-slot, .cookie, .sticky-cta, .btn { display: none !important; } body { background: #fff; } }
