/* Roof Cost Hub — main stylesheet
   Palette: asphalt charcoal, cool sheet white, shingle grey, chalk-line blue, highlighter yellow (estimate figures only). */

@font-face {
	font-family: "Archivo";
	src: url("../fonts/archivo.woff2") format("woff2-variations"), url("../fonts/archivo.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
}
@font-face {
	font-family: "Source Serif 4";
	src: url("../fonts/source-serif-4.woff2") format("woff2-variations"), url("../fonts/source-serif-4.woff2") format("woff2");
	font-weight: 200 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Source Serif 4";
	src: url("../fonts/source-serif-4-italic.woff2") format("woff2-variations"), url("../fonts/source-serif-4-italic.woff2") format("woff2");
	font-weight: 200 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--asphalt: #26323a;
	--asphalt-2: #3a4852;
	--sheet: #f4f6f7;
	--paper: #ffffff;
	--shingle: #8b959c;
	--rule: #d6dcdf;
	--chalk: #1d5fbf;
	--chalk-dark: #154a96;
	--chalk-tint: #e8f0fb;
	--marker: #f5c842;
	--marker-tint: #fdf3cf;
	--danger: #b42318;

	--sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;

	--step--1: 0.875rem;
	--step-0: 1rem;
	--step-1: 1.125rem;
	--step-2: 1.375rem;
	--step-3: 1.75rem;
	--step-4: 2.25rem;
	--step-5: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

	--radius: 6px;
	--wrap: 1180px;
	--measure: 68ch;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
	margin: 0;
	background: var(--sheet);
	color: var(--asphalt);
	font-family: var(--sans);
	font-size: var(--step-0);
	line-height: 1.55;
	text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--chalk); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--chalk-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.15; margin: 0 0 0.5em; font-weight: 750; letter-spacing: -0.01em; }
h1 { font-size: var(--step-5); font-stretch: 112%; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-stretch: 108%; }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--asphalt); color: #fff; padding: 0.6rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 800px; }

/* Buttons ---------------------------------------------------------------- */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	font: 650 var(--step-0)/1.2 var(--sans); font-stretch: 105%;
	padding: 0.75rem 1.15rem; border-radius: var(--radius);
	border: 2px solid var(--asphalt); background: transparent; color: var(--asphalt);
	text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--asphalt); color: #fff; text-decoration: none; }
.button--primary { background: var(--chalk); border-color: var(--chalk); color: #fff; }
.button--primary:hover { background: var(--chalk-dark); border-color: var(--chalk-dark); color: #fff; }
.button--block { width: 100%; }

/* Header ----------------------------------------------------------------- */
.site-header { background: var(--asphalt); color: #fff; position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.site-logo { margin: 0; }
.site-logo a { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; }
.site-logo img { width: 40px; height: 40px; }
.site-logo__word { font: 800 1.25rem/1 var(--sans); font-stretch: 118%; letter-spacing: -0.02em; }
.site-logo__word span { color: #9cc2ff; }
.custom-logo-link img { max-height: 44px; width: auto; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-nav__list a { color: #e6ebee; text-decoration: none; font-weight: 550; }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { color: #fff; text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 3px; text-underline-offset: 0.45em; }
.site-nav__cta { padding: 0.55rem 0.95rem; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; margin: 0 auto; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; } .nav-toggle__bars::after { top: 7px; }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--asphalt); flex-direction: column; align-items: stretch; padding: 0.5rem 1.25rem 1.25rem; gap: 1rem; border-top: 1px solid var(--asphalt-2); }
	.site-nav.is-open { display: flex; }
	.site-nav__list { flex-direction: column; gap: 0; }
	.site-nav__list a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--asphalt-2); }
}

/* Breadcrumbs ------------------------------------------------------------ */
.breadcrumbs { font-size: var(--step--1); color: var(--asphalt-2); padding-top: 1.5rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--shingle); }
.breadcrumbs a { color: var(--asphalt-2); }

/* Hero ------------------------------------------------------------------- */
.hero { background: var(--asphalt); color: #fff; padding: 3rem 0 4rem; position: relative; overflow: hidden; }
.hero::after { /* the ridge line: one long pitched chalk line behind the calculator */
	content: ""; position: absolute; left: -5%; right: -5%; bottom: 0; height: 46%;
	background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(156, 194, 255, 0.35) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat,
		linear-gradient(to top left, transparent calc(50% - 1px), rgba(156, 194, 255, 0.35) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat;
	pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 5fr 7fr; gap: 3rem; align-items: start; position: relative; z-index: 1; }
.hero__title { color: #fff; max-width: 12ch; margin-top: 1rem; }
.hero__lede { font-size: var(--step-1); color: #dbe3e8; max-width: 44ch; }
.hero__facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.5rem; color: #c3ced5; font-size: var(--step--1); }
.hero__facts li { padding-left: 1.4rem; position: relative; }
.hero__facts li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 0.7rem; height: 0.4rem; border-left: 2px solid var(--marker); border-bottom: 2px solid var(--marker); transform: rotate(-45deg); }
@media (max-width: 960px) { .hero__inner { grid-template-columns: 1fr; gap: 1.5rem; } .hero__title { max-width: 16ch; } }

/* Calculator ------------------------------------------------------------- */
.calc { background: var(--paper); color: var(--asphalt); border-radius: 10px; border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(38, 50, 58, 0.45); overflow: hidden; margin: 1.5rem 0; font-family: var(--sans); }
.hero .calc { margin: 0; border: 0; box-shadow: 0 0 0 1px #4a5a66, 0 24px 60px -30px rgba(0, 0, 0, 0.6); }
.calc__form { padding: 1.5rem 1.5rem 0.5rem; }
.calc__group { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.calc__group legend { font-weight: 700; font-size: var(--step-1); margin-bottom: 0.6rem; padding: 0; }
.calc__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.85rem 1rem; margin-bottom: 0.85rem; }
.calc__checks { display: grid; gap: 0.4rem; margin-bottom: 1rem; }

.field { display: grid; gap: 0.3rem; font-size: var(--step--1); font-weight: 600; margin-bottom: 0.85rem; }
.calc__row .field { margin-bottom: 0; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field small { font-weight: 400; color: var(--asphalt-2); line-height: 1.4; }
.field input, .field select, .field textarea, .search-form__input {
	font: 500 var(--step-0)/1.3 var(--sans); color: var(--asphalt);
	padding: 0.65rem 0.75rem; border: 1.5px solid #b9c3c9; border-radius: var(--radius); background: #fff; width: 100%; min-height: 46px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--asphalt) 50%), linear-gradient(135deg, var(--asphalt) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--chalk); outline: 3px solid var(--chalk-tint); outline-offset: 0; }
.check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: var(--step--1); cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--chalk); flex: none; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid #b9c3c9; border-radius: var(--radius); overflow: hidden; margin-bottom: 0.85rem; }
.seg label { position: relative; cursor: pointer; flex: 1 1 auto; }
.seg span { text-align: center; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 0.55rem 0.9rem; font-size: var(--step--1); font-weight: 600; }
.seg label + label span { border-left: 1.5px solid #b9c3c9; }
@media (max-width: 480px) { .seg { display: flex; width: 100%; } .seg span { padding: 0.55rem 0.5rem; } }
.seg input:checked + span { background: var(--asphalt); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--chalk); outline-offset: -3px; }

.calc__result { background: var(--asphalt); color: #fff; padding: 1.25rem 1.5rem 1.5rem; }
.calc__result-title { margin: 0 0 0.25rem; color: #c3ced5; font-size: var(--step--1); font-weight: 600; }
.calc__figure { margin: 0; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc__figure mark { background: var(--marker); color: var(--asphalt); padding: 0 0.2em; border-radius: 3px; }
.calc__typical { margin: 0.35rem 0 0; color: #dbe3e8; }
.calc__typical strong { color: var(--marker); }
.calc__details { margin-top: 1rem; font-size: var(--step--1); }
.calc__details table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc__details th, .calc__details td { padding: 0.4rem 0; border-bottom: 1px solid var(--asphalt-2); text-align: left; font-weight: 500; }
.calc__details td { text-align: right; }
.calc__details p { color: #c3ced5; margin: 0.75rem 0 0; }
.calc__actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.calc__actions .button { border-color: #fff; color: #fff; }
.calc__actions .button:hover { background: #fff; color: var(--asphalt); }
.calc__actions .button--primary { border-color: var(--marker); background: var(--marker); color: var(--asphalt); }
.calc__actions .button--primary:hover { background: #ffd95c; border-color: #ffd95c; color: var(--asphalt); }
.calc__noscript { padding: 1rem 1.5rem; margin: 0; background: var(--marker-tint); }
.calc--compact .calc__details { display: none; }

.pitch-diagram { width: 100%; max-width: 340px; margin: 0 0 1rem; }
.pitch-diagram path { fill: none; stroke-width: 3; }
.pitch-diagram__run { stroke: var(--shingle); stroke-dasharray: 6 5; }
.pitch-diagram__rise { stroke: var(--chalk); }
.pitch-diagram__slope { stroke: var(--asphalt); stroke-width: 5 !important; stroke-linecap: square; }
.pitch-diagram text { font: 600 12px var(--sans); fill: var(--asphalt-2); }

/* Sections --------------------------------------------------------------- */
.home-section { padding: 3.5rem 0 0; }
.home-section:last-child { padding-bottom: 4rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; max-width: 60ch; color: var(--asphalt-2); }

/* Calculator index: a ruled list, not cards */
.tool-index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--asphalt); display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; }
.tool-index li { border-bottom: 1px solid var(--rule); }
.tool-index a { display: grid; gap: 0.15rem; padding: 1rem 2rem 1rem 0; text-decoration: none; color: var(--asphalt); position: relative; }
.tool-index a::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.6rem; height: 0.6rem; border-top: 2px solid var(--chalk); border-right: 2px solid var(--chalk); transform: translateY(-50%) rotate(45deg); }
.tool-index a:hover .tool-index__name { color: var(--chalk); text-decoration: underline; }
.tool-index__name { font-weight: 750; font-size: var(--step-1); }
.tool-index__does { color: var(--asphalt-2); font-size: var(--step--1); }
@media (max-width: 720px) { .tool-index { grid-template-columns: 1fr; } }

/* Estimate sheet */
.home-section--sheet .sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 2rem; max-width: calc(var(--wrap) - 2.5rem); }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--asphalt); font-weight: 700; white-space: nowrap; }
tbody th { font-weight: 600; }
tbody tr:hover { background: var(--sheet); }
.rate-table td:nth-child(3) { font-weight: 700; background: var(--marker-tint); }
.table-note { font-size: var(--step--1); color: var(--asphalt-2); margin: -0.5rem 0 0; }

/* Cards ------------------------------------------------------------------ */
.post-grid { display: grid; gap: 2rem 1.75rem; }
.post-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .post-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid--3 { grid-template-columns: 1fr; } }
.card__link { display: block; text-decoration: none; color: var(--asphalt); }
.card__media { aspect-ratio: 40 / 21; background: var(--asphalt); border-radius: var(--radius); overflow: hidden; margin-bottom: 0.85rem; }
.card__img { width: 100%; height: 100%; object-fit: cover; }
.card__title { font-size: var(--step-1); margin-bottom: 0.35rem; }
.card__link:hover .card__title { color: var(--chalk); text-decoration: underline; }
.card__excerpt { font-size: var(--step--1); color: var(--asphalt-2); margin: 0; }

/* Quote CTA -------------------------------------------------------------- */
.quote-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; background: var(--chalk-tint); border-left: 5px solid var(--chalk); padding: 1.25rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 2rem 0; font-family: var(--sans); }
.quote-cta p { margin: 0; max-width: 58ch; }
.quote-cta__title { font-weight: 750; font-size: var(--step-1); margin-bottom: 0.2rem !important; }

/* Article ---------------------------------------------------------------- */
.article__header { padding: 1rem 0 1.5rem; max-width: 860px; }
.article__title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.article__dek { font-family: var(--serif); font-size: var(--step-2); line-height: 1.45; color: var(--asphalt-2); max-width: 60ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: var(--step--1); color: var(--asphalt-2); border-top: 1px solid var(--rule); padding-top: 0.85rem; }
.article-meta__line { margin: 0; }
.article-meta__reviewer { color: var(--asphalt); font-weight: 600; }

.article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; align-items: start; }
.article__main { max-width: 760px; min-width: 0; }
.article__hero { margin: 0 0 2rem; border-radius: 10px; overflow: hidden; background: var(--asphalt); aspect-ratio: 40 / 21; }
.article__img { width: 100%; height: 100%; object-fit: cover; }
.article__sticky { position: sticky; top: 1.5rem; display: grid; gap: 1.5rem; }
.toc-mobile { display: none; }
@media (max-width: 1000px) {
	.article__layout { grid-template-columns: 1fr; }
	.article__aside { display: none; }
	.toc-mobile { display: block; }
}

.toc { font-family: var(--sans); font-size: var(--step--1); border-top: 2px solid var(--asphalt); padding-top: 0.85rem; }
.toc__title { font-weight: 750; margin-bottom: 0.5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.toc a { color: var(--asphalt); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--chalk); text-decoration: underline; }
.toc-mobile .toc { background: var(--paper); border: 1px solid var(--rule); border-top: 2px solid var(--asphalt); padding: 1rem 1.25rem; border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 2rem; }

/* Prose ------------------------------------------------------------------ */
.prose { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; }
.prose > * { max-width: var(--measure); }
.prose h2 { margin: 2.25em 0 0.6em; scroll-margin-top: 1.5rem; padding-top: 0.6em; border-top: 1px solid var(--rule); }
.prose h3 { margin: 1.75em 0 0.5em; font-size: var(--step-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { font-weight: 650; }
.prose table, .prose .table-wrap { max-width: none; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.25em; border-left: 3px solid var(--shingle); font-style: italic; }
.prose .calc, .prose .quote-cta, .prose .short-answer, .prose .ad-slot, .prose .tool-index, .prose .quote-form { max-width: none; }
.page .prose, .prose--calculator { font-size: 1.125rem; }

.short-answer { font-family: var(--sans); background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--marker); border-radius: 0 0 var(--radius) var(--radius); padding: 1.25rem 1.5rem; margin: 0 0 2rem; }
.short-answer p { margin: 0 0 0.5rem; font-size: var(--step-1); line-height: 1.55; }
.short-answer p:last-child { margin: 0; }
.short-answer__label { font-weight: 750; font-size: var(--step--1) !important; color: var(--asphalt-2); }
.short-answer strong { background: var(--marker-tint); padding: 0 0.15em; }

.sources { font-family: var(--sans); font-size: var(--step--1); color: var(--asphalt-2); border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 1rem; }
.sources h2 { font-size: var(--step-1); border: 0; margin: 0 0 0.5rem; padding: 0; }
.sources ol { padding-left: 1.25rem; }
.sources li { margin-bottom: 0.3rem; }

.disclosure { font-family: var(--sans); font-size: var(--step--1); color: var(--asphalt-2); background: var(--paper); border: 1px solid var(--rule); padding: 1rem 1.25rem; border-radius: var(--radius); }
.disclosure p { margin: 0; }

.related { margin: 4rem 0; padding-top: 2rem; border-top: 2px solid var(--asphalt); }

/* Pages ------------------------------------------------------------------ */
.page { padding-bottom: 4rem; }
.page__title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin: 1rem 0 1.25rem; }
.calc-page__header { max-width: 820px; }
.calc-page__dek { font-family: var(--serif); font-size: var(--step-2); color: var(--asphalt-2); line-height: 1.45; }
.page--calculator .prose > .calc { max-width: 900px; }

.listing { padding-bottom: 4rem; }
.listing__header { margin-bottom: 2rem; }
.nav-links { display: flex; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.page-numbers { padding: 0.5rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; background: var(--paper); }
.page-numbers.current { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }

.search-form { display: flex; gap: 0.5rem; max-width: 520px; margin: 1rem 0 2rem; }
.search-form label { flex: 1; }

/* Quote form ------------------------------------------------------------- */
.quote-form { font-family: var(--sans); background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--chalk); border-radius: 0 0 10px 10px; padding: 1.75rem; margin: 1.5rem 0; }
.quote-form__title { font-weight: 800; font-size: var(--step-2); margin: 0 0 0.25rem; }
.quote-form__intro { color: var(--asphalt-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--step--1); line-height: 1.5; margin: 0.5rem 0 1.25rem; }
.consent input { width: 1.15rem; height: 1.15rem; flex: none; margin-top: 0.2rem; accent-color: var(--chalk); }
.form-errors { background: #fdecea; border-left: 4px solid var(--danger); padding: 0.85rem 1rem; margin-bottom: 1rem; }
.form-errors p { margin: 0 0 0.25rem; font-weight: 650; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.hp { position: absolute !important; left: -9999px; }
.quote-form--done { border-top-color: var(--marker); }

/* Ads -------------------------------------------------------------------- */
.ad-slot { margin: 2rem 0; text-align: center; min-height: 100px; }
.ad-slot__label { display: block; font: 500 0.75rem/1 var(--sans); color: var(--shingle); margin-bottom: 0.4rem; }

/* Widgets */
.widget { font-size: var(--step--1); }
.widget-title { font-size: var(--step-0); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--asphalt); color: #c3ced5; margin-top: 2rem; font-size: var(--step--1); }
.site-footer a { color: #e6ebee; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-top: 3rem; padding-bottom: 2rem; }
.site-footer__brand p { max-width: 46ch; margin-top: 1rem; }
.site-footer__title { color: #fff; font-weight: 750; font-size: var(--step-0); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer__legal { border-top: 1px solid var(--asphalt-2); padding-top: 1.25rem; padding-bottom: 1.5rem; }
.site-footer__legal p { margin: 0; }
@media (max-width: 800px) { .site-footer__inner { grid-template-columns: 1fr; } }

.empty { padding: 2rem 0; }

/* Print: estimates are often printed and taken to a roofer. */
@media print {
	.site-header, .site-footer, .ad-slot, .quote-cta, .article__aside, .related, .calc__actions, .nav-toggle { display: none !important; }
	body { background: #fff; }
	.calc__result { background: #fff; color: #000; border-top: 2px solid #000; }
}


/* ==========================================================================
   Roof Cost Hub visual refresh — homepage + article system
   ========================================================================== */
:root {
	--asphalt: #24333d;
	--asphalt-2: #53616b;
	--sheet: #f4f7fa;
	--paper: #ffffff;
	--shingle: #84919a;
	--rule: #dce3e9;
	--chalk: #1765c5;
	--chalk-dark: #104b98;
	--chalk-tint: #eaf3ff;
	--marker: #ffc928;
	--marker-tint: #fff4cc;
	--radius: 12px;
	--wrap: 1240px;
}
body { background: #f5f7fa; color: #1f2e38; }
a { color: #1765c5; }
a:hover { color: #104b98; }
.button { border-radius: 8px; font-weight: 700; box-shadow: 0 2px 5px rgba(18,43,63,.08); }
.button--primary { background: #1765c5; border-color: #1765c5; }
.button--primary:hover { background: #104b98; border-color: #104b98; }

/* Clean white navigation with the approved horizontal logo. */
.site-header {
	background: #fff;
	color: #24333d;
	box-shadow: 0 2px 14px rgba(21,43,61,.08);
	border-bottom: 1px solid #e8edf1;
}
.site-header__inner { min-height: 76px; gap: 1.25rem; }
.site-logo a { color: #24333d; }
.site-logo img { width: auto; height: auto; max-width: 270px; max-height: 54px; object-fit: contain; }
.site-logo--white img { max-width: 235px; max-height: 58px; }
.site-nav { gap: 1.15rem; }
.site-nav__list { gap: clamp(.8rem, 1.5vw, 1.65rem); }
.site-nav__list a { color: #253540; font-weight: 700; font-size: .94rem; }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { color: #1765c5; text-decoration-color: #ffc928; }
.site-nav__cta { padding: .7rem 1rem; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { background: #24333d; }
@media (max-width: 860px) {
	.site-header__inner { min-height: 68px; }
	.site-logo img { max-width: 220px; max-height: 46px; }
	.site-nav { background: #fff; border-top: 1px solid #e7edf2; box-shadow: 0 14px 24px rgba(21,43,61,.12); }
	.site-nav__list a { color: #24333d; border-color: #e7edf2; }
}

/* Photo-led hero, retaining the native live calculator. */
.hero {
	padding: clamp(2.6rem, 5vw, 4.6rem) 0;
	background: #1765c5 url("../img/home-roof-hero.webp") center 48% / cover no-repeat;
	color: #fff;
	isolation: isolate;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(13,55,104,.94) 0%, rgba(17,79,145,.86) 38%, rgba(20,73,126,.46) 67%, rgba(17,54,84,.18) 100%);
}
.hero::after { display: none; }
.hero__inner { grid-template-columns: minmax(290px, .86fr) minmax(520px, 1.14fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.hero__text { padding: 1rem 0; }
.hero__eyebrow, .section-eyebrow {
	margin: 0 0 .65rem;
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #ffda58;
}
.hero__title { font-size: clamp(2.65rem, 4.5vw, 4.45rem); line-height: 1.02; max-width: 10ch; margin: 0 0 1.1rem; text-wrap: balance; }
.hero__title::first-line { color: #fff; }
.hero__lede { font-size: clamp(1.05rem, 1.25vw, 1.2rem); color: #f2f7fc; max-width: 43ch; line-height: 1.55; }
.hero__facts { color: #fff; margin-top: 1.4rem; gap: .62rem; font-size: .94rem; }
.hero__facts li::before { width: .65rem; height: .38rem; border-color: #ffd33d; border-width: 3px; }
.hero__calc { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 22px 65px rgba(7,26,45,.34); border: 1px solid rgba(255,255,255,.7); }
.hero__calc-heading { padding: 1.15rem 1.5rem .15rem; color: #1f2e38; }
.hero__calc-heading h2 { font-size: 1.35rem; margin: 0; letter-spacing: -.02em; }
.hero__calc-kicker { color: #1765c5; text-transform: uppercase; font-size: .68rem; font-weight: 800; letter-spacing: .11em; }
.hero .calc { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hero .calc__form { padding: 1rem 1.5rem .5rem; }
.hero .calc__result { padding: 1.15rem 1.5rem 1.35rem; }
.hero .calc__figure { color: #fff; }
.hero .calc__figure mark { background: #ffc928; color: #1e2e38; }
@media (max-width: 1050px) {
	.hero__inner { grid-template-columns: 1fr; max-width: 900px; }
	.hero__text { max-width: 760px; }
	.hero__title { max-width: 14ch; }
	.hero__calc { max-width: 850px; width: 100%; }
}
@media (max-width: 600px) {
	.hero { padding: 2rem 0 2.5rem; background-position: 58% center; }
	.hero::before { background: linear-gradient(90deg, rgba(13,55,104,.92), rgba(17,79,145,.75)); }
	.hero__title { font-size: clamp(2.35rem, 11vw, 3.4rem); }
	.hero__calc-heading { padding: 1rem 1rem .15rem; }
	.hero .calc__form, .hero .calc__result { padding-left: 1rem; padding-right: 1rem; }
}

/* Homepage sections and cards. */
.home-section { padding: clamp(2.4rem, 4vw, 3.7rem) 0 0; }
.home-section:last-child { padding-bottom: 4rem; }
.section-head { align-items: end; margin-bottom: 1.4rem; }
.section-head h2 { font-size: clamp(1.65rem, 2.2vw, 2.15rem); letter-spacing: -.035em; }
.section-head p { font-size: .93rem; }
.section-eyebrow { color: #1765c5; margin-bottom: .35rem; }
.home-section--tools { padding-top: 2.8rem; }
.home-section--sheet .sheet {
	max-width: calc(var(--wrap) - 2.5rem);
	background: #fff;
	border: 1px solid #e0e7ed;
	border-radius: 14px;
	padding: clamp(1.15rem, 2.4vw, 2rem);
	box-shadow: 0 8px 24px rgba(31,54,74,.055);
}
.home-section--sheet .section-head { align-items: center; }
.home-section--sheet .section-head h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); }
.home-section--sheet .section-head p { font-size: .82rem; max-width: 55ch; }
.tool-index {
	border: 0;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: .85rem;
}
.tool-index li {
	border: 1px solid #e1e8ef;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(31,54,74,.055);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-index li:hover {
	transform: translateY(-3px);
	border-color: #b9d2ef;
	box-shadow: 0 12px 24px rgba(31,74,117,.11);
}
.tool-index a {
	min-height: 112px;
	display: grid;
	grid-template-columns: 48px minmax(0,1fr) 12px;
	align-items: center;
	gap: .85rem;
	padding: 1rem;
}
.tool-index a::after { display: none; }
.tool-index__icon {
	width: 46px; height: 46px;
	display: grid; place-items: center;
	border-radius: 10px;
	background: #eaf3ff;
	color: #1765c5;
}
.tool-index__icon svg {
	width: 31px; height: 31px;
	fill: none; stroke: currentColor; stroke-width: 2.5;
	stroke-linecap: round; stroke-linejoin: round;
}
.tool-index__copy { display: grid; gap: .25rem; }
.tool-index__name { font-size: 1rem; line-height: 1.2; }
.tool-index__does { font-size: .79rem; line-height: 1.4; }
.tool-index__arrow { color: #1765c5; font-size: 1.7rem; line-height: 1; font-weight: 500; }
@media (max-width: 960px) { .tool-index { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
	.tool-index { grid-template-columns: 1fr; }
	.tool-index a { min-height: 90px; }
}

/* Rate table: compact, clean and easy to scan. */
.rate-table { font-size: .9rem; }
.rate-table thead th {
	background: #304653;
	color: #fff;
	border: 0;
	padding: .8rem .9rem;
}
.rate-table thead th:first-child { border-radius: 8px 0 0 0; }
.rate-table thead th:last-child { border-radius: 0 8px 0 0; }
.rate-table td, .rate-table tbody th { padding: .7rem .85rem; }
.rate-table tbody tr:nth-child(even) { background: #f7f9fb; }
.rate-table td:nth-child(3) { background: #fff4cc; color: #24333d; font-weight: 800; }
.table-note { margin-top: .65rem; font-size: .82rem; }
.post-grid { gap: 1.15rem; }
.card {
	background: #fff;
	border: 1px solid #e2e8ee;
	border-radius: 13px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(31,54,74,.055);
	transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(31,54,74,.11); }
.card__link { height: 100%; display: flex; flex-direction: column; }
.card__media { aspect-ratio: 16 / 8.5; margin: 0; border-radius: 0; background: #dfe7ee; }
.card__img { transition: transform .35s ease; }
.card:hover .card__img { transform: scale(1.035); }
.card__title { padding: .85rem .9rem 0; margin: 0; font-size: 1rem; line-height: 1.25; }
.card__excerpt { padding: .45rem .9rem 1rem; font-size: .82rem; line-height: 1.45; }
.home-section--guides { padding-top: 3.3rem; }
.home-section--quote { padding-top: 2rem; padding-bottom: 3rem; }
.quote-cta {
	background: linear-gradient(105deg, #e8f2ff, #f3f8ff);
	border: 1px solid #cfe1f7;
	border-left: 5px solid #1765c5;
	border-radius: 12px;
	padding: 1.35rem 1.5rem;
	box-shadow: 0 5px 18px rgba(31,74,117,.055);
}
.quote-cta__title { font-size: 1.25rem; }
.quote-cta .button { white-space: nowrap; }

/* Article template: same visual language as the home page. */
.article { padding-bottom: 3rem; }
.article-masthead {
	background: linear-gradient(180deg, #fff 0%, #f5f8fb 100%);
	border-bottom: 1px solid #e3eaf0;
	padding-bottom: 1.5rem;
}
.article__header { max-width: 900px; padding: 1.1rem 0 1rem; }
.article__category {
	display: inline-flex;
	margin: .25rem 0 .8rem;
	padding: .35rem .7rem;
	border-radius: 999px;
	background: #eaf3ff;
	color: #1459a9;
	font: 800 .72rem/1.2 var(--sans);
	letter-spacing: .08em;
	text-transform: uppercase;
}
.article__title {
	max-width: 21ch;
	font-size: clamp(2.15rem, 4vw, 3.55rem);
	line-height: 1.06;
	letter-spacing: -.045em;
	margin: 0 0 .85rem;
	color: #1e2e38;
}
.article__dek {
	font-family: var(--sans);
	font-size: clamp(1.08rem, 1.5vw, 1.3rem);
	line-height: 1.55;
	color: #52616c;
	max-width: 68ch;
	margin-bottom: 1.2rem;
}
.article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem 1.2rem;
	border-top: 0;
	padding-top: .35rem;
	color: #687782;
	font-size: .82rem;
}
.article-meta__line { margin: 0; }
.article__layout {
	grid-template-columns: minmax(0, 820px) minmax(220px, 280px);
	gap: clamp(2rem, 4vw, 4rem);
	padding-top: 2rem;
	align-items: start;
}
.article__main { max-width: 820px; }
.article__hero {
	aspect-ratio: 16 / 8.7;
	margin: 0 0 1.8rem;
	border-radius: 14px;
	box-shadow: 0 10px 28px rgba(24,45,64,.12);
	background: #e2eaf0;
}
.article__img { width: 100%; height: 100%; object-fit: cover; }
.article__sticky { top: 1.25rem; gap: 1.5rem; }
.toc {
	background: #fff;
	border: 1px solid #e1e8ef;
	border-top: 4px solid #1765c5;
	border-radius: 10px;
	padding: 1rem 1.1rem;
	box-shadow: 0 4px 14px rgba(31,54,74,.045);
}
.toc__title { color: #24333d; font-size: .95rem; }
.toc a { color: #425462; }
.toc a:hover, .toc a.is-active { color: #1765c5; }
.toc-mobile .toc { margin-bottom: 1.5rem; }
.prose {
	font-family: var(--sans);
	font-size: 1.06rem;
	line-height: 1.78;
	color: #34434e;
}
.prose > * { max-width: 72ch; }
.prose h2 {
	font-size: clamp(1.55rem, 2.2vw, 1.9rem);
	letter-spacing: -.03em;
	color: #1f2f3a;
	margin: 2.1em 0 .65em;
	padding-top: .65em;
	border-top: 1px solid #e1e8ee;
}
.prose h3 { font-size: 1.25rem; color: #263b49; margin-top: 1.6em; }
.prose p { margin-bottom: 1.15em; }
.prose a { color: #1765c5; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.45em; }
.prose li { margin-bottom: .5em; }
.prose table {
	border: 1px solid #dfe6ed;
	border-radius: 9px;
	overflow: hidden;
	font-size: .9rem;
}
.prose th { background: #304653; color: #fff; border-color: #435865; }
.prose td { background: #fff; }
.prose tr:nth-child(even) td { background: #f6f9fc; }
.prose blockquote {
	background: #eef5ff;
	border-left: 4px solid #1765c5;
	border-radius: 0 9px 9px 0;
	padding: 1rem 1.2rem;
	font-style: normal;
	color: #314653;
}
.short-answer {
	background: #eef5ff;
	border: 1px solid #d4e5f8;
	border-top: 4px solid #ffc928;
	border-radius: 10px;
	padding: 1.2rem 1.35rem;
	box-shadow: 0 5px 18px rgba(31,74,117,.045);
}
.disclosure {
	background: #f6f8fa;
	border: 1px solid #e0e7ed;
	border-radius: 10px;
	font-size: .84rem;
}
.related {
	border-top: 1px solid #dfe6ed;
	margin-top: 3.5rem;
	padding-top: 2rem;
}
.related h2 { font-size: 1.8rem; margin-bottom: 1.25rem; }
.article .quote-cta { margin: 2.2rem 0; }
@media (max-width: 1000px) {
	.article__layout { grid-template-columns: 1fr; }
	.article__aside { display: none; }
}
@media (max-width: 600px) {
	.article__layout { padding-top: 1.25rem; }
	.article__header { padding-top: .75rem; }
	.article__title { font-size: 2.2rem; }
	.article__hero { aspect-ratio: 4 / 3; border-radius: 10px; }
	.prose { font-size: 1rem; }
	.article-meta { gap: .35rem .75rem; }
}

/* Footer remains dark, now with the approved reversed wordmark. */
.site-footer {
	background: #24333d;
	color: #c8d3dc;
	margin-top: 1rem;
	border-top: 4px solid #1765c5;
}
.site-footer a { color: #e5edf4; }
.site-footer a:hover { color: #ffd34a; }
.site-footer__inner { padding-top: 2.8rem; }
.site-footer__brand p { color: #c8d3dc; }
.site-footer__legal { border-color: #43515c; color: #b8c5ce; }
.site-footer .site-logo img { max-height: 52px; width: auto; }

/* Make all key controls and content layouts comfortable on small screens. */
@media (max-width: 600px) {
	.home-section { padding-top: 2.25rem; }
	.home-section--sheet .sheet { padding: 1rem; }
	.section-head { align-items: flex-start; }
	.section-head p { margin-top: .35rem; }
	.quote-cta { align-items: flex-start; }
	.quote-cta .button { width: 100%; }
	.rate-table { min-width: 580px; }
}

.hero__title span { color: #ffc928; }
