/* FEAT-001 diseno-v1 — vestido visual de flujo-v2 (no es producto) */
@import url("https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,500;7..72,600&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --ink: #0c1222;
  --ink-soft: #3d4659;
  --muted: #6b7385;
  --line: #d8dde8;
  --line-soft: #e8ecf3;
  --paper: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --signal: #0f766e;
  --signal-soft: #ccfbf1;
  --signal-deep: #115e59;
  --gate-red: #b42318;
  --gate-red-soft: #fef3f2;
  --gate-green: #067647;
  --gate-green-soft: #ecfdf3;
  --gate-warn: #b54708;
  --gate-warn-soft: #fffaeb;
  --info: #175cd3;
  --info-soft: #eff4ff;
  --shadow: 0 1px 2px rgba(12, 18, 34, 0.04), 0 8px 24px rgba(12, 18, 34, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Sora", system-ui, sans-serif;
  --serif: "Literata", Georgia, serif;
  --nav-w: 240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d9f5f0 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e4e9ff 0%, transparent 50%),
    var(--paper);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--signal-deep); }
a:hover { color: var(--signal); }

.proto-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, #0c1222, #1a2a3a);
  color: #c8d0dc;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.proto-banner strong { color: #fff; font-weight: 700; }

.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: calc(100vh - 32px);
}

.rail {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.9rem 2rem;
  position: sticky;
  top: 32px;
  height: calc(100vh - 32px);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.45rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1rem;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--signal), var(--signal-deep));
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  border-bottom-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg) translateY(1px);
}
.brand-text { display: flex; flex-direction: column; gap: 0.05rem; }
.brand-text strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-text span {
  font-size: 11px;
  color: var(--muted);
}
.project-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.35rem 1rem;
  padding: 0.45rem 0.55rem;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.project-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gate-green);
  box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.15);
}

.nav-group {
  font-size: 10px;
  font-weight: 600;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.55rem 0.35rem;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 0.12rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.rail a:hover { background: rgba(15, 118, 110, 0.06); color: var(--ink); }
.rail a.active {
  background: var(--signal-soft);
  color: var(--signal-deep);
  font-weight: 600;
}
.rail a .n {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.rail a.active .n { background: #fff; color: var(--signal); }

.stage {
  padding: 1.5rem 2rem 3.5rem;
  max-width: 920px;
}
.stage-head {
  margin-bottom: 1.25rem;
  animation: rise 0.45s ease both;
}
.stage-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--signal);
  margin-bottom: 0.45rem;
}
.stage-head h1 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.stage-head .lede {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
  font-size: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  animation: rise 0.5s ease both;
}
.panel:nth-child(2) { animation-delay: 0.04s; }
.panel:nth-child(3) { animation-delay: 0.08s; }
.panel h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}
.panel h3 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 1rem 0 0.45rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
}
.status-headline {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse 1.8s ease-in-out infinite;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pill-ok { background: var(--gate-green-soft); color: var(--gate-green); }
.pill-err { background: var(--gate-red-soft); color: var(--gate-red); }
.pill-warn { background: var(--gate-warn-soft); color: var(--gate-warn); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--surface-2); color: var(--muted); }
.pill-draft { background: #f4f0ff; color: #5925dc; }

.kv {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.kv li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.kv li:last-child { border-bottom: 0; }
.kv li.changed {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.06), transparent);
}
.kv .k {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 0.15rem;
}
.kv .v {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  font-size: 13.5px;
  color: var(--ink);
}
.field-actions { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.changed-tag {
  font-size: 11px;
  color: var(--signal);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.28);
}
.btn-primary:hover {
  background: var(--signal-deep);
  color: #fff;
}
.btn-danger {
  background: var(--gate-red);
  border-color: var(--gate-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(180, 35, 24, 0.25);
}
.btn-danger:hover { background: #912018; color: #fff; }
.btn-risk {
  background: var(--gate-warn-soft);
  border-color: var(--gate-warn);
  color: var(--gate-warn);
}
.btn-risk:hover { background: #fef0c7; color: #93370d; }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.btn-ghost:hover { background: transparent; color: var(--ink); transform: none; }
.btn-sm { padding: 0.28rem 0.55rem; font-size: 12px; border-radius: 8px; }
.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
  box-shadow: none;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}
.btn-wrap { display: inline-flex; flex-direction: column; gap: 0.2rem; }
.why { font-size: 13px; color: var(--ink-soft); max-width: 28ch; line-height: 1.35; }

.callout {
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 13px;
  margin: 0.65rem 0;
  border: 1px solid transparent;
}
.callout.info { background: var(--info-soft); border-color: #b2ccff; color: #1849a9; }
.callout.warn { background: var(--gate-warn-soft); border-color: #fec84b; color: #93370d; }
.callout.err { background: var(--gate-red-soft); border-color: #fecdca; color: #912018; }
.callout.ok { background: var(--gate-green-soft); border-color: #abefc6; color: #085d3a; }
.callout strong { font-weight: 600; }

.spec-note {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  font-size: 11.5px;
  color: #667085;
  background: repeating-linear-gradient(
    -45deg,
    #f9fafb,
    #f9fafb 6px,
    #f2f4f7 6px,
    #f2f4f7 12px
  );
  border-left: 3px solid #98a2b3;
  border-radius: 0 8px 8px 0;
}
.spec-note a { color: inherit; font-weight: 600; }
body.hide-notes .spec-note { display: none; }
.notes-toggle {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  font-size: 11px;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--ink-soft);
  font-family: inherit;
}
.notes-toggle:hover { color: var(--ink); }

.scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.scenarios a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.scenarios a:hover { background: var(--surface-2); color: var(--ink); }
.scenarios a:target,
.scenarios a[aria-current="true"] {
  background: var(--signal-soft);
  color: var(--signal-deep);
  font-weight: 600;
}

.scenario { scroll-margin-top: 4rem; }
.scenario + .scenario { margin-top: 0.25rem; }

.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.5rem 0;
}
.diff .actual, .diff .proposed {
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  font-size: 13px;
  border: 1px solid var(--line);
}
.diff .actual { background: #fafafa; }
.diff .proposed {
  background: var(--surface-2);
  border: 1px dashed #98a2b3;
}
.diff .proposed .agent-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.diff .proposed .agent-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a2b3;
}
.diff .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.prompt-box {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: #0c1222;
  color: #d0d5dd;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  line-height: 1.45;
}
.prompt-collapsed details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.inbox-list { display: flex; flex-direction: column; gap: 0.65rem; }
.inbox-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.inbox-card:hover {
  border-color: var(--signal);
  transform: translateY(-2px);
}
.inbox-card h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.inbox-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.inbox-card .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 0.45rem;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.hub-grid a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hub-grid a:hover {
  transform: translateY(-2px);
  border-color: var(--signal);
}
.hub-grid strong {
  font-size: 14px;
  font-weight: 600;
}
.hub-grid span {
  font-size: 12px;
  color: var(--muted);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0.85rem 0.85rem 0.85rem 3rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
  background: var(--surface);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 0.9rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--signal-soft);
  color: var(--signal-deep);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { display: block; margin-bottom: 0.2rem; }
.step-actions { margin-top: 0.55rem; }

.confirm-dialog {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}
.confirm-dialog strong { display: block; margin-bottom: 0.35rem; font-size: 13px; }
.confirm-dialog p { margin: 0 0 0.65rem; font-size: 13px; color: var(--muted); }

.empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 0.35rem;
}

.post-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.65rem 0;
  padding: 0.55rem 0.75rem;
  background: var(--gate-green-soft);
  border: 1px solid #abefc6;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gate-green);
}
.post-action .undo {
  color: var(--signal-deep);
  font-weight: 600;
  cursor: pointer;
  font-size: 12.5px;
}
.hist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.hist-list li {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.hist-list li:last-child { border-bottom: 0; }
.hist-list .when {
  color: var(--muted);
  font-size: 12px;
  margin-right: 0.45rem;
  font-variant-numeric: tabular-nums;
}
.hist-agent { background: rgba(15, 118, 110, 0.03); }
.hist-human { background: var(--surface); }
.closure-card {
  text-align: center;
  padding: 2rem 1.25rem !important;
}
.closure-card h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.45); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(15, 118, 110, 0); }
}


/* --- feedback r2: state strip, rail exceptions, hub stepper, setup steps --- */
.state-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  border-left-width: 4px;
}
.state-strip.gate-red { border-left-color: var(--gate-red); background: linear-gradient(90deg, var(--gate-red-soft), var(--surface) 40%); }
.state-strip.gate-green { border-left-color: var(--gate-green); background: linear-gradient(90deg, var(--gate-green-soft), var(--surface) 40%); }
.state-strip.gate-warn { border-left-color: var(--gate-warn); background: linear-gradient(90deg, var(--gate-warn-soft), var(--surface) 40%); }
.state-strip.gate-info { border-left-color: var(--info); background: linear-gradient(90deg, var(--info-soft), var(--surface) 40%); }
.state-strip.gate-draft { border-left-color: #5925dc; background: linear-gradient(90deg, #f4f0ff, var(--surface) 40%); }
.state-strip .state-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.state-strip .state-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.state-strip .state-cta { justify-self: end; align-self: center; }
.progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.progress-track {
  flex: 1;
  max-width: 140px;
  height: 6px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--signal);
  border-radius: inherit;
}

.after-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.1rem 0 0.55rem;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.after-divider::before,
.after-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.after-frame {
  opacity: 0.72;
  filter: saturate(0.85);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  background: #fafbfc;
}

.more-actions {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}
.more-actions summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.more-actions .row { margin-top: 0.5rem; }
.more-actions a.btn, .more-actions .btn { font-weight: 500; }

.nav-more {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line-soft);
}
.nav-more summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 600;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.55rem;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more a {
  color: #98a2b3 !important;
  font-weight: 500 !important;
  font-size: 12.5px !important;
}
.nav-more a:hover { color: var(--ink-soft) !important; }
.nav-more a.active {
  background: var(--surface-2) !important;
  color: var(--ink-soft) !important;
}

.hub-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.hub-stepper .step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 0.85rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hub-stepper .step:hover { border-color: var(--signal); transform: translateY(-2px); }
.hub-stepper .n {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--signal-soft);
  color: var(--signal-deep);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.hub-stepper strong { display: block; font-size: 13px; margin-bottom: 0.15rem; }
.hub-stepper span { font-size: 11.5px; color: var(--muted); }
.hub-exceptions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.hub-exceptions a {
  padding: 0.7rem 0.8rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12.5px;
}
.hub-exceptions a strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 0.1rem; }
.hub-exceptions a:hover { background: var(--surface-2); }

.steps.setup li::before {
  background: var(--surface-2);
  color: var(--ink-soft);
}
.steps.setup li.done::before {
  background: var(--gate-green-soft);
  color: var(--gate-green);
}

.link-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 0.65rem;
}
.link-note a { font-weight: 600; }

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

@media (max-width: 980px) {
  .hub-stepper { grid-template-columns: 1fr 1fr; }
  .state-strip { grid-template-columns: 1fr; }
  .state-strip .state-cta { justify-self: start; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: sticky;
    top: 32px;
    z-index: 30;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    overflow-x: auto;
  }
  .rail .brand { border: 0; margin: 0; padding: 0.15rem 0.35rem 0.15rem 0; }
  .rail .brand-text span { display: none; }
  .rail .project-chip { margin: 0; }
  .rail .nav-group { display: none; }
  .rail > a, .rail .nav-more {
    margin: 0;
    white-space: nowrap;
  }
  .rail .nav-more {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .rail .nav-more[open] {
    display: contents;
  }
  .stage { padding: 1.1rem 1rem 2.5rem; }
  .kv li { grid-template-columns: 1fr; gap: 0.25rem; }
  .diff { grid-template-columns: 1fr; }
}
