/*
 * components-ui.css — UI chrome: checklist toggles, login modal,
 * save-scan banner, drop-screen auth strip, multi-host banner, loading overlay.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   Checklist — "Mark as applied" toggle + effectiveness banner
───────────────────────────────────────────────────────────────────────────── */
.checklist-applied-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: .85rem;
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.checklist-applied-btn:hover {
  border-color: var(--allow);
  color: var(--allow);
  background: rgba(56,217,169,.07);
}
.checklist-applied-btn.applied {
  border-color: var(--allow);
  color: var(--allow);
  background: rgba(56,217,169,.1);
}

.group-applied > .checklist-group-head strong {
  text-decoration: line-through;
  opacity: .55;
}

/* Effectiveness banner (injected at top of checklist body by history-panel.js) */
.checklist-effectiveness {
  margin-bottom: 1.5rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.effectiveness-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .65rem;
}

.effectiveness-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .4rem 0;
  border-top: 1px solid var(--border);
}
.effectiveness-item:first-of-type { border-top: none; }

.effect-icon { flex-shrink: 0; font-size: 14px; line-height: 1.4; }

.effect-detail strong { display: block; font-size: 13px; }
.effect-detail small  { font-size: 11px; color: var(--muted); }

.effect-fixed  .effect-detail strong { color: var(--allow); }
.effect-firing .effect-detail strong { color: var(--challenge); }

.campaign-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border2);
  border-radius: 9px;
  padding: 12px 14px;
  background: rgba(255,255,255,.018);
}

.campaign-critical { border-left-color: var(--block); }
.campaign-high { border-left-color: var(--challenge); }
.campaign-medium { border-left-color: var(--accent); }

.campaign-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.campaign-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.campaign-paths code {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255,255,255,.025);
  padding: 2px 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.campaign-count {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: end;
  text-align: right;
}

.campaign-count strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Auth / Login Modal
───────────────────────────────────────────────────────────────────────────── */
.login-btn, .logout-btn {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text);
  transition: background .15s;
  flex-shrink: 0;
}
.login-btn:hover  { background: var(--surface2); }
.logout-btn       { color: var(--muted); }
.logout-btn:hover { color: var(--text); background: var(--surface2); }

.dashboard-btn {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.dashboard-btn:hover { background: var(--accent); color: #fff; }

.user-pill {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-items: center;
  flex-shrink: 1;
}

.login-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.login-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 2rem;
  width: min(420px, 92vw);
  position: relative;
}
.login-modal h2    { margin-bottom: .5rem; font-size: 18px; }
.login-modal-sub   { font-size: 13px; color: var(--muted); margin-bottom: 1.25rem; }
.login-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px;
}
.login-modal-close:hover { color: var(--text); background: var(--surface2); }

#login-form { display: flex; flex-direction: column; gap: .75rem; }
#login-email {
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
}
#login-email:focus { outline: 2px solid var(--accent); }
#login-submit-btn {
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#login-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-modal-status {
  font-size: 13px; color: var(--accent2); margin-top: .5rem; min-height: 1.4em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Save scan banner
───────────────────────────────────────────────────────────────────────────── */
.save-scan-banner {
  display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 13px;
}
.save-scan-info  { flex: 1; color: var(--muted); }
.save-scan-btn   {
  padding: 5px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 5px;
  color: var(--text);
  font-size: 13px; cursor: pointer;
  flex-shrink: 0;
}
.save-scan-btn:hover    { background: var(--accent); border-color: var(--accent); color: #fff; }
.save-scan-btn:disabled { opacity: .6; cursor: not-allowed; }
.save-scan-status                  { font-size: 12px; color: var(--accent2); }
.save-scan-status--duplicate       { color: var(--challenge); }

/* Save Log Digest bar (sits immediately below the save-scan-banner) */
.save-log-digest-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .5rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
}
.save-digest-btn {
  padding: 5px 14px;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-size: 13px; cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.save-digest-btn:hover    { background: var(--accent); color: #fff; }
.save-digest-btn:disabled { opacity: .6; cursor: not-allowed; }


/* ─────────────────────────────────────────────────────────────────────────────
   Drop screen — auth strip
───────────────────────────────────────────────────────────────────────────── */
.drop-auth-strip {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 10;
}

.drop-auth-guest,
.drop-auth-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 13px;
}

.drop-auth-hint {
  color: var(--muted);
  font-size: 12px;
  display: none; /* revealed at ≥ 600 px */
}

.drop-auth-login-btn {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.drop-auth-login-btn:hover { background: var(--surface2); border-color: var(--accent); }

.drop-auth-email {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-auth-dashboard-btn {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: opacity .15s;
  white-space: nowrap;
}
.drop-auth-dashboard-btn:hover { opacity: .85; }

.drop-auth-logout-btn {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.drop-auth-logout-btn:hover { color: var(--text); background: var(--surface2); }

@media (min-width: 600px) {
  .drop-auth-hint { display: inline; }
}

@media (max-width: 480px) {
  .drop-auth-email { display: none; }
  .drop-auth-strip { top: .6rem; right: .75rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Multi-host banner + host-scope labels (Fixes / Checklist panels)
───────────────────────────────────────────────────────────────────────────── */
.multihost-banner {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(79,156,249,.07);
  border: 1px solid rgba(79,156,249,.3);
  border-radius: 8px;
  font-size: 13px;
}
.multihost-banner strong { color: var(--accent); }
.multihost-banner code  {
  background: rgba(79,156,249,.12);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}
.multihost-banner span  { color: var(--muted); font-size: 12px; line-height: 1.5; }

.rule-host-scope {
  margin-top: .4rem;
  font-size: 11px;
  color: var(--allow);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.rule-host-scope code {
  background: rgba(56,217,169,.1);
  padding: 1px 5px;
  border-radius: 3px;
}
.rule-host-all { color: var(--muted); }
.rule-host-all code { background: rgba(255,255,255,.06); }

/* ─────────────────────────────────────────────────────────────────────────────
   Loading overlay (file parse progress)
───────────────────────────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
}
.loading-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; padding: 2rem 2.5rem; width: min(420px, 90vw);
  text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.loading-spinner {
  width: 36px; height: 36px; margin: 0 auto 1.25rem;
  border: 3px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-filename {
  font-size: 13px; color: var(--muted); margin-bottom: .5rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.loading-label  { font-size: 15px; font-weight: 600; margin-bottom: 1rem; }
.loading-bar-track {
  height: 6px; background: var(--surface2); border-radius: 3px;
  overflow: hidden; margin-bottom: .6rem;
}
.loading-bar-fill {
  height: 100%; background: var(--accent); border-radius: 3px;
  transition: width .2s ease;
}
.loading-bar--indeterminate {
  width: 40% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}
@keyframes indeterminate {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}
.loading-detail { font-size: 12px; color: var(--muted); font-family: var(--font-mono); min-height: 1.4em; }

/* ── Cloudflare API fetch section ────────────────────────────────────────────── */
#cf-fetch-section {
  width: 100%;
  max-width: 540px;
  margin-top: .75rem;
  border: 1px solid var(--border2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.cf-section-toggle {
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cf-section-toggle:hover { background: var(--surface2); color: var(--text); }

.cf-fetch-body {
  padding: .9rem 1rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.cf-fetch-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: .15rem;
}

.cf-fetch-row {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.cf-fetch-row--inline {
  flex-direction: row;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.cf-fetch-row--inline .cf-label { white-space: nowrap; }

.cf-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: .06em;
}

.cf-field-group {
  display: flex;
  gap: .4rem;
}

.cf-input {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  flex: 1;
  min-width: 0;
  transition: border-color .15s;
}
.cf-input:focus { outline: none; border-color: var(--accent); }
.cf-input::placeholder { color: var(--muted); }

.cf-hours-select { max-width: 150px; flex: none; }
.cf-zone-picker  { margin-top: .3rem; }

.cf-secondary-btn {
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono);
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.cf-secondary-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cf-secondary-btn:disabled { opacity: .5; cursor: default; }

.cf-fetch-btn {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0;
}
.cf-fetch-btn:hover:not(:disabled) { opacity: .85; }
.cf-fetch-btn:disabled { opacity: .5; cursor: default; }

.cf-status {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
}
.cf-status--info  { color: var(--muted); background: none; }
.cf-status--ok    { color: var(--allow);     background: rgba(56,217,169,.08); }
.cf-status--warn  { color: var(--challenge); background: rgba(255,183,77,.08); }
.cf-status--error { color: var(--block);     background: rgba(239,154,154,.08); }

.cf-token-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: .1rem;
}
.cf-token-note a { color: var(--accent); text-decoration: none; }
.cf-token-note a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────────────────────
   Split-save progress toast — fixed bottom-right, non-blocking
───────────────────────────────────────────────────────────────────────────── */
.split-save-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .55);
  overflow: hidden;
  /* slide-in from bottom */
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  transition: transform .28s cubic-bezier(.22,.68,0,1.2), opacity .22s ease;
  pointer-events: none;
}
.split-save-toast.sst--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.sst-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem .45rem;
  gap: .5rem;
}
.sst-title {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
.sst-title--ok   { color: var(--allow); }
.sst-title--warn { color: var(--challenge); }
.sst-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sst-close:hover { color: var(--text); background: var(--surface2); }
.sst-track {
  height: 3px;
  background: var(--border2);
  margin: 0 1rem;
  border-radius: 2px;
  overflow: hidden;
}
.sst-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .35s ease;
}
.sst-bar--done { background: var(--allow); }
.sst-detail {
  font-size: 11px;
  color: var(--muted);
  padding: .35rem 1rem .7rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────────────────────
   New site onboarding wizard
───────────────────────────────────────────────────────────────────────────── */
.wizard-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 2rem 2rem 1.5rem;
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  /* entrance animation */
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .22s ease, transform .22s cubic-bezier(.22,.68,0,1.1);
}
.wizard-modal--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */
.wizard-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.wizard-icon     { font-size: 2rem; margin-bottom: .4rem; }
.wizard-title    { font-size: 17px; font-weight: 700; margin-bottom: .2rem; }
.wizard-subtitle { font-size: 13px; color: var(--muted); }

/* Progress dots + connector lines */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.75rem;
}
.wizard-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border2);
  transition: background .2s, color .2s, border-color .2s;
}
.wizard-step-dot--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.wizard-step-dot--done {
  background: rgba(56,217,169,.15);
  color: var(--allow);
  border-color: var(--allow);
}
.wizard-step-line {
  width: 28px;
  height: 2px;
  background: var(--border2);
  flex-shrink: 0;
  transition: background .2s;
}
.wizard-step-line--done { background: var(--allow); }

/* Body */
.wizard-body    { min-height: 220px; }
.wizard-step-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
  font-family: var(--font-mono);
}
.wizard-step-heading { font-size: 15px; font-weight: 700; margin-bottom: .5rem; }
.wizard-step-desc    { font-size: 13px; color: var(--muted); margin-bottom: 1.25rem; line-height: 1.6; }

/* Step 1 — Cloudflare status cards */
.wizard-cf-cards {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.wizard-cf-card {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  grid-template-rows: auto auto;
  column-gap: .65rem;
  padding: .7rem .9rem;
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.wizard-cf-card input[type=radio] { display: none; }
.wizard-cf-card:hover              { background: var(--surface2); border-color: rgba(255,255,255,.2); }
.wizard-cf-card--selected          { border-color: var(--accent); background: rgba(79,156,249,.07); }
.wizard-cf-icon  { font-size: 1.25rem; grid-row: span 2; align-self: center; }
.wizard-cf-label { font-size: 13px; font-weight: 600; }
.wizard-cf-note  { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* Step 2 — How-to blocks */
.wizard-howto {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: .65rem;
  font-size: 13px;
}
.wizard-howto--secondary { border-style: dashed; opacity: .85; }
.wizard-howto-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .4rem;
}
.wizard-howto-option { line-height: 1.7; }
.wizard-howto-option code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
  background: rgba(56,217,169,.08);
  padding: 1px 5px;
  border-radius: 3px;
}
.wizard-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  padding: .5rem .75rem;
  background: rgba(79,156,249,.06);
  border-radius: 6px;
  border-left: 2px solid rgba(79,156,249,.4);
  margin-top: .25rem;
}

/* Step 3 — Tab overview grid */
.wizard-tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.wizard-tab-card {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  font-size: 13px;
}
.wizard-tab-card--highlight {
  border-color: rgba(79,156,249,.3);
  background: rgba(79,156,249,.05);
}
.wizard-tab-icon  { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.wizard-tab-card strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.wizard-tab-desc  { font-size: 11px; color: var(--muted); line-height: 1.4; display: block; }

/* Step 4 — Loop cards */
.wizard-loop-cards { display: flex; flex-direction: column; }
.wizard-loop-card {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .75rem .85rem;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface2);
  font-size: 13px;
}
.wizard-loop-card + .wizard-loop-card { border-top: none; border-radius: 0 0 8px 8px; }
.wizard-loop-card:first-child { border-radius: 8px 8px 0 0; }
.wizard-loop-card:first-child + .wizard-loop-arrow + .wizard-loop-card { border-top: none; border-radius: 0; }
.wizard-loop-card strong { display: block; font-weight: 600; margin-bottom: .2rem; }
.wizard-loop-card span   { font-size: 12px; color: var(--muted); line-height: 1.5; }
.wizard-loop-content { display: flex; flex-direction: column; }
.wizard-loop-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: .1rem;
}
.wizard-loop-arrow {
  text-align: center;
  padding: .2rem 0;
  color: var(--border2);
  font-size: 14px;
  line-height: 1;
}

/* Footer */
.wizard-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.wizard-spacer    { flex: 1; }
.wizard-cta       { text-decoration: none; display: inline-flex; align-items: center; }
.wizard-skip-btn  { font-size: 12px; color: var(--muted); }
.wizard-skip-btn:hover { color: var(--text); }

/* Step 2 — file upload zone */
.wizard-upload-zone {
  border: 2px dashed var(--border2);
  border-radius: 10px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-top: .75rem;
}
.wizard-upload-zone:hover,
.wizard-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(79,156,249,.05);
}
.wizard-upload-icon  { font-size: 1.75rem; display: block; margin-bottom: .4rem; }
.wizard-upload-label { font-size: 13px; color: var(--text); }
.wizard-upload-browse {
  background: none; border: none;
  color: var(--accent); font-size: 13px;
  cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.wizard-upload-hint { display: block; font-size: 11px; color: var(--muted); margin-top: .25rem; }

/* Selected file list */
.wizard-file-list  { display: flex; flex-direction: column; gap: .35rem; margin-top: .75rem; }
.wizard-file-item  {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 6px; padding: .4rem .65rem;
  font-size: 12px; font-family: var(--font-mono);
}
.wizard-file-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent2); }
.wizard-file-size  { color: var(--muted); flex-shrink: 0; }
.wizard-file-rm    {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 0 2px;
  flex-shrink: 0; line-height: 1;
}
.wizard-file-rm:hover { color: var(--block); }

@media (max-width: 520px) {
  .wizard-modal    { padding: 1.5rem 1.25rem 1.25rem; }
  .wizard-tab-grid { grid-template-columns: 1fr; }
}

