/* Integration of the saved shared-chrome original. Only old header dimensions are reset here;
   map plates, replay, scientific results and article layout keep their existing presenters. */
.wc-head[data-wca-page] {
  height: auto;
  min-height: 0;
  padding-block: 0;
  row-gap: 0;
}
/* Enlarged text: keep the header's content-based minimum so a fixed-height page grid
   cannot crush it under its own wrapped controls; the page scrolls instead. */
.wc-head[data-wca-page][data-wc-reading] { min-height: auto; }
.wc-head[data-wca-page] > .ws-home {
  display: inline-grid;
  padding: 0;
  border-radius: var(--wc-r);
  background: transparent;
  color: inherit;
  box-shadow: none;
}
.wc-head[data-wca-page] > .ws-classic {
  display: grid;
  border: 0;
  font: inherit;
}
.wc-documents {
  grid-area: project;
  grid-column: project-start / meta-end;
  display: flex;
  gap: var(--wc-gap);
  min-width: 0;
}
.wc-documents > .wc-project { flex: 1 1 0; inline-size: auto; min-inline-size: 0; }
.wc-documents > .wc-project:last-child { flex-grow: 1.5; }
.wc-head:is([data-wca-page="bench"], [data-wca-page="bench-phone"]) { --wc-field: var(--plate); }
.wc-head[data-wca-page="notes"] { --wc-bg: var(--void); --wc-field: var(--raised); --wc-ring: var(--focus); }
.wc-head .wca-reading { display: flex; align-items: center; gap: .625rem; padding-inline: .625rem; }
.wc-head .wca-reading::after { content: none; }
.wca-reading > .wc-cap { position: static; flex: 1; }
.wca-reading .notes-tool { height: 2.25rem; width: 2.25rem; min-width: 0; border: 0; }
.wc-head #notesTools.wc-menu {
  position: absolute;
  inset: calc(100% + .375rem) 0 auto auto;
  display: grid;
  min-width: min(16rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 7rem);
  overflow: auto;
  opacity: 1;
  transform: none;
  transition: none;
}
.wc-head #notesTools.wc-menu:not([data-open]) { display: none; }
.wc-head #notesTools .notes-tool { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); padding: 0 .5rem; min-height: 2.75rem; }
.wc-head #notesTools .notes-tool::after { font: 500 .875rem/1.3 var(--wc-ui); }
.wc-head #notesTools > .noise-settings-entry { width: 100%; height: auto; min-height: 2.75rem; border: 0; border-top: 1px solid var(--wc-rule); border-radius: 0; padding: 0 .5rem; }
.wc-head #notesTools > .noise-settings-entry::after { font: 500 .875rem/1.3 var(--wc-ui); }
/* Batch previously inset its whole header with the result page. The chrome now spans the viewport. */
.bx:has(> .wc-head[data-wca-page="batch"]) { max-width: none; }
.bx > .wc-head[data-wca-page="batch"] { margin-inline: calc(-1 * var(--pad-l)) calc(-1 * var(--pad-r)); }
.wc-head[data-wca-page="batch"] .bx-nav { margin: 0; padding: 0; border: 0; }
.wc-head[data-wca-page="batch"] .bx-navlink { white-space: nowrap; }
.wc-head[data-wca-page="batch"] .wca-batch-project { display: grid; align-content: center; padding: 0 .625rem; cursor: default; }
.wca-batch-project::after { content: none; }
.wca-batch-project .wc-cap { position: static; }
.wca-batch-project .wc-val { display: block; overflow: hidden; text-overflow: ellipsis; }
@media (pointer: coarse) {
  .wca-reading .notes-tool { width: 2.75rem; height: 2.75rem; }
}
@media (max-width: 39.99rem) {
  .wc-documents { grid-column: project; }
  .wca-reading > .wc-cap { display: none; }
  .wc-head .wca-reading { justify-content: center; }
}
/* Phone Bench keeps its existing landscape map/comparison columns under a full-width head. */
@media (orientation: landscape) and (max-height: 560px) {
  :root[data-device="phone"] .shell:has(> .wc-head[data-wca-page="bench-phone"]) {
    grid-template-columns: minmax(0, 1fr) auto min(25rem, 46vw);
    grid-template-rows: auto minmax(180px, 1fr) auto;
    grid-template-areas: "head head head" "stage stage cmp" "trans tools cmp";
  }
}
@media print {
  .wc-head[data-wca-page="notes"] > :is(.wc-escape, .wc-project, .wc-display, .wc-style) { display: none !important; }
}
