:root {
  --bg: #FAFAF7;
  --bg-warm: #F4F1EC;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #636363;
  --accent: #3D5AFE;
  --accent-soft: rgba(61, 90, 254, 0.08);
  --accent-hover: #304FFE;
  --border: #E8E5E0;
  --border-light: #F0EDE8;
  --danger: #D33F49;
  --danger-soft: rgba(211, 63, 73, 0.08);
  --success: #1A9968;

  --radius: 16px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.10);

  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }

/* Globaalne: [hidden] atribuut peab alati peita, isegi kui elemendil on mõni muu display-reegel
   (nt .btn { display: inline-flex } või .modal { display: flex }). */
[hidden] { display: none !important; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 600; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-hover); }

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

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
}

.page-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}
.page-header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
}
.brand::first-letter { color: var(--accent); }

.lang-switcher {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}
.lang-switcher button {
  background: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: inherit;
}
.lang-switcher button[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-card);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) {
  .card { padding: 2.5rem; }
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.form-row { margin-bottom: 1.25rem; }
.form-row:last-child { margin-bottom: 0; }

label, .form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.form-help {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 120ms, box-shadow 120ms;
}

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

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.field-error {
  display: block;
  font-size: 0.875rem;
  color: var(--danger);
  margin-top: 0.375rem;
}

textarea { resize: vertical; min-height: 6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, transform 120ms, box-shadow 120ms;
  min-height: 48px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2rem;
}
.btn-row .btn { flex: 1; max-width: 16rem; }

.progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.progress-step {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  transition: background 200ms;
}
.progress-step[data-active="true"] { background: var(--accent); }
.progress-step[data-completed="true"] { background: var(--accent); opacity: 0.5; }

.step-label {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.step-panel { display: none; }
.step-panel[data-active="true"] { display: block; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.alert-error {
  background: var(--danger-soft);
  border: 1px solid rgba(211, 63, 73, 0.25);
  color: var(--danger);
}
.alert-success {
  background: rgba(26, 153, 104, 0.08);
  border: 1px solid rgba(26, 153, 104, 0.25);
  color: var(--success);
}

.status-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.saved-indicator {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 200ms;
}
.saved-indicator[data-visible="true"] { opacity: 1; }

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

fieldset {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}
fieldset legend {
  padding: 0;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.radio-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .radio-cards { grid-template-columns: 1fr 1fr; }
}
.radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms, background 120ms, transform 120ms;
}
.radio-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.radio-card input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.radio-card-title {
  font-weight: 500;
  font-size: 0.9375rem;
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}
.radio-list-inline {
  flex-direction: row;
  gap: 1.5rem;
}
.radio-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
}
.radio-row input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.mood-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .mood-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 820px) {
  .mood-cards { grid-template-columns: 1fr 1fr 1fr; }
}
.mood-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 120ms, box-shadow 120ms, background 120ms, transform 120ms;
  position: relative;
  padding-left: 2.5rem;
}
.mood-card input[type="radio"] {
  position: absolute;
  top: 1.25rem;
  left: 1rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}
.mood-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.mood-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.mood-card-title {
  font-weight: 600;
  font-size: 0.9375rem;
}
.mood-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.conditional-group {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-soft);
  background: var(--bg-warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.conditional-group > .form-row:last-child { margin-bottom: 0; }

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}
.dynamic-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}
.sotsmeedia-item {
  grid-template-columns: 9rem 1fr auto;
}
@media (max-width: 520px) {
  .sotsmeedia-item { grid-template-columns: 1fr auto; }
  .sotsmeedia-item .dynamic-platform { grid-column: 1 / -1; }
  .sotsmeedia-item .dynamic-url { grid-column: 1; }
}
.dynamic-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.dynamic-remove:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-small {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  min-height: 36px;
}

.upload-zone {
  margin-top: 0.75rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: center;
  transition: border-color 120ms, background 120ms;
}
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone input[type="file"] {
  display: block;
  margin: 0 auto 0.5rem;
  font-size: 0.875rem;
}
.upload-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.5rem;
}
.upload-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  text-align: left;
  font-size: 0.875rem;
}
.upload-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-top: 1px solid var(--border-light);
}
.upload-list li:first-child { border-top: 0; }
.upload-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: var(--bg-warm);
}
.upload-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-list .upload-progress {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}
.upload-list .upload-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 120ms;
}
.upload-list .upload-status { color: var(--text-muted); font-size: 0.8125rem; min-width: 4rem; text-align: right; }
.upload-list .upload-status[data-state="done"] { color: var(--success); }
.upload-list .upload-status[data-state="error"] { color: var(--danger); }
.upload-list .upload-remove {
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0 0.25rem;
}
.upload-list .upload-remove:hover { color: var(--danger); }

.confirmations {
  padding: 1.25rem 1.5rem;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.checkbox-row input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  accent-color: var(--accent);
}

.thanks-card {
  text-align: center;
}
.thanks-check {
  color: var(--success);
  display: inline-flex;
  margin-bottom: 1rem;
}
.thanks-order {
  margin: 1.5rem auto 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 14rem;
}
.thanks-order-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.thanks-order-number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ========== CHECKOUT + BANK TRANSFER + PAYMENT CONFIRMED ========== */

.checkout-group {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
}
.checkout-step {
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-muted);
}
.checkout-consent .form-help { margin-top: 0.5rem; }

.checkout-method-note {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.payment-cards .radio-card {
  align-items: flex-start;
  padding: 1rem 1.25rem;
}
.payment-cards .radio-card input[type="radio"] {
  margin-top: 0.125rem;
}
.payment-cards .radio-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.payment-cards .radio-card.disabled:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.bank-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.9375rem;
}
@media (max-width: 480px) {
  .bank-details { grid-template-columns: 1fr; gap: 0.25rem; }
  .bank-details dt { margin-top: 0.5rem; }
}
.bank-details dt {
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}
.bank-details dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  word-break: break-all;
}
.bank-details code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.875rem;
  background: var(--bg-card);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.btn-copy {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }
.btn-copy.copied { background: var(--accent); color: #fff; border-color: var(--accent); }

.bank-next {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.bank-next h3 { margin: 0 0 0.5rem; }

.thanks-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== LEGAL PAGES (Müügitingimused, Privaatsuspoliitika) ========== */

.legal-content {
  max-width: 780px;
  margin: 0 auto;
}
.legal-content h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}
.legal-content h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}
.legal-content h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text-secondary);
}
.legal-content p { margin: 0 0 0.875rem; }
.legal-content ul, .legal-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.legal-content li { margin-bottom: 0.375rem; }
.legal-content hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0 1.5rem;
}
.legal-content section { margin-bottom: 1.5rem; }
.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legal-contact p { margin-bottom: 0.5rem; }

/* ========== ENHANCEMENTS PAGE (/et/taiendused) ========== */

.enhancements-content .lede { margin-bottom: 2rem; }

.enhancement-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}
@media (min-width: 560px) { .enhancement-grid { grid-template-columns: repeat(2, 1fr); } }

.enhancement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}
.enhancement-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.enhancement-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.enhancement-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 0.625rem;
}
.enhancement-price {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--accent);
  font-weight: normal;
  margin: 0 !important;
}
.price-note {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.375rem;
  background: var(--bg-warm);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

/* ========== PREP PAGE (§13.1) ========== */

.prep-card {
  max-width: 640px;
  margin: 0 auto;
}
.prep-card h1 {
  margin-bottom: 1rem;
}
.prep-card .lede {
  margin-bottom: 1.75rem;
}
.alert-info {
  background: var(--accent-soft);
  border: 1px solid rgba(61, 90, 254, 0.25);
  color: var(--accent-hover);
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}
.prep-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.prep-checklist li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.prep-check {
  display: inline-flex;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 0.125rem;
}
.prep-checklist strong {
  font-size: 1rem;
  color: var(--text);
}
.prep-meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.prep-sub {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.25rem 0 0;
}
.prep-hint {
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
  text-align: center;
}
.prep-hint-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== INLINE FORM EXAMPLES (§13.2) ========== */

.form-example {
  margin: 0.25rem 0 0.625rem;
  font-size: 0.875rem;
}
.form-example summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-bottom: 1px dotted var(--border);
  transition: color 120ms, border-color 120ms;
}
.form-example summary::-webkit-details-marker { display: none; }
.form-example summary::before {
  content: "►";
  font-size: 0.625rem;
  transition: transform 180ms;
  color: var(--accent);
  display: inline-block;
}
.form-example[open] summary::before { transform: rotate(90deg); }
.form-example summary:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.form-example .example-block {
  margin-top: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--bg-warm);
  border-left: 3px solid var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.form-example .example-block p {
  margin: 0 0 0.625rem;
}
.form-example .example-block p:last-child { margin-bottom: 0; }
.form-example .example-block strong {
  color: var(--text);
  font-weight: 600;
}
.form-example .example-note {
  font-style: italic;
  color: var(--text-muted);
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.75rem !important;
}
.form-example .example-sub-note {
  margin-top: 0.875rem !important;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
}
.form-example .example-pre {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin: 0 0 0.625rem;
  white-space: pre-wrap;
  color: var(--text);
}
.form-example .example-inline-list {
  list-style: none;
  padding: 0;
  margin: 0.375rem 0 0;
}
.form-example .example-inline-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-light);
}
.form-example .example-inline-list li:last-child { border-bottom: 0; }

.enhancement-steps {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
}
.enhancement-steps li {
  margin-bottom: 0.625rem;
  line-height: 1.55;
}
.enhancement-steps code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 0.875rem;
  background: var(--bg-warm);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

/* ========== TURNSTILE ========== */

.turnstile-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}
/* Invisible widget ei vaja ruumi — ainult manuaalse avamise korral */
.turnstile-container .cf-turnstile { min-height: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.legal-content table th {
  text-align: left;
  padding: 0.625rem 0.875rem;
  background: var(--bg-warm);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.legal-content table td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.legal-content table tr:last-child td { border-bottom: 0; }

.lang-link {
  display: inline-block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.lang-link[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-card);
}

/* ========== MARKETING LANDING PAGE ========== */

.marketing-body { background: var(--bg); }

.marketing-nav {
  display: none;
  gap: 1.25rem;
  font-size: 0.9375rem;
  flex: 1;
  justify-content: center;
}
.marketing-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.marketing-nav a:hover { color: var(--accent); }
@media (min-width: 720px) {
  .marketing-nav { display: flex; }
}

.btn-large {
  font-size: 1.0625rem;
  padding: 1rem 1.75rem;
  min-height: 56px;
}

/* Hero */
.hero {
  padding: 4rem 1.25rem 3rem;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
}
@media (min-width: 720px) { .hero { padding: 6rem 1.5rem 5rem; } }
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
}
.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  color: var(--text);
}
.hero-sub {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}
.hero-sub strong { color: var(--accent); font-weight: 600; }
.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}
@media (min-width: 520px) { .hero-ctas { flex-direction: row; justify-content: center; } }
.hero-trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.hero-trust li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

/* Generic section */
.section {
  padding: 3.5rem 1.25rem;
  scroll-margin-top: 2rem;
}
.section-alt { background: var(--bg-warm); }
.section-inner {
  max-width: 960px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  text-align: center;
  margin: 0 0 2.5rem;
  line-height: 1.15;
}
.section-footnote {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0;
}

/* Step cards */
.step-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .step-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms, box-shadow 180ms, border-color 180ms;
}
.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.step-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}
.step-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
}

/* Inclusions */
.inclusions-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .inclusions-grid { grid-template-columns: 2fr 1fr; } }
.inclusions-col {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.inclusions-col h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.inclusions-yes h3 { color: var(--success); }
.inclusions-no h3 { color: var(--text-muted); }
.inclusions-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.inclusions-col li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border-light);
}
.inclusions-col li:last-child { border-bottom: 0; }
.inclusions-yes li::before {
  content: "✓";
  color: var(--success);
  position: absolute;
  left: 0;
  font-weight: 700;
}
.inclusions-no li::before {
  content: "–";
  color: var(--text-muted);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* Examples placeholder */
.examples-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .examples-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .examples-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) {
  .examples-grid-four { grid-template-columns: repeat(4, 1fr); }
}
.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0 0 1.25rem;
}
.example-image {
  height: 180px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-warm));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.placeholder-text {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.55;
}
.example-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-warm);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.example-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  margin: 1.25rem 1.25rem 0.375rem;
}
.example-card p { margin: 0 1.25rem 0.5rem; color: var(--text-secondary); font-size: 0.9375rem; }
.example-card .muted { color: var(--text-muted); font-size: 0.8125rem; }

/* FAQ accordion */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.625rem;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  position: relative;
  padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  transition: transform 180ms;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item[open] summary { border-bottom: 1px solid var(--border-light); }
.faq-item p {
  margin: 0;
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Final CTA */
.section-final-cta {
  text-align: center;
  padding: 4rem 1.25rem;
}
.final-cta-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.final-cta-actions { display: flex; justify-content: center; }

/* Extended footer */
.page-footer-extended {
  padding: 3rem 1.25rem 1.5rem;
}
.footer-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.5fr; } }
.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-col li { margin-bottom: 0.375rem; font-size: 0.9375rem; }
.footer-col a { color: var(--text-secondary); text-decoration: none; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-tag {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 280px;
}
.footer-legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.75rem 0 0;
}
.footer-copyright {
  max-width: 960px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.edit-test-block {
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  background: var(--bg-warm);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  max-width: 100%;
}
.edit-test-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.edit-test-url {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg-card);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  word-break: break-all;
  margin-bottom: 0.75rem;
}

.edit-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.875rem 1.125rem;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid rgba(61, 90, 254, 0.18);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}
.edit-banner-label { font-weight: 600; color: var(--accent); }
.edit-banner-version {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.upload-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
  min-height: 1.25rem;
}

.form-help-subtle {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}

.page-footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-warm);
}
.page-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.page-footer-primary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.375rem;
  letter-spacing: 0.01em;
}
.page-footer-secondary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}
.page-footer-secondary a { margin-left: 0.25rem; }

@media (max-width: 480px) {
  .container { padding: 1rem; }
  .card { padding: 1.5rem 1.25rem; }
  .btn-row { flex-direction: column-reverse; }
  .btn-row .btn { max-width: none; }
  .page-footer { margin-top: 2rem; padding: 1.5rem 1rem; }
}
