:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #5c5c72;
  --border: #e2e2ee;
  --accent: #1c8a5e;
  --accent-hover: #156d49;
  --danger: #d64545;
  --danger-bg: #fdeaea;
  --success: #2fa84f;
  --success-bg: #eaf7ee;
  --info-bg: #eef0fd;
  --shadow: 0 8px 30px rgba(20, 20, 50, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141f;
    --surface: #1d1d2c;
    --text: #eeeef7;
    --muted: #a3a3b8;
    --border: #2e2e42;
    --accent: #3fd08c;
    --accent-hover: #5fdb9f;
    --danger: #ff6b6b;
    --danger-bg: #3a2222;
    --success: #4ecb75;
    --success-bg: #1d3324;
    --info-bg: #23233a;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 24px;
  flex: 1;
}

header.top {
  text-align: center;
  margin-bottom: 28px;
}

header.top h1 {
  font-size: 1.7rem;
  margin: 0 0 8px;
}

header.top p {
  color: var(--muted);
  margin: 0;
}

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

.field {
  margin-bottom: 22px;
}

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

label.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn.secondary:hover {
  background: var(--bg);
}

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

.error-box {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  display: none;
}

.error-box.visible {
  display: block;
}

.paid-banner {
  background: var(--success-bg);
  color: var(--success);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 600;
}

.teaser-banner {
  background: var(--info-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.option-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  background: var(--bg);
}

.option-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.option-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.option-detail {
  margin: 0 0 10px;
}

.option-detail:last-child {
  margin-bottom: 0;
}

.option-detail-label {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.option-detail-value {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.examples {
  margin-top: 28px;
}

.examples h2 {
  font-size: 1rem;
  text-align: center;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.example-profession {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.example-title {
  font-weight: 600;
  margin: 0;
}

footer.disclaimer {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

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

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }
}

@media print {
  header.top p,
  .teaser-banner,
  .paid-banner,
  .actions,
  .divider,
  footer.disclaimer,
  #print-btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .wrap {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .option-card {
    background: #fff;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .option-label,
  .example-profession {
    color: #000;
  }
}
