:root {
  --paper: #fffaf0;
  --ink: #17120d;
  --muted: #675d50;
  --black: #161616;
  --orange: #f59e0b;
  --blue: #2667ff;
  --green: #16a34a;
  --rose: #e11d48;
  --yellow: #ffd23f;
  --panel: #fffdf7;
  --shadow: 0 18px 0 var(--black);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(38, 103, 255, 0.11) 0 50%, transparent 50%),
    linear-gradient(135deg, #fff7e7 0%, #f0fff6 52%, #fff4f4 100%);
  background-size: 34px 34px, auto;
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.guide-shell {
  width: min(1060px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.guide-header {
  position: relative;
  text-align: center;
}

.back-link {
  position: absolute;
  left: 0;
  top: 4px;
  border: 3px solid var(--black);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--black);
}

.kicker,
.subline,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kicker {
  font-size: 12px;
}

.guide-header h1 {
  margin: 6px 0 8px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subline {
  font-size: 13px;
}

.guide-panel {
  margin-top: 18px;
}

.screen {
  border: 5px solid var(--black);
  border-radius: 22px;
  padding: clamp(16px, 3vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.screen-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
  align-items: start;
}

.beneficiary-summary,
.reason-box,
.recommendation-card {
  border: 3px solid var(--black);
  border-radius: 14px;
  padding: 16px;
  background: var(--paper);
}

.save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border: 2px solid var(--black);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--rose);
  font-weight: 900;
  text-decoration: underline;
}

.tree-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tree-tab {
  border: 3px solid var(--black);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  font-weight: 900;
}

.tree-tab.active {
  background: var(--yellow);
}

.beneficiary-summary h2,
.question-card h2,
.recommendation-card h2 {
  margin: 4px 0 10px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.beneficiary-summary p,
.reason-box p,
.recommendation-card p {
  line-height: 1.45;
}

.tag {
  display: inline-block;
  border: 2px solid var(--black);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}

.mini-list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.mini-list li {
  margin: 6px 0;
}

.question-card {
  min-height: 410px;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.dot {
  height: 12px;
  flex: 1;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #eadfcc;
}

.dot.done {
  background: var(--green);
}

.dot.current {
  background: var(--orange);
}

.question-text {
  margin: 8px 0 18px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.02;
}

.selection-hint {
  margin: -8px 0 14px;
  color: var(--muted);
  font-weight: 900;
}

.option-grid {
  display: grid;
  gap: 12px;
}

.option-button,
.action-button {
  border: 3px solid var(--black);
  border-radius: 16px;
  padding: 14px 16px;
  background: white;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  box-shadow: 0 6px 0 var(--black);
}

.option-button:hover,
.action-button:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 var(--black);
}

.option-button.selected {
  background: var(--blue);
  color: white;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.action-button {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
}

.action-button.primary {
  background: var(--orange);
}

.action-button.secondary {
  background: var(--panel);
}

.action-button.danger {
  background: var(--rose);
  color: white;
}

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

.section-title {
  margin: 4px 0 14px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 0.98;
  letter-spacing: 0;
}

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

.recommendation-card h3 {
  margin: 4px 0 8px;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: 24px;
  line-height: 1.02;
  letter-spacing: 0;
}

.recommendation-card.recommended {
  background: #ecfdf3;
}

.recommendation-card.alternative {
  background: #fffaf0;
}

.recommendation-card.not-recommended {
  background: #fff1f2;
}

.status-label {
  display: inline-block;
  margin: 0 0 8px;
  border: 2px solid var(--black);
  border-radius: 999px;
  padding: 4px 8px;
  background: white;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.summary-strip {
  display: grid;
  gap: 8px;
  border: 3px solid var(--black);
  border-radius: 14px;
  padding: 14px;
  background: var(--yellow);
  font-weight: 850;
}

.spaced {
  margin-top: 20px;
  margin-bottom: 8px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.choice-pill {
  border: 3px solid var(--black);
  border-radius: 999px;
  padding: 9px 12px;
  background: white;
  font-weight: 900;
}

.choice-pill.selected {
  background: var(--green);
  color: white;
}

.empty-state {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 820px) {
  .guide-shell {
    width: min(100% - 18px, 1060px);
  }

  .back-link {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
  }

  .screen-grid,
  .recommendation-layout {
    grid-template-columns: 1fr;
  }

  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .screen {
    border-width: 4px;
    border-radius: 18px;
    box-shadow: 0 10px 0 var(--black);
  }
}
