/* The tool widget (partials/tool.php, partials/result.php) on top of style.css: pose hint, camera button, progress
   steps, the result card. Same colours and shapes as the design (panel, tabs, upload zone). */
@import url('../vendor/flaticon/css/rounded.css');

.tool-wrap { min-width: 0; }

/* Compact photographic guidance; full requirements expand on demand or after a rejection. */
.photo-req { margin-bottom: 16px; padding: 0; border: 0; background: transparent; }
.photo-req-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: center; }
.req-examples { display: block; width: 100%; height: auto; border-radius: 12px; }
.photo-req h4 { font-size: 16px; line-height: 1.3; margin: 0 0 10px; }
.photo-req-essentials { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.photo-req-essentials li { display: flex; gap: 7px; font-size: 12px; line-height: 1.45; color: #345347; }
.photo-req-essentials i { color: #267754; flex: 0 0 auto; margin-top: 2px; }
.photo-req-essentials i::before { content: "✓"; font-family: Arial, sans-serif !important; }
.photo-req-details { margin-top: 12px; border-bottom: 1px solid #c8ded2; padding-bottom: 12px; }
.photo-req-details summary { width: fit-content; cursor: pointer; font-size: 12px; color: #345347; text-underline-offset: 3px; }
.photo-req-details summary { display: flex; align-items: center; gap: 8px; }
.photo-req-details summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; }
.photo-req-details[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.photo-req-details summary:hover { color: var(--green); text-decoration: underline; }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; padding-top: 16px; }
.req-col strong { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; }
.req-col strong i { font-size: 14px; line-height: 1; }
.req-do strong { color: #14563c; }
.req-dont strong { color: #8a1c1c; }
.req-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-col li { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; font-size: 12px; line-height: 1.4; }
.req-col li i { flex: 0 0 auto; font-size: 14px; line-height: 1.3; }
.req-do li i { color: #1f8a5b; }
.req-dont li i { color: #b03030; }
.req-col li.flag { background: #fbe9c3; outline: 2px solid #d8a93d; border-radius: 4px; }
@media (max-width: 700px) {
  .photo-req-preview { gap: 12px; }
  .photo-req h4 { font-size: 14px; margin-bottom: 7px; }
  .photo-req-essentials { gap: 6px; }
  .photo-req-essentials li { font-size: 11px; }
}
@media (max-width: 380px) {
  .photo-req-preview { gap: 10px; }
  .photo-req h4 { font-size: 13px; }
  .photo-req-essentials li { font-size: 10px; }
  .req-grid { grid-template-columns: 1fr; }
}
.sex-pick { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.sex-pick legend { float: left; padding: 0; margin: 0 12px 0 0; font-size: 14px; font-weight: 700; line-height: 40px; }
.sex-pick label { position: relative; display: inline-block; margin-right: 8px; }
.sex-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.sex-pick label span { display: inline-block; padding: 8px 20px; border: 1.5px solid var(--green); border-radius: 12px; font-size: 14px; font-weight: 700; background: #fff; color: var(--green); }
.sex-pick input:checked + span { background: var(--green); color: #fff; }
.sex-pick input:focus-visible + span { outline: 3px solid #38a67c; outline-offset: 2px; }

/* File and camera */
.upload-row { display: flex; gap: 10px; align-items: stretch; }
.upload-row .upload-zone { flex: 1; min-width: 0; text-align: center; }
.camera-btn {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 104px;
  border: 1.5px solid var(--green);
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  cursor: pointer;
}
.camera-btn[hidden] { display: none !important; }
.camera-btn .icon { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.camera-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.camera-btn:focus-within { outline: 3px solid #38a67c; outline-offset: 3px; }
.upload-zone.drag { background: #d3eddf; }
.upload-zone .file-name { color: #335347; }
.upload-zone.has-photo .upload-copy { text-align: left; }

/* Fields: unit labels, the error state */
.unit { font-weight: 400; color: #335347; }
.input-grid input[aria-invalid=true] { border-color: #a02323; background: #fff5f5; }
.input-grid input:focus-visible, .input-grid select:focus-visible { outline-offset: 1px; }
.consent input[aria-invalid=true] { border-color: #a02323; box-shadow: 0 0 0 2px #f2c4c4; }
.consent input:focus-visible { outline: 3px solid #38a67c; outline-offset: 2px; }
.tool-status.error { background: #fbe3e3; color: #5c1111; border: 1px solid #e3a6a6; }
.tool-status a { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

/* Progress: while the estimate runs the form collapses; photo, big steps and a bar take its place */
.tool-progress { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: center; padding: 10px 2px 8px; }
.tool-progress[hidden], #tool-body[hidden] { display: none !important; }
.progress-photo { width: 150px; height: 200px; object-fit: cover; border-radius: 16px; border: 2px solid #b1d4c1; background: #cbe5d4; }
.progress-photo[hidden] { display: none; }
.tool-progress:has(.progress-photo[hidden]) { grid-template-columns: minmax(0, 1fr); }
.progress-title { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 16px; }
.tool-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 20px; color: var(--ink); }
.tool-steps li { position: relative; padding-left: 40px; color: #5b7a6c; line-height: 1.3; }
.tool-steps li:before { content: ''; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; border: 2.5px solid #a9cdb9; }
.tool-steps li.active { color: var(--ink); font-weight: 800; }
.tool-steps li.active:before { border-color: var(--green); border-top-color: transparent; animation: tool-spin .8s linear infinite; }
.tool-steps li.done { color: var(--ink); font-weight: 600; }
.tool-steps li.done:before { background: var(--green); border-color: var(--green); }
.tool-steps li.done:after { content: '\f3c8'; font-family: uicons-regular-rounded; position: absolute; left: 5px; top: 6px; font-size: 14px; line-height: 1; color: #fff; }
@keyframes tool-spin { to { transform: rotate(360deg); } }
@keyframes tool-creep { from { width: 75%; } to { width: 96%; } }
@media (prefers-reduced-motion: reduce) { .tool-steps li.active:before { animation: none; } .progress-bar i { animation: none !important; } }
.progress-bar { height: 12px; margin: 20px 0 10px; border-radius: 12px; background: #bce4cd; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 4%; border-radius: 12px; background: linear-gradient(90deg, #14563c, #38a67c); transition: width .7s ease; }
.progress-bar[data-step=load] i { width: 15%; }
.progress-bar[data-step=check] i { width: 40%; }
.progress-bar[data-step=estimate] i { width: 75%; animation: tool-creep 28s ease-out forwards; }
.progress-hint { font-size: 14px; color: #335347; margin: 0; }
.tool[aria-busy=true] #tool-submit { opacity: .6; cursor: progress; }
#tool-body > .button { width: 100%; margin-top: 16px; font-size: 20px; padding: 12px; }
@media (max-width: 700px) { #tool-body > .button { font-size: 16px; margin-top: 14px; padding: 13px 6px; border-radius: 12px; } }

/* Buttons */
.button.small { font-size: 16px; padding: 9px 18px; border-radius: 12px; margin-top: 12px; }
.button.ghost { background: transparent; color: var(--green); border: 2px solid var(--green); font-size: 17px; padding: 9px 20px; margin-top: 14px; }
.button.ghost:hover { background: #d3eddf; }
.button:disabled { opacity: .6; cursor: progress; }

/* The result card: photo + number on the left, details on the right, the whole hero wide */
.hero.has-result { grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
.hero.has-result .hero-title h1 { font-size: 34px; line-height: 1.15; }
.hero.has-result .hero-title h1 br, .hero.has-result .underline, .hero.has-result .hero-title .eyebrow { display: none; }
.hero.has-result .hero-title { margin-top: 0; }
.result-card { padding: 26px 30px 28px; border-radius: 24px; }
.result-card:focus { outline: none; }
.result-card:focus-visible { outline: 3px solid #38a67c; outline-offset: 4px; }
.result-head { margin-bottom: 18px; }
.result-title { font-size: 32px; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 6px; }
.result-verdict { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0; color: #1d3a2e; }
.result-verdict:empty { display: none; }
.verdict-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.verdict-pick[hidden] { display: none; }
.verdict-pick button { border: 1.5px solid var(--green); background: #fff; color: var(--green); border-radius: 12px; padding: 7px 18px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.verdict-pick button:hover { background: #d3eddf; }
.verdict-pick button:focus-visible { outline: 3px solid #38a67c; outline-offset: 2px; }
.result-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 30px; align-items: start; }
.result-card[data-mode=measure] .result-grid { display: block; }
.result-left { min-width: 0; }
.result-right { min-width: 0; }
.result-photo { margin: 0 0 14px; border-radius: 18px; overflow: hidden; background: #cbe5d4; text-align: center; }
.result-photo[hidden] { display: none; }
.result-photo img { display: inline-block; max-width: 100%; max-height: 420px; width: auto; height: auto; vertical-align: top; }
.result-main { display: flex; flex-direction: column; gap: 2px; }
.result-left .result-main { padding: 14px 18px 12px; border-radius: 18px; background: #fff; border: 1px solid #b1d4c1; }
.result-main small { font-size: 13px; font-weight: 600; color: #335347; }
.result-range { font-size: 52px; line-height: 1.05; letter-spacing: -.04em; font-weight: 800; color: var(--green); }
.result-mid { font-size: 15px; }
.range-scale { display: block; position: relative; height: 9px; margin: 8px 0 4px; border-radius: 9px; background: #bce4cd; }
.range-scale b { position: absolute; top: 0; height: 100%; border-radius: 9px; background: #14563c; min-width: 6px; }
.range-ticks { display: flex; justify-content: space-between; font-size: 11px; color: #335347; }
.result-note { font-size: 13px; line-height: 1.4; margin: 8px 0 0; color: #1d3a2e; }
.result-facts { margin: 0 0 8px; }
.result-facts > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; margin: 7px 0; font-size: 14px; line-height: 1.35; align-items: start; }
.result-facts dd { background: transparent; padding: 0; border-radius: 0; font-weight: 500; white-space: normal; }
.result-facts dd b { background: var(--accent); border-radius: 10px; padding: 1px 8px; font-weight: 800; }
.result-facts dd > span { display: inline-block; margin: 0 8px 4px 0; white-space: nowrap; }
.result-facts dd[data-r=quality] { font-weight: 800; }
.result-facts dd[data-r=quality].limited { color: #6b3d00; }
.result-cross { border-top: 1px solid #87b79d; margin-top: 10px; padding-top: 10px; }
.result-cross h4 { font-size: 15px; margin-bottom: 6px; }
.cross-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0; }
.cross-grid > div { border: 1px solid #b1d4c1; border-radius: 12px; padding: 8px 12px; background: #f8fffa; }
.cross-grid span { display: block; font-size: 13px; font-weight: 700; }
.cross-grid strong { display: block; font-size: 26px; letter-spacing: -.03em; line-height: 1.2; }
.badge { display: inline-block; background: #fbe9c3; color: #4d3000; border: 1px solid #d8a93d; border-radius: 12px; padding: 1px 10px; font-weight: 800; font-size: 13px; }
.badge-disagree { font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.cross-form { margin-top: 6px; }
.cross-form summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--green); padding: 4px 0; }
.cross-form[open] .input-grid { margin: 10px 0; }
.result-disclaimer { display: block; margin-top: 12px; font-size: 12px; color: #335347; }
.result-card .privacy-note { text-align: left; margin-top: 4px; }

/* Save & track progress under the result: a clean banner */
.result-actions { margin-top: 22px; display: grid; gap: 14px; }
.result-actions > * { margin: 0; }
.result-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: 18px; background: #fff; border: 1.5px solid #7dc2a0; }
.result-save[hidden], .result-saved[hidden] { display: none; }
.result-save-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font-size: 20px; }
.result-save-copy { flex: 1 1 220px; min-width: 0; }
.result-save-copy strong { display: block; font-size: 17px; line-height: 1.25; }
.result-save small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: #1d3a2e; }
.result-save .button { margin: 0; flex: 0 0 auto; font-size: 17px; padding: 11px 22px; white-space: nowrap; }
.result-saved { padding: 12px 16px; border-radius: 14px; background: #fff; border: 1.5px solid #7dc2a0; font-weight: 700; }
.result-right .result-save, .result-right .result-saved { margin: 18px 0 14px; }
.result-actions #result-again { justify-self: start; margin-top: 0; }
.result-actions .report-offer { border: 1.5px solid #b1d4c1; border-radius: 18px; padding: 16px 20px 18px; background: #f8fffa; }
.result-actions .offer-title { font-size: 19px; }
.result-actions .offer-lead { font-size: 14px; margin-bottom: 12px; }

/* The report offer under the result (partials/offer.php) and on Account → Reports */
.report-offer { border-top: 1px solid #87b79d; margin-top: 14px; padding-top: 12px; }
.report-offer[hidden], .report-offer [hidden] { display: none !important; }
.offer-title { font-size: 17px; margin-bottom: 4px; }
.offer-lead { font-size: 13px; line-height: 1.4; margin: 0 0 10px; color: #1d3a2e; }
.offer-packs { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.offer-pack { position: relative; display: flex; flex-direction: column; gap: 2px; border: 2px solid #b1d4c1; border-radius: 14px; padding: 10px 12px 10px 38px; background: #f8fffa; cursor: pointer; }
.offer-pack input { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.offer-pack:has(input:checked) { border-color: var(--green); background: #e5faed; box-shadow: 0 0 0 1px var(--green); }
.offer-pack:focus-within { outline: 3px solid #38a67c; outline-offset: 2px; }
.offer-pack-name { font-weight: 800; font-size: 15px; }
.offer-pack-name em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--green); color: #e5faed; border-radius: 8px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
.offer-pack-price { font-size: 26px; letter-spacing: -.03em; line-height: 1.15; color: var(--green); }
.offer-pack small { font-size: 12px; color: #335347; }
.offer-actions .button, .offer-create .button { margin-top: 12px; width: 100%; text-align: center; }
.offer-actions .plan-form { margin: 0; }
.offer-create .input-grid { margin: 8px 0; }
.offer-create .input-grid small { font-weight: 400; color: #335347; }
.offer-subject { border: 0; padding: 0; margin: 10px 0 6px; min-width: 0; }
.offer-subject legend { font-weight: 800; font-size: 14px; padding: 0; margin-bottom: 2px; }
.offer-subject .result-note { margin: 0 0 8px; }
.offer-subject-list { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-person { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; border: 2px solid #b1d4c1; border-radius: 12px; padding: 6px 10px; background: #f8fffa; cursor: pointer; font-size: 14px; font-weight: 700; }
.offer-person input[type=radio] { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.offer-person:has(input[type=radio]:checked) { border-color: var(--green); background: #e5faed; box-shadow: 0 0 0 1px var(--green); }
.offer-person:focus-within { outline: 3px solid #38a67c; outline-offset: 2px; }
.offer-person small { font-weight: 400; font-size: 12px; color: #335347; }
.offer-person-new input[type=text] { width: 13em; max-width: 100%; min-height: 32px; padding: 4px 8px; font-size: 14px; }
.offer-subject[data-invalid] .offer-person { border-color: #b3261e; }
.report-offer p.offer-credits { font-size: 14px; line-height: 1.4; font-weight: 700; margin: 0 0 4px; }
.offer-photo small { display: block; font-size: 12px; color: #335347; }
.report-offer .offer-progress p { font-size: 14px; line-height: 1.45; font-weight: 500; margin: 4px 0; }
.offer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.offer-links .button { margin-top: 6px; }
.offer-note { font-size: 12px; line-height: 1.4; color: #335347; margin: 10px 0 0; }
.report-offer .tool-status, .report-offer .form-error { font-size: 13px; line-height: 1.4; font-weight: 600; margin-top: 10px; }
.report-offer .form-error { color: #8a1c1c; }
.reports-create { margin: 14px 0 18px; }
.reports-create h3 { font-size: 18px; margin-bottom: 4px; }
.reports-create .report-offer { max-width: 640px; }
.reports-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin: 14px 0 18px; }
.reports-pick label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.reports-pick select { min-height: 44px; min-width: 260px; max-width: 100%; border: 1.5px solid #87b79d; border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 500; background: #fff; color: var(--ink); }
.reports-pick .button { margin: 0; }
.reports-credits { font-weight: 800; }

/* Hidden by mode: photo-only and measure-only parts of the card */
.result-card[data-mode=measure] [data-only=photo],
.result-card[data-mode=photo] [data-only=measure] { display: none !important; }

@media (max-width: 700px) {
  .photo-req { padding: 10px 10px 12px; }
  .req-grid { gap: 8px 10px; }
  .req-col li { font-size: 12px; padding: 4px 6px; gap: 6px; }
  .camera-btn { flex-basis: 84px; font-size: 12px; }
  .camera-btn .icon { width: 22px; height: 22px; }
  .upload-zone .file-name { font-size: 10px; }
  .tool-progress { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .progress-photo { width: 96px; height: 132px; border-radius: 12px; }
  .progress-title { font-size: 19px; margin-bottom: 10px; }
  .tool-steps { font-size: 16px; gap: 9px; }
  .tool-steps li { padding-left: 32px; }
  .tool-steps li:before { width: 18px; height: 18px; top: 1px; }
  .tool-steps li.done:after { left: 4px; top: 4px; font-size: 11px; }
  .progress-hint { font-size: 12px; }
  .result-card { padding: 16px 14px 18px; }
  .result-title { font-size: 24px; }
  .result-verdict { font-size: 15px; }
  .result-grid { grid-template-columns: 1fr; gap: 16px; }
  .result-photo img { max-height: 340px; }
  .result-range { font-size: 44px; }
  .result-facts > div { grid-template-columns: 1fr; gap: 1px; }
  .result-facts dt { font-size: 12px; color: #335347; }
  .cross-grid strong { font-size: 22px; }
  .result-save { padding: 12px 12px; gap: 10px 12px; }
  .result-save .button { width: 100%; }
  .result-actions .report-offer { padding: 14px 12px; }
  .offer-packs { grid-template-columns: 1fr; gap: 8px; }
  .offer-pack-price { font-size: 22px; }
}
@media (max-width: 359px) {
  .req-grid { grid-template-columns: 1fr; }
}

/* The calculator widget (partials/calculator.php, public/js/calc-widget.js) and the derived numbers of the Measurements tab */
.calc-widget { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.calc-widget [hidden] { display: none !important; }
.calc-widget .input-grid label { display: flex; flex-direction: column; gap: 4px; }
.calc-widget .field-error { color: #8a1c1c; font-size: 12px; line-height: 1.3; font-weight: 600; }
.calc-widget .input-grid input[aria-invalid=true] { border-color: #a02323; background: #fff5f5; }
.opt { font-weight: 400; font-size: 12px; color: #335347; }
.calc-result:focus { outline: none; }
.calc-result:focus-visible { outline: 3px solid #38a67c; outline-offset: 4px; }
.calc-main { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.calc-main small { font-size: 13px; font-weight: 600; color: #335347; }
.calc-value { font-size: 44px; line-height: 1.08; letter-spacing: -.04em; font-weight: 800; color: var(--green); }
.calc-sub { display: block; font-size: 13px; line-height: 1.35; color: #335347; font-weight: 500; }
.calc-list dd b { white-space: nowrap; }
.calc-bmi { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 10px; padding: 14px 16px; border-radius: 14px; background: #f1faf5; border: 1px solid #cfe3d6; }
.calc-bmi small { font-size: 13px; font-weight: 600; color: #335347; }
.calc-bmi[hidden] { display: none; }
.calc-bmi-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.calc-bmi .calc-value { font-size: 32px; }
.calc-bmi-class { font-weight: 700; font-size: 15px; color: var(--green); }
.calc-bmi-under, .calc-bmi-over { color: #8a5a00; }
.calc-bmi-obese1, .calc-bmi-obese2, .calc-bmi-obese3 { color: #8c2424; }
.calc-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #87b79d; }
.calc-cta > div { flex: 1 1 240px; }
.calc-cta strong { display: block; font-size: 16px; }
.calc-cta small { font-size: 13px; line-height: 1.35; color: #1d3a2e; }
.derived { border-top: 1px solid #87b79d; margin-top: 10px; padding-top: 10px; }
.derived h4 { font-size: 15px; margin-bottom: 2px; }
.derived[hidden], .derived [hidden] { display: none !important; }
@media (max-width: 700px) {
  .calc-value { font-size: 38px; }
}
.derived .result-facts > div, .calc-list > div { grid-template-columns: 190px minmax(0, 1fr); }
.calc-widget .input-grid label { justify-content: flex-end; }
.calc-cta small { display: block; margin: 2px 0 0; line-height: 1.35; }
@media (max-width: 700px) {
  .derived .result-facts > div, .calc-list > div { grid-template-columns: 1fr; }
  .calc-cta .button { width: 100%; text-align: center; }
}

/* Keep the longer recomp form usable on the first phone screen. */
@media (max-width: 600px) {
  .calc-widget[data-formula="recomposition"] .input-grid { row-gap: 8px; }
}

/* A live report is the primary task, separate from purchase copy and account policies. */
.reports-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 28px; }
.reports-header h2 { margin: 0 0 8px; font-size: 30px; }
.reports-section .reports-header p { font-size: 14px; line-height: 1.55; max-width: 560px; margin: 0; color: #456255; }
.reports-header .scans-actions { flex-shrink: 0; display: flex; flex-direction: column; align-items: end; gap: 6px; }
.reports-header .reports-credits { color: var(--green); font-size: 15px; }
.reports-create { margin: 0 0 24px; }
.reports-create > h3 { font-size: 14px; font-weight: 500; color: #456255; margin-bottom: 14px; }
.reports-create .report-offer { max-width: none; }
.report-offer[data-view="progress"] { border-top: 0; padding-top: 0; margin-top: 0; }
.report-offer[data-view="progress"] > .offer-title,
.report-offer[data-view="progress"] > .offer-lead { display: none; }
.report-generation { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 38px; padding: 38px; border: 1px solid #c7dfd0; border-radius: 20px; background: #fcfefd; }
.report-generation-body { min-width: 0; }
.report-generation .report-generation-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; color: #103e2b; margin: 0 0 12px; font-weight: 800; }
.report-offer .report-generation [data-o="progress-text"] { font-size: 16px; line-height: 1.6; color: #456255; max-width: 460px; margin: 0; }
.report-generation-steps { display: flex; gap: 16px; list-style: none; margin: 24px 0 18px; padding: 0; }
.report-generation-steps li { flex: 1; padding-top: 13px; border-top: 3px solid #dce8e0; font-size: 12px; color: #6c8175; line-height: 1.4; position: relative; }
.report-generation-steps li.is-current { border-color: #2c805b; color: #125638; font-weight: 700; }
.report-generation-steps li.is-done { border-color: #78ae8c; color: #345d45; }
.report-offer .report-generation-aside { font-size: 12px; line-height: 1.6; color: #607869; margin: 0; max-width: 460px; }
.report-generation .offer-links { margin-top: 18px; }
.report-generation .offer-links:empty { display: none; }
.report-generation .offer-links .button { margin: 0; min-width: 220px; padding: 13px 24px; font-size: 17px; text-align: center; }
.report-document { position: relative; height: 208px; width: 152px; margin: 8px auto 14px; }
.report-document-back { position: absolute; inset: 0; background: #e1eee5; border: 1px solid #b9d4c3; border-radius: 9px; transform: rotate(8deg); }
.report-document-page { position: absolute; inset: 0; border: 1px solid #bed6c7; background: #fff; border-radius: 9px; padding: 20px; box-shadow: 0 10px 25px #164b3020; overflow: hidden; }
.report-document-label { color: #276b48; font-size: 12px; font-weight: 800; }
.report-document-chart { display: block; margin: 20px 0 18px; height: 54px; width: 54px; border: 8px solid #e0eee4; border-top-color: #6eaa86; border-right-color: #6eaa86; border-radius: 50%; }
.report-document-lines { display: block; height: 43px; background: repeating-linear-gradient(to bottom,#dbe8df 0 4px,transparent 4px 12px); }
.report-document-page::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent,#a9daba65,transparent); transform: translateY(-100%); animation: report-scan 2.6s ease-in-out infinite; }
.report-document-status { position: absolute; right: -14px; bottom: -14px; width: 44px; height: 44px; border: 5px solid #fcfefd; border-radius: 50%; background: #e1eee5; display: grid; place-items: center; }
.report-document-status::after { content: ''; width: 17px; height: 17px; border: 2px solid #b2d0bd; border-top-color: #226f48; border-radius: 50%; animation: tool-spin 1s linear infinite; }
[data-report-state="ready"] .report-document-page::after { display: none; }
[data-report-state="ready"] .report-document-status { background: #17633f; }
[data-report-state="ready"] .report-document-status::after { content: '✓'; border: 0; border-radius: 0; color: white; width: auto; height: auto; font: 700 20px Arial,sans-serif; animation: none; }
.offer-policy { margin-top: 16px; }
.offer-policy summary { cursor: pointer; color: #526d5d; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.report-offer[data-view="progress"] .offer-policy { margin-top: 18px; }
.reports-section:has([data-view="progress"]) > .scans-keep { display: none; }
.reports-privacy { padding: 20px 28px; }
.reports-privacy > summary { cursor: pointer; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.reports-privacy > summary::after { content: '+'; font-size: 24px; font-weight: 400; }
.reports-privacy[open] > summary::after { content: '−'; }
.reports-privacy[open] > summary { margin-bottom: 24px; }
.result-actions .report-generation { padding: 24px 20px; grid-template-columns: 110px minmax(0,1fr); gap: 22px; }
.result-actions .report-document { width: 98px; height: 145px; }
.result-actions .report-document-page { padding: 14px; }
.result-actions .report-document-chart { width: 38px; height: 38px; border-width: 6px; margin: 12px 0; }
.result-actions .report-generation-title { font-size: 25px; }
@keyframes report-scan { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .report-document-page::after, .report-document-status::after { animation: none; } }
@media (max-width: 700px) {
  .reports-header { flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .reports-header h2 { font-size: 26px; }
  .reports-header .scans-actions { flex-direction: row; align-items: center; gap: 16px; }
  .report-generation, .result-actions .report-generation { padding: 24px 20px; grid-template-columns: 1fr; gap: 18px; }
  .report-document, .result-actions .report-document { width: 95px; height: 130px; margin: 2px auto 14px; }
  .report-document-page { padding: 13px; }
  .report-document-chart { width: 32px; height: 32px; border-width: 5px; margin: 10px 0; }
  .report-document-lines { height: 28px; }
  .report-generation .report-generation-title { font-size: 26px; }
  .report-offer .report-generation [data-o="progress-text"] { font-size: 14px; }
  .report-generation-steps { gap: 10px; margin-top: 20px; }
  .report-generation-steps li { font-size: 11px; }
  .report-generation .offer-links .button { width: 100%; min-width: 0; }
  .reports-privacy { padding: 16px 20px; }
}
