/* ============================================================
   MARKETING POTENZIAL CHECKER
   Design: Apple-inspired — clean, minimal, typographic
   ============================================================ */

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

/* ── TOKENS ───────────────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --bg-secondary:#f5f5f7;
  --bg-tertiary: #e8e8ed;

  --label-primary:   #1d1d1f;
  --label-secondary: #6e6e73;
  --label-tertiary:  #aeaeb2;

  --separator:   #d2d2d7;
  --separator-light: #e5e5ea;

  --accent:      #17bdba;
  --accent-dark: #0f8f8c;
  --accent-bg:   #f0fafa;

  --green:       #34c759;
  --green-bg:    #f0fdf4;
  --red:         #ff3b30;

  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

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

  --t: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── BASE ─────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--label-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── TOP BAR ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator-light);
  z-index: 100;
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.topbar-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--label-primary);
  letter-spacing: -0.01em;
}
.progress-track {
  width: 120px;
  height: 3px;
  background: var(--separator);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar-step {
  font-size: 12px;
  color: var(--label-secondary);
  text-align: right;
  letter-spacing: 0.01em;
}

/* ── MAIN ─────────────────────────────────────────────────── */
.main {
  min-height: 100vh;
  padding-top: 52px;
  position: relative;
}

/* ── SCREENS ──────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition:
    opacity 320ms ease,
    transform 320ms ease;
  will-change: opacity, transform;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  position: relative;
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.screen.exit {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.screen-inner {
  width: 100%;
  margin: 0 auto;
  padding: 64px 24px 80px;
  flex: 1;
}
.screen-center {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
}
.screen-narrow {
  max-width: 520px;
  padding-top: 56px;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
.display {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--label-primary);
  margin-bottom: 16px;
}
.title {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--label-primary);
  margin-bottom: 10px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.body-lg {
  font-size: 1.1rem;
  color: var(--label-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 40px;
}
.body-md {
  font-size: 0.95rem;
  color: var(--label-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}
.footnote {
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: 16px;
}

/* ── URL INPUT ────────────────────────────────────────────── */
.url-field-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.url-field {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-lg);
  padding: 0 18px;
  transition: border-color var(--t), box-shadow var(--t);
  box-shadow: var(--shadow-sm);
}
.url-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.12);
}
.url-scheme {
  font-size: 15px;
  color: var(--label-tertiary);
  white-space: nowrap;
  user-select: none;
  padding-right: 2px;
}
.url-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  color: var(--label-primary);
  padding: 16px 0;
  min-width: 0;
}
.url-input::placeholder { color: var(--label-tertiary); }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 24px;
  cursor: pointer;
  transition: background var(--t), transform var(--t), opacity var(--t);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover  { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled {
  background: var(--separator);
  color: var(--label-tertiary);
  cursor: not-allowed;
  transform: none;
}
.btn-primary.btn-block { width: 100%; font-size: 15px; padding: 15px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--bg-secondary);
  color: var(--label-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 24px;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover  { background: var(--bg-tertiary); }
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary.btn-block { width: 100%; font-size: 15px; padding: 15px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 4px;
  transition: opacity var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:hover { opacity: 0.7; }

/* ── SCANNING ANIMATION ───────────────────────────────────── */
.scan-animation {
  width: 100px; height: 100px;
  position: relative;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}
.scan-ring-1 { width: 40px; height: 40px; opacity: 0.8; animation: ripple 2s ease-out infinite; }
.scan-ring-2 { width: 40px; height: 40px; opacity: 0.5; animation: ripple 2s ease-out infinite 0.5s; }
.scan-ring-3 { width: 40px; height: 40px; opacity: 0.3; animation: ripple 2s ease-out infinite 1s; }
.scan-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
  z-index: 1;
}
@keyframes ripple {
  0%   { width: 10px; height: 10px; opacity: 0.8; }
  100% { width: 80px; height: 80px; opacity: 0; }
}
.scan-url {
  font-size: 13px;
  color: var(--label-tertiary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.scan-body { max-width: 320px; }

/* ── DETECT RESULT ────────────────────────────────────────── */
.detect-result {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid var(--separator-light);
}
.detect-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.detect-result .eyebrow { margin-bottom: 6px; }
.detect-result .title   { margin-bottom: 8px; }

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

/* Platform picker */
.platform-picker { padding-top: 16px; }
.picker-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--label-secondary);
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}
.platform-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.platform-btn.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}
.platform-btn-icon { font-size: 22px; }

/* ── CHIPS ────────────────────────────────────────────────── */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.chip {
  padding: 9px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--separator);
  border-radius: var(--r-full, 999px);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--label-primary);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.chip:hover { background: var(--bg-tertiary); }
.chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip.dim { opacity: 0.38; cursor: not-allowed; }

/* ── DETECT UNKNOWN HINT ──────────────────────────────────── */
.detect-unknown-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--label-primary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.detect-unknown-hint svg { flex-shrink: 0; color: var(--accent); margin-top: 1px; }

/* ── FORM FIELDS ──────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
@media (min-width: 480px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
  letter-spacing: 0.01em;
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--label-tertiary);
  pointer-events: none;
}
.field-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-md);
  padding: 11px 36px 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--label-primary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.field-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

/* Budget slider */
.field-full  { grid-column: 1 / -1; }
.field-half  { grid-column: 1 / -1; }
@media (min-width: 480px) { .field-half { grid-column: auto; } }

.field-label-tag {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 6px;
  vertical-align: middle;
}

.budget-slider-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.field-sublabel {
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: -2px;
  line-height: 1.4;
}

.budget-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--separator);
}

.budget-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), var(--separator) var(--pct, 0%));
  outline: none;
  cursor: pointer;
}
.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  cursor: pointer;
  transition: transform 0.15s;
}
.budget-slider::-webkit-slider-thumb:active { transform: scale(1.15); }
.budget-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  cursor: pointer;
}

.budget-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--label-tertiary);
  user-select: none;
}

/* Stat fields */
.stat-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.stat-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--separator-light);
  transition: border-color var(--t);
}
.stat-field:focus-within { border-color: var(--accent); }
.stat-field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--label-primary);
}
.stat-field-sublabel {
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: 1px;
}
.stat-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-unit {
  font-size: 14px;
  color: var(--label-tertiary);
  white-space: nowrap;
}
.stat-input {
  width: 110px;
  background: var(--bg);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--label-primary);
  text-align: right;
  outline: none;
  transition: border-color var(--t);
  -moz-appearance: textfield;
}
.stat-input::-webkit-outer-spin-button,
.stat-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stat-input::placeholder { color: var(--label-tertiary); }
.stat-input:focus { border-color: var(--accent); }

/* Info note */
.info-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--label-tertiary);
  margin-bottom: 28px;
}
.info-note svg { flex-shrink: 0; }

/* ── TOOL LIST ────────────────────────────────────────────── */
.tool-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 28px; }
.tool-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  cursor: pointer;
  transition: background var(--t);
  border-radius: 0;
}
.tool-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.tool-item:last-child  { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.tool-item:only-child  { border-radius: var(--radius-md); }
.tool-item + .tool-item { border-top: 1px solid var(--separator-light); }

/* Wrap all items in a card */
.tool-list-card {
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
}
.tool-list-card .tool-item { background: var(--bg); }
.tool-list-card .tool-item:hover { background: var(--bg-secondary); }

.tool-item-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tool-item-info { flex: 1; min-width: 0; }
.tool-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--label-primary);
}
.tool-item-desc {
  font-size: 12px;
  color: var(--label-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px; height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: var(--bg-tertiary);
  transition: background var(--t);
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--green); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }

/* ── NAV ──────────────────────────────────────────────────── */
.screen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

/* ── CALCULATING ANIMATION ────────────────────────────────── */
.calc-animation {
  width: 64px; height: 64px;
  margin: 0 auto 36px;
  position: relative;
}
.calc-ring {
  width: 64px; height: 64px;
  transform: rotate(-90deg);
}
.calc-track {
  stroke: var(--separator);
}
.calc-progress {
  stroke: var(--accent);
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  stroke-linecap: round;
  animation: calcSpin 1.4s linear infinite;
}
@keyframes calcSpin {
  0%   { stroke-dashoffset: 176; }
  50%  { stroke-dashoffset: 44; }
  100% { stroke-dashoffset: 176; }
}

/* ── RESULTS ──────────────────────────────────────────────── */
.results-inner {
  max-width: 580px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.results-header {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.results-header.in { opacity: 1; transform: translateY(0); }

.results-hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.results-hero-value {
  font-size: clamp(2.8rem, 8vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--label-primary);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.results-hero-sub {
  font-size: 1rem;
  color: var(--label-secondary);
  line-height: 1.5;
}
.results-hero-sub strong { color: var(--green); }

/* Metric cards */
.metric-section {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.metric-section.in { opacity: 1; transform: translateY(0); }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label-tertiary);
  margin-bottom: 10px;
  padding-left: 2px;
}

.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.metric-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--separator-light);
}
.metric-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--label-primary);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.metric-card-value.positive { color: var(--green); }
.metric-card-label {
  font-size: 12px;
  color: var(--label-secondary);
  line-height: 1.4;
}

/* Recommendations */
.reco-section {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reco-section.in { opacity: 1; transform: translateY(0); }

.reco-list-card {
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.reco-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
}
.reco-item + .reco-item { border-top: 1px solid var(--separator-light); }
.reco-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--label-tertiary);
  width: 18px;
  flex-shrink: 0;
}
.reco-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.reco-info { flex: 1; }
.reco-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--label-primary);
  margin-bottom: 2px;
}
.reco-desc {
  font-size: 12px;
  color: var(--label-tertiary);
}
.reco-gain {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 99px;
  padding: 3px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Insight */
.insight-card {
  background: var(--accent-bg);
  border: 1px solid rgba(0,113,227,0.15);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.insight-card.in { opacity: 1; transform: translateY(0); }
.insight-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.insight-sub {
  font-size: 13px;
  color: var(--label-secondary);
  line-height: 1.5;
}

/* CTA */
.results-cta {
  background: var(--label-primary);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.results-cta.in { opacity: 1; transform: translateY(0); }
.cta-headline {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 8px;
}
.cta-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.cta-urgency {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,204,0,1);
  margin-bottom: 20px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--label-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--t), transform var(--t);
  letter-spacing: -0.01em;
  width: 100%;
  margin-bottom: 14px;
}
.cta-btn:hover { opacity: 0.92; }
.cta-btn:active { transform: scale(0.97); }
.cta-link {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color var(--t);
}
.cta-link:hover { color: rgba(255,255,255,0.7); }

.results-disclaimer {
  font-size: 11px;
  color: var(--label-tertiary);
  margin-top: 24px;
  line-height: 1.6;
  text-align: center;
}

/* Restart */
.restart-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--label-tertiary);
  text-decoration: none;
  margin-top: 20px;
  transition: color var(--t);
}
.restart-link:hover { color: var(--label-secondary); }

/* ── ERROR STATE ──────────────────────────────────────────── */
.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: -16px;
  margin-bottom: 12px;
  display: none;
}
.field-error.show { display: block; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .topbar-step  { display: none; }
  .progress-track { width: 80px; }

  .screen-narrow { padding-top: 36px; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row     { grid-template-columns: 1fr; }
  .metric-cards  { grid-template-columns: 1fr; }
  .detect-result { padding: 28px 20px 22px; }
  .results-cta   { padding: 28px 20px; }
}

@media (max-width: 380px) {
  .url-field-wrap { gap: 8px; }
  .chip { font-size: 13px; padding: 8px 13px; }
}

/* ── FOCUS VISIBLE ────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid rgba(0,113,227,0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── SEO ANALYSIS SECTION ─────────────────────────────────── */
.seo-section {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.seo-section.in { opacity: 1; transform: translateY(0); }

.seo-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 10px;
}

/* CSS conic-gradient donut gauge */
.seo-gauge {
  width: 86px; height: 86px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--seo-color, #34c759) calc(var(--seo-pct, 0) * 1%),
    #e5e5ea                   calc(var(--seo-pct, 0) * 1%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.seo-gauge-inner {
  width: 64px; height: 64px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.seo-gauge-score {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--label-primary);
  font-variant-numeric: tabular-nums;
}
.seo-gauge-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--label-tertiary);
  text-align: center;
  line-height: 1.2;
}
.seo-gauge-meta { flex: 1; min-width: 0; }
.seo-hint {
  font-size: 13px;
  color: var(--label-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}
.seo-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.seo-pill {
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  padding: 3px 9px;
}
.seo-pill-ok   { background: var(--green-bg);        color: var(--green); }
.seo-pill-warn { background: #fff8ec;                 color: #b25f00; }
.seo-pill-crit { background: #fff0ef;                 color: var(--red); }

/* Collapsible */
.seo-details { border: 1px solid var(--separator-light); border-radius: var(--radius-md); overflow: hidden; }
.seo-details-summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  user-select: none;
  gap: 8px;
}
.seo-details-summary::-webkit-details-marker { display: none; }
.seo-details-summary::after {
  content: '';
  margin-left: auto;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--label-tertiary);
  transition: transform 200ms ease;
}
.seo-details[open] .seo-details-summary::after { transform: rotate(180deg); }

/* Issue rows */
.seo-rows { border-top: 1px solid var(--separator-light); }
.seo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--bg);
  transition: background var(--t);
}
.seo-row + .seo-row { border-top: 1px solid var(--separator-light); }
.seo-row:hover { background: var(--bg-secondary); }

.seo-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.seo-ok   { background: var(--green-bg); color: var(--green); }
.seo-warning { background: #fff8ec;      color: #b25f00; }
.seo-critical { background: #fff0ef;     color: var(--red); }

.seo-row-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.seo-row-label  { font-size: 13px; font-weight: 500; color: var(--label-primary); }
.seo-row-detail { font-size: 12px; color: var(--label-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── PDF DOWNLOAD BUTTON ──────────────────────────────────── */
.pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  margin-bottom: 12px;
  background: transparent;
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-lg);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--label-secondary);
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  -webkit-tap-highlight-color: transparent;
}
.pdf-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.pdf-btn:active { transform: scale(0.98); }

/* ── RESULTS: IST vs. POTENZIAL ──────────────────────────── */
.results-hero-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 20px;
}
.compare-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}
.compare-block {
  text-align: center;
  flex: 1;
  max-width: 180px;
}
.compare-block-right .compare-value { color: var(--accent); }
.compare-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--label-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.compare-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--label-primary);
  line-height: 1;
}
.compare-sub {
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: 2px;
}
.compare-arrow {
  color: var(--label-tertiary);
  flex-shrink: 0;
}
.hero-delta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hero-delta-badge {
  background: var(--green-bg);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
}
.hero-delta-pct {
  font-size: 14px;
  font-weight: 500;
  color: var(--label-secondary);
}
.results-yearly {
  font-size: 14px;
  color: var(--label-secondary);
  text-align: center;
  margin-bottom: 6px;
}
.results-yearly strong { color: var(--label-primary); }
.results-fallback-note {
  font-size: 11px;
  color: var(--label-tertiary);
  text-align: center;
  margin-top: 4px;
}
.reco-gain-period {
  font-size: 11px;
  font-weight: 400;
  color: var(--label-tertiary);
  margin-left: 1px;
}

/* ── BOOKING BLOCK ────────────────────────────────────────── */
.booking-block {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 20px;
  padding: 40px 32px 32px;
  margin-top: 32px;
  color: #fff;
}

.booking-block-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

.booking-block-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.booking-block-sub {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.88;
  max-width: 520px;
  margin-bottom: 14px;
}

.booking-urgency {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(4px);
}

.booking-calendly-wrap {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  margin-bottom: 24px;
}

.booking-calendly-wrap .calendly-inline-widget {
  display: block;
}

.booking-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.booking-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  cursor: pointer;
}

.booking-action-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.booking-action-btn:active { transform: scale(0.97); }

.booking-action-mail {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
}

.booking-action-web {
  background: #fff;
  color: var(--accent);
  border: none;
}

@media (max-width: 500px) {
  .booking-block { padding: 28px 20px 24px; }
  .booking-block-title { font-size: 21px; }
  .booking-actions { flex-direction: column; }
  .booking-action-btn { justify-content: center; }
}

/* ── COOKIE BANNER ────────────────────────────────────────── */
.cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cookie-overlay.visible {
  display: block;
  opacity: 1;
}

.cookie-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px);
  max-width: 620px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.cookie-banner.visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-inner {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cookie-banner-content {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cookie-banner-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.cookie-banner-text {
  flex: 1;
  min-width: 0;
}

.cookie-banner-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--label-primary);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.cookie-banner-desc {
  font-size: 13px;
  color: var(--label-secondary);
  line-height: 1.55;
}

.cookie-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}
.cookie-link:hover { text-decoration: underline; }

.cookie-details {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cookie-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.cookie-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--label-primary);
  white-space: nowrap;
}
.cookie-detail-info {
  font-size: 12px;
  color: var(--label-secondary);
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
  font-family: var(--font);
  letter-spacing: -0.01em;
}
.cookie-btn:hover  { opacity: 0.85; }
.cookie-btn:active { transform: scale(0.97); }

.cookie-btn-accept {
  background: var(--accent);
  color: #fff;
  width: 100%;
  font-size: 15px;
  padding: 13px 20px;
}

/* App gesperrt solange kein Consent */
body.cookie-locked #main,
body.cookie-locked .topbar {
  pointer-events: none;
  user-select: none;
}

@media (max-width: 500px) {
  .cookie-banner-inner { padding: 18px 16px 16px; }
  .cookie-banner-actions { flex-direction: column; }
  .cookie-btn { width: 100%; text-align: center; }
  .cookie-detail-label { min-width: 100px; }
}

/* ── URL ERROR & CHECKING ─────────────────────────────────── */
.url-error {
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: left;
  padding: 0 4px;
}
.url-error.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes url-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.url-error-shake .url-field {
  animation: url-shake 0.45s ease;
  border-color: var(--red) !important;
}

/* ── HERO BADGES ──────────────────────────────────────────── */
.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--label-secondary);
}
.hero-badge-accent {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ── SOCIAL PROOF ROW ─────────────────────────────────────── */
.social-proof-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  background: var(--bg-secondary);
  border-radius: 100px;
  padding: 8px 16px;
}
.social-proof-avatars {
  display: flex;
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  margin-left: -6px;
}
.social-proof-avatars .avatar:first-child { margin-left: 0; }
.social-proof-text {
  font-size: 12px;
  color: var(--label-secondary);
  line-height: 1.4;
}
.social-proof-text strong { color: var(--label-primary); }

/* ── HERO TESTIMONIAL ─────────────────────────────────────── */
.hero-testimonial {
  margin-top: 28px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  max-width: 440px;
  text-align: left;
  border: 1px solid var(--separator-light);
}
.hero-testimonial-stars {
  color: #ff9f0a;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.hero-testimonial-quote {
  font-size: 14px;
  line-height: 1.6;
  color: var(--label-primary);
  font-style: italic;
  margin-bottom: 8px;
}
.hero-testimonial-author {
  font-size: 12px;
  color: var(--label-secondary);
  font-weight: 500;
}

/* ── STEP PROGRESS HINT ───────────────────────────────────── */
.step-progress-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.step-dots {
  display: flex;
  gap: 6px;
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--separator);
  transition: background 0.3s, transform 0.3s;
}
.step-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}
.step-dot.done {
  background: var(--accent);
  opacity: 0.45;
}
.step-eta {
  font-size: 12px;
  color: var(--label-tertiary);
  font-weight: 500;
}

/* ── CALC FACTS ───────────────────────────────────────────── */
.calc-facts {
  margin-top: 24px;
  max-width: 360px;
}
.calc-fact {
  font-size: 13px;
  color: var(--label-secondary);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

/* ── RESULTS CELEBRATION ──────────────────────────────────── */
.results-celebration {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  margin-bottom: 8px;
  animation: pop 0.5s var(--t-spring) both;
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── RESULTS SOCIAL PROOF ─────────────────────────────────── */
.results-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 0;
}
.rsp-avatars { display: flex; }
.rsp-avatars .avatar { width: 28px; height: 28px; font-size: 11px; }
.rsp-text {
  font-size: 13px;
  color: var(--label-primary);
  line-height: 1.4;
}
.rsp-text strong { color: var(--accent); }

/* ── iOS ZOOM FIX ─────────────────────────────────────────── */
/* Safari zoomt rein wenn font-size < 16px — alle Inputs auf 16px */
@media (max-width: 768px) {
  .url-input,
  .field-select,
  .stat-input {
    font-size: 16px;
  }
}
