/* TimelessToday feedback wizard — calm, still, unhurried.
   Palette: warm paper, deep slate-blue ink, one timeless-gold accent, calm
   teal for "all smooth", soft clay for gentle errors. Layout uses logical
   properties throughout so an RTL locale is a config flip, not a rebuild. */

:root {
  --paper:      #efece3;
  --card:       #fbf9f4;
  --ink:        #273038;
  --ink-soft:   #5a6570;
  --ink-faint:  #8a929b;
  --gold:       #c29a43;
  --gold-deep:  #a67f2e;
  --teal:       #3c7a6f;
  --teal-soft:  #eaf1ef;
  --clay:       #b15c54;
  --line:       rgba(39, 48, 56, 0.12);
  --line-soft:  rgba(39, 48, 56, 0.07);
  --focus:      #6a94c9;

  --radius:     18px;
  --radius-sm:  11px;
  --shadow:     0 1px 2px rgba(39,48,56,.05), 0 18px 50px -24px rgba(39,48,56,.35);

  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --step: min(2.5rem, 7vw);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  /* Dawn-over-stillness atmosphere behind the card. */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #f7f2e6 0%, rgba(247,242,230,0) 60%),
    radial-gradient(90% 60% at 85% 5%, rgba(194,154,67,.10) 0%, rgba(194,154,67,0) 55%),
    radial-gradient(90% 70% at 10% 100%, rgba(60,122,111,.08) 0%, rgba(60,122,111,0) 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

#app {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
}

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 33rem;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* ---------- Named progress stepper ---------- */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
  text-align: center;
}
/* connector from the previous dot to this one (RTL-aware) */
.step::before {
  content: "";
  position: absolute;
  top: 4px;
  inset-inline-start: -50%;
  inset-inline-end: 50%;
  height: 2px;
  background: var(--line);
  transition: background-color .5s ease;
}
.step:first-child::before { display: none; }
.step.done::before,
.step.here::before { background: var(--gold); }
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  z-index: 1;
  transition: background-color .5s ease;
}
.step.done .step-dot { background: var(--gold); }
.step.here .step-dot {
  background: var(--gold);
  animation: breathe 3.4s ease-in-out infinite;
}
.step-label {
  font-size: .6rem;
  line-height: 1.2;
  letter-spacing: .01em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.step.here .step-label { color: var(--ink); font-weight: 600; }
@keyframes breathe {
  0%, 100% { opacity: .45; }
  50%      { opacity: 1; }
}

/* ---------- Typography ---------- */
.eyebrow {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: .96rem;
}
.body-text {
  margin: 0;
  color: var(--ink-soft);
}

.screen { display: flex; flex-direction: column; gap: 1.2rem; }
.screen-head { display: flex; flex-direction: column; gap: .5rem; }
.field-group { display: flex; flex-direction: column; gap: 1.1rem; }

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .25rem;
}
.actions .spacer { flex: 1; }

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: .72rem 1.4rem;
  cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(166,127,46,.8);
}
.btn-primary:hover { background: var(--gold-deep); }
.btn-primary[disabled] { opacity: .5; cursor: default; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  padding-inline: .4rem;
}
.btn-ghost:hover { color: var(--ink); }

.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-quiet:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ---------- Rating orbs ---------- */
.rating {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}
.orb {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .35rem .1rem;
  font: inherit;
}
.orb-dot {
  width: clamp(2.4rem, 12vw, 3rem);
  height: clamp(2.4rem, 12vw, 3rem);
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  transition: transform .18s ease, border-color .2s ease, background-color .2s ease;
}
.orb-dot span { font-size: 1.25rem; line-height: 1; color: var(--gold); opacity: .4; transition: opacity .2s ease, color .2s ease; }
.orb-label { font-size: .78rem; color: var(--ink-faint); transition: color .2s ease; }
.orb:hover .orb-dot { border-color: var(--gold); }
.orb:hover .orb-dot span { opacity: .7; }
.orb.selected .orb-dot {
  border-color: var(--gold);
  background: var(--gold);
  transform: scale(1.06);
}
.orb.selected .orb-dot span { opacity: 1; color: #fff; }
.orb.selected .orb-label { color: var(--ink); font-weight: 600; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip {
  font: inherit;
  font-size: .92rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  min-height: 40px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.chip:hover { border-color: var(--gold); }
.chip.on {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ---------- Problem checklist ---------- */
.none-option { margin-bottom: .35rem; }
.group { border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.group:first-of-type { border-top: none; padding-top: 0; }
.group-name {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .6rem;
}
.check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .5rem .55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .15s ease;
}
.check:hover { background: rgba(39,48,56,.03); }
.check input { margin-top: .2rem; accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.check.on { background: rgba(194,154,67,.10); }
.check-text { font-size: .95rem; color: var(--ink); }

.none-big {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.none-big input { accent-color: var(--teal); width: 20px; height: 20px; }
.none-big.on { border-color: var(--teal); background: var(--teal-soft); }
.none-big .check-text { font-weight: 600; }

/* ---------- Form fields ---------- */
label.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field-label .muted { font-weight: 400; color: var(--ink-faint); }

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 3rem; line-height: 1.5; }
.textarea-lg { min-height: 8.5rem; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(194,154,67,.18);
}

.consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input { margin-top: .15rem; accent-color: var(--gold); width: 17px; height: 17px; }

.help {
  font-size: .85rem;
  color: var(--ink-soft);
  background: rgba(39,48,56,.035);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
  margin-top: .35rem;
}
.help-toggle {
  font: inherit;
  font-size: .85rem;
  background: none;
  border: none;
  color: var(--gold-deep);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  align-self: flex-start;
}

/* ---------- Screenshot ---------- */
.shot { display: flex; flex-direction: column; gap: .5rem; }
.shot-preview {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.shot-preview img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}
.shot-name { font-size: .85rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Notices ---------- */
.notice {
  font-size: .9rem;
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
}
.notice-error { background: rgba(177,92,84,.10); color: var(--clay); border: 1px solid rgba(177,92,84,.3); }
.privacy-note { font-size: .84rem; color: var(--ink-faint); }
.privacy-note a { color: var(--gold-deep); }

/* ---------- Header / language switcher ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.brand { font-family: var(--serif); font-size: 1rem; color: var(--ink); font-weight: 500; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.lang select {
  width: auto;
  padding: .35rem 1.8rem .35rem .6rem;
  font-size: .85rem;
  border-radius: 999px;
  background-color: var(--card);
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 1rem;
  font-size: .8rem;
  color: var(--ink-faint);
}
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .copyright { margin-inline-start: auto; }

/* ---------- Thank you ---------- */
.thanks-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid; place-items: center;
  font-size: 1.6rem;
}

/* ---------- Turnstile ---------- */
.turnstile-wrap { display: flex; justify-content: center; }

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Screen transition ---------- */
.screen { animation: rise .34s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* RTL: flip the rise offset origin is fine; logical props handle the rest. */
[dir="rtl"] .foot .copyright { margin-inline-start: auto; }
