/* Small Business Social Media Study — survey styles. Logical properties throughout for RTL. */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #1f1b16;
  --muted: #675f54;
  --line: #e6ddcf;
  --mark: #b3a898;
  --accent: #0d6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ec;
  --warn: #a3361c;
  --sun: #f7d27a;
  --sun-ink: #3b2a04;
  --shadow: 0 1px 2px rgba(45, 32, 14, 0.04), 0 6px 18px rgba(45, 32, 14, 0.05);
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --surface: #1f1c17;
    --ink: #f3eee6;
    --muted: #b1a897;
    --line: #36312a;
    --mark: #6f675b;
    --accent: #5cc4aa;
    --accent-ink: #0a201a;
    --accent-soft: #183731;
    --warn: #f08e74;
    --sun: #e3b54a;
    --sun-ink: #231903;
    --shadow: none;
  }
}
html[lang="he"] { --font: "Heebo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
html[lang="ar"] { --font: "Noto Sans Arabic", "Segoe UI", Tahoma, ui-sans-serif, system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
html[lang="ar"] body { line-height: 1.7; }
button, input, textarea { font: inherit; color: inherit; }
h1:focus, h2:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.noscript { padding: 24px; text-align: center; }

/* layout */
.app { max-width: 620px; margin: 0 auto; padding: 0 16px; min-height: 100vh; min-height: 100dvh; }
.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: 14px 0 10px;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.brand { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.langs { display: inline-flex; flex: none; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.langs button { border: 0; background: transparent; min-height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 0.9rem; }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.progress { height: 6px; margin-top: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

main.screen { padding: 8px 0 168px; animation: rise 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.s-done main.screen { padding-bottom: 48px; }
main.center { text-align: center; padding-top: 10vh; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.8rem; font-weight: 600; margin: 0;
}
.milestone { background: var(--sun); color: var(--sun-ink); margin: 6px 0 2px; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* type */
.qt { font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; margin: 14px 0 8px; }
.qt.hero { font-size: clamp(1.7rem, 7vw, 2.3rem); margin-top: 22px; letter-spacing: -0.025em; }
html[lang="he"] .qt, html[lang="ar"] .qt { letter-spacing: 0; }
.qt label { cursor: text; }
.lead { font-size: 1.1rem; color: var(--ink); margin: 0 0 18px; }
.hint { color: var(--muted); margin: 0 0 6px; font-size: 0.95rem; }
.hint .client { display: block; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); vertical-align: 1px; }
.fine { color: var(--muted); font-size: 0.86rem; margin: 10px 0 0; }
.center { text-align: center; }
.err { color: var(--warn); font-weight: 600; margin: 12px 0 0; min-height: 1.5em; font-size: 0.95rem; }
.err:empty { min-height: 0; margin: 0; }

/* welcome */
.facts { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.facts li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.ficon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ficon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dot { display: inline-block; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--accent), #2e9c86); box-shadow: 0 10px 30px rgba(13, 107, 92, 0.25); }
.lang-hero { margin-bottom: 26px; }
.lang-hero .qt { font-size: 1.4rem; }

/* options */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; display: contents; }
.opts { display: grid; gap: 10px; margin-top: 16px; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer; user-select: none;
  font-weight: 500; text-align: start;
  transition: border-color 0.15s, background-color 0.15s, transform 0.08s;
}
.opt:hover { border-color: var(--mark); }
.opt:active { transform: scale(0.985); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.mark { flex: none; width: 22px; height: 22px; border: 2px solid var(--mark); border-radius: 7px; display: grid; place-items: center; transition: background-color 0.15s, border-color 0.15s; }
.single .mark { border-radius: 50%; }
.ol { flex: 1; }
.key { flex: none; display: none; min-width: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font: 600 0.72rem/20px var(--font); color: var(--muted); text-align: center; }
@media (hover: hover) and (pointer: fine) { .key { display: inline-block; } }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt.on .mark { background: var(--accent); border-color: var(--accent); }
.opt.on .mark::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg); }
.single .opt.on .mark::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--accent-ink); transform: none; }
a.opt { text-decoration: none; color: var(--ink); }
.opt.big { width: 100%; justify-content: center; flex-direction: column; gap: 2px; min-height: 84px; font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.opt.big .lp-sub { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.opt.big[lang="ar"] { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
.opt.big[lang="he"] { font-family: "Heebo", "Segoe UI", Arial, sans-serif; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 18px; }
.opt.sc { justify-content: center; padding: 0; min-height: 62px; font-size: 1.25rem; font-weight: 700; }
.opt.sc.on { background: var(--accent); color: var(--accent-ink); }
.anchors { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 0.86rem; color: var(--muted); }
.anchors span:last-child { text-align: end; }

.other { margin-top: 10px; }
.text {
  width: 100%;
  padding: 14px 16px; margin-top: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-size: 1.05rem;
  -webkit-appearance: none; appearance: none;
}
.other .text { margin-top: 0; }
textarea.text { resize: vertical; min-height: 140px; line-height: 1.5; }
.text::placeholder { color: var(--muted); opacity: 0.8; }
.text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="email"], input[type="tel"] { text-align: start; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { text-align: right; }
.bad .opt, .bad-other .other .text, .field.bad .text { border-color: var(--warn); }
.err { scroll-margin-bottom: 120px; }

/* bottom action bar */
.bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 6;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.bar-in { max-width: 588px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.bar-in.stack { flex-direction: column; align-items: stretch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px;
  border-radius: 999px; border: 0;
  font-weight: 650; font-size: 1.02rem;
  cursor: pointer; text-decoration: none;
  transition: transform 0.08s, opacity 0.15s, background-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary { flex: 1; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(13, 107, 92, 0.22); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost.icon { flex: none; width: 54px; padding: 0; }
.btn.ghost.wide { flex: 1; }
html[dir="rtl"] .flip { transform: scaleX(-1); }

/* done */
.done { text-align: center; padding-top: 4vh; }
.done .lead { margin-bottom: 24px; }
.tick { width: 76px; height: 76px; margin: 12px auto 0; }
.tick svg { width: 100%; height: 100%; }
.tick-c { fill: var(--accent); transform-origin: center; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.tick-p { fill: none; stroke: var(--accent-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.45s 0.3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.card { text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0 0 8px; }
.card p { margin: 0 0 12px; }
.card.ok { display: flex; align-items: center; gap: 12px; }
.card.ok p { margin: 0; font-weight: 600; }
.field { margin-top: 12px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; }
.field .text { margin-top: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row .btn { flex: 1 1 160px; }

@media (min-width: 700px) {
  .app { padding: 0 24px; }
  main.screen { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .tick-p { stroke-dashoffset: 0; }
}
