:root {
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --canvas: #edf0ee;
  --canvas-deep: #e5eae7;
  --paper: #ffffff;
  --paper-muted: #f6f8f6;
  --paper-tint: #f0f5f2;
  --ink: #172428;
  --ink-soft: #2d3b3f;
  --muted: #617075;
  --muted-soft: #7d8a8e;
  --line: #dce3e0;
  --line-strong: #c7d1cd;
  --control-border: #87968f;
  --navy: #122e36;
  --navy-soft: #1a3d46;
  --accent: #0f635d;
  --accent-strong: #0a4e49;
  --accent-soft: #e6f2ef;
  --accent-line: #b8d8d2;
  --brass: #a66a2f;
  --brass-soft: #f7eee3;
  --danger: #9c3831;
  --danger-strong: #7f2a24;
  --danger-soft: #fbeceb;
  --warning: #835713;
  --warning-soft: #fbf2df;
  --success: #23664e;
  --success-soft: #e8f3ed;
  --info: #315f7a;
  --info-soft: #eaf1f5;
  --shadow-sm: 0 1px 2px rgba(23, 36, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(23, 36, 40, 0.08);
  --radius-sm: 5px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --topbar-height: 66px;
  --sidebar-width: 276px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
dt {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--ink);
  background: #cfe8e3;
}

:focus-visible {
  outline: 3px solid #2f7f77;
  outline-offset: 2px;
}

.topbar :focus-visible {
  outline-color: #9ed4cc;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--accent);
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.small {
  font-size: 13px;
}

.inline-code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--paper-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.button:disabled {
  opacity: 0.55;
}

.button--primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 1px rgba(15, 99, 93, 0.18);
}

.button--primary:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button--secondary {
  color: var(--ink-soft);
  background: var(--paper);
  border-color: var(--control-border);
}

.button--secondary:hover:not(:disabled) {
  background: var(--paper-muted);
  border-color: #65756f;
}

.button--ghost {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}

.button--ghost:hover:not(:disabled) {
  background: var(--accent-soft);
}

.button--ghost-light {
  color: #eff7f5;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
}

.button--ghost-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.button--quiet {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 12px;
  font-weight: 600;
}

.button--quiet:hover:not(:disabled) {
  color: var(--ink);
  background: var(--paper-muted);
}

.button--danger {
  color: var(--danger);
  background: var(--paper);
  border-color: #e4c3c0;
}

.button--danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: #d8a9a4;
}

.button--compact {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.button--wide {
  width: 100%;
}

.button--small {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid rgba(23, 36, 40, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner--large {
  width: 26px;
  height: 26px;
  border-width: 3px;
}

.spinner--light {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.required-mark {
  color: var(--danger);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea,
.draft-editor {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  outline-offset: 1px;
}

.field textarea,
.draft-editor {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder,
.draft-editor::placeholder {
  color: #8b989b;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.draft-editor:hover {
  border-color: #65756f;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.draft-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 99, 93, 0.13);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled,
.draft-editor:disabled {
  color: var(--muted);
  background: var(--paper-muted);
}

.field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--accent);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field--wide {
  grid-column: 1 / -1;
}

.checkbox-field {
  min-height: 58px;
  flex-direction: row;
  align-items: flex-start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.checkbox-field .field-label-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.checkbox-control {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.form-error {
  padding: 11px 13px;
  color: var(--danger-strong);
  background: var(--danger-soft);
  border: 1px solid #e7c8c5;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
}

.form-error-title {
  margin-bottom: 2px;
  font-weight: 700;
}

.form-error-detail {
  color: #6c3b37;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
}

.brand:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 9px;
  height: 9px;
  content: "";
  border-color: #d2a56f;
  border-style: solid;
}

.brand-mark::before {
  top: 4px;
  left: 4px;
  border-width: 1px 0 0 1px;
}

.brand-mark::after {
  right: 4px;
  bottom: 4px;
  border-width: 0 1px 1px 0;
}

.brand-mark-inner {
  position: relative;
  z-index: 1;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  color: inherit;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.brand-tagline {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.brand--auth {
  color: var(--ink);
}

.brand--auth .brand-mark {
  width: 50px;
  height: 50px;
  font-size: 15px;
}

.brand--auth .brand-name {
  font-size: 21px;
}

.brand--auth .brand-tagline {
  font-size: 12.5px;
}

.brand--topbar {
  min-height: 44px;
  color: #ffffff;
}

.brand--topbar .brand-mark {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.brand--topbar .brand-name {
  color: #ffffff;
  font-size: 15px;
}

.brand--topbar .brand-tagline {
  color: #aec2c3;
  font-size: 10.5px;
}

.auth-view {
  min-height: 100vh;
  padding: 28px clamp(20px, 4vw, 54px);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(23, 36, 40, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 36, 40, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.auth-shell {
  display: flex;
  width: min(1160px, 100%);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  flex-direction: column;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.environment-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.environment-note::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 99, 93, 0.12);
}

.auth-main {
  display: grid;
  flex: 1;
  align-items: center;
  gap: clamp(34px, 6vw, 88px);
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  padding: 46px 0;
}

.auth-intro {
  max-width: 650px;
  padding: 10px 0;
}

.auth-intro h1 {
  max-width: 620px;
  margin-top: 13px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.auth-lede {
  max-width: 570px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.auth-facts {
  display: grid;
  max-width: 620px;
  margin-top: 32px;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.auth-fact {
  padding: 16px 16px 17px 0;
}

.auth-fact + .auth-fact {
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.auth-fact dt {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-fact dd {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-card {
  position: relative;
  padding: clamp(22px, 3vw, 31px);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth-card::before {
  position: absolute;
  top: -1px;
  right: 22px;
  left: 22px;
  height: 3px;
  content: "";
  border-radius: 0 0 3px 3px;
  background: var(--brass);
}

.auth-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-card-heading h2 {
  margin-top: 4px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.secure-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.server-settings {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.server-settings summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  list-style-position: outside;
}

.server-settings summary:hover {
  color: var(--ink);
}

.server-settings[open] summary {
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.signin-form .form-error {
  margin-top: -2px;
}

.auth-footnote {
  color: var(--muted-soft);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.015em;
}

.auth-footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-soft);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #a8bebf;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-rule {
  width: 1px;
  height: 23px;
  background: rgba(255, 255, 255, 0.19);
}

.topbar-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.connection-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  color: #d8e7e5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70b79c;
  box-shadow: 0 0 0 2px rgba(112, 183, 156, 0.16);
}

.connection-state.is-offline {
  color: #f2d5d2;
  border-color: rgba(229, 142, 132, 0.42);
}

.connection-state.is-offline .connection-dot {
  background: #e18f84;
  box-shadow: 0 0 0 2px rgba(225, 143, 132, 0.16);
}

.actor-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 0 3px 0 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.actor-avatar {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  color: #e9d7be;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.actor-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  line-height: 1.25;
}

.actor-role {
  max-width: 130px;
  overflow: hidden;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actor-meta {
  max-width: 190px;
  overflow: hidden;
  color: #9eb5b6;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-body {
  display: grid;
  min-height: calc(100vh - var(--topbar-height));
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  display: flex;
  height: calc(100vh - var(--topbar-height));
  flex-direction: column;
  justify-content: space-between;
  padding: 21px 14px 15px;
  overflow-y: auto;
  background: #f8faf8;
  border-right: 1px solid var(--line);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.count-badge {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  color: var(--muted);
  background: var(--canvas-deep);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.workflow-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
}

.workflow-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 9px 9px 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-align: left;
}

.workflow-link:hover:not(:disabled) {
  background: var(--paper);
  border-color: var(--line);
}

.workflow-link:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.workflow-link.is-active {
  background: var(--paper);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.workflow-link.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 3px;
  content: "";
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.workflow-index {
  display: inline-grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.workflow-link.is-active .workflow-index {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.workflow-link-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.workflow-link-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-link-meta {
  color: var(--muted-soft);
  font-size: 10px;
  line-height: 1.35;
}

.sidebar-empty {
  padding: 12px 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 7px 2px;
  border-top: 1px solid var(--line);
}

.sidebar-label {
  color: var(--muted-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.server-label {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.45;
}

.sidebar-note {
  color: var(--muted-soft);
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-footer .button {
  justify-content: flex-start;
  margin-top: 3px;
  padding-left: 0;
}

.main-content {
  min-width: 0;
  padding: 28px clamp(18px, 3.2vw, 38px) 56px;
}

.view-root {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading-main {
  min-width: 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.breadcrumb-button {
  min-height: 24px;
  padding: 1px 2px;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-size: 11.5px;
  font-weight: 650;
}

.breadcrumb-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #a5b0ad;
}

.page-heading h1 {
  max-width: 900px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 33px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.page-description {
  max-width: 780px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.page-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 20px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}

.meta-pill {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 2px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.meta-pill--accent {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.dashboard-top {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.panel-heading h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.panel-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel-body {
  padding: 18px 20px 20px;
}

.panel-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.panel-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.start-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .field--wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 3px;
}

.form-note {
  color: var(--muted-soft);
  font-size: 11px;
  line-height: 1.45;
}

.panel--start {
  overflow: hidden;
}

.panel--start .panel-body {
  padding-top: 15px;
}

.workflow-brief {
  overflow: hidden;
}

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brief-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.brief-row:last-child {
  border-bottom: 0;
}

.brief-row dt {
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brief-row dd {
  min-width: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.brief-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.brief-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.details-panel {
  margin-top: 18px;
}

.details-panel > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
}

.details-panel > summary::marker {
  color: var(--muted-soft);
}

.details-panel > summary:hover {
  color: var(--accent-strong);
}

.details-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.section-block {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.section-heading h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 10px 13px;
  color: var(--muted-soft);
  background: var(--paper-muted);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  text-transform: uppercase;
}

.data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfcfb;
}

.run-reference {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-reference-sub {
  display: block;
  max-width: 280px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-muted {
  color: var(--muted);
  white-space: nowrap;
}

.table-wrap .button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.empty-state {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px 22px;
  text-align: center;
}

.empty-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  background: var(--paper-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.empty-state h3 {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
}

.empty-state p {
  max-width: 460px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.empty-state .button-row {
  justify-content: center;
  margin-top: 14px;
}

.definition-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.definition-step {
  display: grid;
  gap: 10px;
  grid-template-columns: 25px minmax(0, 1fr);
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-muted);
}

.definition-index {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
}

.definition-step h3 {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.definition-step p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.definition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.tag {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.tag--accent {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.tag--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #e9d6af;
}

.tag--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #e5c2be;
}

.status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.status--active {
  color: var(--info);
  background: var(--info-soft);
  border-color: #c4d8e4;
}

.status--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #c4dfd1;
}

.status--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #e7d3a8;
}

.status--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #e7c6c2;
}

.status--neutral {
  color: var(--muted);
  background: var(--paper-muted);
  border-color: var(--line);
}

.status--accent {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.problem {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 15px;
  color: var(--danger-strong);
  background: var(--danger-soft);
  border: 1px solid #e5c1bd;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
}

.problem--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #ead6ac;
}

.problem--info {
  color: var(--info);
  background: var(--info-soft);
  border-color: #cadde8;
}

.problem-mark {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.problem-body {
  min-width: 0;
}

.problem-title {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.problem-message {
  margin-top: 2px;
  color: inherit;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.problem-hint {
  margin-top: 5px;
  color: inherit;
  font-size: 11.5px;
  line-height: 1.5;
  opacity: 0.9;
}

.problem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.problem .button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 11px;
}

.section-error {
  margin-bottom: 12px;
}

.offline-strip {
  margin-bottom: 16px;
}

.workflow-loading {
  display: flex;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.run-header {
  margin-bottom: 18px;
}

.run-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.run-title-row h1 {
  min-width: 0;
}

.run-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.run-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.run-summary-label {
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.run-summary-value {
  color: var(--ink-soft);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.run-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.next-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 20px;
  margin-bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.next-action.is-attention {
  border-left-color: var(--warning);
}

.next-action.is-complete {
  border-left-color: var(--success);
}

.next-action.is-danger {
  border-left-color: var(--danger);
}

.next-action-copy {
  min-width: 0;
}

.next-action-label {
  color: var(--muted-soft);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.next-action h2 {
  margin-top: 4px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.next-action p {
  max-width: 720px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.next-action-actions {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
}

.progress-block {
  padding: 13px 20px;
  margin-bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.progress-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.progress-label-row strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--canvas-deep);
}

.progress::-webkit-progress-bar {
  background: var(--canvas-deep);
  border-radius: 999px;
}

.progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.activity-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  margin-bottom: 13px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.activity-strip.is-warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #ead6ac;
}

.activity-copy {
  min-width: 0;
}

.run-layout {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: minmax(250px, 292px) minmax(0, 1fr);
}

.step-rail {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  max-height: calc(100vh - var(--topbar-height) - 36px);
  overflow-y: auto;
}

.step-rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px 11px;
  border-bottom: 1px solid var(--line);
}

.step-rail-heading h2 {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-rail-heading span {
  color: var(--muted-soft);
  font-size: 10px;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px;
  list-style: none;
}

.step-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 60px;
  align-items: start;
  gap: 8px;
  padding: 9px 8px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  grid-template-columns: 23px minmax(0, 1fr);
  text-align: left;
}

.step-button:hover {
  background: var(--paper-muted);
  border-color: var(--line);
}

.step-button.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.step-button.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -1px;
  width: 3px;
  content: "";
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.step-number {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.step-button.is-active .step-number {
  color: var(--accent-strong);
  border-color: var(--accent-line);
  background: var(--paper);
}

.step-button.is-complete .step-number {
  color: var(--success);
  border-color: #c4dfd1;
  background: var(--success-soft);
}

.step-button-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.step-button-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-button-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.step-button .status {
  min-height: 18px;
  padding: 1px 5px;
  font-size: 8.5px;
}

.step-rail-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
  color: var(--muted-soft);
  font-size: 9.5px;
  line-height: 1.4;
}

.step-panel {
  min-width: 0;
  overflow: hidden;
  scroll-margin-top: calc(var(--topbar-height) + 14px);
}

.delivery-panel,
.action-panel {
  scroll-margin-top: calc(var(--topbar-height) + 14px);
}

.confirm-copy p + p {
  margin-top: 8px;
}

.step-panel-header {
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.step-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.step-panel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 11px;
  margin-top: 5px;
}

.step-panel-title-row h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.step-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.step-instructions {
  max-width: 860px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.step-panel-body {
  padding: 20px 22px 22px;
}

.block {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.block-heading h3,
.block-subheading {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.block-subheading {
  margin-bottom: 8px;
}

.block-heading p {
  margin-top: 2px;
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.4;
}

.block-heading-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.issue-item {
  padding: 8px 10px;
  color: var(--warning);
  background: var(--warning-soft);
  border-left: 3px solid #d7b36e;
  border-radius: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.issue-item.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-left-color: #d0958f;
}

.issue-title {
  font-weight: 700;
}

.issue-message {
  display: block;
  margin-top: 1px;
}

.scan-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 13px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-muted);
  font-size: 11.5px;
}

.scan-context-label {
  color: var(--muted-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-context-value {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  list-style: none;
}

.document-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.document-icon {
  display: inline-grid;
  width: 32px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--accent-strong);
  background: var(--paper-tint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.document-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.document-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-meta {
  color: var(--muted-soft);
  font-size: 9.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.document-row .button {
  min-height: 29px;
  padding: 4px 9px;
  font-size: 10.5px;
}

.document-empty {
  padding: 12px;
  color: var(--muted);
  background: var(--paper-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 1.5;
}

.upload-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.upload-note {
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.upload-activity {
  margin-top: 9px;
}

.upload-activity-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 600;
}

.upload-activity progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--canvas-deep);
}

.upload-activity progress::-webkit-progress-bar {
  background: var(--canvas-deep);
}

.upload-activity progress::-webkit-progress-value {
  background: var(--accent);
}

.upload-activity progress::-moz-progress-bar {
  background: var(--accent);
}

.station-capture {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-muted);
}

.station-capture-copy {
  min-width: 160px;
  flex: 1;
}

.station-capture-title {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.station-capture-meta {
  margin-top: 1px;
  color: var(--muted-soft);
  font-size: 10px;
  line-height: 1.4;
}

.station-capture .field {
  min-width: 170px;
}

.station-capture .field label {
  font-size: 10px;
}

.station-capture .field select {
  min-height: 35px;
  padding: 6px 8px;
  font-size: 11px;
}

.fields-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fields-grid .field--wide {
  grid-column: 1 / -1;
}

.field-readonly-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.field-readonly {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(100px, 0.32fr) minmax(0, 1fr);
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: 11.5px;
}

.field-readonly:last-child {
  border-bottom: 0;
}

.field-readonly dt {
  color: var(--muted);
  font-size: 10.5px;
}

.field-readonly dd {
  min-width: 0;
  color: var(--ink-soft);
  font-weight: 550;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.field-note {
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.field-empty {
  padding: 13px;
  color: var(--muted);
  background: var(--paper-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  line-height: 1.5;
}

.action-panel {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
}

.action-panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.action-copy {
  min-width: 0;
  flex: 1 1 340px;
}

.action-copy h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.action-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.secondary-actions {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.secondary-actions summary {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.secondary-actions .button-row {
  margin-top: 8px;
}

.delivery-panel {
  margin-top: 18px;
}

.delivery-list {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.delivery-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.delivery-row:nth-child(odd) {
  padding-right: 16px;
}

.delivery-row:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.delivery-row dt {
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.delivery-row dd {
  color: var(--ink-soft);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.json-preview {
  max-height: 55vh;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #dbe8e5;
  background: #132e36;
  border: 1px solid #0c2026;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre;
}

.design-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.55fr);
}

.design-panel {
  overflow: hidden;
}

.design-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.prompt-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.prompt-input {
  min-height: 190px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  line-height: 1.55;
  resize: vertical;
}

.prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 99, 93, 0.13);
  outline: none;
}

.draft-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.draft-editor {
  min-height: 430px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  tab-size: 2;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.draft-actions-copy {
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.question-panel {
  padding: 13px;
  background: var(--paper-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.question-panel h3 {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 19px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guidance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.guidance-item {
  display: grid;
  gap: 9px;
  grid-template-columns: 22px minmax(0, 1fr);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.guidance-index {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
}

.guidance-item strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 650;
}

.canvas-empty {
  max-width: 780px;
  margin: 7vh auto 0;
}

.canvas-empty .panel-body {
  padding: 30px;
}

.canvas-empty h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.canvas-empty p {
  max-width: 570px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.canvas-empty .button-row {
  margin-top: 17px;
}

.dialog-modal {
  width: min(660px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(13, 32, 36, 0.25);
}

.dialog-modal[open] {
  display: flex;
  flex-direction: column;
}

.dialog-modal--wide {
  width: min(920px, calc(100vw - 28px));
}

.dialog-modal::backdrop {
  background: rgba(12, 31, 35, 0.52);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-header-copy {
  min-width: 0;
}

.modal-header h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.modal-header p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.modal-close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 19px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
  background: var(--paper-muted);
}

.modal-body {
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-message {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.preview-stage {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  background: #e8ece9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-stage img {
  display: block;
  max-height: 65vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.preview-stage iframe {
  width: 100%;
  height: min(65vh, 680px);
  border: 0;
  background: var(--paper);
}

.preview-fallback {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.preview-note {
  margin-top: 10px;
  color: var(--muted-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.camera-stage {
  position: relative;
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  background: #0e2227;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.camera-stage video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #0e2227;
  object-fit: contain;
}

.camera-loading {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c6d8d7;
  font-size: 12px;
}

.camera-error {
  margin-top: 12px;
}

.confirm-copy {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.confirm-copy strong {
  color: var(--ink);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(237, 240, 238, 0.94);
  backdrop-filter: blur(3px);
}

.boot-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 19px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  width: min(380px, calc(100vw - 36px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 13px;
  color: #eef6f4;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  animation: toast-in 140ms ease-out;
}

.toast--error {
  background: #5f2824;
  border-color: #7c433e;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  align-content: center;
  max-width: 620px;
  margin: auto;
  padding: 28px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.noscript-message h1 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 24px;
}

.noscript-message p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .topbar-context {
    display: none;
  }

  .auth-main {
    gap: 42px;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.8fr);
  }

  .auth-facts {
    grid-template-columns: 1fr;
  }

  .auth-fact {
    padding: 10px 0;
  }

  .auth-fact + .auth-fact {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .auth-fact dd {
    margin-top: 2px;
  }
}

@media (max-width: 1030px) {
  .dashboard-top {
    grid-template-columns: 1fr;
  }

  .design-layout {
    grid-template-columns: 1fr;
  }

  .run-layout {
    grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  }

  .actor-meta {
    display: none;
  }

  .actor-role {
    max-width: 105px;
  }
}

@media (max-width: 900px) {
  .auth-view {
    padding: 22px;
  }

  .auth-main {
    gap: 34px;
    grid-template-columns: 1fr;
    padding: 34px 0;
  }

  .auth-intro {
    max-width: 740px;
  }

  .auth-intro h1 {
    max-width: 700px;
    font-size: clamp(30px, 6vw, 42px);
  }

  .auth-lede {
    max-width: 680px;
  }

  .auth-facts {
    max-width: 680px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-fact {
    padding: 13px 13px 13px 0;
  }

  .auth-fact + .auth-fact {
    padding-left: 13px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 13px 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-section {
    gap: 9px;
  }

  .sidebar-heading {
    padding: 0 2px;
  }

  .sidebar-section > .button--wide {
    width: auto;
    align-self: flex-start;
  }

  .workflow-nav {
    flex-direction: row;
    gap: 7px;
    margin-top: 2px;
    padding-bottom: 3px;
    overflow-x: auto;
  }

  .workflow-link {
    width: auto;
    min-width: 220px;
    max-width: 290px;
    flex: 0 0 auto;
  }

  .sidebar-empty {
    padding-left: 2px;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding-top: 22px;
  }

  .run-layout {
    grid-template-columns: 1fr;
  }

  .step-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .step-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-button {
    min-height: 55px;
  }

  .step-rail-footer {
    display: none;
  }

  .actor-context {
    border-left: 0;
    padding-left: 0;
  }

  .brand--topbar .brand-tagline {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-height);
    flex-wrap: wrap;
    gap: 9px 13px;
    padding: 10px 15px;
  }

  .brand--topbar {
    min-height: 36px;
  }

  .topbar-tools {
    gap: 7px;
  }

  .topbar-tools .button {
    min-height: 32px;
    padding: 5px 9px;
  }

  .connection-state {
    display: none;
  }

  .actor-avatar {
    width: 25px;
    height: 25px;
  }

  .actor-role {
    max-width: 90px;
    font-size: 10.5px;
  }

  .page-heading {
    flex-direction: column;
    gap: 4px;
  }

  .page-heading-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 7px;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .main-content {
    padding: 19px 15px 42px;
  }

  .next-action {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .next-action-actions {
    width: 100%;
    padding-top: 0;
  }

  .fields-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .delivery-list {
    grid-template-columns: 1fr;
  }

  .delivery-row:nth-child(odd),
  .delivery-row:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .step-panel-header {
    padding: 16px 16px 14px;
  }

  .step-panel-body {
    padding: 16px;
  }

  .action-panel {
    padding: 14px 16px;
  }

  .step-panel-title-row h2 {
    font-size: 21px;
  }

  .panel-heading {
    padding: 15px 16px 0;
  }

  .panel-body {
    padding: 15px 16px 17px;
  }

  .panel-footer {
    padding: 12px 16px;
  }

  .design-body {
    padding: 16px;
  }

  .attempt-note {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-view {
    padding: 16px;
  }

  .auth-shell {
    min-height: calc(100vh - 32px);
  }

  .auth-header {
    align-items: flex-start;
    padding-bottom: 16px;
  }

  .environment-note {
    display: none;
  }

  .brand--auth .brand-mark {
    width: 43px;
    height: 43px;
    font-size: 13px;
  }

  .brand--auth .brand-name {
    font-size: 18px;
  }

  .auth-main {
    gap: 24px;
    padding: 26px 0;
  }

  .auth-intro h1 {
    margin-top: 9px;
    font-size: 31px;
  }

  .auth-lede {
    margin-top: 12px;
    font-size: 14px;
  }

  .auth-facts {
    display: none;
  }

  .auth-card {
    padding: 20px 17px;
  }

  .auth-card-heading h2 {
    font-size: 21px;
  }

  .auth-card-heading .secure-badge {
    display: none;
  }

  .auth-footer {
    gap: 7px;
    font-size: 10px;
  }

  .auth-footer-separator:nth-of-type(2),
  .auth-footer span:last-child {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand--topbar .brand-name {
    font-size: 14px;
  }

  .brand--topbar .brand-mark {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }

  .topbar-tools {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .actor-context {
    margin-right: auto;
  }

  .actor-role {
    max-width: none;
  }

  .sidebar {
    padding: 11px 15px;
  }

  .workflow-link {
    min-width: 195px;
    max-width: 240px;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-button {
    min-height: 52px;
  }

  .run-summary {
    gap: 6px 10px;
  }

  .run-summary-item {
    font-size: 10.5px;
  }

  .run-summary-label {
    display: none;
  }

  .breadcrumbs {
    margin-bottom: 6px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .section-heading {
    flex-direction: column;
    gap: 6px;
  }

  .station-capture {
    align-items: stretch;
  }

  .station-capture .field {
    min-width: 100%;
  }

  .station-capture .button {
    width: 100%;
  }

  .modal-header {
    padding: 15px 15px 12px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    padding: 11px 15px;
  }

  .dialog-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .toast-region {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .field-readonly {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .table-wrap {
    border-radius: var(--radius-sm);
  }

  .data-table {
    min-width: 610px;
  }

  .document-row {
    align-items: flex-start;
  }

  .document-row .button {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spinner {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}
