:root {
  --bg: #0d1626;
  --bg-top: #142238;
  --card: #182a40;
  --ink: #101e30;
  --text: #f2f5fa;
  --muted: #b3c1d2;
  --line: #3c526b;
  --accent: #f0b54c;
  --accent-ink: #1c1204;
  --ready: #f0b54c;
  --pass: #2fbe8a;
  --hold: #ef6b5c;
  --locked: #a9b7c8;
  --running: #3dc6e8;
  --pass-wash: #12382d;
  --hold-wash: #3d1c1c;
  --ready-wash: #3d2a10;
  --run-wash: #123848;
  --shadow: none;
  font-family: "Segoe UI", system-ui, "Ubuntu", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - 1320px) / 2));
  background: var(--bg-top);
  border-bottom: 1px solid var(--line);
}
.brand h1, .brand .brand-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--accent);
}
.brand-sub {
  margin: .15rem 0 0;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem 0;
  padding: 0 max(1.25rem, calc((100vw - 1320px) / 2));
  background: var(--bg-top);
  border-bottom: 1px solid var(--line);
}
.app-nav a {
  display: inline-block;
  padding: .7rem .85rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  font-size: .88rem;
  border-bottom: 2px solid transparent;
}
.app-nav a:hover { color: var(--text); }
.app-nav-serial {
  margin: 0 .4rem 0 .2rem;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .78rem;
}
.admin-server-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.admin-server-nav a {
  font-size: .82rem;
  padding: .45rem .75rem;
}
body[data-page="connect"] .app-nav a[data-nav="connect"],
body[data-page="station"] .app-nav a[data-nav="station"],
body[data-page="line"] .app-nav a[data-nav="station"],
body[data-page="hardware"] .app-nav a[data-nav="hardware"],
body[data-page="timing"] .app-nav a[data-nav="timing"],
body[data-page="folders"] .app-nav a[data-nav="folders"],
body[data-page="admin"] .app-nav a[data-nav="admin"],
body[data-page="servers"] .app-nav a[data-nav="servers"],
body[data-page="validation"] .app-nav a[data-nav="validation"],
body[data-page="calnex"] .app-nav a[data-nav="calnex"],
body[data-page="admin-timing"] .app-nav a[data-nav="admin-timing"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.header-end { text-align: right; }
.station-meta { color: var(--muted); font-size: .82rem; }
.station-meta code { display: block; color: var(--text); font-size: .78rem; }
.session {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: .45rem;
}
.session-who { color: var(--text); font-size: .92rem; }
.session.signed-out { color: var(--muted); margin-top: .45rem; font-size: .85rem; }
.sign-out {
  display: inline-block;
  padding: .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 650;
}
.sign-out:hover { border-color: var(--hold); color: var(--text); }
.auth-card {
  width: min(100%, 26rem);
  max-width: 26rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1.25rem;
}
.auth-card form,
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  margin: 0;
}
.auth-card label {
  margin: 0;
}
.auth-card input {
  margin-top: .7rem;
}
.auth-card button,
.auth-submit {
  margin-top: .15rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.95rem 1.2rem;
}
.auth-card .fine,
.auth-admin {
  margin: 0;
  padding-top: 1.15rem;
  margin-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.auth-admin a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .35rem 0;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.auth-error {
  margin: 0 0 1rem;
}
.auth-card input:focus-visible,
.auth-card button:focus-visible,
.auth-admin a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.auth-card input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.auth-card button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.auth-card button:disabled,
.auth-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.auth-card input::placeholder {
  color: var(--muted);
  opacity: .85;
}
body[data-page="login"] main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 4.5rem);
  padding-top: 3.25rem;
  padding-bottom: 2rem;
}
@media (max-width: 640px) {
  body[data-page="login"] main {
    padding-top: 1.75rem;
    padding-left: .85rem;
    padding-right: .85rem;
  }
  .auth-card {
    width: 100%;
    padding: 1.25rem 1.1rem 1.1rem;
  }
  .auth-card button,
  .auth-submit {
    min-height: 3.15rem;
  }
}
.admin-page h3 { margin: 1.1rem 0 .4rem; font-size: 1rem; }
.signed-in-line { margin: 0 0 1rem; color: var(--muted); }
.recent-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.recent-list li { margin: .45rem 0; }
.recent-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .8rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.recent-list a:hover { border-color: var(--running); }

/* Connect / open-server page */
.connect-open h2,
.connect-servers h2 {
  margin: 0 0 .55rem;
  font-size: 1.2rem;
}
.connect-help {
  margin: 0 0 1.1rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  max-width: 28rem;
}
.connect-help summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  list-style: none;
}
.connect-help summary::-webkit-details-marker { display: none; }
.connect-help summary::before {
  content: "▸ ";
  color: var(--accent);
}
.connect-help[open] summary::before { content: "▾ "; }
.connect-help p {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}
.connect-lead {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
  max-width: 42rem;
}
.connect-lead-secondary {
  margin-bottom: 1.15rem;
  font-size: .82rem;
  opacity: .92;
}
.connect-form {
  display: flex;
  flex-direction: column;
  gap: .95rem;
  max-width: 28rem;
  margin: 0;
}
.connect-form label {
  margin: 0;
  font-size: .92rem;
}
.connect-form input {
  margin-top: .55rem;
  min-height: 3rem;
  padding: .85rem 1rem;
}
.connect-form input:focus-visible,
.connect-submit:focus-visible,
.station-open-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.connect-form input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.connect-submit {
  width: 100%;
  min-height: 3.35rem;
  margin-top: .35rem;
  padding: 1rem 1.25rem;
  font-size: 1.08rem;
}
.station-server-wrap {
  overflow-x: auto;
  margin-top: .75rem;
}
.station-server-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.station-server-table th {
  text-align: left;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .45rem .65rem .55rem 0;
  border-bottom: 1px solid var(--line);
}
.station-server-table td {
  padding: .85rem .65rem .85rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.station-server-table tr:last-child td {
  border-bottom: 0;
}
.station-server-serial code {
  font-size: 1rem;
  letter-spacing: .02em;
}
.station-server-table th.station-server-action {
  text-align: right;
  padding-right: 0;
}
.station-server-action {
  text-align: right;
  white-space: nowrap;
}
.station-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .45rem .95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  background: var(--ink);
}
.station-open-link:hover {
  border-color: var(--accent);
}
.pill.hold {
  background: var(--hold-wash);
  color: #ffb4aa;
  outline: 1px solid color-mix(in srgb, var(--hold) 55%, transparent);
  font-weight: 800;
}
.pill.complete,
.phase-pill.complete {
  background: var(--pass-wash);
  color: #7dffc4;
  outline: 1px solid color-mix(in srgb, var(--pass) 45%, transparent);
  font-weight: 800;
}
.pill.review,
.phase-pill.review {
  background: var(--run-wash);
  color: #8fe7ff;
  outline: 1px solid color-mix(in srgb, var(--running) 55%, transparent);
  font-weight: 800;
}
.pill.waiting,
.phase-pill.waiting,
.pill.skip_policy,
.phase-pill.skip,
.pill.skipped,
.pill.not.applicable {
  background: transparent;
  color: var(--locked);
  outline: 1px solid var(--line);
  font-weight: 700;
}
.safety-callout {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin: .85rem 0 0;
  padding: .7rem .85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--ink));
  color: var(--text);
  font-size: .86rem;
  line-height: 1.4;
}
.safety-callout strong {
  color: var(--accent);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .72rem;
  min-width: 3.6rem;
  padding-top: .12rem;
}
.blocker-criteria {
  margin: .45rem 0 .65rem;
  padding-left: 1.1rem;
  color: var(--text);
}
.blocker-criteria li { margin: .25rem 0; }
.station-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
}
.station-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.station-sidebar {
  position: sticky;
  top: .85rem;
  margin-bottom: 0;
}
.sidebar-identity {
  display: grid;
  gap: .7rem;
  margin-top: .35rem;
}
.sidebar-identity > div {
  display: grid;
  gap: .2rem;
}
.sidebar-identity span {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sidebar-reports {
  margin: .9rem 0 .4rem;
  font-size: .9rem;
}
.calnex-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
  margin-bottom: .55rem;
}
.calnex-card-head h2 { margin: 0; }
.calnex-secondary-links {
  margin: .7rem 0 0;
  font-size: .9rem;
}
.copyable {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.copy-id {
  margin: 0;
  padding: .18rem .45rem;
  min-height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.copy-id:hover,
.copy-id:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}
.copy-id:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 980px) {
  .station-shell {
    grid-template-columns: 1fr;
  }
  .station-sidebar {
    position: static;
    order: -1;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body[data-page="connect"] .top {
  border-bottom-width: 2px;
}
@media (max-width: 720px) {
  .connect-form {
    max-width: 100%;
  }
  .connect-submit {
    min-height: 3.5rem;
  }
  .station-server-table th:nth-child(2),
  .station-server-table td:nth-child(2) {
    display: none;
  }
}
.folder-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.folder-list li {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.folder-kind {
  display: inline-block;
  min-width: 2.4rem;
  color: var(--muted);
  font-size: .7rem;
  text-transform: uppercase;
}
.eyebrow { margin: 0; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-size: .75rem; font-weight: 700; }
h1, h2, h3 { margin: .2rem 0; font-weight: 700; }
h1 { letter-spacing: 0; }
main { padding: 1.5rem 1.25rem 3rem; max-width: 1320px; margin: 0 auto; }
.floor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem 1rem;
  margin: 0 0 1.1rem;
  font-size: .85rem;
}
.floor-head strong { font-size: 1rem; }
.floor-head .muted { font-size: .78rem; }
.floor-head .hold-line { flex: 1 1 100%; margin: 0; padding: .35rem .65rem; font-size: .75rem; }
.hold-list { margin: .25rem 0 0; padding-left: 1.1rem; }
.hold-list li { margin: .2rem 0; }
.hold-list code { font-size: .72rem; }
.card, .job, .status-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}
label { display: block; margin: .8rem 0; color: var(--muted); }
input {
  width: 100%;
  margin-top: .35rem;
  padding: .85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--text);
  font-size: 1.05rem;
}
button {
  margin-top: 1rem;
  padding: .9rem 1.2rem;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 650;
  line-height: 1.35;
  min-height: 2.75rem;
  cursor: pointer;
}
button.primary, button[type=submit] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.muted, .fine { color: var(--muted); }
.fine { font-size: .875rem; line-height: 1.5; }
.station { text-align: right; color: var(--muted); }
.station code { display: block; color: var(--text); }
.station a { color: var(--running); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: .15rem 0 0; font-size: 1.1rem; }
.jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.pill {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.pill.ready, .job.ready { outline: 1px solid var(--ready); }
.pill.ready { background: var(--ready-wash); color: var(--ready); }
.pill.pass { background: var(--pass-wash); color: var(--pass); }
.pill.hold { background: var(--hold-wash); color: var(--hold); }
.pill.fail { background: var(--hold-wash); color: var(--hold); }
.pill.report_generated { background: var(--run-wash); color: var(--running); }
.pill.locked { background: var(--ink); color: var(--locked); }
.pill.running { background: var(--run-wash); color: var(--running); }
.pill.skip { background: var(--ink); color: var(--muted); }
.pill.fail { background: var(--hold-wash); color: var(--hold); }
.pill.not_applicable, .factory-box.not_applicable .pill { background: var(--ink); color: var(--muted); }
.pill.skip_policy { background: var(--ink); color: var(--muted); }
.pill.not_implemented { background: var(--ink); color: var(--muted); }
.pill.not_specified { background: var(--ink); color: var(--muted); }
.pill.unknown { background: var(--hold-wash); color: var(--hold); }
.factory-box.not_applicable { border-style: dashed; opacity: .85; }
.factory-box.skip_policy { border-style: dashed; }
.do-next { border-color: var(--accent); }
.do-next h2 { font-size: 1.35rem; }
.do-next p { margin: .45rem 0 0; font-size: 1.05rem; }
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: .75rem;
  padding: .75rem 1.1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.ship-blockers { border-color: var(--hold); }
.identity-strip table th { width: 9rem; }
details.card { padding: 1rem 1.1rem; }
details.card summary { cursor: pointer; font-weight: 700; }
pre.look-screen {
  max-height: 28rem;
  overflow: auto;
  font-size: .78rem;
  background: var(--ink);
  padding: .75rem;
  border-radius: 8px;
  white-space: pre-wrap;
}
.factory-box.unknown { border-color: var(--hold); }
.pill.stale { background: var(--hold-wash); color: var(--hold); }
.pill.quarantine { background: var(--hold-wash); color: var(--hold); }
.pill.repair { background: var(--hold-wash); color: var(--hold); }
.banner { padding: .8rem 1rem; border-radius: 10px; }
.banner.hold { background: var(--hold-wash); border: 1px solid var(--hold); }
.banner.info { background: var(--run-wash); border: 1px solid var(--running); color: var(--text); }
.banner.pass { background: var(--pass-wash); border: 1px solid var(--pass); }
.steps { line-height: 1.8; }
a { color: var(--running); }
.assembly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-content: start;
  gap: 16px;
  width: 100%;
  margin: 0 auto 1.6rem;
  padding: .15rem 0 0;
}
.factory-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  min-height: 164px;
  height: auto;
  padding: 1rem;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  overflow-wrap: anywhere;
}
.factory-box .block-key { font-size: .8rem; letter-spacing: .04em; }
.factory-box h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: .5rem 0 0;
  font-weight: 700;
}
.factory-box .pill {
  align-self: flex-start;
  margin-top: .55rem;
}
.factory-box.pass .pill { color: var(--pass); }
.factory-box.hold .pill { color: var(--hold); }
.factory-box.fail .pill { color: var(--hold); }
.factory-box.stale .pill,
.factory-box.quarantine .pill,
.factory-box.repair .pill { color: var(--hold); }
.factory-box.ready,
.factory-box.locked,
.factory-box.hold,
.factory-box.fail,
.factory-box.skip,
.factory-box.stale,
.factory-box.quarantine,
.factory-box.repair { border-color: var(--line); }
.factory-box.pass { border-color: var(--pass); }
.factory-box.running,
#live-card { border-color: var(--running); }
.factory-box.locked { opacity: .72; }
.factory-box.optional { opacity: .94; }
.factory-box.optional .block-key::after { content: " · opt"; }
.factory-box.not_implemented { border-style: dashed; opacity: .8; }
.line-subs { list-style: none; padding: 0; margin: 0; }
.line-subs li {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: .4rem 1rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.line-subs li.optional { opacity: .92; }
.line-subs form { grid-column: 1 / -1; }
.block-key { font-family: ui-monospace, Consolas, monospace; color: var(--muted); font-size: .65rem; }
@media (max-width: 920px) {
  .assembly-grid { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
  .assembly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .factory-box { min-height: 152px; padding: .85rem; }
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.photo-slot { border: 1px solid var(--line); border-radius: 8px; padding: .6rem; min-width: 0; }
.photo-slot input[type=file] {
  width: 100%;
  max-width: 100%;
  font-size: .78rem;
  padding: .45rem;
}
.photo-slot .empty-photo { font-style: italic; }
.linux-screen {
  margin: .6rem 0;
  padding: .75rem .8rem;
  background: var(--ink);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: .78rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 22rem;
}
.pill.look { background: var(--run-wash); color: var(--running); }
.photo-preview-link { display: block; }
.photo-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--ink);
}
.result-list { display: grid; gap: .2rem; }
.result-list div { display: grid; grid-template-columns: 42% 1fr; gap: .4rem; font-size: .82rem; }
.result-list dt { color: var(--muted); }
.result-list dd { margin: 0; }
.history-list { list-style: none; padding: 0; }
.history-list li { margin: .6rem 0; }
.condition-check { display: flex; gap: .5rem; align-items: flex-start; }
.secondary { background: var(--line); color: var(--text); }
button.secondary { background: var(--line); color: var(--text); }
textarea { width: 100%; min-height: 4rem; background: var(--ink); color: var(--text); border: 1px solid var(--line); }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.hardware-links { display: flex; flex-wrap: wrap; gap: .45rem .85rem; }
.hardware-links a { font-size: .85rem; }
.source-chain { list-style: none; padding: 0; margin: .6rem 0 1rem; }
.source-chain li { margin: .25rem 0; padding-left: 0; }
.source-chain li.depth-1 { padding-left: 1rem; }
.source-chain li.depth-2, .source-chain li.depth-3, .source-chain li.depth-4 { padding-left: 1.6rem; }
.source-chain li.depth-5, .source-chain li.depth-6, .source-chain li.depth-7,
.source-chain li.depth-8, .source-chain li.depth-9, .source-chain li.depth-10,
.source-chain li.depth-11 { padding-left: 2.2rem; }
.source-chain a { margin-right: .5rem; }
.validation-banner {
  background: #1a2744;
  border: 2px solid #7aa2f7;
  color: #dbe7ff;
  padding: .7rem 1rem;
  border-radius: 10px;
  margin: 0 0 1rem;
}
.validation-banner.engineering-validation {
  background: #152033;
  border-color: #8fb4ff;
}
.production-banner {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  flex-wrap: wrap;
  background: #1d2418;
  border: 2px solid #7d9a4a;
  color: #e8f0d8;
  padding: .55rem .8rem;
  border-radius: 10px;
  margin: .4rem 0;
}
.validation-banner strong, .production-banner strong { letter-spacing: .04em; }
.pill.skip-test-mode, .pill.skip-test-mode-mutation-disabled,
.pill.skip-test-mode-destructive, .pill.skip-test-mode-dependency,
.pill.skip-no-flash-policy { background: #1d2a3a; color: #9ec3ff; }
.pill.not-implemented, .pill.not-run { background: var(--ink); color: var(--muted); }
.pill.engineering-validation-pass { background: #1d2a3a; color: #9ec3ff; }
.pill.validation-complete { background: #1d2a3a; color: #9ec3ff; }
.pill.info-only { background: var(--run-wash); color: var(--running); }
code.state-waiting { color: var(--hold); }
code.state-ready-not-pass { color: var(--running); }
.timing-chain { margin: .4rem 0 0 1.1rem; }
.timing-chain li { margin: .15rem 0; }
a.matrix-row { color: inherit; text-decoration: none; }
a.matrix-row:hover td { background: var(--ready-wash); }
details summary { cursor: pointer; margin: .6rem 0; }
#live-console { max-height: 16rem; }
.card.focus { outline: 2px solid var(--line); }
@media (max-width: 720px) {
  main { max-width: 100%; padding: .9rem .85rem 1.3rem; }
}

/* Box 8 operator console */
.box8-console-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.box8-console-head h3 { margin-top: .15rem; }
.box8-progress { padding: .75rem .9rem; margin: .7rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); font-size: 1rem; }
.box8-stream-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: .7rem; margin: .8rem 0; }
.box8-stream-card { border: 1px solid var(--line); border-radius: 9px; padding: .8rem; min-width: 0; background: var(--ink); display: grid; gap: .35rem; }
.box8-stream-card span { font-size: 1.15rem; font-weight: 700; }
.box8-stream-card small { color: var(--muted); }
.box8-history-wrap { overflow-x: auto; }
.box8-history { min-width: 980px; }
/* Box 8 history (19 Oct): wrap at spaces, never letter by letter; the start time stays on one line. */
.box8-history :is(th, td, code) { overflow-wrap: break-word; word-break: normal; }
.box8-history .box8-history-when, .box8-history td:first-child { white-space: nowrap; }
.box8-current-row td { background: var(--ready-wash); }
.box8-review-actions { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: .8rem; margin-top: .8rem; }
.box8-review-actions form { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; }
@media (max-width: 900px) {
  .box8-stream-grid, .box8-review-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .box8-stream-grid, .box8-review-actions { grid-template-columns: 1fr; }
}

/* Shared operator V1 shell */
.operator-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}
.operator-identity { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.operator-identity h2 { margin: .15rem 0 .3rem; }
.operator-run { display: grid; gap: .15rem; text-align: right; }
.operator-run span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.operator-state-banner { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; padding: .75rem .85rem; margin: .7rem 0; border-radius: 8px; border: 1px solid var(--line); }
.operator-state-banner.complete { background: var(--pass-wash); border-color: var(--pass); }
.operator-state-banner.running { background: var(--run-wash); border-color: var(--running); }
.operator-state-banner.hold { background: var(--hold-wash); border-color: var(--hold); }
.operator-state-banner.ready { background: var(--ready-wash); border-color: var(--ready); }
.operator-state-banner.waiting { background: var(--ink); }
.operator-instruction { padding: .25rem 0; }
.operator-instruction p:last-child { margin-bottom: 0; font-size: 1rem; }
.operator-hold { margin-top: .7rem; }
.operator-detail, .operator-lock { color: var(--muted); font-size: .875rem; }
.factory-box.current-next { outline: 2px solid var(--ready); outline-offset: 2px; }
.factory-box.phase-running { border-color: var(--running); }
.factory-box.phase-complete .pill, .pill.complete { color: var(--pass); background: var(--pass-wash); }
.factory-box.phase-hold .pill, .pill.hold { color: var(--hold); }
.pill.waiting { background: var(--ink); color: var(--muted); }
@media (max-width: 620px) {
  .operator-run { text-align: left; }
}

/* Operator V1 Box 1/2/4 */
.serial-confirm-panel, .power-action-panel { max-width: 760px; }
.serial-confirm-panel h3 { font-family: ui-monospace, Consolas, monospace; font-size: 1.5rem; letter-spacing: .04em; }
.guided-photo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.photo-progress { height: 10px; border-radius: 999px; overflow: hidden; background: var(--ink); border: 1px solid var(--line); margin: .75rem 0 1rem; }
.photo-progress span { display: block; height: 100%; background: var(--pass); }
.photo-focus { border: 2px solid var(--ready); border-radius: 12px; padding: 1rem; background: var(--ready-wash); }
.photo-preview-large { max-height: 360px; object-fit: contain; }
.photo-review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; align-items: start; margin-top: .8rem; }
.photo-capture-focus { max-width: 680px; }
.photo-grid.compact { margin-top: .8rem; }
.photo-slot.photo-done { border-color: var(--pass); }
.operator-complete-card { border: 2px solid var(--pass); background: var(--pass-wash); }
.operator-complete-card .primary-link { display: inline-block; margin-top: .4rem; }
@media (max-width: 640px) { .photo-review-actions { grid-template-columns: 1fr; } }

/* Operator V1 staged work for Boxes 5-7 */
.operator-stage-list { display: grid; gap: .55rem; }
.operator-stage { display: grid; grid-template-columns: 2.6rem minmax(0,1fr) auto auto; gap: .7rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.operator-stage.complete { border-color: var(--pass); }
.operator-stage.running { border-color: var(--running); }
.operator-stage.hold { border-color: var(--hold); }
.operator-stage.ready { border-color: var(--ready); }
.operator-stage.optional { opacity: .92; }
.operator-stage-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--muted); }
.operator-stage-body { display: grid; gap: .15rem; }
.operator-stage-skip { grid-column: 2 / -1; margin: 0; }
/* The row to do now (the DO THIS NOW row). Box 6 also marks its first open stage .current, even while it waits. */
.operator-stage.now { outline: 2px solid var(--ready, #f0b54c); outline-offset: 2px; }
.operator-stage-now { display: block; }
.operator-stage-wait { max-width: 16rem; }
.secondary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; font-size: .875rem; font-weight: 650; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .8rem; }
@media (max-width: 680px) { .operator-stage { grid-template-columns: 2.6rem 1fr auto; } .operator-stage .secondary-link { grid-column: 2 / -1; width: max-content; } }
.time-check-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: .65rem; margin-top: .8rem; }
.time-check-card { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; background: var(--ink); display: grid; gap: .5rem; }
.time-check-card details { margin-top: .15rem; }

/* Operator V1 destructive/PXE/release consoles */
.destructive-console { border: 2px solid var(--hold); }
.destructive-identity { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: .6rem; margin-top: .8rem; }
.destructive-identity div { display: grid; gap: .2rem; padding: .7rem; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.destructive-identity span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.pxe-console { border: 2px solid var(--ready); }
.pxe-timeline { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.pxe-timeline span { border: 1px solid var(--pass); background: var(--pass-wash); border-radius: 999px; padding: .35rem .55rem; font-size: .78rem; }
.release-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .55rem; margin: .8rem 0; }
.release-item { display: grid; gap: .25rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.release-item.complete { border-color: var(--pass); }
.release-item.hold { border-color: var(--hold); }
.release-item.running { border-color: var(--running); }
.operator-command { border: 2px solid var(--ready); }
.operator-command h2 { margin-bottom: .35rem; }
.operator-command-text { font-size: 1.05rem; max-width: 70rem; }
.operator-command-button { display: inline-block; margin: .45rem 0 .2rem; }
.technical-hold-details { margin: .45rem 0; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 8px; }

/* Operator V1 sub-step screens */
.operator-substep { margin-top: .2rem; }
.operator-running-action { margin: .65rem 0; padding: .7rem .8rem; border: 1px solid var(--running); border-radius: 8px; background: var(--run-wash); }
.operator-running-action p:last-child { margin-bottom: 0; font-size: 1.02rem; font-weight: 700; }
.technical-step-summary { margin-top: .7rem; }
.technical-step-summary > summary { font-weight: 700; color: var(--muted); }
.operator-live-progress { margin: .7rem 0; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.operator-live-progress .steps { margin-bottom: 0; }
.operator-action-card { border: 2px solid var(--ready); }
.operator-action-card form { margin: .55rem 0; }
.operator-action-card button.primary { min-width: min(100%, 22rem); }
.operator-action-card { scroll-margin-top: 1rem; }
.operator-completion-rule { color: var(--muted); max-width: 78ch; }
#box5-actions .operator-stage { grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: start; }
/* The row's one press (gold when it is the press to do now, else plain) sits under the row text, never in the code
   column. */
#box5-actions .operator-stage > .secondary-link,
#box5-actions .operator-stage > .primary-link { grid-column: 2 / -1; justify-self: start; margin-top: .25rem; font-weight: 700; }
#box5-actions .operator-stage-skip { grid-column: 2 / -1; }
#box5-actions .operator-stage > .operator-stage-wait { grid-column: 2 / -1; justify-self: start; margin-top: .25rem; max-width: none; }
.factory-all-boxes .factory-box { min-height: 164px; }
/* Keep command columns intact. Narrow screens scroll the output, not the page. */
.command-output { margin: 1rem 0; min-width: 0; }
.command-output figcaption { font-weight: 700; margin-bottom: .4rem; }
.command-output .linux-screen, pre.linux-screen, pre.look-screen { white-space: pre; overflow-wrap: normal; word-break: normal; overflow-x: auto; max-width: 100%; tab-size: 8; font-variant-ligatures: none; }
.command-evidence-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; }
.command-evidence-scope > div { min-width: 0; }
.command-evidence-scope dt { color: var(--muted); font-size: .8rem; }
.command-evidence-scope dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.timing-results-table { min-width: 660px; }
.timing-results-table th, .timing-results-table td { text-align: left; }
.timing-results-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
.timing-history-links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding-left: 1.2rem; }
.operator-decision-locked { border: 1px solid var(--line); border-radius: 8px; padding: .75rem .85rem; margin: .8rem 0; background: var(--ink); }
.operator-decision-locked.accepted { border-color: var(--pass); background: var(--pass-wash); }
.operator-decision-locked.hold { border-color: var(--hold); background: var(--hold-wash); }
.operator-decision-locked.retest { border-color: var(--ready); background: var(--ready-wash); }
.release-evidence-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: .55rem; margin: .8rem 0; }
.release-evidence-grid div { display: grid; gap: .2rem; padding: .65rem; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.release-evidence-grid span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.release-blockers { margin: .7rem 0 0 1.1rem; }
.release-blockers li { margin: .45rem 0; }
.release-blockers details { display: inline-block; margin-left: .4rem; }
.release-blocker-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; margin-top: .85rem; }
.release-blocker-cards article { border: 1px solid var(--hold); background: var(--hold-wash); border-radius: 8px; padding: .75rem .85rem; }
.release-blocker-cards article p { margin: .35rem 0; }
.release-blocker-cards details { color: var(--muted); font-size: .78rem; }
.operator-completion-proof { margin: .7rem 0 1rem; }
.operator-completion-proof div { border-bottom: 1px solid var(--line); padding: .3rem 0; }
.timing-readiness-banner { display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; padding: .7rem .8rem; border-radius: 8px; border: 1px solid var(--line); margin: .6rem 0; }
.timing-readiness-banner.complete { border-color: var(--pass); background: var(--pass-wash); }
.timing-readiness-banner.hold { border-color: var(--hold); background: var(--hold-wash); }
.timing-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(150px,1fr)); gap: .55rem; margin: .7rem 0; }
.timing-summary-grid div { display: grid; gap: .2rem; padding: .65rem; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.timing-summary-grid span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
@media (max-width: 620px) { .timing-summary-grid { grid-template-columns: 1fr; } }
.nic-operator-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: .55rem; margin: .7rem 0; }
.nic-operator-summary div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.nic-operator-summary span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.calnex-dashboard-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .55rem; margin: .7rem 0; }
.calnex-dashboard-summary div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.calnex-dashboard-summary span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.operator-state-banner.review { background: var(--ready-wash); border-color: var(--running); }
.pill.review, .factory-box.phase-review .pill { background: var(--ready-wash); color: var(--running); }
.factory-box.phase-review { outline: 2px solid var(--running); outline-offset: 2px; }
.factory-progress-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.factory-progress-count { display: grid; text-align: right; }
.factory-progress-count strong { font-size: 1.4rem; }
.factory-progress-count span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
@media (max-width: 620px) { .factory-progress-count { text-align: left; } }
.factory-os-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: .55rem; margin: .7rem 0; }
.factory-os-summary div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.factory-os-summary span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.final-signoff-form { max-width: 860px; }
.final-signoff-form .condition-check { padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 7px; margin: .4rem 0; background: var(--ink); }
.factory-progress-bar { height: 10px; border-radius: 999px; overflow: hidden; background: var(--ink); border: 1px solid var(--line); margin: .55rem 0 .9rem; }
.factory-progress-bar span { display: block; height: 100%; background: var(--pass); }
.configuration-truth { border: 2px solid var(--line); }
.config-truth-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: .55rem; margin: .7rem 0; }
.config-truth-grid div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.config-truth-grid span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.pill.review { background: var(--run-wash); color: var(--running); }
.factory-box.phase-review { outline: 2px solid var(--running); outline-offset: 1px; }
.operator-state-banner.review { background: var(--run-wash); border-color: var(--running); }
.factory-os-identity { border: 2px solid var(--line); }
.factory-os-identity-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: .55rem; margin: .7rem 0; }
.factory-os-identity-grid div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.factory-os-identity-grid span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }

.remediation-rail { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0; }
.remediation-rail span { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--ink); font-size: .78rem; }
.remediation-rail span.active { border-color: var(--ready); background: var(--ready-wash); color: var(--ready); }
.remediation-rail span.complete { color: var(--pass); border-color: var(--pass); background: var(--pass-wash); }
.remediation-rail span.complete b { background: var(--pass); color: var(--ink); }
.remediation-rail b { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--line); }
.final-release-form { max-width: 900px; }
.final-release-form .condition-check { padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 7px; margin: .4rem 0; background: var(--ink); }
.operator-stage-rail { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: .45rem; margin: .75rem 0; }
.operator-stage-rail span { display: flex; gap: .4rem; align-items: center; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 7px; background: var(--ink); color: var(--muted); font-size: .78rem; }
.operator-stage-rail span b { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; border-radius: 999px; border: 1px solid currentColor; }
.operator-stage-rail span.complete { color: var(--pass); border-color: var(--pass); background: var(--pass-wash); }
.operator-stage-rail span.active { color: var(--ready); border-color: var(--ready); background: var(--ready-wash); }
.operator-stage-rail span.running { color: var(--running); border-color: var(--running); background: var(--run-wash); }
.operator-stage-rail span.hold { color: var(--hold); border-color: var(--hold); background: var(--hold-wash); }
.power-off-panel { border-left: 4px solid var(--ready); padding-left: .9rem; }
.operator-identity-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: .55rem; margin: .5rem 0; }
.operator-identity-grid div { display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.operator-identity-grid > div > span:first-child { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.operator-identity-grid .copyable code { font-size: 1rem; color: var(--text); }
.station-technical-summary > summary { font-weight: 700; }
.station-technical-summary > .card { margin: .7rem 0 0; box-shadow: none; }
.operator-stages-collapsed > summary { font-weight: 700; }
.operator-stages-collapsed > summary { font-weight: 700; }
.operator-command-head { display: flex; justify-content: space-between; gap: .7rem; align-items: center; }
.operator-command-head .eyebrow { margin: 0; }
.destructive-authorize-form { border: 2px solid var(--hold); border-radius: 8px; padding: .8rem; margin-top: .7rem; }
.destructive-authorize-form input[type="text"], .destructive-authorize-form input:not([type]) { font-family: ui-monospace, Consolas, monospace; }
.harvest-meaning { border: 1px solid var(--line); border-radius: 8px; padding: .8rem; margin: .7rem 0; }
.harvest-meaning.clear { border-color: var(--pass); background: var(--pass-wash); }
.harvest-meaning.attention { border-color: var(--hold); background: var(--hold-wash); }
.harvest-meaning details { margin: .45rem 0; }
.harvest-meaning details > summary { font-weight: 700; cursor: pointer; }
.box-meaning > summary { font-weight: 800; cursor: pointer; }
.box-meaning p:last-child { margin-bottom: 0; }

/* Shared operator design system. These rules change presentation only: action
   availability and evidence truth remain server-side workflow decisions. */
html { color-scheme: dark; scroll-padding-top: 1rem; }
a { text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: .65rem 0; }
h2 { font-size: 1.3rem; line-height: 1.3; }
h3 { font-size: 1.05rem; line-height: 1.4; }
h4 { font-size: 1rem; }
code { font-size: .875em; overflow-wrap: anywhere; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
#main-content:focus { outline: none; }
.app-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.app-nav a { min-height: 3rem; }
.section-heading, .saved-report-strip { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.section-heading { margin-bottom: .8rem; }
.section-heading h2 { margin: .2rem 0 0; }
.saved-report-strip { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.saved-report-strip p { margin: .25rem 0 0; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.action-row form { margin: 0; }
.action-row button, .action-row .primary-link { margin-top: 0; }
.timing-actions { margin-top: 1.25rem; }
button:hover:not(:disabled), .primary-link:hover { filter: brightness(1.08); }
.secondary-link:hover, .station-open-link:hover { background: var(--bg-top); border-color: var(--accent); }
button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
button:disabled:not(.auth-submit),
button.primary:disabled:not(.auth-submit),
button[type=submit]:disabled:not(.auth-submit) { background: var(--ink); color: var(--muted); border: 1px dashed var(--line); opacity: 1; filter: none; }
input, select, textarea { font: inherit; border-radius: 8px; }
select { max-width: 100%; min-height: 2.75rem; padding: .7rem 2.25rem .7rem .8rem; background: var(--ink); color: var(--text); border: 1px solid var(--line); }
textarea { padding: .8rem; line-height: 1.5; }
/* Checkboxes must not inherit full-width text-input dimensions. */
input[type="checkbox"], input[type="radio"] { width: 1.2rem; height: 1.2rem; padding: 0; margin: .2rem .2rem 0 0; flex: 0 0 auto; accent-color: var(--accent); }
.condition-check { align-items: flex-start; min-height: 2.75rem; }
.condition-check span { flex: 1; }
label:has(input[type="checkbox"]), label:has(input[type="radio"]) { cursor: pointer; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin: 1rem 0; }
legend { padding: 0 .5rem; font-weight: 650; }
.operator-state-banner { align-items: flex-start; border-left-width: 4px; gap: .45rem .8rem; }
.operator-state-banner > strong { flex: 0 1 auto; }
.operator-state-banner > span { flex: 1 1 28rem; }
.operator-identity h2 { font-size: 1.65rem; }
.operator-run { font-size: .9rem; }
.operator-instruction { margin-top: 1rem; }
.operator-instruction p:last-child { max-width: 76ch; }
.operator-command { border-width: 1px; border-left-width: 4px; }
.workflow-overview { margin: 1.75rem 0; }
.factory-box { transition: border-color .12s ease, background-color .12s ease; }
.factory-box:hover { border-color: var(--accent); background: var(--bg-top); text-decoration: none; }
.factory-box .fine { margin-top: .6rem; font-size: .8rem; }
.factory-box.locked { opacity: 1; }
.factory-box.phase-running .pill { color: var(--running); }
.factory-box.phase-complete { border-color: var(--pass); }
.operator-stage .secondary-link { white-space: normal; text-align: center; }
.operator-stage-skip button { margin-top: .25rem; }
.release-blocker-cards article { border-width: 1px; border-left-width: 3px; }
details > summary { padding: .45rem 0; min-height: 2.5rem; color: var(--text); }
details[open] > summary { margin-bottom: .85rem; }
details.card > summary { margin: 0; }
details.card[open] > summary { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.technical-step-summary > summary { color: var(--muted); }
.box-meaning { background: var(--bg-top); }
.table-scroll { width: 100%; overflow-x: auto; }
table.plain { font-size: .9rem; line-height: 1.5; }
table.plain th, table.plain td { padding: .65rem .75rem; vertical-align: top; overflow-wrap: anywhere; }
table.plain th { color: var(--muted); font-weight: 650; }
table.plain tr:last-child td, table.plain tr:last-child th { border-bottom: 0; }
table.plain thead th, table.plain tr:first-child:has(th + th) th { background: var(--ink); color: var(--text); }
.hardware-links { gap: .5rem; margin-bottom: 0; }
.hardware-links a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 7px; color: var(--text); text-decoration: none; }
.hardware-links a:hover { border-color: var(--accent); }
.hardware-section { scroll-margin-top: 1rem; }
.hardware-section:target { border-color: var(--accent); outline: 1px solid var(--accent); }
.hardware-section > h3 { margin-bottom: .75rem; }
.harvest-meaning { padding: 1rem; }
.harvest-meaning details { border-top: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; font-size: .9rem; }
.folder-list li { align-items: center; flex-wrap: wrap; padding: .8rem 0; }
.folder-list a { padding: .3rem 0; overflow-wrap: anywhere; }
.folder-kind { margin-right: .5rem; padding: .2rem .45rem; border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.empty-state { padding: 1rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: var(--ink); }
/* Station numbers remain readable independently of their location color. */
.station-badge { --station-color: #9dc5ff; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .65rem; border: 1px solid var(--station-color); border-radius: 999px; color: var(--station-color); font-size: .875rem; font-weight: 700; }
.station-badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.station-badge[data-station="2"] { --station-color: #d0b1ff; }
.station-badge[data-station="3"] { --station-color: #80decf; }
.station-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.station-card { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.station-card h3 { margin: .65rem 0; }
/* Location colour identifies the physical station, never PASS/HOLD status. */
/* One rule per colour in STATION_COLOURS (src/ocp/core/config.py). */
.station-blue { --station-color: #9dc5ff; }
.station-violet { --station-color: #d0b1ff; }
.station-teal { --station-color: #80decf; }
.station-amber { --station-color: #f2c46d; }
.station-green { --station-color: #9fdc8c; }
.station-rose { --station-color: #ff9fb7; }
.station-slate { --station-color: #b8c3d4; }
.station-orange { --station-color: #ffab70; }
.station-blue .station-badge, .station-violet .station-badge, .station-teal .station-badge,
.station-amber .station-badge, .station-green .station-badge, .station-rose .station-badge,
.station-slate .station-badge, .station-orange .station-badge { --station-color: inherit; }
.station-card.station-blue, .station-card.station-violet, .station-card.station-teal,
.station-card.station-amber, .station-card.station-green, .station-card.station-rose,
.station-card.station-slate, .station-card.station-orange { border-top: 4px solid var(--station-color); }
.station-card h2 { margin: 0 0 .5rem; }
.station-card form { margin-top: 1rem; }
.station-context { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--station-color, var(--muted)); border-radius: 10px; background: var(--bg-top); }
.station-context-main { min-width: 0; }
.station-context-main p { margin: .45rem 0 0; overflow-wrap: anywhere; }
.station-context > .secondary-link { flex-shrink: 0; margin: 0; text-align: center; }
.report-generate { margin: 1.2rem 0 .75rem; }
.report-generate button { margin-top: 0; }
.report-downloads { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.report-downloads a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: var(--text); font-weight: 650; text-decoration: none; }
.report-downloads a.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.report-downloads a:hover { border-color: var(--accent); filter: brightness(1.08); }
.report-contents { padding-left: 1.4rem; }
.report-contents li { margin: .6rem 0; }
@media (max-width: 800px) {
  .station-grid { grid-template-columns: 1fr; }
  .operator-stage { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .operator-stage .secondary-link { grid-column: 2 / -1; justify-self: start; }
  .operator-stage-skip { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .station-context { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .station-context > .secondary-link { width: 100%; }
  .report-downloads { flex-direction: column; }
  .top { align-items: flex-start; padding: 1rem; }
  .brand h1 { font-size: 1.15rem; }
  .app-nav { padding: 0 .4rem; }
  .app-nav a { padding: .7rem .65rem; }
  .header-end { max-width: 60%; }
  .session { flex-wrap: wrap; }
  .card, .operator-shell, details.card { padding: 1rem; }
  .operator-identity h2 { font-size: 1.4rem; }
  .operator-run { text-align: left; }
  table.plain { display: block; overflow-x: auto; }
  .result-list div { grid-template-columns: 1fr; margin-bottom: .5rem; }
  .section-heading { align-items: flex-start; }
  .section-heading .secondary-link { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .factory-box { transition: none; } }
@media print {
  html { color-scheme: light; }
  :root { --bg: white; --bg-top: white; --card: white; --ink: #f4f5f6; --text: #111827; --muted: #374151; --line: #cbd5e1; --accent: #7c4b00; --pass: #116644; --hold: #9c2020; --running: #155e75; }
  body { font-size: 10pt; }
  .top, .app-nav, .skip-link, button, form, .primary-link, .secondary-link { display: none !important; }
  main { max-width: none; padding: 0; }
  .card, .operator-shell { break-inside: avoid; box-shadow: none; }
  a { color: inherit; }
  /* Box 8 history fits A4 width: no forced screen width, no scroll box, smaller text. */
  .box8-history-wrap { overflow: visible; }
  table.plain.box8-history { display: table; min-width: 0; width: 100%; font-size: 8pt; line-height: 1.3; }
  table.plain.box8-history th, table.plain.box8-history td { padding: .25rem .3rem; }
}

/* Operator GUI pass 2026-10-09 */
.release-blocker-cards article.blocker-waiting { border-color: var(--line); border-left-color: var(--locked); background: var(--ink); }
input[type=file] { padding: .5rem; }
input[type=file]::file-selector-button { min-height: 2.75rem; margin-right: .9rem; padding: .6rem 1rem; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg-top); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
details[id^="box7-check-"] { margin-bottom: .4rem; padding: .55rem .9rem; }
details[id^="box7-check-"] > summary { min-height: 2rem; padding: .25rem 0; }
/* Hardware tables: break inside a word only when the word cannot fit (anywhere also shrinks min-content). */
#readiness table.plain :is(th, td, code), #reconciliation table.plain :is(th, td, code) { overflow-wrap: break-word; }
.operator-action-card.action-idle { border: 1px solid var(--line); }
.operator-action-card.action-idle > .eyebrow { color: var(--muted); }
.station-card button { text-wrap: balance; }

/* GUI 10 Oct: server list pages, station card state, running clock. */
.server-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: .75rem; }
.station-server-state { margin-top: .25rem; }
.running-elapsed { margin: .25rem 0; }
.server-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; max-width: 40rem; }
.server-search label { flex: 1 1 16rem; margin: 0; }
.server-search button, .server-search .secondary-link { flex: 0 0 auto; }
.connect-help > summary { min-height: 0; padding: .2rem 0; margin: 0; }
.release-blocker-list > summary { font-weight: 650; color: var(--accent); }
.fleet-filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; align-items: end; }
.fleet-filter-form label { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.fleet-filter-form select { width: 100%; min-height: 2.9rem; }
.fleet-filter-form button { justify-self: start; }
.admin-action { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin: .75rem 0; }
.admin-action > h3 { margin-top: 0; }
.admin-action h4 { margin: 1rem 0 .4rem; font-size: .95rem; }
.admin-action-destructive { border-left: 4px solid var(--hold); }
.station-assign-link { display: inline-block; padding: .35rem 0; font-weight: 700; }
.station-selected-note { margin: .25rem 0 .6rem; }

/* Box 7 check 13: the saved Calnex Signal Check photo */
.box7-pps-photo img { max-width: 100%; height: auto; display: block; }
/* Box 8 step-by-step guide (18 Oct). */
.box8-steps { border-left: 4px solid var(--accent); }
.box8-steps h3 { margin: .2rem 0 .4rem; font-size: 1.25rem; }
.box8-steps-press { font-size: 1.3rem; font-weight: 650; margin: .35rem 0; line-height: 1.35; }
.box8-steps-list { list-style: none; padding: 0; margin: .9rem 0 .4rem; display: grid; gap: .4rem; }
.box8-step { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.box8-step-number { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; }
.box8-step-done .box8-step-number { color: var(--pass); border-color: var(--pass); }
.box8-step-now, .box8-step-running { border-color: var(--accent); background: var(--ink); }
.box8-step-now .box8-step-number { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.box8-step-hold { border-color: var(--hold); }
.box8-step-waiting { opacity: .75; }
.box8-step-tag { display: inline-block; margin-right: .4rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.box8-step-heading { font-size: 1rem; font-weight: 650; color: var(--muted); }
.box8-choose { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; margin: .8rem 0; }
.box8-choose ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.box8-choose li { margin: .25rem 0; }
/* Box 8 running test: countdown ring. */
.box8-timer { display: flex; align-items: center; gap: 1.4rem; border-color: var(--running); }
.box8-ring { width: 9.5rem; height: 9.5rem; flex: none; transform: rotate(-90deg); }
.box8-ring circle { fill: none; stroke-width: 10; }
.box8-ring-track { stroke: var(--line); }
.box8-ring-fill { stroke: var(--running); stroke-linecap: round; stroke-dasharray: 1000; transition: stroke-dashoffset 1s linear; }
.box8-timer-finishing .box8-ring-fill { stroke: var(--accent); }
.box8-timer-text p { margin: .15rem 0; }
.box8-timer-label { color: var(--running); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.box8-timer-finishing .box8-timer-label { color: var(--accent); }
.box8-timer-clock { font-size: 3.4rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.box8-timer-done { font-weight: 650; color: var(--accent); }
.box8-hands-off { font-size: 1.02rem; }
@media (max-width: 560px) {
  .box8-timer { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .box8-ring { width: 7.5rem; height: 7.5rem; }
  .box8-timer-clock { font-size: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) { .box8-ring-fill { transition: none; } }
.box8-release { margin: .4rem 0; }
.box8-big-press { font-size: 1.35rem; padding: .8rem 1.6rem; margin: .3rem 0; }

/* A COMPLETE Box 7: older engineering checks sit in one closed fold with neutral pills (19 Oct 2026). */
.box7-older .pill { background: var(--ink); color: var(--muted); border-color: var(--line); }
.box7-older .time-check-card, .box7-older .operator-stage, .box7-older .card { border-color: var(--line); border-left-color: var(--line); background: var(--card); }
/* Box 9: each button says which numbered step it is, matching the step-by-step card. */
.step-tag { font-size: 1.15rem; font-weight: 700; margin: .75rem 0 .25rem; }
.earlier-attempts summary { color: var(--muted, #666); }
.box-steps-action { margin: .9rem 0 1rem; }
.box-steps-action button { font-size: 1.25rem; padding: .9rem 1.6rem; }
.box-steps-note { color: var(--warning, #f5b94a); }
.box9-stages { list-style: none; padding: 0; margin: .8rem 0; }
.box9-stage { font-size: 1.15rem; margin: .3rem 0; }
.box9-stage-waiting { opacity: .6; }
.box9-stage-running { font-weight: 700; }
.redo-step > summary { font-weight: 600; margin: .6rem 0; }
.box9-running-for { font-size: 1.5rem; font-weight: 700; margin: .4rem 0 .6rem; }
.box9-stage-mark { display: inline-block; width: 1.4rem; }
.live-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .5rem;
  background: var(--warning, #f5b94a); animation: live-pulse 1.2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.box9-progress-text { font-size: 1.35rem; font-weight: 700; margin: .4rem 0; }
.box9-progress-bar { height: 1rem; border-radius: .5rem; background: rgba(255,255,255,.12); overflow: hidden; margin: .3rem 0 .8rem; }
.box9-progress-bar > span { display: block; height: 100%; background: var(--warning, #f5b94a); }
