:root{
  --primary:#2563eb;
  --primary-dark:#1e40af;
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --success:#16a34a;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Layout */
.page{
  max-width:520px;
  margin:auto;
  padding:20px 16px 40px;
}

/* Screens */
.screen{
  display:none;
  animation:fadeIn .25s ease;
}

.screen.active{
  display:block;
}

@keyframes fadeIn{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

/* Header */
h1{
  margin:10px 0 6px;
  font-size:1.6rem;
  font-weight:700;
}

h2{
  margin:0 0 12px;
}

p{
  color:var(--muted);
  margin:0;
}

/* Home Buttons */
.homeButtons{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:28px;
}

.homeButtons button{
  height:52px;
  font-size:1rem;
  font-weight:600;
  border-radius:12px;
}

/* Card */
.card{
  background:var(--card);
  padding:18px;
  border-radius:16px;
  box-shadow:0 6px 20px rgba(0,0,0,0.05);
}

/* Inputs */
input, select{
  width:100%;
  padding:12px;
  margin-top:8px;
  margin-bottom:14px;
  border-radius:10px;
  border:1px solid var(--border);
  font-size:0.95rem;
  transition:0.2s;
}

input:focus, select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(37,99,235,0.15);
}

/* Buttons */
button{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:none;
  background:var(--primary);
  color:white;
  font-weight:600;
  cursor:pointer;
  transition:0.2s;
}

button:hover{
  background:var(--primary-dark);
}

button:active{
  transform:scale(0.98);
}
button:disabled{
  background:#cbd5e1;
  cursor:not-allowed;
  opacity:0.7;
}
/* Back button */
.backBtn{
  background:#111827;
  margin-bottom:16px;
}

/* Section divider */
hr{
  border:none;
  border-top:1px solid var(--border);
  margin:20px 0;
}

/* Stage list */
.stage{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--border);
  margin-top:10px;
  background:#fafafa;
  transition:0.2s;
}

.stage span:first-child{
  font-size:0.95rem;
}

/* Completed state */
.stage.completed{
  border-color:var(--success);
  background:#ecfdf5;
  color:var(--success);
  font-weight:600;
}

/* Stage button */
.stage button{
  width:auto;
  padding:6px 12px;
  font-size:0.85rem;
  border-radius:8px;
}

/* Mobile optimization */
@media (max-width:480px){
  .page{
    padding:16px 12px 30px;
  }

  h1{
    font-size:1.4rem;
  }

  .homeButtons button{
    height:48px;
  }
}
/* Accordion */
.channelCard{
  background:#fff;
  border-radius:14px;
  margin-top:14px;
  box-shadow:0 4px 14px rgba(0,0,0,0.05);
  overflow:hidden;
}

.channelHeader{
  padding:14px;
  cursor:pointer;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  background:#f9fafb;
}

.channelBody{
  padding:14px;
  border-top:1px solid #eee;
  display:none;
}

.channelCard.active .channelBody{
  display:block;
}

/* Toast */
#toast{
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  background:#111;
  color:#fff;
  padding:12px 18px;
  border-radius:8px;
  opacity:0;
  pointer-events:none;
  transition:0.3s;
  font-size:0.9rem;
}

#toast.show{
  opacity:1;
}
.stageLog{
  font-size:0.85rem;
  margin-top:6px;
  color:#555;
}

.stageLog small{
  color:#999;
}