/* ============ TOKENS ============ */
:root {
  --ink: #1a1a24;
  --ink-soft: #4a4a55;
  --ink-mute: #8a8a95;
  --paper: #faf8f3;
  --paper-soft: #f3eee5;
  --line: #e0d9c8;
  --line-soft: #ebe5d6;
  --navy: #202050;
  --navy-soft: #2d2d6f;
  --accent: #c9a86b;
  --gray-shade: #e7e6e6;
  --danger: #a3322a;
  --ok: #4a7a3f;

  --radius: 4px;
  --shadow: 0 1px 0 rgba(26,26,36,.04), 0 4px 24px -8px rgba(26,26,36,.08);
  --shadow-strong: 0 2px 0 rgba(26,26,36,.06), 0 12px 32px -12px rgba(26,26,36,.18);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
}

.hidden { display: none !important; }

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(250, 248, 243, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px; height: 42px;
  background: var(--navy);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  border-radius: 2px;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.015em;
  font-style: italic;
}

.brand-text p {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.autosave {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autosave::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}

.autosave.saving::before { background: var(--accent); }

/* ============ STEPPER ============ */
.stepper {
  display: flex;
  gap: 0;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
  overflow-x: auto;
}

.step {
  flex: 1;
  padding: 18px 24px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.step span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-mute);
}

.step.active {
  color: var(--ink);
  border-bottom-color: var(--navy);
}

.step.active span { color: var(--navy); }

.step.completed { color: var(--ok); }
.step.completed span { color: var(--ok); }

/* ============ CONTAINER ============ */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 48px 80px;
}

.screen-head {
  margin-bottom: 36px;
  position: relative;
}

.screen-num {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  font-style: italic;
  color: var(--paper-soft);
  position: absolute;
  top: -20px; left: -10px;
  z-index: 0;
  line-height: 1;
  user-select: none;
}

.screen-head h2 {
  position: relative;
  margin: 0 0 8px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.025em;
  color: var(--ink);
  z-index: 1;
}

.screen-head p {
  position: relative;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 640px;
  z-index: 1;
}

/* ============ CARDS ============ */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card.final-card {
  border-color: var(--navy);
  border-left-width: 4px;
}

.section-title {
  margin: 0 0 18px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.section-title-big {
  margin: 36px 0 12px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ============ INPUTS ============ */
.lbl {
  display: block;
  margin-bottom: 18px;
}

.lbl:last-child { margin-bottom: 0; }

.lbl > span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 8px;
  font-weight: 500;
}

.lbl input[type="text"],
.lbl input[type="date"],
.lbl textarea,
.lbl select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}

.lbl input:focus,
.lbl textarea:focus,
.lbl select:focus {
  outline: none;
  border-color: var(--navy);
  background: white;
  box-shadow: 0 0 0 3px rgba(32, 32, 80, 0.08);
}

.lbl textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

.lbl .hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}

.lbl.flex-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.lbl.flex-row > span {
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  color: var(--ink);
  font-weight: 400;
}

.lbl.flex-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--navy);
  cursor: pointer;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============ BUTTONS ============ */
.btn-primary,
.btn-secondary,
.btn-ghost {
  border: none;
  cursor: pointer;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.btn-primary:hover {
  background: var(--navy-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32,32,80,0.25);
}

.btn-secondary {
  background: var(--ink);
  color: var(--paper);
}

.btn-secondary:hover {
  background: var(--ink-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-big {
  padding: 16px 32px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.btn-add {
  width: 100%;
  padding: 18px;
  border: 1.5px dashed var(--line);
  background: transparent;
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 0 0;
  transition: all 0.15s ease;
}

.btn-add:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(32, 32, 80, 0.02);
}

.btn-add span {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.screen-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.screen-foot button[data-go="processo"]:first-child,
.screen-foot > span:first-child { visibility: hidden; }

/* ============ VERBAS LIST ============ */
.verba-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: var(--shadow);
}

.verba-card .verba-num {
  position: absolute;
  top: -10px; left: -12px;
  background: var(--navy);
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  font-style: italic;
}

.verba-card .verba-remove {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  font-size: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all 0.15s;
}

.verba-card .verba-remove:hover {
  background: var(--danger);
  color: white;
}

/* ============ CHOICE (radio cards) ============ */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 32px;
}

@media (max-width: 720px) {
  .choice-grid { grid-template-columns: 1fr; }
}

.choice {
  display: block;
  cursor: pointer;
  position: relative;
}

.choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-body {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  height: 100%;
}

.choice-body h3 {
  margin: 0 0 8px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.choice-body p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.choice input[type="radio"]:checked + .choice-body {
  border-color: var(--navy);
  border-width: 1.5px;
  background: linear-gradient(180deg, white 0%, rgba(32,32,80,0.02) 100%);
  box-shadow: 0 4px 16px -4px rgba(32,32,80,0.15), inset 0 0 0 1px var(--navy);
}

.choice input[type="radio"]:checked + .choice-body h3 {
  color: var(--navy);
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 32px 48px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

/* ============ PRINT-LIKE TOUCHES ============ */
::selection {
  background: var(--navy);
  color: white;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.14 0 0 0 0.018 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 1000;
  mix-blend-mode: multiply;
}

/* responsive */
@media (max-width: 720px) {
  .topbar { padding: 16px 22px; }
  .stepper { padding: 0 22px; }
  .stepper .step { padding: 14px 16px; font-size: 11px; }
  .container { padding: 36px 22px 64px; }
  .screen-head h2 { font-size: 28px; }
  .screen-num { font-size: 60px; }
  .card { padding: 20px; }
}
