@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-700.woff2') format('woff2');
}

:root {
  --navy: #0f172a;
  --navy-hover: #1e293b;
  --gold: #f59e0b;
  --gold-hover: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-on-navy: #f8fafc;
  --danger: #b91c1c;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 8px rgba(15, 23, 42, 0.04);
  --logo-filter: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #f8fafc;
    --navy-hover: #e2e8f0;
    --gold: #f59e0b;
    --gold-hover: #fbbf24;
    --bg: #0b1220;
    --surface: #131c2e;
    --border: #263349;
    --text: #e6ebf3;
    --text-secondary: #8b98ad;
    --text-on-navy: #0f172a;
    --danger: #f87171;
    --success-bg: #0d2a20;
    --success-border: #16543d;
    --success-text: #6ee7b7;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --logo-filter: invert(1) brightness(1.15);
  }
}
:root[data-theme='dark'] {
  --navy: #f8fafc;
  --navy-hover: #e2e8f0;
  --gold: #f59e0b;
  --gold-hover: #fbbf24;
  --bg: #0b1220;
  --surface: #131c2e;
  --border: #263349;
  --text: #e6ebf3;
  --text-secondary: #8b98ad;
  --text-on-navy: #0f172a;
  --danger: #f87171;
  --success-bg: #0d2a20;
  --success-border: #16543d;
  --success-text: #6ee7b7;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  --logo-filter: invert(1) brightness(1.15);
}
:root[data-theme='light'] {
  --navy: #0f172a;
  --navy-hover: #1e293b;
  --gold: #f59e0b;
  --gold-hover: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-on-navy: #f8fafc;
  --danger: #b91c1c;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 8px rgba(15, 23, 42, 0.04);
  --logo-filter: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.site-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  filter: var(--logo-filter);
}

.site-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.site-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.progress-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.25s ease;
}

.progress-seg.active { background: var(--gold); }
.progress-seg.done { background: var(--navy); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.card h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  text-wrap: balance;
}

.subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 52ch;
}

.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 0; }

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

label .optional {
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

.hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.45;
}

input[type='text'],
input[type='email'],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

input:hover, textarea:hover, select:hover { border-color: #94a3b8; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 4.5l5 5 5-5' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .row2 { grid-template-columns: 1fr; }
  .card { padding: 28px 20px; }
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .choice-grid { grid-template-columns: 1fr; }
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  padding: 18px 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.choice-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.choice-card .choice-title { font-size: 15.5px; font-weight: 700; }
.choice-card .choice-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.choice-card.issue .choice-title { color: var(--danger); }
.choice-card.positive .choice-title { color: var(--success-text); }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.actions.single { justify-content: flex-end; }

button {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

button:active { transform: scale(0.98); }

.btn-primary { background: var(--navy); color: var(--text-on-navy); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }

.btn-gold { background: var(--gold); color: #1a1200; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: #94a3b8; }

button:disabled { opacity: 0.5; cursor: not-allowed; }

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.type-badge.issue { background: rgba(185, 28, 28, 0.1); color: var(--danger); }
.type-badge.positive { background: var(--success-bg); color: var(--success-text); }

.confirm-wrap { text-align: center; padding: 20px 8px 8px; }

.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.confirm-icon svg { width: 24px; height: 24px; }
.confirm-wrap h2 { text-align: center; }
.confirm-wrap .subtitle { margin-left: auto; margin-right: auto; text-align: center; }

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.confirm-actions button { width: 100%; }

.error-text { font-size: 12.5px; color: var(--danger); margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field.invalid .error-text { display: block; }

.form-error {
  font-size: 13px;
  color: var(--danger);
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: none;
}
.form-error.show { display: block; }

.welcome-note {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 22px;
  display: none;
}
.welcome-note.show { display: block; }

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: -2px;
}

@keyframes spin { to { transform: rotate(360deg); } }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
