/* Plano Ressuscitado — identidade visual fornecida na simulação anexada. */
:root {
  color-scheme: dark;
  --bg: #111110;
  --panel: #1c1c1a;
  --panel-raised: #262623;
  --line: #33332f;
  --text: #fafaf7;
  --muted: #a3a39b;
  --lime: #bdfc0e;
  --orange: #ff4810;
  --sky: #abd9ff;
  --yellow: #faf16d;
  --ink: #161616;
  --font-ui: 'Poppins', sans-serif;
  --font-hand: 'Caveat', cursive;
  --measure: 68ch;
  --radius: 16px;
  --page-width: 1240px;
}

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

html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(ellipse 38rem 24rem at 92% -6%, rgba(189, 252, 14, 0.075), transparent 70%),
    radial-gradient(ellipse 30rem 22rem at -8% 48%, rgba(255, 72, 16, 0.045), transparent 72%),
    var(--bg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea { font: inherit; }
button { color: inherit; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

h1,
h2,
h3,
p { margin-top: 0; }
h1,
h2,
h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
h1 { margin-bottom: 1rem; font-size: clamp(2.25rem, 5.4vw, 4.5rem); }
h2 { margin-bottom: 0.8rem; font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
p { max-width: var(--measure); }

.app-shell { min-height: 100vh; }
.site-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 17, 16, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.topbar,
.step-nav,
main,
.app-footer {
  width: min(calc(100% - 3rem), var(--page-width));
  margin-inline: auto;
}
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 0.85rem;
}
.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
}
.brand-symbol {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(189, 252, 14, 0.48);
  border-radius: 50%;
  background: rgba(189, 252, 14, 0.08);
}
.brand-symbol svg { width: 30px; height: 30px; overflow: visible; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 1rem; font-weight: 700; letter-spacing: -0.025em; }
.brand-copy small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.76rem;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 72, 16, 0.12);
}

.step-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-block: 0.7rem 0.85rem;
  scrollbar-width: thin;
  border-top: 1px solid rgba(51, 51, 47, 0.65);
}
.step-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}
.step-link::before {
  width: 0.45rem;
  height: 0.45rem;
  content: '';
  border: 1px solid currentColor;
  border-radius: 50%;
}
.step-link:hover:not(:disabled) { color: var(--text); border-color: var(--line); }
.step-link[aria-current="step"] {
  color: var(--ink);
  background: var(--lime);
}
.step-link[aria-current="step"]::before { border-color: var(--ink); background: var(--ink); }
.step-link:disabled { opacity: 0.42; cursor: not-allowed; }

main { padding-block: clamp(2.2rem, 5vw, 4.5rem) clamp(3.5rem, 7vw, 6rem); }
.stage { animation: enter 420ms ease both; }
.stage-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.1rem;
}
.stage-heading > div:first-child { max-width: 780px; }
.stage-heading h1 { max-width: 16ch; }
.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.3;
  text-transform: uppercase;
}
.lead {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.stage-aside {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0 0.5rem 1rem;
}
.scribble {
  color: var(--yellow);
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  line-height: 0.95;
  transform: rotate(-5deg);
}
.aside-orbit {
  width: 42px;
  height: 42px;
  border: 1px solid var(--lime);
  border-radius: 50%;
  position: relative;
}
.aside-orbit::before {
  position: absolute;
  inset: 8px -4px;
  content: '';
  border: 1px dashed var(--muted);
  border-radius: 50%;
  transform: rotate(-31deg);
}
.aside-orbit::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  content: '';
  border-radius: 50%;
  background: var(--orange);
}

.participant-row {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  margin-bottom: 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 28, 26, 0.75);
}
.participant-field { width: min(100%, 340px); display: flex; flex-direction: column; gap: 0.45rem; }
.participant-field span { font-size: 0.82rem; font-weight: 600; }
.participant-field input,
.question-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-raised);
  transition: border-color 160ms ease, background 160ms ease;
}
.participant-field input { min-height: 46px; padding: 0.65rem 0.8rem; }
.participant-field input:hover,
.question-card textarea:hover { border-color: #55554d; }
.participant-row > p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.question-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(38, 38, 35, 0.72), rgba(28, 28, 26, 0.95));
  transition: border-color 180ms ease, transform 180ms ease;
}
.question-card:first-child { grid-column: 1 / -1; }
.question-card:focus-within { border-color: rgba(189, 252, 14, 0.64); }
.question-card label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
}
.q-mark {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--orange);
}
.question-card p {
  margin: 0 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.question-card textarea {
  min-height: 86px;
  padding: 0.75rem 0.85rem;
  resize: vertical;
  line-height: 1.5;
}
.question-card textarea::placeholder { color: #8b8b83; opacity: 1; }

.section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
}
.action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: var(--ink); background: var(--lime); }
.btn-primary:hover { background: #d0ff3b; }
.btn-secondary { color: var(--text); border-color: #5a5a50; background: transparent; }
.btn-secondary:hover { border-color: var(--lime); background: rgba(189, 252, 14, 0.08); }
.btn-warm { color: var(--ink); background: var(--orange); }
.btn-warm:hover { background: #ff6940; }
.btn-quiet {
  min-height: 42px;
  padding-inline: 0.6rem;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}
.btn-quiet:hover { color: var(--text); border-color: var(--line); }
.feedback { max-width: 45ch; margin: 0; color: var(--muted); font-size: 0.8rem; }
.feedback.is-alert { color: var(--yellow); }
.privacy-strip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 820px;
  margin-top: 1.3rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--sky);
  color: var(--muted);
  background: rgba(171, 217, 255, 0.055);
  font-size: 0.78rem;
}
.privacy-strip p { margin: 0; }
.privacy-mark { color: var(--sky); font-size: 1rem; font-weight: 700; }

/* Demonstration of the process */
.work-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 2rem;
}
.orbit-panel {
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: radial-gradient(circle at center, rgba(255, 72, 16, 0.09), transparent 60%), var(--panel);
}
.orbit-art { width: min(100%, 380px); height: auto; overflow: visible; }
.orbit-ring { fill: none; stroke: var(--lime); stroke-width: 3; stroke-dasharray: 530 40; stroke-linecap: round; }
.orbit-track { fill: none; stroke: rgba(250, 250, 247, 0.48); stroke-width: 1.5; stroke-dasharray: 6 8; }
.orbit-core { fill: var(--orange); }
.orbit-halo { fill: rgba(255, 72, 16, 0.16); }
.orbit-dot { fill: var(--lime); }
.agent-list { display: flex; flex-direction: column; gap: 0.75rem; padding: 0; margin: 0; list-style: none; }
.work-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 180ms ease, background 180ms ease;
}
.work-step-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel-raised);
  font-weight: 700;
}
.work-step-copy { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.work-step-copy strong { font-size: 0.9rem; }
.work-step-copy small { color: var(--muted); font-size: 0.75rem; }
.work-step-state {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.work-step.is-working { border-color: var(--yellow); }
.work-step.is-working .work-step-icon { color: var(--ink); background: var(--yellow); animation: pulse 900ms ease-in-out infinite alternate; }
.work-step.is-working .work-step-state { color: var(--yellow); }
.work-step.is-done { border-color: rgba(189, 252, 14, 0.7); }
.work-step.is-done .work-step-icon { color: var(--ink); background: var(--lime); }
.work-step.is-done .work-step-state { color: var(--lime); }
.work-caption {
  margin: 1.2rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(250, 241, 109, 0.25);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(250, 241, 109, 0.055);
  font-size: 0.82rem;
}
.work-actions { margin-top: 1.25rem; }

/* The editable plan */
.plan-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}
.plan-top h1 { max-width: 19ch; margin-bottom: 0; }
.stamp {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  outline: 2px solid var(--lime);
  color: var(--ink);
  background: var(--lime);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.diagnosis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 0.85rem;
  margin-top: 1.2rem;
}
.box {
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.box-label {
  margin-bottom: 0.55rem;
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.editable-summary {
  min-height: 1.8em;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.clarity-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.clarity-list span {
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}
.clarity-list span.is-highlight { color: var(--text); border-color: var(--orange); background: rgba(255, 72, 16, 0.15); }
.handwritten {
  min-height: 2em;
  color: var(--yellow);
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
}
.layers-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.layer-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--text);
  transition: opacity 250ms ease, transform 250ms ease;
  opacity: 0;
  transform: translateY(10px);
}
.layer-card.is-visible { opacity: 1; transform: none; }
.layer-card:nth-child(4) {
  grid-column: 1 / -1;
  color: var(--text);
  border-color: rgba(189, 252, 14, 0.75);
  background: linear-gradient(110deg, rgba(189, 252, 14, 0.08), var(--panel) 55%);
}
.layer-label {
  margin: 0;
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.layer-card:nth-child(4) .layer-label { color: var(--lime); }
.layer-value {
  min-height: 1.7em;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.experiment-list { margin: 0; padding-left: 1.25rem; }
.experiment-list li { margin: 0.55rem 0; padding-left: 0.3rem; line-height: 1.55; }
.evidence-card dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1.25fr);
  gap: 0.55rem 0.8rem;
  margin: 0;
}
.evidence-card dt { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.evidence-card dd { margin: 0; font-size: 0.82rem; font-weight: 600; overflow-wrap: anywhere; }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1.25rem; }
.plan-actions .feedback { margin-left: 0.3rem; }

/* Commitment */
.oath-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 2rem;
}
.oath-copy { display: flex; flex-direction: column; gap: 0.95rem; }
.oath-line {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.22;
}
.oath-line span {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-color: rgba(189, 252, 14, 0.42);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.oath-aside {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.oath-aside .scribble { display: block; margin-bottom: 0.8rem; }
.oath-aside p { margin-bottom: 0; color: var(--muted); font-size: 0.85rem; }
.witness-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 1.8rem; }
.witness-stamp {
  padding: 0.35rem 0.9rem;
  border: 5px solid var(--lime);
  border-radius: 14px;
  color: var(--lime);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-7deg) scale(0.85);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 180ms ease;
}
.witness-stamp.is-visible { transform: rotate(-7deg) scale(1); opacity: 1; }
.witness-note { margin: 0; color: var(--muted); font-size: 0.8rem; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.2rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}
.app-footer p { margin: 0; }

@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

@media (max-width: 900px) {
  .stage-heading { align-items: flex-start; }
  .stage-aside { padding-top: 0.3rem; }
  .work-layout,
  .diagnosis-grid,
  .results-grid,
  .oath-layout { grid-template-columns: 1fr; }
  .orbit-panel { min-height: 300px; }
  .orbit-art { width: min(68vw, 310px); }
}

@media (max-width: 640px) {
  .topbar,
  .step-nav,
  main,
  .app-footer { width: min(calc(100% - 1.5rem), var(--page-width)); }
  .topbar { min-height: 72px; flex-wrap: wrap; gap: 0.55rem; }
  .brand-symbol { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 0.88rem; }
  .brand-copy small { font-size: 0.58rem; letter-spacing: 0.1em; }
  .status-pill { width: 100%; padding: 0.4rem 0; border: 0; background: transparent; font-size: 0.68rem; }
  .step-nav { gap: 0.25rem; padding-block: 0.55rem 0.65rem; }
  .step-link { min-height: 38px; padding-inline: 0.72rem; font-size: 0.76rem; }
  main { padding-top: 2rem; }
  .stage-heading { display: block; margin-bottom: 1.5rem; }
  .stage-heading h1 { font-size: clamp(2.2rem, 11vw, 3.35rem); }
  .stage-aside { justify-content: flex-start; margin-top: 1rem; padding-left: 0; }
  .participant-row { display: block; padding: 0.9rem; }
  .participant-field { width: 100%; }
  .participant-row > p { margin: 0.6rem 0 0; }
  .question-grid,
  .layers-grid { grid-template-columns: 1fr; }
  .question-card:first-child,
  .layer-card:nth-child(4) { grid-column: auto; }
  .question-card { padding: 0.95rem; }
  .action-group { width: 100%; }
  .action-group .btn { width: 100%; }
  .btn-quiet { width: auto !important; justify-content: flex-start; }
  .section-actions { align-items: flex-start; }
  .work-step { grid-template-columns: 38px minmax(0, 1fr); padding: 0.78rem; }
  .work-step-icon { width: 38px; height: 38px; }
  .work-step-state { grid-column: 2; }
  .plan-top { align-items: flex-start; }
  .plan-top h1 { font-size: clamp(2rem, 10vw, 3.1rem); }
  .stamp { margin-top: 0.35rem; padding: 0.42rem 0.65rem; font-size: 0.62rem; }
  .box { padding: 0.95rem; }
  .evidence-card dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .evidence-card dd { margin-bottom: 0.45rem; }
  .oath-line { font-size: clamp(1.7rem, 8vw, 2.55rem); }
  .app-footer { display: block; }
  .app-footer p + p { margin-top: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .orbit-dot { display: none; }
}
