:root {
  --bg: #fff8ec;
  --canvas: #fff8ec;
  --surface: #ffffff;
  --surface-hover: #fff7e9;
  --surface-warm: #fff4e2;
  --line: #e0d8cc;
  --line-strong: #b9afa2;
  --text: #0d141a;
  --muted: #70685d;
  --accent: #3f176c;
  --accent-strong: #552195;
  --blue: #3857ff;
  --selection: #6469ff;
  --selection-soft: #f5f7ff;
  --selection-border: color-mix(in srgb, var(--selection) 36%, var(--line));
  --selection-muted: #b7b8c5;
  --error: #9f3a36;
  --radius-sm: 8px;
  --radius-md: 10px;
  --focus-outline-size: 2px;
  --focus-outline-color: var(--blue);
}

* {
  box-sizing: border-box;
}

body.quiz-app {
  margin: 0;
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.theme-twos_product .topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  container-type: inline-size;
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.theme-twos_product .topbar__inner {
  display: grid;
  grid-template-columns: clamp(42px, 5vw, 50px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(8px, 1.3vw, 12px);
  row-gap: 0;
  width: min(100% - clamp(22px, 5vw, 44px), 760px);
  min-height: 64px;
  margin: 0 auto;
  padding: 5px 0 7px;
}

.theme-twos_product .brand-avatar {
  display: flex;
  grid-row: 1 / span 2;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 5vw, 50px);
  min-height: clamp(42px, 5vw, 50px);
  height: auto;
  border-radius: 50%;
  text-decoration: none;
  transition: background 120ms ease;
}

.theme-twos_product .brand-avatar__image {
  width: clamp(38px, 4.6vw, 44px);
  height: clamp(38px, 4.6vw, 44px);
  border: 2px solid rgba(34, 34, 34, 0.12);
  border-radius: 50%;
  object-fit: cover;
}

.theme-twos_product .topbar__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  min-width: 0;
}

.theme-twos_product .brand-name {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 3px 2px 0;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: color 120ms ease;
}

.theme-twos_product .brand-name:hover,
.theme-twos_product .brand-name:focus-visible {
  color: #245e54;
}

.theme-twos_product .brand-avatar:focus-visible,
.theme-twos_product .brand-name:focus-visible,
.theme-twos_product .social-link:focus-visible,
.theme-twos_product .topbar-cta:focus-visible,
.theme-twos_product .nav a:focus-visible {
  outline: 3px solid rgba(34, 34, 34, 0.28);
  outline-offset: 3px;
}

.theme-twos_product .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #111111;
  text-decoration: none;
  transition: color 120ms ease;
}

.theme-twos_product .social-link svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-twos_product .social-link svg path {
  fill: currentColor;
  stroke: none;
}

.theme-twos_product .social-link:hover,
.theme-twos_product .social-link:focus-visible {
  color: #245e54;
}

.theme-twos_product .social-link[href*="instagram.com"]:hover,
.theme-twos_product .social-link[href*="instagram.com"]:focus-visible {
  color: #c13584;
}

.theme-twos_product .social-link[href*="t.me"]:hover,
.theme-twos_product .social-link[href*="t.me"]:focus-visible {
  color: #229ed9;
}

.theme-twos_product .topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(47, 125, 111, 0.28);
  border-radius: 17px;
  background: #fff8f1;
  color: #245e54;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.theme-twos_product .topbar-cta:hover {
  border-color: rgba(200, 76, 18, 0.46);
  background: rgba(200, 76, 18, 0.08);
  color: #9f3a0d;
}

.theme-twos_product .topbar-cta__label-short {
  display: none;
}

@container (max-width: 460px) {
  .theme-twos_product .topbar__inner {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 6px;
    min-height: 60px;
  }

  .theme-twos_product .brand-avatar {
    width: 38px;
    min-height: 38px;
  }

  .theme-twos_product .brand-avatar__image {
    width: 34px;
    height: 34px;
  }

  .theme-twos_product .topbar__primary {
    flex-wrap: nowrap;
  }

  .theme-twos_product .brand-name {
    font-size: 14px;
    padding-right: 2px;
  }

  .theme-twos_product .social-link {
    flex: 0 0 34px;
  }

  .theme-twos_product .social-link svg {
    width: 20px;
    height: 20px;
  }

  .theme-twos_product .topbar-cta {
    flex: 0 0 auto;
    padding-inline: 8px;
  }

  .theme-twos_product .topbar-cta__label-full {
    display: none;
  }

  .theme-twos_product .topbar-cta__label-short {
    display: inline;
  }
}

@container (max-width: 350px) {
  .theme-twos_product .topbar__primary {
    flex-wrap: wrap;
  }
}

.theme-twos_product .nav {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(12px, 1.8vw, 20px);
  min-width: 0;
  color: var(--muted);
  font-size: clamp(14px, 1vw, 15px);
}

.theme-twos_product .nav a {
  color: inherit;
  text-decoration: none;
}

.theme-twos_product .nav a:hover {
  color: var(--text);
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(16px, 4vi, 40px);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vi, 36px);
}

.panel + .panel {
  margin-top: 16px;
}

.panel-wide {
  padding-bottom: 28px;
}

.eyebrow,
.progress-label,
.selector-meta {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.page-title {
  margin: 0;
  max-width: 14ch;
  font-size: 2.35rem;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.page-body,
.selector-subtitle {
  margin: 16px 0 0;
  max-width: 42rem;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--muted);
}

.selector-grid,
.result-actions,
.stack-lg,
.stack-md {
  display: grid;
  gap: 12px;
}

.selector-grid {
  margin-top: 24px;
}

.result-actions {
  margin-top: 24px;
}

.selector-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.selector-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.quiz-app .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quiz-app .button:focus-visible,
.back-link:focus-visible,
.af-choice:focus-within {
  outline: var(--focus-outline-size) solid var(--focus-outline-color);
  outline-offset: 2px;
}

.quiz-app .button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.quiz-app .button-primary:hover {
  background: var(--accent-strong);
}

.quiz-app .button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.quiz-app .button-secondary:hover,
.af-choice:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

.quiz-app .button-large {
  min-height: 52px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.progress-meta {
  margin-bottom: 18px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
  overflow: hidden;
}

.progress-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--selection);
}

.step-panel .stack-lg {
  margin-top: clamp(20px, 2.6vi, 28px);
  gap: 16px;
}

.options-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.af-choice {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.af-choice.is-selected,
.af-choice:has(.af-choice__input:checked) {
  border-color: var(--selection-border);
  background: var(--selection-soft);
}

.af-choice.is-selected:hover,
.af-choice:has(.af-choice__input:checked):hover {
  border-color: var(--selection-border);
  background: var(--selection-soft);
}

.af-choice__input {
  appearance: none;
  position: relative;
  display: block;
  inline-size: 24px;
  block-size: 24px;
  margin: 0.06em 0 0;
  padding: 0;
  border: 2px solid var(--selection-muted);
  background: var(--surface);
  box-shadow: none;
  flex: 0 0 auto;
}

.af-choice__input[type="checkbox"] {
  border-radius: 4px;
}

.af-choice__input[type="checkbox"]:checked {
  border-color: var(--selection);
  background: var(--selection);
  box-shadow: rgba(100, 105, 255, 0.3) 0 2px 4px 0;
}

.af-choice__input[type="radio"] {
  border-radius: 50%;
}

.af-choice__input[type="radio"]:checked {
  border-color: var(--selection);
  background:
    radial-gradient(circle at center, var(--selection) 0 37%, transparent 40%),
    var(--surface);
}

.af-choice__check {
  position: absolute;
  inset-block-start: calc(10px + 0.06em + 4px);
  inset-inline-start: 16px;
  inline-size: 16px;
  block-size: 16px;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
}

.af-choice__input[type="checkbox"]:checked + .af-choice__check {
  opacity: 1;
}

.af-choice__body {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-top: 1px;
}

.af-choice__label {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.af-choice__helper {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.inline-error {
  margin: 16px 0 0;
  color: var(--error);
}

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