/* Tallow Creek add-on: damage check, roof estimator, before/after slider. */
:root { --tc-slate: #4b5661; --tc-slate-dark: #36404a; --tc-siding: #dfe4dc; --tc-trim: #f7f6f1; }
.btn.outline { background: transparent; color: var(--c-dark); border-color: var(--c-dark); }
.btn.outline:hover { background: var(--c-dark); color: #fff; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--c-primary); }

/* ---------- tap-the-house damage check ---------- */
.dc { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.dc-house { position: relative; margin: 0; background: linear-gradient(180deg, #e9ede8 0%, #f4f5f1 70%); border-radius: var(--radius); border: 1px solid var(--c-line); overflow: hidden; }
.dc-house svg { display: block; width: 100%; height: auto; }
.dc-rain path { stroke: #9aa7b1; stroke-width: 2; stroke-linecap: round; opacity: .55; }
.dc-ground { fill: #b9c4a8; }
.dc-walk { fill: #d8d2c3; }
.dc-roof { fill: var(--tc-slate); }
.dc-shingles path { stroke: var(--tc-slate-dark); stroke-width: 3; }
.dc-ridge { stroke: var(--tc-slate-dark); stroke-width: 8; stroke-linecap: round; }
.dc-chimney { fill: #9c5b45; } .dc-chimney-cap { fill: #6e3f30; }
.dc-flashing { fill: none; stroke: #c9cfd3; stroke-width: 6; }
.dc-vent { fill: #8d979f; }
.dc-body { fill: var(--tc-siding); }
.dc-siding path { stroke: #c7cec5; stroke-width: 2; }
.dc-gutter { fill: #e9ebe6; stroke: #a3aba4; stroke-width: 1.5; }
.dc-window rect { fill: #3a4a55; stroke: var(--tc-trim); stroke-width: 8; }
.dc-window path { stroke: var(--tc-trim); stroke-width: 4; }
.dc-door { fill: var(--c-primary); stroke: var(--tc-trim); stroke-width: 6; }
.dc-knob { fill: var(--c-accent); }
.dc-pin { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #fff; background: var(--c-accent); color: var(--c-dark); font: 800 1.1rem/1 var(--f-heading); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); display: grid; place-items: center; transition: transform .2s, background .2s; }
.dc-pin:hover { transform: scale(1.1); }
.dc-pin[aria-pressed="true"] { background: var(--c-dark); color: #fff; border-color: var(--c-accent); transform: scale(1.12); }
.dc-pin.added::after { content: "✓"; position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-primary); color: #fff; font: 700 .7rem/20px var(--f-body); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
	.dc-pin::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--c-accent); animation: dc-ping 2.4s ease-out infinite; animation-delay: calc(var(--x) * .02s); }
	.dc-pin[aria-pressed="true"]::before, .dc.touched .dc-pin::before { animation: none; opacity: 0; }
}
@keyframes dc-ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.8); opacity: 0; } }
.dc-side { display: grid; gap: 18px; }
.dc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dc-list button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); font: 600 .95rem var(--f-body); color: var(--c-ink); text-align: left; cursor: pointer; }
.dc-list b { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-dark); font: 800 .9rem var(--f-heading); }
.dc-list button[aria-pressed="true"] { border-color: var(--c-dark); box-shadow: inset 0 0 0 1px var(--c-dark); }
.dc-list button.added .dc-tick::before { content: "✓"; margin-left: auto; color: var(--c-primary); font-weight: 800; }
.dc-list .dc-tick { margin-left: auto; font-style: normal; }
.dc-info { display: grid; gap: 8px; padding: 24px; background: var(--c-white); border: 1px solid var(--c-line); border-top: 4px solid var(--c-accent); border-radius: var(--radius); justify-items: start; }
.dc-info h3 { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; }
.dc-info h3 span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c-dark); color: #fff; font-size: 1.05rem; }
.dc-label { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); margin-top: 6px; }
.dc-add { margin-top: 8px; }
.dc-add .on, .dc-add[aria-pressed="true"] .off { display: none; }
.dc-add[aria-pressed="true"] .on { display: inline; }
.dc-add[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.dc-cart { display: grid; gap: 12px; padding: 18px 20px; background: color-mix(in srgb, var(--c-accent) 14%, #fff); border-radius: var(--radius); }
.dc-cart .ctas { align-items: center; }
@media (max-width: 960px) { .dc { grid-template-columns: 1fr; gap: 24px; } .dc-side { display: flex; flex-direction: column; } .dc-list { order: 3; } }
@media (max-width: 520px) { .dc-pin { width: 36px; height: 36px; margin: -18px 0 0 -18px; font-size: .95rem; } .dc-list { grid-template-columns: 1fr; } .dc-info { padding: 20px; } }

/* ---------- roof price + payment estimator ---------- */
.re { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.re-inputs { display: grid; gap: 26px; padding: 30px; background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow); }
.re-field { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.re-field > label, .re-field legend { display: flex; justify-content: space-between; align-items: baseline; width: 100%; font: 700 1.1rem var(--f-heading); text-transform: uppercase; letter-spacing: .04em; padding: 0; }
.re-field output { font: 800 1.5rem var(--f-heading); color: var(--c-primary); }
.re input[type="range"] { width: 100%; accent-color: var(--c-primary); height: 32px; }
.re-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--c-muted); margin-top: -6px; }
.re-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.re-seg-3 { grid-template-columns: repeat(3, 1fr); }
.re-mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.re-seg label, .re-mats label { position: relative; cursor: pointer; }
.re-seg input, .re-mats input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.re-seg span, .re-mats span { display: grid; gap: 3px; height: 100%; min-height: 48px; align-content: center; padding: 10px 14px; border: 2px solid var(--c-line); border-radius: var(--radius); font-weight: 700; background: var(--c-white); transition: border-color .15s, background .15s; }
.re-seg span { text-align: center; }
.re small { font-weight: 500; font-size: .8rem; color: var(--c-muted); line-height: 1.3; }
.re input:checked + span { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 8%, #fff); box-shadow: inset 0 0 0 1px var(--c-primary); }
.re input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.re-result { position: sticky; top: 110px; display: grid; gap: 6px; padding: 30px; background: var(--c-dark); color: #fff; border-radius: var(--radius); border-top: 6px solid var(--c-accent); justify-items: start; }
.re-label { font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.re-price { font: 800 clamp(2.1rem, 4vw, 2.9rem)/1.05 var(--f-heading); color: var(--c-accent); font-variant-numeric: tabular-nums; }
.re-squares { color: rgba(255, 255, 255, .75); font-size: .92rem; }
.re-monthly { width: 100%; margin: 16px 0 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .16); display: grid; gap: 2px; }
.re-pay { font: 700 1.6rem var(--f-heading); font-variant-numeric: tabular-nums; }
.re-pay b { color: #fff; }
.re-terms { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.re-result .fine { font-size: .8rem; color: rgba(255, 255, 255, .62); margin-top: 10px; }
.re-mini { display: none; }
@media (max-width: 960px) {
	.re { grid-template-columns: 1fr; } .re-result { position: static; }
	.re-mini { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; position: sticky; z-index: 2; top: 76px; margin: -10px -10px 0; padding: 12px 14px; background: var(--c-dark); color: #fff; border-radius: var(--radius); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; box-shadow: var(--shadow); }
	.re-mini b { font: 800 1.25rem var(--f-heading); letter-spacing: 0; color: var(--c-accent); font-variant-numeric: tabular-nums; }
}
@media (max-width: 520px) { .re-inputs, .re-result { padding: 22px; } .re-seg-3 { grid-template-columns: 1fr; } .re-seg-3 span { text-align: left; } }

/* ---------- before / after slider ---------- */
.ba { margin: 0 auto; max-width: 1100px; display: grid; gap: 12px; }
.ba-frame { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; touch-action: pan-y; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-frame::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, .4); pointer-events: none; }
.ba-handle { position: absolute; z-index: 2; top: 50%; left: var(--pos); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--c-accent); border: 3px solid #fff; display: grid; place-items: center; box-shadow: var(--shadow); pointer-events: none; }
.ba-handle svg { width: 24px; height: 24px; fill: none; stroke: var(--c-dark); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ba-tag { position: absolute; z-index: 1; top: 16px; padding: 6px 12px; border-radius: var(--radius); background: rgba(20, 26, 22, .78); color: #fff; font: 700 .85rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.ba-tag-before { left: 16px; } .ba-tag-after { right: 16px; background: var(--c-accent); color: var(--c-dark); }
.ba-frame input[type="range"] { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-frame:has(input:focus-visible) .ba-handle { outline: 3px solid #fff; outline-offset: 3px; }
.ba figcaption { text-align: center; color: var(--c-muted); font-size: .92rem; }
@media (max-width: 600px) { .ba-frame { aspect-ratio: 4 / 3; } .ba-tag { top: 10px; font-size: .74rem; } .ba-tag-before { left: 10px; } .ba-tag-after { right: 10px; } }
/* Phones: 44px pins and slider thumb track (Kristin's tap-target rule) */
@media (max-width: 520px) { .dc-pin { width: 44px; height: 44px; margin: -22px 0 0 -22px; } }
@media (max-width: 700px) { .re-field input[type="range"] { height: 44px; } }
