/* shell.css: the Turntable Review site around Nick's page, to Team One's Design Standard (Docs/Design_Standard_v01.md,
   Tools and screens): white on black, Nimbus Sans in three sizes, a 4 px unit, 16 px margins, the axis at 256 px,
   28 px controls in 44 px rows, buttons as 1 px white outlines, chips as gray words that turn into a white block when
   on, one red mark at most. No icons, no rounded corners, no shadows, nothing centered. */
@font-face { font-family: 'Nimbus Sans'; src: url('/fonts/NimbusSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nimbus Sans'; src: url('/fonts/NimbusSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --ink: #fff; --ground: #000; --soft: #bdbdbd; --row: #383836; --off: #6e6e6e; --red: #da291c;
  --m: 16px; --axis: 256px; --side: 224px; --gut: 16px;
  font: 14px/20px 'Nimbus Sans', Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--ground);
  /* the browser's own parts (scrollbars, autofill, the frame's ground) dark like the page, as Nick's page has them */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; min-height: 100%; }
[hidden] { display: none !important; }
b, .name { font-weight: 700; }
.small, .label, .who, .stamp, .say { font-size: 12px; line-height: 16px; }
.label { text-transform: uppercase; letter-spacing: .08em; }
.grow { flex: 1 1 auto; }

/* the band: two lines, 66 px with its 2 px rule, which fills from the left while something loads */
.band { flex: none; padding: 8px var(--m) 0; }
.band .line { display: flex; align-items: baseline; gap: 16px; min-height: 28px; }
.band .line.two { min-height: 16px; margin-top: 4px; padding-bottom: 8px; }
.band .line > .label:first-child { width: calc(var(--side) + var(--gut) - 16px); flex: none; }
.band .line.one > .label:first-child { align-self: center; }
.say { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.say.act { font-weight: 700; }
.say.act::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--red); }
.stamp, .who { color: var(--soft); white-space: nowrap; }
.rule { height: 2px; margin: 0 calc(-1 * var(--m)); background: var(--ink); position: relative; }
.rule.loading { background: var(--row); }
.rule #fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); }

/* controls: 28 px high, words 8 px in from the box */
button, .field {
  font: inherit; color: var(--ink); background: none; height: 28px; padding: 4px 7px; margin: 0;
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer; white-space: nowrap;
}
button:hover { background: var(--row); }
button:disabled { color: var(--off); border-color: var(--soft); cursor: default; background: none; }
button.chip { border-color: transparent; color: var(--soft); }
button.chip:hover { background: none; color: var(--ink); }
button.chip.on { background: var(--ink); color: var(--ground); }
button:focus { outline: none; }
button:focus-visible { box-shadow: inset 0 0 0 1px var(--ink); }
button.chip:focus-visible { box-shadow: 0 2px 0 0 var(--ink); }
.field { cursor: text; border-color: var(--soft); width: 344px; }
.field.short { width: 112px; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field::placeholder { color: var(--off); }

/* rows hang from 1 px rules; the label stands at the margin, the first word of the row on the axis */
.view { flex: 1 1 auto; padding: 0 var(--m) 32px; overflow: auto; }
.view.work { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.statement { font-size: 40px; line-height: 44px; font-weight: 700; margin: 32px 0 28px calc(var(--axis) - var(--m)); max-width: 1100px; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding: 8px 0 8px calc(var(--axis) - var(--m) - 8px);
  border-top: 1px solid var(--row); position: relative; min-height: 44px; margin: 0; }
.row > .side { position: absolute; left: 0; top: 12px; width: var(--side); font-weight: 700; }
.row.head > .side { top: 10px; }
.row.note { min-height: 0; border: 0; font-weight: 700; }
.row.note.act::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--red); }
.row.strip { padding: 8px var(--m) 8px calc(var(--axis) - 8px); border-top: 0; border-bottom: 1px solid var(--row); flex: none; align-items: center; }
.row.strip > .side { left: var(--m); top: 12px; }
.row.strip .news { font-weight: 700; }
/* what's open: a long path breaks where it has to rather than run past a narrow window */
.row.strip #openLine { min-width: 0; overflow-wrap: anywhere; }
.group { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.group.acts { gap: 16px; }
.row.head { min-height: 36px; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 28px; padding-left: calc(var(--axis) - var(--m)); }
.row.head .small { color: var(--soft); }
.crumb-sep { color: var(--soft); }

/* reference lists: the small size on 1 px rules, columns from the axis */
table.list { border-collapse: collapse; margin: 0 0 14px calc(var(--axis) - var(--m)); font-size: 12px; line-height: 16px; }
/* never wider than the room right of the axis: the long cells wrap, and what still can't fit scrolls inside the list */
table.list { display: block; overflow-x: auto; width: fit-content; max-width: calc(100% - var(--axis) + var(--m)); }
/* a look's name in a list wraps at its parts, so the columns after it keep their room */
table.list td.ctl button.chip { white-space: normal; height: auto; min-height: 28px; max-width: 400px; text-align: left; }
table.list th { text-align: left; font-weight: 700; padding: 3px 14px 5px 0; border-top: 1px solid var(--ink); }
table.list td { padding: 3px 14px 5px 0; border-top: 1px solid var(--row); vertical-align: baseline; white-space: nowrap; }
table.list td.dim { color: var(--off); }
table.list td.wrap { white-space: normal; max-width: 480px; }
/* the audit log's versions and details: a path or id with no space in it still breaks inside its column */
#auditList td.wrap { overflow-wrap: anywhere; min-width: 200px; }

/* Nick's page takes the rest of the screen */
#frame { flex: 1 1 auto; width: 100%; border: 0; display: block; background: var(--ground); }

/* the one question the site asks: where a round goes */
.ask { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); z-index: 10; }
.askbox { position: absolute; left: var(--m); right: var(--m); top: 96px; max-width: 760px; margin-left: calc(var(--axis) - var(--m) - 8px);
  background: var(--ground); border-top: 2px solid var(--ink); padding: 8px 0 16px 8px; }
.askhead { font-weight: 700; margin: 0 0 4px; }
.askbox .small { margin: 0 0 16px; color: var(--soft); }

/* the menu (site/menu.js): the value on a 1 px line, 24 px kept for its triangle, as wide as its widest name */
button.menu { border: 0; border-bottom: 1px solid var(--soft); padding: 4px 0 3px 8px; display: inline-flex; align-items: baseline; font-size: 14px; line-height: 20px; }
button.menu .val { display: inline-grid; text-align: left; }
button.menu .val > span { grid-area: 1 / 1; }
button.menu .val > .unseen { visibility: hidden; }
button.menu .tri { flex: none; width: 24px; align-self: stretch; position: relative; }
button.menu .tri::after { content: ''; position: absolute; left: 8px; top: 9px; border: 4px solid transparent; border-top-color: var(--ink); border-bottom-width: 0; }
button.menu[aria-expanded="true"] { border-bottom-color: var(--ink); }
button.menu:focus-visible { box-shadow: inset 0 -1px 0 0 var(--ink); border-bottom-color: var(--ink); }
.menulist { position: fixed; z-index: 20; background: var(--ground); border: 1px solid var(--ink); display: flex; flex-direction: column; overflow-y: auto; font-size: 14px; line-height: 20px; }
.menulist .chip { text-align: left; }
.menulist .chip:disabled { color: var(--off); }

/* the views: chips on the band's first line */
.band .nav { align-self: center; }
/* the original layout (design.js, data-layout) has no Vehicles chip: its way in is Folders, as it always was */
:root:not([data-layout="rework"]) #nav .chip[data-view="vehicles"] { display: none; }
table.list td.ctl { padding-top: 0; padding-bottom: 0; vertical-align: middle; }
table.list td.ctl button { font-size: 14px; line-height: 20px; }
/* the version to use, in the BoB lookup */
table.list tr.use td { font-weight: 700; }
table.list td.mark { font-weight: 700; }
/* plain words in a row, on the axis with the head's line (the row's own inset is for buttons, whose words sit on it) */
.row > .text { margin-left: 8px; }
.row .state { font-weight: 700; }
.row .state.act::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--red); }
.askbox .field { margin: 0 0 16px; }
.askbox label.small { display: block; margin: 0 0 4px; color: var(--soft); }
/* words to copy in the dialog (a download code, a command): shown whole on the row's line, its Copy button after */
.askbox .cmdlabel { margin: 0 0 4px; }
.askbox .cmdrow { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; }
.askbox .cmd { flex: 1 1 auto; min-width: 0; margin: 0; padding: 3px 0 5px; border-top: 1px solid var(--row); overflow-wrap: anywhere; user-select: all; }
.askbox .cmdrow button.copy { flex: none; }

/* vehicles: a code after its name is quieter; the grid's cells are its versions' status, the settled ones (Approved,
   Delivered) in white bold, Needs work in white, WIP and In review gray. The grid scrolls inside its box when wide. */
.code { color: var(--soft); }
table.list td.ctl button.vcell { min-width: 72px; }
table.list td.ctl button.vcell.s-approved, table.list td.ctl button.vcell.s-delivered { color: var(--ink); font-weight: 700; }
table.list td.ctl button.vcell.s-needs_work { color: var(--ink); }
table.list tr.use td .code { color: var(--ink); }
table.list.grid td.wrap { white-space: nowrap; }

/* piece M: the status board's newest column, and what opens under a row of a list (a round's notes and its compare,
   a version's history): a panel that stays at the list's left edge while the list scrolls sideways, its own small
   lists in it on the same 1 px rules; the dialog's list of what a change to many versions touches */
table.list td.newest.s-approved, table.list td.newest.s-delivered { font-weight: 700; }
table.list tr.more > td { white-space: normal; padding: 8px 0 16px; border-top: 0; }
table.list tr.more .panel { position: sticky; left: 0; max-width: min(960px, calc(100vw - 2 * var(--m))); }
.panel > p.small { margin: 4px 0 8px; color: var(--soft); }
.panel > .group { margin: 0 0 8px; }
table.sub { border-collapse: collapse; margin: 0 0 12px; font-size: 12px; line-height: 16px; display: block; overflow-x: auto; max-width: 100%; width: fit-content; }
table.sub th { text-align: left; font-weight: 700; padding: 3px 14px 5px 0; border-top: 1px solid var(--ink); }
table.sub td { padding: 3px 14px 5px 0; border-top: 1px solid var(--row); vertical-align: baseline; white-space: nowrap; }
table.sub td.wrap { white-space: normal; min-width: 160px; max-width: 420px; }
table.sub td.ctl { padding-top: 0; padding-bottom: 0; vertical-align: middle; }
table.sub td.mark, table.sub tr.changed td:first-child { font-weight: 700; }
table.sub td.dim { color: var(--off); }
.asklist { margin: 0 0 16px; padding: 0 0 0 16px; max-height: 40vh; overflow-y: auto; font-size: 12px; line-height: 16px; }

/* at phone width a panel's small lists wrap inside it rather than scroll: only a table.list scrolls sideways */
@media (max-width: 900px) {
  table.sub { display: table; overflow: visible; width: 100%; }
  table.sub th, table.sub td, table.sub td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
}
@media (max-height: 820px) { .row { min-height: 36px; padding-top: 4px; padding-bottom: 4px; } .row > .side { top: 8px; } }
@media (max-width: 900px) {
  :root { --axis: 16px; }
  .row { padding-left: 8px; padding-top: 32px; }
  .row > .text { margin-left: -8px; }
  .row > .side { top: 8px; }
  .row.head { padding-top: 32px; padding-left: 0; }
  .row.head > .side { top: 8px; }
  .row.strip { padding-left: var(--m); padding-top: 8px; }
  .row.strip > .side { display: none; }
  .statement { font-size: 28px; line-height: 32px; margin-left: 0; }
  .band .line > .label:first-child { width: auto; }
  .field { width: 100%; max-width: 344px; }
  .askbox { margin-left: 0; }
  table.list { margin-left: 0; display: block; overflow-x: auto; }
}
/* a phone: the band's first line keeps the tool's name and its two buttons */
@media (max-width: 600px) {
  .band .line.one > .label:first-child, .band .who { display: none; }
  .band .line.one { flex-wrap: wrap; row-gap: 16px; }
  .band .nav { order: 9; width: 100%; }
  /* six views once the Publishes or the Audit chip shows (shell/publishes.js, shell/audit.js): still one line, the
     chips closer in and the room left over spread between them */
  .band .nav:has(> .chip:is([data-view="publishes"], [data-view="audit"]):not([hidden])) { gap: 0; flex-wrap: nowrap; justify-content: space-between; }
  .band .nav:has(> .chip:is([data-view="publishes"], [data-view="audit"]):not([hidden])) button.chip { padding: 4px 4px; }
  /* every control a 44 px target for a finger, drawn as it is on a desktop: a button's tap area reaches past its
     28 px box to 44 px above and below (and it is never narrower than 44), a field and a menu's choice are 44 px, a
     list's row with a control is 44 px, and controls that wrap stand 16 px apart, so no two tap areas overlap */
  button { position: relative; min-width: 44px; }
  button::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(100%, 44px); transform: translateY(-50%); }
  .row, .group { row-gap: 16px; }
  .field { height: 44px; }
  table.list td.ctl { padding-top: 8px; padding-bottom: 8px; }
  .menulist .chip { height: 44px; }
}

/* the Publishes view (shell/publishes.js): a compare is a line diff in a list that scrolls in its own box, the line
   numbers and the sign quiet, a line put in on the rows' gray, a line taken out in gray words */
.diffout { margin: 0 0 14px calc(var(--axis) - var(--m)); }
.diffout .diffnote { margin: 8px 0; color: var(--soft); }
.diffout table.list { margin: 0; max-width: 100%; max-height: 70vh; overflow-y: auto; }
table.list.diff td { padding: 0 14px 0 0; border-top: 0; white-space: pre; }
table.list.diff td.num { color: var(--off); text-align: right; padding-right: 8px; }
table.list.diff td.sign { padding-right: 8px; }
table.list.diff tr.in td { background: var(--row); }
table.list.diff tr.out td.code, table.list.diff tr.out td.sign { color: var(--soft); }
table.list.diff tr.gap td { color: var(--off); padding: 4px 0; border-top: 1px solid var(--row); border-bottom: 1px solid var(--row); }
@media (max-width: 900px) { .diffout { margin-left: 0; } }
/* search (shell/search.js): one field in the band once signed in, its results a list built like the menus' */
.band .search { align-self: center; }
.band #nav[hidden] + .search { display: none; }
.band .field.search { width: 224px; }
.menulist.searchlist { padding: 4px 0 8px; overflow-x: hidden; }
.searchlist .shead { margin: 8px 8px 0; font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.searchlist .shead:first-child { margin-top: 4px; }
.searchlist .small { margin: 4px 8px; color: var(--soft); }
.searchlist .chip { white-space: normal; height: auto; min-height: 28px; max-width: 100%; }
.searchlist .chip.slook, .searchlist .chip.svehicle { color: var(--ink); }
.searchlist .chip.slook:focus .code, .searchlist .chip.svehicle:focus .code { color: inherit; }
.searchlist .svers { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding: 0 8px 4px 16px; }
.searchlist .svers .small { margin: 0; }
.searchlist .chip.svcell.s-approved, .searchlist .chip.svcell.s-delivered, .searchlist .chip.svcell.use { color: var(--ink); font-weight: 700; }
.searchlist .chip.svcell.s-needs_work { color: var(--ink); }
.searchlist .chip:focus { background: var(--ink); color: var(--ground); }
.searchlist .chip:focus .code { color: var(--ground); }
@media (max-width: 600px) {
  .band .search { order: 10; width: 100%; }
  .band .field.search { width: 100%; height: 44px; }
  .searchlist .chip { min-height: 44px; }
  .searchlist .svers { row-gap: 0; }
}
/* the Render section (shell/render.js): a menu picking several at once shows a summary and may be no wider than its
   row; its chips wrap their long names. Each trim's picks stand in groups, a small word over each menu. A request's
   row above its looks, which read as a list. */
button.menu.multi { max-width: 100%; }
button.menu.multi .val { min-width: 0; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
button.menu.multi .val > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menulist.multi { max-width: calc(100vw - 16px); }
.menulist.multi .chip { white-space: normal; height: auto; min-height: 28px; }
#vOrder .group.pick { flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; max-width: 100%; }
#vOrder .group.pick > .small { color: var(--soft); font-size: 12px; line-height: 16px; padding-left: 8px; }
#vOrder .row > .text.name { flex: 0 1 100%; }
#vOrderLine { flex: 1 1 320px; }
#vRenderNo { overflow-wrap: anywhere; }
#vRequests .row.req > .text { flex: 1 1 480px; min-width: 0; overflow-wrap: anywhere; }
/* a phone: Order renders, the section's one call to action, is a 44 px box like a field, its whole target drawn (a
   28 px button's reach past its box is cut where the view's scroll edge crosses it) */
@media (max-width: 600px) { .menulist.multi .chip { min-height: 44px; } #vOrderBtn { height: 44px; } }
/* the rework's vehicle page (shell/rework.js): its own parts (Go to, Deliver, Find) never show in the original, and
   in the rework the band has no Find (a car's is on its page) nor the page its old Lookup. A part joined to the
   section above it (Checked out and Broken to Renders, Boards to Review, the open delivery and Deliveries to Deliver,
   Requests to Render) has a smaller heading: a 1 px rule close under the section. Find's code menus stand in groups,
   a small word over each, as the Render section's. */
:root:not([data-layout="rework"]) #vehicle .rw { display: none; }
:root[data-layout="rework"] :is(#vLookupSec, #nav .chip[data-view="find"]) { display: none; }
:root[data-layout="rework"] #vehicle :is(#vCheckSec, #vBreakSec, #vBoardsSec, #vRequestsSec) > .row.head, #vehicle .row.head.sub,
:root[data-layout="rework"] #vCurSlot > #curSec > .row.head { border-top-width: 1px; margin-top: 12px; }
#vfCodes .group.pick { flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; max-width: 100%; }
#vfCodes .group.pick > .small { color: var(--soft); font-size: 12px; line-height: 16px; padding-left: 8px; }
:is(#vPrepLine, #vfLine, #vDeliveriesMoreLine) { flex: 1 1 320px; }
#vCurSlot > #curSec { margin-bottom: 12px; }
/* a list of the rework's with nothing in it yet takes no room (its line says why) */
#vehicle :is(#vfList, #vApproved, #vDeliveries):empty { display: none; }
