:root {
  --gris: #4A4A4A;
  --gris-dark: #3E3E3E;
  --amarillo: #FFBF07;
  --fondo: #EDEFF1;
  --texto: #202124;
  --muted: #6b7280;
  --borde: #d7dadd;
  --verde: #047857;
  --azul: #2563eb;
  --naranja: #f97316;
  --rojo: #c0392b;
  --morado: #7c3aed;
  --soft-yellow: #fff6d9;
  --soft-gray: #f7f8f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

.app {
  width: min(1220px, 94vw);
  margin: 0 auto;
  padding: 22px 0 60px;
}

.hero {
  background: radial-gradient(circle at top right, rgba(255,191,7,.18), transparent 28%), var(--gris);
  color: #fff;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  border-top: 7px solid var(--amarillo);
  box-shadow: 0 20px 45px rgba(25,25,25,.16);
  margin-bottom: 18px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 34px 14px;
}

.logo {
  max-width: 330px;
  max-height: 94px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.28));
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  border: 4px solid var(--amarillo);
  box-shadow: 0 8px 18px rgba(0,0,0,.34);
}

.yellow-line {
  height: 2px;
  background: var(--amarillo);
  margin: 0 34px;
  opacity: .8;
}

.hero-content { padding: 20px 34px 28px; }

.kicker {
  color: var(--amarillo);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .92;
  letter-spacing: -.05em;
  font-weight: 900;
}

.subtitle {
  margin: 14px 0 8px;
  max-width: 980px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  color: #f3f4f6;
}

.statement {
  margin: 0;
  max-width: 880px;
  font-size: 18px;
  color: rgba(255,255,255,.86);
  line-height: 1.45;
}

.progress {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  margin-bottom: 18px;
  background: rgba(237,239,241,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--borde);
  border-radius: 18px;
}

.step-dot {
  border: 1px solid var(--borde);
  background: #fff;
  color: #374151;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.step-dot.active {
  background: var(--amarillo);
  border-color: var(--amarillo);
  color: #262626;
}

.screen { display: none; }
.screen.active { display: block; }

.card {
  background: #fff;
  border: 1px solid #dfe3e7;
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 14px 34px rgba(74,74,74,.10);
  margin-bottom: 18px;
}

.intro-card, .result-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.2vw, 44px);
  color: #111827;
  letter-spacing: -.04em;
  line-height: 1;
}

h2::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 32px;
  border-radius: 8px;
  background: var(--amarillo);
  margin-right: 10px;
  vertical-align: -5px;
}

h3 { color: var(--gris-dark); }

.badge {
  width: fit-content;
  background: var(--gris);
  color: #fff;
  border-left: 6px solid var(--amarillo);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px;
  margin-bottom: 16px;
}

.lead {
  font-size: 20px;
  line-height: 1.55;
  color: #374151;
  max-width: 950px;
}

.explain {
  background: var(--soft-yellow);
  border-left: 5px solid var(--amarillo);
  padding: 15px 17px;
  border-radius: 14px;
  line-height: 1.55;
  color: #3d3d3d;
  margin: 0 0 18px;
  font-size: 16px;
}

.hidden { display: none !important; }

.mini-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.mini-flow div {
  background: #fff;
  border: 1px solid var(--borde);
  border-top: 5px solid var(--amarillo);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  font-weight: 900;
  color: #374151;
}

.choice-grid, .problem-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.choice-card, .problem-choice {
  text-align: left;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: 20px;
  min-height: 150px;
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
}

.choice-card:hover, .problem-choice:hover {
  border-color: var(--amarillo);
  background: #fffdf4;
}

.choice-card.selected, .problem-choice.selected {
  border: 2px solid var(--amarillo);
  box-shadow: 0 12px 26px rgba(255,191,7,.18);
}

.choice-card strong, .problem-choice strong {
  display: block;
  color: #111827;
  font-size: 20px;
  margin-bottom: 8px;
}

.choice-card span, .problem-choice span {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 700;
}

.selected-box {
  margin-top: 18px;
  border: 1px solid #f5d26b;
  border-left: 7px solid var(--amarillo);
  border-radius: 18px;
  padding: 20px;
  background: var(--soft-yellow);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.problem-grid.compact div {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 14px;
  padding: 14px;
}

.problem-grid span {
  display: block;
  color: #6f5700;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.problem-grid strong {
  color: #1f2937;
  line-height: 1.35;
}


.current-problem-banner {
  border: 1px solid #f5d26b;
  border-left: 7px solid var(--amarillo);
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--soft-yellow);
  margin: 0 0 16px;
}

.current-problem-kicker {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6f5700;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.current-problem-banner strong {
  display: block;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.current-problem-banner span {
  display: block;
  color: #5d532a;
  line-height: 1.4;
  font-weight: 700;
}

.draft-helper {
  border: 1px solid var(--borde);
  border-left: 5px solid var(--gris);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--soft-gray);
  color: #374151;
  line-height: 1.45;
  margin: 12px 0 14px;
}

.draft-helper strong {
  color: #111827;
}

.small-btn {
  display: inline-flex;
  margin-left: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.live-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 14px;
}

input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cdd2d8;
  border-radius: 12px;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111827;
  outline: none;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--amarillo);
  box-shadow: 0 0 0 4px rgba(255,191,7,.22);
}

.cause-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 110px;
  padding: 14px;
  border: 1px dashed var(--borde);
  border-radius: 18px;
  background: #fafafa;
}

.cause-list.small {
  display: flex;
  flex-direction: column;
}

.cause-chip {
  position: relative;
  background: #fff;
  border: 1px solid var(--borde);
  border-left: 5px solid var(--amarillo);
  border-radius: 14px;
  padding: 12px 42px 12px 12px;
  font-weight: 800;
  color: #374151;
  box-shadow: 0 6px 14px rgba(0,0,0,.035);
}

.cause-chip.empty { color: var(--muted); font-style: italic; }

.mini-danger {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}

.tips-box {
  border: 1px solid var(--borde);
  border-left: 5px solid var(--gris);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--soft-gray);
  margin-top: 18px;
  color: #374151;
  line-height: 1.5;
}

.two-columns {
  display: grid;
  grid-template-columns: .8fr 1.4fr;
  gap: 18px;
  align-items: start;
}

.family-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.family-card-select {
  border: 1px solid var(--borde);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.family-card-select h3 {
  margin: 0;
  background: var(--gris);
  color: #fff;
  border-bottom: 4px solid var(--amarillo);
  padding: 13px 15px;
  font-size: 17px;
}

.check-cause {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid #edf0f2;
  cursor: pointer;
  color: #374151;
  font-weight: 800;
}

.check-cause:hover { background: #fffdf4; }
.check-cause input { width: 18px; height: 18px; accent-color: var(--amarillo); }

.check-cause em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.check-cause.from-group {
  background: #fff8dc;
}

.priority-zone {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.priority-card {
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
}

.priority-card h3 {
  margin: 0 0 10px;
  color: #111827;
}

.family-tag {
  display: inline-flex;
  width: fit-content;
  background: #f3f4f6;
  color: #374151;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  margin: 2px 0 12px;
}

.priority-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 70px;
  gap: 10px;
  align-items: end;
}

.priority-controls label {
  font-weight: 900;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.abc {
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
}

.abc.A { background: #fee2e2; color: #991b1b; }
.abc.B { background: #fff1b8; color: #6f5700; }
.abc.C { background: #f3f4f6; color: #374151; }

.priority-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.priority-summary div {
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.priority-summary strong {
  display: block;
  font-size: 34px;
  color: var(--gris-dark);
}

.priority-summary span { color: var(--muted); line-height: 1.35; }

.root-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.root-card {
  border: 1px solid var(--borde);
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  border-top: 7px solid var(--amarillo);
  box-shadow: 0 12px 26px rgba(0,0,0,.055);
}

.root-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.root-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--amarillo);
  color: #262626;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
}

.root-card h3 {
  margin: 4px 0 0;
  font-size: clamp(20px, 2vw, 27px);
  color: var(--gris-dark);
  line-height: 1.12;
}

.why-edit, .root-edit, .action-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 900;
  color: #111827;
  margin-top: 12px;
}

.root-edit {
  background: var(--soft-yellow);
  border: 1px solid #f5d26b;
  border-left: 7px solid var(--amarillo);
  border-radius: 16px;
  padding: 14px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.action-card {
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}

.action-card h3 {
  margin: 0 0 10px;
  color: var(--gris-dark);
}

.action-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-section {
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  margin-top: 16px;
}

.report-section h3 { margin: 0 0 12px; }
.report-section ul { margin: 0; padding-left: 20px; line-height: 1.55; }

.root-result {
  border-left: 5px solid var(--amarillo);
  background: var(--soft-yellow);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}

.root-result p { margin: 6px 0 0; line-height: 1.45; }

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.timeline-card {
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 16px;
  background: #fafafa;
}

.timeline-step {
  display: inline-block;
  background: var(--gris);
  color: #fff;
  border-left: 5px solid var(--amarillo);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-item {
  border-top: 1px dashed var(--borde);
  padding: 12px 0 0;
  margin-top: 12px;
}

.timeline-item strong { display: block; color: #111827; margin-bottom: 5px; }
.timeline-item span, .timeline-item em, .muted { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; font-style: normal; }

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.buttons.between { justify-content: space-between; }

button {
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 900;
  font-size: 15px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

button:hover { transform: translateY(-1px); }

.primary {
  background: var(--amarillo);
  color: #262626;
  box-shadow: 0 10px 22px rgba(255,191,7,.25);
}

.secondary { background: var(--gris); color: #fff; }
.ghost { background: #f3f4f6; color: #374151; border: 1px solid var(--borde); }

@media (max-width: 980px) {
  .choice-grid, .problem-list, .problem-grid, .mini-flow, .two-columns, .family-select-grid, .priority-zone, .priority-summary, .action-grid, .timeline-grid {
    grid-template-columns: 1fr;
  }
  .cause-list { grid-template-columns: 1fr; }
  .priority-controls { grid-template-columns: 1fr; }
  .action-meta { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero-top { flex-direction: column; align-items: flex-start; }
  .logo { max-width: 280px; }
  .live-input { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; }
}

@media print {
  body { background: #fff; }
  .progress, .buttons, .live-input, .hero { display: none !important; }
  .screen { display: block !important; }
  .screen:not([data-screen="8"]) { display: none !important; }
  .card { box-shadow: none; border: none; }
  .app { width: 100%; padding: 0; }
}
.mini-remove {
  width: fit-content;
  margin-top: 4px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.why-row textarea {
  min-height: 72px;
}


.star-case,
.option-case {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.star-case {
  background: var(--amarillo);
  color: #262626;
}

.option-case {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid var(--borde);
}
