:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --ink: #2b2118;
  --muted: #7a6a5c;
  --brand: #d6452d;
  --brand-dark: #b0341f;
  --accent: #f4b942;
  --line: #efe2d3;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(80, 40, 10, .08);
}
* { box-sizing: border-box; }
/* elementos com o atributo hidden somem mesmo que alguma regra defina display */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
h1, h2 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; }
a { color: var(--brand-dark); }

.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 960px; margin: 0 auto; padding: 18px 20px;
}
.brand { text-decoration: none; color: var(--ink); font-family: "Fraunces", serif; font-weight: 800; font-size: 1.1rem; }
.top nav a { text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
@media (max-width: 720px) { .top { gap: 12px; } .brand { font-size: 1rem; } }

main { max-width: 960px; margin: 0 auto; padding: 0 20px 40px; }

.hero { text-align: center; padding: 40px 0 32px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0 0 12px; font-weight: 800; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.trust { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }

.btn {
  font: inherit; font-weight: 600; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(214, 69, 45, .3); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.secondary { background: transparent; color: var(--brand-dark); border: 2px solid var(--brand); box-shadow: none; }
.btn.secondary:hover { background: #fff1ec; }
.btn.big { font-size: 1.1rem; padding: 16px 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .options button:focus-visible, input:focus-visible, .card a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

.quiz { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-top: 12px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 25%; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .3s; }
.step-label { color: var(--muted); font-size: .85rem; margin: 10px 0 18px; }
.step h2 { margin: 0 0 14px; font-size: 1.7rem; }
.step h3 { margin: 18px 0 8px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hint { color: var(--muted); margin-top: -6px; }

.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options button {
  font: inherit; cursor: pointer; background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px;
  transition: all .12s;
}
.options button:hover { border-color: var(--brand); }
.options button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.field { display: block; margin-top: 18px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.field input {
  display: block; margin-top: 6px; width: 100%; max-width: 220px; font: inherit;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
.budget-inputs { display: flex; gap: 16px; flex-wrap: wrap; }
.or { margin: 18px 0 -6px; color: var(--muted); font-size: .9rem; }

.error { background: #fdecea; color: #8a1c10; padding: 10px 14px; border-radius: 12px; margin-top: 18px; }
.nav { display: flex; justify-content: space-between; margin-top: 26px; }

.loading { text-align: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 16px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.results h2 { font-size: 2rem; margin: 28px 0 6px; }
.summary { color: var(--muted); margin-top: 0; }
.notice { background: #fff4d6; border-radius: 12px; padding: 10px 14px; }
/* Raia única: 4 cards lado a lado (1 por vez no celular), sem quebrar para uma segunda linha */
.grid {
  display: flex; gap: 16px; margin-top: 8px; padding: 4px 2px 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.grid::-webkit-scrollbar { display: none; }
.grid:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.grid .card { flex: 0 0 calc((100% - 48px) / 4); box-sizing: border-box; scroll-snap-align: start; }
.lane-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.lane-nav .status { color: var(--muted); font-size: .9rem; }
.lane-nav .arrows { display: flex; gap: 8px; }
.lane-nav .arrows button { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.lane-nav .arrows button:disabled { opacity: .35; cursor: default; }
@media (max-width: 720px) {
  .grid .card { flex-basis: 100%; }
  .results h2 { font-size: 1.6rem; }
}
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line);
}
.card .emoji { font-size: 2.2rem; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card .price { font-weight: 600; color: var(--ink); }
.card .reasons { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.card .reasons li { background: #fff4d6; border-radius: 99px; padding: 3px 10px; font-size: .75rem; }
.card .links { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 8px; }
.card .links a {
  text-align: center; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 999px;
  background: var(--brand); color: #fff;
}
.card .links a.ml { background: #ffe600; color: #2d3277; }
.card .links a.shopee { background: #ee4d2d; color: #fff; }
.card .badge { align-self: flex-start; background: #eef2ff; color: #3b3f8c; border-radius: 99px; padding: 3px 10px; font-size: .75rem; font-weight: 600; }
.card .badge.best { background: #ffe9a8; color: #6b4a00; }
.card.top { border: 2px solid #f5b301; }
.more { display: flex; justify-content: center; margin: 24px 0 8px; }
.card .photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #f4f4f4; }
.card .links a:hover { filter: brightness(.93); }
.actions { text-align: center; margin-top: 28px; }

footer { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
footer .small { font-size: .8rem; }

@media (max-width: 520px) {
  .quiz { padding: 20px 16px; }
  .step h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Páginas de SEO */
.article { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
.article h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.article .idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; box-shadow: var(--shadow); }
.article .idea h2 { margin: 0 0 6px; font-size: 1.25rem; }
.article .idea .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.article .idea .links a { text-decoration: none; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .9rem; }
.article .idea .links a.ml { background: #ffe600; color: #2d3277; }
.cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; margin: 28px 0; }
.cta a { color: var(--accent); font-weight: 600; }
.related ul { padding-left: 18px; }

/* Tela inicial: um cartão com o caminho principal (descrever) e o secundário (quiz) */
.start-card {
  max-width: 560px; margin: 0 auto; padding: 28px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.start-card .btn.big { width: 100%; }
.ai-box { display: flex; flex-direction: column; gap: 12px; }
.ai-box label { font-weight: 600; font-size: 1.05rem; }
.ai-box textarea {
  width: 100%; box-sizing: border-box; font: inherit; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); resize: vertical; min-height: 64px;
}
.ai-box textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; background: #fff; }
.ai-box .hint { margin: -4px 0 0; font-size: .8rem; text-align: center; }
.ai-box .error { margin: 0; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 720px) { .start-card { padding: 20px; } }

/* Páginas de SEO: resposta rápida, motivo da sugestão e perguntas frequentes */
.article .answer { background: #eaf6ee; border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 16px; }
.article .why { margin: 4px 0; color: var(--muted); font-size: .92rem; }
.article h2 { margin-top: 28px; }
.faq h3 { margin: 14px 0 4px; font-size: 1.05rem; }
.faq p { margin: 0 0 8px; }
.top nav a { margin-left: 12px; }
