:root {
  color-scheme: light;
  --forest: #0e1e15;
  --ink: #16241c;
  --cream: #f4f1e8;
  --cream-2: #fffaf0;
  --green: #14c06e;
  --lime: #dcf35a;
  --leaf: #123320;
  --muted: rgba(22, 36, 28, 0.62);
  --muted-dark: rgba(244, 241, 232, 0.68);
  --line: rgba(22, 36, 28, 0.12);
  --line-dark: rgba(244, 241, 232, 0.12);
  --shadow: 0 28px 80px rgba(14, 30, 21, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family:
    "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.noscript {
  position: fixed;
  inset: 16px;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  box-shadow: var(--shadow);
  text-align: center;
}

.launch-ribbon {
  height: 34px;
  overflow: hidden;
  background: var(--forest);
  color: var(--lime);
  border-bottom: 1px solid rgba(220, 243, 90, 0.22);
  white-space: nowrap;
}

.launch-ribbon div {
  display: inline-flex;
  min-width: 200%;
  gap: 36px;
  padding: 10px 0;
  font: 700 12px/1 "Hanken Grotesk", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: wdr-marquee 34s linear infinite;
}

@keyframes wdr-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.app-shell {
  min-height: calc(100vh - 34px);
  display: grid;
  grid-template-columns: minmax(340px, 0.96fr) minmax(0, 1.04fr);
}

.brand-panel {
  position: relative;
  min-height: calc(100vh - 34px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 38px;
  padding: clamp(24px, 4vw, 58px);
  background:
    radial-gradient(110% 90% at 78% 6%, rgba(20, 192, 110, 0.28), transparent 54%),
    linear-gradient(180deg, rgba(14, 30, 21, 0.1) 0, rgba(14, 30, 21, 0.45) 62%, rgba(14, 30, 21, 0.94) 100%),
    repeating-linear-gradient(118deg, var(--forest) 0, var(--forest) 46px, var(--leaf) 46px, var(--leaf) 92px);
  color: var(--cream);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 420px;
  height: 420px;
  border: 44px solid rgba(20, 192, 110, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.brand-topline,
.brand-copy,
.app-preview,
.hype-strip {
  position: relative;
  z-index: 1;
}

.brand-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    inset 0 0 0 5px var(--forest),
    0 0 0 2px var(--green);
}

.drop-badge,
.hype-strip span,
.option-key,
.pill {
  border-radius: 999px;
}

.drop-badge {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(220, 243, 90, 0.36);
  background: rgba(14, 30, 21, 0.44);
  color: var(--lime);
  font: 700 12px/1 "Hanken Grotesk", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-copy {
  max-width: 650px;
  margin-top: auto;
}

.eyebrow,
.quiz-kicker,
.question-index,
.result-label {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy .eyebrow {
  color: var(--lime);
}

.brand-copy h1,
.question-title,
.intro-title,
.result-title {
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy h1 {
  max-width: 800px;
  margin: 0;
  color: var(--cream);
  font-size: clamp(44px, 7.8vw, 98px);
  line-height: 0.94;
}

.brand-copy p:last-child {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(244, 241, 232, 0.86);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.35;
  font-weight: 500;
}

.app-preview {
  width: min(520px, 100%);
  margin-top: auto;
}

.preview-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(244, 241, 232, 0.18);
  border-radius: 28px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.preview-card::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -70px;
  width: 230px;
  height: 230px;
  border: 28px solid rgba(20, 192, 110, 0.18);
  border-radius: 50%;
}

.preview-top,
.preview-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-top {
  margin-bottom: 16px;
  font-weight: 800;
}

.preview-top strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
}

.preview-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(20, 192, 110, 0.18);
}

.preview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.cloth-tile {
  min-height: 128px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(125deg, rgba(22, 36, 28, 0.06) 0, rgba(22, 36, 28, 0.06) 10px, transparent 10px, transparent 20px),
    var(--tone);
}

.cloth-tile span {
  width: 100%;
  overflow-wrap: anywhere;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.84);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.tile-a {
  --tone: #d7d1c4;
}

.tile-b {
  --tone: #9fb1c2;
}

.tile-c {
  --tone: #c6dcb5;
}

.tile-d {
  --tone: #b9a4cf;
}

.preview-row {
  padding: 13px 0;
  border-top: 1px solid rgba(22, 36, 28, 0.1);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.preview-row strong {
  color: var(--ink);
}

.hype-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hype-strip span,
.pill {
  padding: 9px 13px;
  border: 1px solid rgba(220, 243, 90, 0.32);
  background: rgba(14, 30, 21, 0.5);
  color: var(--lime);
  font-size: 13px;
  font-weight: 800;
}

.quiz-panel {
  min-height: calc(100vh - 34px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: clamp(20px, 4vw, 58px);
  background:
    linear-gradient(rgba(244, 241, 232, 0.94), rgba(244, 241, 232, 0.98)),
    radial-gradient(80% 70% at 92% 0%, rgba(20, 192, 110, 0.16), transparent 55%);
}

.quiz-header,
.quiz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.quiz-progress-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-ring {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 36, 28, 0.15);
  border-radius: 50%;
  background: conic-gradient(var(--green) 0deg, rgba(22, 36, 28, 0.1) 0deg);
  box-shadow: 0 0 0 7px rgba(20, 192, 110, 0.08);
}

.progress-ring span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  margin: 28px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 36, 28, 0.1);
}

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

.question-stage {
  min-height: 0;
  display: grid;
  align-items: center;
}

.stage-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 42px) 0;
}

.slide {
  animation: slide-in 280ms ease both;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-title,
.intro-title,
.result-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
}

.question-helper,
.intro-copy,
.result-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.45;
  font-weight: 500;
}

.option-list {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.option-button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid rgba(22, 36, 28, 0.1);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.96);
  color: var(--ink);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.option-button:hover,
.option-button:focus-visible {
  border-color: rgba(20, 192, 110, 0.72);
  background: #fffdf7;
  box-shadow: 0 16px 34px -24px rgba(11, 122, 69, 0.7);
  transform: translateY(-2px);
  outline: none;
}

.option-button.is-selected {
  border-color: var(--green);
  background: #f8ffce;
  box-shadow: 0 18px 36px -24px rgba(11, 122, 69, 0.85);
  transform: translateY(-2px);
}

.option-key {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(22, 36, 28, 0.08);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.option-label {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
}

.option-check {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(22, 36, 28, 0.28);
  border-radius: 50%;
}

.option-button.is-selected .option-check {
  border-color: var(--green);
  background:
    radial-gradient(circle at 50% 50%, var(--green) 0 38%, transparent 40%),
    var(--cream);
}

.input-wrap {
  margin-top: 34px;
}

.text-input,
.textarea-input {
  width: 100%;
  border: 2px solid rgba(22, 36, 28, 0.14);
  border-radius: 18px;
  background: var(--cream-2);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.text-input {
  min-height: 68px;
  padding: 0 18px;
  font-size: 20px;
  font-weight: 700;
}

.textarea-input {
  min-height: 150px;
  resize: vertical;
  padding: 18px;
  font-size: 18px;
  line-height: 1.45;
}

.text-input:focus,
.textarea-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 7px rgba(20, 192, 110, 0.12);
  transform: translateY(-1px);
}

.selection-count {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill-row .pill {
  border-color: rgba(22, 36, 28, 0.1);
  background: rgba(20, 192, 110, 0.1);
  color: var(--ink);
}

.quiz-controls {
  padding-top: 20px;
}

.ghost-button,
.primary-button,
.result-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.ghost-button {
  padding: 0 18px;
  border: 1px solid rgba(22, 36, 28, 0.14);
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
}

.primary-button,
.result-button {
  padding: 0 25px;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 16px 32px -24px rgba(14, 30, 21, 0.9);
}

.primary-button:hover,
.primary-button:focus-visible,
.result-button:hover,
.result-button:focus-visible {
  background: var(--forest);
  transform: translateY(-2px);
  outline: none;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(20, 192, 110, 0.5);
  transform: translateY(-2px);
  outline: none;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.ghost-button.is-hidden {
  visibility: hidden;
}

.result-card {
  display: grid;
  gap: 22px;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.score-card {
  min-height: 128px;
  padding: 17px;
  border: 1px solid rgba(22, 36, 28, 0.1);
  border-radius: 18px;
  background: var(--cream-2);
}

.score-card strong {
  display: block;
  color: var(--green);
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  overflow-wrap: anywhere;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1;
}

.score-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.share-preview {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid rgba(244, 241, 232, 0.14);
  border-radius: 22px;
  background:
    repeating-linear-gradient(122deg, rgba(244, 241, 232, 0.05) 0, rgba(244, 241, 232, 0.05) 12px, transparent 12px, transparent 24px),
    var(--forest);
  color: var(--cream);
  box-shadow: 0 22px 54px -34px rgba(14, 30, 21, 0.9);
}

.share-preview::after {
  content: "";
  position: absolute;
  top: -92px;
  right: -82px;
  width: 190px;
  height: 190px;
  border: 24px solid rgba(20, 192, 110, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.share-preview-top {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.share-preview-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    inset 0 0 0 5px var(--forest),
    0 0 0 2px var(--green);
}

.share-preview-label {
  position: relative;
  z-index: 1;
  margin: 34px 0 0;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.share-preview-title {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 440px;
  margin-top: 8px;
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.98;
}

.share-preview-copy,
.share-preview-url {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 18px;
  color: rgba(244, 241, 232, 0.76);
  font-weight: 700;
}

.share-preview-url {
  color: var(--lime);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.result-actions .result-button {
  flex: 1 1 176px;
  min-width: min(100%, 176px);
  padding: 0 20px;
  text-align: center;
  white-space: normal;
}

.result-button.share-primary {
  background: var(--green);
  color: var(--forest);
  animation: share-pulse 1800ms ease-in-out 2;
}

.result-button.share-primary:hover,
.result-button.share-primary:focus-visible {
  background: var(--lime);
}

@keyframes share-pulse {
  0%,
  100% {
    box-shadow: 0 16px 32px -24px rgba(14, 30, 21, 0.9);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 18px 38px -18px rgba(20, 192, 110, 0.8);
    transform: translateY(-1px);
  }
}

.result-button.secondary {
  background: rgba(20, 192, 110, 0.12);
  color: var(--ink);
  border: 1px solid rgba(20, 192, 110, 0.28);
}

.result-button.secondary:hover,
.result-button.secondary:focus-visible {
  background: var(--lime);
}

.result-button.tertiary {
  border: 1px solid rgba(22, 36, 28, 0.14);
  background: rgba(255, 250, 240, 0.74);
  color: var(--ink);
}

.result-button.tertiary:hover,
.result-button.tertiary:focus-visible {
  background: #fffdf7;
}

.status-note {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hidden-frame {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    gap: 30px;
  }

  .brand-copy h1 {
    max-width: 760px;
  }

  .app-preview {
    width: min(620px, 100%);
  }

  .quiz-panel {
    min-height: 72vh;
  }
}

@media (max-width: 640px) {
  .launch-ribbon {
    height: 30px;
  }

  .launch-ribbon div {
    padding: 9px 0;
    font-size: 11px;
  }

  .app-shell,
  .brand-panel,
  .quiz-panel {
    min-height: auto;
  }

  .brand-panel,
  .quiz-panel {
    padding: 20px;
  }

  .brand-topline,
  .quiz-header,
  .quiz-controls {
    align-items: flex-start;
  }

  .wordmark {
    font-size: 24px;
  }

  .drop-badge {
    max-width: 140px;
    text-align: center;
    line-height: 1.15;
  }

  .brand-copy h1 {
    font-size: clamp(40px, 13vw, 60px);
  }

  .brand-copy p:last-child {
    font-size: 17px;
  }

  .preview-card {
    padding: 16px;
    border-radius: 22px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cloth-tile {
    min-height: 104px;
  }

  .progress-ring {
    width: 58px;
    height: 58px;
  }

  .progress-ring span {
    width: 44px;
    height: 44px;
    font-size: 12px;
  }

  .question-title,
  .intro-title,
  .result-title {
    font-size: clamp(34px, 12vw, 54px);
  }

  .option-button {
    min-height: 62px;
    grid-template-columns: auto 1fr;
  }

  .option-check {
    display: none;
  }

  .scoreboard {
    grid-template-columns: 1fr;
  }

  .share-preview {
    padding: 20px;
    border-radius: 18px;
  }

  .result-actions .result-button {
    min-height: 54px;
    flex-basis: 100%;
  }

  .quiz-controls {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -20px -20px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(244, 241, 232, 0.94);
    backdrop-filter: blur(14px);
  }

  .primary-button {
    min-width: 132px;
  }
}

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