/* src/web/styles.css */
:root {
  --brand: #1b3a5f;
  --brand-strong: #16324f;
  --brand-deep: #0f2237;
  --brand-soft: #e8eef5;
  --brand-tint: #f4f7fb;
  --fo-filing-blue: #1b3a5f;
  --fo-mid-blue: #335e8c;
  --fo-light-blue: #5b86b3;
  --fo-ops-on-dark: #7fa6cf;
  --fo-reversed-bg: #0f2237;
  --fo-ink: #16202e;
  --fo-paper: #ebeef1;
  --ink-900: #16242b;
  --ink-800: #1d3037;
  --ink-700: #2b3a40;
  --ink-600: #46565d;
  --ink-500: #68777d;
  --ink-400: #8a979c;
  --canvas: #f3f6f9;
  --surface: #ffffff;
  --surface-sunken: #f7f9fc;
  --line: #dde3ea;
  --line-strong: #c8d0da;
  --line-soft: #eef1f5;
  --ok: #1e7a54;
  --ok-ink: #1d5a42;
  --ok-soft: #e7f5ec;
  --ok-line: #bfe0cc;
  --attention-ink: #7a531c;
  --attention-soft: #fff4d8;
  --attention-line: #ead7a3;
  --danger: #b3382f;
  --danger-ink: #7d2d2d;
  --danger-soft: #fdecec;
  --danger-line: #e8bdbd;
  --gold: #9a6f24;
  --gold-soft: #f8efd8;
  --gold-line: #e6d4a4;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 35, 43, 0.07);
  --shadow-md: 0 8px 24px rgba(20, 35, 43, 0.06);
  --shadow-lg: 0 20px 54px rgba(20, 35, 43, 0.14);
  --ring: 0 0 0 3px rgba(27, 58, 95, 0.28);
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--canvas);
  color: var(--ink-800);
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
h1,
h2,
h3 {
  letter-spacing: -0.01em;
  margin: 0;
}
.muted {
  color: var(--ink-500);
  line-height: 1.55;
  margin: 8px 0 0;
}
.small {
  font-size: 13px;
}
.eyebrow {
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  align-items: center;
  border-radius: var(--radius-md);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 80ms ease;
  white-space: nowrap;
}
.primary-button:active,
.secondary-button:active,
.ghost-button:active {
  transform: translateY(1px);
}
.primary-button {
  background: var(--brand);
  border: 1px solid var(--brand);
  box-shadow: var(--shadow-sm);
  color: #fff;
  padding: 0 18px;
}
.primary-button:hover:not(:disabled) {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.secondary-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--brand-strong);
  padding: 0 14px;
}
.secondary-button:hover:not(:disabled) {
  border-color: var(--brand);
}
.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-600);
  padding: 0 14px;
}
.ghost-button:hover:not(:disabled) {
  background: var(--surface-sunken);
  border-color: var(--line-strong);
  color: var(--ink-700);
}
.compact {
  min-height: 32px;
  padding: 0 10px;
}
.icon-button {
  aspect-ratio: 1;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  color: var(--ink-600);
  min-height: 36px;
  padding: 0;
  width: 36px;
}
.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink-800);
}
label {
  color: var(--ink-700);
  display: grid;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
}
input,
select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus,
select:focus,
button:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--ring);
  outline: none;
}
input:disabled,
select:disabled {
  background: var(--surface-sunken);
  color: var(--ink-500);
  cursor: not-allowed;
}
.field-help {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hidden-input {
  display: none;
}
.form-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  color: var(--danger-ink);
  font-size: 13px;
  margin: 0;
  padding: 10px 12px;
}
.status-pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  letter-spacing: 0.01em;
  padding: 4px 11px;
  white-space: nowrap;
}
.status-pill--draft {
  background: var(--surface-sunken);
  border-color: var(--line);
  color: var(--ink-500);
}
.status-pill--extracting {
  background: var(--brand-soft);
  border-color: #c5d6e8;
  color: var(--brand-strong);
}
.status-pill--review {
  background: var(--attention-soft);
  border-color: var(--attention-line);
  color: var(--attention-ink);
}
.status-pill--ready {
  background: var(--ok-soft);
  border-color: var(--ok-line);
  color: var(--ok-ink);
}
.status-pill--filed {
  background: var(--ok-soft);
  border-color: var(--ok-line);
  color: var(--ok-ink);
}
.status-pill--error {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger-ink);
}
.auth-shell {
  align-items: center;
  background:
    radial-gradient(
      1200px 600px at 12% -10%,
      rgba(27, 58, 95, 0.1),
      transparent 60%),
    linear-gradient(
      180deg,
      #eaf0f7,
      var(--canvas));
  display: flex;
  min-height: 100vh;
  padding: 24px;
}
.auth-layout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  margin: 0 auto;
  max-width: 940px;
  overflow: hidden;
  width: 100%;
}
.auth-brand {
  background:
    radial-gradient(
      800px 360px at 110% -20%,
      rgba(127, 166, 207, 0.2),
      transparent 55%),
    linear-gradient(
      160deg,
      var(--fo-filing-blue),
      var(--fo-reversed-bg));
  color: #dce6f1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  padding: 44px 40px;
}
.auth-brand__logo {
  margin: 0;
  color: #fff;
}
.auth-brand__by {
  margin-top: 2px;
}
.auth-brand__by .fo-by__label {
  color: #8aa0bb;
}
.auth-brand__by .fo-by__name,
.auth-brand__by .fo-by__mark {
  color: #dce6f1;
}
.auth-brand__by .fo-by__ops {
  color: var(--fo-ops-on-dark);
}
.reacs-logo {
  align-items: center;
  display: inline-flex;
  gap: 14px;
}
.reacs-logo__mark {
  color: var(--fo-filing-blue);
  flex: none;
}
.reacs-logo__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1;
}
.reacs-wordmark {
  color: var(--fo-ink);
  font-family:
    "Hanken Grotesk",
    Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 0.95;
}
.reacs-tagline {
  color: #7a8694;
  font-family:
    "IBM Plex Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.fo-by {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.fo-by__label {
  color: #8a94a0;
  font-family:
    "IBM Plex Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.fo-by__mark {
  color: var(--fo-filing-blue);
  flex: none;
}
.fo-by__name {
  color: var(--fo-ink);
  font-family:
    "Hanken Grotesk",
    Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fo-by__ops {
  color: var(--fo-mid-blue);
}
.auth-brand__logo .reacs-logo__mark {
  color: #fff;
}
.auth-brand__logo .reacs-wordmark {
  color: #fff;
}
.auth-brand__logo .reacs-tagline {
  color: #9fb3c9;
}
.topbar-logo {
  gap: 9px;
  margin-bottom: 4px;
}
.topbar-logo .reacs-wordmark {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.auth-tagline {
  color: #c2d2e4;
  font-size: 15px;
  line-height: 1.55;
  margin: 4px 0 10px;
  max-width: 38ch;
}
.auth-points {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-points li {
  align-items: flex-start;
  color: #eaf0f7;
  display: grid;
  font-size: 14px;
  font-weight: 600;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  line-height: 1.4;
}
.auth-points svg {
  color: #7fa6cf;
  margin-top: 1px;
}
.auth-panel {
  display: grid;
  gap: 22px;
  padding: 44px 40px;
}
.auth-panel h2 {
  font-size: 22px;
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-mfa-setup {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}
.auth-mfa-qr {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px;
}
.auth-mfa-setup code {
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 12px;
  padding: 2px 6px;
}
.app-shell {
  min-height: 100vh;
}
.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-lead {
  align-items: center;
  display: flex;
  gap: 14px;
}
.topbar h1 {
  font-size: 21px;
}
.app-body {
  min-height: calc(100vh - 72px);
}
.content {
  padding: 24px;
}
.single-page-content {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}
.account-bar {
  align-items: center;
  display: flex;
  gap: 10px;
}
.account-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 5px 14px 5px 6px;
}
.account-button:hover {
  border-color: var(--line-strong);
}
.account-avatar {
  align-items: center;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.account-id {
  display: grid;
  line-height: 1.2;
  text-align: left;
}
.account-id strong {
  font-size: 13px;
}
.account-id small {
  color: var(--ink-500);
  font-size: 12px;
}
.panel,
.side-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.panel {
  padding: 22px;
}
.fill-panel {
  min-height: 0;
}
.side-panel {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 18px;
}
.panel-header {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.panel h2 {
  font-size: 23px;
}
.panel h3,
.side-panel h3 {
  margin: 0 0 12px;
}
.empty-state {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-500);
  display: flex;
  min-height: 110px;
  padding: 18px;
}
.count-chip {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 800;
  min-width: 24px;
  padding: 2px 8px;
  text-align: center;
}
.workflow-stack {
  display: grid;
  gap: 18px;
}
.engagement-actionbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}
.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stepper {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 6px 10px;
}
.stepper-step {
  align-items: center;
  color: var(--ink-400);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  padding: 2px 6px;
  position: relative;
}
.stepper-step:not(:last-child)::after {
  background: var(--line);
  content: "";
  height: 2px;
  margin: 0 4px;
  width: 18px;
}
.stepper-dot {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-500);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.stepper-step--current {
  color: var(--brand-strong);
}
.stepper-step--current .stepper-dot {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-strong);
}
.stepper-step--done {
  color: var(--ink-700);
}
.stepper-step--done .stepper-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.workflow-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}
.workspace-main {
  display: grid;
  gap: 18px;
}
.workspace-side {
  align-content: start;
  display: grid;
  gap: 18px;
}
.lock-chip {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-500);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  padding: 4px 10px;
}
.source-panel {
  gap: 12px;
}
.source-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.source-panel-head h3 {
  margin: 0;
}
.source-list {
  display: grid;
  gap: 8px;
}
.source-row {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 12px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  padding: 10px 12px;
}
.source-row svg {
  color: var(--brand);
}
.source-row strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-row span {
  color: var(--ink-500);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}
.source-row-remove {
  color: var(--ink-400);
}
.source-row-remove:hover {
  border-color: var(--danger-line);
  color: var(--danger);
}
.drop-zone {
  align-items: center;
  background: var(--brand-tint);
  border: 2px dashed #a6c0db;
  border-radius: var(--radius-lg);
  color: var(--brand-strong);
  cursor: pointer;
  display: flex;
  gap: 14px;
  min-height: 120px;
  padding: 20px;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.drop-zone svg {
  color: var(--brand);
}
.drop-zone.dragging,
.drop-zone:focus-visible {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-strong);
  outline: none;
}
.drop-zone strong,
.drop-zone span {
  display: block;
}
.drop-zone strong {
  font-size: 17px;
}
.drop-zone span {
  color: var(--ink-500);
  margin-top: 4px;
}
.drop-zone.hero-zone {
  flex-direction: column;
  justify-content: center;
  margin: 18px 0 0;
  min-height: 230px;
  text-align: center;
}
.drop-zone.compact-zone {
  gap: 10px;
  min-height: 0;
  padding: 11px 14px;
}
.drop-zone.compact-zone strong {
  font-size: 13px;
}
.drop-zone.compact-zone span {
  font-size: 11px;
  margin-top: 1px;
}
.upload-hero {
  display: grid;
  gap: 6px;
  padding: 36px;
  text-align: center;
}
.upload-hero h2 {
  font-size: 26px;
}
.upload-hero .muted {
  margin: 0 auto;
  max-width: 560px;
}
.progress-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  position: sticky;
  top: 84px;
  z-index: 6;
}
.progress-block.complete {
  border-left-color: var(--ok);
}
.progress-block.failed {
  border-left-color: var(--danger);
}
.progress-track {
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  height: 8px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  background: var(--brand);
  border-radius: var(--radius-pill);
  height: 100%;
  transition: width 220ms ease;
}
.progress-block.complete .progress-fill {
  background: var(--ok);
}
.progress-block.failed .progress-fill {
  background: var(--danger);
  width: 100%;
}
.progress-fill.indeterminate {
  animation: progress-slide 1.1s ease-in-out infinite;
  width: 40%;
}
@keyframes progress-slide {
  0% {
    margin-left: -40%;
  }
  100% {
    margin-left: 100%;
  }
}
.progress-label {
  align-items: center;
  color: var(--ink-700);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  margin: 0;
}
.progress-block.failed .progress-label {
  color: var(--danger-ink);
}
.progress-phase {
  background: var(--brand-soft);
  border-radius: var(--radius-pill);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  text-transform: uppercase;
}
.progress-pct {
  color: var(--brand-strong);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.progress-sub {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 650;
  margin: 0;
}
.extraction-blocked {
  align-items: center;
  background: var(--attention-soft);
  border: 1px solid var(--attention-line);
  border-radius: var(--radius-md);
  color: var(--attention-ink);
  display: flex;
  font-weight: 700;
  gap: 10px;
  padding: 12px 14px;
}
.spin {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.engagements-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.engagements-head h2 {
  font-size: 28px;
}
.engagements-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.toolbar-right {
  align-items: center;
  display: flex;
  gap: 8px;
}
.segmented {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: inline-flex;
  gap: 3px;
  padding: 3px;
}
.segmented button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-600);
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
}
.segmented button.active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--brand-strong);
}
.seg-count {
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  color: var(--ink-500);
  font-size: 11px;
  padding: 1px 7px;
}
.segmented button.active .seg-count {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.search-box {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-500);
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
}
.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.search-box input {
  background: transparent;
  border: 0;
  min-height: auto;
  padding: 0;
}
.search-box input:focus,
.search-box input:focus-visible {
  box-shadow: none;
  outline: none;
}
.engagement-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.engagement-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition:
    box-shadow 140ms ease,
    transform 140ms ease,
    border-color 140ms ease;
}
.engagement-card::before {
  background: var(--line-strong);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}
.engagement-card[data-status=ready]::before {
  background: var(--ok);
}
.engagement-card[data-status=filed]::before {
  background: var(--ok);
}
.engagement-card[data-status=review]::before {
  background: #d8a93a;
}
.engagement-card[data-status=error]::before {
  background: var(--danger);
}
.engagement-card[data-status=extracting]::before {
  background: var(--brand);
}
.engagement-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.engagement-card-open {
  background: transparent;
  border: 0;
  display: grid;
  gap: 14px;
  padding: 18px 18px 14px 20px;
  text-align: left;
  width: 100%;
}
.engagement-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.engagement-card-head h3 {
  font-size: 17px;
  line-height: 1.3;
}
.engagement-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.engagement-meta dt {
  color: var(--ink-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0 0 3px;
  text-transform: uppercase;
}
.engagement-meta dd {
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.engagement-meta dd.num {
  text-align: left;
}
.card-progress {
  display: grid;
  gap: 6px;
}
.card-progress-track {
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  height: 6px;
  overflow: hidden;
}
.card-progress-fill {
  background: var(--ok);
  border-radius: var(--radius-pill);
  height: 100%;
  transition: width 220ms ease;
}
.card-progress-text {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
}
.engagement-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.engagement-chips span {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-600);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 4px 9px;
}
.engagement-updated {
  align-items: center;
  color: var(--ink-400);
  display: flex;
  font-size: 12px;
  gap: 6px;
  margin: 0;
}
.engagement-card-actions {
  background: var(--surface-sunken);
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px;
}
.engagements-empty {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  color: var(--ink-500);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 52px 24px;
  text-align: center;
}
.engagements-empty svg {
  color: var(--brand);
  opacity: 0.7;
}
.engagements-empty strong {
  color: var(--ink-800);
  font-size: 18px;
}
.engagements-empty span {
  max-width: 420px;
}
.engagements-empty .primary-button {
  margin-top: 8px;
}
.engagement-card-skeleton {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 14px;
  padding: 20px;
}
.skeleton-line {
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  background:
    linear-gradient(
      90deg,
      var(--line-soft),
      #e6ebf2,
      var(--line-soft));
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  height: 12px;
}
.skeleton-line--title {
  height: 18px;
  width: 60%;
}
.skeleton-line--meta {
  width: 90%;
}
.skeleton-line--bar {
  height: 8px;
  width: 100%;
}
@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.review-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.review-meter {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
  padding: 14px 16px;
}
.review-meter-track {
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
}
.review-meter-fill {
  background: var(--ok);
  border-radius: var(--radius-pill);
  height: 100%;
  transition: width 220ms ease;
}
.review-meter-text {
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 650;
  margin: 0;
}
.review-meter-text strong {
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.review-meter-excluded {
  color: var(--ink-400);
}
.failed-sections {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.failed-section {
  align-items: center;
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-md);
  color: var(--danger-ink);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}
.failed-section-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
}
.review-scroll {
  display: grid;
  gap: 10px;
  max-height: 72vh;
  overflow-y: auto;
  padding-right: 4px;
}
.review-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.review-page[data-clean=true] {
  border-color: var(--ok-line);
}
.review-page-head {
  align-items: center;
  background: var(--surface-sunken);
  display: flex;
  gap: 10px;
  padding: 6px 12px 6px 4px;
}
.review-page[data-clean=true] .review-page-head {
  background: var(--ok-soft);
}
.review-page-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink-800);
  display: flex;
  flex: 1;
  gap: 8px;
  min-height: 40px;
  padding: 0 8px;
  text-align: left;
}
.review-page-toggle svg {
  color: var(--ink-400);
  flex: 0 0 auto;
}
.review-page-title {
  font-size: 15px;
  font-weight: 800;
}
.review-page-signal {
  align-items: center;
  display: flex;
  gap: 6px;
}
.review-page-signal span,
.rollup-review,
.rollup-error,
.rollup-ready {
  align-items: center;
  border-radius: var(--radius-pill);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  padding: 3px 9px;
  white-space: nowrap;
}
.rollup-review {
  background: var(--attention-soft);
  color: var(--attention-ink);
}
.rollup-error {
  background: var(--danger-soft);
  color: var(--danger-ink);
}
.rollup-ready {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.review-page-confirm {
  flex: 0 0 auto;
}
.review-page-body {
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 16px;
  padding: 14px;
}
.review-subsection {
  display: grid;
  gap: 8px;
}
.review-subsection-title {
  color: var(--ink-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}
.review-fields {
  display: grid;
  gap: 6px;
}
.review-field.detail {
  border-left: 2px solid var(--line);
  margin-left: 16px;
  padding-left: 12px;
}
.review-field-row {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1.4fr) minmax(120px, 1fr) 32px;
  padding: 6px 8px;
  transition: background 120ms ease;
}
.review-field-row--confirmed {
  background: var(--ok-soft);
}
.review-field-row--excluded {
  opacity: 0.62;
}
.review-confirm {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink-400);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.review-confirm:hover:not(:disabled) {
  background: var(--surface-sunken);
  color: var(--brand);
}
.review-field-row--confirmed .review-confirm {
  color: var(--ok);
}
.review-field-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.review-field-label strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-field-id {
  align-items: center;
  display: flex;
  gap: 8px;
}
.review-field-id code {
  color: var(--ink-400);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 11px;
}
.review-edited {
  align-items: center;
  background: var(--brand-soft);
  border-radius: var(--radius-pill);
  color: var(--brand-strong);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
}
.review-field-value {
  min-height: 36px;
}
.review-field-value.num,
.review-field-value.money {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.review-field-row--note {
  align-items: start;
  grid-template-columns: 30px minmax(0, 0.85fr) minmax(240px, 2fr) 32px;
}
.review-field-row--note .review-confirm {
  margin-top: 1px;
}
.review-note-area {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  font: inherit;
  line-height: 1.5;
  min-height: 88px;
  padding: 8px 12px;
  resize: vertical;
  width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.review-note-area:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
  outline: none;
}
.review-note-area:disabled {
  background: var(--surface-sunken);
  color: var(--ink-500);
}
.review-collapse-controls {
  border-right: 1px solid var(--line);
  display: inline-flex;
  gap: 4px;
  margin-right: 4px;
  padding-right: 8px;
}
.review-excluded-note {
  color: var(--ink-400);
  font-size: 11px;
  font-weight: 600;
  margin: 2px 0 4px 40px;
}
.review-row-menu {
  position: relative;
}
.review-row-menu-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-400);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.review-row-menu-trigger:hover {
  background: var(--surface-sunken);
  color: var(--ink-700);
}
.row-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 1px;
  min-width: 210px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 15;
}
.row-menu-source {
  color: var(--ink-400);
  font-size: 11px;
  margin: 2px 8px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}
.row-menu button:hover {
  background: var(--surface-sunken);
}
.row-menu button svg {
  color: var(--ink-400);
}
.row-menu-danger {
  color: var(--danger) !important;
}
.row-menu-danger:hover {
  background: var(--danger-soft) !important;
}
.row-menu-danger svg {
  color: var(--danger) !important;
}
.review-detail-group {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}
.review-detail-group-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.review-detail-group-head strong {
  font-size: 13px;
  font-weight: 800;
}
.review-detail-group-head code {
  color: var(--ink-400);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 11px;
}
.review-detail-count {
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 800;
  margin-left: auto;
  padding: 2px 9px;
}
.review-detail-records {
  display: grid;
  gap: 8px;
}
.review-detail-record {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}
.review-detail-record-title {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 2px;
  text-transform: uppercase;
}
.review-detail-record .review-field.detail {
  border-left: 0;
  margin-left: 0;
  padding-left: 0;
}
.review-issue {
  align-items: center;
  border-radius: var(--radius-md);
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  margin: 2px 0 4px 40px;
  padding: 7px 10px;
}
.review-issue.warning {
  background: var(--attention-soft);
  color: var(--attention-ink);
}
.review-issue.error {
  background: var(--danger-soft);
  color: var(--danger-ink);
}
.review-issue.info {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.review-issue.acknowledged {
  opacity: 0.55;
}
.review-issue-ack {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.8;
  text-decoration: underline;
}
.review-notes {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: 14px;
  padding: 4px 12px;
}
.review-notes summary {
  color: var(--ink-600);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  padding: 8px 0;
}
.review-notes-list {
  display: grid;
  gap: 6px;
  padding: 0 0 10px;
}
.open-hud {
  background:
    linear-gradient(
      180deg,
      var(--gold-soft),
      var(--surface) 80%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 12px;
  padding: 16px;
}
.open-hud-copy {
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}
.open-hud-button {
  width: 100%;
}
.add-field-dialog {
  align-self: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100dvh - 48px));
  max-width: 560px;
  overflow: hidden;
  width: 100%;
}
.add-field-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px 14px;
}
.add-field-head h2 {
  font-size: 20px;
  margin: 2px 0 0;
}
.add-field-search {
  margin: 14px 20px 0;
}
.add-field-list {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 20px 20px;
}
.add-field-group {
  display: grid;
  gap: 4px;
}
.add-field-group-title {
  color: var(--ink-400);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 2px;
  text-transform: uppercase;
}
.add-field-item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto 16px;
  padding: 9px 12px;
  text-align: left;
}
.add-field-item:hover {
  background: var(--brand-tint);
  border-color: #b7cbe1;
}
.add-field-item-label {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.add-field-item code {
  color: var(--ink-400);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 11px;
}
.add-field-item-sub {
  color: var(--ink-400);
  font-size: 11px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.add-field-item svg {
  color: var(--brand);
}
.modal-backdrop {
  align-items: stretch;
  background: rgba(19, 30, 35, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow: auto;
  padding: 24px;
  position: fixed;
  z-index: 20;
}
.account-dialog {
  align-self: flex-start;
  background: var(--canvas);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  max-width: 720px;
  overflow: hidden;
  width: 100%;
}
.account-dialog-head {
  align-items: flex-start;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}
.account-dialog-head h2 {
  margin: 2px 0 0;
}
.account-dialog-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px;
}
.account-dialog-foot {
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 20px;
}
.account-sync {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-sync.hosted {
  color: var(--ok-ink);
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  padding: 20px;
}
.settings-section-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 20px minmax(0, 1fr);
}
.settings-section-head svg {
  color: var(--brand);
}
.settings-section-head h3 {
  margin: 0;
}
.member-list {
  display: grid;
  gap: 8px;
}
.member-row {
  align-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 12px;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  padding: 10px 12px;
}
.member-avatar {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 50%;
  color: var(--brand-strong);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}
.member-row strong {
  display: block;
  font-size: 13px;
}
.member-row > div span {
  color: var(--ink-500);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}
.member-role {
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 700;
}
.member-state {
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
}
.member-state--active {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.member-state--invited {
  background: var(--attention-soft);
  color: var(--attention-ink);
}
.invite-row {
  display: flex;
  gap: 8px;
}
.invite-row input {
  flex: 1;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-about {
  align-items: center;
  color: var(--ink-400);
  display: flex;
  font-size: 12px;
  gap: 6px;
  margin: 0;
}
.terms-dialog {
  align-self: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(820px, calc(100dvh - 48px));
  max-width: 920px;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}
.terms-header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 20px;
}
.terms-header svg {
  color: var(--brand);
  flex: 0 0 auto;
}
.terms-header h2 {
  font-size: 23px;
}
.terms-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}
.terms-body h3 {
  margin: 0 0 10px;
}
.terms-body ul {
  margin: 0 0 18px;
  padding-left: 20px;
}
.terms-body li {
  line-height: 1.5;
  margin-bottom: 8px;
}
.terms-body pre {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  font-family:
    ui-monospace,
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}
.terms-actions {
  background: var(--surface);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 20px;
  position: sticky;
}
@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .auth-brand {
    padding: 32px 32px 28px;
  }
  .auth-panel {
    padding: 32px;
  }
  .workflow-grid {
    grid-template-columns: 1fr;
  }
  .engagement-actionbar {
    align-items: stretch;
  }
  .stepper {
    justify-content: space-between;
    overflow-x: auto;
  }
  .add-field-item {
    grid-template-columns: minmax(0, 1fr) auto 16px;
  }
  .add-field-item-sub {
    display: none;
  }
  .member-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
  .member-role {
    display: none;
  }
}
@media (max-width: 680px) {
  .modal-backdrop {
    padding: 12px;
  }
  .terms-dialog {
    max-height: calc(100dvh - 24px);
  }
  .terms-header,
  .terms-body {
    padding: 16px;
  }
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .content {
    padding: 14px;
  }
  .drop-zone {
    align-items: start;
    flex-direction: column;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stepper-step .stepper-label {
    display: none;
  }
  .stepper-step--current .stepper-label {
    display: inline;
  }
  .terms-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .engagements-head,
  .engagements-toolbar,
  .engagement-actionbar {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar-right {
    justify-content: space-between;
  }
  .search-box {
    flex: 1;
  }
  .engagement-grid {
    grid-template-columns: 1fr;
  }
  .review-field-row {
    grid-template-columns: 30px minmax(0, 1fr) 32px;
  }
  .review-field-value {
    grid-column: 2 / -1;
  }
  .review-meter {
    grid-template-columns: 1fr;
  }
  .account-id {
    display: none;
  }
}
/*# sourceMappingURL=main.css.map */
