:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7f7ff;
  background: #090b18;
  font-synthesis: none;
  --surface: rgba(22, 25, 48, 0.88);
  --surface-strong: #202442;
  --border: #41486f;
  --muted: #bac0d9;
  --primary: #8d82ff;
  --primary-strong: #a49cff;
  --focus: #ffd166;
  --danger: #ff9d9d;
  --success: #91e6bd;
  --page: #090b18;
  --field: #0c0f21;
  --text: #f7f7ff;
}

* { box-sizing: border-box; }

body {
  min-width: 0;
  max-width: 84rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 3rem);
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(88, 71, 180, 0.3), transparent 38rem),
    radial-gradient(circle at 100% 25%, rgba(32, 111, 164, 0.2), transparent 34rem),
    var(--page);
}

:root[data-theme="blue"] { color-scheme: dark; }
:root[data-theme="dark"] { color-scheme: dark; --page:#050608; --surface:rgba(20,20,22,.94); --surface-strong:#29292d; --border:#55555e; --primary:#a69cff; --primary-strong:#bbb4ff; --muted:#c9c9d2; --field:#0c0c0f; --text:#fff; }
:root[data-theme="light"] { color-scheme: light; --page:#f5f7fc; --surface:rgba(255,255,255,.96); --surface-strong:#eef1f8; --border:#69728a; --primary:#5146cc; --primary-strong:#6459dc; --muted:#4d566d; --field:#fff; --text:#171a26; --danger:#9f1d2d; --success:#17663f; }
:root[data-theme="accessibility"] { color-scheme: dark; font-size:112.5%; --page:#000; --surface:#000; --surface-strong:#111; --border:#fff; --primary:#00ffff; --primary-strong:#ffff00; --focus:#ff0; --muted:#fff; --field:#000; --text:#fff; --danger:#ff8080; --success:#80ff80; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { color-scheme:light; --page:#f5f7fc; --surface:rgba(255,255,255,.96); --surface-strong:#eef1f8; --border:#69728a; --primary:#5146cc; --primary-strong:#6459dc; --muted:#4d566d; --field:#fff; --text:#171a26; --danger:#9f1d2d; --success:#17663f; }
}

button, textarea, input { font: inherit; }
select { min-height: 2.75rem; padding: .45rem .7rem; border:1px solid var(--border); border-radius:.65rem; color:var(--text); background:var(--surface-strong); font:inherit; }

button, label { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: #080a16;
  background: #fff;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

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

.site-header,
.section-heading,
.result-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.guidance-suggestion {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--primary);
  border-radius: 0.6rem;
  background: rgba(141, 130, 255, 0.1);
}
.guidance-suggestion p { margin-bottom: 0.75rem; }
#guidance-panel, #guidance-review { margin-top: 1.2rem; }
#guidance-question { padding: 0; border: 0; }
#guidance-question legend { padding: 0; margin-bottom: 0.8rem; }
#guidance-free { min-height: 6rem; margin-top: 0.4rem; }
#guidance-free-label:empty, #guidance-free-label:empty + #guidance-free { display: none; }
.guidance-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }
#guidance-summary { display: grid; gap: 0.8rem; }
#guidance-summary div { padding: 0.8rem; border: 1px solid var(--border); border-radius: 0.7rem; }
#guidance-summary dt { font-weight: 750; }
#guidance-summary dd { margin: 0.25rem 0 0; color: var(--muted); }
.summary-edit { margin-top: 0.6rem; }

.site-header { margin-bottom: 2rem; }
.header-tools { display:grid; justify-items:end; gap:.65rem; }
.theme-control { display:grid; gap:.25rem; color:var(--muted); font-weight:700; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0.2rem; font-size: clamp(2.2rem, 7vw, 4.6rem); letter-spacing: -0.055em; }
.brand-logo-slot { display:flex; align-items:center; width:clamp(16rem,38vw,32rem); max-width:100%; aspect-ratio:2.2; margin-bottom:.65rem; overflow:hidden; border-radius:.8rem; }
.brand-logo-image { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
h2, legend { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 750; }
legend { padding: 0 0.4rem; }

.subtitle { max-width: 42rem; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.producer { color: var(--muted); white-space: nowrap; }
.eyebrow { margin-bottom: 0.3rem; color: #bab3ff; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

main, form { display: grid; gap: 1.25rem; }

.journey-progress { position:relative; display:grid; gap:.75rem; width:min(100%,34rem); margin:0 0 .5rem; padding:0; list-style:none; }
.journey-progress li { position:relative; display:grid; grid-template-columns:2.6rem minmax(0,1fr); gap:.8rem; align-items:center; min-width:0; padding:.65rem .8rem; border:1px solid var(--border); border-radius:.85rem; background:var(--surface); }
.journey-progress li:not(:last-child)::after { content:""; position:absolute; z-index:-1; left:2.05rem; top:100%; width:2px; height:.8rem; background:var(--border); }
.journey-number { display:grid; place-items:center; width:2.35rem; height:2.35rem; border:2px solid var(--border); border-radius:50%; font-weight:850; background:var(--field); }
.journey-progress strong, .journey-progress small { display:block; }
.journey-progress small { color:var(--muted); }
.journey-progress li[data-state="current"] { border-width:2px; border-style:double; border-color:var(--primary-strong); }
.journey-progress li[data-state="completed"] .journey-number { border-style:double; border-width:4px; border-color:var(--success); }
.journey-progress li[data-state="upcoming"] { border-style:dashed; }
.journey-content-step { scroll-margin-top:1rem; }
.optional-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.7rem; }
.prompt-benefit { margin:.9rem 0 0; padding:.85rem 1rem; border-inline-start:4px solid var(--primary); color:var(--muted); background:rgba(141,130,255,.08); }

.card {
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--surface);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.18);
}

.settings-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.25rem; }
.choice-grid { display: grid; gap: 0.75rem; }
.intents, .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.destination-group + .destination-group { margin-top: 1rem; }
.destination-group h3 { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.destination-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.destination-choices-europe { grid-template-columns: minmax(0, 15rem); }
.destination-card { align-items:flex-start; min-height:5.5rem; padding:.7rem .8rem; }
.destination-card > span:last-child { display:grid; gap:.2rem; min-width:0; }
.destination-flag { font-size:1.55rem; line-height:1.2; }
.availability-badge { width:max-content; margin-top:.25rem; padding:.15rem .5rem; border:1px solid var(--border); border-radius:999px; color:var(--text); background:var(--surface-strong); font-size:.72rem; font-weight:800; }

.choice {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.choice:hover { border-color: var(--primary-strong); }
.choice:has(input:checked) { border-color: var(--primary-strong); background: rgba(141, 130, 255, 0.17); }
.choice input { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; accent-color: var(--primary); }
.choice small { display: block; color: var(--muted); }

.intent-question { border-left: 4px solid #69b7ff; }
.intent-learn { border-left: 4px solid #72dfb3; }
.intent-create { border-left: 4px solid #df91e6; }
.intent-analyze { border-left: 4px solid #ffbd69; }

textarea {
  width: 100%;
  resize: vertical;
  padding: 1rem;
  border: 1px solid #5b638d;
  border-radius: 0.8rem;
  color: var(--text);
  background: var(--field);
  line-height: 1.55;
}

textarea[aria-invalid="true"] { border-color: var(--danger); }
#request { min-height: 11rem; font-size: 1.08rem; }
#result { min-height: 16rem; margin-top: 0.55rem; }
#privacy-text { min-height: 10rem; margin-top: 0.55rem; }
.privacy-card { border-color: #6c83a9; }

.hint, .message, #precision-explanation { color: var(--muted); }
.message { min-height: 1.5rem; margin: 0.6rem 0 0; }
.error { color: var(--danger); }
.success { color: var(--success); }

progress {
  width: 100%;
  height: 0.9rem;
  margin: 1rem 0 0.6rem;
  accent-color: var(--primary);
}

.button {
  min-height: 3rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.button.primary { color: #090b18; background: var(--primary-strong); }
.button.secondary { color: var(--text); border-color: var(--border); background: var(--surface-strong); }
.button:disabled { cursor: not-allowed; opacity: 0.55; }
.primary-action { display: flex; justify-content: flex-end; }
.primary-action .button { min-width: min(100%, 18rem); }
.result-actions { justify-content: flex-end; margin-top: 1rem; }
.result-actions .compact-action { min-height:2.75rem; padding:.55rem .85rem; }
.communication-slot { width:min(1180px, calc(100% - 2rem)); margin:1rem auto; }
.communication-card { display:grid; gap:.7rem; padding:1rem 1.15rem; border:1px solid var(--border); border-inline-start:.35rem solid var(--primary-strong); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.communication-card h2, .communication-card p { margin:0; }
.communication-card .button { justify-self:start; }

.blocked-card { border-color: #9b5d6b; }
.back-to-top { position:fixed; right:max(1rem,env(safe-area-inset-right)); bottom:max(1rem,env(safe-area-inset-bottom)); z-index:8; min-width:3.25rem; border-color:var(--border); color:var(--text); background:var(--surface-strong); box-shadow:0 .4rem 1.4rem rgba(0,0,0,.35); }

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

[hidden] { display: none !important; }

@media (max-width: 760px) {
  body { padding: 1rem; }
  .site-header, .section-heading { display: block; }
  .header-tools { min-width:0; margin-top:1rem; justify-items:stretch; }
  .producer { white-space:normal; overflow-wrap:anywhere; }
  .theme-control, .theme-control select { width:100%; min-width:0; }
  .brand-logo-slot { width:min(100%,24rem); }
  .brand-logo-image { object-position:center; }
  .journey-progress { width:100%; }
  .journey-progress li { grid-template-columns:2.35rem minmax(0,1fr); padding:.6rem .65rem; }
  .journey-number { width:2.1rem; height:2.1rem; }
  .journey-progress li:not(:last-child)::after { left:1.7rem; }
  .optional-actions { display:grid; grid-template-columns:1fr; margin-top:1rem; }
  .optional-actions .button { width:100%; }
  .settings-grid, .intents, .options { grid-template-columns: 1fr; }
  .destination-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .destination-choices .choice { padding: 0.65rem 0.75rem; }
  .result-actions { display: grid; grid-template-columns: 1fr; }
  .guidance-actions { display: grid; grid-template-columns: 1fr; }
  .result-actions .button, .primary-action .button { width: 100%; }
  #restore { margin-bottom: 1rem; }
}

@media (max-width: 980px) and (min-width: 761px) {
  .destination-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .destination-choices { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
