/* Process A→Z page — extends Ads Platform design system */

.process-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(99, 102, 241, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(34, 197, 94, 0.08), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(217, 70, 239, 0.08), transparent 40%),
    var(--bg);
}

/* Gate */
.process-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.process-gate-card {
  position: relative;
  width: min(440px, 100%);
  background: rgba(18, 24, 41, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.process-gate-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 180px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 65%);
  pointer-events: none;
}

.process-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

.process-back-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.process-back-link:hover {
  color: var(--text);
}

/* App shell */
.process-app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

.process-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  background: rgba(18, 24, 41, 0.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0.75rem;
  z-index: 20;
}

.process-top .logo {
  margin-bottom: 0;
}

.process-top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.process-top-actions .btn-sm {
  width: auto;
}

.process-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.process-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.process-ring-bg {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 3.2;
}

.process-ring-fg {
  fill: none;
  stroke: url(#none);
  stroke: #818cf8;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.process-progress-label {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.process-progress-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Hero */
.process-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(18, 24, 41, 0.4) 45%, rgba(34, 197, 94, 0.08)),
    var(--surface);
}

.process-hero h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  max-width: 18ch;
  margin-bottom: 0.65rem;
}

.process-hero-lead {
  color: var(--muted);
  max-width: 48ch;
  margin: 0;
}

.process-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.process-stat {
  background: rgba(11, 15, 25, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
}

.process-stat span {
  display: block;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

/* Tabs */
.process-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.process-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s ease;
}

.process-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.process-tab.active {
  color: white;
  background: var(--gradient);
}

.process-panel {
  display: none;
}

.process-panel.active {
  display: block;
  animation: processFade 0.35s ease;
}

@keyframes processFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Phase rail */
.process-rail {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  scrollbar-width: thin;
}

.process-rail-btn {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.process-rail-btn:hover,
.process-rail-btn.active {
  border-color: rgba(129, 140, 248, 0.55);
  color: var(--text);
  background: rgba(99, 102, 241, 0.15);
}

.process-rail-btn.done {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

/* Phase cards */
.process-phases {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.phase-card.open {
  border-color: rgba(129, 140, 248, 0.45);
}

.phase-card.complete {
  border-color: rgba(34, 197, 94, 0.35);
}

.phase-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  text-align: left;
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 1rem 1.15rem;
  cursor: pointer;
}

.phase-num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #c7d2fe;
}

.phase-card.complete .phase-num {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.phase-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.phase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.phase-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.phase-chip.auto {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

.phase-chip.block {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.phase-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.phase-card.open .phase-chevron {
  transform: rotate(180deg);
}

.phase-body {
  display: none;
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid transparent;
}

.phase-card.open .phase-body {
  display: block;
  border-top-color: var(--border);
  padding-top: 1rem;
}

.phase-lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.phase-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.phase-checks label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.phase-checks label:hover {
  border-color: var(--border);
}

.phase-checks input {
  width: auto;
  margin: 0.15rem 0 0;
  accent-color: #818cf8;
}

.phase-checks label.done {
  opacity: 0.65;
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}

/* Intake */
.process-panel-intro {
  margin-bottom: 1.1rem;
}

.process-panel-intro h2 {
  margin-bottom: 0.35rem;
}

.process-panel-intro p {
  color: var(--muted);
  margin: 0;
}

.tone-block {
  color: #fca5a5;
}

.intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.intake-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
}

.intake-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.intake-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(42, 53, 80, 0.55);
  font-size: 0.88rem;
}

.intake-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.intake-lvl {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.intake-lvl.red {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.intake-lvl.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.intake-lvl.green {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.intake-note {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
  max-width: 12ch;
}

/* SLA / rules */
.sla-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.process-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
}

.process-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.process-card-wide {
  grid-column: 1 / -1;
}

.muted-sm {
  color: var(--muted);
  font-size: 0.8rem;
  margin: -0.35rem 0 0.75rem;
}

.process-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.process-table th,
.process-table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid rgba(42, 53, 80, 0.65);
  vertical-align: top;
}

.process-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.process-table-compact td:not(:first-child),
.process-table-compact th:not(:first-child) {
  text-align: center;
  width: 3.2rem;
}

.cadence-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.cadence-row > div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cadence-row strong {
  color: #a5b4fc;
  font-size: 0.85rem;
}

.cadence-row span {
  font-size: 0.8rem;
  line-height: 1.35;
}

.cadence-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.72rem;
}

.rules-list {
  display: grid;
  gap: 0.65rem;
}

.rule-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
}

.rule-item span {
  font-weight: 800;
  color: #fca5a5;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.rule-item p {
  margin: 0;
  font-weight: 500;
}

.rule-item code {
  font-size: 0.85em;
  color: #c7d2fe;
}

.process-footnote {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.process-footnote code {
  color: #a5b4fc;
}

@media (max-width: 860px) {
  .process-hero {
    grid-template-columns: 1fr;
  }

  .process-hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .intake-grid,
  .sla-grid {
    grid-template-columns: 1fr;
  }

  .cadence-row {
    grid-template-columns: 1fr 1fr;
  }

  .process-top {
    position: static;
  }
}

@media (max-width: 520px) {
  .process-hero-stats,
  .cadence-row {
    grid-template-columns: 1fr;
  }

  .phase-head {
    grid-template-columns: auto 1fr;
  }

  .phase-chevron {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-panel.active,
  .process-ring-fg,
  .phase-chevron {
    animation: none;
    transition: none;
  }
}

/* Hub cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.hub-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  transform: translateY(-2px);
}

.hub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.hub-card-top strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.hub-card-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.hub-card-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.hub-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.hub-bar > span {
  display: block;
  height: 100%;
  background: var(--gradient);
  border-radius: inherit;
}

.hub-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.hub-card-foot em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.process-hero-lead code {
  color: #a5b4fc;
  font-size: 0.9em;
}

.save-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.save-hint.ok { color: #86efac; }
.save-hint.err { color: #fca5a5; }

