:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #65717d;
  --line: #dfe5ea;
  --accent: #1d5fa7;
  --accent-dark: #174d87;
  --yes: #16794b;
  --no: #a63a3a;
  --shadow: 0 18px 50px rgba(21, 35, 48, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent); color: white; font-weight: 800;
}
.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.shell { width: min(980px, calc(100% - 28px)); margin: 42px auto 90px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(26px, 5vw, 54px); }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(30px, 4.5vw, 48px); line-height: 1.06; letter-spacing: -0.03em; }
.lead { max-width: 720px; color: var(--muted); font-size: 18px; line-height: 1.6; margin: 18px 0 30px; }

.flow-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.flow-card {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 20px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.flow-card:hover { transform: translateY(-2px); border-color: #b9cadb; box-shadow: 0 10px 30px rgba(27, 53, 77, .08); }
.flow-card strong { display: block; font-size: 18px; margin-bottom: 7px; }
.flow-card span { color: var(--muted); line-height: 1.45; }

.stepbar { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 46px); background: #fff; }
.node-type { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 12px; }
.card h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.14; letter-spacing: -.025em; }
.node-body { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 18px 0 0; white-space: pre-wrap; }
.answer-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: #eef3f7; color: var(--text); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-answer { min-height: 72px; font-size: 18px; color: #fff; }
.btn-yes { background: var(--yes); }
.btn-no { background: var(--no); }
.btn-neutral { background: var(--accent); }
.path-summary { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 18px; }
.path-summary strong { color: var(--text); }

footer {
  width: min(980px, calc(100% - 28px)); margin: -55px auto 30px;
  display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px;
}
footer a { color: var(--accent); font-weight: 700; text-decoration: none; }

@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .brand span { display: none; }
  .shell { margin-top: 20px; }
  .answer-buttons { grid-template-columns: 1fr; }
  .top-actions .btn { padding: 10px; font-size: 13px; }
}
