:root {
  --bg: #f7f3ed;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #1f2b2c;
  --muted: #687575;
  --line: #ded8cf;
  --accent: #0b6f6f;
  --accent-strong: #064f4f;
  --accent-soft: #dcefee;
  --gold: #c88a2d;
  --danger: #8d2d2d;
  --success: #21704b;
  --shadow: 0 24px 80px rgba(46, 41, 35, 0.14);
  --radius: 8px;
  --focus: 0 0 0 4px rgba(11, 111, 111, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(11, 111, 111, 0.10), transparent 28rem),
    linear-gradient(315deg, rgba(200, 138, 45, 0.12), transparent 24rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 43, 44, 0.12);
  border-radius: var(--radius);
  color: var(--surface-strong);
  background: var(--accent);
  font-weight: 800;
}

.brand-title,
.brand-subtitle {
  display: block;
}

.brand-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(31, 43, 44, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(12px);
}

.lang-button {
  min-width: 44px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 800;
}

.lang-button.is-active {
  color: var(--surface-strong);
  background: var(--accent);
}

main {
  flex: 1;
  display: grid;
}

.view {
  display: none;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.view.is-active {
  display: block;
  animation: viewIn 260ms ease both;
}

.landing-grid {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.landing-copy {
  max-width: 760px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(11, 111, 111, 0.16);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(220, 239, 238, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-body {
  max-width: 710px;
  margin: 28px 0 0;
  color: #3f4d4d;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action,
.option-button,
.submit-button {
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-action,
.submit-button {
  padding: 0 24px;
  color: var(--surface-strong);
  background: var(--accent);
  box-shadow: 0 16px 36px rgba(11, 111, 111, 0.22);
}

.primary-action:hover,
.submit-button:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.trust-panel {
  display: grid;
  gap: 12px;
}

.trust-item {
  display: block;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(31, 43, 44, 0.10);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.72);
  box-shadow: 0 12px 34px rgba(46, 41, 35, 0.08);
  backdrop-filter: blur(14px);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.trust-item:hover {
  border-color: rgba(11, 111, 111, 0.32);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 18px 42px rgba(46, 41, 35, 0.12);
  transform: translateY(-1px);
}

.trust-item h2 {
  margin: 0;
  font-size: 1rem;
}

.trust-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.trust-readmore {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 850;
}

.wizard-view {
  display: none;
}

.wizard-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  align-content: center;
  gap: 20px;
}

.progress-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 43, 44, 0.10);
}

.progress-fill {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 260ms ease;
}

.question-card {
  width: min(760px, 100%);
  min-height: 430px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(31, 43, 44, 0.10);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow);
}

.question-content {
  min-height: inherit;
  padding: clamp(22px, 5vw, 42px);
}

.question-content.is-changing {
  animation: cardSwap 230ms ease both;
}

.step-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 900;
}

.question-title {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.hotspot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px dashed rgba(11, 111, 111, 0.52);
  color: var(--accent-strong);
  background: transparent;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
}

.hotspot::after {
  content: "?";
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--surface-strong);
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.clause-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f2ec;
}

.clause-reference {
  margin: 24px 0 0;
}

.clause-reference figcaption {
  margin-top: 12px;
}

.text-version-action {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(11, 111, 111, 0.38);
  border-radius: 0;
  color: #516263;
  background: transparent;
  font-size: 0.94rem;
  font-weight: 750;
}

.text-version-action:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.image-note {
  display: none;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.option-button {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(31, 43, 44, 0.14);
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
}

.option-button:hover {
  border-color: rgba(11, 111, 111, 0.5);
  box-shadow: 0 12px 28px rgba(46, 41, 35, 0.10);
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.secondary-action {
  padding: 0 18px;
  border: 1px solid rgba(31, 43, 44, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.secondary-action:hover {
  border-color: rgba(11, 111, 111, 0.42);
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.field-label,
.consent-label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.field-label input[type="email"] {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(31, 43, 44, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
}

.consent-label {
  grid-template-columns: 24px 1fr;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(31, 43, 44, 0.14);
  border-radius: var(--radius);
  background: rgba(220, 239, 238, 0.38);
  line-height: 1.45;
}

.consent-label input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.status-message {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-message.error {
  color: var(--danger);
}

.status-message.success {
  color: var(--success);
}

.result-screen {
  display: grid;
  gap: 18px;
  align-content: center;
  min-height: 330px;
}

.result-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--surface-strong);
  background: var(--success);
  font-weight: 900;
}

.result-screen h2 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  line-height: 1.08;
}

.result-screen p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tooltip-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.tooltip-card {
  position: absolute;
  width: min(360px, calc(100vw - 32px));
  padding: 18px 42px 18px 18px;
  border: 1px solid rgba(31, 43, 44, 0.14);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 22px 70px rgba(22, 30, 30, 0.22);
  pointer-events: auto;
}

.tooltip-card p {
  margin: 0;
  color: #354243;
  line-height: 1.55;
}

.tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
}

.text-dialog {
  width: min(920px, calc(100vw - 24px));
  max-width: none;
  height: min(900px, calc(100vh - 24px));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 30px 100px rgba(22, 30, 30, 0.30);
}

.text-dialog::backdrop {
  background: rgba(31, 43, 44, 0.42);
  backdrop-filter: blur(4px);
}

.text-dialog-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.text-dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 4vw, 28px);
  border-bottom: 1px solid var(--line);
}

.text-dialog-kicker {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.text-dialog h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 1.05;
}

.dialog-close-button {
  min-width: 92px;
  min-height: 44px;
  padding: 0 16px;
  flex: 0 0 auto;
  border: 1px solid rgba(31, 43, 44, 0.22);
  border-radius: var(--radius);
  color: var(--surface-strong);
  background: var(--accent);
  font-weight: 850;
}

.text-reader {
  overflow: auto;
  padding: clamp(22px, 5vw, 48px);
  font-size: 1.14rem;
  line-height: 1.72;
  user-select: text;
  -webkit-user-select: text;
}

.text-reader h3 {
  margin: 0 0 22px;
  font-size: 1.55em;
  line-height: 1.1;
}

.text-reader p {
  max-width: 68ch;
  margin: 0 0 18px;
}

.text-reader ul {
  max-width: 68ch;
  margin: 0;
  padding-left: 1.3em;
}

.text-reader li {
  margin: 8px 0;
}

.article-dialog {
  width: min(780px, calc(100vw - 24px));
  max-width: none;
  max-height: min(820px, calc(100vh - 24px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 30px 100px rgba(22, 30, 30, 0.30);
}

.article-dialog::backdrop {
  background: rgba(31, 43, 44, 0.42);
  backdrop-filter: blur(4px);
}

.article-dialog-shell {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto 1fr;
}

.article-dialog-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 20px;
  padding: clamp(20px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
}

.article-dialog-kicker {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.article-dialog h2 {
  align-self: center;
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.8rem);
  line-height: 1.05;
}

.article-dialog-body {
  overflow: auto;
  padding: clamp(22px, 5vw, 38px);
  font-size: 1.08rem;
  line-height: 1.72;
}

.article-dialog-body p {
  max-width: 66ch;
  margin: 0 0 18px;
}

.article-dialog-body p:last-child {
  margin-bottom: 0;
}

.article-link {
  color: var(--accent-strong);
  font-weight: 850;
  text-underline-offset: 0.18em;
}

.article-link.is-disabled {
  cursor: not-allowed;
  color: var(--muted);
  text-decoration-style: dashed;
}

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

@keyframes cardSwap {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 860px) {
  .landing-grid {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 28px;
  }

  .trust-panel {
    margin-top: 8px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .view {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    min-height: 68px;
  }

  .brand-title {
    font-size: 0.86rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .lang-button {
    min-width: 40px;
  }

  .question-card {
    min-height: 470px;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .secondary-action,
  .submit-button {
    width: 100%;
  }

  .tooltip-layer {
    display: grid;
    align-items: end;
    padding: 12px;
    background: rgba(31, 43, 44, 0.20);
    pointer-events: auto;
  }

  .tooltip-card {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-height: min(70vh, 420px);
    overflow: auto;
    animation: sheetIn 180ms ease both;
  }
}

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

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