/* SET3-03 / R25. Sign-in, sign-up and password pages of the public site (js/auth.js). Uses the shared tokens; every class is prefixed
   "pub-" and the page rules sit under .pub-auth, so the landing and package pages and the member and admin shells are not touched.
   Desktop first: 1440, then 1199 px and below (44 px touch targets), 1099 px and below (one column) and phones (699 px and below). */

/* ---------- test strip: the sample login-button scenario next to the sample viewer (sign-in page only) ---------- */
.pub-test-strip.has-social{flex-wrap:wrap;row-gap:6px}
.pub-test-strip.has-social>p{flex:1 1 300px}
.pub-test-strip select{min-width:0}
.pub-social-sample select{max-width:330px}

/* ---------- page frame: card and the MIE panel beside it ---------- */
.pub-auth-page{padding-top:28px}
.pub-auth{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,480px);gap:40px;align-items:stretch}
.pub-auth.is-wide{grid-template-columns:minmax(0,330px) minmax(0,1fr);gap:32px}
.pub-auth-card{order:2;position:relative;min-width:0;padding:32px 36px 28px;border:1px solid #11618a;border-radius:18px;
  background:linear-gradient(165deg,rgba(9,43,70,.97),rgba(3,22,39,.98));box-shadow:0 22px 60px rgba(0,8,20,.45),inset 0 1px 0 rgba(120,200,255,.06)}
.pub-auth-aside{order:1;position:relative;isolation:isolate;overflow:hidden;min-width:0;display:flex;flex-direction:column;border:1px solid #0b5f86;border-radius:18px;
  background:radial-gradient(ellipse at 70% 12%,rgba(120,200,255,.22),transparent 45%),radial-gradient(ellipse at 60% 100%,#0e5b4a 0%,transparent 55%),linear-gradient(180deg,#062b49,#03172a)}
.pub-auth-aside::before{content:"";position:absolute;inset:0;z-index:-2;opacity:.85;
  background:linear-gradient(90deg,#021426f0 0%,#02142699 48%,transparent 80%),url('../assets/visual/reference-stadium-strip.jpg') center 30%/cover no-repeat}
/* the player visual keeps its own proportions in a box at the bottom right of the panel */
.pub-auth-player{position:absolute;z-index:-1;right:-3%;bottom:0;width:50%;height:86%;object-fit:contain;object-position:50% 100%;opacity:.95;pointer-events:none}
.pub-auth-aside-copy{display:flex;flex-direction:column;flex:1;max-width:480px;padding:44px 40px 36px}
.pub-auth.is-wide .pub-auth-aside-copy{max-width:none;padding:34px 28px 30px}
.pub-auth-title{margin:0 0 16px;font-size:clamp(30px,2.8vw,42px);font-weight:800;line-height:1.1;letter-spacing:-1px;text-wrap:balance;text-shadow:0 2px 18px #00132b}
.pub-auth-title em{display:block;font-style:normal;color:#54e7f2}
.pub-auth.is-wide .pub-auth-title{font-size:32px}
.pub-auth-lead{margin:0 0 26px;color:#c4ddf5;font-size:15px;line-height:1.6}
.pub-auth-highlights{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.pub-auth-highlights li{display:flex;align-items:center;gap:14px}
.pub-auth-highlights .icon{box-sizing:content-box;width:22px;height:22px;padding:11px;border:1px solid #1b6c95;border-radius:50%;background:rgba(7,48,77,.85)}
.pub-auth-highlights span{display:flex;flex-direction:column;gap:3px;min-width:0}
.pub-auth-highlights b{font-size:15px}
.pub-auth-highlights small{font-size:13px;color:var(--muted)}
.pub-auth-quote{margin:auto 0 0;padding-top:28px;font-size:16px;font-style:italic;line-height:1.55;color:#d7e9fb}
.pub-auth-quote p{margin:0}
.pub-auth-quote::after{content:"";display:block;width:40px;height:3px;margin:12px 0 0;background:var(--cyan)}

/* ---------- card head, state icon ---------- */
.pub-auth-head{text-align:center;margin:0 0 22px}
.pub-auth.is-wide .pub-auth-head{text-align:left;margin-bottom:18px}
.pub-auth-emblem{display:block;width:64px;height:64px;margin:0 auto 12px;object-fit:contain}
.pub-auth-head h1{margin:0 0 8px;font-size:28px;line-height:1.2}
.pub-auth-sub{margin:0;color:#b9d8f5;font-size:15px;line-height:1.55}
.pub-auth-sub b{color:#6fe9f3;font-weight:650;overflow-wrap:anywhere}
.pub-auth-icon{display:flex;align-items:center;justify-content:center;width:84px;height:84px;margin:0 auto 16px;border:2px solid var(--line);border-radius:50%;background:rgba(4,30,50,.9)}
.pub-auth-icon .icon,.pub-auth-icon .mie-tone-icon{width:40px;height:40px}
.pub-auth-icon.is-info{border-color:#1d8fd8;box-shadow:0 0 24px rgba(0,140,255,.25)}
.pub-auth-icon.is-success{border-color:var(--success);box-shadow:0 0 24px rgba(0,214,170,.22)}
.pub-auth-icon.is-error{border-color:var(--error);box-shadow:0 0 24px rgba(255,79,112,.22)}
.pub-auth-account{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:-6px 0 18px;font-size:14px;color:var(--muted)}
.pub-auth-account .icon{width:16px;height:16px}
.pub-auth-account b{color:#dcecfb;overflow-wrap:anywhere}

/* ---------- form fields ---------- */
.pub-form{display:grid;gap:16px}
.pub-form.is-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
.pub-form.is-grid>:not(.pub-field){grid-column:1/-1}
.pub-alert-slot:empty,.pub-summary-slot:empty{display:none}
.pub-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.pub-field-label{font-size:14px;font-weight:600;color:#dcecfb}
.pub-input{position:relative;display:flex;align-items:center}
.pub-input input,.pub-input select{width:100%;min-width:0;height:50px;padding:0 14px;border:1px solid #1a5f86;border-radius:10px;background:#041b2e;color:var(--text);font-size:15px}
.pub-input.has-icon input{padding-left:46px}
.pub-input.has-reveal input{padding-right:104px}
.pub-input .pub-input-icon{position:absolute;left:14px;width:20px;height:20px;pointer-events:none}
.pub-input input:hover,.pub-input select:hover{border-color:#2584b8}
.pub-input input:focus,.pub-input select:focus{border-color:var(--cyan);box-shadow:0 0 0 1px #007d9d}
.pub-field.is-invalid input{border-color:var(--error);background:#1a1426}
.pub-reveal{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#bfe3ff;font-size:13px;font-weight:600}
.pub-reveal:hover{background:#0a3150}
.pub-reveal .icon{width:18px;height:18px}
.pub-reveal.is-on{color:var(--cyan)}
.pub-hint{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.pub-field-error{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:13px;line-height:1.5;color:#ffa3b5}
.pub-field-error .mie-tone-icon{width:16px;height:16px;margin-top:2px}
.pub-form-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px}
.pub-check{display:inline-flex;align-items:flex-start;gap:10px;min-height:32px;padding:2px 0;font-size:14px;line-height:1.55;cursor:pointer}
.pub-check input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:#0a84ff}
.pub-check.is-invalid input{outline:2px solid var(--error);outline-offset:2px}
.pub-check-field{display:flex;flex-direction:column;gap:2px}
.pub-check-field .pub-field-error{padding-left:30px}
.pub-req{display:inline-block;margin-left:4px;padding:0 8px;border:1px solid var(--line);border-radius:999px;font-size:12px;line-height:1.6;color:var(--muted);white-space:nowrap;vertical-align:1px}
.pub-check:not(.is-optional) .pub-req{border-color:#1d6fb8;color:#9fd2ff}
.pub .text-link.is-inline{display:inline;min-height:0;padding:0;font-size:inherit;text-decoration:underline;text-underline-offset:3px}
.pub-submit{width:100%;min-height:50px;justify-content:center;font-size:16px}
.pub-auth .btn{min-height:46px;padding:10px 20px;font-size:14px}
.pub-auth .btn.pub-submit{min-height:50px;font-size:16px}

/* ---------- invalid credentials, error summary ---------- */
.pub-alert{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid rgba(255,79,112,.65);border-radius:10px;background:rgba(80,14,34,.45);color:#ffd6de;font-size:14px;line-height:1.5}
.pub-alert .mie-tone-icon{width:20px;height:20px;margin-top:1px}
.pub-error-summary{padding:14px 16px;border:1px solid rgba(255,79,112,.7);border-left:4px solid var(--error);border-radius:10px;background:rgba(80,14,34,.4);outline:none}
.pub-error-summary:focus{box-shadow:0 0 0 2px var(--cyan)}
.pub-error-title{display:flex;align-items:center;gap:10px;margin:0 0 6px;font-size:15px;font-weight:700}
.pub-error-title .mie-tone-icon{width:20px;height:20px}
.pub-error-summary ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
/* the mark before a line keeps its width in both states, so a fixed line does not move */
.pub-err-mark{display:inline-block;box-sizing:content-box;width:8px;height:8px;margin:0 9px 1px 3px;border-radius:50%;background:var(--error);vertical-align:middle}
.pub-error-summary li.is-fixed .pub-err-mark{width:9px;height:5px;margin:0 8px 4px 1px;border-radius:0;background:none;border-left:2px solid var(--success);border-bottom:2px solid var(--success);transform:rotate(-45deg)}
.pub-error-summary li.is-fixed .pub-error-link{color:#9fb6c9;text-decoration:line-through}
.pub-error-summary li.is-fixed .pub-error-link b{color:#b9cadb}
.pub-error-summary.is-done{border-color:rgba(0,214,170,.55);border-left-color:var(--success);background:rgba(4,48,44,.4)}
.pub-error-link{padding:4px 0;border:0;background:none;color:#ffc6d1;font-size:14px;line-height:1.5;text-align:left;text-decoration:underline;text-underline-offset:3px}
.pub-error-link b{color:#fff}
.pub-error-link:hover{color:#fff}

/* ---------- password strength and rules ---------- */
.pub-pass-help{display:grid;gap:10px;padding:14px 16px;border:1px solid var(--line-soft);border-radius:12px;background:rgba(3,24,42,.6)}
.pub-strength{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.pub-strength-bars{display:grid;grid-template-columns:repeat(4,44px);gap:6px}
.pub-strength-bars i{height:6px;border-radius:3px;background:#17405d}
.pub-strength.is-1 .on{background:var(--error)}
.pub-strength.is-2 .on{background:var(--warning)}
.pub-strength.is-3 .on{background:#2fa8ff}
.pub-strength.is-4 .on{background:var(--success)}
.pub-strength-text{font-size:13px;font-weight:600;color:#cfe5fa}
.pub-rules{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:6px 14px}
.pub-rules li{display:flex;align-items:center;gap:8px;min-width:0;font-size:13px;line-height:1.45;color:var(--muted)}
.pub-rules li.is-met{color:#c2f5e6}
.pub-rules .mie-tone-icon{width:16px;height:16px}
.pub-rules .pub-dash{width:10px;margin:0 3px}

/* ---------- social buttons ---------- */
.pub-divider{display:flex;align-items:center;gap:14px;margin:22px 0 14px;color:var(--muted);font-size:13px}
.pub-divider::before,.pub-divider::after{content:"";flex:1;height:1px;background:var(--line)}
.pub-social{display:grid;gap:10px}
.pub-auth .btn.pub-social-btn{width:100%;min-height:48px;border-color:#1a5f86;background:#041b2e;font-size:15px}
.pub-auth .btn.pub-social-btn:hover{border-color:var(--cyan);background:#0a3150}
.pub-social-note{margin:10px 0 0;font-size:13px;line-height:1.55;color:#bfe3ff}
.pub-social-note:empty{margin:0}
.pub-switch{margin:20px 0 0;text-align:center;color:#b9d8f5;font-size:14px}

/* ---------- sign-up steps ---------- */
.pub-stepper{list-style:none;margin:0 0 22px;padding:18px 10px 14px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line-soft);border-radius:14px;background:rgba(3,24,42,.55)}
.pub-stepper li{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-size:14px;color:var(--muted)}
.pub-stepper li+li::before{content:"";position:absolute;top:19px;left:calc(-50% + 28px);right:calc(50% + 28px);height:2px;border-radius:2px;background:#1a4d6e}
.pub-stepper li.is-done+li::before{background:linear-gradient(90deg,var(--cyan),#0a84ff)}
.pub-step-dot{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:2px solid #2a6d96;border-radius:50%;background:#041b2e;font-size:16px;font-weight:700;color:#cfe5fa}
.pub-stepper li.is-current{color:#fff;font-weight:650}
.pub-stepper li.is-current .pub-step-dot{border-color:#35a8ff;background:var(--button-primary);color:#fff;box-shadow:0 0 18px rgba(0,120,255,.45)}
.pub-stepper li.is-done{color:#bfe3ff}
.pub-stepper li.is-done .pub-step-dot{border-color:var(--cyan)}
.pub-stepper li.is-done .pub-step-dot::after{content:"";width:13px;height:7px;margin-top:-4px;border-left:3px solid var(--cyan);border-bottom:3px solid var(--cyan);transform:rotate(-45deg)}
.pub-step-title{margin:0;font-size:20px}
.pub-fieldset{margin:0;padding:16px 18px 18px;display:grid;gap:14px;min-width:0;border:1px solid var(--line-soft);border-radius:14px;background:rgba(3,24,42,.45)}
.pub-fieldset>legend{padding:0 8px;font-size:16px;font-weight:700}
.pub-optional{font-size:13px;font-weight:400;color:var(--muted)}
.pub-subset{margin:0;padding:0;min-width:0;border:0}
.pub-subset>legend{margin:0 0 8px;padding:0;font-size:14px;font-weight:600;color:#dcecfb}
.pub-chips{display:flex;flex-wrap:wrap;gap:8px}
.pub-chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:6px 14px;border:1px solid var(--line);border-radius:999px;background:#041b2e;font-size:14px;cursor:pointer}
.pub-radios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pub-radio{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:#041b2e;font-size:14px;line-height:1.4;cursor:pointer}
.pub-chip input,.pub-radio input{flex:none;width:18px;height:18px;margin:0;accent-color:#0a84ff}
.pub-chip:has(input:checked),.pub-radio:has(input:checked){border-color:var(--cyan);background:#07304d}
.pub-auth-page .pub-note.pub-auth-sample{margin:0}
.pub-auth-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:4px}
.pub-auth-actions .btn.pub-submit{width:auto;min-width:220px}
.pub-auth-actions.is-stack{flex-direction:column;align-items:stretch;margin-top:20px}
.pub-auth-actions.is-stack .btn{width:100%;justify-content:center;min-height:48px}
.pub-auth-actions.is-center{justify-content:center}
.pub-auth-actions.is-end{justify-content:flex-end}
.pub-form>.pub-switch{margin:0;text-align:right}
.pub-auth-actions.is-center .btn{min-width:220px;min-height:50px;font-size:15px}
.pub-auth-result{margin:4px 0 18px;text-align:center}
.pub-auth-result h2{margin:0 0 6px;font-size:26px}
.pub-auth-result p{margin:0;color:#b9d8f5;font-size:15px}
.pub-done-list{list-style:none;margin:0 auto 22px;padding:14px 18px;max-width:640px;display:grid;gap:10px;border:1px solid var(--line-soft);border-radius:12px;background:rgba(3,24,42,.55)}
.pub-done-list li{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.pub-done-list .icon,.pub-done-list .mie-tone-icon{width:18px;height:18px;margin-top:1px}

/* ---------- notes and the test box ---------- */
.pub-auth-page .pub-note{margin:18px 0 0}
.pub-auth-back{margin:14px 0 0;text-align:center}
.pub-auth-hint{margin:14px 0 0;text-align:center;font-size:13px;color:var(--muted)}
.pub-auth-test{margin:22px 0 0;padding:12px 14px;border:1px dashed #1d5b80;border-radius:10px;background:#021526;font-size:13px;line-height:1.55;color:var(--muted)}
.pub-auth-test p{margin:0 0 6px}
.pub-auth-test b{color:#dcecfb;font-weight:650;overflow-wrap:anywhere}
.pub-auth-test-title{display:flex;align-items:center;gap:8px}
.pub-auth-test-title .icon{width:16px;height:16px}
.pub-auth-test .text-link{margin-right:18px}
.pub-auth .btn.pub-fill{min-height:40px;margin-top:4px;padding:8px 14px;font-size:13px}

/* ---------- tablet and small laptop ---------- */
@media(max-width:1199px){
  .pub-test-strip.has-social>p{flex-basis:100%}
  .pub-auth{gap:28px}
  .pub-input input,.pub-input select{height:52px}
  .pub-reveal{min-height:44px}
  .pub-check,.pub-chip{min-height:44px}
  .pub-check{align-items:center}
  .pub-check input{margin-top:0}
  .pub-error-link{min-height:44px}
  .pub-auth .btn.pub-fill{min-height:44px}
  .pub-social-sample select{min-height:44px}
}
@media(max-width:1099px){
  .pub-auth,.pub-auth.is-wide{grid-template-columns:minmax(0,1fr);max-width:600px;margin:0 auto}
  .pub-auth.is-wide{max-width:780px}
  .pub-auth-card,.pub-auth-aside{order:0}
  .pub-auth-player{display:none}
  .pub-auth-aside-copy,.pub-auth.is-wide .pub-auth-aside-copy{max-width:none;padding:24px 24px 22px}
  .pub-auth-title,.pub-auth.is-wide .pub-auth-title{font-size:26px}
  .pub-auth-title em{display:inline}
  .pub-auth-highlights{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pub-auth-quote{margin-top:0;padding-top:22px}
}

/* ---------- phone ---------- */
@media(max-width:699px){
  .pub-test-strip.has-social{flex-wrap:nowrap}   /* one column: every select as wide as the strip (a wrapping column would size to the longest option) */
  .pub-test-strip.has-social>p{flex:none}
  .pub-test-strip.has-social .pub-viewer{flex-direction:column;align-items:stretch;gap:4px}
  .pub-social-sample select{max-width:none}
  .pub-auth-page{padding-top:16px}
  .pub-auth{gap:20px}
  .pub-auth-card{padding:24px 16px 20px;border-radius:14px}
  .pub-auth-head h1{font-size:24px}
  .pub-auth-emblem{width:52px;height:52px}
  .pub-auth-icon{width:72px;height:72px}
  .pub-auth-icon .icon,.pub-auth-icon .mie-tone-icon{width:34px;height:34px}
  .pub-form.is-grid{grid-template-columns:minmax(0,1fr)}
  .pub-radios{grid-template-columns:minmax(0,1fr)}
  .pub-fieldset{padding:14px 12px 14px}
  .pub-auth-actions{flex-direction:column;align-items:stretch}
  .pub-auth-actions .btn,.pub-auth-actions .btn.pub-submit{width:100%;min-width:0;justify-content:center}
  .pub-auth-actions.is-center .btn{min-width:0}
  .pub-form>.pub-switch{text-align:center}
  .pub-stepper{padding:14px 4px 12px}
  .pub-step-dot{width:34px;height:34px;font-size:14px}
  .pub-stepper li+li::before{top:16px;left:calc(-50% + 24px);right:calc(50% + 24px)}
  .pub-step-label{font-size:12px}
  .pub-strength-bars{grid-template-columns:repeat(4,34px)}
  .pub-rules{grid-template-columns:minmax(0,1fr)}
  .pub-auth-aside-copy,.pub-auth.is-wide .pub-auth-aside-copy{padding:20px 16px}
  .pub-auth-title,.pub-auth.is-wide .pub-auth-title{font-size:23px}
  .pub-auth-highlights{grid-template-columns:minmax(0,1fr)}
  .pub-auth-result h2{font-size:22px}
}
