body { min-height: 100svh; }
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - var(--ann-h)); }
.auth-form { display: flex; flex-direction: column; padding: 28px var(--gutter); }
.auth-form header { display: flex; justify-content: space-between; align-items: center; }
.auth-form header a.back { font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; transition: color var(--fast), transform var(--med) var(--ease); }
.auth-form header a.back:hover { color: var(--ink); transform: translateX(-3px); }
.auth-box { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth-box h1 { font-size: clamp(32px, 3.4vw, 44px); letter-spacing: -.04em; line-height: 1.02; margin: 18px 0 10px; font-weight: 600; }
.auth-box .sub { color: var(--ink-2); margin: 0 0 28px; }
.app-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; border-radius: 3px; background: var(--hook-soft); border: 1px solid #C9D2FF; font-size: 13px; font-weight: 500; animation: fadeUp 500ms var(--ease-out) both; }
.app-pill i { width: 20px; height: 20px; border-radius: 2px; background: var(--hook); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 11px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 22px; }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 3px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color var(--med); }
.seg button.on { color: var(--ink); }
.seg .knob { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 3px; background: #fff; box-shadow: var(--edge); transition: transform var(--med) var(--spring); }
.seg[data-mode="login"] .knob { transform: translateX(100%); }

.btn-google { width: 100%; --h: 54px; background: #fff; border: 1px solid var(--line-strong); color: var(--ink); box-shadow: var(--shadow-1); border-radius: 3px; }
.btn-google:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-google svg { width: 20px; height: 20px; transition: transform var(--med) var(--spring); }
.btn-google:hover svg { transform: rotate(-12deg) scale(1.1); }
#gsi-slot { display: flex; justify-content: center; }
#gsi-slot:empty { display: none; }

.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

form.manual { display: grid; gap: 12px; }
.collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--med) var(--ease), opacity var(--med); }
.collapse > div { overflow: hidden; }
.collapse.shut { grid-template-rows: 0fr; opacity: 0; margin-top: -12px; }
.pw { position: relative; }
.pw .eye { position: absolute; right: 8px; top: 9px; width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; color: var(--muted); transition: background var(--fast), color var(--fast); }
.pw .eye:hover { background: var(--surface-2); color: var(--ink); }
.pw input { padding-right: 52px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 2px 2px 0; }
.meter i { height: 3px; border-radius: 2px; background: var(--line-strong); transition: background var(--med); }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-s="3"] i:nth-child(-n+3) { background: #9BC53D; }
.meter[data-s="4"] i { background: var(--mint); }
.meter-txt { font-size: 12px; color: var(--muted); margin: 2px; min-height: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.row-between a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--fast); }
.row-between a:hover { text-decoration-color: var(--ink); }

.submit { width: 100%; --h: 54px; border-radius: 3px; margin-top: 6px; }
.submit .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin 700ms linear infinite; display: none; }
.submit.loading .spin { display: block; }
.submit.loading .lbl, .submit.done .lbl { display: none; }
.submit .ok { display: none; }
.submit.done { background: var(--mint); }
.submit.done .ok { display: block; animation: pop 400ms var(--spring); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0); } }
.terms { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; text-align: center; }
.terms a { text-decoration: underline; text-underline-offset: 2px; }

/* left: cobalt showcase (the form sits on the right) */
.auth-show { order: -1; }
.auth-show { position: relative; margin: 12px; border-radius: var(--r-xl); background: var(--blue); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px; isolation: isolate; }
.auth-show::before { content: none; }
.stack { position: absolute; left: 50%; top: 44%; width: 220px; transform: translate(-50%, -50%); aspect-ratio: 9/16; }
.stack .clip { position: absolute; inset: 0; transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out), filter 700ms; }
.stack .clip[data-p="0"] { transform: none; z-index: 3; }
.stack .clip[data-p="1"] { transform: translateX(46%) scale(.86) rotate(6deg); z-index: 2; opacity: .55; filter: blur(1px); }
.stack .clip[data-p="2"] { transform: translateX(-46%) scale(.86) rotate(-6deg); z-index: 2; opacity: .55; filter: blur(1px); }
.stack .clip[data-p="3"] { transform: translateY(30%) scale(.7); opacity: 0; z-index: 1; }
.ticker { position: absolute; top: 28px; left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: center; }
.ticker .chip { background: #fff; color: var(--ink); border-color: #fff; }
.ticker b { font-family: var(--mono); color: var(--yellow); font-weight: 500; }
.quote { position: relative; max-width: 440px; }
.quote p { font-size: 22px; letter-spacing: -.02em; line-height: 1.3; margin: 0 0 16px; font-weight: 500; }
.quote p .serif { background: var(--yellow); color: var(--ink); padding: 0 .1em; font-size: 1.1em; }
.quote small { color: rgba(255,255,255,.7); font-size: 13.5px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-show { display: none; }
}

/* google demo dialog */
dialog { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-3); max-width: 380px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(10,10,11,.45); backdrop-filter: blur(4px); }
dialog[open] { animation: dlg 320ms var(--spring); }
@keyframes dlg { from { transform: scale(.92) translateY(10px); opacity: 0; } }
.dlg { padding: 26px; }
.dlg h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.dlg p { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }
.dlg code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 3px; }
.acct-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 3px; border: 1px solid var(--line); text-align: left; transition: background var(--fast), border-color var(--fast); margin-bottom: 14px; }
.acct-pick:hover { background: var(--bg); border-color: var(--ink); }
.acct-pick .av { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; }
.acct-pick small { display: block; color: var(--muted); font-size: 12.5px; }
.app-pill[hidden] { display: none; }
