.stage-topbar-actions { display:flex; flex-wrap:wrap; align-items:center; gap:18px; }
.stage-help-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:9px 15px; border:1px solid #c9dace; border-radius:999px; background:#e6f3e9; color:#254f35; font:inherit; font-weight:750; font-size:13px; line-height:1.3; cursor:pointer; }
.stage-help-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; }
.stage-help-button svg path { fill:currentColor; stroke:none; }
.stage-help-button:hover { background:#d9eddf; }

.osg-dialog { box-sizing:border-box; width:min(1080px,calc(100% - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; border:1px solid #d3dfd4; border-radius:24px; color:#1b3023; background:#f7fbf4; box-shadow:0 28px 90px #0a231743; overflow:hidden; }
.osg-dialog::backdrop { background:#10261faa; backdrop-filter:blur(7px); }
.osg-dialog *,.osg-dialog *::before,.osg-dialog *::after { box-sizing:border-box; }
.osg-dialog [hidden] { display:none !important; }
.osg-dialog :focus-visible { outline-offset:4px; }
.osg-frame { max-height:calc(100dvh - 34px); overflow-y:auto; overscroll-behavior:contain; }
.osg-header { position:sticky; top:0; z-index:6; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 32px; background:#fbfdf9; border-bottom:1px solid #e1e9dd; }
.osg-eyebrow { margin:0 0 5px; color:#467452; font-size:10px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.osg-header h2 { margin:0; font-size:clamp(20px,2.5vw,27px); font-weight:800; line-height:1.2; letter-spacing:-.035em; }
.osg-close { flex:0 0 44px; width:44px; height:44px; border:1px solid #d7e3d5; border-radius:50%; background:#fff; color:#284733; font:400 30px/1 sans-serif; cursor:pointer; }
.osg-intro { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:22px 32px 0; }
.osg-intro > p { max-width:630px; margin:0; color:#53685b; font-size:13px; line-height:1.6; }
.osg-role-switch { display:flex; flex-wrap:wrap; gap:5px; padding:4px; border:1px solid #d7e3d5; border-radius:13px; background:#edf4e9; }
.osg-role-switch button { min-height:38px; padding:7px 12px; border:0; border-radius:9px; background:transparent; color:#4c6454; font:inherit; font-weight:700; font-size:12px; line-height:1.3; cursor:pointer; }
.osg-role-switch button[aria-pressed=true] { background:#fff; color:#264f35; box-shadow:0 2px 7px #214b2510; }
.osg-body { display:grid; grid-template-columns:minmax(260px,.85fr) minmax(0,1.15fr); grid-template-areas:'notes screen'; align-items:start; gap:36px; padding:30px 32px; }
.osg-notes { grid-area:notes; min-width:0; padding:4px 0; scroll-margin-top:calc(var(--osg-header-height,90px) + 8px); }
.osg-step-number { display:inline-flex; align-items:center; margin:0 0 18px; padding:7px 11px; border:1px solid #cfdfc9; border-radius:8px; background:#e9f3e3; color:#3e6848; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.osg-notes h3 { margin:0; font-size:clamp(25px,2.8vw,34px); line-height:1.16; letter-spacing:-.035em; overflow-wrap:anywhere; }
.osg-notes h3:focus { outline:none; }
.osg-notes > p { margin:15px 0 0; color:#4c6252; font-size:15px; line-height:1.7; }
.osg-tip { display:flex; gap:10px; margin-top:22px; padding:15px; border-radius:14px; border:1px solid #dbe7d4; background:#edf4e7; color:#3a5940; }
.osg-tip > span { font-size:21px; line-height:1.2; }
.osg-tip p { margin:0; font-size:12px; line-height:1.65; }
.osg-screen { grid-area:screen; min-width:0; border:1px solid #cbdacb; border-radius:18px; overflow:hidden; background:#eef6ea; box-shadow:0 3px 6px #25462b08,0 14px 32px #25462b0b; }
.osg-screen { scroll-margin-top:calc(var(--osg-header-height,90px) + 8px); }
.osg-screen-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; padding:10px 15px; background:#e5eddf; color:#526a57; font-size:11px; font-weight:750; }
.osg-screen-dots { color:#9caf9a; font-size:9px; letter-spacing:3px; white-space:nowrap; }
.osg-example-label { padding:3px 7px; border-radius:5px; background:#f6fbf1; color:#446546; font-size:10px; }
.osg-screen-content { position:relative; max-height:520px; padding:18px; overflow:auto; overscroll-behavior:contain; }
.osg-scene { position:relative; min-height:330px; padding:21px; border:1px solid #dde6da; border-radius:14px; background:#fff; }
.osg-scene h4 { margin:9px 0; font-size:19px; line-height:1.3; letter-spacing:-.025em; overflow-wrap:anywhere; }
.osg-scene p { margin:11px 0; color:#506555; font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.osg-small { color:#607464; font-size:11px !important; line-height:1.55; }
.osg-card-top { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:9px; }
.osg-card-top > strong { font-size:13px; }
.osg-tag { display:inline-block; padding:5px 9px; border-radius:999px; background:#e4f3e5; color:#326145; font-size:10px; font-weight:800; line-height:1.4; }
.osg-tag--pending { background:#fff0cb; color:#775b21; }
.osg-tag--returned { background:#fff0da; color:#835324; }
.osg-task-facts { display:flex; gap:15px; margin:18px 0 22px; padding:12px 0; border-top:1px solid #e3eadf; border-bottom:1px solid #e3eadf; }
.osg-task-facts span { flex:1; color:#5b6c5d; font-size:11px; }
.osg-task-facts strong { display:block; margin-bottom:3px; color:#355e40; font-size:15px; }
.osg-demo-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; padding:11px 16px; border:1px solid #356c43; border-radius:10px; background:#356c43; color:#fff; font:inherit; font-weight:750; font-size:13px; line-height:1.4; text-align:center; cursor:pointer; overflow-wrap:anywhere; }
.osg-demo-button--secondary { background:#f0f7ec; color:#356342; border-color:#cadfc8; }
.osg-scene > .osg-primary { margin-top:16px; }
.osg-deadline { margin:20px 0; padding:15px; border-radius:12px; background:#e8f5e3; color:#365e3c; }
.osg-deadline span { display:block; font-size:11px; }
.osg-deadline strong { display:block; margin-top:6px; font-size:27px; line-height:1.1; font-variant-numeric:tabular-nums; }
.osg-fields { display:grid; gap:13px; margin-top:16px; }
.osg-fields label { display:grid; gap:6px; min-width:0; color:#4b6352; font-size:11px; font-weight:750; }
.osg-fields input,.osg-fields textarea { width:100%; min-width:0; padding:11px; border:1px solid #d2dfcd; border-radius:8px; background:#fff; color:#243d2b; font:inherit; font-weight:400; font-size:14px; line-height:1.5; }
.osg-fields textarea { min-height:90px; resize:vertical; }
.osg-fields input[readonly],.osg-fields textarea[readonly] { background:#f8fbf5; }
.osg-fields-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.osg-file-row { display:flex; flex-wrap:wrap; gap:11px; align-items:center; }
.osg-file-name { color:#3a6b45; font-size:11px; overflow-wrap:anywhere; }
.osg-validation:empty { display:none; }
.osg-validation { margin:0 !important; color:#8a4328 !important; font-size:12px !important; }
.osg-file-preview { display:flex; align-items:center; gap:14px; padding:16px 13px; margin:18px 0; border:1px solid #d9e5d3; border-radius:12px; background:#f1f7ed; font-size:12px; color:#3d5945; overflow-wrap:anywhere; }
.osg-file-preview > span:first-child { color:#639768; font-size:35px; }
.osg-file-preview small { color:#5d7160; line-height:1.8; }
.osg-feedback { margin:18px 0; padding:16px; border-left:3px solid #cda25e; border-radius:0 12px 12px 0; background:#fff5df; font-size:13px; }
.osg-feedback p { color:#77562a; }
.osg-history { margin-top:12px; padding:12px 13px; border-radius:10px; background:#f0f6eb; color:#35533c; font-size:11px; }
.osg-history p { margin:6px 0 0; font-size:12px; }
.osg-success-mark { display:grid; place-items:center; width:48px; height:48px; margin:18px 0 12px; border-radius:50%; background:#e3f3df; color:#3d7745; font-size:26px; }
.osg-score { margin:14px 0 20px !important; color:#356541 !important; font-size:42px !important; font-weight:800; line-height:1 !important; }
.osg-score span { font-size:12px; font-weight:650; }
.osg-source-row { display:grid; gap:6px; padding:15px; border-radius:10px; background:#edf4e6; font-size:12px; }
.osg-source-row span { color:#5a715c; }
.osg-text-guide { padding:0 32px 24px; }
.osg-text-guide details { padding:14px 0; border-top:1px solid #dee8d8; }
.osg-text-guide summary { color:#3e5e45; font-size:13px; font-weight:750; line-height:1.5; cursor:pointer; }
.osg-text-guide ol { display:grid; gap:12px; padding-left:21px; margin:18px 0 0; color:#4d6553; font-size:13px; line-height:1.7; }
.osg-text-guide dl { margin:18px 0 0; font-size:13px; line-height:1.7; }
.osg-text-guide dt { margin-top:16px; font-weight:750; }
.osg-text-guide dd { margin:4px 0 0; color:#526a58; }
.osg-footer { position:sticky; bottom:0; z-index:5; padding:18px 32px 22px; border-top:1px solid #d8e5d3; background:#fbfdf9; }
.osg-step-toolbar { display:flex; align-items:center; gap:22px; margin-bottom:12px; }
.osg-step-select-label { display:flex; align-items:center; gap:9px; flex:0 1 290px; min-width:0; color:#526a58; font-size:11px; font-weight:750; }
.osg-step-select-label select { width:100%; min-width:0; min-height:36px; padding:6px 26px 6px 9px; border:1px solid #d2dfcb; border-radius:8px; background:#fff; color:#34553e; font:inherit; font-weight:650; font-size:12px; line-height:1.3; }
.osg-progress { display:flex; justify-content:flex-end; flex:1; min-width:0; gap:8px; }
.osg-progress button { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; padding:0; border:1px solid #dbe5d5; border-radius:50%; background:transparent; color:#6a7b6b; font:750 12px/1 var(--font-body, sans-serif); cursor:pointer; }
.osg-progress button.is-complete { background:#e3efdc; color:#3f6845; border-color:#d1e2c8; }
.osg-progress button[aria-current=step] { background:#284d36; color:#fff; border-color:#284d36; box-shadow:0 0 0 3px #e3eddc; }
.osg-screen-caption { color:#355d41; font-size:11px; }
.osg-screen-bar #osgRoleLabel { margin-left:auto; color:#69806b; font-weight:500; }
.osg-example-label { font-size:9px; letter-spacing:.02em; }
.osg-controls { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.osg-navigation { display:flex; align-items:center; gap:10px; margin-left:auto; }
.osg-controls button { min-height:46px; padding:12px 18px; border:1px solid #d0decb; border-radius:12px; background:#fff; color:#33563c; font:inherit; font-weight:750; font-size:13px; line-height:1.3; cursor:pointer; transition:background-color 160ms ease, border-color 160ms ease; }
.osg-controls #osgNext { background:#284d36; border-color:#284d36; color:#fff; }
.osg-controls #osgNext:hover { background:#1b3927; }
.osg-controls button:disabled { opacity:.4; cursor:default; }
.osg-navigation-hint { flex:1 1 220px; max-width:380px; margin:0; color:#66796b; font-size:12px; line-height:1.6; }

@media (prefers-reduced-motion:no-preference) {
  .osg-dialog[open]:not(.osg-instant) { animation:osg-dialog-enter 180ms cubic-bezier(.2,.75,.25,1); }
  @keyframes osg-dialog-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
}
@media (max-width:760px) {
  .online-stage-topbar { flex-wrap:wrap; }
  .stage-topbar-actions { gap:12px; }
  .osg-dialog { width:calc(100% - 16px); max-height:calc(100dvh - 16px); border-radius:18px; }
  .osg-frame { max-height:calc(100dvh - 18px); }
  .osg-header { gap:12px; padding:17px 16px 14px; }
  .osg-intro { padding:15px 16px 0; }
  .osg-body { grid-template-columns:1fr; grid-template-areas:'notes' 'screen'; gap:16px; padding:18px 16px; }
  .osg-notes { padding:0; }
  .osg-step-number { margin-bottom:8px; }
  .osg-notes h3 { font-size:24px; }
  .osg-notes > p { margin-top:11px; font-size:14px; line-height:1.65; }
  .osg-tip { margin-top:13px; padding:12px; }
  .osg-screen-content { padding:12px; max-height:none; }
  .osg-scene { min-height:300px; padding:16px; }
  .osg-fields input,.osg-fields textarea { font-size:16px; }
  .osg-text-guide { padding:0 16px 18px; }
  .osg-footer { padding:13px 16px max(13px,env(safe-area-inset-bottom)); }
  .osg-step-toolbar { gap:12px; }
  .osg-step-select-label { flex-basis:260px; }
  .osg-screen-bar { flex-wrap:wrap; }
  .osg-progress { gap:5px; }
  .osg-progress button { flex-basis:28px; width:28px; height:28px; }
  .osg-step-select-label > select { font-size:16px; }
}
@media (max-width:440px) {
  .stage-topbar-actions { width:100%; justify-content:space-between; }
  .stage-help-button { padding-inline:11px; font-size:12px; }
  .osg-progress { display:none; }
  .osg-navigation-hint { display:none; }
  .osg-step-select-label { flex:1; }
  .osg-navigation { width:100%; justify-content:space-between; }
  .osg-navigation button { flex:1; }
}
