/* SCAPS by Ronny Makhoul */
:root{
  --bg:#f8fafc;--panel:#ffffff;--muted:#64748b;--text:#0f172a;--accent:#2563eb;--border:#e2e8f0;--blueL:#c7d2fe;--blueD:#3b82f6;
  --box: min(98vw, 440px)
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";background:var(--bg);color:var(--text)}
.page{min-height:100vh;display:flex;flex-direction:column}
.main{flex:1;display:flex;align-items:center;justify-content:center;padding:16px}
.stack{width:100%;max-width:760px;display:grid;gap:10px;justify-items:center;justify-content:center}
.topline{display:flex;flex-direction:column;align-items:center;gap:8px}
.brand-box{width:var(--box);height:calc(var(--box) * 0.3);border:1px solid var(--border);border-radius:18px;display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,.08);margin-inline:auto}
.brand-box img{width:100%;height:100%;object-fit:contain;image-rendering:auto}
.cardWrap{width:var(--box);margin-inline:auto}
.card{position:relative;background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(15,23,42,.08);display:flex;flex-direction:column}
@media (min-width:540px){
  .cardWrap{aspect-ratio:1/1}
  .card{height:100%}
}
.status{position:absolute;top:8px;right:12px;font-size:12px;color:var(--muted)}
.status span.ok{color:#16a34a}
.status span.err{color:#dc2626}
.status span.warn{color:#64748b}
.stage{position:relative;flex:1 1 auto;min-height:190px;margin:16px 0 8px 0}
@media (max-width:480px){
  .stage{min-height:300px}
}
.question{position:absolute;inset:0;padding:10px 14px 12px;background:#ffffff;border:0;border-radius:16px}
.question::before{content:"";position:absolute;inset:0;border:1px solid var(--border);border-radius:16px;pointer-events:none;transition:box-shadow .24s ease}
.question legend{display:block;margin:12px 0 6px 0;background:transparent;padding:0;border-radius:0;line-height:1.45;font-size:16px;font-weight:500}
.answers{margin-top:8px;display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.answers label{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;transition:background .15s ease,border-color .15s ease}
.answers label:hover{border-color:#cbd5e1}
.answers label:has(input:checked){background:#eff6ff;border-color:var(--accent)}
input[type="radio"]{width:18px;height:18px;flex:0 0 auto}
.hidden{display:none}
.wizard-nav{border:1px solid var(--border);border-radius:12px;background:#fff;padding:10px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;transition:opacity .2s ease,transform .2s ease}
.btn{appearance:none;border:1px solid #e2e8f0;background:#ffffff;color:var(--text);border-radius:10px;padding:10px 14px;cursor:pointer;font-weight:600;transition:border-color .15s,transform .12s,opacity .18s}
.btn:hover{border-color:#cbd5e1}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn.primary[disabled]{opacity:.5;cursor:not-allowed}
.btn.small{padding:8px 12px;font-size:13px}
.hide{opacity:0;transform:translateY(6px);pointer-events:none}
.step-indicator{text-align:center;font-size:14px;color:var(--muted);font-weight:600}
.progresswrap{display:flex;justify-content:center}
.progressbar{height:10px;background:#eef2ff;border:1px solid #e5e7eb;border-radius:999px;overflow:hidden;margin-top:8px;width:50%}
.progress__fill{height:100%;width:0%;background:linear-gradient(90deg,var(--blueL),var(--blueD));transition:width .25s ease}
.result-actions{display:none;grid-column:1 / -1;align-items:center;gap:12px}
.result-actions.show{display:flex}
#genCardBtn{margin-left:auto}
.under{width:var(--box);display:grid;gap:14px;margin-inline:auto}
.footline{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}
.footnote{font-size:12px;color:var(--muted);justify-self:center;grid-column:2}
.footnote a{color:var(--accent);text-decoration:underline;cursor:pointer;margin-left:8px}
.footnote{ text-align:center }
.footnote a.link-plain{ color:inherit; text-decoration:none; margin:0; cursor:pointer }
.footnote a.link-plain:hover{ text-decoration:none }
.a2hs-sub{ color:var(--muted); font-weight:400 }
.sponsors{display:flex;gap:32px;flex-wrap:wrap;justify-content:center}
.sponsor-box{
  width:100px;height:36px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}
.sponsor-box img{max-width:100%;max-height:100%;object-fit:contain}
.slide-in-right{animation:slideInRight .28s ease both}
.slide-in-left{animation:slideInLeft .28s ease both}
.slide-out-left{animation:slideOutLeft .22s ease both}
.slide-out-right{animation:slideOutRight .22s ease both}
.result-reveal{animation:popIn .32s ease both}
.result-hide{animation:popOut .26s ease both}
@keyframes slideInRight{from{opacity:.0;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}
@keyframes slideInLeft{from{opacity:.0;transform:translateX(-24px)}to{opacity:1;transform:translateX(0)}}
@keyframes slideOutLeft{from{opacity:1;transform:translateX(0)}to{opacity:.0;transform:translateX(-24px)}}
@keyframes slideOutRight{from{opacity:1;transform:translateX(0)}to{opacity:.0;transform:translateX(24px)}}
@keyframes popIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
@keyframes popOut{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50}
.modal.hidden{display:none}
.modal-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;max-width:520px;width:100%}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.form{display:grid;gap:10px}
.row{display:grid;grid-template-columns:120px 1fr;gap:10px;align-items:center}
input[type="text"]{width:100%;border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px;font-size:14px}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}
.preview{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;display:none;margin-top:10px}
.preview img{display:block;width:100%;height:auto}
.intro{display:grid;gap:10px}
.intro p{
  margin:8px 0 0 0;
  color:#334155;
  font-size:14px;
  line-height:1.5;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.intro .actions{display:flex;justify-content:flex-end}
#prob .probNum{font-size:1.1875em}
#prob .probPct{font-size:.6em;margin-left:2px}
#probNote{font-size:14px}