/* Shared by calculator.html and estimate.html. */
.calc { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc .form-card { padding: 26px; }
.calc h2 { font-size: 1.3rem; margin-bottom: 4px; }
.calc-group { margin-bottom: 20px; }
.calc-group > .glabel { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 8px; }
.hint { color: var(--faint); font-size: 0.82rem; margin: 6px 0 0; }
.chip-row input { width: 92px; background: var(--bg-2); border: 1px solid var(--line-strong); color: #fff; border-radius: 30px; padding: 6px 12px; font: 600 0.88rem var(--font); }
.chip-row input.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chip-row input:focus { outline: 0; border-color: var(--brand); }
.chip small { font-weight: 500; opacity: 0.75; }
.run-row { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.run-row .field { margin-bottom: 10px; }
.run-row .field label, .leg label { font-size: 0.82rem; }
.run-row .opt { color: var(--faint); font-weight: 500; }
.run-top { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: end; }
.legs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0 10px; align-items: end; }
.leg-in { display: flex; gap: 6px; }
.leg-in input { min-width: 0; }
.leg-in .x-btn { flex: 0 0 36px; margin-bottom: 0; }
.leg-add { margin-bottom: 10px; height: 46px; }
.run-nums { display: grid; gap: 10px; align-items: end; }
.run-auto { margin: -2px 0 8px; min-height: 1em; }
.x-btn { margin-bottom: 10px; height: 46px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; }
.x-btn:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.x-btn:disabled { opacity: 0.3; cursor: default; }
.seg { display: inline-flex; margin-bottom: 10px; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; height: 46px; }
.seg button { background: transparent; border: 0; color: var(--muted); font: 600 0.85rem var(--font); padding: 0 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.fold { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--bg-2); }
.fold summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fold summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "\f054"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 0.7rem; color: var(--muted); transition: transform 0.15s ease; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold-title { font-weight: 700; }
.fold-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border-radius: 20px; padding: 2px 8px; }
.fold-sum { color: var(--muted); font-size: 0.86rem; margin-left: auto; }
.fold-body { padding: 4px 16px 6px; }
.est-step { font-size: 1.05rem; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.money-in { display: flex; align-items: center; gap: 8px; }
.money-in span { color: var(--muted); font-weight: 700; }
.rate-field { max-width: 220px; margin-bottom: 6px; }
.hint.warn-text { color: var(--danger); }
.price-runs { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 12px; }
.price-runs th, .price-runs td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.price-runs thead th { color: var(--faint); font-weight: 600; font-size: 0.78rem; border-top: 0; }
.price-runs input { width: 84px; background: var(--bg-2); border: 1px solid var(--line-strong); color: #fff; border-radius: 8px; padding: 7px 8px; font: 400 0.9rem var(--font); }
.price-runs .amt { text-align: right; font-weight: 700; white-space: nowrap; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto 44px; gap: 8px; align-items: start; }
.line-row > input { height: 46px; background: var(--bg-2); border: 1px solid var(--line-strong); color: #fff; border-radius: 10px; padding: 0 12px; font: 400 0.95rem var(--font); min-width: 0; margin-bottom: 10px; }
@media (max-width: 560px) { .line-row { grid-template-columns: minmax(0, 1fr) auto 44px; } .line-row > input:first-child { grid-column: 1 / -1; } }
.photo-add { cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-item { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 6px; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.photo-item .x-btn { position: absolute; top: 10px; right: 10px; height: 30px; width: 30px; margin: 0; background: rgba(0, 0, 0, 0.6); }
.photo-item input, .photo-item select { width: 100%; background: var(--surface); border: 1px solid var(--line-strong); color: #fff; border-radius: 8px; padding: 6px 8px; font: 400 0.82rem var(--font); }
.est-card h2 { margin-bottom: 14px; }
.est { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.est th, .est td { padding: 8px 2px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 500; }
.est td { text-align: right; white-space: nowrap; font-weight: 600; }
.est th .muted { font-size: 0.82rem; margin-left: 4px; }
.est tr.rule th, .est tr.rule td { border-top: 1px solid var(--line-strong); }
.est tr.disc td, .est tr.disc th { color: var(--brand); }
.est tr.total th, .est tr.total td { border-top: 2px solid var(--text); font-weight: 800; font-size: 1.05rem; }
.est-h { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
.pdf-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.kit-pick { margin-bottom: 12px; }
.kit-sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; font-size: 0.93rem; }
.parts td.plain { color: var(--text); font-weight: 600; }
.parts td.extra { color: var(--free); }
.tag.opt { background: var(--free-soft); color: var(--free); vertical-align: 2px; }
.calc-basenote { margin: -6px 0 16px; }
.run-color { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 4px; }
.mini-label { font-weight: 600; font-size: 0.82rem; }
.run-color .seg { height: 40px; }
.run-color .seg button { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); display: inline-block; }
.sw-white { background: #f4f6f8; }
.sw-black { background: #111; }
.need-pick { color: var(--danger); font-size: 0.85rem; font-weight: 600; }
.run-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kit-note { display: block; color: var(--faint); font-size: 0.82rem; margin-top: 6px; }
.thanks { color: var(--brand); font-weight: 700; margin: 14px 0 0; }
.price-runs td.own { color: var(--free); font-weight: 700; }
.send-mode { margin-bottom: 8px; }
.send-to { color: var(--muted); margin: 0 0 14px; }
.send-to strong { color: var(--text); }
.link-btn { background: none; border: 0; color: var(--brand); font: 600 0.82rem var(--font); cursor: pointer; float: right; padding: 0; }
#mail-body { font-size: 0.92rem; line-height: 1.5; }
.status:empty { display: none; }
.status { color: var(--free); font-weight: 600; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
#calc-reset:disabled { opacity: 0.5; cursor: default; transform: none; }
.calc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.calc-stats > div { background: var(--surface); padding: 16px 12px; text-align: center; }
.calc-stats .num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; line-height: 1.1; }
.calc-stats .lbl { display: block; font-size: 0.85rem; font-weight: 600; }
.calc-stats .sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) { .calc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc-warn { margin-bottom: 18px; }
.calc-warn p { color: #f3c2c8; font-size: 0.92rem; margin: 0 0 8px; }
.calc-warn i { color: var(--danger); margin-right: 4px; }
.calc-run { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.calc-run-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.calc-run-head h3 { font-size: 1.08rem; margin: 0; }
.calc-run-head .muted { font-size: 0.85rem; }
.run-bar { display: flex; gap: 3px; height: 26px; margin-bottom: 14px; }
.run-bar span { flex-basis: 0; min-width: 24px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; }
.seg-channel { background: var(--brand); color: var(--brand-ink); }
.seg-tee { background: var(--free); color: #2a1a00; }
.seg-over { background: var(--danger); color: #2a0006; }
.feed-list { list-style: none; padding: 0; margin: 0; }
.feed-list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.feed-where { font-weight: 700; }
.feed-what { color: #d3dae6; }
.feed-load { color: var(--faint); font-size: 0.82rem; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; margin-right: 4px; }
.tag.channel { background: var(--brand-soft); color: var(--brand); }
.tag.tee { background: var(--free-soft); color: var(--free); }
.tag.over { background: rgba(240, 122, 134, 0.14); color: var(--danger); }
.calc-sub { font-size: 1rem; margin: 22px 0 10px; }
.load { margin-bottom: 12px; }
.load-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.86rem; margin-bottom: 6px; }
.load-head .ok { color: var(--muted); }
.load-head .bad { color: var(--danger); font-weight: 700; }
.load-bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 6px; }
.load-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: 6px; }
.load-bar span.bad { background: var(--danger); }
.load-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.parts { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.parts th, .parts td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.parts th { font-weight: 600; }
.parts td:nth-child(2) { font-weight: 800; color: var(--brand); white-space: nowrap; }
.parts td.muted { font-size: 0.82rem; }
	

/* ---- 2026-10-14 split: plain answer, steps ---- */
.calc-hero { padding-bottom: 36px; }
.calc-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.intro { margin: 0 0 18px; }
.calc-side { display: grid; gap: 14px; align-content: start; }
.run-more { margin: 0 0 6px; font-size: 0.86rem; }
.run-more summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.run-more[open] summary { margin-bottom: 8px; }
.run-more .run-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sum-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sum-card.empty p { color: var(--muted); margin: 0; }
.sum-big { font-size: 1.1rem; font-weight: 600; margin-bottom: 14px; }
.sum-big .num { font-size: 2.6rem; font-weight: 800; color: var(--brand); letter-spacing: -0.03em; margin-right: 4px; }
.sum-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.sum-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.sum-item > div > strong { display: block; margin-bottom: 2px; }
.sum-list { margin: 6px 0 0; padding-left: 18px; color: #d3dae6; }
.sum-list li { margin-bottom: 4px; }
.sum-warn { border-top: 1px solid var(--line); padding-top: 12px; }
.sum-warn p { color: #f3c2c8; font-size: 0.9rem; margin: 0 0 6px; }
.sum-warn i { color: var(--danger); margin-right: 4px; }
.details-fold { background: var(--surface); }
.details-fold .fold-body { padding-top: 0; }
.est-cta { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--text); }
.est-cta:hover { text-decoration: none; border-color: var(--brand); }
.est-cta > i:first-child { color: var(--brand); font-size: 1.3rem; }
.est-cta span { flex: 1; color: var(--muted); }
.est-cta span strong { color: var(--text); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.steps button { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 0.95rem var(--font); cursor: pointer; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.steps button[aria-current="step"] { border-color: var(--brand); color: var(--text); }
.steps button[aria-current="step"] .n { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.steps button.done .n { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
@media (max-width: 560px) { .steps button { flex-direction: column; gap: 4px; font-size: 0.8rem; } }
.step-nav { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.est-step.first { border-top: 0; padding-top: 0; margin-top: 8px; }
.est-step .opt { color: var(--faint); font-weight: 500; font-size: 0.82rem; }
.money-in.sm input { width: 84px; }
.money-in.sm { gap: 4px; }
#app { scroll-margin-top: 80px; }
.sum-sub { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.import-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.import-row label { cursor: pointer; }
.saved-note { color: var(--faint); font-size: 0.8rem; }
.saved-note i { color: var(--brand); margin-right: 3px; }
.saved-note.bad, .saved-note.bad i { color: var(--danger); }
/* ---- the build list: lengths, corners, end caps, section total ---- */
.build { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); margin: 10px 0 10px; overflow: hidden; }
.build-row { display: grid; grid-template-columns: 30px 128px minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.build-row:first-child { border-top: 0; }
.build-tag { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; background: var(--brand-soft); color: var(--brand); }
.build-row.corner, .build-row.end { background: rgba(255, 255, 255, 0.02); }
.build-row.corner .build-tag, .build-row.end .build-tag { background: transparent; color: var(--muted); }
.build-in { display: flex; align-items: center; gap: 6px; }
.build-in input { width: 100%; min-width: 0; height: 40px; background: var(--surface); border: 1px solid var(--line-strong); color: #fff; border-radius: 8px; padding: 0 10px; font: 400 1rem var(--font); }
.build-in input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.build-in .unit-label { color: var(--faint); font-size: 0.82rem; }
.build-what { font-weight: 600; font-size: 0.9rem; }
.build-mat { font-size: 0.86rem; color: #d3dae6; }
.build-row .x-btn { height: 34px; margin: 0; }
.build-total { padding: 10px 12px; border-top: 1px solid var(--line-strong); font-size: 0.86rem; color: var(--text); font-weight: 600; }
.build-total:empty { display: none; }
.build-total span { color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; margin-right: 6px; }
.leg-add { margin-bottom: 12px; }
@media (max-width: 560px) {
	.build-row { grid-template-columns: 30px minmax(0, 1fr) 36px; }
	.build-row .build-mat { grid-column: 2 / 3; grid-row: 2; }
	.build-row.leg .build-in { grid-column: 2; }
	.build-row.corner .build-mat, .build-row.end .build-mat { grid-row: auto; grid-column: auto; }
	.build-row.corner, .build-row.end { grid-template-columns: 30px auto minmax(0, 1fr); }
	.build-row.corner > span:last-child, .build-row.end > span:last-child { display: none; }
}
.seg.seg-sm { height: 32px; margin: 0; border-radius: 8px; justify-self: start; }
.seg.seg-sm button { padding: 0 10px; font-size: 0.8rem; }

/* Action colors (owner, 2026-10-14: "make the buttons ... distinct colors to stand out"): teal adds to a
   section (corner, jump), amber adds a whole section, red outline starts over / resets. */
.btn.btn-add { background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(46, 196, 182, 0.55); }
.btn.btn-add:hover { background: rgba(46, 196, 182, 0.24); }
.btn.btn-add-section { background: var(--free); color: #2a1a00; border: 1px solid var(--free); }
.btn.btn-add-section:hover { background: #ffc85c; }
.btn.btn-reset { background: transparent; color: var(--danger); border: 1px solid rgba(240, 122, 134, 0.6); }
.btn.btn-reset:hover { background: rgba(240, 122, 134, 0.1); }
@media (max-width: 560px) { .steps { gap: 4px; } .steps button { padding: 10px 2px; font-size: 0.72rem; } }
.need-fold { border-left: 3px solid var(--free); }
.need-fold > summary .fold-sum { color: var(--text); }
