/* Founder Research Survey (/research, /ro/research, homepage pop-up).
   Same look as the 5D Coherence™ Check: light reading theme, Newsreader questions, Hanken Grotesk UI,
   Executive Orange accent, thin progress bar. Everything is scoped under .rs / .rs-* so it can't touch the homepage. */
.rs, .rs-page, .rs-sheet {
  --rs-base: #F6F9F9;
  --rs-surface: #FFFFFF;
  --rs-hover: #E3ECEB;
  --rs-line: #D3DFDE;
  --rs-text: #092A2E;
  --rs-muted: #4E6669;
  --rs-accent: #C2541F;
  --rs-accent-hover: #A94716;
  --rs-accent-text: #A94716;
  --rs-error: #B42318;
  --rs-sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rs-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
}
.rs { font-family: var(--rs-sans); color: var(--rs-text); font-size: 16px; line-height: 1.6; text-align: left; }
.rs *, .rs *::before, .rs *::after { box-sizing: border-box; }
.rs :focus-visible { outline: 2px solid var(--rs-accent); outline-offset: 2px; }
.rs [data-focus]:focus { outline: none; }
.rs a { color: var(--rs-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.rs a:hover { color: var(--rs-text); }

/* page */
.rs-page { min-height: 100vh; background: var(--rs-base); padding: 40px 20px 48px; }
.rs-wrap { max-width: 660px; margin: 0 auto; }
.rs-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rs-line); font-family: var(--rs-sans);
  color: var(--rs-muted); text-align: center; }
.rs-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.rs-footer nav a { font-size: 13px; color: var(--rs-muted); text-decoration: none; }
.rs-footer nav a:hover { color: var(--rs-text); }
.rs-footer p { margin: 0; font-size: 12px; line-height: 1.6; opacity: .75; }

/* top row: brand (page) or nothing (pop-up) on the left; flags (and ✕) on the right */
.rs-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.rs-top--popup { justify-content: flex-end; margin-bottom: 8px; }
.rs-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; color: var(--rs-text) !important;
  font-size: 18px; font-weight: 600; }
.rs-brand img { display: block; border-radius: 50%; }
.rs-flags { display: flex; gap: 6px; }
.rs-flag { display: grid; place-items: center; width: 40px; height: 32px; padding: 0; border-radius: 6px; cursor: pointer;
  background: transparent; border: 2px solid transparent; opacity: .55; transition: opacity .15s, border-color .15s; }
.rs-flag svg { display: block; width: 26px; height: 17px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(9,42,46,.18); }
.rs-flag:hover { opacity: 1; }
.rs-flag--on { opacity: 1; border-color: var(--rs-accent); background: var(--rs-surface); }
.rs-close { display: grid; place-items: center; width: 36px; height: 36px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--rs-muted); cursor: pointer; }
.rs-close:hover { background: var(--rs-hover); color: var(--rs-text); }
.rs-close svg { width: 22px; height: 22px; }

/* type */
.rs-title { font-family: var(--rs-serif); font-weight: 500; font-size: clamp(30px, 4vw, 42px); line-height: 1.15;
  letter-spacing: -0.01em; color: var(--rs-text); margin: 0; }
.rs-lead { font-size: 18px; line-height: 1.65; margin: 18px 0 0; }
.rs-fullpage { margin: 10px 0 0; font-size: 14px; }
.rs-q { display: block; font-family: var(--rs-serif); font-weight: 500; font-size: clamp(22px, 3vw, 27px); line-height: 1.35;
  color: var(--rs-text); margin: 0 0 24px; padding: 0; }
.rs-opt-tag { font-family: var(--rs-sans); font-size: 14px; font-weight: 400; color: var(--rs-muted); }
.rs-help { margin: -12px 0 20px; color: var(--rs-muted); font-size: 16px; }
.rs-h3 { font-family: var(--rs-serif); font-weight: 500; font-size: 22px; line-height: 1.3; margin: 0 0 8px; color: var(--rs-text); }

/* flow: Back · "Question n of 10" · bar */
.rs-flowtop { display: flex; justify-content: flex-end; align-items: center; min-height: 24px; margin-bottom: 14px; }
.rs-progress { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--rs-muted); }
.rs-bar { height: 4px; border-radius: 2px; background: var(--rs-line); margin-bottom: 36px; overflow: hidden; }
.rs-bar span { display: block; height: 100%; background: var(--rs-accent); transition: width 250ms ease; }
.rs-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--rs-muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.rs-linkbtn:hover { color: var(--rs-text); }

/* options: radio buttons drawn as the Check's answer rows */
.rs-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rs-opts { display: flex; flex-direction: column; gap: 8px; }
.rs-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 8px; cursor: pointer;
  background: var(--rs-surface); border: 1px solid var(--rs-line); font-size: 16px; line-height: 1.45;
  transition: background-color 150ms, border-color 150ms, color 150ms; }
.rs-opt:hover { border-color: var(--rs-accent); background: var(--rs-hover); }
.rs-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rs-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rs-line); background: var(--rs-surface);
  transition: border-color 150ms, box-shadow 150ms; }
.rs-opt--on, .rs-opt--on:hover { background: var(--rs-accent); border-color: var(--rs-accent); color: #fff; }
.rs-opt--on .rs-dot { border-color: #fff; background: var(--rs-accent); box-shadow: inset 0 0 0 3px var(--rs-accent), inset 0 0 0 10px #fff; }
.rs-opt:has(input:focus-visible) { outline: 2px solid var(--rs-accent); outline-offset: 2px; }

/* inputs */
.rs-input { display: block; width: 100%; padding: 13px 16px; font: inherit; font-size: 16px; color: var(--rs-text);
  background: var(--rs-surface); border: 1px solid var(--rs-line); border-radius: 8px; }
.rs-input:focus { border-color: var(--rs-accent); outline: none; box-shadow: 0 0 0 3px rgba(194, 84, 31, .18); }
.rs-textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.rs-other { margin-top: 10px; }
.rs-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.rs-field label { font-size: 14px; font-weight: 600; }
.rs-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; margin: 4px 0 20px; cursor: pointer; }
.rs-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rs-accent); }
.rs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rs-error { font-size: 15px; color: var(--rs-error); margin: 14px 0 0; }
.rs-privacy { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--rs-muted); }

/* country list */
.rs-countries { list-style: none; margin: 8px 0 0; padding: 6px; max-height: 300px; overflow-y: auto; background: var(--rs-surface);
  border: 1px solid var(--rs-line); border-radius: 8px; }
.rs-country { padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 16px; }
.rs-country:hover, .rs-country--active { background: var(--rs-hover); }
.rs-country--on, .rs-country--on:hover { background: var(--rs-accent); color: #fff; }
.rs-divider { height: 1px; margin: 6px 4px; background: var(--rs-line); }
.rs-none { padding: 10px 12px; color: var(--rs-muted); }

/* buttons (Check's primary / secondary) */
.rs-actions { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rs-btn { display: inline-block; background: var(--rs-accent); color: #fff !important; font-family: var(--rs-sans); font-size: 15px;
  font-weight: 600; letter-spacing: .02em; padding: 13px 30px; border: 1px solid var(--rs-accent); border-radius: 8px;
  text-decoration: none !important; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transition: background-color .15s, box-shadow .15s, transform .06s; }
.rs-btn:hover { background: var(--rs-accent-hover); box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.rs-btn:active { transform: translateY(1px); }
.rs-btn:disabled { opacity: .6; cursor: wait; }
.rs-btn--lg { font-size: 16px; padding: 15px 34px; margin-top: 28px; }
.rs-btn--back { background: transparent; color: var(--rs-muted) !important; border-color: var(--rs-line); box-shadow: none; font-weight: 500; }
.rs-btn--back:hover { background: var(--rs-hover); color: var(--rs-text) !important; border-color: var(--rs-line); box-shadow: none; }
.rs-btn--ghost { background: transparent; color: var(--rs-accent-text) !important; box-shadow: none; }
.rs-btn--ghost:hover { background: var(--rs-accent); color: #fff !important; }

/* thank-you */
.rs-card { margin-top: 24px; padding: 24px; background: var(--rs-surface); border: 1px solid var(--rs-line); border-radius: 14px; }
.rs-card p { margin: 0 0 18px; }
.rs-card .rs-note { font-size: 15px; color: var(--rs-muted); }
.rs-done > .rs-lead + .rs-card { margin-top: 32px; }
.rs-sign { font-family: var(--rs-serif); font-size: 22px; margin: 28px 0 0; }

/* pop-up: centred card on desktop, full-width sheet on phones; the top row (flags + ✕) stays visible */
.rs-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 22, 24, .62); animation: rs-fade .2s ease; }
.rs-sheet { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--rs-base); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: 0 32px 32px; outline: none; }
.rs-sheet .rs-top--popup { position: sticky; top: 0; z-index: 2; background: var(--rs-base); margin: 0 -32px 8px; padding: 14px 18px 10px; }
.rs-sheet .rs-title { font-size: clamp(28px, 3.4vw, 36px); }
@keyframes rs-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .rs-page { padding: 24px 16px 40px; }
  .rs-top { margin-bottom: 28px; }
  .rs-brand { font-size: 16px; }
  .rs-brand img { width: 36px; height: 36px; }
  .rs-overlay { padding: 0; align-items: flex-end; }
  .rs-sheet { max-width: none; max-height: 94vh; max-height: 94dvh; border-radius: 16px 16px 0 0; padding: 0 16px 28px; }
  .rs-sheet .rs-top--popup { margin: 0 -16px 4px; padding: 10px 10px 8px; }
  .rs-opt { padding: 13px 14px; }
  .rs-card { padding: 20px 18px; }
  .rs-btn--lg { width: 100%; text-align: center; }
  .rs-actions .rs-btn { flex: 1; text-align: center; padding-left: 16px; padding-right: 16px; }
  .rs-actions .rs-btn--back { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .rs-overlay { animation: none; } .rs-bar span { transition: none; } }
