/* ToneForge Wizard v1 */
:root{
  --bg:#0f1115;
  --bg2:#0b0d12;
  --card:#151a22;
  --text:#eaeef3;
  --muted:#9aa3b2;
  --border:#243043;
  --accent:#3b6fb6;
  --accent2:#2b558f;
  --danger:#ff4d4d;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
}
body.light{
  --bg:#f6f8fb;
  --bg2:#eef2f7;
  --card:#ffffff;
  --text:#111827;
  --muted:#64748b;
  --border:#dbe3ef;
  --accent:#2c5ea6;
  --accent2:#244b85;
  --shadow: 0 10px 25px rgba(15,17,21,.12);
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 10%, rgba(59,111,182,.18), transparent 50%),
              radial-gradient(900px 700px at 80% 20%, rgba(59,111,182,.10), transparent 55%),
              var(--bg);
  color: var(--text);
}
.topbar{
  position: sticky; top: 0; z-index: 20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(to bottom, rgba(10,12,16,.92), rgba(10,12,16,.72));
  backdrop-filter: blur(10px);
}
body.light .topbar{
  background: linear-gradient(to bottom, rgba(246,248,251,.92), rgba(246,248,251,.76));
}
.brand{ display:flex; align-items:center; gap:10px; }
.logo{
  width:38px; height:38px; border-radius:10px;
  display:grid; place-items:center; font-weight:800; color:white;
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 20px rgba(59,111,182,.22);
}
.name{ font-weight:800; letter-spacing:.2px; }
.powered{ font-size:12px; color: var(--muted); margin-top:2px; }
.topbarRight{ display:flex; align-items:center; gap:10px; }
.switchLabel{ font-size:12px; color:var(--muted); }

.wrap{ max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }

.hero{
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(21,26,34,.86), rgba(21,26,34,.70));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
body.light .hero{ background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.84)); }
.blueprint{
  position:absolute; inset:0; pointer-events:none;
  opacity:.35;
  background-image:
    linear-gradient(rgba(59,111,182,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,111,182,.10) 1px, transparent 1px),
    linear-gradient(135deg, rgba(59,111,182,.08) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px, 140px 140px;
  mix-blend-mode: screen;
}
body.light .blueprint{ opacity:.20; mix-blend-mode: multiply; }
.heroInner{ position: relative; padding: 52px 22px; max-width: 860px; }
.heroTitle{ font-size: 44px; line-height: 1.05; margin: 0 0 14px; letter-spacing: -.6px; }
.heroSub{ margin: 0 0 22px; color: var(--muted); font-size: 16px; max-width: 58ch; }
.heroCtas{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.heroJoke{ margin-top: 22px; color: var(--muted); font-size: 13px; }

.panel{
  margin-top: 18px;
  border: 1px solid var(--border);
  background: rgba(21,26,34,.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
body.light .panel{ background: rgba(255,255,255,.90); }

.wizardTop{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top: 22px; }
.progress{ flex:1; }
.progressBar{
  height:10px; border-radius: 999px;
  background: rgba(59,111,182,.14);
  border:1px solid var(--border);
  overflow:hidden;
}
.progressFill{ height:100%; width:0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.progressMeta{ display:flex; justify-content:space-between; margin-top:8px; color: var(--muted); font-size: 12px; }
.miniActions{ display:flex; gap:8px; flex-wrap:wrap; }

.h2{ margin: 0 0 8px; }
.muted{ color: var(--muted); margin-top:0; }
.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top: 12px; }

.bigText{
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.14);
  color: var(--text);
  padding: 12px 12px;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}
body.light .bigText{ background: rgba(17,24,39,.03); }

.input, .select{
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.14);
  color: var(--text);
  padding: 10px 10px;
  font-size: 14px;
  outline: none;
}
body.light .input, body.light .select{ background: rgba(17,24,39,.03); }

.primaryBtn{
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(59,111,182,.20);
}
.primaryBtn:disabled{ opacity: .6; cursor: not-allowed; }

.ghostBtn{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.ghostBtn:hover{ border-color: rgba(59,111,182,.55); }
.ghostBtn.danger{ border-color: rgba(255,77,77,.35); }
.ghostBtn.danger:hover{ border-color: rgba(255,77,77,.70); }

.linkBtn{
  border:none; background: transparent; color: var(--muted);
  cursor: pointer; padding: 10px 0;
}
.linkBtn:hover{ color: var(--text); }

.wizardNav{ margin-top: 16px; display:flex; justify-content:space-between; gap:12px; }
.navRight{ display:flex; gap:10px; align-items:center; }

.callout{
  border-radius: 12px;
  border: 1px solid rgba(255,77,77,.35);
  background: rgba(255,77,77,.08);
  padding: 12px;
  color: var(--text);
  margin-bottom: 14px;
  font-size: 13px;
}

.grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
  .heroTitle{ font-size: 36px; }
}

.cardRow{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top: 10px; }

.pill{
  display:inline-flex; align-items:center; gap:8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.output{ margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; overflow:hidden; }
.outputTop{
  display:flex; justify-content:space-between; align-items:center;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.10);
}
body.light .outputTop{ background: rgba(17,24,39,.03); }
.outputTitle{ font-weight: 700; }
.outputBody{ margin: 0; padding: 12px; white-space: pre-wrap; line-height: 1.55; font-size: 14px; }

.footer{ border-top:1px solid var(--border); padding: 16px; text-align:center; background: var(--bg2); }
.mutedSmall{ color: var(--muted); font-size: 12px; }

/* Toggle switch */
.switch{ position: relative; display:inline-block; width: 44px; height: 24px; }
.switch input{ display:none; }
.slider{
  position:absolute; cursor:pointer; inset:0;
  background: rgba(59,111,182,.20);
  border: 1px solid var(--border);
  transition: .2s;
  border-radius: 999px;
}
.slider:before{
  content:"";
  position:absolute;
  height: 18px; width: 18px;
  left: 3px; top: 2px;
  background: white;
  transition: .2s;
  border-radius: 999px;
}
.switch input:checked + .slider{ background: rgba(59,111,182,.38); }
.switch input:checked + .slider:before{ transform: translateX(20px); }
