/* Shared component rhythm. Marketing and assessment keep their own palettes. */
:root{--ui-control-height:46px;--ui-gap:12px;--ui-radius:10px}
button,a,input,textarea,select{touch-action:manipulation}
button,a{ -webkit-tap-highlight-color:transparent }
:where(button,a,input,textarea,select):focus-visible{outline:2px solid var(--teal,var(--violet,#b3a8ff));outline-offset:4px}
:where(button,a){transition:background .2s,border-color .2s,box-shadow .2s,transform .2s}
:where(button:disabled){cursor:not-allowed}

/* Brand pages: consistent pill controls and evenly spaced action groups. */
body[data-ui="marketing"] :is(.btn,.primary-button,.secondary-button,.quiet-button,.dialog-button,.batch-button){min-height:48px;line-height:1.5;justify-content:center;gap:10px}
body[data-ui="marketing"] .btn-glow{background:linear-gradient(105deg,#dfd1ff,#ffded6);color:#20172e}
body[data-ui="marketing"] .header-cta{min-height:40px}
body[data-ui="marketing"] :is(.hero-actions,.dialog-assessment-links){gap:var(--ui-gap)}
body[data-ui="marketing"] :is(.card-foot,.industry-foot) button{min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:#ffffff04;white-space:nowrap}
body[data-ui="marketing"] :is(.card-foot,.industry-foot) button:hover{border-color:#b3a8ff66;background:#b3a8ff12}
body[data-ui="marketing"] :is(.solution-card,.industry-card,.home-solution-card){border-radius:24px}
body[data-ui="marketing"] :is(.solution-card,.industry-card,.home-solution-card) p{line-height:1.85}
body[data-ui="marketing"] :is(.home-solution-card,.industry-card)::after{pointer-events:none}

/* Assessment workstations: balanced primary/secondary controls. */
body[data-ui="workstation"] :is(.primary,.secondary,.primary-button,.secondary-button,.secondary-action){min-height:var(--ui-control-height);border-radius:var(--ui-radius);font-size:12px;line-height:1.5;padding:11px 16px;display:flex;align-items:center;justify-content:center;gap:9px;text-align:center;text-decoration:none}
body[data-ui="workstation"] :is(.primary,.primary-button){background:linear-gradient(105deg,#18c6b6,#42d399);color:#062721;font-weight:600}
body[data-ui="workstation"] :is(.secondary,.secondary-button,.secondary-action){background:#ffffff03;border:1px solid #33485c;color:#b6c9d6}
body[data-ui="workstation"] :is(.secondary,.secondary-button,.secondary-action):hover{background:#25d0b710;border-color:#25d0b766;color:#d8f6ef}
body[data-ui="workstation"] :is(.back,.back-link){min-height:40px;border-radius:var(--ui-radius);display:inline-flex;align-items:center;justify-content:center}
body[data-ui="workstation"] .back-link{width:40px}
body[data-ui="workstation"] :is(.run-controls,.voice-controls,.button-row,.dialog-actions){gap:var(--ui-gap)}
body[data-ui="workstation"] .result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:var(--ui-gap);margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
body[data-ui="workstation"] .result-actions>*{width:100%;min-width:0;margin:0}
body[data-ui="workstation"] .result-empty .result-actions{grid-template-columns:minmax(0,300px)}
body[data-ui="workstation"] .report-section{border:1px solid var(--line);background:#101e2b;padding:22px;border-radius:12px}
body[data-ui="workstation"] .report-section h3{font-size:14px;line-height:1.65;margin:0 0 14px}
body[data-ui="workstation"] .report-section h3:not(:first-child){margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
body[data-ui="workstation"] .report-section ul{margin:0;padding-left:18px;color:#b8cbd8}
body[data-ui="workstation"] .report-section li{font-size:12px;font-weight:400;line-height:1.85;margin:8px 0}
body[data-ui="workstation"] .evidence-row{padding:12px 0;border-bottom:1px solid var(--line);line-height:1.85;font-size:12px;overflow-wrap:anywhere}
body[data-ui="workstation"] .evidence-row:last-child{border-bottom:0}
body[data-ui="workstation"] .evidence-row small{display:block;margin-bottom:5px;letter-spacing:0;color:#6bcabe;font-size:10px}
body[data-ui="workstation"] .evidence-row p{color:#b8cbd8;font-weight:400}
body[data-ui="workstation"] :is(.channel-tabs button,select){min-height:42px}
body[data-ui="workstation"] :is(.chat-messages,.result-center,.result-left,.result-right){scrollbar-width:thin;scrollbar-color:#315366 #09111a;scroll-padding:20px}
body[data-ui="workstation"] :is(.facts strong,.identity-card>div,.worker-card>div){min-width:0;overflow-wrap:anywhere}
body[data-ui="workstation"] .start-button{border-radius:var(--ui-radius)}

/* High-risk layouts previously forced a 1180px desktop viewport. */
@media(max-width:1179px){
  html:has(body[data-ui="workstation"]),body[data-ui="workstation"]{min-width:320px}
  body[data-ui="workstation"] :is(.start-shell,.app-shell){display:block;min-width:0}
  body[data-ui="workstation"] :is(.start-workspace,.app-shell .workspace){display:flex;flex-direction:column}
  body[data-ui="workstation"] :is(.side-rail,.left-panel,.right-panel,.action-panel){width:100%;border:0;border-bottom:1px solid var(--line)}
  body[data-ui="workstation"] :is(.start-shell,.app-shell) .topbar{padding:18px 20px;gap:16px;flex-wrap:wrap}
  body[data-ui="workstation"] .topbar-meta{gap:12px;flex-wrap:wrap}
  body[data-ui="workstation"] .topbar-meta .meta-item{padding-left:12px}
  body[data-ui="workstation"] .ready-stage{padding:55px 24px 24px}
  body[data-ui="workstation"] .ready-content{position:relative;inset:auto}
  body[data-ui="workstation"] .instruction-row{position:static;margin:24px 0 0}
  body[data-ui="workstation"] .start-shell .scanner-console{height:auto;grid-template-columns:minmax(0,1fr) 270px minmax(0,1fr);margin:20px auto}
  body[data-ui="workstation"] :is(.process-bar,.audit-bar){display:flex;padding:20px;gap:20px;flex-wrap:wrap;min-height:70px}
  body[data-ui="workstation"] .audit-footer{padding:0;min-height:0}
  body[data-ui="workstation"] .process-line{flex:1;min-width:0;gap:10px}
  body[data-ui="workstation"] .center-stage{grid-template-rows:auto 570px auto}
  body[data-ui="workstation"] .stage-toolbar{min-height:48px;gap:10px;flex-wrap:wrap;padding:12px 18px}
  body[data-ui="workstation"] .signal-strip{min-width:0}
}
@media(max-width:700px){
  body[data-ui="marketing"] :is(.hero-actions,.dialog-assessment-links,.closing-section>div){display:grid;grid-template-columns:1fr;width:100%}
  body[data-ui="marketing"] .hero-actions>*{width:100%;margin:0}
  body[data-ui="marketing"] :is(.btn,.primary-button,.secondary-button,.quiet-button){height:auto;white-space:normal;padding-block:12px}
  body[data-ui="marketing"] .header-cta{min-height:40px;padding-block:8px;white-space:nowrap}
  body[data-ui="marketing"] :is(.ec-hardware,.home-batch-copy) .btn{width:100%}
  body[data-ui="workstation"] :is(.result-actions,.button-row,.dialog-actions){display:grid;grid-template-columns:1fr}
  body[data-ui="workstation"] :is(.result-actions,.button-row,.dialog-actions)>*{width:100%;margin:0}
  body[data-ui="workstation"] :is(.voice-controls,.channel-tabs){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-ui="workstation"] .voice-controls>*{min-width:0}
  body[data-ui="workstation"] :is(select,textarea,input[type="text"]){font-size:16px}
  body[data-ui="workstation"] .result-center .report-section{padding:18px}
  body[data-ui="workstation"] :is(.start-shell,.app-shell) .brand-block{gap:10px;flex-wrap:wrap}
  body[data-ui="workstation"] :is(.start-shell,.app-shell) .brand-mark{display:none}
  body[data-ui="workstation"] :is(.start-shell,.app-shell) h1{font-size:18px}
  body[data-ui="workstation"] .topbar-meta{width:100%;font-size:10px}
  body[data-ui="workstation"] .topbar-meta .meta-item{flex:1;padding:0;border:0}
  body[data-ui="workstation"] .topbar-meta .meta-item :is(span,strong){font-size:10px}
  body[data-ui="workstation"] .ready-stage{padding:60px 18px 24px}
  body[data-ui="workstation"] .ready-content h2{font-size:24px}
  body[data-ui="workstation"] .start-shell .scanner-console{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-ui="workstation"] .start-shell .holo-scanner{grid-column:1/-1;grid-row:1;justify-self:center;width:270px;height:310px}
  body[data-ui="workstation"] .metric-rail{transform:none}
  body[data-ui="workstation"] .metric-card::after{display:none}
  body[data-ui="workstation"] .metric-card strong{white-space:normal;overflow:visible}
  body[data-ui="workstation"] .instruction-row{grid-template-columns:1fr}
  body[data-ui="workstation"] .process-line{width:100%;flex:auto;flex-wrap:wrap;justify-content:flex-start;gap:18px}
  body[data-ui="workstation"] .process-line::before{display:none}
  body[data-ui="workstation"] .process-node{min-width:50px}
  body[data-ui="workstation"] .quality-pills{flex-wrap:wrap;gap:10px}
  body[data-ui="workstation"] .center-stage{grid-template-rows:auto 500px auto}
  body[data-ui="workstation"] .camera-view{min-height:500px}
  body[data-ui="workstation"] .capture-instruction{max-width:calc(100% - 32px)}
  body[data-ui="workstation"] .capture-progress{max-width:calc(100% - 32px)}
  body[data-ui="workstation"] .signal-strip{display:flex;flex-wrap:wrap;gap:16px;padding:18px}
  body[data-ui="workstation"] .signal-wave{min-width:0;width:100%}
  body[data-ui="workstation"] .audit-events{flex-wrap:wrap;gap:12px}
  body[data-ui="workstation"] .audit-title{min-width:0}
  body[data-ui="workstation"] .audit-title small{overflow-wrap:anywhere}
  body[data-ui="workstation"] .review-dialog{width:calc(100% - 24px);padding:0;max-height:calc(100dvh - 24px);overflow-y:auto}
  body[data-ui="workstation"] .review-dialog form{padding:20px}
  body[data-ui="workstation"] .review-dialog .form-grid{grid-template-columns:1fr}
  body[data-ui="workstation"] .toast{left:16px;right:16px;bottom:16px;min-width:0}
}
@media(prefers-reduced-motion:reduce){:where(button,a){transition:none}}
