:root {
  color-scheme: light;
  --page: #f6f1e9;
  --surface: #fffdfa;
  --surface-soft: #f6f2ea;
  --ink: #1d1c18;
  --muted: #6e695f;
  --sage: #4f6a58;
  --deep-teal: #243f35;
  --terracotta: #a05f3f;
  --line: #d9d0c3;
  --line-soft: #ebe4d8;
  --focus: #83502b;
  --shadow: 0 34px 92px rgb(40 34 25 / 14%);
  --font-heading: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 18px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgb(255 253 248 / 70%) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgb(255 253 248 / 70%) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #fbf8f2 0%, var(--page) 46%, #eee6d8 100%);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.58;
}

button,
input {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  transform: translateY(-6rem);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

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

.test-shell {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 3rem);
}

.screen[hidden],
[hidden] {
  display: none !important;
}

.test-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(29 28 24 / 9%);
  border-radius: 8px;
  background: rgb(255 253 248 / 96%);
  box-shadow: var(--shadow);
}

.test-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgb(255 255 255 / 52%), transparent 32%),
    radial-gradient(circle at 14% 18%, rgb(243 207 141 / 16%), transparent 18rem);
}

.landing-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.76fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  padding: clamp(1.1rem, 3.5vw, 3.1rem);
  align-items: center;
}

.question-card,
.result-card {
  display: grid;
  gap: 1.2rem;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(1rem, 3.5vw, 3rem);
}

.landing-copy,
.info-grid,
.result-examples,
.svetlana-note,
.topbar,
.question-fieldset,
.question-actions,
.privacy-line,
.result-panel,
.next-step,
.direct-link-block,
.result-card > .eyebrow,
.result-card > h1 {
  position: relative;
  z-index: 1;
}

.landing-copy {
  min-width: 0;
}

.test-photo {
  position: relative;
  z-index: 0;
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
  width: 100%;
  min-height: 26rem;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgb(29 28 24 / 8%);
  border-radius: 8px;
  aspect-ratio: 4 / 5;
  background: var(--surface-soft);
}

.test-photo img,
.test-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.test-photo img {
  object-fit: cover;
  object-position: 58% 50%;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--sage);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  color: var(--deep-teal);
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(2.65rem, 5.8vw, 5.2rem);
  line-height: 1;
}

h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

h3 {
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  color: var(--ink);
  font-size: clamp(1.22rem, 2vw, 1.55rem);
}

.calm-note,
.privacy-line,
.gentle-disclaimer {
  color: var(--muted);
}

.landing-actions,
.result-actions,
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.primary-action,
.secondary-action,
.text-action,
.text-link,
.secondary-link {
  min-height: 3.05rem;
  border-radius: 8px;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.primary-action {
  border: 1px solid var(--deep-teal);
  background: var(--deep-teal);
  color: white;
}

.secondary-action,
.secondary-link {
  border: 1px solid rgb(79 106 88 / 22%);
  background: rgb(232 239 231 / 82%);
  color: var(--deep-teal);
}

.text-action,
.text-link {
  border: 1px solid transparent;
  background: transparent;
  color: var(--terracotta);
}

.info-grid,
.example-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.info-grid article,
.result-examples,
.svetlana-note,
.result-main,
.approved-practice,
.practice-block,
.product-card,
.direct-link-block,
.secondary-result {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgb(255 255 255 / 72%);
}

.example-row span {
  min-width: 0;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgb(232 239 231 / 76%);
  color: var(--deep-teal);
  font-weight: 800;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.back-action {
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-teal);
}

.progress {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 18rem);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.progress-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(217 208 195 / 72%);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--sage);
}

.question-fieldset {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-fieldset legend {
  margin: 0;
  color: var(--deep-teal);
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.question-help {
  color: var(--muted);
  font-size: 1.08rem;
}

.answer-grid {
  display: grid;
  gap: 0.8rem;
}

.answer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 3.7rem;
  padding: 0.95rem;
  border: 1px solid rgb(79 106 88 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 78%);
  color: var(--ink);
  cursor: pointer;
}

.answer-card input {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--sage);
}

.answer-card-selected {
  border-color: rgb(36 63 53 / 44%);
  background: rgb(232 239 231 / 86%);
}

.result-panel {
  display: grid;
  gap: 0.9rem;
}

.practice-block ul {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.approved-practice {
  display: grid;
  gap: 0.7rem;
  background: rgb(255 250 245 / 84%);
}

.approved-practice h3,
.approved-practice h4 {
  margin: 0;
  color: var(--deep-teal);
}

.approved-practice ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.2rem;
}

.fragment-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.observation,
.soft-recommendation {
  color: var(--deep-teal);
  font-weight: 800;
}

[data-product-recommendations] {
  display: grid;
  gap: 0.8rem;
}

@media (prefers-reduced-motion: no-preference) {
  .screen-active .test-card {
    animation: card-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes card-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

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

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

  .test-photo {
    grid-column: 1;
    grid-row: auto;
    min-height: 16rem;
    aspect-ratio: 16 / 10;
  }

  .info-grid,
  .example-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 17px;
  }

  .test-shell {
    padding: 0.85rem;
  }

  .landing-card,
  .question-card,
  .result-card {
    padding: 1rem;
  }

  .topbar,
  .landing-actions,
  .question-actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .text-action,
  .text-link,
  .secondary-link,
  .back-action {
    width: 100%;
    text-align: center;
  }

  .question-fieldset legend {
    font-size: 1.78rem;
  }
}
