/* Not So Fast: the app's styles, from the "Not So Fast App Screens" canvas and its design
   system. Light theme. Red is for the brand and for things that are stopped, nothing else. */

/* Inter and Inter Tight, served from our own origin (SIL Open Font License, see assets/fonts). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-4.1.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-tight-c194f94.woff2") format("woff2");
}

:root {
  --ground: #faf8f5;
  --surface: #ffffff;
  --raised: #f3f0ea;
  --hover: #ece8e1;
  --ink: #0b0b0c;
  --ink-2: #2b2d33;
  --muted: #5b616e;
  --slate: #6b7280;
  --border: #e7e3dc;
  --border-soft: #f0ece5;
  --border-strong: #cfc9bf;
  --red: #e11d2e;
  --red-ink: #b3141f;
  --red-tint: #fdecee;
  --green: #15803d;
  --green-tint: #eaf6ee;
  --green-line: #cfe8d7;
  --amber: #b45309;
  --amber-tint: #fdf3e7;
  --chip: #e8e3da;
  --display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pop: 0 12px 32px rgba(11, 11, 12, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/22px var(--sans);
}

a {
  color: var(--ink);
  text-decoration: none;
}

a.u,
.u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font-family: var(--sans);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}
.small {
  font: 400 13px/18px var(--sans);
}
.strong {
  font-weight: 600;
}
.num {
  font-variant-numeric: tabular-nums;
}
.red {
  color: var(--red-ink);
  font-weight: 600;
}
.ok {
  color: var(--green) !important;
  font-weight: 600 !important;
}
.wait {
  color: var(--amber) !important;
  font-weight: 600 !important;
}
.trunc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ---------- App shell ---------- */

.shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

.sb {
  flex: 1 1 264px;
  max-width: 264px;
  min-width: 240px;
  background: var(--raised);
  border-right: 1px solid var(--border);
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.sb-logo {
  padding: 4px 8px 0;
  display: block;
}
.sb-logo img {
  width: 128px;
  height: auto;
  display: block;
}
.sb-sec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sb-h {
  margin: 0 0 4px;
  padding: 0 10px;
  font: 600 12px/16px var(--sans);
  color: var(--muted);
}
.sb-h.gap {
  margin-top: 12px;
}
.sb-a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font: 500 15px/20px var(--sans);
  color: var(--ink);
  min-width: 0;
}
.sb-a:hover {
  background: var(--hover);
}
.sb-a.on {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  font-weight: 600;
}
.sb-sub {
  margin-left: 12px;
  font-size: 14px;
  padding: 6px 10px;
}
.sb-co {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.sb-grow {
  flex-grow: 1;
}
.sb-admin {
  color: var(--ink-2);
}
.cnt {
  font: 500 13px/16px var(--sans);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cnt-red {
  min-width: 20px;
  text-align: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font: 700 12px/16px var(--sans);
}
.co-mk {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  background: var(--ink);
  color: var(--ground);
  display: grid;
  place-items: center;
  font: 700 10px/1 var(--display);
}
.co-mk.lg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
}
.co-mk.xl {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 18px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: none;
  display: inline-block;
}
.dot.lg {
  width: 10px;
  height: 10px;
}
.dot-red {
  background: var(--red);
}
.dot-amber {
  background: var(--amber);
}
.dot-green {
  background: var(--green);
}
.dot-ink {
  background: var(--ink);
}
.dot-slate {
  background: var(--slate);
}
.new-btn {
  border: 0;
  cursor: pointer;
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--ground);
  font: 600 14px/18px var(--sans);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.new-btn span:last-child {
  font: 500 18px/1 var(--sans);
  color: #a3a3ad;
}

/* The account card and its menu: a <details>, so it works without JavaScript. */
.acct {
  position: relative;
}
.acct > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.acct > summary::-webkit-details-marker {
  display: none;
}
.acct-co,
.acct-me {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 10px;
  min-width: 0;
}
.acct-co {
  border-bottom: 1px solid var(--border);
}
.acct-me {
  padding: 10px 12px;
}
.acct-mk {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ground);
  display: grid;
  place-items: center;
  font: 700 13px/1 var(--display);
}
.avatar {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: var(--chip);
  display: grid;
  place-items: center;
  font: 600 12px/1 var(--sans);
}
.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.acct-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}
.acct-name b {
  font: 600 14px/18px var(--sans);
}
.acct-name span {
  font: 400 12px/16px var(--sans);
  color: var(--muted);
}
.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--raised);
  font: 600 11px/16px var(--sans);
  white-space: nowrap;
}
.menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--pop);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 5;
}
.menu-who {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.menu a,
.menu button {
  padding: 8px 10px;
  border-radius: 8px;
  font: 500 14px/20px var(--sans);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  width: 100%;
}
.menu a:hover,
.menu button:hover {
  background: var(--raised);
}
.menu-foot {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  border-bottom: 1px solid var(--border);
}
.search {
  flex: 1 1 320px;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0 10px 0 14px;
}
.search input {
  flex-grow: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 0;
  font: 400 14px/20px var(--sans);
  min-width: 0;
}
kbd {
  font: 500 12px/16px var(--sans);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.topbar-link {
  font: 500 14px/20px var(--sans);
  color: var(--muted);
}

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.page.wide {
  max-width: 1240px;
  padding-top: 24px;
  gap: 22px;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.page-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.crumb {
  font: 500 13px/18px var(--sans);
  color: var(--muted);
}
.crumb a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.title {
  font: 800 34px/40px var(--display);
  letter-spacing: -0.03em;
}
.title.deal {
  font-size: 32px;
  line-height: 38px;
}
.lede {
  font: 400 16px/24px var(--sans);
  color: var(--ink-2);
}
.cols {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}
.cols > .col-main {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.cols > .col-side {
  flex: 1 1 280px;
  max-width: 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cols.deal > .col-main {
  flex-basis: 520px;
  gap: 24px;
}
.cols.deal > .col-side {
  flex-basis: 320px;
  max-width: 400px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.stack.tight {
  gap: 4px;
}
.stack.loose {
  gap: 20px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.row.end {
  justify-content: flex-end;
}
.row.between {
  justify-content: space-between;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ---------- Controls ---------- */

.btn,
.btn-p,
.btn-red {
  cursor: pointer;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 600 14px/18px var(--sans);
  color: var(--ink);
  text-align: center;
}
.btn:hover {
  background: var(--raised);
}
.btn[disabled],
.btn-p[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-p {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ground);
}
.btn-p:hover {
  background: var(--ink-2);
}
.btn-red {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}
.btn.lg,
.btn-p.lg {
  padding: 12px 22px;
  font-size: 15px;
}
.link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: 600 13px/18px var(--sans);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  padding: 0 0 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font: 500 14px/20px var(--sans);
  color: var(--muted);
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.on {
  border-bottom-color: var(--ink);
  font-weight: 600;
  color: var(--ink);
}
.tab span {
  color: var(--muted);
  font-weight: 500;
}
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--chip);
  border-radius: 10px;
}
.seg a {
  padding: 6px 14px;
  border-radius: 8px;
  font: 500 13px/18px var(--sans);
  color: var(--muted);
}
.seg a.on {
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(11, 11, 12, 0.08);
}
.sel,
.inp,
textarea.inp {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 500 14px/20px var(--sans);
  color: var(--ink);
}
.inp {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 22px;
}
textarea.inp {
  min-height: 88px;
  resize: vertical;
}
.inp.code {
  font: 700 24px/1 var(--display);
  letter-spacing: 0.4em;
  max-width: 260px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.lab {
  font: 600 13px/18px var(--sans);
  color: var(--ink-2);
}
.label {
  font: 600 12px/16px var(--sans);
  color: var(--muted);
}
.hint {
  font: 400 13px/18px var(--sans);
  color: var(--muted);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font: 500 14px/20px var(--sans);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--ink);
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
}
.choice {
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}
.choice:has(input:checked) {
  border: 2px solid var(--ink);
  padding: 15px 17px;
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.job {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--raised);
  font: 500 12px/18px var(--sans);
  color: var(--ink-2);
}
.ref {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font: 500 13px/18px var(--sans);
}
.ref b {
  font-weight: 600;
  color: var(--muted);
}
.private {
  display: inline-flex;
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--raised);
  font: 600 11px/18px var(--sans);
  color: var(--ink-2);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border-radius: 999px;
  font: 600 13px/18px var(--sans);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}
.status.held {
  background: var(--red-tint);
  color: var(--red-ink);
}
.status.ready {
  background: var(--green-tint);
  color: var(--green);
}
.status.waiting {
  background: var(--amber-tint);
  color: var(--amber);
}
.status.neutral {
  background: var(--raised);
  color: var(--ink-2);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font: 600 12px/18px var(--sans);
  background: var(--raised);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill.held {
  background: var(--red-tint);
  color: var(--red-ink);
}
.pill.ready {
  background: var(--green-tint);
  color: var(--green);
}
.pill.waiting {
  background: var(--amber-tint);
  color: var(--amber);
}

/* ---------- Cards, rows, tables ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.card h2 {
  font: 600 15px/22px var(--sans);
}
.card.flush {
  padding: 0;
  gap: 0;
}
.card.quiet {
  background: var(--raised);
  border-color: var(--raised);
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  font: 400 14px/20px var(--sans);
}
.kv:last-child {
  border-bottom: 0;
}
.kv > :first-child {
  color: var(--muted);
}
.kv > :last-child {
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.kv.total > :first-child {
  color: var(--ink);
  font-weight: 600;
}
.kv.total > :last-child {
  font-weight: 700;
}
.group-h {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.group-h h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 17px/24px var(--sans);
}
.item {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.item:last-child {
  border-bottom: 0;
}
.item-main {
  flex: 999 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font: 600 15px/22px var(--sans);
}
.item-head .muted {
  font-weight: 400;
}
.item-text {
  font: 400 15px/22px var(--sans);
  color: var(--ink-2);
}
.item-side {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.amount {
  font: 600 17px/24px var(--sans);
  font-variant-numeric: tabular-nums;
}
.amount.big {
  font: 700 28px/32px var(--display);
  letter-spacing: -0.02em;
}
.empty {
  padding: 28px 22px;
  text-align: center;
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font: 400 14px/20px var(--sans);
}
.table th {
  text-align: left;
  font: 600 12px/16px var(--sans);
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table td.r,
.table th.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat b {
  font: 700 26px/32px var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Banners (the action bar) ---------- */

.banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 2px solid var(--ink);
}
.banner.ready {
  background: var(--green-tint);
  border: 1px solid var(--green-line);
}
.banner.held {
  background: var(--red-tint);
  border: 1px solid #f6c9ce;
}
.banner.waiting {
  background: var(--amber-tint);
  border: 1px solid #f1dcc0;
}
.banner.quiet {
  background: var(--surface);
  border: 1px solid var(--border);
}
.banner-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex: 999 1 420px;
  min-width: 0;
}
.banner-main > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.banner-title {
  font: 700 18px/24px var(--display);
}
.banner.ready .banner-title {
  color: var(--green);
}
.banner.held .banner-title {
  color: var(--red-ink);
}
.banner.waiting .banner-title {
  color: var(--amber);
}
.banner-text {
  font: 400 14px/20px var(--sans);
  color: var(--ink-2);
}
.banner-actions {
  display: flex;
  gap: 8px;
  flex: 1 1 260px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}
.mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 15px/1 var(--sans);
  color: #ffffff;
  background: var(--ink);
}
.mark.ready {
  background: var(--green);
}
.mark.held {
  background: var(--red);
}
.notice {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--raised);
  font: 500 14px/20px var(--sans);
}
.notice.held {
  background: var(--red-tint);
  color: var(--red-ink);
}
.notice.ok {
  background: var(--green-tint);
}

/* ---------- The stage track ---------- */

.stages {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px 16px;
  overflow-x: auto;
}
.stages ol {
  display: flex;
  min-width: 560px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1 1 0;
  min-width: 84px;
}
.step::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.step:first-child::before {
  display: none;
}
.step.done::before,
.step.now::before {
  background: var(--ink);
}
.step-c {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 12px/1 var(--sans);
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  color: var(--muted);
}
.step.done .step-c {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
}
.step.now .step-c {
  border-color: var(--ink);
  color: var(--ink);
}
.step.held .step-c {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}
.step.held::before {
  background: var(--red);
}
.step-n {
  font: 600 13px/18px var(--sans);
}
.step.todo .step-n {
  color: var(--muted);
}
.step-w {
  font: 500 12px/16px var(--sans);
  text-align: center;
  color: var(--muted);
}

/* ---------- The timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
}
.ev {
  display: grid;
  grid-template-columns: 92px 18px minmax(0, 1fr);
  gap: 0 12px;
}
.ev-when {
  font: 500 13px/20px var(--sans);
  color: var(--muted);
  text-align: right;
  padding-top: 1px;
}
.ev-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ev-rail .dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
}
.ev-line {
  width: 2px;
  flex-grow: 1;
  background: var(--border);
  margin: 4px 0;
}
.ev-body {
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ev-body .what {
  font: 600 15px/22px var(--sans);
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/16px var(--sans);
  color: var(--muted);
}
.who i {
  font-style: normal;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font: 700 8px/1 var(--display);
  background: var(--ink);
  color: var(--ground);
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  align-self: flex-start;
  border: 1px dashed var(--border-strong);
  background: var(--ground);
  border-radius: 9px;
  padding: 8px 12px;
  font: 600 13px/18px var(--sans);
  display: inline-block;
  margin-bottom: 14px;
}
details.more > summary::-webkit-details-marker {
  display: none;
}
details.more[open] > summary {
  display: none;
}

/* ---------- The bank handoff ---------- */

.copy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.copy-row:last-child {
  border-bottom: 0;
}
.copy-row .value {
  font: 700 22px/28px var(--display);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.copy-btn[data-copied]::after {
  content: " ✓";
}

/* ---------- Signing in and setting up ---------- */

.auth {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}
.auth-side {
  flex: 1 1 360px;
  max-width: 420px;
  background: var(--ink);
  color: #f5f3ef;
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.auth-side img {
  width: 44px;
  height: 44px;
  display: block;
}
.auth-side-title {
  font: 800 30px/34px var(--display);
  letter-spacing: -0.03em;
}
.auth-side-text {
  font: 400 15px/22px var(--sans);
  color: #d6d3cd;
}
.auth-side ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.left-step {
  display: flex;
  gap: 12px;
  align-items: center;
  font: 500 14px/20px var(--sans);
  color: #8b919c;
}
.left-step::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3d3d44;
  flex: none;
}
.left-step.done {
  color: #d6d3cd;
}
.left-step.done::before {
  background: #d6d3cd;
}
.left-step.on {
  color: #ffffff;
  font-weight: 600;
}
.left-step.on::before {
  background: var(--red);
}
.auth-foot {
  margin-top: auto;
  font: 400 13px/18px var(--sans);
  color: #8b919c;
}
.auth-main {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.progress {
  height: 4px;
  background: var(--border);
}
.progress > div {
  height: 4px;
  background: var(--ink);
}
.auth-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
}
.auth-body {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding: 16px 40px 56px;
}
.auth-body > div {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.progress > .w-0 {
  width: 0%;
}
.progress > .w-10 {
  width: 10%;
}
.progress > .w-20 {
  width: 20%;
}
.progress > .w-30 {
  width: 30%;
}
.progress > .w-40 {
  width: 40%;
}
.progress > .w-50 {
  width: 50%;
}
.progress > .w-60 {
  width: 60%;
}
.progress > .w-70 {
  width: 70%;
}
.progress > .w-80 {
  width: 80%;
}
.progress > .w-90 {
  width: 90%;
}
.progress > .w-100 {
  width: 100%;
}

/* ---------- Admin ---------- */

.admin-nav .sb-h:first-child {
  margin-top: 0;
}

/* ---------- Embedded inside a partner ---------- */

.embedded .sb {
  display: none;
}
.embedded-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  font: 600 12px/16px var(--sans);
  color: var(--muted);
}

/* ---------- Phones ---------- */

@media (max-width: 720px) {
  .sb {
    max-width: none;
    flex-basis: 100%;
  }
  .topbar,
  .page,
  .auth-bar,
  .auth-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .auth-side {
    max-width: none;
    padding: 24px 16px;
    gap: 20px;
  }
  .title {
    font-size: 28px;
    line-height: 34px;
  }
  .item-side {
    align-items: flex-start;
  }
}

/* ---------- Overview screens ---------- */

form.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
form.filters .field {
  min-width: 180px;
}
.row.nowrap {
  flex-wrap: nowrap;
}
.row.top {
  align-items: flex-start;
}
.stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.grid.two {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: start;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
textarea.code {
  font:
    400 13px/18px ui-monospace,
    "SFMono-Regular",
    Menlo,
    Consolas,
    monospace;
  resize: vertical;
}

/* The calendar: a month of weeks, Monday first, each date a small tinted label. */
table.cal {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}
.cal th {
  padding: 10px 8px;
  font: 600 12px/16px var(--sans);
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cal td {
  height: 112px;
  padding: 6px;
  vertical-align: top;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.cal td:last-child {
  border-right: 0;
}
.cal tr:last-child td {
  border-bottom: 0;
}
.cal td.out {
  background: var(--ground);
}
.cal td.out .cal-num {
  color: var(--border-strong);
}
.cal-num {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-bottom: 4px;
  border-radius: 999px;
  font: 600 13px/1 var(--sans);
  color: var(--ink-2);
}
.cal td.today .cal-num {
  background: var(--ink);
  color: var(--ground);
}
.cal-ev {
  display: block;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  font: 500 12px/16px var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}
.cal-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cal-day:last-child {
  border-bottom: 0;
}
.k-due {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
  font-weight: 600;
}
.k-you {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}
.k-others {
  background: var(--amber-tint);
  border-color: var(--amber-tint);
  color: var(--amber);
  font-weight: 600;
}
.k-done {
  background: var(--green-tint);
  border-color: var(--green-tint);
  color: var(--green);
}
.k-deal {
  background: var(--raised);
  border-color: var(--raised);
  color: var(--ink-2);
}
.k-dates {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 4px;
  border: 1px solid transparent;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 500 13px/18px var(--sans);
}
.chip.off {
  color: var(--muted);
  background: var(--raised);
  border-color: var(--raised);
}
.chip.off .swatch {
  background: var(--chip);
  border-color: var(--chip);
}

/* Receipts: the list, and the signed receipt beside it. */
.rc-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.rc-row:last-child {
  border-bottom: 0;
}
.rc-row > .stack {
  flex: 1 1 auto;
}
.rc-row:hover {
  background: var(--raised);
}
.rc-row.on {
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--ink);
}
.receipt {
  gap: 18px;
}
.rc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-steps li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  font: 400 14px/20px var(--sans);
}

/* Reports: bars and meters sized in tenths, never by inline style. */
.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: end;
  min-height: 220px;
}
.bars li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.bar {
  width: 100%;
  max-width: 56px;
  border-radius: 4px 4px 0 0;
  background: var(--border-strong);
}
.bars li.now .bar {
  background: var(--ink);
}
.bar.h-0 {
  height: 2px;
}
.bar.h-1 {
  height: 18px;
}
.bar.h-2 {
  height: 36px;
}
.bar.h-3 {
  height: 54px;
}
.bar.h-4 {
  height: 72px;
}
.bar.h-5 {
  height: 90px;
}
.bar.h-6 {
  height: 108px;
}
.bar.h-7 {
  height: 126px;
}
.bar.h-8 {
  height: 144px;
}
.bar.h-9 {
  height: 162px;
}
.bar.h-10 {
  height: 180px;
}
.meter {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--raised);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}
.meter > .m-0 {
  width: 0;
}
.meter > .m-1 {
  width: 10%;
}
.meter > .m-2 {
  width: 20%;
}
.meter > .m-3 {
  width: 30%;
}
.meter > .m-4 {
  width: 40%;
}
.meter > .m-5 {
  width: 50%;
}
.meter > .m-6 {
  width: 60%;
}
.meter > .m-7 {
  width: 70%;
}
.meter > .m-8 {
  width: 80%;
}
.meter > .m-9 {
  width: 90%;
}
.meter > .m-10 {
  width: 100%;
}

/* ---------- Network and Settings ---------- */

.nowrap {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}
.block {
  display: block;
}
.narrow {
  max-width: 820px;
}
.h3 {
  font: 600 14px/20px var(--sans);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.filter-menu {
  position: relative;
}
.filter-menu > summary {
  list-style: none;
}
.filter-menu > summary::-webkit-details-marker {
  display: none;
}
.filter-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--pop);
}
.filter-list a {
  padding: 8px 10px;
  border-radius: 8px;
  font: 500 14px/20px var(--sans);
}
.filter-list a:hover {
  background: var(--hover);
}
table.network {
  min-width: 900px;
}
.table td.c,
.table th.c {
  text-align: center;
}
.table th.plain {
  text-align: left;
  font: 400 14px/20px var(--sans);
  color: var(--ink);
  white-space: normal;
}
.co-cell {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.btn.pinned {
  background: var(--raised);
}
.co-head {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}
.line {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.line:last-child {
  border-bottom: 0;
}
.line > .dot {
  align-self: flex-start;
  margin-top: 7px;
}
.board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}
.board-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--raised);
  min-width: 0;
}
.board-h {
  display: flex;
  justify-content: space-between;
  font: 600 13px/18px var(--sans);
}
.dcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.dcard:hover {
  border-color: var(--border-strong);
}
.cal-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr auto;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.cal-row:last-child {
  border-bottom: 0;
}
.note {
  white-space: pre-wrap;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill-choice {
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 500 14px/20px var(--sans);
}
.pill-choice:has(input:checked) {
  border-color: var(--ink);
  background: var(--raised);
}
.pad-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.pad-row:last-child {
  border-bottom: 0;
}
.row.end-bottom {
  align-items: flex-end;
}
.search-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
fieldset.card {
  padding: 20px;
  border: 1px solid var(--border);
}

/* Start a deal: its own frame, with the steps on the left and the deal so far on the right. */
.wiz {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wiz-top {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.wiz-top img {
  height: 22px;
}
.wiz-body {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px;
}
.wiz-nav {
  flex: 1 1 200px;
  max-width: 240px;
}
.wiz-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wiz-step,
.wiz-step > a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  font: 500 14px/20px var(--sans);
  color: var(--muted);
}
.wiz-step > a {
  padding: 0;
  color: var(--ink);
}
.wiz-step.on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(11, 11, 12, 0.08);
}
.wiz-n {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  font: 600 12px/1 var(--sans);
}
.wiz-step.on .wiz-n,
.wiz-step.done .wiz-n {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
}
.wiz-main {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.wiz-side {
  flex: 1 1 260px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

@media (max-width: 720px) {
  .wiz-top,
  .wiz-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .wiz-nav,
  .wiz-side {
    max-width: none;
  }
  .cal-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- Admin screens ---------- */

.person {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.quote {
  padding-left: 12px;
  border-left: 3px solid var(--border-strong);
  font: 400 15px/22px var(--sans);
  color: var(--ink-2);
}
.secret code {
  display: block;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--green-line);
  background: var(--surface);
  font:
    600 14px/20px ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  word-break: break-all;
  user-select: all;
}
.set {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.set > legend {
  margin-bottom: 8px;
  padding: 0;
}
.perm-group {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.band-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.band-roles {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.inp.narrow {
  max-width: 140px;
  padding: 8px 10px;
  font-size: 14px;
}
.card .pad {
  padding: 20px 20px 12px;
}
.card-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
.card .day-h {
  padding: 14px 16px 0;
  font: 600 13px/18px var(--sans);
  color: var(--muted);
}

/* ---------- Onboarding and Join ---------- */

.auth-body fieldset,
.join-body fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.seg.fit {
  align-self: flex-start;
  flex-wrap: wrap;
}
.choice-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  min-width: 0;
}
.choice-title {
  font: 600 16px/22px var(--sans);
}
.choice-text {
  font: 400 14px/20px var(--sans);
  color: var(--muted);
}
.choice-src {
  font: 600 13px/18px var(--sans);
  color: var(--green);
  white-space: nowrap;
}
.choice.on {
  border: 2px solid var(--ink);
  padding: 15px 17px;
}
.choice.off,
.choice.closed {
  cursor: default;
  background: var(--raised);
  border-color: var(--border);
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.opt {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 600 13px/18px var(--sans);
}
.opt:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ground);
}
.opt input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.invite-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.conns,
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
}
.conns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.conn {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.rules.card {
  padding: 6px 20px;
}
.rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  font: 500 15px/20px var(--sans);
}
.rule:first-child {
  border-top: 0;
}
.rule-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rule-main b {
  font-weight: 500;
}
.table-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
}
.done-mark {
  width: 56px;
  height: 56px;
  display: block;
}
.mark.ready + .title,
.done-mark + .title {
  margin-top: -8px;
}
.join {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.join-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.join-top img {
  display: block;
}
.join-body {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding: 40px 24px 56px;
}
.join-body > div {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.join-body > div > .link {
  align-self: flex-start;
}
.join-from {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/18px var(--sans);
  color: var(--muted);
}
.deal-name {
  font: 700 18px/24px var(--display);
}
.turn {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 14px/20px var(--sans);
}
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
}

@media (max-width: 720px) {
  .join-top,
  .join-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .invite-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
