/* A porta: o formulário que o cliente preenche sozinho. Segue a direção do Bento (blocos, cantos grandes,
   Bricolage nos títulos) com as cores da AltEnter, que o motor (comum/cores.js) põe em :root. */
:root {
  --f-ui: Manrope, "Helvetica Neue", Arial, sans-serif;
  --f-text: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--stone); color: var(--text); font-family: var(--f-text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.pagina { max-width: 760px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top, 0px)) 16px 48px; display: flex; flex-direction: column; gap: 14px; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0; }
.marca { font-family: var(--f-ui); font-weight: 800; font-size: 15px; }
.salvo { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; color: var(--muted); }

.card { background: var(--card); border-radius: var(--r); padding: 22px clamp(18px, 4vw, 28px); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 70px; }
.abertura h1 { font-family: var(--f-disp); font-weight: 800; font-size: clamp(30px, 6vw, 42px); line-height: 1.05; letter-spacing: -0.03em; }
.abertura p { font-size: 17px; max-width: 60ch; }
.abertura .nota { font-size: 14px; color: var(--muted); }
.abertura.fechado { background: var(--ink); color: var(--on-ink); }
.vazio { color: var(--muted); }
.card h2 { font-family: var(--f-disp); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.num { font-family: var(--f-ui); font-weight: 700; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.ajuda { font-size: 14.5px; color: var(--muted); max-width: 62ch; }

.passos { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; background: var(--stone); scrollbar-width: none; }
.passos a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--muted); font-family: var(--f-ui); font-weight: 700; font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.passos a:hover { color: var(--text); }

.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-family: var(--f-ui); font-weight: 700; font-size: 13px; }
label.largo { grid-column: 1 / -1; }
label.solto { margin-top: 4px; }
.obr { font-weight: 600; font-size: 11px; color: var(--muted); }
input:not([type="radio"]):not([type="checkbox"]):not([type="color"]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 12px; background: var(--card-2);
  font-family: var(--f-text); font-weight: 400; font-size: 16px; color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--brand) !important; }

/* áreas */
.areas { display: flex; flex-direction: column; gap: 10px; }
.area { border-radius: 16px; background: var(--card-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.area h3 { margin: 0; font-family: var(--f-disp); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.area .o-que { font-size: 14px; color: var(--muted); margin-top: -6px; }
.area fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.area legend { width: 100%; margin-bottom: 4px; font-family: var(--f-ui); font-weight: 700; font-size: 12px; color: var(--muted); }
.area textarea { min-height: 44px; background: var(--card); }

/* escolhas em pílula */
.chip { position: relative; flex-direction: row; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.chip .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.escolha { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.escolha legend { width: 100%; margin-bottom: 8px; font-family: var(--f-ui); font-weight: 700; font-size: 14px; }

/* marca */
.cores { display: flex; flex-direction: column; gap: 14px; }
.cor { display: flex; align-items: center; gap: 10px; }
.cor input[type="color"] { width: 54px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.cor code { font-size: 14px; color: var(--muted); }
.previa { border-radius: 18px; padding: 16px; background: var(--p-stone, var(--stone)); display: flex; flex-direction: column; gap: 10px; }
.previa-t { font-family: var(--f-ui); font-weight: 700; font-size: 12px; color: var(--muted); }
.previa-blocos { display: flex; gap: 8px; flex-wrap: wrap; }
.pb { flex: 1 1 160px; min-height: 64px; border-radius: 16px; padding: 12px 14px; display: flex; align-items: flex-end; font-family: var(--f-disp); font-weight: 800; font-size: 18px; }
.marca-bloco { background: var(--p-brand); color: var(--p-on-brand); }
.segunda-bloco { background: var(--p-second); color: var(--p-on-second); }
.previa-escala { display: flex; gap: 4px; }
.previa-escala i { flex: 1; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }

/* ferramentas */
.verbos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.verbo { position: relative; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.verbo input { position: absolute; opacity: 0; pointer-events: none; }
.verbo b { font-family: var(--f-disp); font-weight: 700; font-size: 17px; }
.verbo span { font-family: var(--f-text); font-weight: 400; font-size: 14px; color: var(--muted); line-height: 1.4; }
.verbo:has(input:checked) { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.verbo:has(input:checked) span { color: var(--on-brand-mute); }
.verbo:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }

/* enviar */
.consent { flex-direction: row; align-items: flex-start; gap: 10px; font-family: var(--f-text); font-weight: 400; font-size: 15px; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--text); }
.bt { align-self: flex-start; border: 0; cursor: pointer; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-family: var(--f-ui); font-weight: 800; font-size: 15px; }
.bt:hover { background: var(--brand-hover); }
.bt:disabled { opacity: 0.6; cursor: default; }
.bt.linha { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.erro { padding: 10px 14px; border-radius: 12px; background: var(--brand); color: var(--on-brand); font-family: var(--f-ui); font-weight: 700; font-size: 14px; }
.feito { background: var(--ink); color: var(--on-ink); }
.feito .bt.linha { color: var(--on-ink); box-shadow: inset 0 0 0 1.5px var(--on-ink); }
.rodape { padding: 4px; font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rodape b { color: var(--text); }

@media (max-width: 620px) {
  .grade, .verbos { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
