:root {
  --ink: #1f2328;
  --muted: #606a73;
  --line: #d9ded8;
  --line-strong: #c6d0c8;
  --paper: #faf9f4;
  --panel: #ffffff;
  --accent: #1f7a68;
  --accent-strong: #165c4f;
  --accent-soft: #dcefe8;
  --warm: #b85c38;
  --warm-soft: #fff0e8;
  --soft: #edf6f2;
  --danger: #a53d3d;
  --shadow: 0 18px 40px rgba(31, 35, 40, 0.08);
  --shadow-soft: 0 10px 26px rgba(31, 35, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.field-label {
  display: block;
  font-weight: 700;
  margin: 4px 0 -8px;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  min-height: 86vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(18, 38, 34, 0.82), rgba(18, 38, 34, 0.38)),
    url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-inner,
.screen,
.topbar-inner {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: 1.1rem;
}

.lead {
  margin: 20px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.public-description {
  display: grid;
  gap: 6px;
}

.public-description p {
  margin: 0;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
}

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

.button.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.button.secondary:hover {
  background: #f4f4ef;
}

.button.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.button.danger {
  background: var(--danger);
}

.button.compact {
  min-height: 40px;
  padding: 0 14px;
}

.question-top-actions {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(250, 249, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  font-weight: 800;
}

.progress {
  width: min(360px, 42vw);
  height: 8px;
  overflow: hidden;
  background: #e8ebe4;
  border-radius: 999px;
}

.progress-bar {
  height: 100%;
  width: calc(var(--progress) * 1%);
  background: var(--accent);
}

.screen {
  padding: clamp(22px, 5vw, 42px) 0 64px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: clamp(20px, 4vw, 34px);
}

.research-method-section {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.research-method-section .eyebrow {
  color: var(--accent-strong);
}

.research-method-copy {
  display: grid;
  gap: 12px;
}

.research-method-copy p {
  margin: 0;
  max-width: 900px;
}

.research-method-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.research-method-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.38;
}

.stack {
  display: grid;
  gap: 16px;
}

.muted {
  color: var(--muted);
}

.question-text {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.18;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.option:hover,
.option.selected {
  border-color: var(--accent);
  background: var(--soft);
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.field {
  display: grid;
  gap: 8px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.scale {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}

.scale button {
  min-height: 42px;
  padding: 0;
}

.aside {
  display: grid;
  gap: 14px;
}

.card {
  padding: 18px;
}

.qpay-qr {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.qpay-payment-surfaces {
  display: grid;
  gap: 12px;
}

.qpay-surface {
  box-shadow: none;
}

.qpay-desktop-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
}

.qpay-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.qpay-qr-large {
  width: min(320px, 100%);
}

.qpay-secondary-apps {
  display: grid;
  gap: 12px;
}

.qpay-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.qpay-app-card {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 104px;
  padding: 14px 10px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.qpay-app-card:hover,
.qpay-app-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(39, 132, 111, 0.12);
  transform: translateY(-1px);
}

.qpay-app-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #f6faf8;
  border: 1px solid var(--line);
}

.qpay-app-logo-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 900;
}

.qpay-mobile-primary {
  display: none;
}

.qpay-mobile-qr-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.qpay-mobile-qr-toggle summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 850;
}

.qpay-mobile-qr-toggle .qpay-qr {
  display: block;
  margin: 12px auto 0;
}

.qpay-reference {
  margin: 0;
}

.choice-panel {
  overflow: hidden;
}

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

.choice-card {
  position: relative;
  align-content: start;
  min-height: 100%;
  box-shadow: none;
}

.choice-card-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #f3faf7 100%);
}

.choice-kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.choice-button {
  width: 100%;
  margin-top: auto;
}

.price {
  margin: 0;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 900;
}

.price-stack {
  display: grid;
  gap: 4px;
}

.price-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 800;
}

.price-line span,
.price span:first-child {
  display: inline-block;
  min-width: 155px;
}

.price.promo {
  color: var(--accent-strong);
}

.price span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.price .price-label {
  margin-left: 0;
  color: var(--ink);
  text-decoration: none;
}

.paywall-panel {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.paywall-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.paywall-detail-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.paywall-detail-grid ul {
  margin-bottom: 0;
}

.no-account-note,
.contact-capture-card,
.contact-summary {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.no-account-note p {
  margin: 0;
}

.no-account-note p + p {
  margin-top: 6px;
  color: var(--muted);
}

.contact-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.contact-summary dl {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
}

.contact-summary dl > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-summary dt {
  color: var(--muted);
  font-weight: 800;
}

.contact-summary dd {
  margin: 0;
  font-weight: 800;
}

.compact-button {
  width: auto;
  min-height: 42px;
  padding: 0 14px;
}

.report-delivery-card {
  border-color: var(--accent-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.inline-summary {
  margin-top: 12px;
}

.sample-preview {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.sample-grid > div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sample-grid h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.pill.warn {
  background: #fff0e8;
  color: var(--warm);
}

.report-section {
  margin-top: 16px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.report-section:first-child {
  margin-top: 0;
  border-color: var(--accent-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.report-section h2,
.report-section h3 {
  margin-bottom: 10px;
}

.report-section p,
.report-section ul {
  margin-bottom: 0;
}

.report-section ul {
  padding-left: 1.15rem;
}

.report-section li + li {
  margin-top: 6px;
}

.runtime-visible-surface-integration {
  max-width: 100%;
  margin-top: clamp(18px, 4vw, 28px);
  padding-top: clamp(16px, 3vw, 24px);
  border-top: 1px solid var(--line-strong);
  overflow-wrap: anywhere;
}

.visible-surface-prototype.runtime-visible-surface-integration {
  width: 100%;
}

.runtime-visible-surface-integration h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.runtime-visible-surface-integration + .runtime-visible-surface-integration {
  margin-top: 18px;
}

.visible-surface-card {
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: clamp(15px, 2.5vw, 20px);
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.visible-surface-card:first-child {
  border-color: var(--line);
  background: #fff;
}

.visible-surface-card h3 {
  font-size: 1.02rem;
  line-height: 1.25;
}

.visible-surface-card p {
  color: #374151;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.runtime-visible-surface-integration[data-surface="safety"] .visible-surface-card {
  border-color: #e7c8c8;
  background: #fffafa;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.report-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  margin-top: 14px;
  overflow: hidden;
}

.report-table th,
.report-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: var(--soft);
  color: var(--accent-strong);
}

.report-table tr:last-child td {
  border-bottom: 0;
}

.cycle-map {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.cycle-map p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(31, 35, 40, 0.04);
}

.cycle-map span {
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-stat strong {
  display: block;
  font-size: 1.55rem;
}

.feedback-survey {
  border-color: rgba(31, 99, 84, 0.28);
  background: rgba(245, 251, 248, 0.86);
}

.feedback-question {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.feedback-question:first-of-type {
  border-top: 0;
}

.feedback-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-size: 0.92rem;
}

.feedback-option input {
  accent-color: var(--primary);
}

.feedback-export-json {
  max-height: 62vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1714;
  color: #edf7f2;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.5;
}

.checkbox-row input {
  margin-top: 5px;
}

.table-like {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 1fr) minmax(92px, 0.7fr) minmax(92px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.danger-copy {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 820px) {
  .grid,
  .two-col,
  .choice-grid,
  .paywall-detail-grid,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .progress {
    width: 100%;
  }

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

  .aside {
    order: 2;
  }

  .research-method-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .qpay-desktop-primary {
    display: none;
  }

  .qpay-mobile-primary {
    display: block;
  }

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

  .qpay-app-card {
    min-height: 108px;
    padding: 14px 8px;
  }
}

@media (max-width: 520px) {
  .hero-inner,
  .screen,
  .topbar-inner {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    min-height: 82vh;
    align-items: end;
    padding: 56px 0 44px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  h3 {
    font-size: 1.02rem;
  }

  .lead {
    font-size: 1rem;
  }

  .panel,
  .card,
  .report-section {
    padding: 16px;
  }

  .contact-summary {
    display: grid;
  }

  .compact-button {
    width: 100%;
  }

  .runtime-visible-surface-integration {
    margin-top: 16px;
    padding-top: 16px;
    overflow-x: hidden;
  }

  .runtime-visible-surface-integration h2 {
    font-size: 1.28rem;
    line-height: 1.18;
  }

  .visible-surface-card {
    margin-top: 8px;
    padding: 14px;
  }

  .visible-surface-card h3 {
    font-size: 1rem;
    line-height: 1.28;
  }

  .actions,
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .button {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
  }

  .question-top-actions .button {
    width: auto;
    min-height: 44px;
  }

  .option {
    min-height: 54px;
    padding: 12px;
  }

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

  .pill {
    max-width: 100%;
    white-space: normal;
  }

  .topbar-inner {
    gap: 10px;
  }

  .brand {
    font-size: 0.98rem;
  }

  .report-table th,
  .report-table td {
    padding: 10px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }
}
