/* Workspace rhythm and content hierarchy. CAD colours remain owned by the viewer. */
body.shell-ready { background: #f4f6fa; font-size: 14px; line-height: 1.55; }
.shell-ready h1 { font-size: 24px; line-height: 1.35; letter-spacing: -.4px; }
.shell-ready h2 { font-size: 16px; line-height: 1.5; }
.shell-ready h3 { font-size: 14px; line-height: 1.5; }
.shell-ready .shell-sidebar { padding: 24px 12px 18px; }
.shell-ready .shell-brand { padding: 0 5px; }
.shell-ready .shell-brand strong { font-size: 15px; }
.shell-ready .shell-nav-label { margin: 32px 14px 10px; font-size: 10px; letter-spacing: .5px; }
.shell-ready .shell-nav { gap: 6px; }
.shell-ready .shell-nav a { min-height: 42px; font-size: 14px; border-radius: 7px; }
.shell-ready .shell-nav a[aria-current="page"] { box-shadow: inset 3px 0 #2458c6; }
.shell-ready .shell-sidebar-note { font-size: 10px; }
.shell-ready .topbar, .shell-ready .shell-page-header { height: 52px; min-height: 52px; padding: 8px 24px; flex-shrink: 0; }
.shell-ready .breadcrumb { font-size: 12px; }
.shell-ready .shell-context { min-height: 44px; padding: 0 24px; gap: 20px; flex-shrink: 0; }
.shell-ready .shell-context-label { margin-right: 0; font-size: 11px; }
.shell-ready .shell-context a { display: inline-flex; align-items: center; height: 44px; padding: 0 3px; border-radius: 0; border-bottom: 2px solid transparent; font-size: 13px; }
.shell-ready .shell-context a[aria-current="page"] { background: transparent; border-bottom-color: #2458c6; }
.shell-ready .shell-context a:hover { color: #2458c6; background: transparent; }
.shell-ready .workspace > main { width: 100%; padding: 22px 24px; max-width: 1600px; }
body.shell-ready main > .page { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.shell-ready .page-heading { margin-bottom: 18px; align-items: center; gap: 16px; }
.shell-ready .page-heading .eyebrow { display: none; }
.shell-ready .page-description { margin-top: 6px; font-size: 12px; line-height: 1.6; max-width: 760px; }
.shell-ready .panel { border: 1px solid #e1e6ee; border-radius: 10px; overflow: hidden; }
.shell-ready .panel-heading { padding: 15px 18px; border-bottom: 1px solid #edf0f5; }
.shell-ready .panel-heading h2 { font-size: 15px; font-weight: 600; }
.shell-ready button, .shell-ready .button { min-height: 34px; padding: 6px 12px; font-size: 13px; line-height: 1.45; box-shadow: none; }
.shell-ready .button-primary { font-weight: 500; }
.shell-ready .button-quiet { background: #fff; border-color: #e5e9f0; color: #677085; }
.shell-ready label, .shell-ready .field > span, .shell-ready .field > label { font-size: 12px; font-weight: 500; line-height: 1.5; }
.shell-ready input:not([type=checkbox]):not([type=radio]), .shell-ready select, .shell-ready textarea {
  min-height: 36px; padding: 7px 10px; border-color: #dfe4ec; border-radius: 6px; font-size: 13px; line-height: 1.5;
}
.shell-ready input::placeholder, .shell-ready textarea::placeholder { color: #98a1b0; }
.shell-ready input:not(:disabled):focus, .shell-ready select:not(:disabled):focus, .shell-ready textarea:not(:disabled):focus { border-color: #6488df; }
.shell-ready .field-help, .shell-ready .small, .shell-ready .subtle { font-size: 12px; line-height: 1.65; }
.shell-ready .notice { border-radius: 7px; font-size: 12px; line-height: 1.55; }

/* The header and context bar participate in the layout; no stale height offsets. */
.shell-ready:is(.task-workspace, .plan-workspace, .review-workspace, .pc-workspace) .app-shell > .workspace {
  height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
.shell-ready:is(.task-workspace, .plan-workspace, .review-workspace, .pc-workspace) .workspace > main {
  flex: 1; height: auto; min-height: 0; max-width: none; overflow: hidden;
}
.shell-ready.pc-workspace .workspace > main { padding: 12px; }
.shell-ready.pc-workspace #pc-workspace { min-height: 0; }
.shell-ready.pc-workspace .viewer-drawing, .shell-ready.pc-workspace .pc-side { border-radius: 8px; }
.shell-ready.pc-workspace .page-heading { margin-bottom: 8px; }
.shell-ready.pc-workspace .pc-tool-status { font-size: 12px; padding: 6px 10px; }
.shell-ready.pc-workspace .pc-tabs { padding: 4px; }
.shell-ready.pc-workspace .pc-tabs button { font-size: 12px; }
.shell-ready.pc-workspace .pc-stepper button { font-size: 11px; min-height: 0; padding: 6px 2px; }
.shell-ready.pc-workspace .pc-step-guide { font-size: 12px; }
.shell-ready .task-context { background: #eef3fc; border-left: 3px solid #6488df; border-radius: 5px; }

/* Task index and detail use separate surfaces, with one detail scroll area. */
.shell-ready.task-workspace .workspace > main { padding: 20px 22px 16px; }
.shell-ready.task-workspace #page-tasks > .page-heading { margin-bottom: 12px; }
.shell-ready.task-workspace #task-notice { background: transparent; border: 0; color: #6d7b90; padding: 0 1px; margin: 0 0 12px; max-height: 38px; font-size: 12px; }
.shell-ready .task-layout { grid-template-columns: 246px minmax(0, 1fr); gap: 16px; }
.shell-ready .task-index { background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.shell-ready .task-index .panel-heading { padding: 14px 14px 8px; border: 0; flex-shrink: 0; }
.shell-ready .task-index .panel-heading h2 { font-size: 14px; }
.shell-ready .task-index .panel-heading button { font-size: 11px; min-height: 26px; padding: 3px 8px; border: 0; background: transparent; }
.task-search-wrap { padding: 4px 12px 12px; flex-shrink: 0; }
.task-search-wrap input { width: 100%; background: #f7f8fb; }
.shell-ready #task-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px; gap: 4px; min-height: 0; }
.shell-ready #task-list-count { padding-left: 5px; font-size: 11px; font-weight: 400; }
.shell-ready #task-list .task-card { padding: 13px 12px; gap: 7px; border-radius: 7px; color: #465066; border-color: transparent; }
.shell-ready #task-list .task-card + .task-card { border-top-color: #f0f2f6; }
.shell-ready #task-list .task-card[aria-current=true] { color: #2458c6; background: #eef3ff; border-color: #dbe5fc; }
.shell-ready #task-list .task-card strong { font-size: 13px; font-weight: 550; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.shell-ready #task-list .task-card small { font-size: 11px; color: #7c879a; }
.task-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 500; color: #74839b; }
.task-status-pill { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #f1f3f7; color: #68768d; }
.task-card[aria-current=true] .task-status-pill { background: #dfe9ff; color: #4266ac; }
.shell-ready #task-scroll { padding: 0 0 1px; scroll-padding: 16px; overflow-anchor: none; scrollbar-gutter: auto; border: 1px solid #e1e6ee; border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
.shell-ready #task-detailbar { flex-shrink: 0; background: #fff; border: 1px solid #e1e6ee; border-bottom: 0; border-radius: 10px 10px 0 0; }
.shell-ready #task-detailbar[hidden] + #task-scroll { border-top: 1px solid #e1e6ee; border-radius: 10px; }
.shell-ready #task-editor { border: 0; border-radius: 0; }
.shell-ready #task-editor > .panel-heading { position: static; flex-wrap: nowrap; }
.shell-ready .task-detail-heading { padding: 18px 22px 14px; }
.task-detail-title { min-width: 0; flex: 1; }
.shell-ready .task-detail-title h2 { font-size: 17px; line-height: 1.55; font-weight: 600; }
.task-detail-code { color: #7c879a; font-size: 11px; margin: 0 0 4px; }
.shell-ready .task-detail-heading > .button { font-size: 12px; flex-shrink: 0; }
.task-detail-tabs { display: flex; align-items: center; gap: 22px; padding: 0 22px; border-bottom: 1px solid #edf0f5; }
.shell-ready .task-detail-tabs .button { padding: 12px 0 10px; min-height: 42px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 12px; color: #7c879a; }
.shell-ready .task-detail-tabs .button[aria-selected=true] { color: #2458c6; border-bottom-color: #2458c6; font-weight: 600; }
.shell-ready .task-form { padding: 18px 22px 22px; }
.shell-ready .task-fields { gap: 16px 20px; }
.shell-ready .task-fields .field { gap: 6px; }
.shell-ready .task-fields textarea { min-height: 86px; }
.task-source-details { padding: 9px 12px; margin: 0 0 18px; background: #f7f9fc; border: 1px solid #edf0f5; border-radius: 6px; font-size: 12px; color: #6d7b90; }
.task-source-details summary { font-weight: 400; cursor: pointer; }
.task-source-details p { margin-top: 8px; font-size: 11px; }
.task-section-intro { font-size: 12px; color: #7c879a; margin-bottom: 16px; }
.shell-ready .task-parameter { background: #fafbfe; border-color: #e7ebf3; border-radius: 8px; margin: 0 0 12px; padding: 16px; }
.shell-ready .task-parameter h3 { margin-bottom: 12px; font-size: 13px; }
.shell-ready .task-parameter .task-fields { grid-template-columns: minmax(100px, 1fr) 90px 110px minmax(150px, 1.7fr); gap: 10px; }
.shell-ready .task-parameter .confirm-label { grid-column: 1 / 4; font-size: 11px; }
.shell-ready .task-parameter .task-fields > button { justify-self: end; min-height: 26px; padding: 3px 7px; font-size: 11px; background: transparent; color: #7c879a; border-color: transparent; }
.shell-ready .task-parameter input[type=checkbox] { width: 14px; height: 14px; }
.task-add-parameter { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.task-add-parameter select { max-width: 310px; }
.shell-ready .task-change-reason { display: grid; gap: 6px; padding-top: 16px; margin-top: 20px; border-top: 1px solid #edf0f5; }
.shell-ready #task-checklist, .shell-ready #task-history { margin-top: 0; border: 0; border-radius: 0; }
.shell-ready .task-check-body, .shell-ready .task-history-body { padding: 20px 22px; }
.shell-ready .task-check-body h2, .shell-ready .task-history-body h2 { margin-bottom: 6px; }
.shell-ready .task-history-body .field { display: grid; gap: 6px; margin: 16px 0; }
.shell-ready .task-history-body ol { margin: 14px 0; padding: 12px 16px; border-left: 2px solid #dfe8fc; background: #f8faff; font-size: 12px; }
.shell-ready .task-check-body ul { display: grid; gap: 8px; margin: 16px 0; }
.shell-ready .task-check-body li { padding: 10px 12px; background: #f8faff; border-radius: 5px; font-size: 12px; margin: 0; }
.shell-ready #task-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; margin-top: 10px; box-shadow: 0 -2px 10px #24385804; border-color: #e1e6ee; border-radius: 8px; }
.shell-ready #task-actionbar #task-edit-state { margin: 0; font-size: 11px; }
.shell-ready #task-actionbar .task-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Catalogue, dashboard and specialist pages follow the same content rhythm. */
.shell-ready:not(.studio-page) > main { max-width: 1480px; padding: 26px 30px 40px; }
.shell-ready .home-intro { padding: 26px; border-radius: 10px; margin-bottom: 26px; }
.shell-ready .home-intro h1 { font-size: 26px; margin-bottom: 8px; }
.shell-ready .home-intro p { font-size: 13px; }
.shell-ready .summary-grid { gap: 14px; }
.shell-ready .summary-grid article { padding: 18px 20px; border-color: #e1e6ee; border-radius: 9px; }
.shell-ready .summary-grid article > span { font-size: 12px; color: #7c879a; }
.shell-ready .summary-grid strong { font-size: 30px; font-weight: 600; }
.shell-ready .workspace-grid { grid-template-columns: 276px minmax(0, 1fr); gap: 18px; }
.shell-ready .workspace-grid > aside > section { padding: 18px; border-color: #e1e6ee; }
.shell-ready .workspace-grid #detail { padding: 24px; border-color: #e1e6ee; }
.shell-ready #detail .long-form > .fields > p { grid-column: 1 / -1; margin-bottom: 0; font-size: 12px; color: #677085; }
.shell-ready #detail .long-form > .fields > label:has(input[name="name"]) { grid-column: 1 / -1; }
.shell-ready .workspace-grid .list-row { padding: 12px 0; }
.shell-ready .manage-grid { gap: 18px; }
.shell-ready .manage-card { padding: 24px; margin: 0; border-radius: 10px; border-color: #e1e6ee; }
.shell-ready .manage-card h2 { font-size: 16px; }
.shell-ready .manage-card p { margin-top: 10px; min-height: 44px; font-size: 12px; }
.shell-ready .manage-links { border-top: 1px solid #edf0f5; padding-top: 16px; font-size: 12px; }
.shell-ready .manage-intro { margin-bottom: 24px; }
.shell-ready .manage-intro > p:first-child { font-size: 11px; margin-bottom: 6px; }
.shell-ready .manage-intro h1 { margin-bottom: 8px; }
.shell-ready .manage-intro p { font-size: 13px; }
.shell-ready .home-secondary { margin-top: 16px; font-size: 12px; padding: 14px 18px; border-color: #e1e6ee; }
.shell-ready.studio-page > .workspace { height: calc(100dvh - 96px); }
.shell-ready.studio-page .tasks { padding: 16px 10px; }
.shell-ready.studio-page .tasks h2 { font-size: 14px; }
.shell-ready.studio-page .task-card { padding: 12px 10px; font-size: 12px; }
.shell-ready.studio-page main { padding: 18px; }
.shell-ready.studio-page .context h1 { font-size: 19px; }
.shell-ready.studio-page .assistant { padding: 20px 16px; }
.shell-ready.studio-page .steps button { font-size: 12px; }
@media (max-width: 1250px) {
  .shell-ready .task-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 12px; }
  .shell-ready .task-parameter .task-fields { grid-template-columns: 1fr 1fr; }
  .shell-ready .task-parameter .confirm-label { grid-column: 1 / -1; }
}

/* Long preparation and measurement forms keep their actions in the viewport. */
body.shell-ready:has(#page-preparation:not([hidden]), #page-parameters:not([hidden])) .app-shell > .workspace {
  height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
body.shell-ready:has(#page-preparation:not([hidden]), #page-parameters:not([hidden])) .workspace > main {
  height: auto; min-height: 0; flex: 1; overflow: hidden; padding: 20px 24px 16px; max-width: none;
}
body.shell-ready:has(#page-preparation:not([hidden]), #page-parameters:not([hidden])) .workspace-footer { display: none; }
.shell-ready #page-parameters:not([hidden]) { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.shell-ready #page-parameters > .page-heading, .shell-ready #page-parameters > .info-banner { flex-shrink: 0; }
.shell-ready #page-parameters > .info-banner { margin-bottom: 14px; }
.shell-ready #parameter-form, .shell-ready #parameter-fieldset { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.shell-ready #parameter-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scroll-padding: 12px; display: block; }
.shell-ready #parameter-list .parameter-card { padding: 16px 20px; margin-bottom: 12px; }
.shell-ready #parameter-fieldset > .save-panel { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; padding: 12px 16px; margin-top: 12px; }
.shell-ready #parameter-fieldset > .save-panel textarea { min-height: 48px; height: 48px; resize: none; }
.shell-ready #parameter-fieldset > .save-panel .field { gap: 5px; }
.shell-ready #parameter-fieldset > .save-panel .field-help { margin: 0; font-size: 11px; }
.shell-ready #parameter-fieldset .save-actions { flex-direction: column; align-items: flex-end; gap: 8px; margin: 0 0 3px; }
.shell-ready .preparation-tabs { background: #f8faff; }
.shell-ready .preparation-tabs [aria-selected="true"] { color: #2458c6; background: #edf3ff; }

/* Keep related commands together, and give empty lists a visible container. */
.shell-ready .actions { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.shell-ready .intake-toolbar { background: #fff; border: 1px solid #e1e6ee; border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.shell-ready .intake-toolbar .filter-label { margin: 0 0 0 auto; font-weight: 400; }
.shell-ready #orders > .empty-state { background: #fff; border: 1px solid #e1e6ee; border-radius: 8px; padding: 44px 24px; text-align: center; }
.shell-ready .device-guide { background: #fff; border: 1px solid #e1e6ee; border-radius: 10px; padding: 16px 20px; margin: 18px 0; }
.shell-ready .device-guide > summary { font-size: 14px; font-weight: 600; }
.shell-ready .device-guide > p { margin: 14px 0; color: #677085; font-size: 12px; }
.shell-ready .device-guide .actions { padding-block: 4px; }
.shell-ready .trial-actions > button:first-child:not(:disabled) { background: #2458c6; color: #fff; border-color: #2458c6; }
.shell-ready .trial-scroll > p, .shell-ready .trial-canvas > p { color: #677085; font-size: 12px; }
.shell-ready .trial-scroll h2 { margin-top: 20px; }
.shell-ready .trial-scroll > h2:first-child { margin-top: 0; }
