/*
 * Estilo base do quiz pl-PL. Protótipo funcional: neutro e mobile-first.
 * Para restilizar, mexa primeiro nos tokens de :root.
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5d6470;
  --border: #dcd8cf;

  --primary: #1f5f4a;
  --primary-hover: #184c3b;
  --primary-text: #ffffff;
  --focus: #2f7ae5;

  /* status ✅ / 🟡 / ⭕ (barras e MC2) */
  --ok: #2f8a57;
  --part: #d39b1c;
  --none: #c4674f;

  --alert-bg: #fff4e5;
  --alert-border: #e0a03a;
  --callout-bg: #eaf2ee;
  --marked-bg: #fdf3e1;

  --radius: 12px;
  --radius-sm: 8px;
  --gap: 16px;
  --maxw: 560px;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 16px 24px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1:focus { outline: none; }
p { margin: 0 0 12px; }

.small { font-size: 13px; color: var(--muted); }
.lead { font-size: 18px; font-weight: 600; }
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --------------------------------------------------------------- botões */
.btn {
  font: inherit;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  cursor: pointer;
  min-height: 48px;
}
.btn--primary { background: var(--primary); color: var(--primary-text); font-weight: 600; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--secondary { background: var(--text); color: #fff; font-weight: 600; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--link { background: none; padding: 8px 0; min-height: 0; color: var(--muted); }
.btn--block { display: block; width: 100%; margin: 20px 0 12px; }
.btn--cta { font-size: 18px; padding: 18px 20px; }

/* ------------------------------------------------------------- topbar */
.topbar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.topbar__back { align-self: flex-start; }
.progress__label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.progress__track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--primary); transition: width .25s ease; }

/* ------------------------------------------------------------ telas */
.screen__title { font-size: 21px; }
.screen__title--hero { font-size: 24px; margin-top: 12px; }
.q-help { color: var(--muted); font-size: 15px; }

.checks { list-style: none; padding: 0; margin: 16px 0; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.checks--inline { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }

/* ------------------------------------------------------------ opções */
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.options--grid { display: grid; grid-template-columns: repeat(3, 1fr); }

.option {
  font: inherit;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 52px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.options--grid .option { text-align: center; }
.option:hover { border-color: var(--primary); }
.option.is-selected { border-color: var(--primary); background: var(--callout-bg); }

.option--check { display: flex; align-items: flex-start; gap: 12px; }
.option--check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }

.privacy-note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* --------------------------------------------------------- micro-choques */
.callout {
  background: var(--callout-bg);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout__main { font-size: 18px; }
.callout__extra { color: var(--muted); }
.shock__conditional { font-weight: 500; }

.quote { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); }
.quote p { font-style: italic; }
.quote footer { font-size: 14px; color: var(--muted); }

.status-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.status-table th, .status-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-weight: 400; vertical-align: top; }
.status-table__status { white-space: nowrap; font-weight: 600; }
.status--ok .status-table__status { color: var(--ok); }
.status--part .status-table__status { color: #9a6d0c; }
.status--none .status-table__status { color: var(--none); }

/* ---------------------------------------------------------- carregamento */
.screen--loading { padding-top: 15vh; }
.loading__list { list-style: none; padding: 0; font-size: 18px; }
.loading__item { opacity: .35; transition: opacity .3s; margin-bottom: 10px; }
.loading__item.is-done { opacity: 1; }
.loading__check { color: var(--ok); font-weight: 700; visibility: hidden; }
.is-done .loading__check { visibility: visible; }

/* ------------------------------------------------------------ resultado */
.r-block { background: var(--surface); border-radius: var(--radius); padding: 20px 16px; margin-bottom: 14px; }
.r-block h2 { font-size: 19px; }

.result__pct { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.result__pct-num { font-size: 44px; font-weight: 800; }
.result__profile { font-size: 22px; }
.result__priority-text { margin-top: 8px; }

.badge { display: inline-block; font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 99px; margin: 4px 0; }
.badge--wysoki { background: #fbe4dd; color: #8f3a26; }
.badge--sredni { background: #fbefd2; color: #7a5609; }
.badge--niski { background: #dff0e6; color: #1f5f3c; }

.bar { margin-bottom: 14px; }
.bar__head { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.bar__label { font-weight: 600; }
.bar__track { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 99px; }
.status--ok .bar__fill { background: var(--ok); }
.status--part .bar__fill { background: var(--part); }
.status--none .bar__fill { background: var(--none); }

.gargalos { padding-left: 20px; margin: 0; }
.gargalo { margin-bottom: 14px; }
.gargalo__title { font-size: 17px; margin-bottom: 4px; }
.gargalo__text { margin-bottom: 4px; }
.gargalo__plan { font-size: 14px; color: var(--muted); }

.bullets { padding-left: 20px; margin: 0; }
.bullets li { margin-bottom: 8px; }

.alert { background: var(--alert-bg); border: 1.5px solid var(--alert-border); border-radius: var(--radius-sm); padding: 14px 16px; }
.alert p:last-child { margin-bottom: 0; }
.r-block--czad { padding: 0; background: none; }

.conv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.conv-table th, .conv-table td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.conv-table__n { white-space: nowrap; }
.conv-table tr.is-marked { background: var(--marked-bg); }
.conv-table__marker { color: #8f5a06; font-weight: 700; white-space: nowrap; font-size: 13px; }
.conv-closing { margin-top: 12px; }

.r-block--offer { border: 2px solid var(--primary); }

.email-form__row { display: flex; gap: 8px; }
.input { flex: 1; min-width: 0; font: inherit; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.consent-check input { margin-top: 3px; flex: none; }
.form-msg { margin-top: 10px; font-size: 14px; }
.form-msg.is-error { color: #a3341c; }
.form-msg.is-ok { color: var(--ok); }

.r-footer { padding: 8px 4px; }

.dev-note { font-size: 12px; color: #8f5a06; background: var(--marked-bg); padding: 6px 8px; border-radius: 6px; margin-top: 10px; }

/* ------------------------------------------------------------ rodapé do site */
/* padding inferior grande: o banner de cookies é fixo e não pode cobrir os links */
.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 128px; }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 13px;
}
.site-footer__link { color: var(--muted); font-size: 13px; }
a.site-footer__link { text-decoration: underline; text-underline-offset: 2px; }
.site-footer__link.btn--link { padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.site-footer__link.is-pending { border: 1px dashed var(--border); border-radius: 4px; padding: 0 6px; }

/* ---------------------------------------------------------- consentimento */
.consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  padding: 14px 16px;
  z-index: 10;
}
.consent__text { max-width: var(--maxw); margin: 0 auto 10px; font-size: 14px; }
.consent__current { max-width: var(--maxw); margin: 0 auto 10px; font-size: 14px; font-weight: 600; }
.consent__link { display: block; max-width: var(--maxw); margin: 0 auto 10px; font-size: 14px; color: var(--primary); }
.consent__actions { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 8px; justify-content: flex-end; }
.consent__actions .btn { padding: 10px 16px; min-height: 44px; }

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