/* ==========================================================================
   Autoprodavnice kviz — builds on site.css tokens, buttons, .checks, .insert, .eyebrow
   ========================================================================== */
body.quiz { background: var(--cream); min-height: 100vh; }

/* ---------- Top bar + progress ---------- */
.q-top { position: sticky; top: 0; z-index: 30; background: rgba(251, 248, 245, .94); backdrop-filter: blur(10px); }
.q-top__inner {
  max-width: 720px;
  margin: 0 auto;
  height: 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.q-top .logo { grid-column: 2; font-size: 1.4rem; }
.q-back {
  grid-column: 1;
  justify-self: start;
  background: none;
  border: 0;
  font: 600 .92rem var(--font);
  color: var(--ink-2);
  cursor: pointer;
  padding: 8px 8px 8px 0;
}
.q-back:hover { color: var(--ink); }
.q-back:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; border-radius: 6px; }
.q-counter { grid-column: 3; justify-self: end; font-size: .8rem; color: var(--muted); font-weight: 500; text-align: right; }
.q-progress { height: 4px; background: var(--line); }
.q-progress__bar { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }

/* ---------- Stage + screens ---------- */
.stage { max-width: 640px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) 16px 80px; }
.screen { animation: q-in .32s ease both; }
.screen.is-leaving { animation: q-out .16s ease both; }
@keyframes q-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes q-out { to { opacity: 0; transform: translateY(-8px); } }

.screen h1 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); outline: none; }
.screen h1 em { color: var(--accent); }
.q-eyebrow { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.q-body { color: var(--ink-2); font-size: 1.06rem; margin-bottom: 26px; }
.q-body p:last-child { margin-bottom: 0; }
.q-body em { color: var(--ink-2); }

/* start */
.screen--start .btn { margin-top: 6px; }
.start-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: .85rem; color: var(--muted); }
.start-points li::before { content: "✓ "; color: var(--yes); font-weight: 700; }

/* answers */
.answers { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.answer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 16px 14px;
  font: 500 1.02rem/1.35 var(--font);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.answer:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.answer:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; }
.answer__key {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
}
.answer__text { flex: 1; }
.answer__arrow { color: var(--muted); transition: transform .15s, color .15s; }
.answer:hover .answer__arrow { transform: translateX(3px); color: var(--ink); }
.answer.is-picked { border-color: var(--ink); background: var(--ink); color: #fff; }
.answer.is-picked .answer__key { border-color: rgba(255, 255, 255, .4); color: #fff; }
.answer.is-picked .answer__arrow { color: #fff; }

/* reaction */
.screen--reaction { text-align: center; padding-top: clamp(8px, 4vw, 40px); }
.screen--reaction h1 { font-size: clamp(1.9rem, 5.4vw, 2.9rem); }
.screen--reaction .q-body { font-size: 1.15rem; max-width: 30em; margin-inline: auto; }

/* analysing */
.screen--analysing { text-align: center; padding-top: clamp(16px, 6vw, 56px); }
.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.checklist { list-style: none; padding: 0; margin: 24px auto 0; display: inline-grid; gap: 12px; text-align: left; }
.checklist li { position: relative; padding-left: 34px; color: var(--muted); transition: color .3s; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: background .3s, border-color .3s;
}
.checklist li.is-done { color: var(--ink); }
.checklist li.is-done::before { background: #e3f5ea; border-color: #e3f5ea; }
.checklist li.is-done::after { content: ""; position: absolute; left: 8px; top: 5px; width: 5px; height: 10px; border: solid var(--yes); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* ==========================================================================
   Results
   ========================================================================== */
.wrap--narrow { max-width: 760px; }
.results section { padding: clamp(40px, 6vw, 72px) 0; }
.results h1 { outline: none; }

.r-hero { background: var(--cream); text-align: center; padding-bottom: 24px !important; }
.r-hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
.r-hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; margin-inline: auto; }

.r-match { padding-top: 8px !important; }
.match-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; border-top: 4px solid var(--accent); }
.match-card__head { padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 40px) 8px; text-align: center; }
.match-card__label { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.badge { background: var(--sand); color: var(--ink-2); font-size: .68rem; letter-spacing: .06em; padding: .25em .7em; border-radius: 999px; }
.match-card__swatch { max-width: 240px; margin: 18px auto 8px; }
.match-card__swatch svg { width: 100%; height: auto; display: block; }
.match-card h2 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .2em; }
.match-card__tag { font-size: 1.1rem; color: var(--ink-2); max-width: 28em; margin: 0 auto; }
.match-card__tag em { color: var(--accent); }
.match-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px clamp(20px, 4vw, 40px) 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.match-card__stats div { padding: 14px 10px; text-align: center; }
.match-card__stats div + div { border-left: 1px solid var(--line); }
.match-card__stats dt { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.match-card__stats dd { margin: 4px 0 0; font-weight: 600; font-size: .95rem; }
.match-card__why { padding: 26px clamp(20px, 4vw, 40px) 0; }
.match-card__why h3 { font-size: 1.15rem; }
.match-card__why h3 em { color: var(--accent); }
.match-card__why .checks { margin-top: 12px; }
.match-card__note {
  margin: 22px clamp(20px, 4vw, 40px) 0;
  background: #fff8e6;
  border: 1.5px dashed #e8c766;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .95rem;
  color: var(--ink-2);
}
.match-card__note strong { color: var(--ink); }
.match-card > .btn { margin: 26px clamp(20px, 4vw, 40px) clamp(24px, 4vw, 36px); width: auto; }

.r-letter { background: #fff; }
.r-letter h2 { text-align: center; margin-bottom: 1.2em; }
.letter { display: grid; gap: 8px; }
.letter__section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.letter__section:first-child { padding-top: 0; }
.letter__section h3 { font-size: 1.3rem; margin-bottom: .4em; }
.letter__section p { color: var(--ink-2); font-size: 1.06rem; margin: 0; }
.letter__close { margin-top: 30px; font-size: 1.06rem; color: var(--ink-2); }
.letter__close strong { color: var(--ink); }
.letter__close .insert { display: block; padding: 10px 12px; }

.r-claim { background: var(--sand); }
.claim { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: clamp(24px, 5vw, 44px); }
.claim__line { font-weight: 700; font-size: 1.12rem; color: var(--accent); }
.claim h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.claim > p { color: var(--ink-2); }
.claim .checks { margin: 14px 0 28px; }

.claim-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; }
.field input {
  font: 500 1rem var(--font);
  padding: 13px 14px;
  border: 1.5px solid #ddd5cc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 19, 15, .08); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.form-error { margin: 0; color: var(--no); font-weight: 600; font-size: .92rem; }
.claim-form .btn[disabled] { opacity: .7; cursor: wait; transform: none; }
.claim-form .microcopy { margin-top: 0; }

.thanks { text-align: center; }
.thanks h2 { outline: none; }
.thanks__tick { width: 64px; height: 64px; border-radius: 50%; background: #e3f5ea; margin: 0 auto 18px; position: relative; }
.thanks__tick::after { content: ""; position: absolute; left: 24px; top: 14px; width: 14px; height: 26px; border: solid var(--yes); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.next-steps { text-align: left; max-width: 30em; margin: 20px auto 0; padding-left: 1.2em; display: grid; gap: 12px; color: var(--ink-2); }
.next-steps strong { color: var(--ink); }

.retake { text-align: center; margin: 22px 0 0; font-size: .9rem; color: var(--muted); }
.retake a { color: var(--ink-2); }

.r-sticky { display: none; }

@media (max-width: 600px) {
  .q-back span { display: none; }
  .q-counter { font-size: .72rem; }
  .answer { padding: 14px 14px 14px 12px; font-size: .98rem; }
  .match-card__stats { grid-template-columns: 1fr; }
  .match-card__stats div { display: flex; justify-content: space-between; align-items: baseline; text-align: left; padding: 10px 14px; }
  .match-card__stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .match-card__stats dd { margin: 0; }
  .claim-form { grid-template-columns: 1fr; }

  body.is-results { padding-bottom: 76px; }
  .r-sticky {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(22, 19, 15, .08);
    font-size: .9rem;
    transform: translateY(110%);
    transition: transform .25s ease;
  }
  .r-sticky.is-on { transform: none; }
  .r-sticky .btn { flex: none; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .screen.is-leaving { animation: none; }
  .spinner { animation-duration: 3s; }
}

/* ---------- Verdict meter (replaces the brow swatch) ---------- */
.meter { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 18px auto 10px; }
.meter__bar { width: 18px; border-radius: 4px; background: var(--line); }
.meter__bar:nth-child(1) { height: 14px; }
.meter__bar:nth-child(2) { height: 22px; }
.meter__bar:nth-child(3) { height: 30px; }
.meter__bar.is-on { background: var(--accent); }
.meter__label { margin-left: 8px; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .85em; }

/* ---------- Calculator ---------- */
.r-calc { padding: 8px 0 40px; }
.r-calc h2 { text-align: center; }
.calc__lead { text-align: center; color: var(--ink-2); }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.calc__group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 6px; margin: 0; background: #fff; min-width: 0; }
.calc__group legend { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding: 0 6px; }
.calc__in { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--ink-2); }
.calc__in span { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.calc__in input[type=number] { width: 100%; font: 600 1rem var(--font); padding: .55em .7em; border: 1.5px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.calc__in input[type=number]:focus { outline: none; border-color: var(--accent); }
.calc__in input[type=range] { width: 100%; accent-color: var(--accent); }
.calc__in output { font-weight: 700; color: var(--ink); }
.calc__out { margin-top: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; border-top: 4px solid var(--accent); }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.calc__row small { color: var(--muted); font-weight: 500; }
.calc__row strong { white-space: nowrap; }
.calc__row--total { border-bottom: 0; font-size: 1.2rem; }
.calc__row--total strong { color: var(--yes); }
.calc__year { margin: 4px 0 10px; color: var(--ink-2); font-size: .95rem; }
.calc__pay { margin: 0 0 10px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: .95rem; }
.calc__ads { margin: 0; padding: 10px 12px; background: var(--sand); border-radius: 8px; font-size: .95rem; }
@media (max-width: 600px) { .calc { grid-template-columns: 1fr; } }

/* ---------- Calculator v2: two result panels on top, inputs folded ---------- */
.r-calc { padding: 0 0 32px; }
.calc__h { font-size: 1.05rem; letter-spacing: .02em; margin: 0 0 6px; }
.calc__out--gain { border-top-color: var(--yes); }
.calc__out--plus { border-top-color: var(--yes); }
.calc__out--plus .checks { margin-top: 10px; font-size: .95rem; }
.calc__row--bad strong { color: var(--no); }
.calc__row[hidden] { display: none; }
.calc__edit { margin-top: 16px; }
.calc__edit summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 8px 0; }
.r-calc .fineprint { margin-top: 12px; }

/* ---------- Reveal screens: one calculator item per screen ---------- */
.rv-big { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 8px 0 18px; }
.rv-big strong { font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.rv-big span { color: var(--muted); font-size: .95rem; }
.rv--cost .rv-big strong { color: var(--no); }
.rv--gain .rv-big strong { color: var(--yes); }
.screen--reveal .q-body { text-align: left; }
.rv-edit { margin: 4px 0 22px; text-align: left; }
.rv-edit summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }
.rv-in { display: block; margin: 10px 0; font-size: .92rem; color: var(--ink-2); }
.rv-in > span:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.rv-in__box { display: flex; align-items: center; gap: 8px; }
.rv-in__box em { font-style: normal; color: var(--muted); }
.rv-in input[type=number] { width: 100%; font: 600 1rem var(--font); padding: .55em .7em; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.rv-in input[type=number]:focus { outline: none; border-color: var(--accent); }
.rv-in input[type=range] { width: 100%; accent-color: var(--accent); }
.rv-in output { font-weight: 700; color: var(--ink); }
.screen--total h1 em { color: var(--yes); font-style: normal; }
.screen--total .calc__out { text-align: left; }

/* ---------- Options: three tiers + downsell ---------- */
.r-tiers { background: var(--cream); }
.r-tiers h2 { text-align: center; margin-bottom: .3em; }
.r-tiers__sub { text-align: center; color: var(--ink-2); font-size: 1.06rem; margin: 0 0 28px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
}
.tier.is-rec { border-color: var(--ink-2); }
.tier.is-featured { border-color: var(--accent); border-width: 3px; box-shadow: var(--shadow-lg); }
.tier:not(.is-featured) .tier__rec { background: var(--ink-2); }
.tier__rec {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; white-space: nowrap;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .35em .9em; border-radius: 999px;
}
.tier__num { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.tier h3 { font-size: 1.35rem; margin: 0 0 .3em; }
.tier__tag { color: var(--ink-2); margin: 0 0 16px; }
.tier__tag em { color: var(--accent); }
.tier__price { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.tier__price strong { font-size: 1.4rem; }
.tier__price span { font-size: .88rem; color: var(--muted); }
.tier__year { font-size: .88rem; font-weight: 600; color: var(--ink-2); margin: 8px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tier .checks { margin: 16px 0 22px; gap: 10px; font-size: .95rem; }
.tier__pick { margin: auto 0 0; padding: 12px 14px; background: var(--cream); border-radius: var(--radius-sm); text-align: center; color: var(--ink-2); font-size: .95rem; }
.tier.is-rec .tier__pick { background: var(--accent-soft); }
.tier__pick strong { color: var(--ink); }
.tier-more { max-width: 420px; margin: 28px auto 0; }
.tier-more summary { cursor: pointer; text-align: center; font-weight: 700; color: var(--ink-2); padding: 8px 0; }
.tier-more > p { text-align: center; color: var(--ink-2); margin: 10px 0 22px; }
.match-card__head .tier__num { margin-top: 14px; }
.guarantee { margin: 0 0 18px; padding: 14px 16px; background: #e9f7ef; border: 2px solid var(--yes); border-radius: var(--radius-sm); }
.guarantee strong { display: block; color: #146c3c; font-size: 1.02rem; }
.guarantee strong::before { content: "✓ "; }
.guarantee p { margin: 4px 0 0; color: var(--ink); font-size: .95rem; }
.match-card__guarantee { padding: 22px clamp(20px, 4vw, 40px) 0; }
.match-card__guarantee .guarantee { margin: 0; }
@media (min-width: 901px) {
  .tier.is-featured { transform: translateY(-10px); }
}
.wrap--calc { max-width: 980px; }
.calc__now { text-align: center; color: var(--ink-2); margin: 0 0 4px; }
.calc__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.calc__pair .calc__out { margin-top: 16px; }
.stage:has(.screen--total) { max-width: 980px; }
@media (max-width: 760px) { .calc__pair { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 900px) {
  .tiers { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 26px; }
}
