:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5c6b7a;
  --line: #d9dde3;
  --accent: #1e4fd6;
  --accent-soft: #e8eefc;
  --locked: #b0b8c4;
  --done: #1f9d63;
  --sans: "Fraunces", "Georgia", "Segoe UI", serif;
  --ui: "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--ui); background: var(--bg); color: var(--text);
  line-height: 1.55; min-height: 100vh;
}
.shell-wiz-app { max-width: 820px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.shell-wiz-brand {
  font-family: var(--ui); font-size: 0.72rem; letter-spacing: 0.16em; font-weight: 700;
  text-transform: uppercase; color: var(--muted); display: flex; gap: 0.5rem; align-items: center;
}
.shell-wiz-mark {
  display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 999px; font-size: 0.75rem; letter-spacing: 0;
}
.shell-wiz-nav { display: flex; gap: 1rem; margin: 0.85rem 0; font-family: var(--ui); }
.shell-wiz-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.shell-wiz-head h1 { font-family: var(--sans); font-size: 1.85rem; margin: 0.2rem 0; font-weight: 650; }
.shell-wiz-intro { color: var(--muted); margin: 0 0 1.25rem; }
.shell-wiz-rail {
  list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem;
}
.shell-wiz-rail li {
  font-size: 0.78rem; padding: 0.35rem 0.65rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--locked); background: #efece6;
}
.shell-wiz-rail li[data-state="active"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.shell-wiz-rail li[data-state="done"] { border-color: var(--done); color: var(--done); }
.shell-wiz-stage .shell-wiz-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; box-shadow: 0 8px 24px rgba(27,36,48,0.06); min-height: 220px;
}
.shell-wiz-controls { display: flex; justify-content: space-between; margin-top: 1rem; gap: 0.75rem; }
.shell-wiz-controls button {
  font: inherit; padding: 0.55rem 1.1rem; border-radius: 8px; cursor: pointer; border: 1px solid var(--line);
}
.shell-wiz-controls .accent { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.shell-wiz-controls .accent:disabled, .shell-wiz-controls .ghost:disabled { opacity: 0.45; cursor: not-allowed; }
.shell-wiz-controls .ghost { background: transparent; }

/* page extras — keep shell-wiz-* tokens */
.disclaimer {
  background: #fff7e8;
  border: 1px solid #e6d2a8;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  color: #5a4a22;
  font-size: 0.92rem;
}
.hint {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: #24355c;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
.hint.warn { background: #fff1f0; color: #7a2e2a; }
.step-panel { display: none; }
.step-panel.is-on { display: block; }
label.choice {
  display: block; margin: 0.55rem 0; padding: 0.7rem 0.8rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7;
}
label.choice input { width: auto; margin-right: 0.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
label.field { display: block; margin: 0.55rem 0; font-size: 0.88rem; color: var(--muted); }
label.field input, label.field select, label.field textarea {
  width: 100%; margin-top: 0.25rem; padding: 0.45rem 0.55rem;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
table.compare { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.92rem; }
table.compare th, table.compare td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; }
table.compare th { background: var(--accent-soft); width: 42%; }
.flag { color: #9a3412; font-weight: 700; }
.path-box, .evidence-box {
  background: #fff; border: 1px dashed var(--line); border-radius: 10px;
  padding: 0.8rem 1rem; margin: 0.7rem 0;
}
.top, .foot { padding: 0.85rem 1.25rem; color: var(--muted); font-size: 0.88rem; }
.top { display: flex; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); }
.wrap { max-width: 820px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
.matrix-prose { max-width: 820px; margin: 0 auto; padding: 0 1.25rem 2rem; color: var(--muted); }
.matrix-prose h2 { color: var(--text); }
#out {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem; background: #111827; color: #e5e7eb; border-radius: 10px;
  padding: 0.85rem; min-height: 8rem;
}
article.case { margin: 1.25rem 0 1.75rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
