:root {
  --bg-1: #f3fbfb;
  --bg-2: #eef9f5;
  --bg-3: #f8fdff;
  --ink: #102a3a;
  --muted: #56707e;
  --muted-2: #6f8794;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --border: rgba(16, 42, 58, 0.09);
  --border-strong: rgba(16, 42, 58, 0.14);
  --brand-teal: #14a7b8;
  --brand-green: #1fb96c;
  --brand-dark: #0f5a70;
  --shadow-lg: 0 22px 58px rgba(15, 62, 84, 0.12);
  --shadow-md: 0 10px 24px rgba(15, 62, 84, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --max-width: 1060px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 167, 184, 0.16), transparent 35%),
    radial-gradient(circle at 92% 16%, rgba(31, 185, 108, 0.14), transparent 38%),
    linear-gradient(150deg, var(--bg-3), var(--bg-1) 45%, var(--bg-2));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.75;
  animation: floatOrb 11s ease-in-out infinite;
}

.orb-a {
  width: 220px;
  height: 220px;
  left: 6%;
  top: 14%;
  background: radial-gradient(circle, rgba(20, 167, 184, 0.2), transparent 70%);
}

.orb-b {
  width: 300px;
  height: 300px;
  right: 7%;
  top: 12%;
  background: radial-gradient(circle, rgba(31, 185, 108, 0.18), transparent 72%);
  animation-duration: 9s;
  animation-delay: -2s;
}

.orb-c {
  width: 260px;
  height: 260px;
  right: 20%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(88, 196, 225, 0.14), transparent 70%);
  animation-duration: 12.5s;
  animation-delay: -3s;
}

.line {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  opacity: 0.45;
  animation: lineDrift 9s ease-in-out infinite;
}

.line-a {
  width: 220px;
  left: 7%;
  bottom: 22%;
  background: linear-gradient(90deg, transparent, rgba(20, 167, 184, 0.45), transparent);
}

.line-b {
  width: 170px;
  right: 10%;
  top: 38%;
  background: linear-gradient(90deg, transparent, rgba(31, 185, 108, 0.45), transparent);
  animation-duration: 7.4s;
  animation-delay: -1.6s;
}

.dot-grid {
  position: absolute;
  width: 160px;
  height: 108px;
  left: 5%;
  top: 64%;
  border-radius: 18px;
  opacity: 0.18;
  background-image: radial-gradient(circle, #1194be 1px, transparent 1.3px);
  background-size: 13px 13px;
  animation: gridDrift 10s ease-in-out infinite;
}

.brand-bar,
.app-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.brand-bar {
  width: min(var(--max-width), 100%);
  margin-inline: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.brand-wordmark {
  white-space: nowrap;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: -0.03em;
  font-weight: 600;
  color: #17171d;
}

.brand-light {
  font-weight: 400;
  opacity: 0.9;
}

.app-shell {
  width: min(var(--max-width), 100%);
  margin-inline: auto;
  display: grid;
  align-items: start;
}

.app-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.card-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  padding: 18px 22px 12px;
  background:
    linear-gradient(130deg, rgba(20, 167, 184, 0.08), rgba(31, 185, 108, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  border-bottom: 1px solid rgba(16, 42, 58, 0.06);
}

.progress-wrap {
  min-width: 0;
}

.progress-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.progress-track {
  height: 8px;
  width: min(260px, 100%);
  border-radius: 999px;
  background: rgba(16, 42, 58, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-green));
  transition: width 220ms ease;
}

.language-control {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.language-control label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.language-control select {
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

.title-block {
  padding: 20px 22px 10px;
}

.title-block h1 {
  margin: 0;
  font-size: clamp(1.28rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.last-updated {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.step-stack {
  position: relative;
  padding: 0 22px 22px;
}

.step-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.step-panel.is-active {
  display: block;
  animation: stepIn 220ms ease forwards;
}

.consent-card,
.chooser-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px rgba(15, 62, 84, 0.05);
}

.consent-card {
  padding: 16px;
}

.consent-scroll {
  max-height: 50vh;
  overflow: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

.consent-scroll:focus-visible {
  outline: 3px solid rgba(20, 167, 184, 0.2);
  border-radius: 10px;
}

.consent-scroll h2,
.consent-scroll h3 {
  margin: 0 0 10px;
  line-height: 1.25;
}

.consent-scroll h2 {
  font-size: 1.05rem;
}

.consent-scroll h3 {
  margin-top: 18px;
  font-size: 0.98rem;
}

.consent-scroll p {
  margin: 0 0 12px;
  color: #294351;
  line-height: 1.6;
}

.consent-scroll ul {
  margin: 0 0 12px 18px;
  padding: 0;
  color: #294351;
  line-height: 1.6;
}

.consent-scroll li + li {
  margin-top: 6px;
}

.step-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.decision-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.lang-tile:focus-visible {
  outline: 3px solid rgba(20, 167, 184, 0.28);
  outline-offset: 2px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-green));
  box-shadow: 0 12px 22px rgba(20, 167, 184, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 14px 26px rgba(20, 167, 184, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary {
  background: rgba(20, 167, 184, 0.06);
  border-color: rgba(20, 167, 184, 0.14);
  color: var(--brand-dark);
}

.inline-message {
  margin: 10px 2px 0;
  min-height: 20px;
  color: #8c2d2d;
  font-size: 0.92rem;
}

.inline-message.info {
  color: var(--muted);
}

.chooser-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.chooser-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #243f4d;
}

.lang-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lang-tile {
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 62, 84, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.lang-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 167, 184, 0.22);
  box-shadow: 0 12px 22px rgba(15, 62, 84, 0.08);
}

.lang-tile-label {
  display: block;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.lang-tile-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.step2-actions {
  display: flex;
  justify-content: flex-start;
}

.site-footer {
  width: min(var(--max-width), 100%);
  margin-inline: auto;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  padding: 4px 0 8px;
}

.noscript-banner {
  position: fixed;
  inset: auto 12px 12px 12px;
  z-index: 10;
  background: #fff2f2;
  color: #7a2323;
  border: 1px solid #f0caca;
  border-radius: 12px;
  padding: 10px 12px;
  font: 600 0.9rem/1.4 "Manrope", sans-serif;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -12px, 0) scale(1.03);
  }
}

@keyframes lineDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.32;
  }
  50% {
    transform: translate3d(8px, -5px, 0) rotate(2deg);
    opacity: 0.55;
  }
}

@keyframes gridDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(6px, -6px, 0);
  }
}

@media (max-width: 900px) {
  .card-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .progress-track {
    width: 100%;
  }

  .language-control select {
    min-width: 0;
    width: 100%;
  }

  .language-control {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body {
    padding: 12px;
    gap: 10px;
  }

  .app-card {
    border-radius: 18px;
  }

  .title-block,
  .card-top,
  .step-stack {
    padding-left: 14px;
    padding-right: 14px;
  }

  .step-stack {
    padding-bottom: 14px;
  }

  .consent-card,
  .chooser-card {
    border-radius: 14px;
  }

  .consent-card {
    padding: 14px;
  }

  .consent-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .step-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .decision-buttons {
    justify-content: stretch;
  }

  .decision-buttons .btn,
  .step-actions > .btn-secondary {
    width: 100%;
  }

  .lang-choice-grid {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  body {
    background: #fff;
    padding: 0;
    display: block;
  }

  .bg-layer,
  .brand-bar,
  .card-top,
  .step-actions,
  .inline-message,
  #step2,
  .site-footer {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    margin: 0;
  }

  .app-card {
    box-shadow: none;
    border: none;
    background: #fff;
  }

  .title-block {
    padding: 0 0 12px;
  }

  .step-stack {
    padding: 0;
  }

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

  .consent-scroll {
    max-height: none;
    overflow: visible;
  }
}
