/* Fair Home Cost — site styles (warm light theme) */
:root {
  --paper: #fcf9f3;
  --ink: #251b16;
  --muted: #655e56;
  --terra: #ba4327;
  --terra-dark: #873019;
  --line: #e4d9cc;
  --sand: #f7eddf;
  --peach: #fae9d7;
  --row: #f5f0e8;
  --head: #eee6da;
  --card: #ffffff;
  --green: #287566;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 Arial, Helvetica, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--terra); text-underline-offset: 4px; }
a:hover { color: var(--terra-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

h1, h2, h3, .brand, .serif { font-family: Georgia, "Times New Roman", serif; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.3vw, 64px); line-height: 1.04; letter-spacing: -1.8px; max-width: 1000px; }
h2 { font-size: clamp(27px, 3vw, 36px); line-height: 1.15; letter-spacing: -.8px; margin-top: 56px; }
h3 { font-size: 22px; line-height: 1.25; margin-top: 30px; }
p, ul, ol { margin: 14px 0 0; }
li + li { margin-top: 6px; }
table, .num { font-variant-numeric: tabular-nums; }

.shell { width: min(1192px, calc(100% - 64px)); margin: 0 auto; }
.prose { max-width: 760px; }
.skip { position: absolute; top: -100px; left: 20px; padding: 12px; background: #fff; z-index: 5; }
.skip:focus { top: 10px; }

/* header */
.header { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-size: 27px; font-weight: bold; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand svg { width: 35px; height: 35px; flex: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; }
.nav a { font-size: 15px; text-decoration: none; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--terra); }
.nav a[aria-current="page"] { border-bottom-color: var(--terra); }

main { padding-block: 40px 40px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: var(--terra); text-transform: uppercase; margin-bottom: 12px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; margin-top: 20px; }
.byline a { color: var(--muted); }
.lede { font-size: 19px; color: var(--muted); max-width: 720px; margin-top: 18px; }
.sub { color: var(--muted); margin-top: 10px; }

/* short answer */
.answer { margin-top: 28px; border-radius: 10px; background: linear-gradient(110deg, #f9f0e1, #fbf5ec); padding: 28px 30px; display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.answer:has(> .cta:not([hidden])) { grid-template-columns: 1.35fr 1fr; }
.answer .label { font-size: 11px; font-weight: bold; letter-spacing: 2px; }
.price { font-family: Georgia, serif; font-size: clamp(50px, 6vw, 76px); font-weight: bold; color: var(--terra); line-height: 1.12; letter-spacing: -2.5px; margin: 6px 0 4px; }
.answer p { font-family: Georgia, serif; font-size: 20px; line-height: 1.45; margin-top: 8px; max-width: 760px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 10px; }
.answer > .cta { border-left: 1px solid #e7d4bd; padding-left: 32px; }

/* partner call to action (hidden until a partner is approved) */
.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.primary { border: 0; border-radius: 5px; background: var(--terra); color: #fff; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 15px 22px; min-height: 54px; font: bold 21px Georgia, serif; width: 100%; text-decoration: none; }
.primary:hover { background: var(--terra-dark); color: #fff; }
.cta small { font-size: 12px; color: var(--muted); text-align: center; }
.cta small a { color: var(--muted); }
.cta-box { margin-top: 36px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; padding: 26px 28px; border-radius: 8px; background: var(--peach); }
.cta-box h3 { margin: 0; font-size: 24px; }
.cta-box p { font-size: 15px; color: var(--muted); margin-top: 8px; }

/* contents */
.contents { display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; padding: 22px 0; font-size: 14px; }
.contents strong { font-size: 10px; letter-spacing: 2px; }
.contents a { color: var(--ink); }
.contents a:hover { color: var(--terra); }

.hero { display: block; width: 100%; aspect-ratio: 3.92; object-fit: cover; border-radius: 8px; }

/* problem cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.card { display: grid; grid-template-columns: 106px 1fr; gap: 16px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.card img { width: 106px; height: 100%; min-height: 150px; object-fit: cover; border-radius: 4px; }
.card > div { padding: 6px 4px 6px 0; display: flex; flex-direction: column; }
.card h3 { font-size: 21px; margin: 0; }
.card p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 8px 0; }
.card .range { font-family: Georgia, serif; font-weight: bold; color: var(--terra); font-size: 16px; margin: 0 0 8px; }
.card a { font-size: 14px; font-weight: 600; margin-top: auto; }

/* tables */
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; min-width: 520px; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; background: var(--head); padding: 13px 14px; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(odd) { background: var(--row); }
td.p { white-space: nowrap; font-weight: bold; color: var(--terra); }
td.src { font-size: 13.5px; color: var(--muted); }
.note-small { font-size: 12.5px; color: var(--muted); font-weight: normal; }
caption { caption-side: bottom; text-align: left; font-size: 13px; color: var(--muted); padding-top: 9px; }

/* roof parts: diagram + table */
.roof-layout { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, 1fr); gap: 28px; align-items: start; margin-top: 22px; }
.roof-layout .table-wrap { margin-top: 0; }
.roof-layout table { min-width: 0; }
.prices th:last-child, .prices td:last-child { text-align: right; white-space: nowrap; }
.prices td:first-child { font-weight: 600; }
.prices td:last-child { color: var(--terra); font-weight: bold; }
.unit { display: block; font-size: 11px; font-weight: normal; color: var(--muted); }
.diagram { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.diagram figcaption { padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.roof-svg { display: block; width: 100%; height: auto; }
.roof-svg .d-wall { fill: #f3ebe0; stroke: #9c9087; stroke-width: 1.5; }
.roof-svg .d-line { fill: #fff; stroke: #9c9087; stroke-width: 1.5; }
.roof-svg .d-soffit { fill: #9c9087; opacity: .5; }
.roof-svg .d-roof { fill: #6f6a66; stroke: #4a4440; stroke-width: 2; stroke-linejoin: round; }
.roof-svg .d-course line { stroke: #8b8580; stroke-width: 1.2; }
.roof-svg .d-gable { fill: #7c7672; stroke: #4a4440; stroke-width: 1.5; }
.roof-svg .d-deck { fill: #d8b27a; stroke: #7a5a2c; stroke-width: 1.2; stroke-dasharray: 4 3; }
.roof-svg .d-deck-grain line { stroke: #b18a52; stroke-width: 1; }
.roof-svg .d-ridge { stroke: #e0703f; stroke-width: 7; stroke-linecap: round; }
.roof-svg .d-chim { fill: #b9aea4; stroke: #6b625b; stroke-width: 1.2; }
.roof-svg .d-hot { fill: none; stroke: #e0703f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.roof-svg .d-hotfill { fill: #e0703f; }
.roof-svg .d-fascia { fill: #fff; stroke: #e0703f; stroke-width: 2; }
.roof-svg .d-lead line { stroke: #8a7f77; stroke-width: 1; }
.roof-svg .d-dot circle { fill: var(--ink); }
.roof-svg .d-label text { fill: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; }
.roof-svg .d-label .d-sub { fill: var(--terra); font-size: 13px; }
.notes { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* callouts */
.note { margin-top: 22px; background: var(--peach); padding: 18px 20px; border-radius: 8px; font-size: 16px; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* faq */
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 16px 0; font: bold 20px/1.35 Georgia, serif; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--terra); font: 400 24px Arial, sans-serif; }
details[open] summary::after { content: "\2212"; }
details p { font-size: 16px; color: var(--muted); padding: 0 32px 18px 0; margin: 0; }

.sources { font-size: 15px; color: var(--muted); }
.sources li { word-break: break-word; }
.disclaimer { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* author */
.author { margin-top: 44px; display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.author .avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--sand); color: var(--terra); display: grid; place-items: center; font: bold 22px Georgia, serif; }
.author b { font-family: Georgia, serif; font-size: 18px; }
.author p { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* home */
.home-hero { padding-top: 6px; }
.guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.guide-cards .card.soon { opacity: .7; }
.tag { font-size: 11px; font-weight: bold; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 20px; }
.site-foot .shell { padding-block: 24px 32px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row .brand { font-size: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { color: var(--ink); }
.footnote { font-size: 13px; color: var(--muted); margin-top: 16px; max-width: 760px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 40px); }
  .cards, .guide-cards { gap: 12px; }
  .card { grid-template-columns: 84px 1fr; gap: 12px; }
  .card img { width: 84px; }
  .card h3 { font-size: 19px; }
  .roof-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .shell { width: calc(100% - 32px); }
  .header { padding: 16px 0; flex-direction: column; align-items: flex-start; gap: 8px; }
  .brand { font-size: 24px; }
  .brand svg { width: 30px; height: 30px; }
  .nav { gap: 4px 22px; }
  .nav a { font-size: 14px; }
  main { padding-top: 28px; }
  h1 { font-size: 40px; letter-spacing: -1.2px; }
  .answer, .answer:has(> .cta:not([hidden])) { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .price { font-size: 54px; letter-spacing: -2px; }
  .answer p { font-size: 18px; }
  .answer > .cta { border-left: 0; border-top: 1px solid #e7d4bd; padding: 20px 0 0; }
  .contents strong { width: 100%; }
  .hero { aspect-ratio: 2.15; }
  .cards, .guide-cards { grid-template-columns: 1fr; }
  .card { grid-template-columns: 100px 1fr; gap: 16px; }
  .card img { width: 100px; min-height: 130px; }
  .cta-box { grid-template-columns: 1fr; padding: 22px; }
  summary { font-size: 18px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* keep running text at a readable width inside wide pages */
.guide > p, .guide > ul, .guide > ol, .guide > h3, .guide > .note, .guide > .faq, .guide > .author { max-width: 820px; }
.guide > .sub, .guide > .notes { max-width: 820px; }

/* material swatches */
.mat { display: flex; align-items: center; gap: 14px; }
.swatch { flex: none; width: 72px; height: 48px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 720px) { .swatch { width: 54px; height: 36px; } .mat { gap: 10px; } }
tr:has(.mat) td { vertical-align: middle; }
.ricon { flex: none; width: 44px; height: 44px; }
@media (max-width: 720px) { .ricon { width: 36px; height: 36px; } }

/* "on this page" links as pills */
.contents { gap: 10px; padding: 24px 0; }
.contents strong { margin-right: 6px; }
.contents a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 16px; border: 1.5px solid #e7d4bd; border-radius: 999px; background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.contents a:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
@media (max-width: 720px) { .contents { gap: 8px; } .contents a { padding: 6px 13px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .contents a { transition: none; } }
.contents strong { width: 100%; margin: 0 0 2px; }

/* home: price cards */
.home-hero h1 { font-size: clamp(44px, 7vw, 84px); }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.price-card { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 18px; border-radius: 10px; background: linear-gradient(110deg, #f9f0e1, #fbf5ec); border: 1.5px solid #ecdcc6; color: var(--ink); text-decoration: none; }
a.price-card:hover { border-color: var(--terra); color: var(--ink); }
.price-card .job { font: bold 21px/1.2 Georgia, serif; }
.price-card .big-price { font: bold 34px/1.1 Georgia, serif; color: var(--terra); letter-spacing: -1px; margin-top: 4px; }
.price-card .more { font-size: 14px; font-weight: 600; color: var(--terra); margin-top: auto; padding-top: 8px; }
.price-card.soon { background: #fff; border-style: dashed; }
.price-card.soon .big-price { font-size: 19px; color: var(--muted); letter-spacing: 0; }
@media (max-width: 1000px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .price-grid { grid-template-columns: 1fr; } }

/* home: gold title with slow shine + coin */
.gold-title { display: flex; align-items: center; gap: .22em; flex-wrap: nowrap; }
.gold-title .coin { flex: none; width: .82em; height: .82em; filter: drop-shadow(0 3px 4px rgb(120 80 10 / .25)); }
.gold {
  color: #b8861f;
  background: linear-gradient(100deg, #8a5a0e 0%, #c9962b 18%, #e6bd4f 32%, #d9a93a 44%, #9a6a12 60%, #c9962b 78%, #e0b445 92%, #8a5a0e 100%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-shine 7s ease-in-out infinite;
}
@keyframes gold-shine { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@media (prefers-reduced-motion: reduce) { .gold { animation: none; } }
@media (max-width: 520px) { .gold-title { align-items: flex-start; } .gold-title .coin { margin-top: .08em; } }
.gold { filter: drop-shadow(0 1px 0 rgb(110 70 8 / .45)); }
