.workflow-stepper{display:flex;align-items:center;gap:8px;margin:16px 0 18px;padding:11px 12px;border:1px solid var(--border,#d8e5e2);border-radius:14px;background:rgba(11,107,100,.035)}
.workflow-stepper>i{height:1px;flex:1;min-width:8px;background:#cbd8d6}
.workflow-step{display:flex;align-items:center;gap:7px;color:#6c7c79;font-size:.82rem;white-space:nowrap}
.workflow-step b{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#edf2f1;color:#526360;font-size:.75rem}
.workflow-step.active{color:#095f59;font-weight:700}.workflow-step.active b{background:#0b6b64;color:#fff}.workflow-step.done{color:#397a74}.workflow-step.done b{background:#d8eeeb;color:#0b6b64}
.evidence-first-result .result-section{scroll-margin-top:80px}.evidence-first-theory{border-left:4px solid #0b6b64}.evidence-first-theory li{display:grid;gap:3px}.evidence-first-theory li>strong{color:#095f59}.evidence-first-theory li>small{opacity:.75}.evidence-summary{border:1px solid rgba(11,107,100,.18)}
@media(max-width:760px){
  .content{padding-bottom:20px}
  .workflow-stepper{gap:5px;padding:10px 8px;overflow:hidden}.workflow-step{gap:4px;font-size:.72rem}.workflow-step b{width:22px;height:22px}.workflow-stepper>i{min-width:4px}
  .capture-card .analyze-btn{position:static;bottom:auto;z-index:auto;box-shadow:0 10px 22px rgba(11,107,100,.18)}
  .quality-card,.history-card{scroll-margin-top:74px}.chat-card,.capture-card{scroll-margin-top:74px}
  .topbar{gap:8px;padding:10px max(12px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top));min-height:66px}
  .topbar>div:first-child{flex:0 0 auto;min-width:0}
  .brand{font-size:15px;line-height:1.12;letter-spacing:.025em;white-space:nowrap}
  .subtitle{font-size:10.5px;line-height:1.15;margin-top:4px;font-weight:650;white-space:nowrap;opacity:.88}
  .topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;flex:1}
  .topbar-actions .icon-btn{flex:0 0 42px;width:42px;height:42px;border-radius:12px;font-size:18px;padding:0}
  .topbar-actions #accessBtn{flex:0 1 auto;width:auto;min-width:0!important;max-width:116px;height:42px;padding:0 10px;font-size:12.5px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-actions .settings-label{display:none}
  .result-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:390px){
  .workflow-step span{display:none}.workflow-stepper>i{min-width:12px}.result-grid{grid-template-columns:1fr}
  .topbar{gap:6px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .brand{font-size:14px;letter-spacing:.015em}
  .subtitle{font-size:10px}
  .topbar-actions{gap:5px}
  .topbar-actions .icon-btn{flex-basis:40px;width:40px;height:40px}
  .topbar-actions #accessBtn{max-width:100px;height:40px;padding:0 8px;font-size:12px}
}


/* Workspace navigation: keep stable feature DOM in place, show one functional surface at a time. */
.aitc-workspace-hidden{display:none!important}
.aitc-bottom-nav{
  position:fixed;z-index:80;left:50%;right:auto;bottom:max(10px,env(safe-area-inset-bottom));
  transform:translateX(-50%);display:none;grid-template-columns:repeat(4,minmax(0,1fr));
  width:min(720px,calc(100% - 28px));padding:7px;border:1px solid rgba(11,107,100,.17);
  border-radius:18px;background:rgba(255,255,255,.97);box-shadow:0 10px 34px rgba(17,48,45,.20);
  backdrop-filter:blur(14px)
}
.aitc-bottom-nav button{
  appearance:none;border:0;background:transparent;display:grid;justify-items:center;gap:2px;
  min-width:0;padding:7px 3px;color:#4f6461;font:inherit;border-radius:12px
}
.aitc-bottom-nav button span{font-size:1.08rem;line-height:1.1}
.aitc-bottom-nav button small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.70rem;font-weight:650}
.aitc-bottom-nav button.active{background:#e7f3f1;color:#095f59}
.aitc-bottom-nav button.active small{font-weight:800}
.aitc-bottom-nav button:disabled{opacity:.38;cursor:not-allowed}
.aitc-bottom-nav button:not(:disabled):active{background:#dceeea}
@media(min-width:761px){
  .content{padding-bottom:28px}
  .aitc-bottom-nav button{grid-template-columns:auto auto;align-items:center;justify-content:center;gap:7px;padding:9px 8px}
  .aitc-bottom-nav button span{font-size:1rem}
  .aitc-bottom-nav button small{font-size:.78rem}
}
@media(max-width:760px){
  .aitc-bottom-nav button{padding:5px 1px}
  .aitc-bottom-nav button small{font-size:.64rem}
}

/* Responsive workspace v3 */
html[data-aitc-layout="mobile"] body{padding-bottom:88px}
html[data-aitc-layout="mobile"] .aitc-bottom-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:calc(100% - 16px)}
html[data-aitc-layout="desktop"] body{padding-bottom:0}
html[data-aitc-layout="desktop"] #resultCard[hidden]{display:none!important}


/* Compact unified topbar control cluster r2 */
.topbar-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:0;padding:3px;
  flex:0 0 auto!important;width:max-content;max-width:100%;min-width:0!important;
  border:1px solid rgba(255,255,255,.18);border-radius:13px;
  background:rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  overflow:hidden
}
.topbar-actions .icon-btn{
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
  width:38px;min-width:38px;height:36px;padding:0 8px;border:0;border-radius:9px;
  background:transparent;color:#fff;font-size:16px;line-height:1;font-weight:750;
  box-shadow:none
}
.topbar-actions .icon-btn+.icon-btn{border-left:1px solid rgba(255,255,255,.16);border-top-left-radius:0;border-bottom-left-radius:0}
.topbar-actions .icon-btn:hover{background:rgba(255,255,255,.10)}
.topbar-actions .icon-btn:active{background:rgba(255,255,255,.15);transform:translateY(1px)}
.topbar-actions #accessBtn{
  width:auto;min-width:72px!important;max-width:96px;height:36px;padding:0 10px;
  font-size:11.5px;line-height:1;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.topbar-actions .layout-mode-btn{width:auto!important;min-width:54px!important;max-width:66px;padding:0 10px;font-size:12px;font-weight:850}
.topbar-actions .settings-btn{width:38px!important;min-width:38px!important;padding:0!important}
.topbar-actions .settings-label{display:none!important}
.topbar-actions>a.icon-btn{width:38px;min-width:38px}
@media(max-width:760px){
  .topbar{min-height:58px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:8px}
  .topbar-actions{gap:0;padding:2px;border-radius:12px}
  .topbar-actions .icon-btn{width:34px;min-width:34px;height:32px;padding:0 6px;border-radius:8px;font-size:15px}
  .topbar-actions #accessBtn{min-width:68px!important;max-width:82px;height:32px;padding:0 8px;font-size:10.5px}
  .topbar-actions .layout-mode-btn{min-width:48px!important;max-width:58px;padding:0 7px;font-size:11px}
  .topbar-actions .settings-btn,.topbar-actions>a.icon-btn{width:34px!important;min-width:34px!important}
}
@media(max-width:390px){
  .topbar-actions .icon-btn{width:32px;min-width:32px;height:30px;font-size:14px}
  .topbar-actions #accessBtn{min-width:62px!important;max-width:74px;height:30px;padding:0 6px;font-size:10px}
  .topbar-actions .layout-mode-btn{min-width:44px!important;max-width:52px;padding:0 6px;font-size:10.5px}
  .topbar-actions .settings-btn,.topbar-actions>a.icon-btn{width:32px!important;min-width:32px!important}
}

/* PR-preview-build: compact-topbar-r2 */
