/* State MVR, standard API tabs and WebMVR. CH and MC own their workspace styles.
   This sheet loads globally; every rule is confined to an owned page or log. */
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.api-directory,.atlas-api-history,.atlas-api-pdfs) {
  min-width: 0;
  --api-surface: var(--ui-surface);
  --api-soft: var(--ui-surface-soft);
  --api-border: var(--aw-line);
}
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.api-directory,.atlas-api-history,.atlas-api-pdfs) :is(h2,h3) {
  font-family: 'Plus Jakarta Sans',sans-serif;
  letter-spacing: -.035em;
  line-height: 1.5;
}
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.api-directory,.atlas-api-history,.atlas-api-pdfs) .api-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-sizing: border-box; padding: 8px; border: 0; border-radius: 0;
  background: var(--aw-soft) !important; color: var(--ui-accent) !important;
  box-shadow: inset 0 0 0 1px var(--aw-line);
  font: 500 11px/1.5 'JetBrains Mono',monospace !important; letter-spacing: .025em !important;
}
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-badge-lg {
  min-width: 58px !important; height: 58px !important; padding: 8px !important; font-size: 15px !important;
  border: 5px solid var(--aw-frame); background: var(--ui-surface) !important;
  box-shadow: 0 0 0 1px var(--aw-line);
}
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-workspace-heading { gap: 20px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-workspace-meta { gap: 12px; margin-top: 12px; font-size: 10.5px; color: var(--ui-muted); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-workspace-meta > span:first-child { font: 9px/1.8 'JetBrains Mono',monospace; letter-spacing: .09em; text-transform: uppercase; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-workspace-about { margin-top: 14px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.api-workspace-about summary,.api-website-link) { font-size: 11px; line-height: 1.8; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-website-link { color: var(--ui-accent); max-width: 100%; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) > :is(.card,.lab-grid,.lab-status-wrap,.webmvr-workspace,.api-pending-panel) { margin-top: 24px !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-subtab.active { box-shadow: inset 0 -2px var(--aw-action); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-subtab-count { background: var(--aw-soft); color: var(--ui-muted); font: 9px/1.7 'JetBrains Mono',monospace; padding: 2px 6px; }

/* Shared controls supply the core finish. These variants replace legacy gradients
   and cover API-specific inputs without touching native hidden fields/switches. */
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .btn-success,
#atlas-app.app-shell .main :is(.api-directory .api-dir-filter-actions > button.btn-info,.api-directory .api-dir-col-action > a.btn-info,.api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-foot > button.btn-info,.webmvr-workspace form > button.btn-info[type=submit]):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-danger-soft) {
  background: var(--aw-action) !important; color: #fff !important; border: 0 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.13) !important;
}
#atlas-app.app-shell .main .api-directory .btn-info:not(.is-disabled):not(:where(.api-dir-col-action > a,.api-dir-filter-actions > button)) { background: var(--aw-soft) !important; color: var(--ui-accent) !important; box-shadow: inset 0 0 0 1px var(--aw-line) !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.lab-field,.creds-field) > :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]) { width: 100%; max-width: 100%; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 22px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-field:has(input[type=file],textarea) { grid-column: 1 / -1; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .creds-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-password-toggle { right: 6px; min-height: 32px; transform: translateY(-50%); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .btn-save { height: auto; min-height: 44px; padding: 11px 17px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history,.atlas-api-pdfs) :is(.dt-input,.dt-search input[type=search],.api-mode-msg) {
  min-width: 0; max-width: 100%; min-height: 44px; height: auto; box-sizing: border-box;
  padding: 11px 13px; border: 0; border-radius: 0;
  background: var(--ui-surface-soft); color: var(--ui-ink);
  box-shadow: inset 0 0 0 1px rgba(var(--ui-accent-rgb),.12);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  font: 12px/1.6 'DM Sans',sans-serif;
  transition: box-shadow .2s var(--aw-spring);
}
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history,.atlas-api-pdfs) :is(.dt-input,.dt-search input[type=search],.api-mode-msg):focus { outline: none; box-shadow: inset 0 0 0 1px rgba(var(--ui-accent-rgb),.6),0 0 0 3px rgba(var(--ui-accent-rgb),.085); }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.api-directory,.atlas-api-history,.atlas-api-pdfs) select.dt-select { height: auto; max-width: 100%; padding-right: 30px; appearance: auto; -webkit-appearance: auto; backdrop-filter: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-search { min-width: 0; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-search input[type=search] { padding-left: 34px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-search > span { left: 13px; color: var(--ui-muted); }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history,.atlas-api-pdfs) input[type=checkbox] { accent-color: var(--aw-action); }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history,.atlas-api-pdfs) .data-table input[type=checkbox] { width: 17px; height: 17px; margin: 3px 0; cursor: pointer; }

/* Presets and request/response: readable data, clearly separated from the form. */
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .test-presets { border-left: 5px solid var(--aw-frame) !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .test-presets-head { gap: 18px 24px; margin-bottom: 20px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .test-presets-head h2 { flex-wrap: wrap; font-size: 17px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .test-presets-dot { width: 7px; height: 7px; background: var(--aw-positive); box-shadow: 0 0 0 4px var(--aw-positive-wash); animation: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.test-presets-body,.payload-pre) {
  min-width: 0; max-width: 100%; box-sizing: border-box; margin: 0; padding: 18px 20px;
  border: 0; background: var(--ui-surface-soft); color: var(--ui-ink);
  box-shadow: inset 0 0 0 1px var(--aw-line); font: 10.5px/1.9 'JetBrains Mono',monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin;
}
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .payload-pre { margin-top: 12px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-request-notice { box-shadow: 0 0 0 1px var(--aw-line),inset 3px 0 var(--aw-warning) !important; font-size: 12px; line-height: 1.85; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-request-notice .row-actions { flex-wrap: wrap; gap: 16px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-request-notice .row-actions > div { flex: 1 1 250px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .warn-row { flex-wrap: wrap; padding: 16px; margin-bottom: 22px; border: 0; background: var(--aw-warning-wash); color: var(--aw-warning); font-size: 11px; line-height: 1.8; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) [data-api-request-form] > .sub { margin-bottom: 24px !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .status-row { flex-wrap: wrap; gap: 10px 15px; margin: 20px 0; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.result-success,.result-error,.result-maintenance) { padding: 18px; border: 0; font-size: 12px; line-height: 1.85; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .result-success { flex-wrap: wrap; gap: 20px; background: var(--aw-positive-wash); box-shadow: inset 2px 0 var(--aw-positive); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .result-error { background: var(--aw-negative-wash); box-shadow: inset 2px 0 var(--aw-negative); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .result-maintenance { background: var(--aw-warning-wash); box-shadow: inset 2px 0 var(--aw-warning); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .result-meta { flex-wrap: wrap; gap: 18px 24px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .error-pre { color: var(--aw-negative); font: 11px/1.85 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-pdfs) .lab-empty { background: var(--ui-surface-soft); border: 0; box-shadow: inset 0 0 0 1px var(--aw-line); }

/* Directory keeps its sort links and every column visible in a local scroll region.
   It opts into shared table surfaces explicitly because its adapter is custom. */
#atlas-app.app-shell .main .api-directory .api-dir-toolbar { align-items: flex-start; margin-bottom: 24px; }
#atlas-app.app-shell .main .api-directory .api-dir-filter-grid { gap: 22px; padding: 23px 0 26px; border-color: var(--aw-line); }
#atlas-app.app-shell .main .api-directory .api-dir-filter-actions { gap: 10px; }
#atlas-app.app-shell .main .api-directory .api-dir-table-wrap { position: relative; }
#atlas-app.app-shell .main .api-directory .api-dir-table { display: table; min-width: 880px; width: 100%; table-layout: auto; }
#atlas-app.app-shell .main .api-directory .api-dir-table thead { position: static; display: table-header-group; width: auto; height: auto; overflow: visible; clip-path: none; }
#atlas-app.app-shell .main .api-directory .api-dir-table tbody { display: table-row-group; }
#atlas-app.app-shell .main .api-directory .api-dir-table .api-dir-row { display: table-row; border: 0; padding: 0; }
#atlas-app.app-shell .main .api-directory .api-dir-table :is(th,td) { display: table-cell; text-align: left; }
#atlas-app.app-shell .main .api-directory .api-dir-table td[data-label]::before { content: none; display: none; }
#atlas-app.app-shell .main .api-directory .api-dir-table .api-dir-col-name { min-width: 230px; }
#atlas-app.app-shell .main .api-directory .api-dir-table .api-dir-col-action { min-width: 150px; }
#atlas-app.app-shell .main .api-directory .api-dir-name-cell { align-items: flex-start; gap: 14px; }
#atlas-app.app-shell .main .api-directory .api-badge-sm { min-width: 40px !important; height: 36px !important; }
#atlas-app.app-shell .main .api-directory .api-dir-name { color: var(--ui-ink); font-size: 12px; font-weight: 500; line-height: 1.75; }
#atlas-app.app-shell .main .api-directory .api-dir-name-cell .muted { margin-top: 4px; font: 9px/1.9 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .api-directory .api-dir-row:hover { background: var(--ui-surface-soft); }
#atlas-app.app-shell .main .api-directory .api-dir-row.is-maint { background: var(--aw-warning-wash); }
#atlas-app.app-shell .main .api-directory .api-dir-col-action > a { min-height: 38px; white-space: nowrap; width: auto; }
#atlas-app.app-shell .main .api-directory .api-dir-col-action > a > span { display: grid; place-items: center; width: 21px; height: 21px; background: rgba(255,255,255,.12); border-radius: 50% !important; font-size: 13px; }

/* Audit history and saved documents. Simple reference tables use shared mobile
   cards; interactive sort/select-all headers keep the shared scroll layout. */
#atlas-app.app-shell .main .atlas-api-history .atlas-api-history-heading { flex-wrap: wrap; padding-bottom: 22px; box-shadow: 0 1px var(--aw-line); }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) :is(.hist-toolbar,.dt-toolbar) { margin: 22px 0; gap: 14px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .dt-actions { gap: 12px; padding: 14px 0; margin-bottom: 14px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .dt-count { padding: 6px 9px; border: 0; background: var(--aw-soft); color: var(--ui-muted); font: 10px/1.7 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-banner { padding: 16px; border: 0; background: var(--aw-soft); color: var(--ui-ink); line-height: 1.8; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-banner[hidden] { display: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-banner-link { color: var(--ui-accent); font-weight: 500; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .caller-cell { min-width: 170px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .data-table:has(.bulk-check,.history-bulk-check) { min-width: 1180px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .data-table:has(.bulk-check,.history-bulk-check) :is(td.font-mono,.chip) { white-space: nowrap; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .data-table:has(.bulk-check,.history-bulk-check) td:last-child { min-width: 170px; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) :is(.caller-who,.caller-net,.caller-country) { white-space: normal; overflow-wrap: anywhere; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .caller-net { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 9px; line-height: 1.8; }
#atlas-app.app-shell .main :is(.api-workspace:not(:where(#clearinghouse,#mc-registrations)),.atlas-api-history) .data-table td:last-child > span { flex-wrap: wrap; }
#atlas-app.app-shell .main :is(.api-directory,.atlas-api-history) .pager-num { min-width: 36px; min-height: 36px; box-sizing: border-box; border: 0; padding: 8px; color: var(--ui-accent); background: var(--aw-soft); font: 11px/1.6 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main :is(.api-directory,.atlas-api-history) .pager-num:is(:hover,.is-current) { background: var(--aw-action) !important; color: #fff !important; box-shadow: none !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .dt-pager { flex-wrap: wrap; gap: 14px; margin-top: 24px; padding-top: 22px; box-shadow: 0 -1px var(--aw-line); }
#atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar { gap: 14px; margin-bottom: 24px; }
#atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar > select:first-child { flex: 1 1 240px; min-width: 0; max-width: 330px; }
#atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar .dt-input { flex: 1 1 200px; max-width: 270px; }
#atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar .dt-select[name=ssize] { min-width: 75px; }
#atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-count { color: var(--ui-muted); font: 10px/1.8 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .atlas-api-pdfs .row-actions { flex-wrap: wrap; row-gap: 12px !important; }

/* Operational settings retain the existing radio inputs and HTMX form roots. */
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-head { align-items: flex-start; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; padding-bottom: 22px; border: 0; box-shadow: 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-title { gap: 8px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-eyebrow { color: var(--ui-muted); font: 9px/1.7 'JetBrains Mono',monospace; letter-spacing: .12em; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-name { white-space: normal; color: var(--ui-ink); font: 500 17px/1.5 'Plus Jakarta Sans',sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-tag { padding: 6px 9px; border: 0 !important; font: 500 10px/1.6 'DM Sans',sans-serif; letter-spacing: 0; white-space: normal; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-tag.is-prod { background: var(--aw-positive-wash) !important; color: var(--aw-positive) !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-tag.is-maint { background: var(--aw-warning-wash) !important; color: var(--aw-warning) !important; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-tag-dot { flex: 0 0 5px; width: 5px; height: 5px; background: currentColor; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-row { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 24px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-row > .api-mode-seg:only-child { grid-column: 1 / -1; justify-self: start; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 0; background: var(--ui-surface-soft); box-shadow: inset 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-opt { min-width: 0; min-height: 44px; box-sizing: border-box; padding: 12px 16px; color: var(--ui-muted); font: 500 11px/1.7 'DM Sans',sans-serif; transition: background .2s var(--aw-spring),color .2s var(--aw-spring); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-opt.sel { background: var(--ui-surface); color: var(--ui-ink); box-shadow: 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-opt:focus-within { outline: 2px solid var(--ui-accent); outline-offset: 1px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-dot { width: 6px; height: 6px; box-shadow: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-dot.good { background: var(--aw-positive); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-dot.warn { background: var(--aw-warning); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-msg-label { color: var(--ui-ink); font: 500 12px/1.6 'DM Sans',sans-serif; letter-spacing: -.01em; text-transform: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-msg { min-height: 108px; margin-top: 4px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-foot { flex-wrap: wrap; gap: 20px; margin-top: 26px; padding-top: 22px; border: 0; box-shadow: 0 -1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-hint { flex: 1 1 260px; color: var(--ui-muted); font-size: 11px; line-height: 1.85; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-explainer { margin-top: 24px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-modes { gap: 22px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-mode { border: 0; background: var(--ui-surface-soft); padding: 22px; box-shadow: inset 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-list { color: var(--ui-muted); font-size: 11.5px; line-height: 1.9; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-list li + li { margin-top: 10px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.lab-status-list,.api-mode-panel-hint) code { border: 0; padding: 2px 5px; background: var(--aw-soft); color: var(--ui-ink); font: 10px/1.8 'JetBrains Mono',monospace; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-maint-strip { flex-wrap: wrap; gap: 12px 16px; margin: 0 0 22px; padding: 18px 20px; border: 0; background: var(--aw-warning-wash); color: var(--aw-warning); box-shadow: inset 2px 0 var(--aw-warning); transform: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-maint-strip-dot { background: var(--aw-warning); box-shadow: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-maint-strip-msg { flex: 1 1 260px; white-space: normal; line-height: 1.8; color: var(--ui-muted); overflow-wrap: anywhere; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-maint-strip-cta { color: var(--aw-warning); font-weight: 500; }

/* Reference tabs and setup placeholders. */
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-tabs { gap: 5px; margin: 0 0 18px; padding: 5px; background: var(--ui-surface-soft); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-tab { min-height: 40px; padding: 10px 15px; color: var(--ui-muted); border: 0; font: 11px/1.6 'DM Sans',sans-serif; transition: background .2s var(--aw-spring),color .2s var(--aw-spring); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-tab.active { color: var(--ui-accent); background: var(--ui-surface); box-shadow: 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-shell { border: 4px solid #202c3e; box-shadow: 0 0 0 1px rgba(120,145,180,.14); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-shell-head { padding: 12px 16px; background: #202c3e; border-color: #303c50; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-shell-title { color: #bac9de; font-size: 10px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-pane { padding: 20px; font: 10.5px/1.9 'JetBrains Mono',monospace; scrollbar-width: thin; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.err-name,.err-code) { font: 10.5px/1.85 'JetBrains Mono',monospace; white-space: normal; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .err-name { color: var(--ui-ink); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.err-code,.err-msg,.err-plat) { color: var(--ui-muted); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .err-http { display: inline-block; padding: 5px 8px; border: 0; border-radius: 0; font: 10px/1.6 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .err-http.c4 { color: var(--aw-warning); background: var(--aw-warning-wash); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .err-http.c5 { color: var(--aw-negative); background: var(--aw-negative-wash); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.enh-list,.wf-list) { gap: 22px; margin-top: 24px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .enh-item { padding: 20px; border: 0; background: var(--ui-surface-soft); box-shadow: inset 0 0 0 1px var(--aw-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.enh-title,.wf-title) { color: var(--ui-ink); font-size: 12px; font-weight: 500; line-height: 1.75; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.enh-detail,.wf-detail,.wf-overview) { color: var(--ui-muted); font-size: 11.5px; line-height: 1.85; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.enh-tag,.wf-num) { background: var(--aw-soft); color: var(--ui-accent); border: 0; box-shadow: none; font: 9px/1.8 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .wf-item { padding-bottom: 0; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .wf-item::before { background: var(--aw-line); bottom: -22px; width: 1px; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-setup-checklist { margin: 26px 0; gap: 16px; border: 0; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-setup-checklist > div { padding: 20px; border: 0; background: var(--ui-surface-soft); box-shadow: inset 0 0 0 1px var(--aw-line); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-eyebrow { font: 9px/1.8 'JetBrains Mono',monospace; color: var(--ui-muted); letter-spacing: .12em; }

/* WebMVR collection, health summary and source-specific settings. */
#atlas-app.app-shell .main .webmvr-workspace > :is(.card,.webmvr-live),
#atlas-app.app-shell .main .webmvr-workspace .lab-grid { margin-bottom: 24px; }
#atlas-app.app-shell .main .webmvr-workspace :is(p,.webmvr-docs li) { color: var(--ui-muted); font-size: 11.5px; line-height: 1.85; }
#atlas-app.app-shell .main .webmvr-workspace :is(p,.webmvr-docs li) code { color: var(--ui-ink); font: 10.5px/1.9 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-setup { gap: 24px; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-setup > div:first-child { flex: 1 1 320px; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-setup > .row-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-setup form { margin: 0; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention { box-shadow: 0 0 0 1px var(--aw-line),inset 0 2px var(--webmvr-tone) !important; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-icon { border: 0; width: 42px; height: 42px; background: var(--ui-surface-soft); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-counts { gap: 18px; margin: 24px 0; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count { padding: 20px; border: 0; background: var(--ui-surface-soft); box-shadow: inset 0 0 0 1px var(--aw-line),inset 2px 0 var(--webmvr-tone); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count strong { margin-top: 16px; font-size: 30px; letter-spacing: -.045em; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-state { padding: 16px; border: 0; box-shadow: inset 0 0 0 1px var(--aw-line),inset 2px 0 var(--webmvr-tone); }
#atlas-app.app-shell .main .webmvr-workspace :is(.webmvr-attention-status,.webmvr-badge) { padding: 6px 9px; border: 0; background: var(--ui-surface-soft); color: var(--webmvr-tone); font: 500 10px/1.7 'DM Sans',sans-serif; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-footer { margin-top: 22px; padding-top: 18px; border-color: var(--aw-line); line-height: 1.85; }
#atlas-app.app-shell .main .webmvr-workspace :is(.webmvr-stale,.webmvr-attention-stale) { padding: 16px 18px; border: 0; background: var(--aw-warning-wash); color: var(--ui-muted); box-shadow: inset 2px 0 var(--aw-warning); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-tone-green { --webmvr-tone: var(--aw-positive); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-tone-red { --webmvr-tone: var(--aw-negative); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-tone-yellow { --webmvr-tone: var(--aw-warning); }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-tone-blue { --webmvr-tone: var(--ui-accent); }
html.dark #atlas-app.app-shell .main .webmvr-workspace .webmvr-tone-orange { --webmvr-tone: #efac7f; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-empty { padding: 26px 20px; background: var(--ui-surface-soft); font-size: 12px; line-height: 1.85; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-code { padding: 20px; border: 0; box-shadow: inset 0 0 0 1px var(--aw-line); background: var(--ui-surface-soft); color: var(--ui-ink); font: 10.5px/1.9 'JetBrains Mono',monospace; scrollbar-width: thin; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-definition { gap: 16px 24px; padding: 22px; background: var(--ui-surface-soft); font-size: 11.5px; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-definition dt { color: var(--ui-muted); font: 10px/1.85 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-definition dd { color: var(--ui-ink); overflow-wrap: anywhere; }
#atlas-app.app-shell .main .webmvr-settings { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,30%); gap: 24px; align-items: start; }
#atlas-app.app-shell .main .webmvr-settings > .card { margin: 0; }
#atlas-app.app-shell .main .webmvr-settings .lab-fields { margin-top: 25px; }
#atlas-app.app-shell .main .webmvr-settings .lab-field > p { margin: 9px 0 0; font-size: 10.5px; }
#atlas-app.app-shell .main .webmvr-settings [data-webmvr-reveal-message] { display: block; margin-top: 8px; font-size: 10.5px; line-height: 1.8; }
#atlas-app.app-shell .main .webmvr-settings [data-webmvr-reveal-message]:empty { display: none; }
#atlas-app.app-shell .main .webmvr-settings .webmvr-password-control { gap: 9px; }
#atlas-app.app-shell .main .webmvr-settings [data-webmvr-reveal].btn-info:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-danger-soft) { min-height: 38px; min-width: 60px; color: var(--aw-positive) !important; background: var(--aw-positive-wash) !important; box-shadow: none !important; }
#atlas-app.app-shell .main .webmvr-settings [data-webmvr-reveal].btn-info[aria-pressed=true]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-danger-soft) { color: var(--aw-negative) !important; background: var(--aw-negative-wash) !important; }
#atlas-app.app-shell .main .webmvr-workspace .webmvr-checkbox { min-height: 44px; gap: 12px; color: var(--ui-ink); font: 12px/1.8 'DM Sans',sans-serif; }

/* Terminal palette is intentionally retained. Only frame, spacing and readable
   metadata are adapted; stdout/stderr colors and live targets remain intact. */
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-term,
#atlas-app.app-shell .main .webmvr-workspace .webmvr-terminal { border: 4px solid #202c3e; border-radius: 0; box-shadow: 0 0 0 1px rgba(120,145,180,.14); }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-term-head { padding: 12px 15px; background: #202c3e; border-color: #303c50; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-term-title { color: #bac9de; font: 10px/1.7 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-term-body { padding: 17px; font: 10.5px/1.85 'JetBrains Mono',monospace; scrollbar-width: thin; }
#atlas-app.app-shell .main .webmvr-workspace :is(.webmvr-terminal-head,.webmvr-terminal-foot) { padding: 13px 17px; }
#atlas-app.app-shell .main .atlas-api-log {
  padding: 24px;
  --aw-positive: #76dfb9; --aw-positive-wash: rgba(73,193,150,.11);
  --aw-negative: #ffa0b0; --aw-negative-wash: rgba(244,116,139,.11);
  --aw-warning: #efc36f; --aw-warning-wash: rgba(223,171,65,.11);
}
#atlas-app.app-shell .main .atlas-api-log .modal-terminal { min-width: 0; width: min(1040px,100%); max-height: 90dvh; border: 5px solid #202c3e; box-shadow: 0 0 0 1px rgba(120,145,180,.18) !important; }
#atlas-app.app-shell .main .atlas-api-log .term-titlebar { flex-shrink: 0; padding: 15px 19px; background: #202c3e; }
#atlas-app.app-shell .main .atlas-api-log .term-title { flex-wrap: wrap; gap: 10px; }
#atlas-app.app-shell .main .atlas-api-log .term-close { min-width: 36px; min-height: 36px; }
#atlas-app.app-shell .main .atlas-api-log .term-meta { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 19px 24px; padding: 20px; flex-shrink: 0; }
#atlas-app.app-shell .main .atlas-api-log .term-meta > div { min-width: 0; overflow-wrap: anywhere; }
#atlas-app.app-shell .main .atlas-api-log .term-meta .muted { color: #9aaabd; font: 9px/1.8 'JetBrains Mono',monospace; letter-spacing: .05em; }
#atlas-app.app-shell .main .atlas-api-log .term-meta .font-mono { font-size: 10.5px; line-height: 1.85; }
#atlas-app.app-shell .main .atlas-api-log .term-body { min-height: 120px; padding: 20px; font: 11px/1.85 'JetBrains Mono',monospace; }
#atlas-app.app-shell .main .atlas-api-log .term-pre { padding: 17px; font: 10.5px/1.85 'JetBrains Mono',monospace; scrollbar-width: thin; }
#atlas-app.app-shell .main .atlas-api-log .term-foot { flex-wrap: wrap; padding: 17px 20px; }
#atlas-app.app-shell .main .atlas-api-log :is(.btn-info,.btn-ghost):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-danger-soft) { color: #c9dbff !important; background: rgba(160,188,255,.1) !important; box-shadow: inset 0 0 0 1px rgba(160,188,255,.13) !important; }
#atlas-app.app-shell .main .atlas-api-log .api-badge { padding: 5px 8px; background: rgba(160,188,255,.1) !important; color: #c9dbff !important; font: 10px/1.7 'JetBrains Mono',monospace; }

@media (max-width: 1100px) {
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .creds-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #atlas-app.app-shell .main .webmvr-settings { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 820px) {
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-row { grid-template-columns: minmax(0,1fr); }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-modes { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .atlas-record-table[data-atlas-layout=cards] td.err-msg { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-workspace-heading { gap: 14px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-badge-lg { min-width: 44px !important; height: 44px !important; font-size: 11px !important; border-width: 4px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-fields { grid-template-columns: minmax(0,1fr); }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .creds-fields { grid-template-columns: minmax(0,1fr); }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .test-presets-head > .row-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.test-presets-body,.payload-pre) { padding: 16px; font-size: 10px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg { width: 100%; box-sizing: border-box; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-seg-opt { flex: 1 1 170px; padding: 12px 14px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .api-mode-panel-foot > button { width: 100%; min-height: 44px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-status-mode { padding: 18px 16px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .lab-maint-strip { padding: 17px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-tab { padding-inline: 10px; }
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) .code-pane { padding: 16px; }
  #atlas-app.app-shell .main .api-directory .api-dir-filter-grid { gap: 20px; }
  #atlas-app.app-shell .main .api-directory .pager { gap: 9px; }
  #atlas-app.app-shell .main .atlas-api-history .hist-toolbar > select { flex: 1 1 150px; min-width: 0; }
  #atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar > select:first-child,
  #atlas-app.app-shell .main .atlas-api-pdfs .pdfs-filter-bar .dt-input { max-width: none; width: 100%; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-counts { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count > span { min-height: 0; font-size: 11px; align-items: center; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count strong { margin: 0; font-size: 26px; text-align: right; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-attention-count small { font-size: 9px; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-setup > .row-actions { flex-basis: 100%; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-definition { padding: 18px; gap: 7px; }
  #atlas-app.app-shell .main .webmvr-workspace .webmvr-terminal-head { overflow-wrap: anywhere; }
  #atlas-app.app-shell .main .atlas-api-log { padding: 12px; }
  #atlas-app.app-shell .main .atlas-api-log .modal-terminal { max-height: calc(100dvh - 24px); overflow-y: auto; }
  #atlas-app.app-shell .main .atlas-api-log .term-titlebar { gap: 9px; padding: 13px 12px; }
  #atlas-app.app-shell .main .atlas-api-log .term-traffic { gap: 4px; }
  #atlas-app.app-shell .main .atlas-api-log .term-traffic .tl { width: 8px; height: 8px; }
  #atlas-app.app-shell .main .atlas-api-log .term-meta { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 14px; padding: 17px; }
  #atlas-app.app-shell .main .atlas-api-log .term-body { flex: 0 0 auto; overflow: visible; padding: 17px; }
  #atlas-app.app-shell .main .atlas-api-log .term-foot { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  #atlas-app.app-shell .main .api-workspace:not(:where(#clearinghouse,#mc-registrations)) :is(.code-tab,.api-mode-seg-opt,.api-mode-msg,.dt-search input[type=search]) { transition: none; }
  #atlas-app.app-shell .main .atlas-api-pdfs .dt-input { transition: none; }
}
