@font-face {
  font-family: Monitor Manrope;
  src: url('/manrope-latin.woff2?v=1') format('woff2');
  font-display: swap;
  font-weight: 400 800;
}

:root {
  color-scheme: light;
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #fafbfc;
  --line: #dfe4ec;
  --ink: #192130;
  --muted: #546075;
  --accent: #344dc0;
  --accent-fill: #eef1fd;
  --done: #246448;
  --done-fill: #eaf5ee;
  --waiting: #80550d;
  --waiting-fill: #fff3dd;
  --failed: #a52e35;
  --failed-fill: #fbecee;
  scrollbar-width: thin;
  scrollbar-color: #a2abbb var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 500 0.9rem/1.5 Monitor Manrope, system-ui, sans-serif; color: var(--ink); background: var(--canvas); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: var(--accent); text-underline-offset: .19em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

.workspace-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.workspace-inner,
.workspace-actions,
.workspace { display: flex; align-items: center; }
.workspace-inner { justify-content: space-between; gap: 10px 24px; min-height: 62px; flex-wrap: wrap; }
.workspace { gap: 9px; color: var(--ink); font-size: .85rem; font-weight: 800; }
.mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--ink); color: white; font: 800 .75rem/1 Monitor Manrope, system-ui, sans-serif; }
.workspace-actions { gap: 16px; min-width: 0; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .74rem; font-weight: 750; }
.connection i { flex: none; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.connection[data-status="live"] { color: var(--done); }
.connection[data-status="stale"] { color: var(--waiting); }
.last-cut { min-width: 116px; color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; text-align: center; }
.sign-out { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .74rem; font-weight: 750; white-space: nowrap; }
.sign-out:hover { color: var(--ink); }

main.shell { padding: 26px 0 36px; }
h1 { font-size: clamp(1.65rem, 3.2vw, 2.1rem); line-height: 1.17; font-weight: 800; letter-spacing: -.043em; }
.notice { padding: 10px 12px; margin-top: 12px; color: var(--waiting); background: var(--waiting-fill); border: 1px solid #e8d4a8; border-radius: 8px; }
.task-switch { display: flex; align-items: stretch; flex-wrap: wrap; gap: 2px 18px; margin-top: 11px; border-bottom: 1px solid var(--line); }
.task-switch button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 1px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: .82rem; font-weight: 750; }
.task-switch button:hover { color: var(--ink); }
.task-switch button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.task-switch button span { font-size: .7rem; font-variant-numeric: tabular-nums; }

.board { display: grid; gap: 18px; align-items: start; margin-top: 18px; }
.board > * { min-width: 0; }
.job-group { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.job-group + .job-group { margin-top: 16px; }
.group-head { background: var(--surface-muted); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 10px 15px; }
.group-head h2 { font-size: .77rem; font-weight: 800; }
.job + .job { border-top: 1px solid var(--line); }
.job-button { display: block; width: 100%; padding: 13px 15px; background: transparent; border: 0; text-align: left; }
.job:last-child .job-button { border-radius: 0 0 10px 10px; }
.job-button:hover { background: var(--surface-muted); }
.job-button[aria-expanded="true"] { background: var(--accent-fill); box-shadow: inset 2px 0 var(--accent); }
.job-button:focus-visible { outline-offset: -3px; }
.job-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.job-title { display: block; font-size: .89rem; line-height: 1.38; font-weight: 800; overflow-wrap: anywhere; }
.job-phase { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.job-phase[data-current="true"] { color: var(--accent); font-weight: 750; }
.attention-note { color: var(--waiting); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-status { display: inline-flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: .7rem; font-weight: 800; text-align: right; }
.job-status::before { content: ""; flex: none; width: 5px; height: 5px; align-self: center; background: currentColor; border-radius: 50%; }
.job-status[data-tone="active"] { color: var(--accent); }
.job-status[data-tone="done"] { color: var(--done); }
.job-status[data-tone="attention"] { color: var(--waiting); }
.job-status[data-tone="danger"] { color: var(--failed); }
.job-metrics { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }
.verified-metric { display: inline-flex; align-items: baseline; gap: 6px; }
.verified-metric strong { color: var(--ink); font-size: .84rem; font-weight: 800; }
.metric-time { font-weight: 700; }
.stages { display: flex; gap: 3px; width: min(100%, 132px); margin-top: 8px; }
.segment { flex: 1 1 0; height: 3px; min-width: 0; border-radius: 2px; background: #bfc8d6; }
.segment[data-status="done"] { background: #7ba28e; }
.segment[data-status="active"] { background: var(--accent); }
.segment[data-status="attention"] { background: #ab7a24; }
.empty { padding: 17px 15px; color: var(--muted); font-size: .82rem; }

.inspector { padding: clamp(16px, 2.8vw, 22px); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.job > .inspector { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.job > .inspector > .inspector-title-row { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.job > .inspector > .job-metrics { display: none; }
.job > .inspector h3:first-of-type { margin-top: 0; }
.inspector-title-row { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 6px 15px; }
.inspector h2 { font-size: 1.24rem; line-height: 1.26; font-weight: 800; letter-spacing: -.031em; overflow-wrap: anywhere; }
.inspector h3 { margin: 16px 0 8px; font-size: .77rem; font-weight: 800; }
.inspector .job-metrics { margin-top: 7px; padding-block: 7px 11px; border-bottom: 1px solid var(--line); }
.inspector .job-metrics strong { font-size: 1.05rem; }
.inspector-note { margin-top: 11px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.step-timeline, .checklist { list-style: none; padding: 0; }
.step-timeline li { position: relative; display: grid; grid-template-columns: 23px minmax(0, 1fr); align-items: start; gap: 7px; padding: 7px 8px; }
.step-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 23px; height: calc(100% - 13px); border-left: 1px solid var(--line); }
.step-timeline li[data-status="active"] { background: var(--accent-fill); border-radius: 8px; }
.step-dot { position: relative; display: grid; place-items: center; width: 19px; height: 19px; color: var(--muted); background: var(--surface); border: 1px solid #bdc6d4; border-radius: 50%; font: 700 .62rem/1 ui-monospace, monospace; }
[data-status="done"] > .step-dot { color: var(--done); background: var(--done-fill); border-color: #b0ccbd; }
[data-status="active"] > .step-dot { color: white; background: var(--accent); border-color: var(--accent); }
[data-status="attention"] > .step-dot { color: var(--waiting); background: var(--waiting-fill); border-color: #d6b97c; }
.step-label { display: block; font-size: .82rem; font-weight: 750; overflow-wrap: anywhere; }
.step-progress { display: block; width: min(100%, 230px); height: 5px; margin: 6px 0; accent-color: var(--accent); }
.step-info, .check-state { color: var(--muted); font-size: .71rem; font-variant-numeric: tabular-nums; }
.checklist { border: 1px solid var(--line); border-radius: 8px; }
.checklist li { padding: 8px 10px; }
.checklist li + li { border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; font-size: .77rem; }
.check-state[data-checked="true"] { color: var(--done); font-weight: 750; }
.checklist dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 9px; padding-top: 5px; color: var(--muted); font-size: .7rem; }
.checklist dd { overflow-wrap: anywhere; }
.inspector-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: .78rem; font-weight: 800; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 402px); padding: clamp(21px, 6vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.login-card .workspace { margin-bottom: 20px; }
.login-context { margin-top: 8px; color: var(--muted); }
.login form { display: grid; gap: 14px; margin-top: 20px; }
.login label { display: grid; gap: 5px; font-size: .82rem; font-weight: 750; }
.login input { width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #b8c3d3; border-radius: 7px; }
.login button { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 8px 12px; color: white; background: var(--accent); border: 0; border-radius: 7px; font-weight: 800; }
.login-error { padding: 8px 10px; color: var(--failed); background: var(--failed-fill); border-radius: 7px; }

@media (min-width: 760px) and (orientation: landscape) {
  .board { grid-template-columns: minmax(0, 1.14fr) minmax(305px, 1fr); }
  #inspector-dock { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow: auto; scrollbar-width: thin; scrollbar-color: #a2abbb var(--canvas); }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
  .workspace-actions { gap: 10px; }
}
@media (max-width: 400px) {
  .shell { width: calc(100% - 24px); }
  .workspace-inner { padding-block: 8px 0; gap: 0 12px; }
  .workspace-actions { flex: 1 0 100%; flex-wrap: wrap; justify-content: space-between; }
  .last-cut { order: 1; min-width: 0; text-align: left; }
  main.shell { padding-top: 19px; }
  .task-switch { gap: 2px 13px; }
  .job-summary { gap: 6px; }
}
