/*
 * MAGICPAGE (2026-10-27): the sign-in link pages (/auth/magic*).
 * Ported from Product's prototype Portal_Email_Magic_Link_IT_rev_2026-10-27.html
 * (sha256 6de2c105...ef6a7): both <style> blocks, in order, minus the
 * prototype-only Scenarios drawer (.scenario / .scn-*). The embedded photo is
 * public/img/auth/magic/soap-photo.jpg. Lane additions are at the end.
 */
/* --- prototype block 1 --- */
:root{--lime:#36C73D;--lime-dk:#1F8C25;--lime-hi:#7FE085;--lime-soft:#E8F8E9;--marine:#003C71;--night:#002B53;--teal:#0A5C82;--ink:#1F2A36;--slate:#5B6168;--line:#DCE4EA;--line-soft:#EEF2F5;--err:#C4321F;--err-soft:#FDEEEB;--fb:'Urbanist',system-ui,sans-serif;--fd:'Montserrat',system-ui,sans-serif;--ease:cubic-bezier(.22,.61,.36,1)}
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{font-family:var(--fb);color:var(--ink);background:#fff;-webkit-font-smoothing:antialiased}
a{color:var(--teal)}a:hover{color:var(--lime-dk)}
.shell{min-height:100%;display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr)}.shell>.brand{order:2}
.brand{position:relative;background:var(--marine);background-image:linear-gradient(165deg,#0A5C82 0%,var(--marine) 48%,var(--night) 100%);color:#fff;padding:44px 56px;display:flex;flex-direction:column;justify-content:space-between;gap:40px;overflow:hidden}
.brand .logo{width:150px;height:39px;fill:#fff;display:block}
.brand .eyebrow{font-weight:700;font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:var(--lime-hi)}
.brand h1{font-family:var(--fd);font-weight:800;font-size:clamp(32px,3.4vw,46px);line-height:1.04;letter-spacing:-.02em;margin-top:16px;text-wrap:balance}
.brand h1 em{color:var(--lime-hi)}
.brand p.lead{margin-top:20px;font-size:17px;line-height:1.6;color:rgba(220,233,243,.9);max-width:420px;text-wrap:pretty}
.brand .foot{font-size:13px;color:rgba(214,231,243,.72)}
.brand .foot b{color:var(--lime-hi);font-weight:700}
.main{display:flex;flex-direction:column;padding:28px 40px}
.main .top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:14px;color:var(--slate);gap:12px 24px}.main .mlogo{width:220px;height:57px;fill:var(--lime);display:block}.brand>div{margin-top:auto}.brand .foot{margin-top:auto}
.stage{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 0}
.panel{width:100%;max-width:420px}
.view{display:none}.view.on{display:block;animation:in .4s var(--ease)}
@keyframes in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.badge{display:inline-flex;align-items:center;gap:8px;background:var(--lime-soft);color:var(--lime-dk);font-weight:800;font-size:11px;letter-spacing:.14em;text-transform:uppercase;padding:7px 12px;border-radius:999px}
.badge svg{width:13px;height:13px}
.badge.warn{background:var(--err-soft);color:var(--err)}
h2{font-family:var(--fd);font-weight:800;font-size:30px;line-height:1.1;letter-spacing:-.015em;color:var(--marine);margin-top:16px;text-wrap:balance}
.sub{font-size:16px;line-height:1.6;color:var(--slate);margin-top:12px;text-wrap:pretty}
.sub strong{color:var(--ink);font-weight:700;word-break:break-word}
form{margin-top:28px;display:flex;flex-direction:column;gap:18px}
label.lbl{display:block;font-weight:700;font-size:14px;color:var(--ink);margin-bottom:8px}
.field{width:100%;height:54px;border:1.5px solid var(--line);border-radius:12px;padding:0 16px;font:500 16px var(--fb);color:var(--ink);background:#fff;transition:border-color .2s,box-shadow .2s}
.field:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 4px rgba(10,92,130,.12)}
.field.bad{border-color:var(--err);box-shadow:0 0 0 4px rgba(196,50,31,.1)}
.msg{display:none;align-items:flex-start;gap:8px;margin-top:9px;font-size:14px;color:var(--err);font-weight:600}
.msg.on{display:flex}
.msg svg{width:16px;height:16px;flex:none;margin-top:1px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;height:54px;border:0;border-radius:999px;background:var(--lime);color:#fff;font:800 14.5px var(--fb);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;box-shadow:0 10px 24px rgba(54,199,61,.3);transition:background .2s,transform .2s,box-shadow .2s}
.btn:hover{background:#41DA48;transform:translateY(-1px)}
.btn:disabled{cursor:default;transform:none;opacity:.85}
.btn svg{width:17px;height:17px}
.btn .spin{display:none;width:18px;height:18px;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:sp .8s linear infinite}
.btn.loading .spin{display:block}.btn.loading .tx,.btn.loading svg{display:none}
@keyframes sp{to{transform:rotate(360deg)}}
.btn.ghost{background:#fff;color:var(--teal);box-shadow:inset 0 0 0 1.5px var(--line)}
.btn.ghost:hover{box-shadow:inset 0 0 0 1.5px var(--teal);background:#fff}
.hint{font-size:14px;line-height:1.55;color:var(--slate)}
.hint svg{width:15px;height:15px;vertical-align:-2px;margin-right:4px;color:var(--lime-dk)}
.code{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.code input{width:100%;height:62px;border:1.5px solid var(--line);border-radius:12px;text-align:center;font:800 26px var(--fd);color:var(--marine);background:#fff;transition:border-color .2s,box-shadow .2s}
.code input:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 4px rgba(10,92,130,.12)}
.code.bad input{border-color:var(--err)}
.code .gap{display:none}
.row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px;font-size:14px;color:var(--slate)}
.link{background:none;border:0;padding:0;font:700 14px var(--fb);color:var(--teal);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.link:hover{color:var(--lime-dk)}
.link:disabled{color:var(--slate);text-decoration:none;cursor:default}
.tips{margin-top:28px;padding-top:22px;border-top:1px solid var(--line-soft)}
.tips h3{font-weight:700;font-size:14px;color:var(--ink)}
.tips ul{margin:10px 0 0 18px;display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.5;color:var(--slate)}
.done{text-align:center}
.done .ok{width:64px;height:64px;border-radius:50%;background:var(--lime);color:#fff;display:grid;place-items:center;margin:0 auto;box-shadow:0 12px 28px rgba(54,199,61,.35)}
.done .ok svg{width:30px;height:30px}
.done .bar{height:5px;border-radius:9px;background:var(--line-soft);margin:28px auto 0;max-width:260px;overflow:hidden}
.done .bar i{display:block;height:100%;width:0;background:var(--lime);border-radius:9px}
.done.on .bar i{animation:fill 2.4s var(--ease) forwards}
@keyframes fill{to{width:100%}}
.legal{text-align:center;font-size:12.5px;line-height:1.6;color:var(--slate)}
.legal a{color:var(--slate)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (max-width:900px){.shell{grid-template-columns:minmax(0,1fr)}.shell>.brand{order:0}.brand{padding:28px 24px 30px;gap:22px}.brand .logo{width:124px;height:32px}.brand h1{font-size:28px;margin-top:10px}.brand p.lead{font-size:15.5px;margin-top:12px}.brand .foot{display:none}.main{padding:20px 24px}.main .top{display:flex}.main .top .help{display:none}.main .mlogo{width:170px;height:44px}.stage{padding:16px 0 32px;align-items:flex-start}h2{font-size:26px}}
@media (max-width:420px){.code{gap:7px}.code input{height:54px;font-size:22px}}
/* --- prototype block 2 --- */
:root{--pg:#F0F0F0;--btn-blue:#0E6189}
body{font-family:var(--fb);background:var(--pg)}
.shell{grid-template-columns:minmax(440px,576fr) minmax(0,1344fr)}
.main{order:1;background:var(--pg);padding:0 clamp(28px,5vw,96px);justify-content:center}
.main .top{display:none}
.stage{flex:none;display:block;padding:0}
.panel{max-width:384px}
.ctw-stack{display:block;width:156px;height:auto;margin:0 0 44px;margin-left:-4px}
.brand{order:2;background:#3a3a3a url('../../img/auth/magic/soap-photo.jpg') center/cover no-repeat;justify-content:center;align-items:center;text-align:center;padding:60px 48px}
.brand::before{content:none}
.brand>*{position:relative}
.brand .copy{max-width:680px}.brand .eyebrow{font-size:13px;letter-spacing:.22em;color:#fff;margin-bottom:18px}.brand h1 em{font-style:normal;color:#fff}.brand p.lead{max-width:540px;margin:24px auto 0;font-size:19px;color:rgba(255,255,255,.92)}.brand .foot{position:static;margin-top:32px;font-size:14px;color:rgba(255,255,255,.78)}.brand .copy{margin:auto 0}.brand .foot b{color:#46B649}@media (max-width:900px){.brand .foot{display:block;margin-top:28px}}
.brand h1{font-family:var(--fb);font-weight:800;font-size:clamp(34px,3.2vw,50px);line-height:1;letter-spacing:.01em;text-transform:uppercase;color:#46B649;margin:0}
.brand p{font-size:17px;line-height:1.45;color:#fff;margin-top:22px;text-wrap:pretty}
.brand p+p{margin-top:24px}
.badge{display:none}
h2{font-family:var(--fb);font-weight:800;font-size:24px;line-height:1.2;letter-spacing:-.01em;color:#1B1B1B;margin-top:0}
.sub{font-size:14.5px;line-height:1.5;color:#555;margin-top:10px}
.sub a{font-weight:700;color:#0E7FA5;text-decoration:none}.sub a:hover{color:var(--lime-dk)}
form{margin-top:36px;gap:16px}
label.lbl{font-weight:500;font-size:14.5px;color:#1B1B1B;margin-bottom:10px}
.field{height:36px;border:1px solid #D4D4D4;border-radius:4px;padding:0 12px;font-size:15px}
.field:focus{border-color:#0E7FA5;box-shadow:0 0 0 3px rgba(14,127,165,.15)}
.btn{height:36px;border-radius:4px;box-shadow:none;font:700 14.5px var(--fb);letter-spacing:0;text-transform:none;background:#36C73D}
.btn:hover{background:#2FB536;transform:none}
.btn svg{display:none}
.btn.blue{background:var(--btn-blue)}.btn.blue:hover{background:#0A5274}
.btn .spin{width:15px;height:15px;border-width:2px}
.code{gap:8px}
.code input{height:48px;border:1px solid #D4D4D4;border-radius:4px;font:800 22px var(--fb);color:#1B1B1B}
.code input:focus{border-color:#0E7FA5;box-shadow:0 0 0 3px rgba(14,127,165,.15)}
.hint{font-size:13.5px;color:#555}.hint svg{color:#36C73D}
.row{font-size:14px;color:#555}
.link{font-weight:700;color:#36C73D;text-decoration:none}.link:hover{color:var(--lime-dk);text-decoration:underline}
.tips{margin-top:26px;padding-top:20px;border-top:1px solid #E2E2E2}
.tips h3{font-weight:700;font-size:14px;color:#1B1B1B}.tips ul{font-size:13.5px;color:#555}
.done{text-align:left}.done-head{display:flex;align-items:center;gap:14px}.done-head h2{margin:0}.done .ok{margin:0;flex:none;width:44px;height:44px;box-shadow:none}.done .ok svg{width:24px;height:24px}.done .bar{margin:24px 0 0;max-width:none;background:#E2E2E2}
.msg{font-size:13.5px}
.divider{height:1px;background:#E2E2E2;margin:8px 0}
.legal{display:none}
a.btn{text-decoration:none}a.btn:hover{color:#fff}
[hidden]{display:none!important}
@media (max-width:900px){.shell{grid-template-columns:minmax(0,1fr)}.main{order:1;padding:48px 24px 56px}.brand{order:2;padding:0;min-height:260px}.brand h1{font-size:32px}.brand p{font-size:15.5px}.panel{max-width:none}.ctw-stack{width:128px;margin-bottom:32px}}
/* --- lane additions (MAGICPAGE): served markup the prototype did with script --- */
.sub.flush{margin-top:0}
/* A message from the server, above the form (the prototype's error style). */
.msg.alert{margin-top:20px;margin-bottom:-12px}
/* The error screens' actions: the prototype's <form style="margin-top:28px"> + row margin. */
.actions{margin-top:28px;display:flex;flex-direction:column;gap:16px}
.actions .row{margin-top:2px}
/* The one real code input. Without JavaScript it is the field; magic.js hides
   it (.sr) and shows six boxes that write into it. */
.field.code-single{letter-spacing:.5em;font-weight:700}
.field.code-single.sr{position:absolute;width:1px;height:1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
.msg .link{font-size:13.5px}
form[hidden]{display:none}
