
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/font-barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500 600; font-display: swap; src: url("/font-barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500 600; font-display: swap; src: url("/font-barlow-cond-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/font-barlow-cond-700.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Stencil Display"; font-weight: 700 800; font-display: swap; src: url("/font-stencil.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/font-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500 600; font-display: swap; src: url("/font-plex-mono-500.woff2") format("woff2"); }

/* Layout: plates bolted into a hull in the dark. Phone: one column and a tab bar. Desk: Now beside the Log, tabs on top.
   Colour means one thing each: furnace orange = live / the action, brass = ISK, red = danger, gunmetal = everything else.
   Mostly black: colour is light coming off machinery, never paint. */
:root {
  --void: #050607; --plate: #08090a; --plate-2: #0e1012; --plate-3: #15181b; --rule: #1d2125; --rule-2: #2c3238;
  --ink: #d6d3cc; --ink-2: #858a8c; --steel: #525c65;
  --live: #f0600f; --glow: rgba(240, 96, 15, .35); --on-live: #120802; --money: #d4a02a; --money-dim: #6b5121; --danger: #d0283a; --ok: #6b9658;
  --f-stencil: "Big Shoulders Stencil Display", Impact, "Arial Narrow", sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* beats any display rule, so hiding always hides */
body { margin: 0; }
img { max-width: 100%; }
html, body { background: var(--void); }
body { color: var(--ink); font: 400 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 520px at 50% -260px, rgba(240, 96, 15, .07), transparent 70%) no-repeat, var(--void); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--plate); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.label { font: 600 11px/1.1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--steel); }
.plate { background: var(--plate-2); border: 1px solid var(--rule); border-radius: 2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }

.mark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark .hz { width: 4px; height: 24px; flex: none; background: var(--live); box-shadow: 0 0 10px var(--glow); }
.mark b { font: 800 23px/1 var(--f-stencil); letter-spacing: .07em; }
.mark small { font: 600 11px/1 var(--f-label); letter-spacing: .16em; color: var(--steel); text-transform: uppercase; white-space: nowrap; }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--steel); display: inline-block; flex: none; }
.lamp.live { background: var(--live); box-shadow: 0 0 8px var(--live); animation: blink 2.4s ease-in-out infinite; }
.lamp.stale { background: var(--danger); box-shadow: none; }
.lamp.busy { background: var(--money); box-shadow: 0 0 6px var(--money-dim); }   /* the client busy or not answering */
.lamp.sleep { background: var(--rule-2); }
@keyframes blink { 50% { opacity: .55; } }
.btn.pending, .chip.pending { pointer-events: none; animation: pend 1s ease-in-out infinite; }
@keyframes pend { 50% { opacity: .55; } }
.toast.ok { border-left-color: var(--ok); }
.toast.unknown { border-left-color: var(--money); }
/* buttons: a hold fills with hazard stripes, so a slip of the thumb never sends a ship home */
.btn { position: relative; overflow: hidden; min-height: 48px; padding: 0 18px; border: 1px solid var(--rule-2); border-radius: 2px;
  background: var(--plate-3); cursor: pointer; font: 700 15px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: scaleX(var(--p, 0)); transform-origin: left;
  background: repeating-linear-gradient(-45deg, var(--live) 0 8px, transparent 8px 16px); opacity: .5; }
.btn.primary { flex: 1; background: var(--plate-3); border-color: var(--live); color: var(--live); box-shadow: inset 4px 0 0 var(--live), 0 0 22px -8px var(--glow); }
.btn.primary::after { background: repeating-linear-gradient(-45deg, var(--live) 0 8px, transparent 8px 16px); opacity: .4; }
.btn.primary:disabled { border-color: var(--rule-2); color: var(--ink-2); box-shadow: inset 4px 0 0 var(--rule-2); }
.btn small { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 3px 5px; border: 1px solid currentColor;
  font: 600 9px/1 var(--f-label); letter-spacing: .16em; opacity: .7; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.small small { position: static; transform: none; margin-left: 8px; }   /* beside the label: a short button has no room to its right */
.chipset { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { min-height: 30px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 2px; background: none; color: var(--ink-2); cursor: pointer;
  font: 600 11px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; }
.chip.on { color: var(--ink); border-color: var(--ink-2); background: var(--plate-3); }
/* An on/off chip says which it is: lit furnace orange with ON, or dim and dashed with OFF. */
.chip.toggle { display: inline-flex; align-items: center; gap: 8px; border-style: dashed; }
.chip.toggle .state { padding: 3px 5px; border: 1px solid var(--rule-2); font: 600 10px/1 var(--f-mono); letter-spacing: .08em; color: var(--steel); }
.chip.toggle.on { border-style: solid; border-color: var(--live); background: var(--live); color: var(--on-live); box-shadow: 0 0 10px -2px var(--glow); }
.chip.toggle.on .state { border-color: var(--on-live); color: var(--on-live); }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 10px);
  max-width: calc(100vw - 32px); padding: 10px 14px; background: var(--plate-3); border: 1px solid var(--rule-2); border-left: 4px solid var(--live);
  font: 500 13px/1.35 var(--f-mono); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.danger { border-left-color: var(--danger); }
.md-wrap { overflow-x: auto; margin: 6px 0; }
.md-table { border-collapse: collapse; min-width: 100%; font: 500 12px/1.35 var(--f-mono); }
.md-table th { text-align: left; font: 600 11px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.md-table th, .md-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
/* ---- the crew's window (bridge.js): Claude Code's terminal look, kept inside .cl. It fills the screen under the head,
   with no frame: the prompt on a grey row (the CEO's caret in furnace orange), the session's words after a dot, a tool
   call after a green dot (red when it failed, pulsing while it runs) with what came back under a corner, the spinner,
   the rounded input and the footer. Markers are drawn here: the mono font has no bullets or corners. */
.cl-view.on { display: flex; flex-direction: column; height: calc(100dvh - var(--cl-top, 130px) - var(--cl-bottom, 0px)); min-height: 380px; }
main .wrap:has(> .cl-view.on) { padding-bottom: 0; }
.cl-view .b-head { flex-wrap: wrap; margin: 10px 0 6px; }
.cl-view .b-switch { max-width: 100%; }
.cl-view .b-log { margin: 0 0 8px; max-height: 28vh; flex: none; }
.cl { flex: 1; min-height: 0; display: flex; flex-direction: column; font: 400 13.5px/1.55 var(--f-mono); color: var(--ink); --cl-code: #a9b6e8; }
.cl-pane { position: relative; flex: 1; min-height: 0; display: flex; }
.cl-scroll { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 14px;
  scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
.cl-scroll > div { max-width: 110ch; }
.cl-item { margin-top: 18px; }
.cl-empty { margin: 18px 0; color: var(--steel); }
.cl-in { position: relative; padding: 5px 10px 5px 28px; background: var(--plate-2); color: var(--ink-2); }
.cl-in::before { content: ">"; position: absolute; left: 11px; top: 5px; color: var(--steel); }
.cl-in time { float: right; margin-left: 12px; font-size: 11px; color: var(--steel); }
.cl-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-in.cl-ceo, .cl-in.cl-eng { color: var(--ink); background: var(--plate-3); }
.cl-in.cl-ceo::before { color: var(--live); font-weight: 600; }
.cl-in.cl-eng::before { color: var(--money); }
.cl-in.cl-sys { cursor: pointer; }
.cl-in.cl-sys:not(.open) .cl-body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-tag { margin-right: 10px; color: var(--steel); }
.cl-tag.eng { color: var(--money); }
.cl-in.cl-sending { opacity: .7; }
.cl-note { padding: 3px 0 0 28px; font-size: 12px; color: var(--steel); }
.cl-say, .cl-tool { position: relative; padding-left: 22px; margin-top: 12px; }
.cl-tool { margin-top: 7px; }
.cl-say::before, .cl-tool::before { content: ""; position: absolute; left: 5px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.cl-tool.ok::before { background: var(--ok); }
.cl-tool.err::before { background: var(--danger); }
.cl-tool.run::before { background: var(--steel); animation: t-pulse 1.2s ease-in-out infinite; }
@keyframes t-pulse { 50% { opacity: .25; } }
.cl-call { overflow-wrap: anywhere; }
.cl-call b { font-weight: 600; color: var(--ink); }
.cl-arg { color: var(--ink-2); }
.cl-out { position: relative; padding-left: 24px; color: var(--ink-2); overflow-wrap: anywhere; }
.cl-out::before { content: ""; position: absolute; left: 7px; top: 0; width: 9px; height: .75em; border-left: 1px solid var(--steel); border-bottom: 1px solid var(--steel); }
.cl-tool.err .cl-out { color: var(--danger); }
.cl-fold { position: relative; display: block; margin-top: 10px; padding: 0 0 0 22px; background: none; border: 0; color: var(--steel); font: inherit;
  text-align: left; cursor: pointer; }
.cl-fold::before { content: "✻"; position: absolute; left: 4px; top: 0; }
.cl-fold:hover, .cl-fold:focus-visible { color: var(--ink-2); }
.cl-more { margin-left: 10px; font-size: 11px; text-decoration: underline dotted; text-underline-offset: 3px; }
.cl-steps { margin-top: 2px; }
.cl-steps .cl-say { color: var(--ink-2); }
.cl-sum { margin: 8px 0 0 22px; padding-left: 10px; border-left: 1px solid var(--rule-2); color: var(--ink-2); }
.cl-div { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--steel); }
.cl-div::before, .cl-div::after { content: ""; flex: 1; border-top: 1px dashed var(--rule-2); }
.cl-md .md-p { margin: 0 0 8px; }
.cl-md > :last-child { margin-bottom: 0; }
.cl-md .md-list { margin: 0 0 8px; padding-left: 2.2ch; }
.cl-md .md-list li { margin: 1px 0; }
.cl-md .md-list li::marker { color: var(--steel); }
.cl-md .md-h { margin: 12px 0 6px; font: 600 13.5px/1.4 var(--f-mono); color: var(--ink); }
.cl-md b { font-weight: 600; color: #f1eee8; }
.cl-md em { color: var(--ink-2); }
.cl-md code { font: inherit; color: var(--cl-code); }
.cl-md a { color: var(--live); }
.cl-md .md-pre { margin: 4px 0 8px; padding: 8px 10px; background: var(--plate-2); color: var(--ink); white-space: pre; overflow-x: auto; }
.cl-md .md-table { font-size: 12.5px; }
.cl-new { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 14px; border: 1px solid var(--rule-2); border-radius: 14px;
  background: var(--plate-3); color: var(--ink); font: 500 12px/1 var(--f-mono); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.cl-think { flex: none; min-height: 1.55em; margin: 4px 0 6px; color: var(--live); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-glyph { display: inline-block; width: 1.5ch; font-variant-emoji: text; }
.cl-dim { color: var(--steel); }
.cl-input { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--rule-2); border-radius: 8px; }
.cl-input:focus-within { border-color: var(--steel); }
.cl-caret { color: var(--ink-2); line-height: 1.5; }
.cl-input textarea { flex: 1; width: auto; min-width: 0; min-height: 0; height: 1.5em; max-height: 40vh; padding: 0; border: 0; outline: 0; resize: none; background: transparent;
  color: var(--ink); font: 400 14px/1.5 var(--f-mono); }
.cl-input textarea::placeholder { color: var(--steel); }
.cl-send { padding: 0 2px; background: none; border: 0; color: var(--ink-2); font: 500 16px/1.3 var(--f-mono); cursor: pointer; }
.cl-send:hover:not(:disabled) { color: var(--live); }
.cl-send:disabled { color: var(--rule-2); cursor: default; }
.cl-foot { flex: none; display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 6px 4px 10px; font-size: 11.5px; color: var(--steel); }
.cl-foot .warn { color: var(--danger); }
.cl-meter { position: relative; display: inline-block; width: 36px; height: 4px; margin: 0 6px 1px; vertical-align: middle; background: var(--plate-3); }
.cl-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--steel); }
.cl-meter b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--danger); }
@media (max-width: 959px) {
  .cl { font-size: 13px; }
  .cl-input textarea { font-size: 16px; }   /* under 16px a phone zooms in on focus */
  .cl-in { padding-left: 24px; } .cl-in::before { left: 8px; }
  .cl-view .b-head { gap: 6px 10px; margin-top: 8px; }
  .cl-view .b-switch { flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; }   /* one row that scrolls, not three */
  .cl-view .b-switch > * { flex: none; }
  .cl-wide { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cl-tool.run::before { animation: none; } }


/* ================= the command app: four fixed screens, cards, sheets. Nothing scrolls but a chat. ================= */
html, body { height: 100%; overflow: hidden; }
body { display: flex; flex-direction: column; height: 100dvh; }
.bar { flex: none; background: var(--plate); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.bar .wrap { display: flex; align-items: center; gap: 14px; min-height: 52px; }
.mark b { font-size: 21px; }
.worth { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; line-height: 1; }
.worth b { font: 600 17px/1 var(--f-mono); color: var(--money); }
.worth small { margin-top: 3px; font: 500 10px/1 var(--f-mono); color: var(--steel); }
.crew { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; background: none; border: 1px solid var(--rule-2);
  border-radius: 2px; color: var(--ink-2); cursor: pointer; font: 600 11px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--live); color: var(--on-live);
  font: 700 11px/18px var(--f-mono); text-align: center; }
.nav { display: none; gap: 2px; }
.nav button { position: relative; min-height: 52px; padding: 0 16px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--steel);
  font: 600 13px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.nav button.on { color: var(--ink); border-bottom-color: var(--live); }
.nav .badge, .tabs .badge { position: absolute; top: 8px; right: 0; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; }
.nav .dot, .tabs .dot { position: absolute; top: 14px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

main { flex: 1; min-height: 0; }
main > .wrap { height: 100%; }
.view { display: none; height: 100%; flex-direction: column; padding: 12px 0; }
.view.on { display: flex; }
.tabs { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--plate); border-top: 1px solid var(--rule);
  padding: 0 max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px)); }
.tabs button { position: relative; min-height: 56px; background: none; border: 0; color: var(--steel); cursor: pointer;
  font: 600 12px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.tabs button.on { color: var(--ink); }
.tabs button.on::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 3px; background: var(--live); }
.tabs .badge { top: 9px; right: calc(50% - 34px); }
.tabs .dot { top: 13px; right: calc(50% - 30px); }
@media (min-width: 960px) { .nav { display: flex; } .tabs { display: none; } .view { padding: 18px 0 20px; } }

/* a screen's head: a stencil title and its one line */
.vh { flex: none; display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; min-width: 0; }
.vh h1 { margin: 0; font: 800 26px/1 var(--f-stencil); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.vh p { margin: 0; font: 500 12px/1.3 var(--f-mono); color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- the grid: slots sized to the screen; JS decides what earns a card, the rest are chips, then +N */
.grid { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 6), minmax(0, 1fr)); }

.span-all { grid-column: 1 / -1; } .span-2c { grid-column: span 2; }

/* ---- a card: title, one big number, one visual, one line. Glows only when it needs you. */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 14px 11px;
  background: var(--plate-2); border: 1px solid var(--rule); border-radius: 4px; text-align: left; color: inherit; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); transition: border-color .2s, background .2s; }
body.opening .card { animation: card-in .3s ease-out; }   /* only when a screen is opened: a data refresh redraws in place */
.card:hover { border-color: var(--rule-2); }
.card:active { background: var(--plate-3); }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
.c-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-title { flex: 1; min-width: 0; font: 600 12px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-stamp { flex: none; font: 500 10.5px/1 var(--f-mono); color: var(--steel); }
.c-big { margin-top: auto; padding-top: 6px; font: 600 26px/1.05 var(--f-mono); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-big small { margin-left: 6px; font: 500 12px/1 var(--f-mono); color: var(--ink-2); letter-spacing: 0; }
.c-vis { margin-top: 8px; }
.c-line { margin-top: 7px; font: 400 12.5px/1.35 var(--f-mono); color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; }
.c-line b { color: var(--ink); font-weight: 500; }
.card.hero { padding: 16px 18px 14px; border-color: var(--rule-2); background: linear-gradient(180deg, var(--plate-3), var(--plate-2)); }
.card.hero .c-big { font-size: 36px; }
.card.hero .c-title { color: var(--ink); font-size: 14px; }
.card.live { border-color: rgba(240, 96, 15, .55); box-shadow: inset 3px 0 0 var(--live), 0 0 24px -12px var(--glow); }
.card.live .c-title { color: var(--live); }
.card.alert { border-color: rgba(208, 40, 58, .6); box-shadow: inset 3px 0 0 var(--danger), 0 0 24px -12px rgba(208, 40, 58, .5); }
.card.alert .c-title { color: var(--danger); }
.card.money .c-big { color: var(--money); }
.card.quiet { background: transparent; border-style: dashed; }
.card.quiet .c-big { color: var(--ink-2); }
.card.stale .c-big, .card.stale .c-vis { opacity: .45; }
.card.stale .c-stamp { color: var(--money); }
.c-open { position: absolute; right: 12px; bottom: 10px; color: var(--steel); font: 500 14px/1 var(--f-mono); }

/* visuals */
.v-bar { position: relative; height: 6px; background: var(--plate-3); border-radius: 3px; overflow: hidden; }
.v-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink-2); border-radius: 3px; transition: width .6s ease; }
.live .v-bar i, .hero .v-bar i { background: var(--live); box-shadow: 0 0 10px var(--glow); }
.money .v-bar i { background: var(--money); }
.v-dots { display: flex; gap: 6px; }
.v-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-2); }
.v-dots i.on { background: var(--ok); } .v-dots i.warn { background: var(--money); } .v-dots i.bad { background: var(--danger); }

/* ---- chips: a healthy thing in one line; several share a slot */
.chips { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 0; overflow: hidden; }
.cchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; padding: 0 12px; background: var(--plate-2);
  border: 1px solid var(--rule); border-radius: 17px; color: var(--ink-2); cursor: pointer; font: 500 12.5px/1 var(--f-mono); white-space: nowrap; }
.cchip b { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.cchip .lamp { width: 7px; height: 7px; }

/* ---- the roadmap: a stepper, one milestone at a time */
.steps { flex: none; display: flex; align-items: flex-start; margin: 2px 0 12px; }
.step { flex: 1; min-width: 0; position: relative; padding: 0; background: none; border: 0; color: var(--steel); cursor: pointer; text-align: center; }
.step::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--rule-2); }
.step:first-child::before { display: none; }
.step.done::before, .step.cur::before { background: var(--ink-2); }
.step i { position: relative; display: block; width: 20px; height: 20px; margin: 0 auto; border: 2px solid var(--rule-2); border-radius: 50%; background: var(--void); }
.step.done i { border-color: var(--ink-2); background: var(--ink-2); }
.step.done i::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--void); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.step.cur i { border-color: var(--live); box-shadow: 0 0 0 4px rgba(240, 96, 15, .18), 0 0 14px var(--glow); }
.step.cur i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--live); }
.step.missed i { border-color: var(--danger); }
.step.missed::before { background: var(--ink-2); }
.step.missed i::before, .step.missed i::after { content: ""; position: absolute; left: 7px; top: 2px; width: 2px; height: 12px; background: var(--danger); transform: rotate(45deg); }
.step.missed i::after { transform: rotate(-45deg); }
.step span { display: block; margin-top: 6px; padding: 0 2px; font: 600 10.5px/1.15 var(--f-label); letter-spacing: .08em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.cur span { color: var(--ink); }
.goal { flex: none; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--rule);
  border-left: 3px solid var(--money); border-radius: 4px; background: rgba(212, 160, 42, .04); }
.goal .label { color: var(--money); flex: none; }
.goal span { font: 500 13px/1.3 var(--f-body); color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ms-list { margin: 10px 0 0; padding: 0; list-style: none; font: 400 13px/1.4 var(--f-mono); color: var(--ink-2); }
.ms-list li { position: relative; padding-left: 18px; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-list li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px; border: 1px solid var(--steel); border-radius: 50%; }
.ms-list li.done { color: var(--steel); text-decoration: line-through; }
.ms-list li.done::before { background: var(--steel); }
.ms-fast { margin-top: auto; padding-top: 10px; font: 500 12.5px/1.35 var(--f-mono); color: var(--money); }
.ms-fast::before { content: "⚡ "; font-variant-emoji: text; }

/* ---- decisions: a stack, one at a time */
.dec { cursor: default; }
.dec .c-big { font: 600 19px/1.25 var(--f-body); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 8px; padding-top: 0; }
.dec-rows { display: grid; gap: 5px; margin-top: 10px; font: 400 12.5px/1.35 var(--f-mono); color: var(--ink-2); }
.dec-rows div { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: 8px; }
.signin .c-big { display: block; -webkit-line-clamp: unset; }   /* who cannot hear, said whole (order 168) */
.signin code { font: inherit; color: var(--ink); white-space: nowrap; }
.dec-rows div span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dec-rows .k { font: 600 10.5px/1.6 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.dec-rows .rec { color: var(--ok); }
.dec-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: auto; padding-top: 12px; }
.dec-acts button { min-height: 42px; border: 1px solid var(--rule-2); border-radius: 3px; background: var(--plate-3); color: var(--ink); cursor: pointer;
  font: 700 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; }
.dec-acts .yes { border-color: var(--ok); color: #9fd18a; }
.dec-acts .no { color: var(--ink-2); }
.switches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.switches .btn { width: 100%; }
.btn.danger { border-color: rgba(208, 40, 58, .6); color: #e4707c; }
.btn.danger::after { background: repeating-linear-gradient(-45deg, var(--danger) 0 8px, transparent 8px 16px); }

/* ---- a sheet: a full screen card with segments; back is one tap. No scroll inside either. */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(3px); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sh { display: flex; flex-direction: column; width: 100%; height: calc(100dvh - 40px - env(safe-area-inset-top, 0px)); padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--plate-2); border-top: 3px solid var(--live); border-radius: 12px 12px 0 0; animation: rise .28s ease-out; overflow: hidden; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.sh-grip { flex: none; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: var(--rule-2); }
.sh-head { flex: none; display: flex; align-items: flex-start; gap: 12px; }
.sh-head .label { display: block; margin-bottom: 6px; }
.sh-head h2 { margin: 0; font: 800 28px/1 var(--f-stencil); letter-spacing: .03em; text-transform: uppercase; }
.sh-x { flex: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--rule-2); border-radius: 50%; background: none; color: var(--ink-2);
  cursor: pointer; font: 400 20px/1 var(--f-mono); }
.seg { flex: none; display: flex; gap: 4px; margin: 14px 0 12px; padding: 3px; background: var(--void); border: 1px solid var(--rule); border-radius: 6px; }
.seg button { flex: 1; min-height: 34px; background: none; border: 0; border-radius: 4px; color: var(--steel); cursor: pointer;
  font: 600 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; }
.seg button.on { background: var(--plate-3); color: var(--ink); box-shadow: inset 0 -2px 0 var(--live); }
.sh-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.sh-body .grid { --rows: 4; }
.sh-text { font: 400 14px/1.5 var(--f-body); color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 14; -webkit-box-orient: vertical; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kv div { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; }
.kv span { display: block; font: 600 10.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.kv b { display: block; margin-top: 6px; font: 600 17px/1.1 var(--f-mono); }
.reply { flex: 1; min-height: 120px; width: 100%; padding: 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--plate); color: var(--ink);
  resize: none; font: 400 16px/1.45 var(--f-body); }
@media (min-width: 960px) {
  .sheet { align-items: center; }
  .sh { width: min(720px, 92vw); height: min(640px, 86vh); border-radius: 8px; border-top-width: 3px; }
}

/* ---- comms: the two chats under one switch */
.comms-top { flex: none; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comms-top .seg { margin: 0; flex: 1; max-width: 420px; }
.comms-top .seg button { position: relative; }
.comms-top .seg .dot { position: absolute; top: 8px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.panes { flex: 1; min-height: 0; display: flex; }
.panes .cl-view { display: none; }
.panes .cl-view.on { display: flex; flex: 1; height: auto; min-height: 0; }
.panes .b-head { margin: 4px 0 6px; }
.panes .b-title { font: 800 22px/1 var(--f-stencil); letter-spacing: .05em; }
.b-head { display: flex; align-items: center; gap: 10px; }
.b-word { font: 600 12px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-2); }
.b-switch { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.b-log { max-height: 28vh; overflow: auto; margin: 0 0 8px; padding: 10px; background: var(--plate-2); border: 1px solid var(--rule);
  font: 400 11px/1.5 var(--f-mono); color: var(--ink-2); white-space: pre-wrap; }
.toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 959px) {
  .vh h1 { font-size: 22px; }
  .card.hero .c-big { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .card, .sheet, .sh { animation: none; } }

.grid { grid-auto-flow: row dense; }
.c-vis.grow { position: relative; flex: 1; min-height: 34px; }
.card.hero .c-big { margin-top: 12px; padding-top: 0; }
.card.hero .c-line { -webkit-line-clamp: 1; }
.card.hero .ms-fast { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card:not(.hero) .c-big { font-size: 22px; padding-top: 2px; }
@media (max-width: 959px) {
  .goal { padding: 8px 12px; margin-bottom: 10px; }
  .goal span { font-size: 12.5px; -webkit-line-clamp: 1; }
  .steps { margin-bottom: 10px; }
  .ms-list li { margin: 2px 0; font-size: 12.5px; }
}
/* a one-row card: its title and its number, nothing else */
.card.one { padding: 10px 14px; justify-content: center; }
.card.one .c-big { margin-top: 4px; }
.card.one .c-line, .card.one .c-vis { display: none; }
.card.one .c-open { top: 50%; bottom: auto; transform: translateY(-50%); }
.c-vis { align-self: stretch; width: 100%; }
.card > * { flex-shrink: 0; }
.card > .c-vis.grow { flex-shrink: 1; }
.switches { margin-top: 8px; }
.switches .btn { min-height: 40px; padding: 0 10px; white-space: nowrap; font-size: 12px; letter-spacing: .12em; }
.card.sw { justify-content: space-between; }
.card.hero.dec .c-big { font: 600 20px/1.25 var(--f-body); margin-top: 8px; }
@media (min-width: 960px) { .card.hero.dec .c-big { font-size: 26px; } }
.card.sw.one { flex-direction: row; align-items: center; gap: 12px; }
.card.sw.one .c-top { flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 4px; }
.card.sw.one .switches { flex: 1; margin-top: 0; }
.switches .btn { padding: 0 8px; letter-spacing: .08em; }
.switches .btn small { margin-left: 6px; padding: 2px 3px; letter-spacing: .08em; }
.panes, .panes .cl-view.on, .panes .cl { min-width: 0; }
.panes .cl-view.on { flex-direction: column; }
.panes .b-title { display: none; }   /* the switch above already says who */
.panes .b-head { gap: 8px; }
.sh-body input.reply { flex: none; min-height: 48px; resize: none; color-scheme: dark; }

/* ---- sign in (login.html) */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 380px; padding: 22px; }
.login-card h1 { margin: 6px 0 4px; font: 800 34px/1 var(--f-stencil); letter-spacing: .03em; text-transform: uppercase; }
.login-card p { color: var(--ink-2); }
.login-card label { display: block; margin: 14px 0 6px; }
.login-card input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 2px; background: var(--plate); color: var(--ink); font: 500 16px/1 var(--f-mono); }
.login-card .btn { width: 100%; margin-top: 14px; }
#login-feedback { min-height: 1.4em; font: 500 13px/1.4 var(--f-mono); color: var(--ink-2); }

/* ---- since 11-06 the screens scroll (the CEO dropped the no-scroll rule): cards size to their content */
main { overflow-y: auto; overscroll-behavior: contain; }
.view.on { height: auto; min-height: 100%; }
#v-crew.on { height: 100%; }
.grid { flex: none; grid-template-rows: none; grid-auto-rows: minmax(76px, auto); align-content: start; }
.chips { overflow: visible; }
.sh-body { overflow-y: auto; }
.sh-text { display: block; overflow: visible; -webkit-line-clamp: unset; }
/* the standing orders: one card, a row each */
.ord-list { display: grid; gap: 2px; margin-top: 8px; }
.ord-list.two { grid-template-columns: 1fr 1fr; column-gap: 16px; }
.ord-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 4px; background: none; border: 0;
  border-top: 1px solid var(--rule); color: var(--ink); cursor: pointer; text-align: left; font: 500 14px/1.3 var(--f-body); }
.ord-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-row i { font-style: normal; color: var(--steel); font: 500 14px/1 var(--f-mono); }
.ord-row b { flex: none; width: 2ch; font: 500 11px/1 var(--f-mono); color: var(--steel); }
.ord-row:hover span { color: #fff; }
/* with scrolling, text wraps instead of being cut */
.ms-list li { white-space: normal; overflow: visible; }
.card.hero .c-line { -webkit-line-clamp: 3; }
.dec-rows div span:last-child { display: block; overflow: visible; -webkit-line-clamp: unset; }
.card .c-big { margin-top: 6px; }
.card.hero .ms-fast { -webkit-line-clamp: unset; display: block; }
.c-vis.grow { min-height: 96px; }

/* ---- shifts (Fleet): a 24 h bar per pilot, Mountain time */
.sh-list { display: grid; gap: 2px; margin-top: 8px; }
.sh-row { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 22ch; align-items: center; gap: 12px; min-height: 40px; padding: 0 4px;
  background: none; border: 0; border-top: 1px solid var(--rule); color: var(--ink); cursor: pointer; text-align: left; }
.sh-name { font: 500 14px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-when { font: 500 12.5px/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.sh-when.dim { color: var(--steel); }
.sh-day { position: relative; height: 10px; background: var(--plate-3); border-radius: 5px; overflow: hidden; }
.sh-day i { position: absolute; top: 0; bottom: 0; }
.sh-day i.on { background: var(--live); opacity: .85; }
.sh-day i.off { background: var(--steel); opacity: .5; }
.sh-day i.bo { background: repeating-linear-gradient(-45deg, rgba(208, 40, 58, .55) 0 3px, transparent 3px 6px); z-index: 1; }
.sh-day b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); z-index: 2; box-shadow: 0 0 6px rgba(255, 255, 255, .5); }
.sh-ticks { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 22ch; gap: 12px; padding: 4px 4px 0; }
.sh-scale { display: flex; justify-content: space-between; font: 500 10px/1 var(--f-mono); color: var(--steel); }
.sh-scale span:first-child { margin-left: -2px; } .sh-scale span:last-child { margin-right: -2px; }
.sh-times label { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; }
.sh-times label span { font: 600 10.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.sh-times input.reply { min-height: 44px; }
@media (max-width: 639px) {
  .sh-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name when" "bar bar"; row-gap: 6px; padding: 8px 4px; }
  .sh-name { grid-area: name; } .sh-when { grid-area: when; } .sh-day { grid-area: bar; }
  .sh-ticks { grid-template-columns: 1fr; } .sh-ticks > span { display: none; }
}
.sh-body .btn { flex: none; min-height: 48px; }
.sh-when { text-align: right; }

/* ---- thin lines (11-09): a card of lines, each one row that opens in place. Fleet's pilots and duties, Status's days. */
.card.lines { cursor: default; padding-bottom: 6px; }
.card.lines:active { background: var(--plate-2); }
.card.bare { padding: 2px 14px; }
.card.bare .c-top { display: none; }
.lns { display: grid; margin-top: 6px; }
.card.bare .lns { margin-top: 0; }
.ln { border-top: 1px solid var(--rule); }
.ln:first-child { border-top: 0; }
.ln-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 6px 2px; background: none; border: 0; color: inherit; text-align: left; font: inherit; }
button.ln-row { cursor: pointer; }
button.ln-row:hover .ln-name { color: #fff; }
.ln-name { min-width: 0; font: 500 14px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-col { min-width: 0; font: 500 12px/1.2 var(--f-mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-col.sub { color: var(--steel); }
.ln-right { font: 500 13px/1.2 var(--f-mono); color: var(--ink); white-space: nowrap; text-align: right; }
.ln-right:empty { display: none; }
.ln-right.approx, .td-cell.approx b { color: #c9b27a; }
.ln-right.money { color: var(--money); }
.ln-right.neg { color: var(--danger); }   /* a loss: the Products card (order 75) */
.ln.verdict > .ln-row .ln-name { color: var(--danger); }   /* the 05:00 screen drops it or steps it down */
.ln-chev { color: var(--steel); font: 500 15px/1 var(--f-mono); transition: transform .2s; }
.ln.open > .ln-row .ln-chev { transform: rotate(90deg); color: var(--live); }
.ln.open > .ln-row .ln-name { color: #fff; }
.ln-more { display: none; padding: 2px 2px 12px; }
.ln.open > .ln-more { display: grid; gap: 8px; }
.ln.unfolding > .ln-more { animation: unfold .22s ease-out; }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }
.ln.dim > .ln-row { opacity: .5; }
.ln.sub-ln { border-top: 0; }
.ln.sub-ln .ln-row { min-height: 34px; padding: 3px 21px 3px 6px; }   /* its figure under its duty's: the chevron's room */
.ln.sub-ln .ln-name { font-size: 13px; color: var(--ink-2); }
.ln.fold .ln-name { font: 600 12px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.ln-note { font: 400 12px/1.4 var(--f-mono); color: var(--steel); }
.ln.alert > .ln-row .ln-name, .ln-note.alert { color: #e4707c; }   /* a pilot whose hand-overs keep failing */
.ln-more .kv b { font-size: 14px; }
.ln-more .kv div { padding: 8px 10px; }
.ln-more .sh-list { margin-top: 0; }

/* the pilots' lines: portrait, name, ISK an hour, what it does, where */
.pilots .ln-row { grid-template-columns: 28px minmax(0, 1fr) 52px 120px minmax(0, 150px) 10px; gap: 10px; }
.pilots .ln-col.rate { text-align: right; color: #c9b27a; }
.pilots .ln-col.where { color: var(--ink-2); }
.pt { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 3px; overflow: hidden; flex: none;
  background: var(--plate-3); border: 1px solid var(--rule-2); font: 700 12px/1 var(--f-label); color: var(--steel); }
.pt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt.sm { width: 20px; height: 20px; border-radius: 2px; font-size: 10px; }
.ln.sub-ln .ln-row { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; }
/* Alpha or Omega after the name (order 46): Ω solid, its end date on a desk; α quiet (dashed); red under a week left */
.ln-name.tagged { display: flex; align-items: center; gap: 6px; }
.ln-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* a line with a second row under its name (a pilot's ship): from the name to the right edge; the lead spans both rows */
.ln-row.subbed { row-gap: 3px; }
.ln-row.subbed > :first-child { grid-row: span 2; }
.ln-sub { grid-row: 2; grid-column: 2 / -1; min-width: 0; font: 500 11px/1.2 var(--f-mono); color: var(--steel);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; border: 1px solid var(--rule-2); border-radius: 2px;
  font: 500 10px/1 var(--f-mono); color: var(--steel); }
.cg b { font-weight: 600; }
.cg.omega { border-color: var(--steel); color: var(--ink-2); }
.cg.omega b { color: var(--ink); }
.cg.alpha { border-style: dashed; }
.cg.ending, .cg.ending b { border-color: var(--danger); color: #e4707c; }
.pt-lead { position: relative; display: inline-grid; }
.cg.corner { display: none; position: absolute; right: -3px; bottom: -4px; padding: 1px 2px; background: var(--plate-2); font-size: 9px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.act span { overflow: hidden; text-overflow: ellipsis; }
.act i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--steel); }
.act.find i { background: var(--ok); box-shadow: 0 0 6px rgba(107, 150, 88, .7); }
.act.work i { background: var(--live); box-shadow: 0 0 7px var(--glow); animation: blink 1.6s ease-in-out infinite; }
.act.work { color: var(--ink); }
.act.deal i { background: var(--money); }
.act.move i { background: var(--ink-2); }
.act.warn i { background: var(--money); } .act.warn { color: var(--money); }
.act.danger i { background: var(--danger); box-shadow: 0 0 7px rgba(208, 40, 58, .7); } .act.danger { color: #e4707c; }
.act.off i { background: var(--rule-2); }
@media (max-width: 639px) {
  .pilots .ln-row { grid-template-columns: 24px minmax(0, 1fr) 32px 84px minmax(0, 58px) 6px; gap: 5px; }
  .pilots .ln-name { font-size: 13.5px; }
  .pilots .ln-col { font-size: 11.5px; }
  .pilots .act { gap: 5px; }
  .pilots .pt { width: 24px; height: 24px; }
  .pilots .ln-name .cg { display: none; }   /* the phone: Ω or α on the portrait's corner; the date is in the open line */
  .pilots .cg.corner { display: inline-flex; }
}

/* today's money: three numbers side by side */
.td { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.td-cell span { display: block; font: 600 10.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.td-cell b { display: block; margin-top: 6px; font: 600 21px/1.05 var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-cell.money b { color: var(--money); }
.card.today .c-line { font-size: 11.5px; color: var(--steel); }

/* a pilot's errand queue */
.eq { display: grid; gap: 4px; margin-top: 2px; }
.eq .label { margin: 2px 0 2px; }
.eq-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-left: 3px solid var(--rule-2); border-radius: 3px; }
.eq-row.running { border-left-color: var(--live); }
.eq-row.parked { border-left-color: var(--danger); }
.eq-what { flex: 1; min-width: 0; display: grid; gap: 2px; }
.eq-what b { font: 500 13.5px/1.2 var(--f-body); }
.eq-what span { font: 400 11.5px/1.3 var(--f-mono); color: var(--steel); }
.eq-what .eq-why { color: #e4707c; }
.eq-row .btn.small { min-height: 32px; padding: 0 10px; font-size: 11px; }

/* ---- The money ledger (the Trade Floor's ticker and its sheet of every line): a thin bar of in, out and net, then the lines, newest on top. */
.ac-bar { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; border: 1px solid var(--rule);
  border-radius: 4px; background: var(--plate-2); }
.ac-cell { padding: 8px 12px; border-left: 1px solid var(--rule); }
.ac-cell:first-child { border-left: 0; }
.ac-cell span { display: block; font: 600 10px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--steel); }
.ac-cell b { display: block; margin-top: 5px; font: 600 16px/1 var(--f-mono); }
.ac-cell.in b { color: var(--money); } .ac-cell.out b, .ac-cell.neg b { color: var(--ink-2); } .ac-cell.approx b { color: #c9b27a; }
.ledger { display: grid; align-content: start; border: 1px solid var(--rule); border-radius: 4px; background: var(--plate-2); overflow: hidden; }
.lg-row { display: grid; grid-template-columns: 5ch 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px;
  border-top: 1px solid var(--rule); }
.lg-row:first-child { border-top: 0; }
.lg-time { font: 500 11px/1 var(--f-mono); color: var(--steel); }
.ic { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 3px; overflow: hidden; background: var(--plate-3);
  border: 1px solid var(--rule); font: 700 8.5px/1 var(--f-label); letter-spacing: .06em; color: var(--steel); }
.ic img { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--plate-3); }
.lg-text { min-width: 0; display: grid; gap: 2px; font: 400 13px/1.3 var(--f-body); }
.lg-text b { font: 600 10.5px/1.1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.lg-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-text small { font: 400 11px/1.3 var(--f-mono); color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-isk { font: 600 13.5px/1 var(--f-mono); white-space: nowrap; text-align: right; }
.lg-isk.in { color: var(--money); } .lg-isk.out { color: var(--ink-2); } .lg-isk.approx { color: #c9b27a; font-weight: 500; }
.lg-isk.moved { color: var(--ink-2); } .lg-isk.none { color: var(--steel); font: 500 10.5px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.lg-row.k-sale { box-shadow: inset 3px 0 0 var(--money-dim); }
.lg-row.k-loot, .lg-row.k-contract { box-shadow: inset 3px 0 0 rgba(201, 178, 122, .28); }
.lg-row.k-fee, .lg-row.k-spend { box-shadow: inset 3px 0 0 var(--rule-2); }
.lg-row.new { overflow: hidden; animation: ledger-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.lg-row.new.k-sale .lg-isk, .lg-row.new.k-loot .lg-isk { animation: ledger-glow 1.6s ease-out .2s both; }
@keyframes ledger-in { from { opacity: 0; transform: translateY(-10px); max-height: 0; } to { max-height: 80px; } }
@keyframes ledger-glow { from { text-shadow: 0 0 14px currentColor; } to { text-shadow: none; } }
.lg-empty { padding: 28px 16px; text-align: center; font: 400 13px/1.5 var(--f-mono); color: var(--steel); }
@media (max-width: 639px) {
  .lg-row { grid-template-columns: 4.6ch 26px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .ic { width: 26px; height: 26px; }
}

/* ---- Status: the current milestone as one line, and the captain's brief */
#r-now { flex: none; margin-bottom: 8px; }
.ms-now { position: relative; display: grid; gap: 8px; width: 100%; padding: 12px 34px 12px 14px; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, var(--plate-3), var(--plate-2)); border: 1px solid rgba(240, 96, 15, .45); border-radius: 4px;
  box-shadow: inset 3px 0 0 var(--live); color: inherit; }
.ms-now .c-open { top: 50%; bottom: auto; transform: translateY(-50%); }
.ms-now-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ms-now-top .label { color: var(--live); flex: none; }
.ms-now-top b { flex: 1; min-width: 0; font: 600 15px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-now .v-bar i { background: var(--live); box-shadow: 0 0 10px var(--glow); }
.ms-now-meta { font: 500 11.5px/1.2 var(--f-mono); color: var(--ink-2); }
.card.brief { cursor: default; padding: 14px 16px 12px; }
.card.brief:active { background: var(--plate-2); }
.card.brief .c-title { color: var(--ink); font-size: 13px; }
.bf { display: grid; margin-top: 8px; }
.bf-row { display: grid; grid-template-columns: 5ch minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px dashed var(--rule); }
.bf-row:first-child { border-top: 0; }
.bf-time { font: 500 12px/1.5 var(--f-mono); color: var(--ink-2); }
.bf-text { font: 400 14.5px/1.5 var(--f-body); color: var(--ink); }
.bf-text code { font: 400 12.5px/1 var(--f-mono); color: var(--ink-2); }
.bf-md { font: 400 14px/1.5 var(--f-body); }
.bf-ln .bf-time { width: 5ch; }   /* a titled bullet (the CEO, 11-16): the time, the title; the text folds under */
.bf-ln > .ln-more { padding-left: calc(5ch + 12px); }
.bf-empty { margin-top: 10px; font: 400 13px/1.5 var(--f-mono); color: var(--steel); }
.ln-more .bf { margin-top: 0; }
.cchip.wait { justify-self: start; border-color: rgba(240, 96, 15, .55); }
@media (prefers-reduced-motion: reduce) { .lg-row.new, .lg-row.new .lg-isk, .ln.unfolding > .ln-more, .act.work i { animation: none; } }
/* the reading screens keep a reading width on a desk: lines that run the whole screen are hard to follow */
.card.bare { align-self: start; }
.ms-now-num { font: 600 20px/1.1 var(--f-mono); }
.ms-now-num small { margin-left: 8px; font: 500 12px/1 var(--f-mono); color: var(--ink-2); }
.ln.fold .ln-col { white-space: normal; line-height: 1.35; }
/* the engineer's open work order, beside its name */
.b-order { font: 600 11px/1 var(--f-mono); letter-spacing: .04em; color: var(--steel); white-space: nowrap; }
.b-order.on { color: var(--live); }
.b-order.hot { color: #e4707c; }

/* ---- Comms > Tasks (order 148): the crew's scheduled prompts as thin lines, a sheet each */
.panes .tk-view.on { display: flex; flex-direction: column; }
.tk-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }
.tk-scroll > .card { flex: none; }   /* sized to its lines: a card's min-height 0 let the pane squeeze them */
.tk-card .c-top { margin-bottom: 2px; }
.lamp.tk-on { background: var(--ink-2); }
.tk-ln .ln-row { grid-template-columns: 10px 8em minmax(0, 17em) minmax(0, 1fr) 10ch 10px; }
.tk-ln.tk-rule .ln-row { grid-template-columns: 8em minmax(0, 1fr) 6ch; }
.tk-ln .ln-name { font-family: var(--f-mono); font-size: 13px; }
.tk-rule .tk-first { white-space: normal; }
.tk-ln .ln-right { color: var(--ink-2); font-size: 12px; }
.tk-ln.dim-ln > .ln-row { opacity: .7; }
.tk-seg { margin: 0; flex: none; }
.tk-seg button { font-size: 12px; }
.tk-field { display: grid; gap: 6px; }
.tk-field > span, .sh-body > .label { font: 600 10.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.sh-body > .label { margin-top: 6px; }
.tk-field input.reply { flex: none; min-height: 44px; resize: none; color-scheme: dark; }
.tk-when { display: grid; gap: 8px; }
.tk-prompt { flex: none; min-height: 160px; font: 400 14px/1.45 var(--f-mono); }
.tk-hint { font: 400 12px/1.4 var(--f-mono); color: var(--steel); }
.tk-about { padding: 10px 12px; border-left: 3px solid var(--money); background: var(--plate-2); font: 400 13.5px/1.45 var(--f-body); color: var(--ink); }
.tk-acts { display: flex; gap: 8px; align-items: stretch; margin-top: 4px; }
.tk-acts .btn.small { min-height: 48px; }
@media (max-width: 639px) {
  .tk-ln .ln-row { grid-template-columns: 10px minmax(0, 1fr) auto 10px; grid-template-areas: "lamp name right chev" ". when when ." ". first first ."; row-gap: 3px; }
  .tk-ln .ln-row > .lamp { grid-area: lamp; } .tk-ln .ln-name { grid-area: name; } .tk-ln .ln-right { grid-area: right; }
  .tk-ln .ln-chev { grid-area: chev; } .tk-ln .tk-when-col { grid-area: when; } .tk-ln .tk-first { grid-area: first; }
  .tk-ln.tk-rule .ln-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name right" "first first"; }
  .comms-top .seg button { padding: 0 4px; font-size: 12px; }
}

/* ---- Order 161: the Board's headline row, the Books, the Trade Floor's pipelines, the Operations' division cards */
.c-line b.neg, .hl-rows b.neg, .is-n.neg { color: var(--danger); }
.c-line b.money, .hl-rows b.money, .is-n.money { color: var(--money); }
.hl-rows { display: grid; gap: 4px; margin-top: 8px; align-self: stretch; }
.hl-rows div { display: flex; justify-content: space-between; gap: 10px; font: 500 13px/1.2 var(--f-mono); }
.hl-rows span { font: 600 11px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.dec-rows .def { color: var(--live); }   /* a proposal: what happens if the CEO says nothing, and when */

/* the income statement and the balance sheet: a name and three windows' numbers, each division a fold */
.is { display: grid; margin-top: 4px; }
.is-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 8.2ch) 14px; align-items: center; gap: 8px; width: 100%;
  padding: 6px 0; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; }
.bs .is-row { grid-template-columns: minmax(0, 1fr) auto; }
.is-row.is-cols { border-top: 0; padding-top: 0; }
.is-row.is-cols .is-n { font: 600 10.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.is-name { min-width: 0; display: grid; gap: 2px; font: 400 13px/1.25 var(--f-body); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.is-name b { font: 600 14px/1.2 var(--f-body); color: var(--ink); }
.is-risk { font: 500 11.5px/1.2 var(--f-mono); color: #e4707c; }
.is-n { font: 500 12.5px/1.2 var(--f-mono); text-align: right; white-space: nowrap; }
.is-n.wide { min-width: 9ch; }
.is-n.approx { color: #c9b27a; }
.is-head { cursor: pointer; }
.is-head .ln-chev { justify-self: end; }
.is-div.open > .is-head .ln-chev { transform: rotate(90deg); }
.is-lines { display: none; padding-left: 10px; }
.is-div.open > .is-lines { display: block; }
.is-lines .is-name { font-size: 12.5px; }
.is-row.memo .is-name { font-style: italic; color: var(--steel); }
.is-total { border-top: 1px solid var(--rule-2); }
.is-total .is-name { font: 700 13px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.is-total .is-n { font-weight: 600; font-size: 13.5px; }
.is-note { margin: 8px 0 4px; font: 400 11.5px/1.4 var(--f-mono); color: var(--steel); }
@media (max-width: 639px) {
  .is-row { grid-template-columns: minmax(0, 1fr) repeat(3, 7.4ch) 10px; gap: 4px; }
  .is-n { font-size: 11.5px; }
}

/* the Trade Floor: today's four numbers, the top sellers, the pipelines' stages as bars */
.td.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.td-cell.neg b { color: var(--danger); }
.tf-label { display: block; margin: 12px 0 4px; }
.tf-top { display: grid; gap: 2px; }
.tf-seller { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 32px; }
.tf-seller span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/1.2 var(--f-body); }
.tf-seller small { font: 500 11px/1 var(--f-mono); color: var(--steel); }
.tf-seller b { font: 600 13px/1 var(--f-mono); color: var(--money); }
.pipe-line { margin-top: 10px; }
.pipe-title { display: block; margin-bottom: 8px; font-size: 13px; color: var(--ink); }
.pipe { display: grid; gap: 8px; }
@media (min-width: 640px) { .pipe { grid-template-columns: repeat(var(--stages), minmax(0, 1fr)); gap: 14px; } }
.pipe-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name isk" "bar bar" "basis basis"; gap: 3px 10px; }
.pipe-name { grid-area: name; font: 600 11px/1.2 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pipe-stage b { grid-area: isk; font: 600 14px/1.1 var(--f-mono); }
.pipe-stage b.approx { color: #c9b27a; } .pipe-stage b.money { color: var(--money); }
.pipe-stage small { grid-area: basis; font: 400 10.5px/1.2 var(--f-mono); color: var(--steel); }
.pipe-bar { grid-area: bar; height: 6px; background: var(--plate-3); border-radius: 1px; overflow: hidden; }
.pipe-bar i { display: block; height: 100%; background: var(--steel); }
.pipe-stage.sold .pipe-bar i { background: var(--money); }
.tf-ticker { margin-top: 6px; }
.card .ledger { border-radius: 2px; }
@media (max-width: 639px) { .td.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Operations: a division card carries its lines under its numbers */
.card.div .lns { margin-top: 8px; }
.card.div .ln-note.alert, .card.today .ln-note.alert { margin-top: 6px; }
