/* Sign-in / start-trial screen. One frame, no scrolling: everything is sized in em and the
   root font-size follows the window height, so the whole page scales to fit. */
#auth {
    --nv: #1a1919; --nv2: #232222; --gd: #d9b96e; --gd2: #b7923d;
    font-size: clamp(11px, min(1.6vh, 1.2vw), 17px);
    position: relative; height: 100vh; height: 100dvh; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: 100%;
    background: radial-gradient(ellipse 50% 46% at 17% 30%, rgba(19, 19, 19, .78), rgba(19, 19, 19, .55) 55%, transparent 100%), linear-gradient(0deg, rgba(19, 19, 19, .75), transparent 17%), #1a1919 url(img/login-bg.webp) center / cover no-repeat;
    color: #212020;
}
#auth[hidden] { display: none }

/* ---------- left: navy story panel ---------- */
#auth .hero {
    position: relative; z-index: 1; grid-area: 1 / 1 / 2 / 3; min-width: 0; min-height: 0; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; text-align: left;
    padding: 3.2em 44% 2.6em 5em; background: none; color: #ffffff; isolation: isolate;
}
#auth .hero:before, #auth .hero:after { display: none }
#auth .hero > * { color: inherit }
#auth .brand { display: flex; align-items: center; gap: 1em; flex-direction: row; flex: none }
#auth .brand .logo { width: 3.8em; height: 3.8em; flex: none }
#auth .brand .lockup { display: block; width: 27em; max-width: 100%; height: auto }
#auth .brand b { display: block; font: 600 2.7em/1 'Prata', Georgia, serif; letter-spacing: .01em;
    background: linear-gradient(180deg, #f5e1b2, #d9b96e 70%, #c8a450); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent }
#auth .trk { display: flex !important; align-items: center; gap: .9em; margin-top: .55em; color: rgba(255, 255, 255, .85); font-size: 1.05em; letter-spacing: .32em; text-transform: none }
#auth .trk i { width: .35em; height: .35em; border-radius: 50%; background: var(--gd) }
#auth .hero h1 { margin: 2.2em 0 0; font: 300 3.2em/1.1 'Prata', Georgia, serif; color: #ffffff; max-width: 11em; text-shadow: none; flex: none }
#auth .hero h1:before { content: ""; display: block; width: 5.5em; height: 2px; margin-bottom: .7em; background: linear-gradient(90deg, var(--gd), rgba(217, 185, 110, .1)) }
#auth .hero h1 em { display: block; font-style: normal; font-weight: 700;
    background: linear-gradient(180deg, #f7e6bd, #d9b96e 60%, #b7923d); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent }
#auth .hero h1:after { display: none }
#auth .hero p { margin: 1.2em 0 0; max-width: 28em; font-size: 1.15em; line-height: 1.5; color: rgba(255, 255, 255, .88); flex: none }
#auth .feat { position: absolute; left: 5em; bottom: 2em; list-style: none; margin: 0; padding: 0; display: flex; align-items: center }
#auth .feat li { text-shadow: 0 1px 6px rgba(16, 16, 16, .9); display: flex; align-items: center; gap: .8em; padding: 0 2em; font-size: 1.15em; line-height: 1.2; text-align: left; color: #ffffff }
#auth .feat li:first-child { padding-left: 0 }
#auth .feat li + li { border-left: 1px solid rgba(217, 185, 110, .3) }
#auth .feat .fi { display: grid; place-items: center; width: 3.2em; height: 3.2em; border-radius: 50%; background: rgba(26, 25, 25, .75); box-shadow: 0 0 0 1px rgba(217, 185, 110, .45) }
#auth .feat svg { width: 1.7em; height: 1.7em; fill: none; stroke: var(--gd); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }

/* ---------- right: sign-in card ---------- */
#auth .formside { position: relative; z-index: 2; grid-area: 1 / 2; min-width: 0; min-height: 0; background: none; padding: 4.6em 3em 1.2em 0; display: flex; justify-content: center; align-items: center }
#auth .trust { position: absolute; top: 1.7em; right: 3em; margin: 0; padding: 0; list-style: none; display: flex; align-items: center; color: #272626; font-size: .95em }
#auth .trust li { display: flex; align-items: center; gap: .6em; padding: 0 1.3em; white-space: nowrap }
#auth .trust li:last-child { padding-right: 0 }
#auth .trust li + li { border-left: 1px solid #d9cfba }
#auth .trust svg { width: 1.9em; height: 1.9em; fill: none; stroke: #b7923d; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round }
#auth .formbox { width: min(100%, 31em); max-width: none; max-height: 100%; overflow: visible; padding: 1.7em 2.4em 1.4em; border-radius: 1.8em; background: #fefdf9; text-align: center;
    box-shadow: 0 2em 4em rgba(26, 25, 25, .16), 0 0 0 1px rgba(183, 146, 61, .55) }
#auth .formbox .logo.bl { width: 3.6em; height: 3.6em; margin: 0 auto; display: block }
#auth .formbox .cbn { margin: .2em 0 0; font: 700 2.1em/1.1 'Prata', Georgia, serif; color: #212020 }
#auth .tagl { display: flex; align-items: center; gap: .8em; margin: .55em 0 1.3em; font-size: 1.05em; color: #272626 }
#auth .tagl:before, #auth .tagl:after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #cbad68) }
#auth .tagl:after { background: linear-gradient(270deg, transparent, #cbad68) }
#auth .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: .3em; border-radius: 999px; background: #eeeae0; box-shadow: none; margin: 0 0 1.3em }
#auth .seg button { display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 3.1em; border: 0; border-radius: 999px; background: none; color: #272626; font: 600 1.05em/1 inherit; font-family: inherit; cursor: pointer }
#auth .seg button.on { background: linear-gradient(180deg, #383636, #252424); color: #ffffff; box-shadow: 0 .4em 1em rgba(37, 36, 36, .35) }
#auth .seg .ico, #auth .lf .ico { width: 1.5em; height: 1.5em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
#auth .seg button:not(.on) .ico { stroke: #c09530 }
#auth form { text-align: left }
#auth .formbox h2 { font: 700 1.9em/1.15 inherit; font-family: inherit; margin: 0 0 .25em; color: #212020; text-align: center }
#auth .formbox .sub { margin: 0 0 1.1em; text-align: center; font-size: 1.05em; color: #272626 }
#auth .formbox .m { color: #343333 }
#auth .lf { position: relative; display: flex; align-items: center; gap: .8em; height: 3.7em; padding: 0 1.3em; margin: 0 0 .9em; border: 1px solid #ddd6c6; border-radius: 999px; background: #fefdf9; color: #272626; font-weight: 400; font-size: 1em }
#auth .lf:focus-within { border-color: #b7923d; box-shadow: 0 0 0 .3em rgba(217, 185, 110, .28) }
#auth .lf input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; box-shadow: none; font-size: 1.2em; color: #212020; font-family: inherit }
#auth .pw-eye { border: 0; background: none; padding: .4em; margin-right: -.4em; cursor: pointer; color: #272626; display: grid }
#auth .pw-eye svg { width: 1.6em; height: 1.6em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
#auth .pw-eye .sl { display: block } #auth .pw-eye.on .sl { display: none }
#auth .frow { display: flex; justify-content: flex-end; margin: -.2em .4em .5em }
#auth .frow a { font-size: 1em; color: #272626; text-decoration: none }
#auth .frow a:hover { color: #8b6b21; text-decoration: underline }
#auth .err { margin: 0; min-height: 0; font-size: 1em; text-align: center } #auth .err:empty { display: none } #auth .err:not(:empty) { margin: .2em 0 .6em }
#auth #lb, #auth #fup .btn.gold { position: relative; inset: auto; width: 100%; height: 3.5em; min-height: 0; padding: 0; border-radius: 999px; font-size: 1.25em; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: .5em; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s;
    background: linear-gradient(180deg, #e8cb88, #c8a24b); color: #181307; box-shadow: 0 .5em 1.2em rgba(183, 146, 61, .4) }
#auth #lb:hover, #auth #fup .btn.gold:hover { transform: translateY(-1px) } #auth #lb:active, #auth #fup .btn.gold:active { transform: translateY(1px) }
#auth #lb:disabled, #auth #fup .btn.gold:disabled { opacity: .7; cursor: default }
#auth #lb svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }

/* sign-up form, compact enough to share the same frame */
#auth #fup h2 { font-size: 1.7em }
#auth #fup .sub { margin-bottom: .8em }
#auth #fup .fld { text-align: left; gap: .25em; margin-bottom: .6em; font-size: .95em; font-weight: 600; color: #272626 }
#auth #fup .two { gap: .8em; grid-template-columns: 1fr 1fr }
#auth #fup .two .fld { min-width: 0 }
#auth #fup .fld input { height: 2.7em; padding: 0 1.1em; border: 1px solid #ddd6c6; border-radius: 999px; background: #fefdf9; font-size: 1em; font-weight: 400; color: #212020; box-shadow: none }
#auth #fup .fld input:focus { outline: 0; border-color: #b7923d; box-shadow: 0 0 0 .25em rgba(217, 185, 110, .28) }
#auth #fup .legal { display: flex; gap: .6em; align-items: flex-start; margin: .1em 0 .5em; font-size: .95em; color: #272626 }
#auth #fup .legal a { color: #8b6b21 }
#auth #fup .btn.gold { margin-top: .3em }

#auth.up .formbox .logo.bl, #auth.up .formbox .cbn, #auth.up .tagl { display: none }
#auth.up .formbox { padding-top: 1.5em }
#auth.up .seg { margin-bottom: 1em }

/* footer row: support + TV display link */
#auth .tvgo { display: flex; flex-direction: column; align-items: center; gap: .55em; margin: 1.1em 0 0; padding: .9em 0 0; border-top: 1px solid #ebe5d7; font-size: .95em; color: #272626; text-align: center }
#auth .tvgo .help { display: flex; align-items: center; justify-content: center; gap: .6em; min-width: 0 }
#auth .tvgo svg { width: 1.5em; height: 1.5em; flex: none; fill: none; stroke: #272626; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
#auth #tvgo { display: inline-flex; align-items: center; gap: .5em; flex: none; width: auto; min-height: 0; padding: 0; border: 0; background: none; color: #8b6b21; font-weight: 600; text-decoration: none; white-space: nowrap }
#auth #tvgo:hover { text-decoration: underline }
#auth #tvgo svg { stroke: currentColor }
@media (prefers-reduced-motion: no-preference) { #auth .formbox { animation: rise .5s var(--ease) both } }

/* ---------- narrower laptops ---------- */
@media (max-width: 1180px) { #auth .trust li:nth-child(3) { display: none } }
@media (max-width: 1040px) { #auth .trust { display: none } #auth .formside { padding-top: 1.6em } }

/* ---------- phones and small tablets: same idea, stacked, still one frame ---------- */
@media (max-width: 900px) {
    #auth { font-size: clamp(11px, min(1.75vh, 3.1vw), 16px); display: flex; flex-direction: column; background: var(--nv) }
    #auth .hero { width: auto; flex: none; padding: calc(1.6em + env(safe-area-inset-top)) 1.6em 4.6em; background: linear-gradient(rgba(26, 25, 25,.3), rgba(26, 25, 25,.3)), url(img/login-bg.webp) 12% 20% / auto 640px no-repeat, var(--nv) }
    #auth .brand .logo { width: 3em; height: 3em } #auth .brand .lockup { width: 20em }
    #auth .hero h1 { display: block; margin-top: 1.1em; font-size: 2em; max-width: none }
    #auth .hero h1:before { margin-bottom: .5em; width: 4em }
    #auth .hero p, #auth .feat { display: none }
    #auth .formside { flex: 1; min-height: 0; display: flex; align-items: stretch; margin: -3.2em 0 0; padding: 0; background: none }
    #auth .trust { display: none }
    #auth .formbox { width: 100%; max-height: none; flex: 1; min-height: 0; overflow-y: auto; border-radius: 1.8em 1.8em 0 0; padding: 1.4em 1.4em calc(1em + env(safe-area-inset-bottom)); box-shadow: 0 -.8em 2.4em rgba(0, 0, 0, .3) }
    #auth .formbox .logo.bl, #auth .formbox .cbn, #auth .tagl { display: none }
    #auth .formbox h2 { font-size: 1.7em }
    #auth .tvgo { flex-wrap: wrap; justify-content: center; margin-top: .9em; padding-top: .8em; font-size: .9em }
}
@media (max-width: 900px) {
    #auth.up .hero h1 { display: none } #auth.up .hero { padding-bottom: 3.6em }
    #auth.up .formbox { padding-top: 1.1em } #auth.up .formbox h2 { font-size: 1.5em } #auth.up #fup .sub { margin-bottom: .6em }
    #auth.up .tvgo { margin-top: .6em; padding-top: .6em }
}
@media (max-width: 900px) and (max-height: 700px) { #auth .hero h1 { display: none } #auth .hero { padding-bottom: 4em } }
