body { background:#0e0e0e; color:#f2f2f2; font-family:ui-sans-serif, system-ui, sans-serif; margin:0; line-height:1.4; }
main { padding:0 1.25rem 3rem; max-width:76rem; }
a { color:#9cc3ff; }
h1 { font-size:1.25rem; font-weight:600; margin:0.75rem 0; }
h2 { font-size:1.05rem; font-weight:600; margin:1.5rem 0 0.5rem; border-top:1px solid #262626; padding-top:0.9rem; }
h3 { font-size:1rem; font-weight:600; margin:0; }
h4, h5 { font-size:0.95rem; margin:0.6rem 0 0.3rem; }
.muted { color:#8a8a8a; } .small { font-size:0.85rem; }
button, input, select, textarea { font:inherit; color:#f2f2f2; background:#141414; border:1px solid #6b6b6b; padding:0.3rem 0.5rem; border-radius:3px; }
button { cursor:pointer; } button:disabled { color:#666; cursor:default; border-color:#333; }
button.primary { background:#1d3b66; border-color:#3f6fb0; }
textarea { width:100%; box-sizing:border-box; min-height:7rem; }
.row { display:flex; gap:0.45rem; align-items:center; flex-wrap:wrap; margin:0.4rem 0; }
.grow { flex:1; min-width:12rem; }
.top { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; padding:0.6rem 1.25rem; border-bottom:1px solid #262626; background:#111; }
.top nav a { margin-right:0.6rem; } .top nav a.on { color:#fff; font-weight:600; text-decoration:none; }
.name-box input { min-width:10rem; }
#message { margin:0.6rem 1.25rem; padding:0.5rem 0.7rem; border:1px solid #3f6fb0; background:#0f1a2a; }
#message.err { border-color:#b04040; background:#2a0f0f; }
#message:empty { display:none; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:0.35rem 0.5rem; border-bottom:1px solid #222; vertical-align:top; }
th { color:#aaa; font-weight:600; font-size:0.9rem; }
.tag { display:inline-block; border:1px solid #444; border-radius:10px; padding:0 0.45rem; font-size:0.8rem; margin:0 0.2rem 0.2rem 0; }
.status { display:inline-block; border-radius:3px; padding:0 0.4rem; font-size:0.85rem; background:#2a2a2a; }
.status.s-in-progress { background:#1d3b66; } .status.s-in-review { background:#5a4a12; } .status.s-done { background:#1f4d2b; }
.board { display:grid; grid-template-columns:repeat(4, minmax(12rem, 1fr)); gap:0.75rem; }
.col { background:#141414; border:1px solid #262626; border-radius:4px; padding:0.5rem; min-height:12rem; }
.col.over { border-color:#3f6fb0; }
.col h3 { margin-bottom:0.5rem; }
.card { background:#1b1b1b; border:1px solid #333; border-radius:4px; padding:0.5rem; margin:0 0 0.5rem; }
.card select { width:100%; margin-top:0.35rem; }
.fields { display:grid; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); gap:0.5rem 1rem; }
.fields label { display:block; font-size:0.85rem; color:#aaa; }
.fields input, .fields select { width:100%; box-sizing:border-box; }
.rich { border:1px solid #262626; padding:0.5rem 0.75rem; background:#121212; border-radius:3px; overflow-wrap:anywhere; }
.rich img, .att img { max-width:100%; max-height:28rem; display:block; margin:0.4rem 0; border:1px solid #333; }
.rich p { margin:0.4rem 0; } .rich pre { background:#000; padding:0.5rem; overflow:auto; }
.att-list { display:flex; flex-wrap:wrap; gap:0.75rem; }
.att { max-width:18rem; font-size:0.85rem; }
.att img { max-height:12rem; }
.operation { border:1px solid #262626; border-radius:4px; padding:0.6rem 0.8rem; margin:0.8rem 0; display:grid; grid-template-columns:1fr auto; gap:0.75rem; }
.operation.active { border-color:#3f6fb0; } .operation.closed { opacity:0.85; border-color:#1f4d2b; }
.op-main { min-width:0; }
.qr { text-align:center; width:180px; }
.qr canvas { width:164px; height:164px; image-rendering:pixelated; background:#fff; display:block; margin:0 auto 0.3rem; }
.qr .url { font-size:0.65rem; word-break:break-all; color:#8a8a8a; }
.place { min-width:2.2rem; color:#aaa; }
.step-done { color:#7fd18b; font-size:0.85rem; }
.comment { border-left:2px solid #333; padding:0.2rem 0 0.2rem 0.7rem; margin:0.7rem 0; }
.comment .replies { margin-left:1.2rem; }
.meta { font-size:0.85rem; color:#aaa; }
.activity td { font-size:0.85rem; }
.notice { border:1px solid #5a4a12; background:#221c08; padding:0.4rem 0.6rem; margin:0.5rem 0; }
@media (max-width: 760px) { .board { grid-template-columns:1fr; } .operation { grid-template-columns:1fr; } .qr { width:auto; } }
.step-fields { margin:0 0 0.4rem 2.2rem; }
.field-row { gap:0.4rem; flex-wrap:wrap; } .field-label { font-size:0.85rem; color:#ddd; min-width:12rem; }
.field-missing { color:#f87171; font-size:0.85rem; } .field-ok { color:#7fd18b; font-size:0.85rem; }
.field-add input { font-size:0.8rem; }
/* Op 0 "Kit parts to work order" + Op 1 "Assemble parts kit" */
.step-text { flex:1 1 14rem; min-width:0; overflow-wrap:anywhere; }
.gate-lock { color:#fbbf24; margin:0 0 0.4rem 2.2rem; overflow-wrap:anywhere; }
.step-extra { margin:0 0 0.4rem 2.2rem; }
.src { margin-top:0.6rem; min-width:0; }
.src-line { border:1px solid #2f2f2f; border-radius:4px; padding:0.5rem 0.7rem; margin:0.6rem 0; background:#121212; min-width:0; overflow-wrap:anywhere; }
.src-line h4 { margin-top:0; }
.src-line h5 { margin:0.6rem 0 0.25rem; color:#bbb; }
.src-raw p { margin:0.15rem 0; }
.kv { display:grid; grid-template-columns:minmax(7rem, max-content) 1fr; gap:0.1rem 0.7rem; margin:0.2rem 0; font-size:0.88rem; }
.kv dt { color:#9a9a9a; } .kv dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.src-opt { border:1px solid #2a2a2a; border-left:3px solid #555; border-radius:3px; padding:0.35rem 0.5rem; margin:0.4rem 0; }
.src-opt.ok { border-left-color:#3f9f5a; } .src-opt.unv { border-left-color:#8a6d1f; }
.src-opt-head { display:flex; gap:0.4rem; flex-wrap:wrap; align-items:center; }
.badge { font-size:0.75rem; border-radius:8px; padding:0 0.4rem; } .badge.ok { background:#1f4d2b; } .badge.unv { background:#4a3b0f; }
.src-sel { border:1px solid #1f4d2b; border-radius:3px; padding:0.3rem 0.5rem; background:#0f1d13; }
.buy-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(11rem, 1fr)); gap:0.4rem 0.7rem; margin:0.3rem 0; }
.buy-grid label { display:flex; flex-direction:column; font-size:0.85rem; color:#aaa; }
.buy-grid input, .buy-grid button { width:100%; box-sizing:border-box; min-width:0; }
@media (max-width: 760px) {
  main { padding:0 0.6rem 3rem; }
  .grow { min-width:0; flex-basis:100%; }
  .field-label { min-width:0; }
  .step-fields, .gate-lock, .step-extra { margin-left:0; }
  .operation { padding:0.5rem; }
  .kv { grid-template-columns:1fr; } .kv dt { margin-top:0.25rem; }
  table.activity, #move-history, #loc-table, .op-main table { display:block; overflow-x:auto; max-width:100%; }
  .top { padding:0.5rem 0.6rem; }
  .name-box input { min-width:0; width:100%; }
  .qr .url { overflow-wrap:anywhere; }
  .rich { overflow-x:auto; }
}
/* review 2026-10-09: owners, release checklist, holds, inline BOM */
.owner { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 9px; white-space: nowrap; }
.owner-student { background: #e3effc; color: #134a85; }
.owner-release { background: #fdeccf; color: #7a4500; }
.badge.req { background: #5a1a1a; color: #ffd0d0; font-size: 11px; padding: 1px 6px; border-radius: 9px; }
#release-checklist { border: 1px solid #8a6a1c; background: #1e1808; padding: 6px 10px; margin: 10px 0; border-radius: 6px; }
#release-checklist.rc-done { border-color: #2f8a4b; background: #0f2214; }
.rc-table, .bom-inline { border-collapse: collapse; font-size: 13px; width: 100%; }
.rc-table th, .rc-table td, .bom-inline th, .bom-inline td { border-bottom: 1px solid #333; padding: 3px 6px; text-align: left; vertical-align: top; }
.hold-on { color: #ff8a8a; font-weight: 600; }
.field-note { margin: 0 0 4px 0; }
.release-field .field-label { color: #e8b060; }
@media (max-width: 640px) { .rc-table, .bom-inline { font-size: 12px; } }

/* engineer review gate + citations (2026-10-09) */
#engineer-review { border: 1px solid #5a4a1a; border-radius: 6px; padding: 8px 12px; margin: 12px 0; background: #2a2412; color: #f1e6c8; }
#engineer-review.er-pass { border-color: #2f6b3a; background: #13261a; color: #d6f0dc; }
#engineer-review h2 { margin-top: 0; }
#engineer-review h3 { font-size: 1em; margin: 8px 0 2px; }
#engineer-review .er-bad h3 { color: #ffb4a8; }
#engineer-review .er-ok h3 { color: #9be3a9; }
#engineer-review ul.er-fail { margin: 2px 0 6px 18px; padding: 0; }
#engineer-review ul.er-fail li { margin: 1px 0; overflow-wrap: anywhere; }
#engineer-review form.row { flex-wrap: wrap; gap: 6px; }
.step-cite { margin: 0 0 4px 2.6em; overflow-wrap: anywhere; }
.cite-missing { color: #ffb4a8; }

/* cite columns: long doc/URL text wraps on narrow screens (2026-10-09) */
.rc-table td, .rc-table th, table.activity td, .cite, .er-item { overflow-wrap: anywhere; word-break: break-word; }
