/* AppHalt v167: persistent reconstructed interface, driven only by scroll. */
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase]{--ah-product-ground:#141e35;--ah-product-ink:#f4f7ff;--ah-product-muted:#c3cee2;--ah-product-accent:#a7c7ff}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-stage{background:#141e35;height:calc(100svh - var(--story-header,76px))}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-stage-inner{padding:24px 65px 48px 5vw;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:48px}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-canvas{height:auto;max-width:650px;aspect-ratio:auto;container-type:inline-size}
.ah167-scene{position:relative;height:470px;color:#263044;font-family:var(--sans,Arial,sans-serif);isolation:isolate}
.ah167-scene img{display:block;object-fit:contain}
.ah167-scene svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}
.ah167-context{position:absolute;right:0;top:0;width:76%;height:135px;border:1px solid #99b7dc77;border-radius:14px;background:#dce8f5;box-shadow:0 14px 50px #0002;overflow:hidden;transform:translateY(calc((1 - var(--ah-open,1))*9px))}
.ah167-context-head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid #bdccdd;background:#ecf3fa;font-size:13px}
.ah167-context-head img{width:20px;height:20px}.ah167-context-head>span{font-size:8px;letter-spacing:.08em;margin-left:auto;color:#52647c}
.ah167-context p{margin:10px 16px;font-size:13px;line-height:1.4}
.ah167-context-state{display:flex;align-items:center;gap:6px;font-size:10px;color:#3a566b;margin:8px 16px}
.ah167-dashboard{position:absolute;left:0;top:93px;width:94%;background:#f8f9fb;border:1px solid #c7d1de;border-radius:16px;box-shadow:0 25px 65px #0005;overflow:hidden;transform:translateY(calc((1 - var(--ah-open,1))*16px))}
.ah167-title{display:flex;align-items:center;gap:22px;height:48px;padding:0 18px;border-bottom:1px solid #d8dde5;background:linear-gradient(#fff,#f3f5f8);font-size:16px;color:#48515d}
.ah167-traffic{display:flex;gap:7px}.ah167-traffic i{width:11px;height:11px;border-radius:50%;background:#fa615a;border:1px solid #d75450}.ah167-traffic i:nth-child(2){background:#f6c444;border-color:#d8a937}.ah167-traffic i:nth-child(3){background:#62bd4f;border-color:#4d9f3d}
.ah167-tools{display:flex;margin-left:auto;gap:15px;color:#66727f}
.ah167-tabs{display:grid;grid-template-columns:1fr 1fr;margin:12px 16px 6px;padding:3px;background:#e7e9ee;border-radius:8px;font-size:12px;text-align:center;color:#5c6574}
.ah167-tabs span{padding:6px 3px}.ah167-tabs span:first-child{background:#1479f6;color:#fff;border-radius:6px;box-shadow:0 2px 4px #0568ce30}
.ah167-command{display:flex;align-items:center;gap:12px;padding:10px 18px 14px;font-size:16px}.ah167-command>img{width:31px;height:31px}
.ah167-action{margin-left:auto;min-width:100px;border-radius:7px;padding:8px 15px;background:#1479f6;color:#fff;text-align:center;box-shadow:0 2px 4px #0871df25;transform:scale(calc(1 - var(--ah-press,0)*.06));font-weight:600;font-size:14px}
.ah167-table-head{display:grid;grid-template-columns:58% 42%;padding:6px 18px;background:#edf0f4;border-block:1px solid #d5dbe4;font-size:11px;color:#637084}
.ah167-row{height:40px;display:grid;grid-template-columns:24px minmax(0,1fr) 39%;align-items:center;gap:9px;padding:0 18px;font-size:13px;border-bottom:1px solid #e7ebf0}.ah167-row img{width:22px;height:22px}.ah167-row b{font-weight:600}.ah167-row:nth-child(even){background:#f0f3f7}
.ah167-selected{background:rgb(217 232 255 / var(--ah-selection,1));position:relative}.ah167-selected:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#1979e6;opacity:var(--ah-selection,1)}
.ah167-status{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#176b54}.ah167-status i{height:7px;width:7px;border-radius:50%;background:#26a47b}.ah167-idle{color:#6f7887;font-size:12px}
.ah167-footer{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 18px;background:#f7f9fc;font-size:11px;color:#516177}.ah167-footer>img{width:18px;height:18px}.ah167-state-mark{margin-left:auto;color:#28846b;opacity:var(--ah-selection,1)}
.ah167-focus{position:absolute;left:0;top:0;pointer-events:none;border:2px solid #549ff7;box-shadow:0 0 0 3px #549ff71a;border-radius:7px;box-sizing:border-box}
.ah167-click{position:absolute;pointer-events:none;width:34px;height:34px;border:2px solid #aacfff;border-radius:50%;opacity:0}
[data-paused="true"] .ah167-selected{background:#fff1d7}[data-paused="true"] .ah167-selected:before{background:#b17618}[data-paused="true"] .ah167-status{color:#885714}[data-paused="true"] .ah167-status i{background:#b57a20;border-radius:2px}[data-paused="true"] .ah167-focus{border-color:#c59849;box-shadow:0 0 0 3px #c5984922}
[data-paused="true"] .ah167-action{background:#245ca7}
.ah167-explanation{display:flex;gap:12px;align-items:center;margin:16px 0 0;min-height:44px;color:#deebff}.ah167-step{flex:none;font:400 30px/1 var(--serif,Georgia,serif);color:#9cbbeb;padding-right:12px;border-right:1px solid #516781}.ah167-explanation p{margin:0;font:500 13px/1.4 var(--sans,Arial,sans-serif)}
.ah167-provenance{margin:8px 0 0;font:400 10px/1.4 var(--sans,Arial,sans-serif);color:#9eafc9}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-product-step:last-child{display:grid}
[data-ah-reading-art]{container-type:inline-size}[data-ah-reading-art] .ah167-scene{max-width:650px;margin:auto}[data-ah-reading-art] .ah167-focus,[data-ah-reading-art] .ah167-click{display:none}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-product-reading{max-width:1300px}
@container(max-width:500px){
 .ah167-scene{height:390px}.ah167-context{width:89%;height:115px}.ah167-context-head{padding:9px 11px;font-size:11px;gap:6px}.ah167-context-head img{width:18px;height:18px}.ah167-context-head>span{font-size:7px}.ah167-context p{font-size:11px;margin:8px 11px}.ah167-context-state{display:none}
 .ah167-dashboard{top:78px;width:97%;border-radius:12px}.ah167-title{height:37px;padding:0 12px;font-size:14px;gap:14px}.ah167-traffic{gap:5px}.ah167-traffic i{width:8px;height:8px}.ah167-tools{gap:8px}.ah167-tools svg{width:16px;height:16px}
 .ah167-tabs{margin:9px 10px 3px;font-size:10px}.ah167-tabs span{padding:5px 1px}.ah167-command{padding:8px 11px 10px;gap:7px;font-size:12px}.ah167-command>img{width:25px;height:25px}.ah167-action{min-width:68px;font-size:12px;padding:7px 8px}.ah167-table-head{padding:5px 11px;font-size:10px}
 .ah167-row{height:33px;padding:0 11px;grid-template-columns:20px minmax(0,1fr) 31%;gap:7px;font-size:11px}.ah167-row img{width:19px;height:19px}.ah167-status,.ah167-idle{font-size:11px}.ah167-footer{min-height:36px;padding:6px 11px;font-size:10px;gap:6px}.ah167-footer svg{width:16px;height:16px}
 .ah167-explanation{margin-top:13px;gap:9px;min-height:36px}.ah167-explanation p{font-size:12px}.ah167-step{font-size:25px;padding-right:9px}.ah167-provenance{font-size:9px}
}
@media(max-width:800px){
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-stage-inner{grid-template-columns:1fr;grid-template-rows:150px minmax(0,1fr);gap:12px;padding:12px 42px 30px 20px;align-items:start}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-narrative{min-height:0;height:150px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-beat h3{font-size:clamp(27px,6.7vw,36px)}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-beat p{font-size:13px;max-width:44ch}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-canvas{max-width:500px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] [data-ah-motion-slot]{align-self:start}
}
@media(max-width:800px) and (max-height:720px) and (orientation:portrait){
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-stage-inner{grid-template-rows:124px minmax(0,1fr);gap:6px;padding:8px 36px 24px 16px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-narrative{height:124px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-beat h3{font-size:25px;margin-bottom:6px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-beat p{font-size:12px;line-height:1.35}
 #apphalt-produit[data-ah-ready] .ah167-scene{height:317px}
 #apphalt-produit[data-ah-ready] .ah167-context{height:100px}
 #apphalt-produit[data-ah-ready] .ah167-dashboard{top:66px}
 #apphalt-produit[data-ah-ready] .ah167-title{height:31px}
 #apphalt-produit[data-ah-ready] .ah167-tabs{margin-top:6px}
 #apphalt-produit[data-ah-ready] .ah167-command{padding-block:6px}
 #apphalt-produit[data-ah-ready] .ah167-row{height:25px}
 #apphalt-produit[data-ah-ready] .ah167-footer{min-height:29px;padding-block:5px}
 #apphalt-produit[data-ah-ready] .ah167-explanation{margin-top:8px;min-height:30px}
 #apphalt-produit[data-ah-ready] .ah167-explanation p{font-size:11px}
 #apphalt-produit[data-ah-ready] .ah167-provenance{margin-top:5px}
}
@media(min-width:801px) and (max-height:760px){.ah167-scene{height:430px}.ah167-row{height:33px}.ah167-dashboard{top:85px}.ah167-title{height:42px}}
@media(prefers-reduced-motion:reduce){.ah167-context,.ah167-dashboard{transform:none}.ah167-focus,.ah167-click{display:none}}
body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-canvas{display:block}
.ah167-scene{width:100%}.ah167-explanation,.ah167-provenance{width:100%;text-align:left}
/* The dashboard participates in layout so its caption can never sit beneath it. */
.ah167-scene{height:auto;padding-top:93px}.ah167-dashboard{position:relative;top:auto}.ah167-context-state{display:none}
@container(max-width:500px){.ah167-scene{height:auto;padding-top:78px}.ah167-dashboard{top:auto}}
@media(max-width:800px) and (max-height:720px) and (orientation:portrait){
 #apphalt-produit[data-ah-ready] .ah167-scene{height:auto;padding-top:66px}
 #apphalt-produit[data-ah-ready] .ah167-dashboard{top:auto}
 #apphalt-produit[data-ah-ready] .ah167-row{height:23px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-stage-inner{grid-template-rows:114px minmax(0,1fr);gap:5px}
 body.sober-home #apphalt-produit[data-ah-native].ah167[data-ah-phase] .ah-narrative{height:114px}
}
@media(min-width:801px) and (max-height:760px){.ah167-scene{height:auto;padding-top:85px}.ah167-dashboard{top:auto}}
.ah167-selected,.ah167-status,.ah167-action{transition:background-color .22s ease,color .22s ease}
@media(prefers-reduced-motion:reduce){.ah167-selected,.ah167-status,.ah167-action{transition:none}}
