@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap');

:root{
  --blue: rgb(48,148,172);
  --teal: var(--blue);
  --green: var(--blue);
  --bg:#ffffff;
}
html,body{height:100%; margin:0; font-family: 'Inter', Arial, Helvetica, sans-serif; background:var(--bg); color:#111;}
#color-blind-test{
  min-height:auto;              /* keep full screen behavior */
  display:flex;
  align-items:flex-start;         /* was center */
  justify-content:center;
  padding:16px 0;                 /* optional: small breathing room */
  box-sizing:border-box;
}
.cbt-wrap{width:min(700px, 100%); display:flex; gap:48px; align-items:center; justify-content:center;}
.cbt-left{flex:0 0 auto; display:flex; align-items:center; justify-content:center;}
.cbt-right{flex:1 1 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:26px;}
/* Plate */
#canvas{width:min(72vw, 720px); height:auto; max-width:720px; aspect-ratio:1/1;}
/* Hide mask + progress visuals but keep in DOM for JS */
#mask{display:none;}
/* Keypad */
.keypad{display:grid; grid-template-columns: repeat(5, 92px); gap:26px; justify-content:center;}
@media (max-width: 980px){
  .cbt-wrap{flex-direction:column; gap:24px;}
  .keypad{grid-template-columns: repeat(5, 74px); gap:18px;}
}
.keypad button{
  width:92px; height:92px; border-radius:999px; border:none;
  background:var(--teal); color:#fff; font-size:40px; font-weight:600;
  cursor:pointer; user-select:none;
}
@media (max-width: 980px){
  .keypad button{width:74px; height:74px; font-size:34px;}
}
.keypad button.active{filter:brightness(0.9);}
.actions{display:flex; gap:28px; justify-content:center; flex-wrap:wrap;}
.actions a, .actions button{
  border:none; border-radius:8px; padding:16px 28px;
  font-size:22px; font-weight:700; text-transform:uppercase;
  color:#fff; background:var(--green); cursor:pointer; text-decoration:none;
}
.actions a:visited{color:#fff;}
/* Results page */
.result-wrap{max-width:920px; margin:40px auto; padding:0 20px; box-sizing:border-box;}
.result-card{
  border:none;
  border-radius:16px;
  padding:22px;
  box-sizing:border-box;
}
.result-title{font-size:34px; font-weight:800; margin:0 0 12px;text-align:center;}
.result-text{font-size:18px; line-height:1.45; margin:0 0 22px;text-align:center;}
.result-grid{display:grid; grid-template-columns: 1fr 1fr 1fr; gap:16px;}
@media (max-width: 820px){ .result-grid{grid-template-columns:1fr; } }
.grade{border:1px solid #efefef; border-radius:14px; padding:16px; display:flex; gap:12px; align-items:center; justify-content:space-between;}
.grade h3{margin:0; font-size:18px;}
.grade .val{font-size:18px; font-weight:700;}
.grade img{height:34px; width:auto;}
.result-actions{margin-top:22px; display:flex; gap:12px; flex-wrap:wrap;justify-content:center; }


.instructions{
  max-width: 900px;
  margin: 20px auto 10px auto;
  padding: 14px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  font-size: 24px;
  line-height: 1.4;
}

.instructions h2{
  margin: 0 0 8px 0;
  font-size: 28px;
}

.instructions ol{
  margin: 0;
  padding-left: 22px;
}

.instructions li{
  margin: 6px 0;
}

.progress-wrap{
  width:min(720px, 92vw);
  margin: 0 auto 14px auto;
}

.progress-top{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-bottom:8px;
}

.progress-label{
  font-size:16px;
  font-weight:600;
}

.progress-pct{
  font-size:16px;
  font-weight:700;
}

.progress-bar{
  width:100%;
  height:12px;
  border-radius:999px;
  background:#e9eef0;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background: var(--blue);
  transition: width 180ms linear;
}

/* Results email form */
.result-form{
  max-width: 520px;
  margin: 0 auto;
}

.result-form-fields label{
  display:block;
  font-size:18px;
  font-weight:600;
  margin:12px 0 6px;
}

.result-form-fields input{
  width:100%;
  padding:12px 12px;
  font-size:18px;
  border:1px solid #e6e6e6;
  border-radius:10px;
  box-sizing:border-box;
}

.result-form-fields input:focus{
  outline:none;
  border-color: var(--blue);
}

.result-form-fields .consent{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:16px;
  cursor:pointer;
  font-weight:400;
}

.result-form-fields .consent input{
  width:auto;
  margin-top:4px;
}

.msg{
  margin-top:16px;
  padding:12px 12px;
  border-radius:10px;
  border:1px solid #e6e6e6;
  font-size:18px;
  line-height:1.35;
}

.msg.ok{
  background:#e7f7ec;
  border-color:#bfe8cc;
}

.msg.err{
  background:#fde8e8;
  border-color:#f1bcbc;
}

/* Make the action button match your existing style */
.result-actions button{
  border:none;
  border-radius:8px;
  padding:16px 28px;
  font-size:22px;
  font-weight:700;
  text-transform:uppercase;
  color:#fff;
  background:var(--green);
  cursor:pointer;
}

.result-actions button:disabled{
  opacity: 0.65;
  cursor: not-allowed;
}
.fixed-card{
  min-height:560px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

#formContent{
  width:100%;
}

.success-panel{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:22px;
  box-sizing:border-box;
}

.success-main{
  font-size:24px;
  font-weight:700;
  line-height:1.35;
}

.success-sub{
  margin-top:10px;
  font-size:22px;
  font-weight:400;
  line-height:1.4;
}