/* Workflow Rescue — Request a Rescue form
   Plain CSS, no framework, no build step. Self-contained (no imports from
   the landing page stylesheet) to avoid coupling the two pages — token
   values are kept visually consistent with style.css by hand. */

:root {
  color-scheme: dark;

  --bg-page: #0a0b0d;
  --bg-card: #111318;
  --bg-card-2: #171a20;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f5f7;
  --text-muted: #9aa1ac;
  --text-faint: #6b7280;

  --accent: #6e7bfa;
  --accent-bg: rgba(110, 123, 250, 0.12);
  --accent-glow: rgba(110, 123, 250, 0.35);
  --accent-contrast: #0a0b0d;

  --danger: #f28b82;
  --danger-bg: rgba(242, 139, 130, 0.1);

  --warning-bg: rgba(240, 184, 102, 0.08);
  --warning-border: rgba(240, 184, 102, 0.3);
  --warning-icon: #f0b866;

  --success: #4fd1a5;
  --success-bg: rgba(79, 209, 165, 0.1);

  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.12);

  --rose: #fb7185;
  --rose-bg: rgba(251, 113, 133, 0.1);

  --orange: #f0b866;
  --orange-bg: rgba(240, 184, 102, 0.1);

  --sidebar-bg: #111318;
  --sidebar-border: rgba(255, 255, 255, 0.09);

  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Top bar ---------- */
.topbar {
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--border-strong);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-sep {
  color: var(--border-strong);
}

.brand-page {
  color: var(--text-muted);
  font-weight: 600;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: right;
}

.security-note .icon { color: var(--success); }

/* ---------- Step indicator ---------- */
.steps-nav {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.steps-row::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: var(--border-strong);
  z-index: 0;
}

.step-item {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  flex: 1;
  min-width: 0;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 600;
  text-align: center;
}

.step-item[aria-current="step"] .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.step-item[aria-current="step"] .step-label {
  color: var(--text);
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 64px;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin: 0 0 22px 0;
  letter-spacing: -0.01em;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.chip-blue { background: var(--accent-bg); color: var(--accent); }
.chip-purple { background: var(--purple-bg); color: var(--purple); }
.chip-rose { background: var(--rose-bg); color: var(--rose); }
.chip-orange { background: var(--orange-bg); color: var(--orange); }
.chip-green { background: var(--success-bg); color: var(--success); }

/* ---------- Fields ---------- */
.field {
  margin-bottom: 22px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

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

.field-row .field {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text);
}

.req {
  color: var(--danger);
}

.optional {
  color: var(--text-faint);
  font-weight: 500;
}

.help {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin: 0 0 10px 0;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card-2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 44px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}

.input-icon input {
  padding-left: 36px;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 6px;
}

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin: 6px 0 0 0;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error .dropzone {
  border-color: var(--danger);
}

/* ---------- Choice groups (radio cards / pills) ---------- */
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-body {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: var(--bg-card-2);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.choice-body:hover {
  border-color: var(--border-strong);
  background: var(--bg-card);
}

.choice input:checked + .choice-body {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.choice input:focus-visible + .choice-body {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-pill .choice-body {
  border-radius: 999px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green { background: var(--success); }
.dot-red { background: var(--danger); }
.dot-amber { background: var(--orange); }

/* ---------- Upload dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 16px;
  cursor: pointer;
  background: var(--bg-card-2);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.dropzone-icon {
  color: var(--text-faint);
  margin-bottom: 6px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.dropzone-sub {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.dropzone-file {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.dropzone-secondary {
  padding: 20px 16px;
}

/* ---------- Warning box ---------- */
.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
}

.warning-box[hidden] {
  display: none;
}

.warning-icon {
  color: var(--warning-icon);
  margin-top: 1px;
}

.warning-box p {
  margin: 0;
  font-size: 0.88rem;
  color: #f3d9ab;
}

/* ---------- Checkboxes ---------- */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--text-muted);
}

.checkbox-row input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* ---------- Error summary ---------- */
.error-summary {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #ffb4ac;
}

.error-summary ul {
  margin: 8px 0 0 0;
  padding-left: 18px;
}

.error-summary a {
  color: #ffb4ac;
  text-decoration: underline;
}

/* ---------- Submit / success ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.25) inset, 0 8px 24px -10px var(--accent-glow);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-submit {
  width: 100%;
  padding: 15px 20px;
  margin-top: 4px;
  font-size: 1rem;
}

.success-panel {
  text-align: center;
  padding: 48px 26px;
}

.success-icon {
  width: 44px;
  height: 44px;
  color: var(--success);
  margin-bottom: 14px;
}

.success-text {
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
  color: var(--text);
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  padding: 22px;
}

.side-card h3 {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
}

.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
}

.side-icon .icon {
  width: 15px;
  height: 15px;
}

.side-sub {
  color: var(--text-faint);
  font-weight: 400;
}

.side-card-help p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 20px;
  }
  .field-row,
  .field-row-3 {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .steps-row {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 18px;
    padding-bottom: 4px;
  }
  .steps-row::before {
    left: 20px;
    right: 20px;
  }
  .step-item {
    flex: 0 0 auto;
    min-width: 64px;
  }
  .security-note {
    text-align: left;
  }
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
