/* Maher sign-in: builds on the guide's own styles (css/maher.css); only what the sign-in screens add. */
.gate-noscript { justify-content: center; }
.screen--gate .h2 { margin-top: 4px; }
.screen--gate .lede { margin-bottom: 22px; }
.screen--gate .nav { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; padding: 14px 0 calc(env(safe-area-inset-bottom) + 4px);
  background: linear-gradient(180deg, rgba(247,245,249,0), var(--page) 14px); }
.gate-badge { margin-bottom: 12px; }
.gate-badge-icon { position: relative; display: grid; place-items: center; color: var(--purple); padding-top: 4px; }
.gate-badge-icon svg { width: 30px; height: 30px; }

.gate-field { margin-bottom: 14px; }
.gate-input-wrap { position: relative; }
.screen--gate .name-input { font-size: 18px; }
.gate-input-wrap .name-input[type="password"], .gate-input-wrap .name-input#gate-new, .gate-input-wrap .name-input#gate-new2, .gate-input-wrap .name-input#gate-password { padding-inline-end: 58px; }
.gate-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: none; color: var(--grey); }
.gate-eye svg { width: 22px; height: 22px; }
.gate-eye[aria-pressed="true"] { color: var(--purple); }
.gate-code { font: 600 28px/1 var(--sans) !important; letter-spacing: .45em; text-align: center; }
.gate-hidden { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

.gate-alert { margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: #FDECEC; color: #8A1C1C; font-size: 15px; line-height: 1.45; border: 1px solid #F3C6C6; }
.gate-note { min-height: 22px; margin: 0 2px 8px; color: var(--violet); font-size: 15px; font-weight: 500; }
.gate-help { margin: 4px 2px 0; color: var(--grey); font-size: 14px; text-align: center; }
.gate-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; padding: 10px 14px; border-radius: 12px; background: var(--lilac); color: var(--purple); }
.gate-who-email { font-weight: 600; word-break: break-all; }
.gate-link { margin-inline-start: auto; min-height: 36px; padding: 4px 10px; border: 0; background: none; color: var(--purple); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Password rules: each line ticks as it is met */
.gate-rules { list-style: none; margin: 4px 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--lilac); display: grid; gap: 6px; }
.gate-rule { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--grey); }
.gate-rule svg { width: 18px; height: 18px; flex: none; color: var(--lavender); }
.gate-rule.is-ok { color: var(--purple); }
.gate-rule.is-ok svg { color: #1F8A4C; }
.gate-meter { display: flex; align-items: center; gap: 10px; margin: -4px 2px 10px; min-height: 20px; }
.gate-meter-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--lilac); overflow: hidden; }
.gate-meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #C0392B; transition: width .2s, background-color .2s; }
.gate-meter[data-score="1"] .gate-meter-fill { background: #D9822B; }
.gate-meter[data-score="2"] .gate-meter-fill { background: #C9A400; }
.gate-meter[data-score="3"] .gate-meter-fill, .gate-meter[data-score="4"] .gate-meter-fill { background: #1F8A4C; }
.gate-meter-label { font-size: 13px; font-weight: 600; color: var(--grey); min-width: 9ch; text-align: end; }
/* busy: spinner from maher.css (D-2026-11-14-B) */
[lang="ar"] .gate-rule, [lang="ar"] .gate-alert, [lang="ar"] .gate-note { font-size: 16px; }

/* Dark appearance */
:root[data-theme="dark"] .screen--gate .nav { background: linear-gradient(180deg, rgba(20,10,28,0), var(--page) 14px); }
:root[data-theme="dark"] .gate-badge-icon, :root[data-theme="dark"] .gate-who, :root[data-theme="dark"] .gate-link, :root[data-theme="dark"] .gate-rule.is-ok { color: var(--ink); }
:root[data-theme="dark"] .gate-badge-icon { color: #3C1053; }
:root[data-theme="dark"] .gate-rules { background: var(--surface); border-color: var(--lilac); }
:root[data-theme="dark"] .gate-rule.is-ok svg { color: #5FD08E; }
:root[data-theme="dark"] .gate-alert { background: #3A1518; color: #FFD3D3; border-color: #6B2A2F; }
:root[data-theme="dark"] .gate-eye { color: var(--grey); }
:root[data-theme="dark"] .gate-help, :root[data-theme="dark"] .gate-meter-label { color: var(--grey); }

.gate-privacy { display: block; margin: 2px auto 0; font-size: 14px; }
.gate-privacy-list { margin: 0 0 6px; }
.gate-privacy-list dt { font-weight: 700; color: var(--purple); margin-top: 10px; }
.gate-privacy-list dd { margin: 2px 0 0; color: var(--grey); font-size: 15px; line-height: 1.5; }
:root[data-theme="dark"] .gate-privacy-list dt { color: var(--ink); }

/* 8 Nov: greeting after the code, by the name Talent Acquisition entered */
.gate-hello { margin: 0 0 4px; font-size: 1.35rem; font-weight: 600; color: var(--purple, #3C1053); }
:root[data-theme="dark"] .gate-hello { color: #FFCB28; }

/* D-2026-11-14-B: the Meem Key turns a quarter into place as the guide opens, then its yellow centre glows. */
.gate-unlock { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--hero, #3C1053); color: #fff; animation: gu-in .18s ease-out both; }
.gate-unlock-key { width: 112px; height: 112px; }
.gate-unlock-key svg { width: 100%; height: 100%; overflow: visible; transform-origin: 57% 38%; animation: gu-turn .7s cubic-bezier(.34,1.56,.64,1) .12s both; }
.gate-unlock-key svg path:nth-child(2) { transform-box: fill-box; transform-origin: center; animation: gu-glow .5s ease-out .6s both; }
.gate-unlock-text { margin: 0; font-weight: 500; font-size: 15px; color: var(--lavender, #B5ABBD); animation: gu-in .3s ease-out .3s both; }
@keyframes gu-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gu-turn { from { transform: rotate(-90deg) scale(.86); opacity: .4; } to { transform: rotate(0deg) scale(1); opacity: 1; } }   /* the key turns a quarter and lands upright: the final frame is the logo itself */
@keyframes gu-glow { 0% { transform: scale(1); } 50% { transform: scale(1.35); filter: drop-shadow(0 0 8px #FFCB28); } 100% { transform: scale(1); } }

/* D-2026-11-14-B: one-time code as six boxes (the real field sits on top, transparent). */
.gate-code-wrap { position: relative; }
.gate-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.gate-cell { height: 60px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--lilac); background: var(--surface, #fff);
  font: 600 26px/1 var(--sans); color: var(--ink, #3C1053); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.gate-cell.is-active { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(140,91,166,.18); }
.gate-cell.is-filled { border-color: var(--violet); }
.gate-cell b { font: inherit; animation: gc-drop .22s cubic-bezier(.34,1.56,.64,1) both; }
.gate-code-wrap.is-complete .gate-cell { border-color: #A87C00; background: var(--cream, #FFF1C9); animation: gc-wave .36s ease-out both; }
.gate-code-wrap.is-complete .gate-cell:nth-child(2) { animation-delay: 50ms; } .gate-code-wrap.is-complete .gate-cell:nth-child(3) { animation-delay: 100ms; }
.gate-code-wrap.is-complete .gate-cell:nth-child(4) { animation-delay: 150ms; } .gate-code-wrap.is-complete .gate-cell:nth-child(5) { animation-delay: 200ms; }
.gate-code-wrap.is-complete .gate-cell:nth-child(6) { animation-delay: 250ms; }
.gate-code-wrap .gate-code { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none !important;
  color: transparent; caret-color: transparent; -webkit-text-fill-color: transparent; letter-spacing: 0; font-size: 16px !important; }
.gate-code-wrap .gate-code::selection { background: transparent; }
.gate-code-wrap.is-shake .gate-cells { animation: gc-shake .32s ease-in-out; }
@keyframes gc-drop { from { transform: translateY(-10px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gc-wave { 50% { transform: translateY(-4px); } }
@keyframes gc-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 340px) { .gate-cells { gap: 6px; } .gate-cell { height: 52px; font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .gate-cell, .gate-cell b, .gate-cells, .gate-code-wrap .gate-cell { animation: none !important; } }

/* Typing on a phone (owner, 16 Nov 2026): the keyboard leaves little room, so the pinned buttons unpin
   and the field being typed into always has space above the keyboard. */
:root.kb-open .screen--gate .nav { position: static; background: none; padding-top: 8px; }
:root.kb-open .screen--gate .spacer { display: none; }
.screen--gate .name-input, .screen--gate .gate-code-wrap { scroll-margin-block: 96px; }
.gate-code-wrap { scroll-margin-bottom: 120px; }
/* 21 Nov 2026 (owner, D-2026-11-21-A): the language button is a full 44px touch target. */
.lang { min-height: 44px; min-width: 44px; }
.gate-privacy { min-height: 44px; }
