/* LaCurent Auditor (/auditor). Builds on /static/home-lab-3/app.css tokens. */

body.aud { --aud-cell: 44px; }
.aud-top .hl3-top-inner { max-width: 1320px; }
.aud-main { max-width: 1320px; }
.aud .hl3-logo b { background: var(--brand); color: var(--brand-ink); }
.aud-steps { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
.aud-steps::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .aud-steps { justify-content: center; } }
.aud-top-actions { display: flex; align-items: center; gap: 8px; }
.aud-save-state { font-size: 12px; color: var(--mut); white-space: nowrap; }
.aud-save-state.is-warn { color: var(--warn); }

/* ------------------------------------------------------------ band */
.aud-band { display: grid; gap: 12px; }
.aud-band-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.aud-band-classes { display: flex; align-items: center; gap: 10px; }
.aud-badge { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 8px; border-radius: 12px; font: 800 22px/1 var(--display); color: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.aud-badge small { display: block; font: 700 9px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-top: 2px; }
.aud-badge.sm { min-width: 34px; height: 30px; border-radius: 8px; font-size: 14px; }
.aud-badge-wrap { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--mut); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.aud-band-metrics { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.aud-band .hl3-metric b { font-size: 16px; }
.aud-band-status { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aud-band.is-stale .aud-band-classes, .aud-band.is-stale .aud-band-metrics { opacity: .5; }
.aud-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.aud-dot.is-warn { background: var(--warn); }
.aud-dot.is-busy { background: var(--brand); animation: aud-pulse 1s infinite ease-in-out; }
@keyframes aud-pulse { 50% { opacity: .3; } }

/* ------------------------------------------------------------ layout */
.aud-body { align-items: start; }
@media (min-width: 1100px) { .aud .hl3-body { grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); } }
.aud-section-title { margin: 22px 0 8px; color: var(--ink); font-size: 16px; font-weight: 700; }
.aud-section-title:first-child { margin-top: 0; }
.aud-sub { margin: 0 0 12px; color: var(--mut); font-size: 13.5px; max-width: 72ch; }
.aud-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; }
.aud-tabs button { flex: 0 0 auto; border: 1px solid var(--ln); background: var(--card); color: var(--txt); border-radius: 999px; min-height: 38px; padding: 0 14px; font-weight: 650; font-size: 14px; }
.aud-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.aud-tabs button em { font-style: normal; opacity: .7; margin-left: 4px; }

/* ------------------------------------------------------------ fields */
.aud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.aud-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.aud-field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.aud-field.span-2 { grid-column: span 2; }
.aud-field.span-all { grid-column: 1 / -1; }
@media (max-width: 640px) { .aud-field.span-2 { grid-column: auto; } }
.aud-field > span { color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.3; }
.aud-field > span em { font-style: normal; color: var(--mut); font-weight: 500; }
.aud-field small { color: var(--mut); font-size: 12px; line-height: 1.35; }
.aud-field small.is-warn { color: var(--warn); }
.aud-input, .aud-field input, .aud-field select, .aud-field textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--ln); border-radius: 10px; background: var(--card);
  padding: 8px 10px; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.aud-field textarea { min-height: 76px; resize: vertical; line-height: 1.45; font: inherit; font-size: 15px; }
.aud-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.aud-field input:focus, .aud-field select:focus, .aud-field textarea:focus, .aud-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.aud-field input::placeholder { color: color-mix(in srgb, var(--mut) 75%, transparent); }
.aud-field.is-missing input, .aud-field.is-missing select { border-color: color-mix(in srgb, var(--warn) 60%, var(--ln)); background: color-mix(in srgb, var(--warn-soft) 45%, var(--card)); }
.aud-unit { position: relative; display: block; }
.aud-unit input { padding-right: 58px; }
.aud-unit > i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--mut); font-size: 12.5px; font-style: normal; pointer-events: none; }
.aud-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); min-height: 32px; }
.aud-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.aud-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.aud-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; background: var(--soft-2); border-radius: 999px; padding: 3px; }
.aud-seg button { border: 0; background: transparent; border-radius: 999px; min-height: 34px; padding: 0 12px; font-weight: 650; font-size: 13.5px; color: var(--txt); white-space: nowrap; }
.aud-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 21, 38, .12); }

/* ------------------------------------------------------------ items */
.aud-list { display: grid; gap: 10px; }
.aud-item { border: 1px solid var(--ln); border-radius: 16px; background: var(--card); }
.aud-item[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--ln)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 7%, transparent); }
.aud-item.has-error { border-color: color-mix(in srgb, var(--warn) 50%, var(--ln)); }
.aud-item > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 14px; cursor: pointer; }
.aud-item > summary::-webkit-details-marker { display: none; }
.aud-item-title { display: grid; gap: 2px; min-width: 0; }
.aud-item-title b { color: var(--ink); font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-item-title small { color: var(--mut); font-size: 12.5px; }
.aud-item-figs { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--txt); }
.aud-item-figs b { color: var(--ink); }
.aud-item-body { padding: 4px 14px 14px; border-top: 1px solid var(--ln); display: grid; gap: 14px; }
.aud-item-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.aud-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aud-empty { padding: 18px; border: 1px dashed var(--ln); border-radius: 14px; color: var(--mut); font-size: 14px; text-align: center; }
.aud-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; background: var(--soft-2); color: var(--mut); white-space: nowrap; }
.aud-chip.ok { background: var(--ok-soft); color: var(--ok); }
.aud-chip.bad { background: var(--warn-soft); color: var(--warn); }
.aud-chip.info { background: var(--brand-soft); color: var(--brand); }
.aud-btn-sm { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ln); background: var(--card); color: var(--ink); font-weight: 650; font-size: 13.5px; }
.aud-btn-sm:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.aud-btn-sm.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.aud-btn-sm.primary:hover:not(:disabled) { background: var(--brand-2); color: var(--brand-ink); }
.aud-btn-sm.danger:hover:not(:disabled) { border-color: var(--warn); color: var(--warn); }
.aud-icon { width: 34px; height: 34px; min-height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; }

/* ------------------------------------------------------------ layers */
.aud-layers { display: grid; gap: 6px; }
.aud-layers-head, .aud-layer-main { display: grid; grid-template-columns: 26px minmax(0, 2.2fr) minmax(72px, .8fr) minmax(78px, .8fr) minmax(54px, .55fr) minmax(70px, .7fr) auto; gap: 6px; align-items: center; }
.aud-layers-head { font-size: 12px; color: var(--mut); font-weight: 650; padding: 0 4px; }
.aud-layer { border: 1px solid var(--ln); border-radius: 12px; padding: 6px; background: color-mix(in srgb, var(--soft) 50%, var(--card)); }
.aud-layer.is-new { border-style: dashed; }
.aud-layer-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 1px solid var(--ln); font-size: 12px; font-weight: 700; color: var(--mut); }
.aud-layer input, .aud-layer select { width: 100%; min-height: 36px; border: 1px solid var(--ln); border-radius: 8px; padding: 6px 8px; font-size: 14px; background: var(--card); color: var(--ink); font-variant-numeric: tabular-nums; }
.aud-layer output { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--ink); text-align: right; padding-right: 4px; }
.aud-layer output.mut { color: var(--mut); }
.aud-layer-tools { display: flex; gap: 2px; }
.aud-layer-tools button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--mut); font-size: 15px; }
.aud-layer-tools button:hover { background: var(--soft-2); color: var(--ink); }
.aud-layer-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 10px; padding: 8px 4px 2px 32px; }
.aud-layer-more .aud-field > span { font-size: 12px; }
.aud-layer-more[hidden] { display: none; }
.aud-layer-kind { font-size: 11px; color: var(--mut); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.aud-sections { display: grid; gap: 6px; padding: 8px 4px 2px 32px; }
.aud-section-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(70px, .6fr) minmax(0, 1.4fr) minmax(70px, .7fr) auto; gap: 6px; align-items: center; }
.aud-rtotal { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--soft-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.aud-rtotal b { color: var(--ink); }
.aud-rtotal .big { font-size: 16px; }
@media (max-width: 760px) {
  /* phone: name on the first line, d · λ · a · R on the second, tools on the third */
  .aud-layers-head, .aud-layer-main { grid-template-columns: 26px repeat(4, minmax(0, 1fr)); grid-template-areas: "n name name name name" ". d l a r" ". tools tools tools tools"; row-gap: 6px; }
  .aud-layers-head > :nth-child(1), .aud-layer-main > :nth-child(1) { grid-area: n; }
  .aud-layers-head > :nth-child(2), .aud-layer-main > :nth-child(2) { grid-area: name; }
  .aud-layers-head > :nth-child(3), .aud-layer-main > :nth-child(3) { grid-area: d; }
  .aud-layers-head > :nth-child(4), .aud-layer-main > :nth-child(4) { grid-area: l; }
  .aud-layers-head > :nth-child(5), .aud-layer-main > :nth-child(5) { grid-area: a; }
  .aud-layers-head > :nth-child(6), .aud-layer-main > :nth-child(6) { grid-area: r; }
  .aud-layers-head > :nth-child(7), .aud-layer-main > :nth-child(7) { grid-area: tools; }
  .aud-layers-head > :nth-child(7) { display: none; }
  .aud-layer-tools { justify-content: flex-end; }
  .aud-layer output { text-align: left; padding: 0 2px; }
  .aud-layer-more, .aud-sections { padding-left: 4px; }
  .aud-section-row { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------ tables */
.aud-scroll { overflow-x: auto; border: 1px solid var(--ln); border-radius: 14px; background: var(--card); }
.aud-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.aud-table th, .aud-table td { padding: 7px 8px; border-top: 1px solid var(--ln); text-align: right; white-space: nowrap; }
.aud-table th:first-child, .aud-table td:first-child { text-align: left; white-space: normal; min-width: 150px; }
.aud-table thead th { position: sticky; top: 0; background: var(--soft-2); color: var(--mut); font-size: 12px; font-weight: 700; border-top: 0; }
.aud-table tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.aud-table tfoot td { font-weight: 700; color: var(--ink); background: var(--soft); }
.aud-table td.left, .aud-table th.left { text-align: left; }
.aud-table .mut { color: var(--mut); }
.aud-dl { display: grid; gap: 0; margin: 0; }
.aud-dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ln); font-size: 13.5px; }
.aud-dl > div:first-child { border-top: 0; }
.aud-dl dt { color: var(--txt); }
.aud-dl dd { margin: 0; color: var(--ink); font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ results */
.aud-results-top { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.aud-scale { display: grid; gap: 4px; }
.aud-scale-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 6px; align-items: center; }
.aud-scale-bar { height: 28px; border-radius: 6px 14px 14px 6px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #111; font: 700 13px var(--font); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.aud-scale-bar span { font-weight: 600; font-size: 11.5px; opacity: .85; }
.aud-scale-mark { height: 28px; display: grid; place-items: center; border-radius: 8px; font: 800 13px var(--display); color: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.aud-scale-head { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 6px; font-size: 12px; color: var(--mut); font-weight: 700; }
.aud-chart { width: 100%; height: auto; display: block; }
.aud-chart text { font: 11px var(--font); fill: var(--mut); }
.aud-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--txt); }
.aud-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.aud-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.aud-kpi { border: 1px solid var(--ln); border-radius: 14px; padding: 10px 12px; background: var(--card); }
.aud-kpi small { display: block; font-size: 12px; color: var(--mut); font-weight: 650; }
.aud-kpi b { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.aud-kpi span { font-size: 12px; color: var(--mut); }
.aud-notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--txt); }
.aud-notes li.warn { color: var(--warn); }
.aud-bar { height: 8px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
.aud-bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }

/* ------------------------------------------------------------ measures */
.aud-pkg { display: grid; gap: 10px; }
.aud-pkg-measures { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.aud-pkg-best { outline: 2px solid var(--ok); outline-offset: -2px; }

/* ------------------------------------------------------------ dialog */
.aud-dialog { border: 0; border-radius: 20px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: min(86vh, 820px); background: var(--card); color: var(--txt); box-shadow: var(--shadow); }
.aud-dialog::backdrop { background: rgba(11, 21, 38, .45); }
.aud-dialog-head { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--ln); background: var(--card); z-index: 1; }
.aud-dialog-head h2 { margin: 0; font-size: 17px; color: var(--ink); flex: 1; }
.aud-dialog-body { padding: 14px 16px 18px; display: grid; gap: 12px; }
.aud-pick { display: grid; gap: 4px; max-height: 52vh; overflow: auto; }
.aud-pick button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; text-align: left; border: 1px solid var(--ln); background: var(--card); border-radius: 12px; padding: 9px 12px; }
.aud-pick button:hover { border-color: var(--brand); }
.aud-pick b { color: var(--ink); font-weight: 650; font-size: 14px; }
.aud-pick small { color: var(--mut); font-size: 12px; grid-column: 1; }
.aud-pick span { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 650; font-size: 13.5px; }
.aud-projects { display: grid; gap: 6px; }
.aud-projects > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--ln); border-radius: 12px; }
.aud-projects > div.is-current { border-color: var(--brand); background: var(--brand-soft); }
.aud-projects b { color: var(--ink); }
.aud-projects small { color: var(--mut); display: block; font-size: 12px; }

/* ------------------------------------------------------------ photos */
.aud-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.aud-photo { border: 1px solid var(--ln); border-radius: 12px; overflow: hidden; background: var(--card); display: grid; }
.aud-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--soft-2); }
.aud-photo input { border: 0; border-top: 1px solid var(--ln); padding: 8px; font-size: 13px; }
.aud-photo button { border: 0; border-top: 1px solid var(--ln); background: transparent; color: var(--warn); padding: 6px; font-size: 12.5px; font-weight: 650; }

/* ------------------------------------------------------------ documents */
.aud-doc-list { display: grid; gap: 8px; }
.aud-doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--ln); border-radius: 14px; background: var(--card); }
.aud-doc-row b { color: var(--ink); display: block; }
.aud-doc-row small { color: var(--mut); font-size: 12.5px; }
.aud-preview { margin-top: 16px; background: var(--soft-2); border-radius: 18px; padding: 16px; overflow-x: auto; }
.aud-preview-pages { display: grid; justify-content: center; gap: 16px; }
.aud-page { width: 210mm; min-height: 297mm; background: #fff; color: #111; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); padding: 10mm 12mm; font: 9.5pt/1.35 Arial, Helvetica, sans-serif; position: relative; }
.aud-page h1 { font-size: 15pt; margin: 0 0 4mm; }
.aud-page h2 { font-size: 11.5pt; margin: 5mm 0 2mm; }
.aud-page h3 { font-size: 10pt; margin: 4mm 0 1.5mm; }
.aud-page p { margin: 0 0 2mm; }
.aud-page table { width: 100%; border-collapse: collapse; margin: 1mm 0 3mm; font-size: 8.5pt; }
.aud-page th, .aud-page td { border: 0.5pt solid #555; padding: 1.2mm 1.6mm; vertical-align: top; }
.aud-page th { background: #e8e8e8; font-weight: 700; text-align: left; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.aud-page td.num, .aud-page th.num { text-align: right; font-variant-numeric: tabular-nums; }
.aud-page .box { border: 0.6pt solid #333; padding: 2mm 3mm; margin: 0 0 3mm; }
.aud-page .muted { color: #555; }
.aud-page .draft { position: absolute; top: 4mm; right: 8mm; font-size: 7.5pt; color: #b00; border: 0.6pt solid #b00; padding: 0.6mm 2mm; border-radius: 2mm; }
.aud-page .sig { margin-top: 8mm; display: flex; justify-content: flex-end; font-size: 9pt; }
.aud-page .tick { display: inline-block; width: 3mm; height: 3mm; border: 0.6pt solid #333; margin-right: 1.5mm; vertical-align: -0.4mm; text-align: center; line-height: 3mm; font-size: 7pt; }
.aud-page ul.checklist { list-style: none; margin: 0 0 2mm; padding: 0; }
.aud-page ul.checklist li { margin: 0 0 1mm; }
.aud-page .photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.aud-page .photos figure { margin: 0; }
.aud-page .photos img { width: 100%; height: 62mm; object-fit: cover; border: 0.5pt solid #555; }
.aud-page .photos figcaption { font-size: 8.5pt; text-align: center; margin-top: 1mm; }

/* CPE page 1 (Mc 001-2022 Fig. 5.1 / 5.2) */
.cpe { font: 8pt/1.25 Arial, Helvetica, sans-serif; }
.cpe-title { text-align: center; margin-bottom: 2mm; }
.cpe-title b { display: block; font-size: 17pt; letter-spacing: .02em; }
.cpe-title span { font-size: 8pt; font-weight: 700; }
.cpe-band { border: 0.7pt solid #555; margin-bottom: 2.5mm; }
.cpe-band > .h { background: #dcdcdc; text-align: center; font-weight: 700; font-size: 9pt; padding: 0.8mm; border-bottom: 0.7pt solid #555; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-band table { margin: 0; font-size: 7.6pt; }
.cpe-band td, .cpe-band th { border: 0.5pt solid #888; padding: 0.8mm 1.2mm; }
.cpe-red { color: #c00; }
.cpe-num { display: inline-flex; gap: 0.6mm; }
.cpe-num i { display: inline-block; width: 3.6mm; height: 4.4mm; border: 0.5pt solid #888; text-align: center; font-style: normal; color: #c00; line-height: 4.4mm; font-size: 8pt; }
.cpe-photo { width: 30mm; height: 30mm; border: 0.6pt solid #555; display: grid; place-items: center; font-size: 7pt; text-align: center; overflow: hidden; }
.cpe-photo img { width: 100%; height: 100%; object-fit: cover; }
.cpe-scales { display: grid; grid-template-columns: 1fr 1fr; border: 0.7pt solid #555; }
.cpe-scale { display: grid; grid-template-columns: minmax(0, 1fr) 17mm 17mm; }
.cpe-scale.env { grid-template-columns: minmax(0, 1fr) 20mm; border-left: 0.7pt solid #555; }
.cpe-scale.apt { grid-template-columns: minmax(0, 1fr) 24mm; }
.cpe-scale .hd { background: #dcdcdc; font-weight: 700; text-align: center; font-size: 7.6pt; padding: 0.8mm; border-bottom: 0.5pt solid #888; display: grid; place-items: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-scale .sub { grid-column: 1 / -1; text-align: center; font-size: 7.2pt; padding: 0.6mm; border-bottom: 0.5pt solid #888; background: #f2f2f2; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-col { display: grid; grid-template-rows: repeat(8, 9.6mm); gap: 1.4mm; padding: 2mm 1.5mm; border-left: 0.5pt solid #888; }
.cpe-col:first-child { border-left: 0; }
.cpe-arrow { position: relative; height: 8.4mm; display: flex; align-items: center; justify-content: space-between; padding: 0 5mm 0 1.5mm; color: #fff; font-weight: 700; clip-path: polygon(0 0, calc(100% - 4mm) 0, 100% 50%, calc(100% - 4mm) 100%, 0 100%); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-arrow b { font-size: 12pt; }
.cpe-arrow small { font-size: 6.4pt; font-weight: 700; align-self: flex-end; padding-bottom: 0.6mm; }
.cpe-mark { height: 8.4mm; display: flex; align-items: center; justify-content: center; color: #111; font-weight: 800; font-size: 12pt; clip-path: polygon(3.5mm 0, 100% 0, 100% 100%, 3.5mm 100%, 0 50%); padding-left: 3mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-foot { display: grid; grid-template-columns: 1fr 1fr; border: 0.7pt solid #555; border-top: 0; }
.cpe-foot table { margin: 0; font-size: 7.4pt; }
.cpe-foot td { border: 0.5pt solid #888; padding: 0.7mm 1.1mm; }
.cpe-utils { margin-top: 2.5mm; font-size: 7.2pt; }
.cpe-utils td, .cpe-utils th { border: 0.5pt solid #888; padding: 0.6mm 0.8mm; text-align: center; }
.cpe-utils td:first-child, .cpe-utils th:first-child { text-align: left; white-space: nowrap; }
.cpe-utils .hit { font-weight: 700; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-code { margin-top: 3mm; border: 0.7pt solid #555; padding: 1.2mm; text-align: center; width: 95mm; background: #eee; font-size: 7.4pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.cpe-notes { font-size: 6.8pt; margin-top: 1.5mm; display: grid; grid-template-columns: auto 1fr; gap: 0 6mm; }

/* ------------------------------------------------------------ print */
@media print {
  body.aud.is-printing > *:not(#audPrint) { display: none !important; }
  body.aud.is-printing #audPrint { display: block !important; }
  #audPrint .aud-page { box-shadow: none; margin: 0; page-break-after: always; break-after: page; width: auto; min-height: 0; padding: 0; }
  #audPrint .aud-page:last-child { page-break-after: auto; break-after: auto; }
  @page { size: A4; margin: 5mm 17.5mm; }
}
#audPrint { display: none; }

/* ------------------------------------------------------------ controller */
.aud-band-title { display: grid; gap: 2px; min-width: 0; }
.aud-band-title b { color: var(--ink); font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-band-title small { color: var(--mut); font-size: 12.5px; }
.aud-band-hint { margin: 0; color: var(--txt); font-size: 13.5px; max-width: 60ch; }
.aud-band-status { font-size: 13px; color: var(--txt); }
.aud-band-status .hl3-warn-text { max-width: 48ch; }
.aud-regime { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.aud-regime .aud-field > span { font-size: 12px; }
@media (max-width: 480px) { .aud-regime { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aud-rec-title { margin: 14px 0 6px; color: var(--ink); font-weight: 700; font-size: 14px; }
.aud-rec-list { display: grid; gap: 6px; }
.aud-rec-list .aud-check { align-items: flex-start; line-height: 1.4; }
.aud-rec-list .aud-check input { margin-top: 2px; flex: 0 0 auto; }
.aud-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--txt); }
.aud-checklist li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; }
.aud-checklist li span { color: var(--mut); font-weight: 700; }
.aud-checklist li.ok span { color: var(--ok); }
.aud-photo-tools { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ln); }
.aud-photo-tools > * { border: 0; background: transparent; padding: 7px 6px; font-size: 12.5px; font-weight: 650; color: var(--brand); text-align: center; justify-content: center; border-radius: 0; }
.aud-photo-tools > .danger { color: var(--warn); border-left: 1px solid var(--ln); }
.aud-photo-tools .aud-chip { margin: 4px; }
.aud-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: var(--ink); }
.aud-doc-row button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
.aud-pick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.aud-dialog .aud-tabs { padding-bottom: 4px; }
.aud-dialog .aud-tabs button { min-height: 32px; font-size: 13px; padding: 0 11px; }
.aud-input { display: block; }
@media (max-width: 640px) {
  .aud-band-row { gap: 8px 12px; }
  .aud-band-status { margin-left: 0; width: 100%; }
  .aud-band-metrics { gap: 6px 16px; }
  .aud-doc-row { grid-template-columns: 1fr; }
  .aud-doc-row .aud-item-actions { justify-content: flex-start; }
}

.aud-field > .aud-seg { justify-self: start; max-width: 100%; }
.aud-input, .aud-field input, .aud-field select { font-family: inherit; }
.aud-page { font-variant-numeric: normal; }
/* nested <details> inside a Home Lab group keep their own open/closed sign */
.hl3-group .aud-item:not([open]) > summary::after { content: "+"; }
.hl3-group .aud-item[open] > summary::after { content: "−"; }

@media (max-width: 640px) {
  /* steps get their own row under the logo and the project button */
  .aud-top .hl3-top-inner { grid-template-columns: auto 1fr auto; row-gap: 6px; }
  .aud-top .aud-steps { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .aud-top-actions { grid-column: 3; grid-row: 1; justify-self: end; }
  .aud-save-state { font-size: 11.5px; }
  .aud-item > summary { grid-template-columns: minmax(0, 1fr); }
  .aud-item-figs { justify-content: flex-start; }
  .aud-item-title b { white-space: normal; }
}

/* Climate-zone map inside the project step's Clima block (component from
   home-lab-3/zone-map.js). The block's rows already name the zone and θe, so
   the component's own heading is not repeated. */
.aud-zmap { padding: 0; margin-top: 4px; overflow: visible; }
.aud-zmap .hl3-zm-head { display: none; }
.aud-zmap .hl3-zm-stage { margin: 10px 0 2px; }
