/* Layout: grouped-list app shell (iOS Settings idiom) with a sheet-tab strip per shipment; documents are white letter-size paper styled after Kitiruco's Excel forms. */
:root {
  --bg: #f2f2f6;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --line: #e3e1dc;
  --line-2: #d2cfc8;
  --fg: #1c1b19;
  --fg-2: #5f5b54;
  --fg-3: #8f8a82;
  --tint: #8a5a2b;
  --tint-soft: #f3e9de;
  --on-tint: #ffffff;
  --ok: #2f8a4c;
  --ok-soft: #e3f2e7;
  --warn: #b26a00;
  --warn-soft: #fbefd9;
  --bad: #c2372f;
  --bad-soft: #f9e1df;
  --req: #fff8db;
  --auto: #fbebe0;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.06), 0 6px 24px rgba(40, 30, 20, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --doc: Arial, "Liberation Sans", Helvetica, sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312;
    --surface: #1f1d1b;
    --surface-2: #262421;
    --line: #34312d;
    --line-2: #45413b;
    --fg: #f1eee9;
    --fg-2: #b7b1a8;
    --fg-3: #857f76;
    --tint: #d9a26b;
    --tint-soft: #3a2c1f;
    --on-tint: #1a130c;
    --ok: #5cc47c;
    --ok-soft: #1d3324;
    --warn: #e6a54a;
    --warn-soft: #3a2c14;
    --bad: #ff6b61;
    --bad-soft: #3d1d1a;
    --req: #3a3420;
    --auto: #3a2b22;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141312;
  --surface: #1f1d1b;
  --surface-2: #262421;
  --line: #34312d;
  --line-2: #45413b;
  --fg: #f1eee9;
  --fg-2: #b7b1a8;
  --fg-3: #857f76;
  --tint: #d9a26b;
  --tint-soft: #3a2c1f;
  --on-tint: #1a130c;
  --ok: #5cc47c;
  --ok-soft: #1d3324;
  --warn: #e6a54a;
  --warn-soft: #3a2c14;
  --bad: #ff6b61;
  --bad-soft: #3d1d1a;
  --req: #3a3420;
  --auto: #3a2b22;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 2px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--fg-2);
}
.faint {
  color: var(--fg-3);
}

/* top bar */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand img {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px;
  border-radius: 10px;
  margin-left: auto;
}
.nav a {
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.sync {
  font-size: 12px;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-3);
  display: inline-block;
}
.sync[data-s="live"] i {
  background: var(--ok);
}
.sync[data-s="saving"] i {
  background: var(--warn);
}
.sync[data-s="off"] i {
  background: var(--bad);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding-block: 20px 60px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  margin: 22px 4px 8px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}

.btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 9px;
  font-weight: 550;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.btn:hover {
  background: var(--surface-2);
}
.btn.primary {
  background: var(--tint);
  border-color: var(--tint);
  color: var(--on-tint);
}
.btn.primary:hover {
  filter: brightness(1.06);
}
.btn.danger {
  color: var(--bad);
}
.btn.sm {
  padding: 4px 10px;
  font-size: 13px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--tint);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.search {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
}

/* grouped list */
.group {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ship {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.ship:first-child {
  border-top: 0;
}
.ship:hover {
  background: var(--surface-2);
}
.ship .id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-2);
}
.ship .t {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ship .meta {
  font-size: 13px;
  color: var(--fg-2);
  min-width: 0;
}
.ship .money {
  text-align: right;
  font-size: 14px;
}
@media (max-width: 760px) {
  .ship {
    grid-template-columns: 1fr auto;
  }
  .ship .hide-sm {
    display: none;
  }
}
.child {
  padding-left: 34px;
  background: var(--surface-2);
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-2);
}
.empty b {
  display: block;
  color: var(--fg);
  font-size: 17px;
  margin-bottom: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--fg-2);
  white-space: nowrap;
}
.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.pill.tint {
  background: var(--tint-soft);
  color: var(--tint);
}

/* shipment header */
.crumbs {
  font-size: 14px;
  margin-bottom: 6px;
}
.crumbs a {
  color: var(--tint);
  text-decoration: none;
}
.shead {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.shead .idbig {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-2);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.kpi {
  background: var(--surface);
  padding: 12px 14px;
  min-width: 0;
}
.kpi small {
  display: block;
  font-size: 12px;
  color: var(--fg-2);
  font-weight: 500;
}
.kpi b {
  font-size: 20px;
  letter-spacing: -0.01em;
  display: block;
  margin-top: 2px;
}
.kpi span {
  font-size: 12px;
}
@media (max-width: 700px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.steps {
  display: flex;
  gap: 0;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.step {
  flex: 1;
  min-width: 80px;
  position: relative;
  padding-top: 18px;
  font-size: 12px;
  color: var(--fg-3);
  text-align: center;
}
.step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-2);
}
.step:first-child::before {
  left: 50%;
}
.step:last-child::before {
  right: 50%;
}
.step i {
  position: absolute;
  top: 1px;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-2);
}
.step.done {
  color: var(--fg-2);
}
.step.done::before {
  background: var(--tint);
}
.step.done i {
  background: var(--tint);
  border-color: var(--tint);
}
.step.now {
  color: var(--fg);
  font-weight: 600;
}
.step.now i {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px var(--tint-soft);
}

/* sheet tabs: colors follow the workbook's tab colors */
.tabs {
  display: flex;
  gap: 4px;
  margin: 22px 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.tab {
  appearance: none;
  border: 0;
  background: none;
  padding: 9px 12px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  display: flex;
  gap: 7px;
  align-items: center;
}
.tab i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c, var(--fg-3));
}
.tab[aria-selected="true"] {
  color: var(--fg);
  border-bottom-color: var(--c, var(--tint));
}
.tab:hover {
  color: var(--fg);
}

/* form sections: mirrors the workbook's ▶ banded sections */
.sec {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.sec > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}
.sec > header::before {
  content: "▶";
  font-size: 10px;
  color: var(--tint);
}
.sec > header .spacer {
  flex: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.f {
  display: grid;
  grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.grid .f:nth-child(-n + 2) {
  border-top: 0;
}
@media (max-width: 720px) {
  .grid .f:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}
.f label {
  font-size: 13px;
  color: var(--fg-2);
  min-width: 0;
}
.f label em {
  font-style: normal;
  color: var(--bad);
  margin-left: 2px;
}
.f input,
.f select,
.f textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 14px;
}
.f input:hover,
.f select:hover,
.f textarea:hover {
  border-color: var(--line);
}
.f input:focus,
.f select:focus,
.f textarea:focus {
  border-color: var(--tint);
  background: var(--surface);
  outline: none;
}
.f.req input:placeholder-shown,
.f.req select.blank {
  background: var(--req);
}
.f .auto {
  padding: 6px 8px;
  background: var(--auto);
  border-radius: 7px;
  font-size: 14px;
  min-height: 31px;
}
.f .hint {
  grid-column: 2;
  font-size: 12px;
  color: var(--fg-3);
  margin-top: -4px;
}
.f.wide {
  grid-column: 1/-1;
}
.f textarea {
  resize: vertical;
  min-height: 60px;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--fg-2);
  flex-wrap: wrap;
  margin: -4px 2px 12px;
}
.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.legend i {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid var(--line-2);
}

/* tables */
.tw {
  overflow-x: auto;
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.t th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-2);
  font-size: 12px;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface-2);
}
.t td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.t td.r,
.t th.r {
  text-align: right;
}
.t input,
.t select,
.t textarea {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 13px;
}
.t input:hover,
.t textarea:hover,
.t select:hover {
  border-color: var(--line);
}
.t input:focus,
.t textarea:focus {
  border-color: var(--tint);
  outline: none;
  background: var(--surface);
}
.t input.r {
  text-align: right;
}
.t tfoot td {
  font-weight: 650;
  padding: 8px;
  background: var(--surface-2);
}
.t textarea {
  min-height: 52px;
  resize: vertical;
}

/* checks */
.check {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  align-items: flex-start;
}
.check:first-child {
  border-top: 0;
}
.check .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}
.check.ok .dot {
  background: var(--ok-soft);
  color: var(--ok);
}
.check.warn .dot {
  background: var(--warn-soft);
  color: var(--warn);
}
.check.bad .dot {
  background: var(--bad-soft);
  color: var(--bad);
}
.check small {
  display: block;
  color: var(--fg-2);
  font-size: 12.5px;
}
.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 860px) {
  .two {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* document preview */
.docbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.stage {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 12px;
  overflow: hidden;
}
.paperwrap {
  margin: 0 auto;
  transform-origin: top left;
}
.paper {
  --pt: 36px;
  --pl: 40px;
  width: 816px;
  background: #fff;
  color: #1b1b1b;
  font: 12px/1.35 var(--doc);
  padding: var(--pt) var(--pl);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  position: relative;
}
.paper * {
  box-sizing: border-box;
}
.paper .band {
  background: #5e4b3c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 10px;
  margin: 14px 0 8px;
  letter-spacing: 0.02em;
}
.paper .band::before {
  content: "▶  ";
}
.paper .band.light {
  background: #efe9df;
  color: #3c2f24;
}
.paper table {
  width: 100%;
  border-collapse: collapse;
}
.paper .kv td {
  padding: 2px 4px;
  vertical-align: top;
}
.paper .kv td.k {
  font-weight: 700;
  color: #5e4b3c;
  white-space: nowrap;
  width: 1%;
}
.paper .lines th {
  background: #fbe7dc;
  color: #3c2f24;
  font-weight: 700;
  text-align: left;
  padding: 5px 6px;
  font-size: 11.5px;
  border-bottom: 1px solid #d9c8b8;
}
.paper .lines td {
  padding: 5px 6px;
  border-bottom: 1px solid #e8e1d8;
  vertical-align: top;
}
.paper .r {
  text-align: right;
}
.paper .c {
  text-align: center;
}
.paper .tot td {
  padding: 3px 6px;
}
.paper .tot .k {
  text-align: right;
  font-weight: 700;
}
.paper .grand td {
  border: 1.5px solid #222;
  font-size: 15px;
  font-weight: 700;
}
.paper .small {
  font-size: 10.5px;
  line-height: 1.4;
}
.paper .sig {
  border-top: 1px solid #333;
  padding-top: 3px;
  font-size: 11px;
  color: #444;
}
.paper .hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.paper .brown {
  background: #5e4b3c;
  color: #fff;
}
.paper .note {
  font-style: italic;
  color: #555;
}
.paper .draftmark {
  position: absolute;
  top: 44px;
  right: 46px;
  border: 3px double #9b2a24;
  color: #9b2a24;
  font-weight: 700;
  font-size: 20px;
  padding: 2px 12px;
  letter-spacing: 0.15em;
  transform: rotate(-6deg);
  opacity: 0.75;
}

/* sheet / modal */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.32);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}
.sheet {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: min(560px, 100%);
  max-height: calc(100% - 32px);
  overflow: auto;
}
.sheet header {
  padding: 16px 18px 6px;
  font-weight: 650;
  font-size: 17px;
}
.sheet .body {
  padding: 4px 2px;
}
.sheet footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px 16px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 14px;
  z-index: 40;
  box-shadow: var(--shadow);
}

/* HS finder */
.hsres {
  max-height: 280px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.hsres button {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
}
.hsres button:hover {
  background: var(--tint-soft);
}
.hsres code {
  font-family: var(--mono);
  color: var(--tint);
}
.banner {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.paper .bleed {
  margin: calc(-1 * var(--pt)) calc(-1 * var(--pl)) 0;
}
.paper {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.paper tr,
.paper p,
.paper .kv,
.paper .sig,
.paper .grand {
  break-inside: avoid;
}
.paper .band {
  break-after: avoid;
}
.acct {
  position: relative;
}
.acct > button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 99px;
  padding: 4px 12px 4px 4px;
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.acct > button b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--on-tint);
  display: grid;
  place-items: center;
  font-size: 12px;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 210px;
  padding: 6px;
  z-index: 20;
}
.menu a,
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.menu a:hover,
.menu button:hover {
  background: var(--surface-2);
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}
.menu small {
  display: block;
  padding: 6px 10px;
  color: var(--fg-3);
}
@media (max-width: 640px) {
  .acct > button span,
  .sync span,
  .brand span {
    display: none;
  }
  .bar-in {
    gap: 8px;
  }
  .nav a {
    padding: 5px 9px;
  }
  .acct > button {
    padding: 4px;
  }
}
/* print: the same compact layout is applied on screen (body.printing) just
   before printing, so the app can measure the page and shrink it to fit one sheet */
@media print {
  /* margin 0 leaves the browser no room for its date, title and web address; the page margin comes from main's padding instead */
  @page {
    size: letter;
    margin: 0;
  }
  html,
  body {
    margin: 0;
    background: #fff !important;
  }
  body::before,
  .bar,
  #layer,
  .toast,
  main > :not(#pane),
  #pane > :not(.stage) {
    display: none !important;
  }
  main {
    padding: 0.35in !important;
    max-width: none;
  }
  .stage {
    border: 0;
    padding: 0;
    background: none;
  }
  .paperwrap {
    transform: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
}
body.printing .paper,
body.printing .paper * {
  transition: none;
}
body.printing .paper {
  width: 7.8in;
  --pt: 0px;
  --pl: 0px;
  box-shadow: none;
  padding: 0;
  font-size: 10.5px;
  line-height: 1.3;
}
body.printing .paper .band {
  margin: 9px 0 5px;
  padding: 4px 8px;
  font-size: 12px;
}
body.printing .paper .lines td,
body.printing .paper .lines th {
  padding: 3px 5px;
}
body.printing .paper .kv td {
  padding: 1px 4px;
}
body.printing .paper .small {
  font-size: 9.5px;
  line-height: 1.32;
}
body.printing .paper tr.pad {
  display: none;
}
body.printing .paper .bleed {
  margin: 0 0 6px;
}
body.printing .paper tr,
body.printing .paper p,
body.printing .paper .kv,
body.printing .paper .sig,
body.printing .paper .grand,
body.printing .paper .band {
  break-inside: auto;
  break-after: auto;
}
/* sign-in page */
body.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-block: 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 26px;
  margin: 0;
}
.login-logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 0 14px;
}
.login-card h1 {
  font-size: 24px;
}
.login-card p {
  margin: 6px 0 18px;
}
.login-form {
  display: grid;
  gap: 6px;
}
.login-form label {
  font-size: 13px;
  color: var(--fg-2);
  margin-top: 6px;
}
.login-form input:not([type="checkbox"]) {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
}
.login-form input:focus {
  outline: 2px solid var(--tint);
  outline-offset: 0;
  border-color: var(--tint);
}
.login-form .remember {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--fg);
}
.login-form .btn {
  justify-content: center;
  padding: 11px;
  font-size: 15px;
  margin-top: 12px;
}

[hidden] {
  display: none !important;
}

/* overview */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
  }
}
.home h2 {
  margin-top: 22px;
}
.cont {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.cont:first-child {
  border-top: 0;
}
.cont-main {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.cont-main:hover .t {
  color: var(--tint);
}
.cont-top {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cno {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.cont .t {
  font-weight: 600;
}
.cont .meta {
  font-size: 13px;
  color: var(--fg-2);
}
.cont-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
  font-size: 14px;
}
.ok-t {
  color: var(--ok);
  font-weight: 600;
}
.prog {
  height: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: 6px 0 2px;
  max-width: 320px;
}
.prog i {
  display: block;
  height: 100%;
  background: var(--tint);
  border-radius: 99px;
}
.next {
  font-size: 13.5px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.next span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  font-weight: 600;
}
.next.warn {
  color: var(--warn);
}
.next.bad {
  color: var(--bad);
  font-weight: 600;
}
.next.ok {
  color: var(--ok);
  font-weight: 600;
}
.seg a {
  font-size: 13.5px;
}
@media (max-width: 640px) {
  .bar-in {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .bar-in .nav {
    order: 3;
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
  }
  .bar-in .nav a {
    flex: 1 0 auto;
    text-align: center;
  }
  .bar-in .sync {
    margin-left: auto;
  }
}
/* list editors (settings, costs) */
.items {
  display: grid;
}
.item {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.item:first-child {
  border-top: 0;
}
.item-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.item-head > input {
  flex: 1;
  min-width: 180px;
  font-weight: 600;
}
.item input,
.item select,
.item textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 14px;
  min-width: 0;
}
.item textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  line-height: 1.45;
}
.item textarea.mono {
  font-family: var(--mono);
  font-size: 13px;
}
.radio {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--fg-2);
  white-space: nowrap;
}
.plan {
  display: grid;
  gap: 6px;
}
.plan-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.plan-row input.num {
  width: 64px;
  text-align: right;
}
.bad-t {
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
}
/* clients & files */
.crow {
  appearance: none;
  border: 0;
  background: none;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}
.wide-sheet {
  width: min(720px, 100%);
}
.sh {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  margin: 16px 16px 4px;
  font-weight: 600;
}
.frow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.frow .fname {
  color: var(--tint);
  text-decoration: none;
  font-weight: 550;
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1 1 220px;
}
.frow .faint {
  font-size: 12.5px;
}
.drop {
  border: 2px dashed var(--line-2);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--fg-2);
  margin: 12px 16px;
}
.drop.over {
  border-color: var(--tint);
  background: var(--tint-soft);
  color: var(--tint);
}
/* quote stage */
.quote-t .pk {
  display: none;
}
.quote-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--fg-2);
  background: var(--tint-soft);
  border-radius: 10px;
  padding: 8px 12px;
}
.f input::placeholder,
.f textarea::placeholder {
  color: var(--fg-3);
  font-style: italic;
  opacity: 0.8;
}
/* bill of lading drawn from the workbook grid: 789 × 910 px, zoomed to the page */
.bolwrap {
  display: flex;
  justify-content: center;
}
.bol {
  position: relative;
  zoom: 0.97;
  color: #000;
  line-height: 1.12;
  flex: none;
}
.bol .xc {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 2px;
}
.bol .xc.nw {
  overflow: visible;
}
.bol .xc > span {
  display: block;
}
.bol .xi {
  position: absolute;
  object-fit: fill;
}
.paper:has(.bolwrap) {
  padding: 24px;
}
body.printing .bolwrap {
  justify-content: flex-start;
  padding-top: 0.2in;
}
body.printing .bol {
  zoom: 0.93;
}
body.printing .paper:has(.bolwrap) {
  padding: 0;
}

/* searchable picker */
.combo {
  position: relative;
  min-width: 0;
  width: 100%;
}
.combo input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 26px 6px 9px;
  font-size: 14px;
}
.combo::after {
  content: "⌕";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-3);
  pointer-events: none;
  font-size: 14px;
}
.combo.sm {
  width: 260px;
  max-width: 100%;
}
.combo.sm input {
  padding: 4px 24px 4px 9px;
  font-size: 13px;
}
.combo-pop {
  position: absolute;
  z-index: 35;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  max-height: 340px;
  overflow: auto;
  padding: 4px;
}
.combo-opt {
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 1px;
  font-size: 14px;
  font-weight: 400;
}
.combo-opt b {
  font-weight: 550;
}
.combo-opt small {
  color: var(--fg-3);
  font-size: 12px;
}
.combo-opt.act,
.combo-opt:hover {
  background: var(--tint-soft);
}
.combo-opt.add {
  color: var(--tint);
  font-weight: 550;
  border-top: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
}
.combo-more {
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--fg-3);
}
.sec > header .combo {
  flex: 0 1 260px;
}
/* step bar: each step is a button */
button.step {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--fg-3);
  cursor: pointer;
  padding: 18px 2px 2px;
}
button.step.done {
  color: var(--fg-2);
}
button.step.now {
  color: var(--fg);
  font-weight: 600;
}
button.step:disabled {
  cursor: default;
}
button.step:not(:disabled):hover {
  color: var(--tint);
}
.step small {
  display: block;
  font-size: 10.5px;
  color: var(--fg-3);
  font-weight: 400;
}
/* timeline on the Status tab */
.tl {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.tl li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 16px;
  position: relative;
}
.tl li > i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  flex: none;
  background: var(--surface);
}
.tl li.done > i {
  background: var(--tint);
  border-color: var(--tint);
}
.tl li.now > i {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px var(--tint-soft);
}
.tl li > div {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}
.tl li small {
  display: block;
  color: var(--fg-3);
  font-size: 12px;
}
.tl li:not(.done):not(.now) b {
  color: var(--fg-2);
  font-weight: 500;
}
.next.big {
  font-size: 15.5px;
  font-weight: 600;
}
.notes {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
}
.nextbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 30px;
  flex-wrap: wrap;
}
.tab.locked {
  color: var(--fg-3);
  opacity: 0.7;
}
.here {
  font-size: 13px;
  color: var(--warn);
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.here:empty {
  display: none;
}
.here-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  display: inline-block;
}
.from {
  font-size: 12px;
  color: var(--tint);
  margin-left: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.cellauto {
  padding: 5px 6px;
  color: var(--fg-2);
  font-size: 13px;
}
details.sec > summary {
  padding: 11px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
details.sec > summary::-webkit-details-marker {
  display: none;
}
details.sec > summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--tint);
  transition: transform 0.15s;
}
details.sec[open] > summary::before {
  transform: rotate(90deg);
}
details.sec > summary .faint {
  font-weight: 400;
  font-size: 12.5px;
}
details.sec[open] > summary {
  border-bottom: 1px solid var(--line);
}
.seeall {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--tint);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.seeall:hover {
  background: var(--surface-2);
}
.home.solo {
  grid-template-columns: minmax(0, 1fr);
}
.search.mini {
  flex: 0 1 200px;
  min-width: 120px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 400;
}
.menu.pop {
  position: fixed;
  z-index: 36;
  min-width: 200px;
}
a.btn {
  text-decoration: none;
  color: inherit;
}
a.btn.primary {
  color: var(--on-tint);
}
.hbtns {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.shead h1 input {
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  width: 100%;
  padding: 0;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .shead h1 {
    font-size: 22px;
  }
  .hbtns {
    justify-content: flex-start;
  }
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* files */
.drop {
  display: grid;
  gap: 4px;
  justify-items: center;
  cursor: pointer;
}
.drop .faint {
  font-size: 12.5px;
}
.drop.busy {
  opacity: 0.6;
  pointer-events: none;
}
.uprow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px 0;
  font-size: 13px;
  color: var(--fg-2);
}
.minisel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 13px;
  max-width: 220px;
}
.frow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 4px 10px;
}
.frow:not(:has(input[type="checkbox"])) {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}
.frow .fname {
  flex: none;
}
.fmeta {
  font-size: 12.5px;
  color: var(--fg-3);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .frow {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .frow .fmeta {
    grid-column: 2/-1;
    white-space: normal;
  }
  .frow .minisel {
    grid-column: 2;
  }
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 8px 16px 14px;
}
.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.tile-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 7px;
  font-size: 11.5px;
  color: var(--fg-2);
}
.tile-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-x {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
}
/* lists with search */
.listbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.ship.crow {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1fr) auto;
}
@media (max-width: 760px) {
  .ship.crow {
    grid-template-columns: 1fr auto;
  }
}
/* activity log */
.act {
  display: grid;
  grid-template-columns: 150px 140px 110px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  align-items: baseline;
}
.act:first-child {
  border-top: 0;
}
.act .what {
  min-width: 0;
  overflow-wrap: anywhere;
}
.act .what small {
  display: block;
  color: var(--fg-2);
  font-size: 12.5px;
}
.act code {
  font-family: var(--mono);
  font-size: 12.5px;
}
@media (max-width: 760px) {
  .act {
    grid-template-columns: 1fr 1fr;
  }
  .act .what {
    grid-column: 1/-1;
  }
}
.tagx {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--fg-2);
}
.tagx.print {
  background: var(--tint-soft);
  color: var(--tint);
}
.tagx.delete,
.tagx.login-failed,
.tagx.login-blocked {
  background: var(--bad-soft);
  color: var(--bad);
}
.tagx.create,
.tagx.login {
  background: var(--ok-soft);
  color: var(--ok);
}
/* public landing page */
body.landing {
  min-height: 100vh;
  background: var(--bg);
}
.land-top {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-left, 0px));
}
.land-logo {
  width: 180px;
  height: auto;
}
.land {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}
.land h1 {
  font-size: 32px;
}
.land > p {
  margin: 8px 0 20px;
  font-size: 16px;
}
.land-form {
  display: flex;
  gap: 8px;
}
.land-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 17px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.land-form input:focus {
  outline: 2px solid var(--tint);
  border-color: var(--tint);
}
.land-form .btn {
  padding: 0 20px;
  font-size: 16px;
}
.land-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 18px;
  font-size: 15px;
}
.land-id {
  font-family: var(--mono);
  color: var(--fg-2);
  font-size: 14px;
}
.land-now {
  font-size: 22px;
  font-weight: 650;
  margin: 4px 0 14px;
  letter-spacing: -0.01em;
}
.land-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.land-steps li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--fg-3);
  font-size: 14.5px;
  padding: 3px 0;
}
.land-steps li i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  flex: none;
}
.land-steps li.done {
  color: var(--fg);
}
.land-steps li.done i {
  background: var(--tint);
  border-color: var(--tint);
}
.land-dates {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 16px 0 0;
  font-size: 14px;
}
.land-dates dt {
  color: var(--fg-2);
}
.land-dates dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.land-foot {
  font-size: 12.5px;
  margin-top: 30px;
  line-height: 1.6;
}
.land-foot a {
  color: var(--tint);
}
@media (max-width: 520px) {
  .land h1 {
    font-size: 26px;
  }
  .land-form {
    flex-direction: column;
  }
  .land-form .btn {
    padding: 12px;
  }
  .land-logo {
    width: 140px;
  }
}
/* settings: bank account fields */
.bankgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  .bankgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bankgrid label {
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  color: var(--fg-2);
}
.bankprev {
  white-space: pre-line;
  font-family: var(--doc);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fg);
}

/* wall board (#board): one full screen, sized from the screen so it reads across a room */
body.boardmode {
  background: #fff;
}
body.boardmode::before,
body.boardmode .bar {
  display: none;
}
body.boardmode main {
  max-width: none;
  padding: 0;
}
.board {
  --u: min(1vw, 1.78vh);
  --b-fg: #111;
  --b-mute: #5a5650;
  --b-line: #d4d0c8;
  --b-tint: #8a5a2b;
  --b-late: #c2372f;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1.1);
  padding: calc(var(--u) * 1.4) calc(var(--u) * 2);
  background: #fff;
  color: var(--b-fg);
  font-size: calc(var(--u) * 0.95);
  line-height: 1.25;
}
.b-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.b-title {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  font-size: calc(var(--u) * 1.9);
}
.b-title img {
  width: calc(var(--u) * 2.6);
  height: calc(var(--u) * 2.6);
}
.b-title span {
  color: var(--b-mute);
  font-weight: 400;
}
.b-clock {
  text-align: right;
  display: grid;
}
.b-clock b {
  font-size: calc(var(--u) * 2.4);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.b-clock span {
  color: var(--b-mute);
  font-size: calc(var(--u) * 1);
}
.b-kpis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: calc(var(--u) * 0.8);
}
.b-kpi {
  background: #f4f2ee;
  border-radius: calc(var(--u) * 0.7);
  padding: calc(var(--u) * 0.6) calc(var(--u) * 0.9);
  display: grid;
}
.b-kpi b {
  font-size: calc(var(--u) * 2.6);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.b-kpi span {
  color: var(--b-mute);
  font-size: calc(var(--u) * 0.9);
}
.b-kpi.bad {
  background: #fbe3e1;
}
.b-kpi.bad b,
.b-kpi.bad span {
  color: var(--b-late);
}
.b-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: calc(var(--u) * 1.6);
}
.b-sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--b-fg);
  padding-bottom: calc(var(--u) * 0.3);
  margin-bottom: calc(var(--u) * 0.2);
}
.b-sec h2 {
  margin: 0;
  font-size: calc(var(--u) * 1.15);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.b-sec h2 span,
#b-pg {
  color: var(--b-mute);
  font-weight: 500;
}
#b-pg {
  font-size: calc(var(--u) * 0.9);
}
.b-ships,
.b-side {
  min-height: 0;
  overflow: hidden;
}
.b-side {
  display: grid;
  align-content: start;
  gap: calc(var(--u) * 1.4);
}
.brow {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: calc(var(--u) * 1.2);
  align-items: center;
  padding: calc(var(--u) * 0.75) 0;
  border-bottom: 1px solid var(--b-line);
}
.brow[hidden] {
  display: none;
}
.b-who,
.bq-who {
  display: grid;
  min-width: 0;
}
.b-who b {
  font-size: calc(var(--u) * 1.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b-who span,
.bq-who span {
  font-family: var(--mono);
  font-size: calc(var(--u) * 0.85);
  color: var(--b-mute);
}
.b-who small {
  color: var(--b-mute);
  font-size: calc(var(--u) * 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b-demo {
  font-style: normal;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.8em;
  color: #fff;
  background: #7a5af5;
  border-radius: 4px;
  padding: 0 0.35em;
}
.b-next {
  font-size: calc(var(--u) * 0.95);
  font-weight: 600;
}
.b-next.warn {
  color: #9a5a00;
}
.b-next.bad {
  color: var(--b-late);
}
.b-next.ok {
  color: #2f8a4c;
}
/* the step line: a dot per step, the date under it */
.bline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.bline li {
  position: relative;
  text-align: center;
  padding-top: calc(var(--u) * 1.5);
  color: var(--b-mute);
  min-width: 0;
}
.bline li::before {
  content: "";
  position: absolute;
  top: calc(var(--u) * 0.5);
  left: 0;
  right: 0;
  height: calc(var(--u) * 0.22);
  background: var(--b-line);
}
.bline li:first-child::before {
  left: 50%;
}
.bline li:last-child::before {
  right: 50%;
}
.bline i {
  position: absolute;
  top: calc(var(--u) * 0.1);
  left: 50%;
  width: calc(var(--u) * 1);
  height: calc(var(--u) * 1);
  margin-left: calc(var(--u) * -0.5);
  border-radius: 50%;
  background: #fff;
  border: calc(var(--u) * 0.2) solid var(--b-line);
  box-sizing: border-box;
}
.bline li.done::before,
.bline li.done i {
  background: var(--b-tint);
  border-color: var(--b-tint);
}
.bline li.now i {
  border-color: var(--b-tint);
  box-shadow: 0 0 0 calc(var(--u) * 0.3) #f0e1d0;
}
.bline span {
  display: block;
  font-size: calc(var(--u) * 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bline small {
  display: block;
  font-size: calc(var(--u) * 0.8);
  font-variant-numeric: tabular-nums;
  color: #8f8a82;
}
.bline li.done span,
.bline li.now span {
  color: var(--b-fg);
}
.bline li.now span {
  font-weight: 700;
}
.bline li.done small {
  color: var(--b-fg);
  font-weight: 600;
}
.bline li.late small,
.bline li.late span {
  color: var(--b-late);
  font-weight: 700;
}
.bline li.late i {
  border-color: var(--b-late);
}
.b-att {
  list-style: none;
  margin: 0;
  padding: 0;
}
.b-att li {
  display: grid;
  padding: calc(var(--u) * 0.45) 0 calc(var(--u) * 0.45) calc(var(--u) * 0.8);
  border-left: calc(var(--u) * 0.3) solid #c9c4ba;
  margin-top: calc(var(--u) * 0.5);
}
.b-att li.l0 {
  border-color: var(--b-late);
}
.b-att li.l0 b {
  color: var(--b-late);
}
.b-att li.l1 {
  border-color: #d08a1e;
}
.b-att li span {
  color: var(--b-mute);
  font-size: calc(var(--u) * 0.82);
}
.b-att li.more,
.b-more {
  border: 0;
  color: var(--b-mute);
}
.bq {
  padding: calc(var(--u) * 0.5) 0;
  border-bottom: 1px solid var(--b-line);
  display: grid;
  gap: calc(var(--u) * 0.2);
}
.bq-who {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: calc(var(--u) * 0.6);
}
.bq-who b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bq .bline span {
  font-size: calc(var(--u) * 0.7);
}
.bq .bline small {
  font-size: calc(var(--u) * 0.72);
}
.b-ok,
.b-empty {
  color: var(--b-mute);
  margin: calc(var(--u) * 0.6) 0 0;
}
.b-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--b-mute);
  font-size: calc(var(--u) * 0.8);
}
#b-sync.stale {
  color: #fff;
  background: var(--b-late);
  font-weight: 700;
  font-size: calc(var(--u) * 1.1);
  padding: 0.2em 0.6em;
  border-radius: 6px;
}
.b-ctl {
  display: flex;
  gap: 1em;
  opacity: 0.25;
  transition: opacity 0.2s;
}
.b-ctl:hover {
  opacity: 1;
}
.b-ctl button,
.b-ctl a {
  font: inherit;
  color: var(--b-mute);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}
.bq[hidden],
.b-more[hidden] {
  display: none;
}
