/* State cost pages (/roof-replacement-cost/<state>/). Reuses main.css tokens and the cost-guide classes (chero, cnav, ledger, faq, cta). */
#size, #materials, #compare, #rules, #faq, #sources { scroll-margin-top: 88px; }
.sanswer { max-width: 34em; }
.chero__num a { color: var(--on-dark-2); }

/* Size table: split head + table. */
.ssize { padding-block: clamp(40px, 6vw, 88px); }
.ssize__grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.ssize__head .lede { margin-top: 12px; }

/* Tables. Hairlines inside tables only. */
.stable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: clamp(20px, 3vw, 36px); }
.ssize .stable-wrap { margin-top: 0; }
.stable { width: 100%; border-collapse: collapse; font-size: 16px; }
.stable thead th { text-align: right; font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 0 8px 18px; white-space: nowrap; }
.stable thead th:first-child { text-align: left; padding-left: 0; }
.stable tbody th, .stable td { padding: 13px 0 13px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.stable tbody th { text-align: left; font-weight: 600; padding-left: 0; }
.stable tbody th span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.stable td { text-align: right; font-weight: 600; white-space: nowrap; }
.stable td span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.stable__mid { color: var(--ink); background: var(--bg-2); }
.stable--wide { min-width: 720px; }
.stable--wide tbody th { position: sticky; left: 0; background: var(--bg); z-index: 1; padding-right: 14px; min-width: 11em; }

.smat { background: var(--surface); padding-block: clamp(48px, 7vw, 104px); }
.smat h2 { max-width: 15em; }
.smat .lede { margin-top: 12px; }
.smat .stable--wide tbody th { background: var(--surface); }

/* State rules: sticky head left, numbered fact rows right. */
.srules { padding-block: clamp(56px, 8vw, 112px); background: var(--bg-2); }
.srules__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.srules__head { position: sticky; top: 104px; }
.srules__head .lede { margin-top: 14px; }
.srules__season { margin: 22px 0 0; padding-left: 16px; border-left: 2px solid var(--ink); color: var(--ink-2); font-size: 16px; max-width: 30em; }
.sfacts { list-style: none; margin: 0; padding: 0; counter-reset: sf; }
.sfacts li { counter-increment: sf; display: grid; grid-template-columns: 2.4em minmax(0, 1fr); column-gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.sfacts li:first-child { padding-top: 0; }
.sfacts li::before { content: counter(sf, decimal-leading-zero); grid-row: span 2; font-family: var(--f-num); font-weight: 700; font-size: 15px; color: var(--muted); padding-top: 3px; }
.sfacts b { font-weight: 600; font-size: 18px; line-height: 1.35; }
.sfacts p { margin: 6px 0 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; max-width: 38em; }
.scite { font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; margin-left: 2px; }
.scite:hover { color: var(--ink); text-decoration: underline; }

/* Sources. */
.ssrc { padding-block: clamp(40px, 5vw, 72px); }
.ssrc__grid { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.ssrc h2 { font-size: clamp(24px, 2.4vw, 32px); }
.ssrc__list { margin: 0; padding-left: 1.4em; font-size: 15px; color: var(--muted); }
.ssrc__list li { padding: 5px 0; }
.ssrc__list li:target { color: var(--ink); }
.ssrc__list a { color: var(--ink-2); }
.snear { font-size: 15px; color: var(--muted); margin: 18px 0 0; }
.snear a { color: var(--ink-2); }

@media (max-width: 900px) {
	.ssize__grid, .srules__grid, .ssrc__grid { grid-template-columns: minmax(0, 1fr); }
	.srules__head { position: static; }
	.stable { font-size: 15px; }
	.stable thead th, .stable tbody th, .stable td { padding-left: 12px; }
	.stable thead th:first-child, .stable tbody th { padding-left: 0; }
}
