/* AI Workbench V29 — native shell non-regression repair.
   Additive only: resolves legacy mobile-shell grid placement leaking into the V36 native Workbench. */
body:has(.aiw-shell){padding:0!important;min-width:0;background:#f7f4ed}
.aiw-shell{grid-template-columns:225px minmax(0,1fr)!important;grid-template-rows:minmax(100vh,auto)!important;align-items:start!important;width:100%!important;max-width:none!important;margin:0!important}
.aiw-shell>.aiw-sidebar{grid-column:1!important;grid-row:1!important}
.aiw-shell>.aiw-main{grid-column:2!important;grid-row:1!important;min-width:0!important;width:100%!important;margin:0!important;padding:0 0 44px!important}
.aiw-main>.aiw-topbar{grid-column:auto!important;grid-row:auto!important}
.aiw-route[data-panel="home"]{min-width:0}

/* Keep primary navigation readable and deliberate. */
.aiw-sidebar .aiw-nav-group button{min-height:44px}
.aiw-sidebar .aiw-nav-group button b{font-size:12px;line-height:1.25}
.aiw-sidebar .aiw-nav-group button small{font-size:10px;line-height:1.35}
.aiw-side-note p{font-size:12px;line-height:1.5}

@media(max-width:900px){
  body:has(.aiw-shell){padding:0!important}
  .aiw-shell{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important}
  .aiw-shell>.aiw-sidebar{grid-column:1!important;grid-row:1!important;position:relative!important;height:auto!important}
  .aiw-shell>.aiw-main{grid-column:1!important;grid-row:2!important;width:100%!important;max-width:100%!important}
}

/* V29 visual acceptance repairs: dark hero contrast + mobile containment. */
.aiw-vault-hero h1{color:#fff!important}
.aiw-vault-hero.role h1{color:#fff!important}
@media(max-width:900px){
  .aiw-shell>.aiw-sidebar{overflow:hidden!important}
  .aiw-side-scroll{overflow-x:auto!important;overflow-y:hidden!important;max-width:100%!important;scrollbar-width:none}
  .aiw-side-scroll::-webkit-scrollbar{display:none}
  .aiw-destination-menu summary,.aiw-category-menu summary{color:#fff!important}
}
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:clip!important}
  .aiw-side-scroll>.aiw-nav-group{order:0}
  .aiw-destination-menu{order:1!important}
  .aiw-category-menu{order:2!important}
}

/* V36 controls are outside #wbReviewApp; legacy contrast shields do not apply. */
html body .aiw-shell :is(.aiw-run,.aiw-new){background:#0b3552!important;color:#fff!important}
html body .aiw-shell :is(.aiw-run,.aiw-new) *{color:inherit!important}
html body .aiw-shell .aiw-ready-card-links .aiw-ready-open,html body .aiw-shell .aiw-ready-card-links .aiw-action-center-open{background:#0c6465!important;color:#fff!important}

/* A result has its own visible edit surface, including after reopening. */
.aiw-revision{padding:24px;margin:22px 0;background:#edf7f4;border:1px solid #b6d6cf;border-radius:16px}
.aiw-revision h3{font:600 25px/1.2 Georgia,serif;color:#10394c;margin:0 0 8px}
.aiw-revision p{font-size:15px;line-height:1.6;color:#34535d}
.aiw-revision label{display:block;font-weight:750;margin:18px 0 7px}
.aiw-revision textarea{display:block!important;width:100%;min-height:110px;padding:14px;border:1px solid #9fbfb9;border-radius:10px;background:#fff;color:#173846;font:16px/1.6 system-ui;resize:vertical}
.aiw-revision-shortcuts,.aiw-revision-controls,.aiw-revision-controls>div{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.aiw-revision-controls{justify-content:space-between;margin-top:14px}
html body .aiw-revision button{min-height:44px;padding:10px 14px;border-radius:10px;border:1px solid #9fbfb9;background:#fff;color:#173846;font:650 14px/1.4 system-ui;cursor:pointer}
html body .aiw-revision button.active,html body .aiw-revision [data-revision-run]{background:#0c6465!important;color:#fff!important;border-color:#0c6465!important}
.aiw-revision [data-revision-status]{margin-bottom:0}
.aiw-revision :is(button,textarea):focus-visible{outline:3px solid #bf8b27;outline-offset:3px}
.aiw-recent-archive{margin:24px 32px;padding:18px;border:1px solid #d3e2df;border-radius:14px;background:#fffdf8}
.aiw-recent-archive>summary{font-weight:750;min-height:44px;cursor:pointer}
@media(max-width:650px){.aiw-revision{padding:18px}.aiw-revision-controls,.aiw-revision-controls>div{display:grid;grid-template-columns:minmax(0,1fr);width:100%}.aiw-recent-archive{margin:18px 12px}.aiw-revision-controls button{width:100%}}
