/* Four-recipient full form builds on the HISTI Full visual system. */
:root{--h4-topbar-height:68px;--h4-footer-height:62px;--h4-chrome-top:calc(var(--h4-topbar-height) + 4px + env(safe-area-inset-top))}
html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
.app-shell{min-height:100svh;padding-top:var(--h4-chrome-top);padding-bottom:calc(var(--h4-footer-height) + env(safe-area-inset-bottom))}
.topbar{position:fixed;z-index:50;top:0;left:0;right:0;padding-top:env(safe-area-inset-top)}
.progress-track{position:fixed;z-index:49;top:calc(var(--h4-topbar-height) + env(safe-area-inset-top));left:0;right:0}
.progress-track span{transition:width .28s ease}
.bottom-utility{position:fixed;z-index:50;right:0;bottom:0;left:0;margin:0;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -12px 30px rgba(0,0,0,.38)}
.h4-transition{position:fixed;z-index:40;top:var(--h4-chrome-top);right:0;bottom:calc(var(--h4-footer-height) + env(safe-area-inset-bottom));left:0;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 36%,#241d10 0%,#11100c 50%,#090907 100%);opacity:0;transition:opacity .22s ease;overflow:auto}
.h4-transition.is-visible{opacity:1}
.h4-transition-inner{width:min(100%,570px);text-align:center;opacity:0;transform:translateY(16px);transition:opacity .25s ease,transform .34s cubic-bezier(.22,.78,.22,1)}
.h4-transition.is-visible .h4-transition-inner{opacity:1;transform:translateY(0)}
.h4-transition-logo{display:block;width:122px;height:auto;margin:0 auto 26px}
.h4-transition-kicker{margin:0;color:#f2c968;font-size:12px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}
.h4-transition h2{margin:12px 0 10px;color:#fff;font-size:clamp(32px,5vw,54px);line-height:1.08;letter-spacing:-.045em;text-wrap:balance}
.h4-transition-detail{margin:0;color:#c2b9a7;font-size:15px;line-height:1.5}
.h4-transition-line{display:block;width:min(240px,60%);height:3px;margin:28px auto 0;border-radius:999px;background:#403626;overflow:hidden}
.h4-transition-line::after{content:"";display:block;width:100%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#c38d25,#ffe08a);transform:scaleX(0);transform-origin:left;transition:transform .48s ease}
.h4-transition.is-visible .h4-transition-line::after{transform:scaleX(1)}
.h4-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:30px 0 0}
.h4-choice{min-height:168px;padding:20px;display:flex;flex-direction:column;gap:8px;border:1px solid var(--line);border-radius:15px;background:var(--raised);text-decoration:none;transition:border-color .18s ease,background-color .18s ease,transform .18s ease;animation:h4-rise .4s cubic-bezier(.2,.8,.2,1) both}
.h4-choice:nth-child(2){animation-delay:.06s}.h4-choice:nth-child(3){animation-delay:.12s}.h4-choice:nth-child(4){animation-delay:.18s}
.h4-choice:hover{border-color:rgba(245,195,77,.65);background:#232018;transform:translateY(-3px)}
.h4-choice>span{color:var(--gold);font-size:11px;font-weight:850;letter-spacing:.1em}
.h4-choice strong{margin-top:10px;color:#fff;font-size:21px;line-height:1.2;letter-spacing:-.025em}
.h4-choice small{color:#bfb8aa;font-size:13px;line-height:1.4}
.h4-choice b{margin-top:auto;color:var(--gold);font-size:13px}
.h4-switch{margin-top:32px;padding-top:20px;border-top:1px solid var(--line);color:#b9b3a6;font-size:13px}
.h4-switch nav{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
.h4-switch a{padding:8px 11px;border:1px solid var(--line);border-radius:9px;color:#e8cf92;font-size:13px;font-weight:750;text-decoration:none}
.h4-switch a:hover{border-color:var(--gold);background:#282115}
.h4-category-label{display:inline-flex;margin-top:22px;padding:7px 11px;border:1px solid rgba(245,195,77,.28);border-radius:999px;background:rgba(245,195,77,.08);color:#f5d27e;font-size:12px;letter-spacing:.035em;text-transform:none}
.h4-question-list{display:grid;gap:13px}
.h4-question{min-width:0;padding:20px 22px;border:1px solid #413d33;border-radius:18px;background:linear-gradient(155deg,#1d1c17,#171713 72%);box-shadow:0 7px 24px rgba(0,0,0,.1);transition:border-color .22s ease,background-color .22s ease}
.h4-question.is-answered{border-color:rgba(245,195,77,.48);background:linear-gradient(155deg,#211e16,#181713 72%)}
.h4-question-top{display:flex;flex-direction:column;align-items:start;gap:7px}
.h4-question-context{margin:0;color:#e9be60;font-size:12px;font-weight:760;line-height:1.3}
.h4-question h2{margin:0;color:#fff;font-size:clamp(17px,2.2vw,20px);font-weight:790;line-height:1.34;letter-spacing:-.015em;overflow-wrap:anywhere}
.h4-control{margin-top:14px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.h4-level-value{min-height:58px;padding:10px 13px;display:flex;align-items:center;gap:12px;border:1px solid rgba(245,195,77,.35);border-radius:12px;background:linear-gradient(110deg,#292315,#1b1a15)}
.h4-level-value.is-unanswered{border-color:var(--line);background:#20201b}
.h4-level-value span{flex:0 0 auto;min-width:96px;padding:7px 9px;border-radius:7px;background:#eec053;color:#171108;font-size:11px;font-weight:850;line-height:1.2;letter-spacing:.035em;text-align:center;text-transform:uppercase}
.h4-level-value strong{min-width:0;flex:1;color:#fff;font-size:14px;font-weight:760;line-height:1.35;overflow-wrap:anywhere}
.h4-level-value.is-unanswered span{background:#36352d;color:#d3cbbc}
.h4-level-value.is-unanswered strong{color:#aaa396}
.h4-clear-level{flex:0 0 auto;min-height:32px;margin-left:auto;padding:5px 8px;border:1px solid rgba(255,255,255,.24);border-radius:7px;background:#292821;color:#ded4bf;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.h4-clear-level:hover{border-color:var(--gold);color:#fff}
.h4-clear-level:focus-visible{outline:2px solid #fff0b9;outline-offset:2px}
.h4-clear-level[hidden]{display:none}
.h4-segment-control{position:relative;display:grid;grid-template-columns:repeat(var(--segments),minmax(0,1fr));gap:0;margin-top:10px;border:1px solid #665a43;border-radius:999px;background:#292821;box-shadow:inset 0 2px 5px rgba(0,0,0,.28);cursor:ew-resize;touch-action:none;user-select:none;-webkit-user-select:none}
.h4-slider-fill,.h4-slider-thumb{position:absolute;top:3px;bottom:3px;pointer-events:none;opacity:0}
.h4-slider-fill{left:2px;width:0;border-radius:999px;background:linear-gradient(90deg,rgba(245,195,77,.14),rgba(245,195,77,.34));transition:width .24s cubic-bezier(.22,.78,.22,1),opacity .18s ease}
.h4-slider-thumb{z-index:0;left:2px;width:0;border:0;border-radius:999px;background:linear-gradient(180deg,#ffe28a,#e9b33b);box-shadow:0 2px 10px rgba(231,171,46,.22);transition:left .24s cubic-bezier(.22,.78,.22,1),width .24s ease,opacity .18s ease}
.h4-segment-control.has-selection .h4-slider-fill,.h4-segment-control.has-selection .h4-slider-thumb{opacity:1}
.h4-segment-control.is-dragging .h4-slider-fill,.h4-segment-control.is-dragging .h4-slider-thumb{transition:opacity .18s ease}
.h4-segment{position:relative;z-index:1;min-width:0;min-height:48px;border:0;border-radius:999px;background:transparent;color:#d8d2c6;font-family:inherit;font-size:14px;font-weight:850;line-height:1;cursor:ew-resize;touch-action:none;user-select:none;-webkit-user-select:none;transition:color .18s ease}
.h4-segment:hover{color:#fff}
.h4-segment.is-passed{color:#f4d388}
.h4-segment.is-passed:hover{color:#fff0bd}
.h4-segment.is-current,.h4-segment.is-current:hover{background:transparent;color:#171108}
.h4-segment:focus-visible{outline:none;z-index:2}
.h4-segment:focus-visible:not(.is-current){text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.h4-endpoints{display:flex;justify-content:space-between;gap:18px;margin-top:8px;color:#b9b09f;font-size:11px;line-height:1.35}
.h4-endpoints span{max-width:46%;overflow-wrap:anywhere}.h4-endpoints span:last-child{text-align:right}
.h4-yn{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.h4-yn button,.h4-multi button{min-height:52px;padding:10px 14px;border:1px solid rgba(255,255,255,.19);border-radius:11px;background:#22221d;color:#e7e2d8;font-size:14px;font-weight:800;transition:background-color .15s ease,border-color .15s ease,transform .15s ease}
.h4-yn button:hover,.h4-multi button:hover{border-color:rgba(245,195,77,.6);background:#29261d}
.h4-yn button:active,.h4-multi button:active{transform:scale(.99)}
.h4-yn button[aria-pressed=true],.h4-multi button[aria-pressed=true]{border-color:#edb93f;background:linear-gradient(135deg,#ffdc72,#e8aa31);color:#171108;animation:h4-choose .26s ease-out}
.h4-multi{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.h4-multi button{text-align:left}
.h4-status{display:flex;flex-wrap:wrap;gap:9px;margin-top:17px;padding-top:15px;border-top:1px solid rgba(255,255,255,.11)}
.h4-status button{flex:1 1 155px;min-height:44px;padding:9px 12px;display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid #595448;border-radius:11px;background:#25241e;color:#eee8dd;font:inherit;font-size:12.5px;font-weight:770;line-height:1.25;text-align:center;cursor:pointer;transition:background-color .18s ease,border-color .18s ease,transform .18s ease}
.h4-status button::before{content:"";flex:0 0 14px;width:14px;height:14px;display:grid;place-items:center;border:1.5px solid #9d9586;border-radius:50%}
.h4-status button:hover{border-color:rgba(245,195,77,.7);background:#332d20;transform:translateY(-1px)}
.h4-status button:focus-visible{outline:2px solid #fff0b9;outline-offset:2px}
.h4-status button[aria-pressed=true]{border-color:#e9b83e;background:linear-gradient(135deg,#ffdc72,#e8ae35);color:#171108;animation:h4-choose .26s ease-out}
.h4-status button[aria-pressed=true]::before{content:"✓";border-color:#171108;font-size:11px;font-weight:900}
.h4-reset-row{display:flex;justify-content:flex-end;margin-top:15px}
.h4-reset-row button{padding:7px 0;border:0;background:none;color:#c7a59b;font-size:12px;font-weight:750;text-decoration:underline;text-underline-offset:3px}
.h4-reset-row button:hover{color:#fff}
.footer-links .h4-debug-trigger{color:#77736a;font-size:10px;font-weight:600;opacity:.7}
.footer-links .h4-debug-trigger:hover{color:#b4ab99;opacity:1}
.h4-debug-watermark{width:max-content;max-width:100%;margin:0 0 12px;padding:6px 9px;border:1px solid rgba(255,161,110,.55);border-radius:7px;background:#2a1a13;color:#ffbe97;font-size:11px;font-weight:900;letter-spacing:.08em}
.h4-debug-dialog{width:min(640px,calc(100% - 24px));max-height:calc(100svh - 24px);margin:auto;padding:24px;border:1px solid rgba(245,195,77,.5);border-radius:18px;background:#171611;color:#eee9dd;box-shadow:0 28px 100px rgba(0,0,0,.68);overflow:auto;overscroll-behavior:contain}
.h4-debug-dialog::backdrop{background:rgba(0,0,0,.78)}
.h4-debug-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.h4-debug-head h2{margin:0;color:#fff;font-size:25px;letter-spacing:-.03em}
.h4-debug-dialog button{min-height:40px;padding:8px 12px;border:1px solid #675a40;border-radius:9px;background:#29251c;color:#f4ead4;font-size:13px;font-weight:770}
.h4-debug-dialog button:hover{border-color:#f5c34d;background:#382d1c}
.h4-debug-note{margin:12px 0 17px;color:#c2b9a8;font-size:13px;line-height:1.5}
.h4-debug-summary{margin:0;padding:12px 14px;border:1px solid rgba(245,195,77,.35);border-radius:10px;background:#231e13;color:#f5d17d;font-size:14px;font-weight:850}
.h4-debug-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 18px}
.h4-debug-categories span{padding:10px;border:1px solid #454035;border-radius:9px;background:#211f19;color:#ded6c6;font-size:12px;line-height:1.35}
.h4-debug-jump{display:flex;align-items:end;flex-wrap:wrap;gap:9px}
.h4-debug-jump label{flex:1 1 100%;color:#eee5d1;font-size:13px;font-weight:800}
.h4-debug-jump input{width:110px;min-height:40px;padding:8px 10px;border:1px solid #726348;border-radius:9px;background:#0d0d0b;color:#fff;font-size:14px}
.h4-debug-feedback{min-height:16px;margin:5px 0 10px;color:#ffb99b;font-size:12px}
.h4-debug-sections{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:7px 0 16px}
.h4-debug-sections strong{flex:1 1 100%;font-size:13px}
.h4-debug-sections button{min-width:45px}
.h4-debug-fill{width:100%;margin-bottom:15px}
.h4-debug-details{border-top:1px solid #454035;padding-top:13px}
.h4-debug-details summary{color:#f3ce7b;font-size:14px;font-weight:800;cursor:pointer}
.h4-debug-rows{max-height:36svh;margin:12px 0 0;padding:0;list-style:none;overflow:auto}
.h4-debug-rows li{padding:9px 3px;display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #39362d;color:#d6d0c4;font-size:12px;line-height:1.35}
.h4-debug-rows strong{flex:none;color:#f0c569;text-align:right}
.h4-proof-dialog{width:min(650px,calc(100% - 24px));max-height:calc(100svh - 24px);margin:auto;padding:26px;border:1px solid rgba(245,195,77,.48);border-radius:20px;background:#141410;color:var(--ink);box-shadow:0 28px 100px rgba(0,0,0,.65);overflow-y:auto;overscroll-behavior:contain}
.h4-proof-dialog::backdrop{background:rgba(0,0,0,.82)}
.h4-proof-head{display:flex;align-items:center;justify-content:space-between;gap:15px}
.h4-proof-close{min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:9px;background:#25231c;color:#f1e9d8;font-weight:750}
.h4-proof-dialog h2{margin:18px 0 9px;color:#fff;font-size:clamp(24px,4vw,33px);line-height:1.15;letter-spacing:-.035em}
.h4-proof-intro{margin:0;color:#c9c1b2;font-size:14px;line-height:1.55}
.h4-proof-policy{margin-top:21px;padding:15px;border:1px solid rgba(126,212,149,.42);border-radius:12px;background:#142018;display:grid;gap:7px;color:#d9ecdd;font-size:13px;line-height:1.45}
.h4-proof-policy strong{color:#a6e4b5}.h4-proof-policy code{width:max-content;max-width:100%;padding:5px 8px;border-radius:6px;background:#0c1510;color:#b6ecc3;overflow-wrap:anywhere}
.h4-proof-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:17px}
.h4-proof-grid article{min-width:0;padding:13px;border:1px solid var(--line);border-radius:10px;background:#20201a;display:grid;gap:6px}
.h4-proof-grid strong{color:#8fe0a6;font-size:19px;line-height:1.1;overflow-wrap:anywhere}.h4-proof-grid span{color:#bdb5a7;font-size:12px;line-height:1.35}
.h4-proof-result{margin:18px 0 0;padding:13px 14px;border:1px solid rgba(126,212,149,.35);border-radius:10px;background:#172019;color:#bfe7c8;font-size:13px;line-height:1.5}
.h4-proof-result[data-state=fail]{border-color:rgba(255,151,119,.5);background:#281914;color:#ffd0c1}
.h4-proof-caveat{margin:17px 0 0;color:#aaa295;font-size:12px;line-height:1.5}
.h4-proof-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:20px}
.h4-proof-actions a{color:#f0c86c;font-size:13px;font-weight:750;text-underline-offset:3px}
.h4-proof-run{min-height:43px;padding:9px 14px;border:1px solid #e5b545;border-radius:10px;background:linear-gradient(135deg,#ffdd79,#e9b43d);color:#171108;font-size:13px;font-weight:850}
.privacy-live-badge[data-state=fail]{border-color:rgba(255,151,119,.6);color:#ffd0c1}.privacy-live-badge[data-state=fail] .privacy-live-dot{background:#ff9b7f;box-shadow:0 0 0 4px rgba(255,155,127,.12)}
.h4-category-summary{display:block;margin-top:11px;color:#aaa294;font-size:12px}
.h4-category-letter{font-size:11px}
.h4-reveal{animation:h4-rise .42s cubic-bezier(.2,.8,.2,1) both}
.h4-reveal:nth-child(2){animation-delay:.07s}.h4-reveal:nth-child(3){animation-delay:.14s}
.h4-header-reveal{animation:h4-rise .36s cubic-bezier(.2,.8,.2,1) both}
.start-card,.result-card{animation:h4-rise .38s cubic-bezier(.2,.8,.2,1) both}
@keyframes h4-rise{from{opacity:.68;transform:translateY(20px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes h4-choose{from{transform:scale(.91)}to{transform:scale(1)}}
@media(max-width:680px){:root{--h4-topbar-height:62px;--h4-footer-height:76px}.bottom-utility-inner{min-height:76px;padding:7px 0;flex-direction:column;justify-content:center;gap:2px}.footer-links{width:auto;justify-content:center;flex-wrap:nowrap;gap:4px 13px}.footer-links a,.footer-links .h4-debug-trigger{padding:3px 0;font-size:11px}.device-note{margin:0;font-size:10px}.h4-choice-grid{grid-template-columns:1fr;gap:9px}.h4-choice{min-height:140px}.h4-question{padding:18px 15px}.h4-yn{gap:8px}.h4-multi{grid-template-columns:1fr}.h4-status button{flex:1 1 calc(50% - 8px)}}
@media(max-width:680px){.footer-links .h4-debug-trigger{font-size:10px}}
@media(max-width:380px){.h4-level-value{flex-wrap:wrap;gap:6px 12px}.h4-level-value strong{order:3;flex-basis:100%}.h4-status button{flex:1 1 100%}.h4-switch a{width:100%}.topbar-right .privacy-live-badge{padding-inline:7px}}
@media(max-width:480px){.h4-proof-dialog{padding:19px}.h4-proof-grid{grid-template-columns:1fr}.h4-proof-actions{align-items:stretch;flex-direction:column}.h4-proof-run{width:100%}}
@media(prefers-reduced-motion:reduce){.h4-choice,.h4-question,.h4-yn button,.h4-multi button,.h4-status button,.h4-segment,.h4-slider-fill,.h4-slider-thumb,.h4-transition,.h4-transition-inner,.h4-transition-line::after,.progress-track span{transition:none}.h4-choice,.h4-reveal,.h4-header-reveal,.h4-yn button[aria-pressed=true],.h4-multi button[aria-pressed=true],.h4-status button[aria-pressed=true],.start-card,.result-card{animation:none}}
