/* CleanAudit 3.0: CHICK-inspired typography and palette, without brand marks. */
:root{color:#253749;background:#f2f5f8}
.topbar{background:#fff;border-bottom:1px solid #abc4de;box-shadow:0 2px 12px rgba(35,78,128,.06)}
.brand{height:50px;background:#3e6dad;color:#fff;border-bottom:0;letter-spacing:.02em}
.audit-head{background:linear-gradient(90deg,#f5f8fc 0%,#fff 56%)}
.tabs{background:#edf3f9;border-top:1px solid #d8e4ef}
.tabs button,.btn,.done-button,.next-point,.add-action{border-radius:9px;background:#e5eff9;color:#315f9a}
.tabs button.active{background:#d2e4f6;outline-color:#3e6dad}
.btn.primary,.next-point{background:#3e6dad;color:#fff}
.status,.offline-state{background:#e6f1fb;color:#315f9a}
.page h1,.page h2,.diagram h3{color:#315f9a}
.page h1{border-bottom:3px solid #78a5cf;padding-bottom:10px}
.card,.diagram-side,.circuit{border:1px solid #d5e3f0;border-radius:11px;box-shadow:0 2px 8px rgba(36,75,114,.04)}
.home-head{margin-bottom:18px;padding:20px 24px;background:linear-gradient(120deg,#eaf3fb,#fff 65%);border-top:5px solid #3e6dad;border-bottom:1px solid #cddfed}
.home-head h1{margin:0 0 8px;border:0;padding:0;font-size:2rem}
.home-actions{margin-top:5px}
.home>.report-row:nth-of-type(even) .card{background:#f0f5fa}
.report-row .card{border-left:5px solid #78a5cf}
.input,textarea,select{border-color:#95b5d4;border-radius:8px}
.input:focus,textarea:focus,select:focus{box-shadow:0 0 0 3px rgba(62,109,173,.16)}
.point{border-color:#a7c6e1;border-radius:10px;background:#e8f3fb}
.point:hover,.report-row button:hover{filter:brightness(.98)}
.diagram-side h3,.circuit h3{background:#e7f1fa;border-left:5px solid #3e6dad;padding:8px 10px}
.circuit-point{box-shadow:0 3px 10px rgba(30,66,110,.13)}
.modal-card{background:#f2f5f8;border-radius:20px}
.modal-head{border-bottom:2px solid #89add2;margin-bottom:8px}
.evaluation-card,.result-card,.report-panel{border-top:4px solid #78a5cf}
.result-input{border-color:#3e6dad;background:#eff6fd}
.report-panel h2{padding:5px 0 8px;border-bottom:1px solid #bbd1e5}
.ref-row:nth-child(even),.manage-ref:nth-child(even){background:#edf4fa}
.water-icon{color:#3e6dad}
.link-button,.back-link,.point-picker,.link-row{color:#315f9a}
.offline-track i{background:#3e6dad}
@media(max-width:760px){.brand{height:44px}.home-head{padding:16px}.home-head h1{font-size:1.5rem}}
/* Compact sampling editor for an 11-inch iPad in landscape. */
.point-editor{width:min(980px,calc(100vw - 28px));padding:14px 18px;max-height:calc(100dvh - 24px)}
.point-editor .modal-head{min-height:46px;padding:0 2px 6px;gap:12px}
.point-editor .modal-head h2{text-align:left;font-size:1.28rem}
.modal-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;white-space:nowrap}
.remaining-count{font-size:.86rem;color:#315f9a;font-weight:700}
.point-editor .done-button{padding:9px 17px}
.point-picker-list{display:grid;gap:5px;max-height:173px;overflow-y:auto;margin:5px 0 10px;padding:2px;border:1px solid #c9daea;border-radius:9px;background:#fff}
.point-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:37px;padding:5px 10px;border:1px solid #d9e5f0;border-radius:6px;background:#f7fafd;color:#24394c;text-align:left;font-size:.87rem}
.point-choice.selected{border-color:#3e6dad;background:#e6f0fa;box-shadow:inset 3px 0 #3e6dad}
.point-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.point-value{min-width:64px;text-align:right;white-space:nowrap}
.point-value.good{color:#15803d}.point-value.caution{color:#a16207}.point-value.fail{color:#b91c1c}.point-value.missing,.point-value.neutral{color:#6b7280}
.point-editor .card{padding:10px 14px;border-radius:12px}
.point-editor .evaluation-card{grid-template-columns:minmax(180px,1fr) auto minmax(230px,1fr);gap:12px}
.point-editor .evaluation-card h3{font-size:1rem}
.point-editor .evaluation-card .muted{font-size:.76rem}
.point-editor .evaluate-toggle{gap:6px;font-size:.83rem}
.point-editor .evaluate-toggle span{font-size:.85rem}
.point-editor .material-field{display:grid;grid-template-columns:1fr;gap:3px;font-size:.75rem}
.point-editor .material-field select{width:100%;min-width:0;padding:5px 8px;font-size:.85rem}
.add-material{border:0;border-radius:5px;padding:5px 7px;background:#e5eff9;color:#315f9a;font-size:.77rem;font-weight:700}
.point-editor .result-card{margin-top:7px}
.point-editor .result-row{gap:8px}
.point-editor .result-input{width:120px;padding:6px 8px;font-size:1.2rem}
.reset-result{border:1px solid #c7d8e8;border-radius:7px;background:#eef4fa;color:#315f9a;font-size:1.15rem;width:32px;height:32px}
.point-editor .result-card>.input{margin-top:7px;padding:8px}
.point-editor .add-action{margin:7px 0;padding:8px 12px;font-size:.89rem}
.point-editor .editor-links{padding:3px 12px}
.point-editor .link-row{padding:6px 0;font-size:.88rem}
.point-editor .next-point{margin-top:7px;padding:9px;font-size:.9rem}
.point-editor .line-selector{padding:3px 0}.point-editor .segmented button{padding:5px 20px}
@media(max-width:760px){.point-editor .evaluation-card{grid-template-columns:1fr}.point-editor .result-row{flex-direction:row;align-items:center;flex-wrap:wrap}.point-editor .result-input{width:100px}.modal-head-actions{white-space:normal;flex-wrap:wrap}.remaining-count{font-size:.73rem}}
/* Home controls and report preview. */
.home-head{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:24px}
.home-tools{display:grid;grid-template-columns:auto auto;align-items:center;gap:7px}
.home-tools .home-version{grid-column:1/-1;text-align:left;margin:0;padding:0;color:#586b7c;font-size:.76rem;border:0;background:none}
.home-menu{position:relative}.home-menu summary{display:grid;place-items:center;list-style:none;width:48px;height:46px;border-radius:9px;background:#e5eff9;color:#315f9a;cursor:pointer;font-size:1.4rem;font-weight:700}.home-menu summary::-webkit-details-marker{display:none}
.home-menu-items{position:absolute;top:calc(100% + 6px);left:0;z-index:20;display:grid;gap:6px;width:max-content;max-width:min(90vw,320px);padding:9px;background:white;border:1px solid #b7cee5;border-radius:9px;box-shadow:0 6px 22px #9fb1c444}.home-menu-items .btn{text-align:left}
.language-icon{height:46px;white-space:nowrap}.home-title{min-width:0}.preview-icon{min-width:46px;font-size:1.2rem}
@media(max-width:760px){.home-head{grid-template-columns:1fr;gap:14px}.home-tools{justify-content:start}.home-title{grid-row:2}}

/* Four visible material choices; additional references scroll within this list. */
.point-editor .material-options{height:124px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #96b8dc;border-radius:7px;background:#fff;padding:2px;scrollbar-gutter:stable}
.point-editor .material-choice{display:block;width:100%;height:30px;min-height:30px;padding:3px 8px;border:0;border-radius:4px;background:#fff;color:#24394c;text-align:left;font:inherit;font-size:.8rem;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.point-editor .material-choice.selected{background:#e6f0fa;color:#315f9a;font-weight:700}
.point-editor .material-choice:focus-visible{outline:2px solid #3e6dad;outline-offset:-2px}

.point-editor .material-field{position:relative}
.point-editor .material-current{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:31px;padding:5px 8px;border:1px solid #96b8dc;border-radius:6px;background:#fff;color:#08747a;text-align:left;font-size:.82rem}
.point-editor .material-options{position:absolute;top:48px;left:0;right:0;z-index:10;box-shadow:0 8px 18px #172f4540}
.point-editor .material-options[hidden]{display:none}

/* Repeat action: compact result, room for the action note. */
.point-editor .correction-row{grid-template-columns:130px 86px minmax(0,1fr) 42px}
.point-editor .correction-row input[data-correction="comment"]{width:100%}
@media(max-width:760px){.point-editor .correction-row{grid-template-columns:1fr 86px 42px}.point-editor .correction-row input[data-correction="comment"]{grid-column:1/-1;grid-row:2}}

/* Version 4.2: equipment cards fit the iPad viewport in both orientations. */
.equipment-page{display:flex;flex-direction:column}
.equipment-page .equipment-grid{width:100%;flex:1;min-height:0}
.equipment-page .equipment-card{min-height:0;min-width:0}
.equipment-page .equipment-card>img{min-height:0;flex:1;max-height:38vh}
@media(min-width:900px) and (orientation:landscape) and (max-height:950px){
  .equipment-page{height:calc(100dvh - 189px);overflow:hidden}
  .equipment-page h1{font-size:1.35rem;margin:0 0 8px;padding-bottom:5px}
  .equipment-page .equipment-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .equipment-page .equipment-card{height:100%;padding:12px;gap:6px}
  .equipment-page .equipment-card h2{font-size:1.15rem;margin:0}
  .equipment-page .equipment-card>img{height:auto;max-height:34dvh;margin:auto 0}
  .equipment-page .equipment-card small{font-size:.8rem}
}
@media(min-width:700px) and (orientation:portrait){
  .equipment-page{height:calc(100dvh - 264px);overflow:hidden}
  .equipment-page h1{font-size:1.45rem;margin:0 0 10px;padding-bottom:6px}
  .equipment-page .equipment-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:12px}
  .equipment-page .equipment-card{height:100%;padding:12px;gap:5px}
  .equipment-page .equipment-card h2{font-size:1.15rem;margin:0}
  .equipment-page .equipment-card>img{height:auto;max-height:20dvh;margin:auto 0}
  .equipment-page .equipment-card small{font-size:.78rem}
}
@media(min-width:900px) and (orientation:portrait){.equipment-page{height:calc(100dvh - 218px)}}

/* Keep the two spray diagrams complete on an 11-inch iPad in landscape. */
@media(min-width:900px) and (orientation:landscape) and (max-height:950px){
  .diagram-page{height:calc(100dvh - 123px);display:flex;flex-direction:column;overflow:hidden}
  .diagram-page .unit-bar{flex:none;margin-bottom:6px}
  .diagram-page .diagram{flex:1;min-height:0;width:100%;height:auto;align-items:stretch}
  .diagram-page .diagram-side,.diagram-page .circuit{min-height:0;overflow:hidden}
  .diagram-page .circuit{display:grid;grid-template-rows:auto minmax(0,1fr) auto;align-items:stretch}
  .diagram-page .circuit-map{height:calc(100dvh - 250px);width:auto;max-height:100%;max-width:100%;justify-self:center;align-self:center}
  .diagram-page .circuit-note{margin-top:3px;line-height:1.2}
  .diagram-page .diagram-side h3{padding:5px 8px;margin:0 0 5px}
  .diagram-page .diagram-side .tiles{gap:5px}
  .diagram-page .diagram-side .point{min-height:0;padding:5px}
  .diagram-page .diagram-side .point img{height:clamp(55px,9dvh,76px)}
  .diagram-page .diagram-side .water-icon{font-size:34px;padding:9px}
  .diagram-page .diagram-side .point b{font-size:.83rem;line-height:1.12}
}

/* Both supplied objects remain fully visible inside the tank/filter button. */
.position-tanks .circuit-photo{object-fit:contain}
