/* FluidMPC workspace. Same tokens as the site and the desktop app: near-black
   substrate, hairline structure, one accent that means current. */

@font-face {
  font-family: "Inter var";
  src: url("/fonts/InterVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05070c;
  --surface: #0a0e16;
  --surface-2: #0e141f;
  --surface-3: #131a27;
  --surface-4: #18202f;
  --line: #232a38;
  --line-2: #333d4e;
  --fg: #e6edf7;
  --muted: #8a97ab;
  --faint: #5a6478;
  --accent: #5eead4;
  --accent-2: #7dd3fc;
  --on-accent: #04120f;
  --ok: #3ddc97;
  --warn: #f5c26b;
  --danger: #f08a8a;
  --sans: "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(900px 420px at 78% -10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1.15;
}
code,
pre,
kbd {
  font-family: var(--mono);
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 3px solid var(--bg);
  border-radius: 8px;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.boot__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.ws {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.ws-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.ws-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.ws-brand img {
  width: 24px;
  height: 24px;
}
.ws-brand small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.ws-project {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.ws-project span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.ws-project select {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  appearance: none;
}

.ws-nav nav {
  display: grid;
  gap: 2px;
}
.ws-nav nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.ws-nav nav a:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.ws-nav nav a.active {
  color: var(--fg);
  background: var(--surface-3);
  box-shadow: inset 2px 0 0 var(--accent);
}
.ws-nav nav a .ico {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.72;
}
.ws-nav nav a.active .ico {
  opacity: 1;
  color: var(--accent);
}
.ws-nav nav a .count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
}
.ws-nav__spacer {
  flex: 1;
}
.ws-account {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ws-account__row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ws-account__row img,
.ws-account__row .avatar {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
}
.ws-account__who {
  min-width: 0;
}
.ws-account__who b {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-account__who span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-account form {
  margin: 0;
}
.ws-account button {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 7px;
  padding: 6px;
  color: var(--muted);
  font-size: 11.5px;
}
.ws-account button:hover {
  color: var(--fg);
  border-color: var(--line-2);
}

.ws-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ws-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 38px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.ws-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.ws-crumb b {
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ws-view {
  padding: clamp(18px, 3vw, 38px);
  padding-bottom: 56px;
  min-width: 0;
  animation: view-in 0.28s var(--ease) both;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ws-mobile {
  display: none;
}

/* ---------------------------------------------------------------- type */

.eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  margin: 8px 0 8px;
}
.page-head p {
  max-width: 66ch;
  color: var(--muted);
  font-size: 13.5px;
}
.page-head .head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 13px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: var(--surface-3);
  border-color: var(--faint);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, white);
  border-color: color-mix(in srgb, var(--accent) 86%, white);
}
.btn--ghost {
  border-color: transparent;
  color: var(--muted);
}
.btn--ghost:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.btn--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
}
.btn--danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.btn--sm {
  min-height: 27px;
  padding: 3px 9px;
  font-size: 11.5px;
}
.btn--icon {
  min-width: 30px;
  padding: 5px;
}

/* ---------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  padding: 16px 17px;
}
.card--flush {
  padding: 0;
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}
.card__head h2,
.card__head h3 {
  font-size: 13px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.card__head .meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.card p {
  color: var(--muted);
  font-size: 12.5px;
}
.card a.inline,
.link {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.stat {
  display: grid;
  gap: 3px;
}
.stat b {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.stat span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.stat small {
  color: var(--muted);
  font-size: 11.5px;
}

.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-4);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* --------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.chip--plain::before {
  display: none;
}
.chip--ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, transparent);
}
.chip--wait {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, transparent);
}
.chip--bad {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.chip--live {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.chip--muted {
  color: var(--faint);
}

/* --------------------------------------------------------------- forms */

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.field > span,
.field > label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
}
.field small {
  color: var(--faint);
  font-size: 11px;
}
.field[hidden] {
  display: none;
}
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--fg);
  transition: border-color 0.15s var(--ease);
}
input:hover,
textarea:hover,
select:hover {
  border-color: var(--line-2);
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: right 12px center, right 8px center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  padding-right: 26px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.checks {
  display: grid;
  gap: 8px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  min-width: 0;
}
.check input {
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: none;
}
.check b {
  display: block;
  color: var(--fg);
  font-weight: 500;
  font-size: 12px;
}
.check code {
  font-size: 10.5px;
  color: var(--accent);
}
.check .risk {
  margin-left: auto;
  flex: none;
}

/* --------------------------------------------------------------- lists */

.rows {
  display: grid;
}
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 15px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
}
.row-item:first-child {
  border-top: 0;
}
.row-item:hover {
  background: var(--surface-2);
}
.row-item__main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}
.row-item__main b {
  font-weight: 500;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-item__main span {
  color: var(--faint);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-item__side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--faint);
  font-size: 12.5px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
}

/* ------------------------------------------------------------ contract */

.contract-fields {
  display: grid;
  gap: 14px;
}
.list-editor {
  display: grid;
  gap: 7px;
}
.list-editor__row {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}
.list-editor__row input {
  flex: 1;
}
.decision {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.decision__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

/* ------------------------------------------------------------- integrations */

.int-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.int-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.int-card__top h3 {
  font-size: 13.5px;
}
.int-card__top p {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 2px;
}
.int-card__blurb {
  font-size: 12px;
  color: var(--muted);
  min-height: 34px;
}
.int-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.int-card__foot span {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}

/* ------------------------------------------------------------- pipelines */

.pipe {
  display: grid;
  gap: 11px;
  min-width: 0;
}
.pipe__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pipe__top h3 {
  font-size: 14px;
}
.pipe__top p {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 2px;
}
.steps-mini {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.steps-mini span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}
.steps-mini span.approval {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
}
.steps-mini span.deliver {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.pipe__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.pipe__foot .actions {
  display: flex;
  gap: 5px;
}

.step-editor {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  min-width: 0;
}
.step-editor__head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.step-editor__head .idx {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
  width: 18px;
  flex: none;
}
.step-editor__head select {
  width: auto;
  min-width: 120px;
  padding: 5px 26px 5px 8px;
  font-size: 11.5px;
}
.step-editor__head input {
  flex: 1;
  padding: 5px 8px;
  font-size: 12px;
}
.step-editor__head .move {
  display: flex;
  gap: 2px;
}
.step-editor__config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-left: 25px;
}
.step-editor__config .full {
  grid-column: 1 / -1;
}
.step-editor__config input,
.step-editor__config select,
.step-editor__config textarea {
  padding: 6px 8px;
  font-size: 11.5px;
}
.step-editor__config textarea {
  min-height: 54px;
}

/* ---------------------------------------------------------------- runs */

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.status--succeeded,
.status--approved {
  color: var(--ok);
}
.status--succeeded::before,
.status--approved::before {
  background: var(--ok);
}
.status--failed,
.status--rejected {
  color: var(--danger);
}
.status--failed::before,
.status--rejected::before {
  background: var(--danger);
}
.status--waiting_approval,
.status--pending {
  color: var(--warn);
}
.status--waiting_approval::before,
.status--pending::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent);
}
.status--running {
  color: var(--accent);
}
.status--running::before {
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
.status--cancelled {
  color: var(--muted);
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 16px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::before {
  display: none;
}
.timeline .dot {
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 7px;
  color: var(--faint);
}
.timeline li.success .dot {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 18%, var(--surface));
  color: var(--ok);
}
.timeline li.failed .dot {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, var(--surface));
  color: var(--danger);
}
.timeline li.waiting .dot {
  border-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 16%, var(--surface));
  color: var(--warn);
}
.timeline li.running .dot {
  border-color: var(--accent);
}
.timeline .step {
  min-width: 0;
}
.timeline .step b {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 500;
  font-size: 12.5px;
}
.timeline .step b em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.timeline .step p {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.timeline .step .when {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
  margin-top: 4px;
}

.approval-panel {
  border: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 6%, var(--surface));
  padding: 13px 14px;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.approval-panel h4 {
  font-size: 12.5px;
  color: var(--warn);
  letter-spacing: 0;
}
.approval-panel .what {
  font-size: 12.5px;
  color: var(--fg);
}
.approval-panel .why {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.approval-panel .acts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

/* --------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 560px;
}
th {
  text-align: left;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--surface-2);
}
td b {
  color: var(--fg);
  font-weight: 500;
}
td .sub {
  display: block;
  color: var(--faint);
  font-size: 10px;
  font-family: var(--mono);
}
td.num {
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}

/* --------------------------------------------------------------- modal */

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
  animation: fade 0.16s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  width: min(680px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
  animation: modal-in 0.22s var(--ease) both;
}
.modal--wide {
  width: min(880px, 100%);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal__head h2 {
  font-size: 16px;
  margin-top: 3px;
}
.modal__body {
  padding: 16px 18px;
  display: grid;
  gap: 14px;
}
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: var(--surface);
}
.modal__close {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.modal__close:hover {
  color: var(--fg);
  border-color: var(--line-2);
}
.modal__close svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--fg);
  font-size: 12px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

/* ------------------------------------------------------------ signed out */

.signedout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  position: relative;
  z-index: 1;
}
.signedout__copy {
  padding: clamp(28px, 6vw, 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  max-width: 720px;
}
.signedout__copy .ws-brand {
  padding: 0;
  margin-bottom: 10px;
}
.signedout h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 16ch;
}
.signedout h1 em {
  font-style: normal;
  color: var(--accent);
}
.signedout .lede {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 52ch;
}
.signedout__points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 520px;
}
.signedout__points li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
}
.signedout__points b {
  color: var(--fg);
  font-weight: 500;
}
.signedout__points .n {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
  padding-top: 2px;
}
.signedout__aside {
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  display: grid;
  place-items: center;
  padding: 28px;
}
.signin-card {
  width: min(360px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 22px;
  background: var(--surface);
  display: grid;
  gap: 14px;
  box-shadow: 0 30px 70px -50px #000;
}
.signin-card h2 {
  font-size: 16px;
}
.signin-card p {
  color: var(--muted);
  font-size: 12px;
}
.signin-card .btn {
  width: 100%;
}
.signin-card small {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}
.auth-tabs {
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: var(--surface-2);
}
.auth-tabs button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.auth-tabs button.on {
  color: var(--fg);
  background: var(--surface-3);
}
.auth-form {
  display: grid;
  gap: 10px;
}
.auth-error {
  color: var(--danger);
  font-size: 11px;
  line-height: 1.45;
}
.auth-error[hidden] {
  display: none;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.signin-preview {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.signin-preview span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.signin-preview span b {
  color: var(--accent);
  font-weight: 400;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  flex: none;
}

/* --------------------------------------------------------------- misc */

.kv {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 14px;
  font-size: 12px;
}
.kv dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 1px;
}
.kv dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.mono {
  font-family: var(--mono);
  font-size: 10.5px;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.nowrap {
  white-space: nowrap;
}
.copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.copy-row code {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 10.5px;
  color: var(--accent);
  overflow-x: auto;
  white-space: nowrap;
}
.notice {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}
.notice b {
  color: var(--fg);
  font-weight: 500;
}
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 5px;
}
.tabs button.on {
  background: var(--surface-3);
  color: var(--fg);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  display: grid;
  gap: 9px;
  background: var(--surface);
  min-width: 0;
}
.plan-card.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.plan-card h3 {
  font-size: 15px;
}
.plan-card .price {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.plan-card li::before {
  content: "·";
  color: var(--accent);
  margin-right: 6px;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.skill-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  background: var(--surface);
  display: grid;
  gap: 6px;
  min-width: 0;
}
.skill-card:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.skill-card h3 {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.skill-card p {
  font-size: 11.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.skill-card .fam {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.searchbar {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 380px;
}
.searchbar input {
  flex: 1;
}
.code-block {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.code-block b {
  color: var(--accent);
  font-weight: 400;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .ws {
    grid-template-columns: 1fr;
  }
  .ws-nav {
    display: none;
  }
  .ws-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
  }
  .ws-mobile .ws-brand {
    padding: 0;
  }
  .ws-mobile select {
    width: auto;
    max-width: 150px;
    padding: 5px 26px 5px 8px;
    font-size: 11.5px;
  }
  .ws-mobile nav {
    margin-left: auto;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ws-mobile nav a {
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
  }
  .ws-mobile nav a.active {
    background: var(--surface-3);
    color: var(--fg);
  }
  .ws-top {
    display: none;
  }
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .signedout {
    grid-template-columns: 1fr;
  }
  .signedout__aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .ws-view {
    padding: 16px 14px 40px;
  }
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .skill-grid {
    grid-template-columns: 1fr;
  }
  .form-grid,
  .step-editor__config {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 1.45rem;
  }
  .ws-actions .btn span {
    display: none;
  }
  .modal-scrim {
    padding: 0;
    place-items: end stretch;
  }
  .modal,
  .modal--wide {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .ws-mobile nav a span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------- composer */
.composer {
  margin-bottom: 14px;
  padding: 15px 16px 13px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}
.composer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.composer__field {
  display: block;
}
.composer__field textarea {
  width: 100%;
  min-height: 62px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.composer__field textarea::placeholder {
  color: var(--faint);
}
.composer__field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.composer__menu {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  max-height: 232px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.composer__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}
.composer__option:hover,
.composer__option:focus-visible {
  background: var(--surface-3);
  outline: none;
}
.composer__option span {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.composer__option b {
  font-size: 12.5px;
  font-weight: 600;
}
.composer__option small {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}
.composer__option .ico {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex: 0 0 auto;
}
.composer__hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: var(--faint);
}
.composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}
.composer__foot span {
  font-size: 10.5px;
}
.composer__foot .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.composer-plan {
  margin-top: -4px;
  margin-bottom: 14px;
}
.composer-plan__task {
  margin: 0 0 13px;
  font-size: 13px;
  color: var(--fg) !important;
  font-style: italic;
}
.composer-plan__list {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}
.composer-plan__gaps {
  margin: 8px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
}
.composer-plan__gaps li {
  margin-bottom: 3px;
}
.composer-plan__next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
}
.composer-plan__note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
  color: var(--faint) !important;
}
@media (max-width: 640px) {
  .composer__head,
  .composer__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .composer__foot .btn {
    width: 100%;
    justify-content: center;
  }
}
