/* ===========================================================================
   /setup — page layer
   One flow: the wizard (progress, one step, Back/Next) beside the code panel,
   which is the page's moment (mono on the inset surface, a small copy button).
   Below: one primary action and one quiet link.
   Script contract kept: .is-active, [hidden], .is-copied, .is-spotlight and
   the inline width of .setup-wizard-fill.
   =========================================================================== */

/* ---------- Hero ----------------------------------------------------------- */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-hero .setup-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 0 8px;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-hero .setup-back :is(.lucide-icon, svg.lucide) { width: 18px; height: 18px; color: var(--outline); }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-hero .setup-back + h1 { margin-top: 16px; }

/* ---------- Methods table -------------------------------------------------- */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-methods.sentinel-container { margin-bottom: 64px; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-methods .setup-methods-table-wrap { padding: 0; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-methods .setup-methods-table { min-width: 640px; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-methods .setup-methods-table td:first-child { white-space: nowrap; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-methods .form-help { margin-top: 12px; }

/* ---------- The flow: wizard beside the code ------------------------------- */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-layout.sentinel-container {
  display: block;
  padding-bottom: var(--section-padding);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}
@media (min-width: 960px) {
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
  }
}

/* Wizard card: progress, the current step, then its own Back/Next */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-bar {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-bar #setupProgressLabel {
  font-family: var(--font-label);
  font-size: 13px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-track {
  display: block;
  height: 4px;
  overflow: hidden;
  background: var(--surface-container);
  border-radius: 2px;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-fill {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-steps { display: block; margin: 0; padding: 0; }
/* A step is content inside the wizard, not a card of its own */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step,
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step.is-active {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step-num { margin-top: 0; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step-body { min-width: 0; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step-body h2 { margin: 0 0 8px; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-step-body p { margin: 0; font-size: 15px; line-height: 24px; }

body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-nav .sentinel-btn-text { margin-left: -12px; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard .setup-wizard-nav .sentinel-btn:disabled { opacity: 0.4; }

/* ---------- Code panel: the moment ---------------------------------------- */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code-head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 12px 20px;
  background: none;
  border-bottom: 1px solid var(--border-subtle);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code-label {
  min-width: 0;
  font-family: var(--font-label);
  font-size: 13px;
  line-height: 20px;
  color: var(--outline);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code {
  flex: 1 0 auto;
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 24px;
  color: var(--on-surface);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code code { font: inherit; color: inherit; white-space: pre; }
/* Code shows the characters people paste: no ligatures (<!-- and --> stay as typed) */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow :is(.setup-code, .setup-code code, .setup-code-label), body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard #setupProgressLabel {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-note {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 20px;
  color: var(--on-surface-variant);
}
/* Step 2 points at the code: a 1px accent hairline, nothing else */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code-panel.is-spotlight { border-color: var(--primary); outline: 0; animation: none; transform: none; }

/* Copy: a small secondary button; copied = check icon + word, primary text */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn {
  flex: none;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 20px;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn :is(.lucide-icon, svg.lucide) { width: 16px; height: 16px; color: var(--on-surface-variant); }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn .setup-copy-done { display: none; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn.is-copied {
  background: var(--surface-container-high);
  border-color: var(--border-strong);
  color: var(--on-surface);
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn.is-copied .setup-copy-icon { display: none; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-copy-btn.is-copied .setup-copy-done { display: block; color: var(--on-surface); }

/* ---------- After the flow: one primary, one quiet link -------------------- */
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-layout .setup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 32px 0 0;
}
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-layout .setup-actions .sentinel-btn { width: auto; }
body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-layout .setup-actions .sentinel-btn-text { flex: 0 0 auto; padding-inline: 0; }

@media (max-width: 599px) {
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-wizard { padding: 20px; }
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code-head { padding-left: 16px; }
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-code { padding: 16px; font-size: 12px; line-height: 20px; }
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-flow .setup-note { padding: 12px 16px; }
  body.sentinel-body:is(.sentinel-flow, .sentinel-home):not(.auth-body) .setup-layout .setup-actions .sentinel-btn-gold { flex: 1 1 100%; }
}
