/* Engineering bindings for the preserved workspace-chrome station head.
   Component geometry/colours remain owned by workspace-chrome.css. */
.wc-head [hidden] { display: none !important; }
.wc-head .wc-escape > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wc-head [data-wc-styles] a { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-block-size: var(--wc-zone); min-inline-size: var(--wc-zone); color: inherit; font: inherit; text-decoration: none; padding-inline: .25rem; }
.wc-head [data-wc-styles] svg { inline-size: 1.125rem; block-size: 1.125rem; }
@media (max-width: 39.99rem) { .wc-head [data-wc-styles] a > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* Icon-only interface switch on phones: keep the full touch target instead of shrinking to icon + padding (36px).
   Here rather than in workspace-chrome.css, which scripts also load by its canonical name. */
@media (max-width: 39.99rem) { .wc-head .wc-style { min-inline-size: var(--wc-zone); justify-content: center; } }
.wc-head [data-wc-styles] a:hover { text-decoration: underline; }
.wc-head .wc-project[data-wc-static] { cursor: default; }
.wc-head .wc-project[data-wc-static]::after { display: none; }
.wc-head .wc-project[data-wc-static] > .wc-val { position: absolute; inset: 1.125rem .625rem 0; display: block; text-overflow: ellipsis; }
.wc-head .wc-project[data-wc-static] > .wc-cap { inset-inline-end: .625rem; }
.wc-head .wc-menu { max-block-size: calc(100dvh - var(--wc-row1) - 1rem); overflow-y: auto; overscroll-behavior: contain; }
.wc-head .wc-row > select { inline-size: auto; max-inline-size: 10rem; }
.wc-head .wc-row-val { position: static; inline-size: auto; block-size: auto; overflow: visible; clip-path: none; white-space: normal; }
.wc-head .wc-row > svg { grid-column: 1; }
.wc-head .wc-row > :nth-child(2) { grid-column: 2; }
.wc-head .wc-row > :nth-child(3) { grid-column: 3; }
/* Existing page rules target some live selects by ID. Let the component keep the well's size. */
.wc-head.wc-head .wc-project > select { inline-size: 100%; max-inline-size: none; min-inline-size: 0; block-size: 100%; min-block-size: 0; padding: 1.125rem 2rem 0 .625rem; font: 600 .875rem/1.3 var(--wc-ui); }
/* These are task commands, kept with the work rather than hidden in the Display menu. */
.ax > .wc-head { grid-row: 1; }
.ax .ax-stage:has(> [data-wc-access-tools]) { grid-template-rows: auto auto minmax(0,1fr) auto; grid-template-areas: "tools tools" "rail strip" "rail plate" "rail probe"; }
.ax [data-wc-access-tools] { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--rule); background: var(--plate); min-width: 0; }
.ax [data-wc-access-tools] > .ax-pick { flex: 1 1 14rem; max-inline-size: 26rem; }
.ax [data-wc-access-tools] .ax-doc { margin-inline-start: auto; }
.ax [data-wc-access-tools] > #axLibrary, .ax [data-wc-access-tools] > #panelToggle { flex: none; }
/* In the toolbar the inspector toggle stays in flow: the old short-landscape float would put it
   in the header's corner, under the interface-style link. */
.ax [data-wc-access-tools] > #panelToggle { position: static; box-shadow: none; }
/* The existing compact Access layout flattens .ax-plate (display:contents),
   exposing its head/map as grid children. Keep those named areas when adding
   the task toolbar; the ordinary two-column template would create implicit
   tracks and push the canvas/tool rail underneath the status footer. */
@media (min-width:75rem) and (min-height:35.0625rem) and (max-height:50rem), (orientation:landscape) and (max-height:35rem) and (min-width:47.5625rem) {
  :root:not([data-ax-large-text]) .ax .ax-stage:has(> [data-wc-access-tools]) {
    grid-template-columns:auto minmax(0,1fr) minmax(12.5rem,14.5rem);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    grid-template-areas:"tools tools tools" "rail head head" "rail map strip" "rail probe probe";
  }
}
@media (orientation:landscape) and (max-height:35rem) and (min-width:47.5625rem) {
  :root:not([data-ax-large-text]) .ax:not(.panel-closed) .ax-stage:has(> [data-wc-access-tools]) {
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:auto auto minmax(min(14rem,55svh),1fr) auto auto;
    grid-template-areas:"tools tools" "rail head" "rail map" "rail strip" "rail probe";
  }
}
.im-ledger > #imLibrary { margin: .75rem 1rem; }
.ml-data #syncButton { inline-size: auto; padding-inline: .75rem; gap: .5rem; margin-block: .5rem; }
.ml-data #syncButton > .i18n-label { display: inline; }
.wc-head #mlPrefs > .ml-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.wc-head #mlPrefs > .ml-prefs-head p { margin: 0; }
.wc-head #mlPrefs .ml-field { margin: 0; }
.wc-head #mlPrefs .ml-choice { min-inline-size: 0; }
.wc-head #mlPrefs .ml-seg { flex-wrap: wrap; }
.rv-loaded > #alignmentLink { display: flex; margin-block: .5rem; }
.mm.app-map > .wc-head { grid-area: top; }
.mm .mm-taskbar:has(> #mmMore) { flex-wrap: wrap; }
.mm .mm-taskbar > #mmMore { margin-inline-start: auto; }
/* The existing phone task switch remains a task, outside the fixed two-row station head. */
@media (max-width: 47.99rem) and (orientation: portrait), (max-width: 47.99rem) and (min-height: 32.01rem), (max-width: 39.99rem), (max-width: 63.99rem) and (max-height: 32rem) {
  body.an:has(> .wc-head) .an-bench { margin-top: 0; padding-top: 1rem; grid-template-areas: "task" "rack" "plate" "versions" "advanced"; }
  body.an:has(> .wc-head) .an-bench[data-task="recipe"] { grid-template-areas: "task" "rack"; }
  body.an:has(> .wc-head) .an-bench[data-task="result"] { grid-template-areas: "task" "plate" "versions" "advanced"; }
  body.an:has(> .wc-head) .an-bench > .an-task { position: sticky; top: 0; z-index: 12; background: var(--paper); }
}
@media (max-width: 47.99rem) and (orientation: portrait), (max-width: 39.99rem) {
  .ax .ax-stage:has(> [data-wc-access-tools]) { grid-template-rows: none; grid-template-areas: "tools" "plate" "rail" "paint" "brush" "probe"; }
}
/* Existing large-text reading mode must keep every task reachable, with ordinary page scrolling. */
:is(.ax[data-ax-large-text], [data-ax-large-text] .ax) .ax-stage:has(> [data-wc-access-tools]) { grid-template-rows: none; grid-template-areas: "tools" "plate" "rail" "paint" "brush" "probe"; }
:root[data-an-reading-flow] body.an:has(> .wc-head) .an-bench > .an-task { position: static; }

/* The map page still has ID-specific rules for its former single-line plan well.
   Keep the shared two-line well geometry and its one decorative caret. */
.mm.app-map .wc-head .wc-project > #planSelect {
  inline-size: 100%; min-inline-size: 0; block-size: 100%; min-block-size: 0;
  padding: 1.125rem 2rem 0 .625rem; background-image: none;
}
