/* V8 — exact Smart Order theme and V7 first-screen style.
   Interface reorganised into three isolated navigation contours.
   No new colour tokens: navy, graphite-grey, white, gold only.
*/
:root{font-size:16px}
body{background:#08192c}
.contour-head{height:64px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 clamp(17px,2.4vw,35px);background:#08192c;border-bottom:1px solid #314b61}
.contour-head .brand{font-size:17px;font-weight:600;letter-spacing:.09em}
.contour-head .brand span{color:#f89d06;font-size:11px;margin-left:7px;letter-spacing:.10em}
.contour-head .right{display:flex;align-items:center;gap:13px}
.contour-head .right .txt{font-size:13px;color:#b6c9d6}
.contour-head .right .btn{min-height:39px}
.contour-head a:hover{color:#ffbf63}
.screen{min-height:calc(100dvh - 64px)}
.gate{max-width:1190px;margin:auto;padding:clamp(30px,6vh,64px) 27px 55px}
.gate h1{font-size:clamp(27px,2.8vw,39px);font-weight:500;letter-spacing:-.035em;line-height:1.27;margin:10px 0 10px}
.gate>p{font-size:16px;max-width:770px}
.gate-hero{display:grid;grid-template-columns:1.05fr .95fr;gap:35px;align-items:center;margin:5vh 0}
.gate-hero h1{font-size:clamp(29px,3.5vw,44px);max-width:590px}
.gate-hero .summary{font-size:16px;line-height:1.7;max-width:550px;margin:0 0 25px}
.gate-hero .hero-glyph{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:25px;background:#102b43;border:1px solid #3b5671;border-radius:7px}
.gate-hero .hero-glyph div{display:grid;place-items:center;height:165px;background:#0b2138;border:1px solid #45637a;border-radius:5px}
.gate-hero .hero-glyph img{width:min(88px,85%);height:88px}
.micro{color:#8ea8bb;font-size:12px;margin-top:14px}
.two-actions{display:flex;gap:12px;flex-wrap:wrap}
.scope{color:#c4d4df;font-size:13px}
.scope strong{font-weight:500;color:#fff}
.plan-selector{display:grid;grid-template-columns:minmax(275px,.88fr) minmax(0,1.12fr);gap:15px;margin:28px 0 20px;align-items:stretch}
.plan-options{display:flex;flex-direction:column;gap:10px}
.role-option{border:1px solid #426079;background:#102b43;border-radius:6px;min-height:105px;width:100%;padding:15px 18px;display:flex;align-items:center;gap:15px;text-align:left;color:#f9f7f1;cursor:pointer}
.role-option:hover,.role-option[aria-selected=true]{border-color:#f89d06;background:#18354f}
.role-option img{width:60px;height:60px;flex:none}
.role-option strong{display:block;font-size:17px;font-weight:500}
.role-option small{color:#b9cbd8;font-size:13px;display:block;margin-top:4px}
.role-details{border:1px solid #526781;border-radius:6px;background:#0d253b;padding:25px 27px;display:flex;flex-direction:column}
.role-details .eyebrow{font-size:11px;color:#f1b85c;letter-spacing:.08em;margin-bottom:13px}
.role-details h2{font-size:24px;margin-bottom:6px}
.role-details .money{color:#f89d06;font-size:27px;font-weight:500;margin:6px 0}
.role-details p{font-size:14px;line-height:1.65}
.role-details .perks{margin:18px 0 24px;padding:0;list-style:none;display:grid;gap:11px}
.role-details .perks li{font-size:14px;color:#d3e1e9;padding-left:22px;position:relative}
.role-details .perks li:before{position:absolute;content:"✓";left:0;color:#f89d06}
.role-details .commands{display:flex;gap:9px;flex-wrap:wrap;margin-top:auto}
.role-details .commands .btn{flex:1 1 170px}
.statusline{font-size:13px;color:#d0dce6;background:#102b43;border-left:2px solid #f89d06;padding:12px 15px;margin-top:15px}
.contour-foot{border-top:1px solid #33495e;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:36px;padding-top:14px;font-size:12px;color:#8faabb}
.appshell{display:grid;grid-template-columns:196px minmax(0,1fr);min-height:100dvh;background:#0b2138}
.side{background:#08192c;border-right:1px solid #31495d;display:flex;flex-direction:column;padding:19px 8px;height:100dvh;position:sticky;top:0;z-index:5}
.side .brand{padding:7px 11px 21px;font-size:15px;letter-spacing:.09em;font-weight:600}
.side .brand small{color:#f89d06;font-size:9px;margin-left:5px}
.side .group-caption{font-size:10px;letter-spacing:.09em;color:#809db2;padding:16px 11px 6px;font-weight:600}
.side .navitems{display:grid;gap:2px}
.side button{width:100%;min-height:43px;border:1px solid transparent;background:transparent;display:flex;align-items:center;gap:11px;color:#c4d7e4;border-radius:5px;padding:8px 11px;font-size:14px;font-weight:400;text-align:left}
.side button:hover{background:#16334b;color:#fff}
.side button.current{background:#16354f;border-color:#365773;color:#ffbf56}
.side button img{height:21px;width:21px;object-fit:contain}
.side .bottom{margin-top:auto;border-top:1px solid #294257;padding:12px 10px 0;font-size:12px;color:#b4c8d5}
.side .bottom a{color:#e4b26e}
.side .bottom p{font-size:11px;margin:6px 0;color:#86a2b5}
.workpage{min-width:0;display:flex;flex-direction:column}
.toolbar{height:61px;padding:0 23px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #304b64;background:#0b2138}
.toolbar .crumb{font-size:13px;color:#9bb2c5}
.toolbar .crumb strong{color:#f5f5f2;font-weight:500}
.toolbar .group{display:flex;align-items:center;gap:11px}
.toolbar .role{font-size:11px;border:1px solid #485e72;border-radius:4px;padding:6px 9px;color:#c6d4e0}
.avatar{width:35px;height:35px;border-radius:5px;border:1px solid #f89d06;background:#102b43;color:#f89d06;font-weight:600;cursor:pointer}
.workcontent{padding:19px clamp(15px,2.4vw,32px) 35px;min-width:0;flex:1}
.workcontent.toolmode{padding:12px 14px 22px}
.workhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.workhead h1{font-size:clamp(23px,2vw,28px);letter-spacing:-.03em}
.workhead p{font-size:14px;margin-top:5px}
.workhead .btn{min-height:38px;padding:8px 13px;font-size:13px}
.homeservices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.home-service{border:1px solid #3a5971;background:#102b43;border-radius:6px;min-height:225px;padding:20px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;color:#f9f7f1;cursor:pointer}
.home-service:hover{border-color:#f89d06;background:#17354b}
.home-service img{width:80px;height:80px;margin:0 0 auto}
.home-service h2{font-size:20px;margin:15px 0 7px}
.home-service p{font-size:13px;line-height:1.55}
.home-service .arrow{margin-top:12px;color:#f89d06;font-size:12px}
.workspace{border:1px solid #385a75;border-radius:6px;background:#102b43;min-height:calc(100dvh - 142px);overflow:hidden;display:flex;flex-direction:column}
.subnav{display:flex;gap:0;align-items:center;min-height:49px;padding:0 13px;border-bottom:1px solid #42627b;background:#0b2138;flex-wrap:wrap}
.subnav button{min-height:44px;border:0;border-bottom:2px solid transparent;color:#bbcddd;background:transparent;padding:9px 16px;font-size:14px;cursor:pointer}
.subnav button.selected{border-color:#f89d06;color:#ffbe60}
.subnav button:hover{color:#fff}
.subnav .help{margin-left:auto;font-size:13px;color:#e4b478;min-height:38px;padding:7px 11px}
.activearea{flex:1;min-height:440px;display:flex;min-width:0}
.activearea .stage{flex:1;min-width:0;min-height:510px;display:flex;align-items:center;justify-content:center;padding:26px;position:relative}
.activearea .stage iframe{position:absolute;inset:0;width:100%;height:100%;min-height:500px;border:0;background:#fff}
.activearea .info{max-width:430px;text-align:center}
.activearea .info img{width:95px;height:95px;margin:0 auto 11px}
.activearea .info h2{font-size:23px;margin-bottom:8px}
.activearea .info p{font-size:14px;line-height:1.55;margin-bottom:17px}
.activearea .info .btn{font-size:13px}
.activearea .rightpanel{width:230px;flex:none;background:#0c263d;border-left:1px solid #395770;padding:18px}
.activearea .rightpanel h3{font-size:16px;margin-bottom:10px}
.activearea .rightpanel p{font-size:13px;line-height:1.6}
.workspace .caption{font-size:11px;color:#9cb4c5;border-top:1px solid #36536a;padding:9px 14px}
.details{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.7fr);gap:13px;width:100%;padding:17px;align-items:start}
.paper{border:1px solid #3a5970;background:#0b253b;padding:20px;border-radius:6px}
.paper h2{font-size:19px;margin-bottom:12px}
.paper p{font-size:13px;line-height:1.6}
.data-lines{list-style:none;margin:13px 0 0;padding:0}
.data-lines li{padding:11px 0;display:flex;justify-content:space-between;gap:12px;border-top:1px solid #315068;font-size:14px;color:#d0dce6}
.data-lines li strong{color:#f6f7f3;font-weight:500}
.data-lines li small{color:#8caabf;font-size:12px}
.paper .btn{margin-top:15px}
.field{display:grid;gap:6px}
.field label{font-size:13px;color:#c8d7e0}
.field input,.field textarea,.field select{background:#102b43;color:#f9f7f1;border:1px solid #506d83;border-radius:5px;padding:10px 12px;min-height:42px;font-size:14px;width:100%}
.field textarea{min-height:80px}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.drawer{position:fixed;right:0;top:0;height:100dvh;width:min(425px,95vw);background:#0b2138;z-index:30;box-shadow:-16px 0 50px #0008;border-left:1px solid #5e7488;padding:25px;overflow:auto}
.drawer .close{float:right;background:transparent;border:0;color:#d8dfec;font-size:23px;cursor:pointer}
.drawer h2{font-size:22px;margin:33px 0 11px}
.drawer p{font-size:14px;line-height:1.7;margin:0 0 13px}
.drawer a{color:#f89d06;text-decoration:underline;font-size:13px}
.drawer.hc-manager-guide{inset:0;margin:auto;width:min(610px,calc(100% - 24px));height:max-content;max-height:calc(100dvh - 24px);padding:clamp(18px,4vw,26px);border:1px solid var(--hc-border,#5e7488);border-radius:10px;box-shadow:0 18px 50px #0008;overscroll-behavior:contain}
.hc-manager-guide .close{width:44px;min-height:44px;margin:-6px -6px 0 4px;color:inherit}
.hc-manager-guide h2{margin:0 44px 14px 0}
.hc-manager-guide ol{margin:0 0 14px;padding-inline-start:23px;font-size:14px;line-height:1.55}
.hc-manager-guide li+li{margin-top:9px}
.hc-manager-guide p:last-child{margin-bottom:0}
.scrim{position:fixed;inset:0;background:#0009;z-index:29}
.modal{width:min(540px,95vw);padding:24px;border:1px solid #627b90;background:#102b43;border-radius:7px;color:#f9f7f1}
.modal::backdrop{background:#0009}
.modal h2{font-size:21px;margin-bottom:8px}
.modal p{font-size:13px;margin-bottom:13px}
.modal .actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
.modal .actions .btn{flex:1 1 160px}
.previewbar{display:flex;align-items:center;gap:11px;padding:9px 18px;background:#102b43;border-bottom:1px solid #3b5870;font-size:13px;color:#c9d9e3}
.previewbar .btn{min-height:36px;font-size:12px;padding:7px 10px}
.previewbar select{background:#0b2138;color:#fff;border:1px solid #506d85;border-radius:4px;min-height:36px;padding:6px 9px;font-size:12px}
.previewbar .spacer{flex:1}
.previewbar strong{color:#f89d06;font-weight:500}
@media(max-width:1020px){
.appshell{grid-template-columns:164px minmax(0,1fr)}
.side{padding:14px 6px}.side button{font-size:12px;gap:8px}
.homeservices{gap:8px}.home-service{padding:16px}.home-service h2{font-size:18px}.home-service p{font-size:12px}
}
@media(max-width:750px){
.gate-hero{grid-template-columns:1fr}.gate-hero .hero-glyph{max-width:590px}.gate-hero .hero-glyph div{height:124px}
.plan-selector{grid-template-columns:1fr}
.appshell{grid-template-columns:1fr}
.side{position:relative;top:0;height:auto;flex-direction:row;align-items:center;flex-wrap:wrap;padding:10px 13px;gap:8px;border-right:0;border-bottom:1px solid #334d60}
.side .brand{padding:0;margin-right:8px}
.side .group-caption,.side .bottom{display:none}
.side .navitems{display:flex;gap:3px;overflow:auto;max-width:calc(100vw - 25px)}
.side button{white-space:nowrap;min-height:38px;font-size:12px;min-width:max-content}
.side button img{height:17px;width:17px}
.workcontent,.workcontent.toolmode{padding:12px}
.workspace{min-height:500px}
.activearea .rightpanel{display:none}
}
@media(max-width:550px){
.contour-head{height:57px;padding:0 12px}.contour-head .brand{font-size:14px}
.contour-head .right{gap:6px}.contour-head .right .txt{display:none}
.gate{padding:27px 15px 40px}.gate h1{font-size:27px}.gate>p{font-size:14px}
.gate-hero{gap:17px}.gate-hero .hero-glyph{gap:6px;padding:11px}.gate-hero .hero-glyph div{height:95px}.gate-hero .hero-glyph img{height:60px;width:60px}
.role-option{min-height:81px;padding:11px}.role-option img{height:49px;width:49px}.role-details{padding:18px}
.toolbar{height:54px;padding:0 11px}.toolbar .role{display:none}
.workhead h1{font-size:23px}.workhead p{font-size:13px}
.homeservices{grid-template-columns:1fr}
.home-service{min-height:112px;display:grid;grid-template-columns:72px 1fr;gap:0 10px;align-items:center;padding:13px}
.home-service img{grid-row:1/4;height:66px;width:66px}
.home-service h2{margin:0 0 4px;font-size:18px}.home-service p{font-size:13px}.home-service .arrow{margin:4px 0 0}
.subnav{padding:0 6px}.subnav button{font-size:12px;padding:7px 10px;min-height:43px}.subnav .help{font-size:11px;margin-left:0}
.activearea .stage{min-height:360px;padding:15px}.activearea .info img{height:77px;width:77px}.activearea .info h2{font-size:20px}.activearea .info p{font-size:13px}
.details{grid-template-columns:1fr;padding:10px}.paper{padding:15px}
.formgrid{grid-template-columns:1fr}
.previewbar{gap:6px;padding:7px 10px}.previewbar .label{display:none}.previewbar .btn{font-size:11px;padding:7px 8px}
}

@media(max-width:365px){.previewbar{flex-wrap:wrap}.previewbar .spacer{display:none}.previewbar select{max-width:100px}.role-option{gap:9px;padding:9px}.role-option strong{font-size:15px}.role-option small{font-size:12px}.role-option img{height:43px;width:43px}}

/* LAB 2.0: retain original colours, give existing editors a real canvas.
   No new UI visual direction and no imitated product geometry. */
.workcontent.toolmode:has(.embedded-stage){padding:8px 11px 12px}
.workspace:has(.embedded-stage){min-height:calc(100dvh - 90px)}
.activearea:has(.embedded-stage){min-height:calc(100dvh - 165px)}
.activearea .stage.embedded-stage{height:calc(100dvh - 165px);min-height:600px;position:relative;display:block;flex:1;background:#0b2138}
.embedded-banner{height:36px;position:absolute;inset:0 0 auto 0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #405b71;background:#102b43;padding:6px 13px;color:#b5c8d6;font-size:11px}
.embedded-banner a{color:#f89d06;font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap}
.embedded-banner a:hover{text-decoration:underline}
.activearea .stage.embedded-stage iframe.tool-iframe{position:absolute;left:0;right:0;top:36px;bottom:0;inset:auto 0 0 0;height:calc(100% - 36px);width:100%;min-height:550px;background:#08192c;border:0}
@media(max-width:750px){
.workcontent.toolmode:has(.embedded-stage){padding:5px}
.workspace:has(.embedded-stage){min-height:calc(100dvh - 115px)}
.activearea:has(.embedded-stage){min-height:calc(100dvh - 185px)}
.activearea .stage.embedded-stage{height:calc(100dvh - 185px);min-height:560px}
.activearea .stage.embedded-stage iframe.tool-iframe{min-height:510px}
}
@media(max-width:550px){
.embedded-banner{font-size:10px}
.embedded-banner a{font-size:11px}
}

.capture-action{margin-left:8px!important;color:#f89d06!important;border-left:1px solid #49647b!important;padding-left:14px!important}
.view-shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin:13px 0}
.view-shots img{display:block;aspect-ratio:4/3;object-fit:contain;width:100%;background:#08192c;border:1px solid #49647b;border-radius:5px}
@media(max-width:650px){.capture-action{margin-left:0!important;padding:7px 9px!important;font-size:11px!important;border-left:0!important}}

/* 2.0 stable: capture gallery is intentionally hidden pending device QA */
.capture-action{display:none!important}

/* Audited UI compacting: retain approved Smart Order palette/typography */
.project-chip,.role-switch{min-height:35px;background:#102b43;border:1px solid #47617a;border-radius:4px;color:#cddce6;font:500 12px Montserrat,Arial,sans-serif}
.project-chip{padding:6px 11px;max-width:205px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.project-chip strong{color:#f5bb63;font-weight:600}
.project-chip:hover,.role-switch:hover{border-color:#f89d06}
.role-switch{max-width:156px;padding:5px 8px;cursor:pointer}
.side .bottom .side-packages{font-size:12px;color:#e4b26e;background:transparent;border:0;text-align:left;padding:8px 0;min-height:33px;width:auto;white-space:normal}
.side .bottom .side-packages:hover{text-decoration:underline}
.workcontent.toolmode:has(.embedded-stage){padding:5px 7px 8px}
.workspace:has(.embedded-stage){min-height:calc(100dvh - 80px);border-radius:4px}
.activearea:has(.embedded-stage){min-height:calc(100dvh - 148px)}
.activearea .stage.embedded-stage{height:calc(100dvh - 148px);min-height:490px}
.activearea .stage.embedded-stage iframe.tool-iframe{min-height:440px}
.subnav{min-height:43px;padding-left:9px}
.subnav button{min-height:40px;padding:7px 13px}
.subnav .help{margin-left:auto}
.embedded-banner{height:32px;padding:5px 11px}
.activearea .stage.embedded-stage iframe.tool-iframe{height:calc(100% - 32px)}
.toolbar{height:49px;padding-left:17px;padding-right:17px}
.workhead{margin-bottom:12px}
.workcontent{padding-top:15px}
@media(max-width:750px){
 .workcontent.toolmode:has(.embedded-stage){padding:4px}
 .workspace:has(.embedded-stage){min-height:calc(100dvh - 156px)}
 .activearea:has(.embedded-stage){min-height:calc(100dvh - 210px)}
 .activearea .stage.embedded-stage{height:calc(100dvh - 210px);min-height:420px}
 .activearea .stage.embedded-stage iframe.tool-iframe{min-height:370px}
 .toolbar{padding-left:10px;padding-right:10px}
}
@media(max-width:550px){
 .project-chip{font-size:11px;padding:6px 8px;max-width:135px}
 .role-switch{font-size:11px;max-width:100px}
 .toolbar .group{gap:4px}
 .toolbar .crumb{font-size:12px}
 .subnav .help{font-size:12px;margin-left:auto}
}

/* QR reports: at 320px keep module tabs in their own scrollable track, not page overflow. */
@media(max-width:420px){
 .workspace,.workcontent,.activearea{min-width:0!important;max-width:100%!important}
 .workspace .subnav{min-width:0!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin;gap:2px!important}
 .workspace .subnav [data-tab],.workspace .subnav .help{flex:0 0 auto!important;font-size:11px!important;padding:8px!important}
 .workspace .stage.embedded-stage{min-width:0!important;max-width:100%!important}
}

@media(max-width:360px){
 .toolbar .role-switch{display:none!important}
 .toolbar .project-chip{max-width:118px}
 .toolbar .group{min-width:0}
}

/* SHOWROOM ONLY — non-scrolling iframe controlled by HC_SHOWROOM_HEIGHT. */
.activearea .stage.embedded-stage.showroom-embedded{
 height:auto!important; min-height:280px!important; max-height:none!important;
 display:block!important; position:relative; overflow:visible;
}
.activearea .stage.embedded-stage.showroom-embedded iframe.tool-iframe.showroom-frame{
 position:relative!important; inset:auto!important; top:auto!important; bottom:auto!important;
 display:block; width:100%; height:840px; min-height:280px!important; max-height:none!important;
 border:0; overflow:hidden; background:#08192c;
}
