/* Zurveys app layer — screen-specific layout built only from classical.css
   tokens. Mobile-first; the 390px mockups are the reference geometry. */

html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }

button { font: inherit; }
a, button, .radio, .seg-opt { transition: background 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out; }

/* page shells */
.shell { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
.shell-wide { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* kickers — 10px uppercase tracked labels */
.kicker {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-neutral-600);
}
.kicker-accent { color: var(--color-accent-700); }

.tabular { font-variant-numeric: tabular-nums; }

/* — nav — */
.nav { background: var(--color-bg); }
.nav .btn { padding: 6px 16px; }
@media (max-width: 559px) { .nav .btn { padding: 6px 12px; } }

/* — landing — */
.hero { padding: 44px 4px 36px; }
.hero h1 { font-size: 40px; margin: 14px 0; text-wrap: balance; }
.hero .intro { font-size: 15px; margin: 0 0 26px; text-wrap: pretty; }
.hero .btn-primary { min-height: 48px; padding-inline: 26px; font-size: 16px; }
.features { padding: 26px 4px; display: grid; gap: 22px; }
.features h4 { font-size: 19px; margin-bottom: 5px; }
.features p { font-size: 13.5px; margin: 0; text-wrap: pretty; }
.quietly { padding: 22px 4px 26px; }
.quietly p { font-size: 13.5px; margin: 0; text-wrap: pretty; }
.site-footer {
  padding: 16px 24px; border-top: 1px solid var(--color-divider);
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--color-neutral-600);
}
.hero-preview { display: none; }

@media (min-width: 1080px) {
  .landing-grid {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px;
    padding: 72px 40px; align-items: center;
  }
  .hero { padding: 0; }
  .hero h1 { font-size: 58px; margin: 16px 0 18px; }
  .hero .intro { font-size: 17px; max-width: 46ch; margin-bottom: 30px; }
  .hero-preview {
    display: block; border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
    background: var(--color-surface); padding: 26px 26px 22px; box-shadow: var(--shadow-md);
  }
  .features { grid-template-columns: repeat(3, 1fr); gap: 44px; padding: 44px 40px; }
  .quietly { padding: 22px 40px 26px; }
}

/* — answer rows (radio/checkbox bordered rows, 2b spec) — */
.answer-row {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  padding: 12px; min-height: 48px; font-size: 15px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  width: 100%; text-align: left; background: transparent; color: inherit;
}
.answer-row:hover { border-color: var(--color-accent); }
.answer-row.selected, .answer-row:has(input:checked) { border-color: var(--color-accent); }
.answer-row .checkbox {
  width: 16px; height: 16px; flex: none; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-neutral-400);
  display: grid; place-items: center; font-size: 11px; line-height: 1;
}
.answer-row input:checked ~ .checkbox, .answer-row.selected .checkbox {
  border-color: var(--color-accent); background: var(--color-accent); color: var(--color-bg);
}

/* rating squares */
.rating-row { display: flex; gap: 8px; }
.rating-cell {
  flex: 1; height: 52px; display: grid; place-items: center;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  font-size: 16px; cursor: pointer; background: transparent; color: inherit;
}
.rating-cell:hover { border-color: var(--color-accent); }
.rating-cell.selected {
  border: 1.5px solid var(--color-accent); background: var(--color-accent-100);
  color: var(--color-accent-700);
}
.rating-labels { display: flex; justify-content: space-between; font-size: 11.5px; margin-top: 6px; }

/* yes/no half-width pair */
.yesno-row { display: flex; gap: 10px; }
.yesno-row .btn { flex: 1; min-height: 52px; font-size: 16px; }
.yesno-row .btn.selected {
  border-color: var(--color-accent); color: var(--color-accent-700);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

/* image choice tiles */
.image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.image-tile {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; padding: 0; background: transparent; color: inherit;
  text-align: left; width: 100%;
}
.image-tile.selected { border: 1.5px solid var(--color-accent); }
.image-tile .img {
  height: 96px; background: var(--color-neutral-200); display: grid; place-items: center;
}
.image-tile .img img { width: 100%; height: 96px; object-fit: cover; }
.image-tile .caption {
  padding: 8px 10px; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.dot-glyph {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--color-neutral-400); flex: none;
}
.image-tile.selected .dot-glyph {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 3.5px var(--color-bg);
}

/* dropdown trigger (native select styled) */
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none; width: 100%;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  min-height: 48px; padding: 12px 36px 12px 14px; font: inherit; font-size: 15px;
  background: transparent; color: inherit; cursor: pointer;
}
.select-wrap::after {
  content: '▾'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: color-mix(in srgb, var(--color-text) 68%, transparent);
  pointer-events: none;
}

/* iOS Safari auto-zooms any focused control whose font-size is under 16px.
   On touch-sized screens every text control gets 16px (!important beats the
   per-view inline sizes) — larger tap-and-read text is right on mobile anyway. */
@media (max-width: 740px) {
  .input,
  textarea.input,
  .select-wrap select,
  .title-input {
    font-size: 16px !important;
  }
  .title-input { font-size: 22px !important; }  /* already >16, keep display size */
}

/* — responder progress — */
.progress-track { height: 2px; background: var(--color-neutral-200); }
.progress-fill { height: 2px; background: var(--color-accent); transition: width 120ms ease-out; }

/* — circled check (published / finished) — */
.check-circle {
  width: 44px; height: 44px; border: 1px solid var(--color-accent); border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 16px;
  color: var(--color-accent-700); font-size: 20px;
}

/* — share row (published) — */
.share-row { display: flex; gap: 8px; align-items: stretch; }
.share-link {
  flex: 1; border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  padding: 12px; font-size: 14.5px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap;
}

/* — payout card (finished) — */
.payout-card {
  border: 1px solid var(--color-accent); border-radius: var(--radius-lg);
  padding: 22px 20px; text-align: left; display: grid; gap: 14px;
}
.payout-amount { font-family: var(--font-heading); font-size: 32px; line-height: 1; }
.or-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--color-neutral-500); font-size: 11px;
}
.or-divider::before, .or-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--color-divider);
}

/* — dashboard stat row / results — */
.stat-row { display: flex; gap: 24px; }
.stat-num { font-family: var(--font-heading); font-size: 30px; line-height: 1.05; }
.stat-label { font-size: 11.5px; }

.bar-track { height: 4px; background: var(--color-neutral-200); border-radius: 2px; }
.bar-fill { height: 4px; background: var(--color-accent); border-radius: 2px; }
.bar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }

.quote {
  font-size: 13px; margin: 0; border-left: 2px solid var(--color-divider); padding-left: 10px;
}

/* — builder — */
.title-input {
  font-family: var(--font-heading); font-size: 22px; min-height: 48px;
  font-weight: var(--font-heading-weight);
}
.builder-option-row { display: flex; align-items: center; gap: 10px; }
.add-question-zone {
  border: 1px dashed var(--color-neutral-400); border-radius: var(--radius-md);
  padding: 16px 14px;
}
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip {
  border: 1px solid var(--color-accent); color: var(--color-accent);
  border-radius: calc(var(--radius-md) * 0.75); background: transparent;
  padding: 7px 12px; font-size: 11px; letter-spacing: 0.02em; cursor: pointer;
}
.type-chip:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }

/* stacked radio groups (notifications, money) */
.radio-stack .radio { display: flex; }

/* money option rows (before-you-publish) */
.money-row {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  padding: 12px; min-height: 48px; align-items: flex-start;
}
.money-row:has(input:checked) { border-color: var(--color-accent); }
.money-row strong { font-weight: 600; }
.money-row .sub { display: block; font-size: 12px; text-wrap: pretty; }

.notice-panel {
  border: 1px solid var(--color-accent-300); background: var(--color-accent-100);
  border-radius: var(--radius-md); padding: 14px 14px 12px;
}
.notice-panel p { font-size: 13px; margin: 0; color: var(--color-accent-900); text-wrap: pretty; }

.detail-panel {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  padding: 14px; display: grid; gap: 12px;
}

/* — bottom sheet (account) — */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: min(480px, 100%); display: flex; flex-direction: column; gap: 14px;
  padding: 24px 22px 34px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-divider); border-bottom: 0;
  max-height: 92vh; overflow-y: auto;
}
@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: var(--radius-lg); border-bottom: 1px solid var(--color-divider); }
}
[hidden] { display: none !important; }

/* — worth-knowing banner (published) — */
.banner-surface {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  background: var(--color-surface); padding: 16px 16px 14px; text-align: left;
}

/* reCAPTCHA v3 badge: hidden per Google's allowed pattern — attribution text
   is rendered inline near submit buttons instead (see .recaptcha-note). */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { font-size: 10.5px; color: var(--color-neutral-500); }
.recaptcha-note a { color: inherit; }
