/* =========================================================================
   netex · /workflow-xray/plant/ (templates/xray-plant.php)
   Shares the X-Ray hero, sheets, archive and forms (xray-common.css). This file: the plant hero's
   machine layer, the gap readout, the shift board, the clipboard, the safety plates, the camera test.
   ========================================================================= */
@layer reset, tokens, base, components, layout, pages, utilities;

@layer pages {

/* the machine layer revealed by the scan: a gauge, a meter, a log line, one detection box */
.xr-ov { position: absolute; left: var(--x); top: var(--y); z-index: 2; color: var(--cyan); }
.xr-ov b { display: inline-block; padding: 2px 6px; background: var(--ink); color: var(--cyan); font: 500 .6875rem/1.25 var(--f-mono); letter-spacing: var(--tr-label); text-transform: uppercase; white-space: nowrap; }
.xr-ov--gauge { display: grid; justify-items: center; gap: 2px; transform: translate(-50%, -50%); }
.xr-ov--gauge svg { width: 60px; height: 34px; filter: drop-shadow(0 0 1px var(--ink)); }
.xr-ov--meter { display: flex; align-items: center; gap: 6px; transform: translate(-50%, -50%); }
.xr-ov--meter i { width: 14px; height: 14px; border: 1.5px solid var(--cyan); background: var(--hatch); color: var(--cyan); }
.xr-ov--meter b { text-transform: none; } /* a unit symbol: kWh never becomes KWH */
.xr-ov--log { transform: translate(-50%, -50%); }
.xr-ov--log b { color: var(--paper); border-left: 2px solid var(--molten); }
.xr-ov--box { width: var(--w); height: var(--h); border: 1.5px solid var(--cyan); }
.xr-ov--box::before, .xr-ov--box::after { content: ""; position: absolute; width: 8px; height: 8px; border: 0 solid var(--cyan); }
.xr-ov--box::before { left: -4px; top: -4px; border-left-width: 2px; border-top-width: 2px; }
.xr-ov--box::after { right: -4px; bottom: -4px; border-right-width: 2px; border-bottom-width: 2px; }
.xr-ov--tag { transform: translate(-100%, -100%); }
.xr-ov--tag b { color: var(--paper); background: var(--ink-2); border: 1px solid var(--rule-dark); }
@media (max-width: 767px) { .xr-ov--gauge svg { width: 40px; height: 23px; } .xr-ov b { font-size: .5625rem; padding: 1px 4px; } }

/* ---- s2b the gap ------------------------------------------------------------------- */
.xp-gap__head { display: grid; gap: var(--s-4); align-content: start; margin-bottom: var(--s-7); }
.xp-gap__msg { font-family: var(--f-serif); font-style: italic; font-size: var(--t-lead); line-height: 1.4; max-width: 30ch; color: var(--fg); }
.xp-gap__panel { display: grid; gap: var(--s-5); container-type: inline-size; }
.js .xp-gap__switch { display: grid; gap: var(--s-2); }
.xp-gap__switch .nx-seg { max-width: 100%; }
.xp-gap__read { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4) var(--s-6); align-items: end; padding: var(--s-5) 0; border-top: var(--bw) solid var(--rule); border-bottom: var(--bw) solid var(--rule); }
.xp-gap__gr .nx-readout__value { font-size: clamp(3rem, 1.6rem + 5vw, 6.5rem); }
.xp-gap__eu .nx-readout__value { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 3rem); }
.xp-gap__bars { grid-column: 1 / -1; display: grid; gap: 6px; }
/* the bar's length moves by clip-path, never by width (bible §5.3: no layout animation) */
.xp-gap__bar { display: block; width: 100%; height: 6px; background: currentColor; clip-path: inset(0 calc(100% - var(--w, 100%)) 0 0); transition: clip-path var(--dur-cut) var(--ease-cut); }
.xp-gap__bar--gr { --w: var(--gr); color: var(--molten); border-left: 2px solid var(--molten); }
.xp-gap__bar--eu { --w: var(--eu); color: var(--cyan); border-left: 2px solid var(--cyan); }
.xp-gap__row { font-size: var(--t-lead); font-family: var(--f-serif); line-height: 1.45; max-width: 56ch; }
.xp-gap__list, .xp-gap__more { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; font-size: var(--t-small); line-height: 1.5; color: var(--fg-2); max-width: 70ch; }
.js .xp-gap__list { display: none; }
.xp-gap__more li, .xp-gap__list li { padding-left: var(--s-4); position: relative; }
.xp-gap__more li::before, .xp-gap__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 1.5px; background: var(--fg-2); transform: rotate(-47deg); }
.xp-gap__src { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; font: 400 var(--t-micro)/1.5 var(--f-mono); color: var(--fg-2); }
@media (min-width: 1024px) {
	.xp-gap__head { grid-column: 1 / span 4; margin: 0; }
	.xp-gap__panel { grid-column: 6 / -1; }
}

/* ---- s3 the shift board ------------------------------------------------------------- */
.xp-days__toggle { margin-bottom: var(--s-5); }
.js .xp-days__toggle { display: inline-flex; }
.xp-board { padding-inline: var(--s-6); }
.xp-board__table { font-size: .9375rem; }
.xp-board__table th[scope="col"] { white-space: nowrap; }
.xp-board__code { font: 600 .875rem/1.4 var(--f-mono) !important; letter-spacing: .04em !important; color: var(--sig) !important; white-space: nowrap; }
/* the stamp sits on a span: [data-stamp] makes its element inline-block, which a table cell must not become */
.xp-board__code > span { display: inline-block; }
.xp-board__title { font-weight: var(--w-strong); }
@media (min-width: 768px) { .xp-board__code { width: 6.5rem; } .xp-board__title { width: 26%; } }
.js [data-xp-days][data-view="we"] .xp-col-you, .js [data-xp-days][data-view="you"] .xp-col-we { display: none; }
@media (max-width: 767px) {
	.xp-board { padding-inline: var(--s-4); }
	.xp-board__table td.xp-board__title { font-size: 1rem; }
	.xp-board__table td.xp-board__title::before { display: none; }
	.xp-board__table td { grid-template-columns: 1fr; gap: var(--s-1); }
}

/* ---- s4 the clipboard ------------------------------------------------------------------ */
.xp-need__head { display: grid; gap: var(--s-4); align-content: start; margin-bottom: var(--s-7); }
.xp-clip { position: relative; padding: var(--s-8) var(--s-6) var(--s-6); background: var(--paper); border: 1px solid var(--rule-light); box-shadow: 10px 10px 0 var(--indigo); max-width: 40rem; color: var(--ink); }
.xp-clip__clamp { position: absolute; left: 50%; top: -12px; width: 110px; height: 34px; margin-left: -55px; border: 1.5px solid var(--ink); background: var(--paper-3); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.xp-clip__clamp::after { content: ""; position: absolute; left: 50%; top: 8px; width: 34px; height: 8px; margin-left: -17px; border: 1.5px solid var(--ink); border-radius: 999px; }
.xp-clip__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.xp-clip__list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) 0; border-top: var(--bw) solid var(--rule-light); font-family: var(--f-serif); font-size: 1.125rem; line-height: 1.4; }
.xp-clip__list li:first-child { border-top: 0; }
.xp-clip__box { display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--ink); }
.xp-clip__box .nx-icon { width: 16px; height: 16px; color: var(--indigo); }
@media (min-width: 1024px) {
	.xp-need__head { grid-column: 1 / span 5; margin: 0; }
	.xp-clip { grid-column: 7 / -1; }
}

/* ---- s5 safety plates --------------------------------------------------------------------- */
.xp-plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.xp-plate { display: grid; gap: var(--s-4); align-content: start; padding: var(--s-5); background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--ink); min-height: 12rem; }
.xp-plate.is-first { border-color: var(--molten); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--molten); }
.xp-plate__no { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: var(--paper); font: 700 1rem/1 var(--f-mono); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.xp-plate p { font-size: 1.0625rem; line-height: 1.45; font-weight: 500; }
/* phones: the number sits beside its line, so five plates don't become five tall, half-empty boxes */
@media (max-width: 599px) {
	.xp-plate { grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: var(--s-4); min-height: 0; padding: var(--s-5) var(--s-5) var(--s-5) var(--s-4); }
	.xp-plate p { padding-top: 5px; }
}

/* ---- s6 camera test -------------------------------------------------------------------------- */
.xp-cam__grid { row-gap: var(--s-6); }
.xp-cam__copy { display: grid; gap: var(--s-4); align-content: start; max-width: 52ch; }
.xp-camtest { display: grid; gap: var(--s-4); }
.xp-camtest__stage { position: relative; }
.xp-camtest__frame { position: relative; aspect-ratio: 2400 / 1340; overflow: hidden; background: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
.xp-camtest__frame picture, .xp-camtest__frame img { display: block; width: 100%; height: 100%; }
.xp-camtest__frame img { object-fit: cover; }
.xp-camtest__tag { position: absolute; right: 8px; bottom: 8px; z-index: 3; padding: 2px 6px; background: var(--ink-2); color: var(--paper); font: 500 .625rem/1.25 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.xp-camtest__hint { font: 500 .75rem/1.4 var(--f-mono); color: var(--fg-2); }
.xp-camtest__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.xp-camtest__read { min-height: 3em; font-size: .9375rem; line-height: 1.5; color: var(--fg); padding-left: var(--s-4); border-left: 2px solid var(--sig); max-width: 70ch; }
.xp-camtest__read:empty { display: none; }
.xp-camtest__verdicts { display: grid; gap: var(--s-3); padding-top: var(--s-4); border-top: var(--bw) solid var(--rule); }
.xp-verdicts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.xp-verdicts__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: baseline; padding: var(--s-3) var(--s-3); border-top: var(--bw) solid var(--rule); transition: background-color var(--dur-ui) var(--ease-mech); }
.xp-verdicts__item b { font-weight: var(--w-h3); }
.xp-verdicts__item span:not(.xp-cam__this) { grid-column: 1 / -1; color: var(--fg-2); font-size: var(--t-small); }
/* in the copy the explanation follows a colon; set on its own line it starts with a capital */
.xp-verdicts__item span:not(.xp-cam__this)::first-letter { text-transform: uppercase; }
.xp-verdicts__item.is-current { background: var(--bg-2); }
.xp-cam__photos { display: grid; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5); border-top: var(--bw) solid var(--rule); max-width: 60rem; }
.xp-cam__photos > p { font-family: var(--f-serif); font-size: var(--t-lead); }
.xp-cam__how summary { list-style: none; display: inline-flex; min-height: 40px; align-items: center; font: var(--w-ui) .9375rem/1.3 var(--f-sans); color: var(--link); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.xp-cam__how summary::-webkit-details-marker { display: none; }
.xp-cam__how ol { margin-top: var(--s-2); padding-left: 1.3em; display: grid; gap: var(--s-2); max-width: 60ch; }
@media (min-width: 1024px) {
	.xp-cam__copy { grid-column: 1 / span 4; }
	.xp-cam__stage-wrap { grid-column: 5 / -1; }
}

/* ---- s7 films / s8 deliverables / s9 price ------------------------------------------------------ */
.xp-films__more { margin-top: var(--s-6); }
/* nine sheets as an engineering drawing register (sheet code · title) inside one sheet, not a card grid */
.xp-register { margin: 0 0 var(--s-7); container-type: inline-size; }
.xp-stack { margin: 0; padding: 0; list-style: none; }
.xp-stack__sheet { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-1) var(--s-4); align-items: baseline; padding: var(--s-4) 0; border-top: var(--bw) solid var(--rule); break-inside: avoid; }
.xp-stack__sheet:first-child { border-top: 0; }
.xp-stack__title { font: var(--w-h3) 1.0625rem/1.35 var(--f-sans); max-width: 40ch; }
@container (max-width: 419px) { .xp-stack__sheet { grid-template-columns: 1fr; } }
@container (min-width: 820px) {
	.xp-stack { columns: 2; column-gap: var(--s-8); column-rule: var(--bw) solid var(--rule); }
	.xp-stack__sheet:nth-child(6) { border-top: 0; }
}
.xp-formulas { display: grid; gap: var(--s-3); max-width: 62rem; }
.xp-formulas__f { font: 600 clamp(1rem, .9rem + .4vw, 1.25rem)/1.45 var(--f-mono); }
.xp-formulas__note { font-size: var(--t-small); line-height: 1.55; color: var(--fg-2); max-width: 70ch; }
.xp-formulas__src { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); font: 400 var(--t-micro)/1.5 var(--f-mono); }
.xp-price__head { display: grid; gap: var(--s-4); justify-items: start; align-content: start; margin-bottom: var(--s-7); }
.xp-price__line { font: 600 clamp(2rem, 1.3rem + 2.4vw, 3.5rem)/1 var(--f-mono); letter-spacing: -.02em; }
@media (min-width: 1024px) {
	.xp-price__head { grid-column: 1 / span 5; margin: 0; }
	.xp-price .xr-contract { grid-column: 7 / -1; }
}

/* The camera test's AI chip sits top-right, clear of the draggable camera view (role=slider), which starts
   on the left of the line: two targets must not overlap (axe target-size, WCAG 2.5.8). */
.xp-camtest__stage > .nx-ailabel { left: auto; right: 8px; top: 8px; bottom: auto; }
.xp-camtest__stage > .nx-ailabel .nx-tip { left: auto; right: 0; }

} /* end @layer pages */
