.demo-page main {
  padding-bottom: 3rem;
}

.demo-hero {
  background: linear-gradient(165deg, #0c2824 0%, #134a44 48%, #1a5c54 100%);
  color: var(--hero-text);
  padding: 2.5rem 1.25rem 2rem;
}

.demo-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.demo-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

.demo-hero p {
  margin: 0;
  color: var(--hero-muted);
  max-width: 58ch;
  font-size: 1rem;
}

.demo-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0;
}

.demo-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.demo-progress button {
  flex: 1 1 auto;
  min-width: 7rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-brand);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.demo-progress button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.demo-progress button.done:not(.active) {
  border-color: var(--brand-muted);
  color: var(--brand);
}

.demo-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.35rem;
  min-height: 16rem;
}

.demo-stage-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 820px) {
  .demo-stage-layout {
    grid-template-columns: 1fr minmax(220px, 280px);
  }
}

.demo-tool-mock {
  background: linear-gradient(165deg, #0c2824 0%, #134a44 55%, #1a5c54 100%);
  border: 1px solid var(--line-brand);
  border-radius: 12px;
  padding: 0.65rem 0.7rem 0.75rem;
  color: #e8fff9;
  box-shadow: 0 12px 32px rgba(12, 40, 36, 0.18);
}

.demo-tool-mock-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.demo-tool-mock-head span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.demo-tool-mock-head p {
  margin: 0 0 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(235, 248, 245, 0.6);
}

.demo-tool-mock-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.demo-tool-mock-tabs span {
  font-size: 0.68rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(235, 248, 245, 0.55);
}

.demo-tool-mock-tabs span.active {
  background: rgba(31, 143, 128, 0.45);
  border-color: rgba(158, 224, 212, 0.4);
  color: #fff;
}

.demo-tool-mock-row,
.demo-tool-mock-out {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.demo-tool-mock-row.active,
.demo-tool-mock-out.active {
  border-color: rgba(184, 151, 94, 0.55);
  box-shadow: 0 0 0 1px rgba(184, 151, 94, 0.2);
}

.demo-tool-mock-row code,
.demo-tool-mock-out strong {
  color: #9ee0d4;
  font-weight: 700;
}

.demo-tool-mock-check em {
  font-style: normal;
  font-size: 0.68rem;
  color: #b8975e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-tool-mock--intro .demo-tool-mock-intro-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 0.45rem;
}

.demo-tool-mock--intro .demo-tool-mock-intro-line.short {
  width: 62%;
}

.demo-tool-mock-badge {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ee0d4;
  text-align: center;
  padding: 0.45rem;
  border-radius: 8px;
  background: rgba(31, 143, 128, 0.25);
}

.demo-stage h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.demo-stage p,
.demo-stage li {
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.demo-stage ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.demo-sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.demo-sample-table th,
.demo-sample-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.demo-sample-table th {
  color: var(--ink);
  font-weight: 600;
  width: 42%;
}

.demo-sample-table code {
  font-size: 0.88em;
  background: var(--bg-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.demo-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.demo-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--line-brand);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.demo-pill span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.demo-pill strong {
  display: block;
  font-size: 1.05rem;
  color: var(--brand);
  line-height: 1.25;
}

.demo-pill em {
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

.demo-pill.highlight {
  animation: demoPulse 0.9s ease;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 151, 94, 0.25);
}

@keyframes demoPulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.demo-note {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

.demo-nav .btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.demo-cta-band {
  margin-top: 2rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid var(--line-brand);
}

.demo-cta-band p {
  margin: 0 0 0.85rem;
}
