/* Ganga Happy Secondary School – Student Registration Form (registration.aspx) */
:root{
  --m1:#7b1523; --m2:#94202f; --m3:#4a0c15; --gold:#c8974e; --gold2:#e8c98a; --ink:#2b0a10; --text:#6f4b51; --line:#eadfce; --bg:#f7f1e8;
  --s1a:#94202f; --s1b:#5e0f1a; --s1soft:#fbeef0;
  --s2a:#1f9d63; --s2b:#13784a; --s2soft:#eaf7f0;
  --s3a:#c9974a; --s3b:#8a5f1c; --s3soft:#fbf3e4;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:Poppins,system-ui,sans-serif;font-size:15px;color:var(--ink);background:var(--bg)}
a{color:inherit}
img{max-width:100%;display:block}
button,input,select{font:inherit}

.rg-app{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:100vh}

/* ---------- sidebar ---------- */
.rg-side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;color:#fff;
  background:radial-gradient(circle at 0 0,rgba(232,201,138,.18),transparent 40%),radial-gradient(rgba(255,255,255,.07) 1px,transparent 1.4px) 0 0/16px 16px,linear-gradient(180deg,#8d1d2c,#5a0e19 70%,#3f0911)}
.rg-side-in{flex:1;overflow-y:auto;padding:28px 24px 20px;display:flex;flex-direction:column;align-items:center;text-align:center}
.rg-logo{width:150px;height:150px;padding:14px;border-radius:26px;background:#fff;box-shadow:0 0 0 6px rgba(255,255,255,.1),0 20px 40px -18px rgba(0,0,0,.6);transition:transform .3s}
.rg-logo:hover{transform:rotate(-3deg) scale(1.03)}
.rg-logo img{width:100%;height:100%;object-fit:contain}
.rg-school{font-family:Poppins,sans-serif;font-size:20px;font-weight:800;line-height:1.25;margin:18px 0 4px}
.rg-school-sub{margin:0;font-size:13px;letter-spacing:1.4px;color:var(--gold2)}
.rg-pill{display:inline-flex;align-items:center;gap:7px;margin:14px 0 20px;padding:7px 16px;border-radius:50px;font-size:13px;font-weight:700;color:#3a0d14;background:linear-gradient(135deg,#ffe2a8,#e8c98a);box-shadow:0 10px 20px -10px rgba(0,0,0,.5)}
.rg-card{width:100%;margin-bottom:12px;padding:14px 16px;border-radius:16px;text-align:left;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14)}
.rg-note{display:flex;gap:12px;align-items:flex-start}
.rg-note p{margin:0;font-size:13px;line-height:1.55}
.rg-note b{color:#ffd166}
.rg-note-ic{flex:0 0 24px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:13px;color:#3a0d14;background:#ffd166}
.rg-info{display:flex;gap:12px;align-items:center}
.rg-info-ic{flex:0 0 38px;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:16px;color:#3a0d14;background:linear-gradient(135deg,#ffe2a8,#e8c98a)}
.rg-info small{display:block;font-size:10.5px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:rgba(255,255,255,.65)}
.rg-info p{margin:2px 0 0;font-size:13.5px;line-height:1.45;font-weight:500}
.rg-info a{text-decoration:none}
.rg-info a:hover{color:#ffd166}
.rg-follow{margin:10px 0 10px;font-size:11.5px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:rgba(255,255,255,.7)}
.rg-social{display:flex;gap:10px}
.rg-social a{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:16px;text-decoration:none;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);transition:background .25s,transform .25s,color .25s}
.rg-social a:hover{background:#ffd166;color:#3a0d14;transform:translateY(-3px)}
.rg-copy{margin:0;padding:14px 20px;text-align:center;font-size:12.5px;color:rgba(255,255,255,.75);background:rgba(0,0,0,.2)}
.rg-copy b{color:var(--gold2)}
.rg-scrim{display:none}

/* ---------- main ---------- */
.rg-main{padding:22px 26px 34px;min-width:0}
.rg-top{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px 24px;border-radius:22px;color:#fff;
  background:radial-gradient(circle at 92% -20%,rgba(255,209,102,.35),transparent 38%),radial-gradient(circle at 70% 140%,rgba(238,90,124,.3),transparent 40%),linear-gradient(120deg,#5a0e19,#7b1523 45%,#a5762f);box-shadow:0 24px 48px -28px rgba(94,15,26,.9)}
.rg-top::after{content:"";position:absolute;right:-60px;top:-80px;width:260px;height:260px;border-radius:50%;border:34px solid rgba(255,255,255,.06);pointer-events:none}
.rg-top>*{position:relative;z-index:1}
.rg-top-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rg-menu{width:40px;height:40px;border-radius:12px;border:0;display:grid;place-items:center;font-size:22px;color:var(--m1);background:#fff;cursor:pointer}
.rg-back{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:50px;font-size:13px;font-weight:600;text-decoration:none;color:var(--m1);background:#fff;transition:transform .2s}
.rg-back:hover{transform:translateX(-2px)}
.rg-open{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:50px;font-size:11.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28)}
.rg-dot{width:8px;height:8px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 0 rgba(74,222,128,.7);animation:rg-pulse 1.8s infinite}
@keyframes rg-pulse{70%{box-shadow:0 0 0 8px rgba(74,222,128,0)}100%{box-shadow:0 0 0 0 rgba(74,222,128,0)}}
.rg-top h1{font-family:Poppins,sans-serif;font-size:30px;font-weight:800;margin:14px 0 4px;letter-spacing:-.3px}
.rg-top p{margin:0;font-size:14px;color:rgba(255,255,255,.88)}
.rg-top p b{color:#ffd166}
.rg-top-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.rg-step{display:flex;align-items:center;gap:10px;min-width:150px;padding:10px 12px;border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 12px 24px -16px rgba(0,0,0,.6)}
.rg-step-no{flex:0 0 32px;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-size:12.5px;font-weight:800;color:#fff;background:linear-gradient(140deg,var(--a),var(--b))}
.rg-step b{display:block;font-size:13px;line-height:1.2}
.rg-step small{display:block;font-size:12px;color:var(--text)}
.rg-step small span:first-child{font-weight:700;color:var(--b)}
.rg-step-bar{display:block;width:92px;height:4px;margin-top:5px;border-radius:4px;background:#f1e8db;overflow:hidden}
.rg-step-bar i{display:block;height:100%;width:0;border-radius:4px;background:linear-gradient(90deg,var(--a),var(--b));transition:width .35s}
.rg-s1{--a:var(--s1a);--b:var(--s1b)}.rg-s2{--a:var(--s2a);--b:var(--s2b)}.rg-s3{--a:var(--s3a);--b:var(--s3b)}
.rg-step.rg-done{box-shadow:0 0 0 2px var(--a),0 12px 24px -16px rgba(0,0,0,.6)}
.rg-ring{--p:0;width:70px;height:70px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#ffd166 calc(var(--p)*1%),rgba(255,255,255,.25) 0);transition:--p .4s}
.rg-ring>span{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;align-content:center;background:#fff;color:var(--m1)}
.rg-ring b{font-family:Poppins,sans-serif;font-size:16px;line-height:1}
.rg-ring small{font-size:8.5px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--text)}

/* ---------- sections ---------- */
.rg-form{margin-top:18px}
.rg-sec{position:relative;margin-bottom:18px;border-radius:20px;background:#fff;border:1px solid var(--line);border-top:4px solid var(--a);box-shadow:0 18px 36px -28px rgba(58,13,20,.5)}
.rg-sec1{--a:var(--s1a);--b:var(--s1b);--soft:var(--s1soft)}
.rg-sec2{--a:var(--s2a);--b:var(--s2b);--soft:var(--s2soft)}
.rg-sec3{--a:var(--s3a);--b:var(--s3b);--soft:var(--s3soft)}
.rg-sec-head{display:flex;align-items:center;gap:14px;padding:16px 20px;border-bottom:1px solid #f3ebdf;border-radius:16px 16px 0 0;background:linear-gradient(90deg,var(--soft),#fff 70%)}
.rg-sec-ic{flex:0 0 42px;width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-size:19px;color:#fff;background:linear-gradient(140deg,var(--a),var(--b));box-shadow:0 10px 18px -10px var(--a)}
.rg-sec-head h2{font-family:Poppins,sans-serif;font-size:17px;font-weight:800;margin:0}
.rg-sec-head p{margin:2px 0 0;font-size:13px;color:var(--text)}
.rg-sec-no{margin-left:auto;font-family:Poppins,sans-serif;font-size:26px;font-weight:800;color:color-mix(in srgb,var(--a) 22%,#fff)}
.rg-grid{display:grid;gap:18px 18px;padding:20px}
.rg-g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.rg-g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.rg-g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.rg-span2{grid-column:span 2}
.rg-two{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.rg-two .rg-sec{margin-bottom:0}

/* ---------- fields ---------- */
.rg-f label,.rg-label{display:block;margin-bottom:7px;font-size:13.5px;font-weight:600;color:var(--ink)}
.rg-f em{font-style:normal;color:#d0263b}
.rg-c{position:relative;display:flex;align-items:center;min-height:48px;border-radius:13px;background:color-mix(in srgb,var(--soft) 70%,#fff);border:1.5px solid color-mix(in srgb,var(--a) 18%,#eee);transition:border-color .2s,box-shadow .2s,background .2s}
.rg-c>i{flex:0 0 32px;width:32px;height:32px;margin-left:8px;border-radius:9px;display:grid;place-items:center;font-size:15px;color:var(--b);background:#fff}
.rg-c input,.rg-c select{flex:1;min-width:0;height:46px;padding:0 14px 0 10px;border:0;outline:0;background:transparent;color:var(--ink);font-size:14.5px}
.rg-c input::placeholder{color:#a9939a}
.rg-c select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:36px}
.rg-sel::after{content:"\F282";font-family:"bootstrap-icons";position:absolute;right:14px;pointer-events:none;font-size:13px;color:var(--b)}
.rg-c:focus-within{border-color:var(--a);background:#fff;box-shadow:0 0 0 4px color-mix(in srgb,var(--a) 14%,transparent)}
.rg-f.rg-ok-f .rg-c{border-color:color-mix(in srgb,#1f9d63 55%,#fff)}
.rg-f.rg-bad .rg-c,.rg-f.rg-bad .rg-seg{border-color:#d0263b;background:#fff6f6}
.rg-err{display:flex;gap:6px;align-items:flex-start;margin-top:6px;font-size:12.5px;line-height:1.4;color:#c2192f}
.rg-err:empty{display:none}

.rg-seg{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0;border-radius:13px;border:1.5px solid transparent}
.rg-seg label{margin:0;cursor:pointer}
.rg-seg input{position:absolute;opacity:0;pointer-events:none}
.rg-seg span{display:flex;align-items:center;justify-content:center;gap:5px;height:48px;border-radius:12px;font-size:14px;font-weight:600;color:var(--b);background:#fff;border:1.5px solid color-mix(in srgb,var(--a) 22%,#eee);transition:background .2s,color .2s,border-color .2s,transform .15s}
.rg-seg label:hover span{border-color:var(--a)}
.rg-seg input:checked+span{color:#fff;background:linear-gradient(140deg,var(--a),var(--b));border-color:transparent;box-shadow:0 10px 18px -10px var(--a)}
.rg-seg input:focus-visible+span{outline:3px solid var(--gold2);outline-offset:2px}

.rg-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- footer of form ---------- */
.rg-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-top:18px;padding:16px 20px;border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:0 18px 36px -28px rgba(58,13,20,.5)}
.rg-check{display:flex;align-items:flex-start;gap:12px;flex:1 1 380px;cursor:pointer;font-size:14px;line-height:1.5;color:var(--text)}
.rg-check input{position:absolute;opacity:0;pointer-events:none}
.rg-box{flex:0 0 22px;width:22px;height:22px;margin-top:1px;border-radius:7px;display:grid;place-items:center;border:2px solid #c9b6a0;background:#fff;color:transparent;font-size:15px;transition:all .2s}
.rg-check input:checked+.rg-box{color:#fff;border-color:var(--m1);background:var(--m1)}
.rg-check input:focus-visible+.rg-box{outline:3px solid var(--gold2);outline-offset:2px}
.rg-check.rg-bad .rg-box{border-color:#d0263b;box-shadow:0 0 0 4px rgba(208,38,59,.12)}
.rg-actions{display:flex;gap:12px;flex-wrap:wrap}
.rg-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 26px;border-radius:14px;font-size:15px;font-weight:700;text-decoration:none;cursor:pointer;transition:transform .2s,box-shadow .2s,filter .2s}
.rg-submit{border:0;color:#fff;background:linear-gradient(135deg,#94202f,#7b1523 55%,#a5762f);box-shadow:0 14px 26px -14px rgba(123,21,35,.9)}
.rg-submit:hover{transform:translateY(-2px);filter:brightness(1.07)}
.rg-submit:disabled{opacity:.7;cursor:wait;transform:none}
.rg-reset{color:var(--m1);background:#fff;border:2px solid #e9b25e}
.rg-reset:hover{background:#fff7ea}
.rg-spin{width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;animation:rg-spin .8s linear infinite}
@keyframes rg-spin{to{transform:rotate(360deg)}}
.rg-msg{margin-top:14px;padding:0;border-radius:14px;font-size:14.5px}
.rg-msg:empty{display:none}
.rg-msg.rg-m-ok{padding:12px 16px;color:#0f6b35;background:#e7f6ed;border:1px solid #bfe6cd}
.rg-msg.rg-m-err{padding:12px 16px;color:#a3132a;background:#fdecee;border:1px solid #f6c6cd}
.rg-msg.rg-m-info{padding:12px 16px;color:#7a5410;background:#fff4dc;border:1px solid #f2dca8}
.rg-small{display:flex;gap:8px;margin:14px 4px 0;font-size:12.5px;line-height:1.55;color:var(--text)}

/* ---------- success dialog ---------- */
.rg-ok{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(24,6,8,.6);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s}
.rg-ok.show{opacity:1;visibility:visible}
.rg-ok-box{width:100%;max-width:440px;padding:34px 28px 26px;border-radius:24px;background:#fff;text-align:center;box-shadow:0 40px 80px -30px rgba(0,0,0,.6);transform:translateY(16px) scale(.96);transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.rg-ok.show .rg-ok-box{transform:none}
.rg-ok-tick{display:block;width:86px;height:86px;margin:0 auto 16px;padding:12px;border-radius:50%;background:#e8f7ee}
.rg-ok-tick svg{width:100%;height:100%;fill:none;stroke:#16a34a;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.rg-ok-tick circle{stroke-dasharray:151;stroke-dashoffset:151}
.rg-ok-tick path{stroke-dasharray:36;stroke-dashoffset:36}
.rg-ok.show .rg-ok-tick circle{animation:rg-draw .6s ease-out forwards}
.rg-ok.show .rg-ok-tick path{animation:rg-draw .35s .5s ease-out forwards}
@keyframes rg-draw{to{stroke-dashoffset:0}}
.rg-ok h3{font-family:Poppins,sans-serif;font-size:22px;font-weight:800;color:#14532d;margin:0 0 10px}
.rg-ok-reg{display:inline-block;margin:0 0 10px;padding:8px 16px;border-radius:12px;font-family:Poppins,sans-serif;font-size:16px;font-weight:800;letter-spacing:.5px;color:var(--m1);background:#fbf1e4;border:1px dashed var(--gold)}
.rg-ok p{font-size:14.5px;line-height:1.6;color:#5b4a4d;margin:0 0 22px}
.rg-ok-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* ---------- responsive ---------- */
@media (max-width:1399px){
  .rg-top-right{width:100%;justify-content:flex-start}
}
@media (max-width:1199px){
  .rg-app{grid-template-columns:minmax(0,1fr)}
  .rg-side{position:fixed;z-index:900;left:0;top:0;bottom:0;width:300px;max-width:86vw;height:auto;transform:translateX(-102%);transition:transform .35s cubic-bezier(.2,.8,.2,1);box-shadow:20px 0 50px -20px rgba(0,0,0,.6)}
  .rg-app.rg-side-open .rg-side{transform:none}
  .rg-scrim{display:block;position:fixed;inset:0;z-index:899;background:rgba(24,6,8,.5);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}
  .rg-app.rg-side-open .rg-scrim{opacity:1;visibility:visible}
  .rg-g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rg-two{grid-template-columns:1fr}
  .rg-two .rg-sec{margin-bottom:0}
}
@media (min-width:1200px){.rg-menu{display:none}}
@media (max-width:767px){
  .rg-main{padding:12px 12px 26px}
  .rg-top{padding:16px;border-radius:18px}
  .rg-top h1{font-size:23px;margin-top:12px}
  .rg-top-right{gap:8px}
  .rg-step{flex:1 1 calc(50% - 8px);min-width:0;padding:8px 10px}
  .rg-step-bar{width:100%}
  .rg-ring{width:60px;height:60px}
  .rg-ring>span{width:48px;height:48px}
  .rg-g4,.rg-g3,.rg-g2{grid-template-columns:1fr}
  .rg-span2{grid-column:auto}
  .rg-grid{padding:16px;gap:14px}
  .rg-sec-head{padding:14px 16px}
  .rg-sec-no{font-size:22px}
  .rg-foot{padding:16px}
  .rg-actions{width:100%}
  .rg-actions .rg-btn{flex:1}
  .rg-open{font-size:10.5px;letter-spacing:1px}
}
@media (max-width:767px){
  .rg-top-right{flex-wrap:nowrap;gap:6px;align-items:stretch}
  .rg-step{flex:1 1 0;min-width:0;flex-direction:column;align-items:flex-start;gap:4px;padding:8px 9px}
  .rg-step-no{width:24px;height:24px;flex-basis:24px;border-radius:8px;font-size:11px}
  .rg-step b{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .rg-step>div{min-width:0;width:100%}
  .rg-step small{font-size:11px}
  .rg-ring{flex:0 0 58px;width:58px;height:58px;align-self:center}
  .rg-ring>span{width:46px;height:46px}
  .rg-ring b{font-size:14px}
  .rg-actions{flex-direction:column}
  .rg-actions .rg-btn{width:100%;white-space:nowrap}
}
@media (max-width:420px){.rg-seg span{font-size:13px}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.rg-ok-tick circle,.rg-ok-tick path{stroke-dashoffset:0}}

/* alignment polish */
.rg-span3{grid-column:1/-1}
@media (min-width:1200px){.rg-app{background:linear-gradient(90deg,#5a0e19 0,#5a0e19 320px,transparent 320px)}}
@media (max-width:767px){.rg-span3{grid-column:auto}}
@media (max-width:767px){.rg-long{display:none}.rg-step b{overflow:visible;text-overflow:clip}}
@media (max-width:380px){.rg-step{padding:7px 6px}.rg-step b{font-size:11px}.rg-step small{font-size:10.5px}.rg-ring{flex-basis:52px;width:52px;height:52px}.rg-ring>span{width:42px;height:42px}.rg-ring b{font-size:13px}.rg-sec-head p{font-size:12.5px}}

/* ================= Desktop: whole form on one screen, no page scrolling ================= */
@media (min-width:1200px){
  html,body{height:100%}
  .rg-app{height:100vh;min-height:0;overflow:hidden}
  .rg-main{height:100vh;display:flex;flex-direction:column;padding:12px 18px 12px;overflow:hidden}
  .rg-form{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;margin-top:10px}
  .rg-form>.rg-sec,.rg-two .rg-sec{margin:0}
  .rg-two{gap:10px}

  /* header: one compact row */
  .rg-top{flex:0 0 auto;flex-wrap:nowrap;padding:12px 18px;border-radius:18px;gap:16px}
  .rg-top-left{min-width:0}
  .rg-top-bar{gap:8px}
  .rg-back{padding:6px 12px;font-size:12.5px}
  .rg-open{padding:5px 12px;font-size:10.5px}
  .rg-top h1{font-size:23px;margin:7px 0 2px}
  .rg-top p{font-size:12.5px}
  .rg-top-right{width:auto;flex-wrap:nowrap;gap:8px;justify-content:flex-end}
  .rg-step{min-width:0;padding:8px 10px;gap:8px;border-radius:12px}
  .rg-step-no{width:28px;height:28px;flex-basis:28px;font-size:11.5px;border-radius:9px}
  .rg-step b{font-size:12px}
  .rg-step small{font-size:11px}
  .rg-step-bar{width:78px;margin-top:4px}
  .rg-ring{width:58px;height:58px;flex:0 0 58px}
  .rg-ring>span{width:46px;height:46px}
  .rg-ring b{font-size:14px}

  /* sections and fields */
  .rg-sec{border-radius:16px;border-top-width:3px}
  .rg-sec-head{padding:9px 16px;gap:12px;border-radius:13px 13px 0 0}
  .rg-sec-ic{width:34px;height:34px;flex-basis:34px;font-size:16px;border-radius:11px}
  .rg-sec-head h2{font-size:15px}
  .rg-sec-head p{font-size:12px;margin-top:0}
  .rg-sec-no{font-size:20px}
  .rg-grid{padding:12px 16px 14px;gap:10px 14px}
  .rg-f label,.rg-label{margin-bottom:4px;font-size:12.5px}
  .rg-c{min-height:40px;border-radius:11px}
  .rg-c>i{width:28px;height:28px;flex-basis:28px;margin-left:6px;font-size:13.5px;border-radius:8px}
  .rg-c input,.rg-c select{height:38px;font-size:14px;padding-left:9px}
  .rg-seg{gap:6px}
  .rg-seg span{height:40px;font-size:13.5px;border-radius:11px}
  .rg-err{margin-top:3px;font-size:11.5px}

  /* footer: declaration, buttons and privacy note in one bar */
  .rg-foot{margin-top:0;padding:10px 16px;border-radius:14px;gap:14px;flex-wrap:nowrap}
  .rg-check{font-size:13px;flex:1 1 auto}
  .rg-box{width:20px;height:20px;flex-basis:20px}
  .rg-btn{min-height:42px;padding:0 20px;font-size:14px;border-radius:12px}
  .rg-actions{flex-wrap:nowrap}
  .rg-msg{margin-top:0}
  .rg-msg:not(:empty){padding:8px 14px;font-size:13.5px}
  .rg-small{margin:0 4px;font-size:11.5px}

  /* sidebar fits the screen too */
  .rg-side{height:100vh}
  .rg-side-in{padding:20px 20px 12px;overflow:hidden}
  .rg-logo{width:120px;height:120px;padding:10px;border-radius:22px}
  .rg-school{font-size:18px;margin:12px 0 2px}
  .rg-school-sub{font-size:12px}
  .rg-pill{margin:10px 0 14px;padding:6px 14px;font-size:12.5px}
  .rg-card{padding:10px 12px;margin-bottom:9px;border-radius:14px}
  .rg-note p{font-size:12px}
  .rg-info-ic{width:34px;height:34px;flex-basis:34px;font-size:15px}
  .rg-info p{font-size:12.5px}
  .rg-follow{margin:6px 0 8px}
  .rg-social a{width:36px;height:36px;font-size:15px}
  .rg-copy{padding:10px 16px;font-size:11.5px}
}
/* shorter laptop screens (e.g. 1366 x 768) */
@media (min-width:1200px) and (max-height:820px){
  .rg-top{padding:10px 16px}
  .rg-top h1{font-size:21px;margin-top:5px}
  .rg-top p{display:none}
  .rg-grid{padding:10px 16px 12px;gap:8px 14px}
  .rg-sec-head{padding:7px 16px}
  .rg-sec-head p{display:none}
  .rg-small{display:none}
  .rg-side-in .rg-info:last-of-type{display:none}
  .rg-logo{width:100px;height:100px}
  .rg-note{display:none}
}
@media (min-width:1200px){
  .rg-main{justify-content:center}
  .rg-form{flex:0 1 auto}
  .rg-btn{white-space:nowrap}
}

/* ===== Desktop: full-screen form, validation messages never move the layout ===== */
@media (min-width:1200px){
  html,body{overflow:hidden}
  .rg-main{justify-content:flex-start;overflow-y:auto;overscroll-behavior:contain}
  .rg-form{flex:1 1 auto;min-height:0}
  .rg-sec1{flex:1.2 1 0;min-height:0;display:flex;flex-direction:column}
  .rg-two{flex:1 1 0;min-height:0}
  .rg-two .rg-sec{display:flex;flex-direction:column}
  .rg-sec1 .rg-grid,.rg-two .rg-grid{flex:1;align-content:space-evenly;row-gap:20px}
  .rg-f{position:relative}
  .rg-err{position:absolute;left:2px;right:0;top:100%;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
  .rg-foot{flex:0 0 auto}
  /* summary message as a small toast at the top instead of a line that pushes content */
  .rg-msg:not(:empty){position:fixed;z-index:950;top:16px;left:calc(320px + (100vw - 320px)/2);transform:translateX(-50%);max-width:min(640px,calc(100vw - 360px));box-shadow:0 18px 36px -16px rgba(58,13,20,.45);animation:rg-toast .35s cubic-bezier(.2,.8,.2,1)}
}
@media (min-width:1200px) and (max-height:820px){
  .rg-sec1 .rg-grid,.rg-two .rg-grid{row-gap:17px;padding-top:8px;padding-bottom:12px}
  .rg-c{min-height:37px}.rg-c input,.rg-c select{height:35px;font-size:13.5px}.rg-seg span{height:37px}
  .rg-f label,.rg-label{margin-bottom:3px;font-size:12px}
  .rg-form{gap:8px}.rg-two{gap:8px}
  .rg-btn{min-height:38px}
  .rg-foot{padding:8px 16px}
}
@keyframes rg-toast{from{opacity:0;transform:translate(-50%,-12px)}to{opacity:1;transform:translate(-50%,0)}}
/* narrow phones: every column may shrink to the screen width */
.rg-grid>*,.rg-two>*,.rg-form>*{min-width:0}
@media (max-width:767px){.rg-g4,.rg-g3,.rg-g2,.rg-two{grid-template-columns:minmax(0,1fr)!important}}
@media (max-width:420px){.rg-seg{gap:6px}.rg-seg span{gap:4px;padding:0 4px;font-size:12.5px}.rg-c input,.rg-c select{min-width:0}}
