:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #112031;
  --muted: #4a5a6a;
  --line: #c9d6df;
  --brand: #0a6d74;
  --brand-dark: #09565b;
  --soft: #e6f4f1;
  --ok: #198754;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 52%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 1rem;
}

.canvas {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fcfb 100%);
  padding: 1rem;
}

.topbar {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  color: var(--brand);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.title {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.progress-rail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1rem;
}

.rail-node {
  position: relative;
  text-align: center;
  padding-top: 0.9rem;
}

.rail-node::before {
  content: "";
  position: absolute;
  top: 0.34rem;
  left: calc(-50% + 0.52rem);
  width: calc(100% - 0.1rem);
  height: 2px;
  background: var(--line);
}

.rail-node:first-child::before {
  display: none;
}

.dot {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
}

.rail-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.rail-node.is-complete .dot,
.rail-node.is-current .dot {
  border-color: var(--brand);
}

.rail-node.is-complete .dot {
  background: var(--brand);
}

.rail-node.is-complete::before {
  background: var(--brand);
}

.rail-node.is-current .rail-label {
  color: var(--ink);
  font-weight: 700;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.2rem;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

p {
  color: var(--muted);
  margin: 0.8rem 0 0;
  line-height: 1.4;
}

.option-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.option-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: left;
  font-size: 0.96rem;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.option-btn:hover,
.option-btn:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.option-btn.is-selected {
  border-color: var(--brand);
  background: var(--soft);
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brand-dark);
  outline: none;
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.result-badge {
  margin: 0;
  font-size: 0.77rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ok);
  letter-spacing: 0.03em;
}

.bullet-list {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.bullet-list li + li {
  margin-top: 0.4rem;
}

.hint {
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0.6rem;
  }

  .canvas {
    border-radius: 14px;
    padding: 0.8rem;
  }

  .progress-rail {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem;
    background: #ffffff;
  }

  .rail-node {
    text-align: left;
    padding-top: 0;
    padding-left: 1.2rem;
  }

  .rail-node::before {
    top: 0.48rem;
    left: 0.32rem;
    width: 2px;
    height: calc(100% + 0.3rem);
  }

  .rail-node:first-child::before {
    display: block;
    top: 0.6rem;
    height: calc(100% + 0.18rem);
  }

  .rail-node:last-child::before {
    height: 0;
  }

  .dot {
    position: absolute;
    left: 0;
    top: 0.2rem;
  }

  .rail-label {
    margin-top: 0;
    font-size: 0.75rem;
  }
}
