* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #0e0e0e; color: #f2f2f2;
  font: 16px/1.4 -apple-system, ui-sans-serif, system-ui, sans-serif;
  padding: env(safe-area-inset-top) 0 calc(24px + env(safe-area-inset-bottom));
}
a { color: #9cc3ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: #8a8a8a; } .small { font-size: .85rem; }
.top {
  display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center;
  padding: .55rem calc(12px + env(safe-area-inset-right)) .55rem calc(12px + env(safe-area-inset-left));
  border-bottom: 1px solid #262626; background: #111; position: sticky; top: 0; z-index: 5;
}
.brand { font-size: 1.05rem; }
.top nav a { margin-right: .55rem; padding: .35rem 0; display: inline-block; }
.top nav a.on { color: #fff; font-weight: 700; }
.name-box { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.name-box input, button, input, select, textarea {
  font: inherit; color: #f2f2f2; background: #141414; border: 1px solid #6b6b6b;
  padding: .45rem .6rem; border-radius: 8px;
}
button { cursor: pointer; min-height: 44px; }
button:disabled { color: #666; border-color: #333; cursor: default; }
button.primary { background: #1d3b66; border-color: #3f6fb0; font-weight: 600; }
button.ok { background: #1f4d2b; border-color: #2f8a4b; font-weight: 600; }
button.ghost { background: transparent; border-color: #444; min-width: 44px; }
#message { margin: .6rem 12px; padding: .55rem .7rem; border: 1px solid #3f6fb0; background: #0f1a2a; border-radius: 8px; }
#message.err { border-color: #b04040; background: #2a0f0f; }
#message:empty { display: none; }
main { padding: 0 calc(12px + env(safe-area-inset-right)) 2rem calc(12px + env(safe-area-inset-left)); max-width: 52rem; margin: 0 auto; }
h1 { font-size: 1.3rem; margin: .9rem 0 .5rem; }
h2 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; border-top: 1px solid #262626; padding-top: .85rem; }
h3 { font-size: 1rem; margin: 0 0 .35rem; }
.row { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; margin: .4rem 0; }
.grow { flex: 1; min-width: 10rem; }
.search-wrap { margin: .75rem 0 1rem; }
.search-wrap input {
  width: 100%; font-size: 1.15rem; padding: .9rem 1rem; border-radius: 12px; border: 2px solid #3f6fb0;
  background: #101820; min-height: 56px;
}
.search-hint { margin: .35rem 2px; color: #8a8a8a; font-size: .85rem; }
.card {
  display: block; width: 100%; text-align: left; padding: .85rem 1rem; margin: .45rem 0;
  border-radius: 10px; border: 1px solid #333; background: #151515; color: inherit; font: inherit;
  text-decoration: none; cursor: pointer;
}
.card:hover, a.card:hover { border-color: #3f6fb0; text-decoration: none; }
.card .id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 1.05rem; }
.card .title { display: block; margin-top: .15rem; }
.card .meta { display: block; margin-top: .25rem; color: #9a9a9a; font-size: .9rem; }
.big-action {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 64px; margin: .6rem 0; border-radius: 12px; border: 0;
  background: #2563c9; color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none;
}
.big-action.secondary { background: #1f4d2b; }
.big-action:hover { text-decoration: none; filter: brightness(1.08); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.status {
  display: inline-block; border-radius: 4px; padding: .1rem .45rem; font-size: .85rem; background: #2a2a2a;
}
.status.s-in-progress { background: #1d3b66; }
.status.s-in-review { background: #5a4a12; }
.status.s-done { background: #1f4d2b; }
.tag { display: inline-block; border: 1px solid #444; border-radius: 10px; padding: 0 .45rem; font-size: .8rem; margin: 0 .2rem .2rem 0; }
.rich { border: 1px solid #262626; padding: .6rem .75rem; background: #121212; border-radius: 8px; overflow-wrap: anywhere; }
.rich img, .att img { max-width: 100%; max-height: 22rem; display: block; margin: .4rem 0; border: 1px solid #333; border-radius: 4px; }
.rich p { margin: .35rem 0; }
.att-list { display: flex; flex-wrap: wrap; gap: .75rem; }
.att { max-width: 16rem; font-size: .85rem; }
.operation {
  border: 1px solid #262626; border-radius: 10px; padding: .75rem; margin: .7rem 0;
  display: grid; grid-template-columns: 1fr auto; gap: .75rem;
}
.operation.active { border-color: #3f6fb0; background: #0f1828; }
.operation.closed { border-color: #1f4d2b; opacity: .92; }
.operation.waiting { opacity: .7; }
.op-main { min-width: 0; }
.qr { text-align: center; width: 150px; }
.qr canvas { width: 140px; height: 140px; image-rendering: pixelated; background: #fff; display: block; margin: 0 auto .3rem; border-radius: 4px; }
.qr .url { font-size: .65rem; word-break: break-all; color: #8a8a8a; }
.step { display: flex; gap: .55rem; align-items: flex-start; padding: .35rem 0; }
.step label { flex: 1; }
.step-done { color: #7fd18b; font-size: .85rem; }
.comment { border-left: 2px solid #333; padding: .15rem 0 .15rem .7rem; margin: .6rem 0; }
.comment .replies { margin-left: 1rem; }
textarea { width: 100%; min-height: 5.5rem; border-radius: 8px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid #222; vertical-align: top; font-size: .9rem; }
th { color: #aaa; font-weight: 600; }
.group { margin: .5rem 0 1rem; }
.group summary { cursor: pointer; font-weight: 600; padding: .5rem 0; list-style: none; }
.group summary::-webkit-details-marker { display: none; }
.group summary::before { content: "▾ "; color: #8a8a8a; }
.group:not([open]) summary::before { content: "▸ "; }
.loc-tree a { display: block; padding: .55rem .2rem; border-bottom: 1px solid #1e1e1e; }
.feed-item { padding: .55rem 0; border-bottom: 1px solid #1e1e1e; font-size: .92rem; }
.feed-item .when { color: #8a8a8a; font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0; }
.actions a, .actions button { flex: 1 1 8rem; text-align: center; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid #555; background: #1a1a1a; color: #f2f2f2; padding: .5rem .7rem; font-weight: 600; }
.actions a.primary, .actions button.primary { background: #1d3b66; border-color: #3f6fb0; }
.actions a.ok { background: #1f4d2b; border-color: #2f8a4b; }
.back { display: inline-block; padding: .5rem 0; min-height: 44px; }
@media (max-width: 640px) {
  .operation { grid-template-columns: 1fr; }
  .qr { width: auto; }
  .grid2 { grid-template-columns: 1fr; }
  .top nav { width: 100%; order: 3; }
}
@media (min-width: 900px) {
  main { max-width: 56rem; }
  .search-wrap input { font-size: 1.25rem; }
}
/* review 2026-10-09: owners, release checklist, holds, field checks, inline BOM */
.owner { display: inline-block; font-size: .75rem; font-weight: 700; padding: .05rem .45rem; border-radius: 9px; white-space: nowrap; }
.owner-student { background: #1d3b66; color: #dce9ff; }
.owner-release { background: #5a3d0a; color: #ffe2b0; }
.bad { color: #ff8a8a; } .ok-text { color: #7ddc95; }
.hold-on { color: #ff8a8a; font-weight: 700; }
#release-checklist { border: 1px solid #8a6a1c; background: #1e1808; border-radius: 8px; padding: .3rem .7rem; margin: .6rem 0; }
#release-checklist h2 { margin: .3rem 0; font-size: 1.05rem; }
.rc-list { margin: .3rem 0; padding-left: 1.1rem; } .rc-list li { margin: .25rem 0; overflow-wrap: anywhere; }
.wo-field { margin: .25rem 0 .55rem 2.2rem; }
.wo-field input, .wo-field select { width: 100%; max-width: 28rem; box-sizing: border-box; margin-top: .2rem; }
.bom-inline { border-collapse: collapse; width: 100%; font-size: .85rem; margin: .3rem 0 .6rem; }
.bom-inline th, .bom-inline td { border-bottom: 1px solid #2a2a2a; padding: .2rem .35rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }

/* engineer review + citations (2026-10-09) */
#engineer-review ul ul { margin: 2px 0 4px 16px; }
#engineer-review li { overflow-wrap: anywhere; }
.step-cite { margin: 0 0 4px 1.6em; overflow-wrap: anywhere; }

/* 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; }
