/* ============================================================
   Novren — Coletor de briefing (wizard)
   Estilos compartilhados: landing-page.html + identidade-visual.html
   ============================================================ */

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('../fonts/PPNeueMontreal-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #f5f5f7;
  --surface-base: #ffffff;
  --surface-soft: #fafafa;
  --surface-muted: #f3f3f5;
  --text-primary: #121216;
  --text-secondary: #5f5f68;
  --text-tertiary: #8c8c96;
  --border-subtle: rgba(20,20,25,.06);
  --border-default: rgba(20,20,25,.10);
  --border-strong: rgba(20,20,25,.16);
  --black: #09090b;

  /* Acento roxo (mockups) */
  --accent: #6d5ce0;
  --accent-strong: #5a47d6;
  --accent-soft: #efecfc;
  --accent-ring: rgba(109,92,224,.18);

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;
  --shadow-sm: 0 8px 24px rgba(20,20,25,.06);
  --shadow-md: 0 18px 48px rgba(20,20,25,.08);
  --shadow-lg: 0 28px 70px rgba(20,20,25,.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family: 'PP Neue Montreal', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(20,20,25,.035) 0 1px, transparent 1px 12px),
    linear-gradient(90deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: 14px 14px, 360px 360px, 360px 360px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===================== Splash ===================== */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background:
    linear-gradient(135deg, rgba(20,20,25,.035) 0 1px, transparent 1px 12px),
    linear-gradient(90deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: 14px 14px, 360px 360px, 360px 360px, auto;
  transition: opacity .55s ease, visibility .55s ease;
}
#splash.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { display: block; height: 26px; width: auto; max-width: min(230px, 72vw);
  opacity: 0; animation: splashIn .75s cubic-bezier(.34,1.56,.64,1) forwards; }
.splash-bar { width: 64px; height: 2px; overflow: hidden; border-radius: var(--r-full);
  background: var(--border-default); opacity: 0; animation: splashFadeIn .3s .5s ease forwards; }
.splash-bar-fill { width: 0%; height: 100%; border-radius: var(--r-full);
  background: var(--accent); animation: splashFill 1.1s .5s ease forwards; }
@keyframes splashIn { from { opacity: 0; transform: scale(.82) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes splashFadeIn { to { opacity: 1; } }
@keyframes splashFill { from { width: 0%; } to { width: 100%; } }

/* ===================== Topbar ===================== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  min-height: 62px; width: 100%; padding: 0 24px;
  border-bottom: 1px solid var(--border-default);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.topbar-inner {
  width: min(1080px, 100%); min-height: 62px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.logo { display: block; height: 22px; width: auto; }
.logo-tag {
  font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-tertiary); line-height: 1.1; max-width: 54px;
}
.top-pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 13px;
  border-radius: var(--r-full); border: 1px solid var(--border-default);
  background: var(--surface-base); color: var(--text-secondary); font-size: 12px; font-weight: 600;
}
.top-pill svg { width: 14px; height: 14px; }

/* ===================== Stepper (desktop) ===================== */
.stepper-wrap {
  position: sticky; top: 62px; z-index: 20;
  background: rgba(245,245,247,.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
#hdr-progress {
  width: min(1080px, calc(100% - 40px)); margin: 0 auto;
  display: flex; align-items: center; gap: 6px; padding: 16px 0;
}
.prog-step { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.prog-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface-base);
  color: var(--text-tertiary); font-size: 12px; font-weight: 600;
  transition: all .2s ease;
}
.prog-label { font-size: 12.5px; font-weight: 500; color: var(--text-tertiary); white-space: nowrap; transition: color .2s ease; }
.prog-sep { flex: 1 1 auto; height: 1px; min-width: 12px; background: var(--border-default); }

.prog-step.active .prog-num { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-ring); }
.prog-step.active .prog-label { color: var(--text-primary); font-weight: 600; }
.prog-step.done .prog-num { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); font-size: 0; }
.prog-step.done .prog-num::after {
  content: ''; width: 12px; height: 12px; font-size: 0;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 9 10 3' fill='none' stroke='%235a47d6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.prog-step.done .prog-label { color: var(--text-secondary); }

/* Mobile progress (barra de segmentos) */
.mobile-prog { display: none; gap: 6px; width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 12px 0; }
.mobile-prog-seg { flex: 1; height: 4px; border-radius: var(--r-full); background: var(--border-default); transition: background .2s ease; }
.mobile-prog-seg.done { background: var(--accent-soft); }
.mobile-prog-seg.active { background: var(--accent); }

/* ===================== Shell / seções ===================== */
.shell { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 80px; position: relative; }

.form-section { display: none; }
.form-section.active { display: block; animation: secIn .4s cubic-bezier(.2,.8,.2,1); }
@keyframes secIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.form-section.slide-out-left  { animation: outLeft .28s ease forwards; }
.form-section.slide-out-right { animation: outRight .28s ease forwards; }
.form-section.slide-in-right  { animation: inRight .4s cubic-bezier(.2,.8,.2,1); }
.form-section.slide-in-left   { animation: inLeft .4s cubic-bezier(.2,.8,.2,1); }
@keyframes outLeft  { to { opacity: 0; transform: translateX(-24px); } }
@keyframes outRight { to { opacity: 0; transform: translateX(24px); } }
@keyframes inRight  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes inLeft   { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

.section-card {
  background: var(--surface-base); border: 1px solid var(--border-default);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden;
}
.section-hd { padding: 30px 32px 24px; border-bottom: 1px solid var(--border-subtle); }
.section-eyebrow {
  margin: 0 0 12px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-strong);
}
.section-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section-title { margin: 0 0 8px; font-size: 27px; line-height: 1.1; font-weight: 600; }
.section-desc { margin: 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; }

.section-body { padding: 26px 32px 6px; }
.questions { display: flex; flex-direction: column; gap: 26px; }

/* ===================== Perguntas ===================== */
.question { display: flex; flex-direction: column; gap: 9px; }
.q-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.q-label { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.q-req {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft); border-radius: var(--r-full); padding: 3px 9px;
}
.q-hint { margin: -2px 0 2px; font-size: 13px; color: var(--text-tertiary); line-height: 1.45; }

.field {
  width: 100%; padding: 13px 15px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface-soft);
  color: var(--text-primary); font-family: inherit; font-size: 14.5px; line-height: 1.5;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus { outline: none; border-color: var(--accent); background: var(--surface-base); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea.field { resize: vertical; min-height: 104px; }
.field.has-error { border-color: #d8443c; box-shadow: 0 0 0 3px rgba(216,68,60,.12); }

/* Opções (radio / checkbox em grid) */
.opts-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.opts-grid.col1 { grid-template-columns: 1fr; }
.opts-grid.col3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.opt-card {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-soft);
  transition: all .14s ease; user-select: none;
}
.opt-card:hover { border-color: var(--accent); background: var(--surface-base); }
.opt-card.chosen { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.opt-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.opt-label { font-size: 14px; line-height: 1.3; color: var(--text-primary); }

.opt-radio { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; border: 1.6px solid var(--border-strong); display: grid; place-items: center; transition: border-color .14s ease; }
.opt-card.chosen .opt-radio { border-color: var(--accent); }
.opt-radio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .14s ease; }
.opt-card.chosen .opt-radio-dot { transform: scale(1); }

.opt-box { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 5px; border: 1.6px solid var(--border-strong); display: grid; place-items: center; transition: all .14s ease; }
.opt-box svg { opacity: 0; transition: opacity .12s ease; }
.opt-card.chosen .opt-box { background: var(--accent); border-color: var(--accent); }
.opt-card.chosen .opt-box svg { opacity: 1; }

.opt-card.has-icon { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
.opt-icon { width: 26px; height: 26px; display: inline-flex; }
.opt-icon svg { width: 26px; height: 26px; }

/* Chips */
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; cursor: pointer; user-select: none; font-size: 13.5px; line-height: 1.2;
  border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface-soft);
  color: var(--text-secondary); transition: all .14s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text-primary); }
.chip.chosen { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }

.err-msg { margin: 2px 0 0; min-height: 0; font-size: 12.5px; color: #d8443c; opacity: 0; transition: opacity .12s ease; }
.err-msg.show { opacity: 1; }

/* Finalização — bandeira roxa */
.fin-flag {
  display: grid; place-items: center; width: 92px; height: 92px; margin: 4px auto 22px;
  border-radius: 24px; background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 40px rgba(109,92,224,.34);
}
.fin-flag svg { width: 44px; height: 44px; color: #fff; }

/* ===================== Footer de navegação ===================== */
.section-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px 32px; border-top: 1px solid var(--border-subtle); background: var(--surface-soft);
}
.section-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-prev {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-base);
  color: var(--text-secondary); font-size: 14px; font-weight: 600; transition: all .14s ease;
}
.btn-prev:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-prev.invisible { visibility: hidden; }
.btn-reset {
  min-height: 44px; padding: 0 16px; cursor: pointer; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent; color: var(--text-tertiary); font-size: 14px; font-weight: 500;
}
.btn-reset:hover { color: var(--text-secondary); text-decoration: underline; }
.btn-next {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 22px; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--black); background: var(--black); color: #fff;
  font-size: 14px; font-weight: 600; transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.btn-next:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-arrow { display: inline-flex; font-size: 15px; line-height: 1; }
.btn-next.submit-btn { background: var(--accent); border-color: var(--accent); }
.btn-next.submit-btn:hover { background: var(--accent-strong); }

/* ===================== Cover (intro do fluxo) ===================== */
.cover-screen {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background:
    linear-gradient(135deg, rgba(20,20,25,.035) 0 1px, transparent 1px 12px),
    linear-gradient(90deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: 14px 14px, 360px 360px, 360px 360px, auto;
  transition: opacity .45s ease, visibility .45s ease;
}
.cover-screen.hiding { opacity: 0; visibility: hidden; pointer-events: none; }
.cover-card {
  width: min(540px, 100%); background: var(--surface-base); border: 1px solid var(--border-default);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
}
.cover-hd { padding: 34px 34px 22px; border-bottom: 1px solid var(--border-subtle); }
.cover-badge {
  margin: 0 0 16px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft); border-radius: var(--r-full); padding: 6px 12px;
}
.cover-title { margin: 0 0 10px; font-size: 30px; line-height: 1.06; font-weight: 600; }
.cover-sub { margin: 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; }
.cover-list { padding: 22px 34px; display: flex; flex-direction: column; gap: 16px; }
.cover-item { display: flex; align-items: flex-start; gap: 12px; }
.cover-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-strong); }
.cover-icon svg { width: 16px; height: 16px; }
.cover-item-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.cover-item-text strong { color: var(--text-primary); font-weight: 600; }
.cover-ft { padding: 24px 34px 30px; border-top: 1px solid var(--border-subtle); background: var(--surface-soft); }
.cover-start {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px;
  cursor: pointer; border-radius: var(--r-md); border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600; transition: background .14s ease, transform .14s ease, box-shadow .14s ease;
}
.cover-start:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 14px 36px rgba(109,92,224,.3); }
.cover-start svg { width: 18px; height: 18px; flex: 0 0 auto; }
.cover-note { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--text-tertiary); }
.cover-note a { color: var(--accent-strong); font-weight: 600; }

/* ===================== Thank-you ===================== */
.ty {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
  background:
    linear-gradient(135deg, rgba(20,20,25,.035) 0 1px, transparent 1px 12px),
    linear-gradient(90deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(20,20,25,.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: 14px 14px, 360px 360px, 360px 360px, auto;
}
.ty.show { opacity: 1; visibility: visible; }
.ty-card {
  width: min(480px, 100%); padding: 48px 40px; text-align: center;
  background: var(--surface-base); border: 1px solid var(--border-default);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.ty-flag {
  display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 26px;
  border-radius: 24px; background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 40px rgba(109,92,224,.34);
  opacity: 0; transform: scale(.7); transition: opacity .5s ease, transform .5s cubic-bezier(.34,1.56,.64,1);
}
.ty.show .ty-flag { opacity: 1; transform: scale(1); }
.ty-flag svg { width: 42px; height: 42px; color: #fff; }
.ty-headline { margin: 0 0 10px; font-size: 27px; font-weight: 600; opacity: 0; transform: translateY(10px); transition: all .5s .12s ease; }
.ty.show .ty-headline { opacity: 1; transform: translateY(0); }
.ty-sub { margin: 0 auto; max-width: 360px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; opacity: 0; transform: translateY(10px); transition: all .5s .2s ease; }
.ty.show .ty-sub { opacity: 1; transform: translateY(0); }
.ty-dl {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 28px; min-height: 46px; padding: 0 22px; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-base); color: var(--text-primary);
  font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .5s .3s ease, border-color .14s ease;
}
.ty.show .ty-dl { opacity: 1; }
.ty-dl:hover { border-color: var(--accent); color: var(--accent-strong); }
.ty-dl svg { width: 16px; height: 16px; }

/* ===================== Editor de conteúdo (anexo + blocos) ===================== */
.cb-wrap { display: flex; flex-direction: column; gap: 14px; }

/* Abas: anexar documento pronto x montar bloco a bloco */
.cb-tabs {
  display: inline-flex; gap: 4px; padding: 4px; align-self: flex-start;
  border-radius: var(--r-md); border: 1px solid var(--border-default); background: var(--surface-muted);
}
.cb-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent;
  color: var(--text-secondary); font-family: inherit; font-size: 13.5px; line-height: 1;
  transition: all .14s ease;
}
.cb-tab svg { width: 15px; height: 15px; }
.cb-tab:hover { color: var(--text-primary); }
.cb-tab.on {
  background: var(--surface-base); border-color: var(--border-default);
  color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(20,20,25,.05);
}
.cb-tab-badge {
  min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  border-radius: var(--r-full); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
}

.cb-panel { display: flex; flex-direction: column; gap: 8px; }

.cb-bar { display: flex; align-items: center; gap: 12px; padding: 0 2px 2px; }
.cb-count { font-size: 12.5px; color: var(--text-tertiary); }
.cb-count-n { color: var(--text-primary); font-weight: 600; }
.cb-progress {
  flex: 1 1 auto; max-width: 180px; height: 4px; border-radius: var(--r-full);
  background: var(--surface-muted); overflow: hidden;
}
.cb-progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s ease; }

.cb-empty {
  padding: 18px 16px; border-radius: var(--r-md); border: 1px dashed var(--border-strong);
  background: var(--surface-soft); color: var(--text-secondary); font-size: 13.5px; line-height: 1.5;
}
.cb-empty strong { color: var(--text-primary); font-weight: 600; }

.cb-list { display: flex; flex-direction: column; gap: 8px; }

.cb-item {
  border-radius: var(--r-md); border: 1px solid var(--border-default);
  background: var(--surface-soft); overflow: hidden;
  transition: border-color .14s ease, background .14s ease, opacity .14s ease;
}
.cb-item.open { background: var(--surface-base); border-color: var(--border-strong); }
.cb-item.filled .cb-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.cb-item.dragging { opacity: .45; }
.cb-item.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.cb-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; user-select: none;
}
.cb-readonly .cb-head { cursor: default; }
.cb-head:hover { background: var(--surface-muted); }
.cb-readonly .cb-head:hover { background: transparent; }
.cb-head:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring) inset; }

.cb-grip {
  flex: 0 0 auto; width: 18px; height: 22px; display: grid; place-items: center; cursor: grab;
  color: var(--border-strong); opacity: 0; transition: opacity .14s ease, color .14s ease;
}
.cb-grip svg { width: 16px; height: 16px; }
.cb-item:hover .cb-grip { opacity: 1; }
.cb-grip:hover { color: var(--text-tertiary); }

.cb-num {
  flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface-base);
  font-size: 11.5px; font-weight: 600; color: var(--text-tertiary);
  transition: all .14s ease;
}
.cb-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cb-title { font-size: 14px; color: var(--text-primary); line-height: 1.3; }
.cb-title-input {
  width: 100%; padding: 2px 6px; margin-left: -6px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; font-family: inherit; font-size: 14px; color: var(--text-primary);
  transition: all .14s ease;
}
.cb-title-input:hover { border-color: var(--border-default); }
.cb-title-input:focus { outline: none; border-color: var(--accent); background: var(--surface-base); box-shadow: 0 0 0 3px var(--accent-ring); }
.cb-dica { font-size: 12px; color: var(--text-tertiary); line-height: 1.35; }
.cb-caret { flex: 0 0 auto; font-size: 11px; color: var(--text-tertiary); }

.cb-del {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--border-default); background: var(--surface-base);
  color: var(--text-tertiary); font-size: 15px; line-height: 1;
  opacity: 0; transition: all .14s ease;
}
.cb-item:hover .cb-del, .cb-file .cb-del { opacity: 1; }
.cb-del:hover { border-color: #d8443c; color: #d8443c; }

.cb-body { padding: 0 12px 12px 12px; }

.cb-toolbar { display: flex; gap: 4px; margin-bottom: 8px; }
.cb-fmt {
  min-width: 30px; height: 28px; padding: 0 8px; cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid var(--border-default); background: var(--surface-base);
  color: var(--text-secondary); font-family: inherit; font-size: 13px; line-height: 1;
  transition: all .14s ease;
}
.cb-fmt:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }

.cb-field {
  min-height: 96px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere;
  background: var(--surface-base);
}
.cb-field:empty::before { content: attr(data-ph); color: var(--text-tertiary); }
.cb-field p { margin: 0 0 8px; }
.cb-field ul, .cb-field ol { margin: 0 0 8px; padding-left: 20px; }
.cb-field li { margin: 2px 0; }

.cb-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.cb-add {
  padding: 10px 16px; cursor: pointer;
  border-radius: var(--r-md); border: 1px dashed var(--border-strong); background: transparent;
  color: var(--text-secondary); font-family: inherit; font-size: 13.5px;
  transition: all .14s ease;
}
.cb-add:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.cb-link {
  padding: 0; cursor: pointer; border: 0; background: none; font-family: inherit; font-size: 13px;
  color: var(--text-tertiary); text-decoration: underline; text-underline-offset: 3px;
}
.cb-link:hover { color: var(--accent-strong); }

/* Anexar documento pronto */
.cb-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 22px; cursor: pointer;
  border-radius: var(--r-lg); border: 1.5px dashed var(--border-strong); background: var(--surface-soft);
  text-align: center; transition: all .14s ease;
}
.cb-drop:hover, .cb-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.cb-drop:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.cb-drop-ico {
  width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 4px;
  border-radius: var(--r-full); background: var(--surface-base); border: 1px solid var(--border-default);
  color: var(--accent);
}
.cb-drop-ico svg { width: 20px; height: 20px; }
.cb-drop-t { font-size: 14.5px; color: var(--text-primary); }
.cb-drop-t u { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.cb-drop-s { font-size: 12.5px; color: var(--text-tertiary); }
.cb-input-file { display: none; }

.cb-files { display: flex; flex-direction: column; gap: 8px; }
.cb-file {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: var(--r-md); border: 1px solid var(--border-default); background: var(--surface-base);
}
.cb-file.loading { opacity: .65; }
.cb-file.has-err { border-color: rgba(216,68,60,.4); background: rgba(216,68,60,.04); }
.cb-file-ico {
  flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-sm); background: var(--surface-muted); color: var(--text-secondary);
}
.cb-file-ico svg { width: 16px; height: 16px; }
.cb-file-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cb-file-name { font-size: 13.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-file-meta { font-size: 12px; color: var(--text-tertiary); }
.cb-file-err { font-size: 12px; color: #d8443c; }

.cb-note {
  margin: 2px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-tertiary);
}
.cb-note strong { color: var(--text-secondary); font-weight: 600; }

/* ===================== Responsivo ===================== */
@media (max-width: 760px) {
  #hdr-progress { display: none; }
  .stepper-wrap .mobile-prog { display: flex; }
  .section-hd { padding: 26px 22px 20px; }
  .section-title { font-size: 23px; }
  .section-body { padding: 22px 22px 4px; }
  .section-ft { padding: 18px 22px; flex-wrap: wrap; }
  .opts-grid, .opts-grid.col3 { grid-template-columns: 1fr; }
  .cover-hd, .cover-list, .cover-ft { padding-left: 24px; padding-right: 24px; }
  .cover-title { font-size: 26px; }
  .ty-card { padding: 40px 26px; }

  .cb-tabs { align-self: stretch; }
  .cb-tab { flex: 1 1 0; justify-content: center; padding: 10px 8px; font-size: 12.5px; }
  .cb-drop { padding: 26px 16px; }
  .cb-grip { display: none; }
  .cb-del { opacity: 1; }
}
@media (min-width: 761px) { .stepper-wrap .mobile-prog { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
