:root {
  --ink: #1a212b;
  --muted: #66717d;
  --line: #e3e6e8;
  --paper: #f6f7f8;
  --blue: #3157d5;
  --green: #21735a;
  --sidebar: #17212c;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
}
[hidden] {
  display: none !important;
}
.auth-form {
  margin-top: 26px;
  max-width: 400px;
  display: grid;
  gap: 20px;
  text-align: left;
}
.auth-field { display: grid; gap: 8px; }
.auth-field label { color: var(--ink); font-weight: 600; }
.auth-field input {
  width: 100%; min-width: 0; padding: 12px 14px;
  border: 1px solid #bfc7ce; border-radius: 6px;
  color: var(--ink); background: white; font-size: 16px;
}
.auth-field small, .auth-invite-note { color: var(--muted); font-size: 12px; }
.auth-links { display: flex; justify-content: space-between; gap: 14px; }
.auth-error { color: #a63036; font-size: 14px; }
.auth-form .button { width: 100%; }
button,
select,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button,
select,
input,
a,
summary {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid #688dff;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1.1px;
  font-weight: 620;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
  font-weight: 620;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
p {
  color: var(--muted);
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip {
  position: fixed;
  top: -60px;
  left: 24px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  background: var(--sidebar);
  color: #f4f6f9;
  padding: 33px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: baseline;
  font-size: 31px;
  font-weight: 750;
  letter-spacing: -1.3px;
  line-height: 1;
}
.brand span {
  font-weight: 350;
}
.brand i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #86a2ff;
  margin-left: 5px;
}
.workspace-label {
  font-size: 8.5px;
  letter-spacing: 1.8px;
  margin-top: 14px;
  color: #8999aa;
}
.nav-item {
  background: #273341;
  padding: 13px 12px;
  margin: 47px -10px 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 550;
}
.nav-item svg {
  height: 17px;
  width: 17px;
  color: #a8bdfb;
}
.nav-dot {
  width: 5px;
  height: 5px;
  background: #8caaff;
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-note {
  margin-top: 84px;
}
.dashboard-link {
  display: block;
  color: #c2d1ff;
  font-size: 12px;
  margin: -38px 0 38px;
}
.dashboard-open {
  display: inline-block;
  margin-top: 16px;
}
.small-caps {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #8f9ead;
}
.sidebar-note p {
  font-size: 21px;
  line-height: 1.5;
  color: #d6dfe8;
  letter-spacing: -0.5px;
  margin-top: 16px;
}
.mini-rule {
  width: 29px;
  height: 2px;
  background: #7893d6;
  margin: 22px 0;
}
.sidebar-note > span:last-child {
  font-size: 12px;
  color: #96a5b4;
  line-height: 1.8;
}
.environment {
  margin-top: auto;
  font-size: 11px;
  color: #cbd3dc;
}
.environment small {
  display: block;
  color: #8c9aa9;
  font-size: 10px;
  padding-left: 13px;
  margin-top: 3px;
}
.environment-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8caaff;
  display: inline-block;
  margin-right: 8px;
}
.shell {
  margin-left: 218px;
  min-height: 100vh;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: #fff;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #b8c0c8;
}
.breadcrumb strong {
  font-weight: 550;
  color: var(--ink);
}
.account {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  color: var(--muted);
}
.text-button {
  border: none;
  background: none;
  padding: 5px 0;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 42px 42px 22px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: #7a8692;
  display: block;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 31px;
}
.page-heading h1 {
  margin: 10px 0 12px;
}
.page-heading p {
  font-size: 12px;
}
.event-field {
  min-width: 200px;
}
.event-field label {
  display: block;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.3px;
  margin-bottom: 9px;
  color: var(--muted);
}
select {
  width: 100%;
  border: 1px solid #d6dce2;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 11px 34px 11px 13px;
  font-size: 12px;
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 21px 26px;
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 0 15px;
}
.steps li:first-child {
  padding-left: 0;
}
.steps li:not(:last-child):after {
  content: "";
  position: absolute;
  right: 12px;
  height: 25px;
  border-right: 1px solid var(--line);
}
.step-number {
  color: #8a96a4;
  background: #f2f4f7;
  font-size: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.steps strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.steps small {
  display: block;
  font-size: 10px;
  color: #929ba5;
  margin-top: 2px;
}
.steps li.active .step-number {
  background: #e9eeff;
  color: var(--blue);
  box-shadow: 0 0 0 3px #f5f7ff;
}
.steps li.done .step-number {
  background: #eaf4ee;
  color: var(--green);
}
.steps li.active strong {
  color: var(--blue);
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 25px;
  align-items: start;
}
.work-column {
  display: grid;
  gap: 24px;
}
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.section-title .eyebrow {
  margin-bottom: 8px;
}
.source-card,
.review-card,
.history-card {
  padding: 25px 26px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.9px;
  line-height: 1.5;
  border-radius: 4px;
  padding: 5px 8px;
  white-space: nowrap;
}
.neutral {
  background: #f0f3f6;
  color: #74808c;
}
.success {
  background: #eaf4ee;
  color: var(--green);
}
.working {
  background: #edf1ff;
  color: var(--blue);
}
.warning {
  background: #fff3de;
  color: #9b651c;
}
.source-row {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  margin-top: 22px;
}
.source-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  background: #f4f6fa;
  border-radius: 6px;
  color: #657b9f;
  flex-shrink: 0;
}
.source-icon svg {
  width: 23px;
  height: 24px;
}
.source-row strong {
  font-size: 12px;
  font-weight: 600;
}
.source-row p {
  font-size: 10px;
  margin-top: 3px;
}
.connection-label {
  font-size: 9px;
  margin-left: auto;
  color: #5e7b6b;
}
.connection-label:before {
  content: "";
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  background: #5d9479;
  margin-right: 5px;
}
.source-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 20px;
}
.source-footer p {
  font-size: 10px;
  line-height: 1.8;
}
.button {
  border-radius: 5px;
  border: 1px solid transparent;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: background 0.15s;
}
.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 2px 3px #2447b115;
}
.primary:hover:not(:disabled) {
  background: #2547b7;
}
.secondary {
  background: white;
  border-color: #d5dce3;
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  background: #f5f7fb;
}
.button span {
  font-size: 16px;
  line-height: 1;
}
.review-card {
  min-height: 340px;
}
.empty-state {
  text-align: center;
  padding: 41px 0 21px;
}
.document-icon {
  position: relative;
  margin: 0 auto 16px;
  width: 56px;
  height: 65px;
  color: #b5c3d6;
}
.document-icon svg {
  width: 56px;
  height: 65px;
  stroke-width: 1.5;
}
.document-icon > span {
  position: absolute;
  right: -4px;
  bottom: 3px;
  background: #eef2f9;
  border: 3px solid #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #849bc5;
  font-size: 12px;
}
.empty-state h3 {
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.1px;
}
.empty-state p {
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.8;
}
.current-card {
  padding: 25px 23px;
}
.current-card .section-title {
  margin: 10px 0 16px;
}
.current-card h2 {
  font-size: 15px;
}
.current-card > p {
  font-size: 11px;
  line-height: 1.8;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd3dc;
  flex-shrink: 0;
}
.status-dot.live {
  background: #3a9873;
  box-shadow: 0 0 0 4px #eef7f2;
}
.how-it-works {
  padding: 30px 24px;
}
.how-it-works h3 {
  font-size: 15px;
  margin: 12px 0 10px;
}
.how-it-works p {
  font-size: 11px;
  line-height: 1.9;
}
.info-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.how-it-works .muted {
  color: #8a949f;
  font-size: 10px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 0;
  font-size: 9px;
  color: #95a0ab;
}
.notice {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  background: #f0f3ff;
  border: 1px solid #dce4ff;
  border-radius: 7px;
  margin-bottom: 22px;
}
.notice > div {
  flex: 1;
}
.notice strong {
  font-size: 12px;
}
.notice p {
  font-size: 11px;
  margin-top: 4px;
}
.notice.error {
  background: #fff6e8;
  border-color: #eadac0;
}
.reader-note {
  padding: 10px 15px;
  background: #ebeff5;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #53657a;
}
.candidate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 22px;
}
.metric-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #7b8896;
  display: block;
}
.record-count {
  display: block;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -1.5px;
  margin-top: 4px;
  line-height: 1.2;
}
.validation-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.validation-summary strong {
  font-size: 12px;
  font-weight: 550;
}
.validation-summary p {
  font-size: 10px;
  margin-top: 3px;
}
.check-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--green);
  border-radius: 50%;
  background: #edf6f0;
}
.provenance {
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
}
.provenance summary {
  cursor: pointer;
  font-size: 10px;
  color: #62718a;
}
.provenance dl {
  display: grid;
  gap: 5px;
  margin: 15px 0 0;
}
.provenance dt {
  font-size: 9px;
  color: #89929c;
}
.provenance dd {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #556274;
}
.approval-panel {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 18px;
}
.checkbox-label {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 11px;
}
.checkbox-label input {
  margin: 2px 0 0;
  accent-color: var(--blue);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.approval-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
}
.approval-footer p {
  font-size: 10px;
}
.publish-panel {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: #f5f9f6;
  border: 1px solid #e3ede6;
  border-radius: 5px;
  padding: 18px;
  margin-top: 20px;
}
.publish-panel h3 {
  font-size: 15px;
  margin: 10px 0 5px;
}
.publish-panel p {
  font-size: 10px;
  line-height: 1.8;
}
.publication-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 5px;
  background: #edf6f0;
  font-size: 12px;
  color: var(--green);
}
.active-count {
  display: block;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.3;
  margin: 22px 0 5px;
}
.active-description {
  font-size: 10px;
  margin: 15px 0 20px;
  line-height: 1.8;
}
.login-panel {
  margin: 85px auto;
  max-width: 600px;
  padding: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.login-panel h1 {
  font-size: 39px;
  margin: 18px 0 24px;
}
.login-panel p {
  font-size: 13px;
  line-height: 1.8;
}
.login-panel code {
  display: block;
  background: #f3f5f8;
  border: 1px solid var(--line);
  padding: 13px 16px;
  margin: 17px 0;
  border-radius: 5px;
  font-size: 13px;
}
.login-panel small {
  display: block;
  font-size: 11px;
  color: #8994a1;
}
.login-panel #launch-help {
  margin-top: 25px;
}
.history-intro,
#history-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.history-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.history-list li > div {
  min-width: 0;
}
.history-list strong {
  display: block;
  font-size: 12px;
}
.history-list span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0;
}
.history-list code {
  display: block;
  font-size: 10px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.history-list .button {
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 11px;
}
.history-list .selected strong {
  color: var(--blue);
}
.recovery-review {
  background: #f0f5ff;
  border: 1px solid #dce6fb;
  padding: 18px;
  margin: 18px 0;
  border-radius: 8px;
  font-size: 12px;
}
.recovery-review p {
  line-height: 1.7;
}
#review-target {
  overflow-wrap: anywhere;
  font-size: 11px;
}
.recovery-review .checkbox-label {
  margin-top: 14px;
}
@media (min-width: 1500px) {
  main {
    padding-top: 55px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .review-card {
    min-height: 370px;
  }
  .source-card,
  .review-card,
  .history-card {
    padding: 29px 30px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 185px;
    padding-left: 19px;
    padding-right: 19px;
  }
  .shell {
    margin-left: 185px;
  }
  main {
    padding: 30px 25px 20px;
  }
  .topbar {
    padding: 0 25px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 18px;
  }
  .source-card,
  .review-card,
  .history-card {
    padding: 22px;
  }
  .source-footer {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .event-field {
    min-width: 165px;
  }
  .steps {
    padding: 18px;
  }
  .steps li {
    padding-left: 8px;
    gap: 9px;
  }
  .steps li:not(:last-child):after {
    right: 6px;
  }
  .steps small {
    font-size: 9px;
  }
  .current-card {
    padding: 22px 18px;
  }
  .publish-panel {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
    gap: 30px;
  }
  .brand {
    font-size: 26px;
  }
  .workspace-label,
  .sidebar-note,
  .environment {
    display: none;
  }
  .nav-item {
    margin: 0;
    padding: 8px 12px;
    font-size: 11px;
  }
  .nav-dot {
    margin-left: 10px;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 56px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .account {
    gap: 12px;
  }
  .account > .pill {
    display: none;
  }
  .page-heading h1 {
    font-size: 28px;
  }
}
@media (max-width: 690px) {
  main {
    padding: 26px 18px 20px;
  }
  .topbar {
    padding: 0 18px;
  }
  .page-heading {
    display: block;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 330px;
    line-height: 1.8;
  }
  .event-field {
    margin-top: 22px;
  }
  .steps {
    padding: 18px 12px;
  }
  .steps li {
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 0 !important;
    text-align: center;
  }
  .steps strong {
    font-size: 10px;
  }
  .steps small {
    display: none;
  }
  .steps li:not(:last-child):after {
    height: 16px;
    right: 0;
    top: 7px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .context-column {
    display: grid;
    grid-template-columns: 1fr;
  }
  .source-footer {
    align-items: stretch;
  }
  .source-footer .button {
    align-self: flex-start;
  }
  .source-row {
    padding: 12px;
    gap: 10px;
  }
  .source-row p {
    max-width: 175px;
  }
  .connection-label {
    display: none;
  }
  .section-title {
    gap: 8px;
  }
  .section-title h2 {
    font-size: 16px;
  }
  .review-card .pill {
    font-size: 7px;
    padding: 5px;
  }
  .candidate-summary {
    gap: 10px;
  }
  .validation-summary {
    gap: 8px;
  }
  .validation-summary strong {
    font-size: 11px;
  }
  .approval-footer {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .notice {
    flex-wrap: wrap;
  }
  .notice > div {
    min-width: 100%;
  }
  .page-footer {
    font-size: 8px;
  }
  .login-panel {
    margin: 35px 0;
    padding: 30px 24px;
  }
  .login-panel h1 {
    font-size: 31px;
  }
  .how-it-works {
    padding: 25px 10px;
  }
  .source-card,
  .review-card,
  .history-card {
    padding: 22px 20px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .account {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.field-availability {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #e1e6e9;
  border-radius: 10px;
}
.field-availability p {
  margin: 6px 0 12px;
  font-size: 12px;
  color: #61717d;
}
.field-availability dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}
.field-availability dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* The hierarchy follows the event selector on narrow and wide layouts. */
.scope-picker { display: grid; gap: 10px; margin-bottom: 10px; }
.scope-picker > div { min-width: 0; }
.scope-picker select { width: 100%; max-width: 100%; }
