/* The public pages in each design. Same form everywhere; each design places it differently. */
.gl { position: relative; min-height: max(100vh, 700px); overflow: hidden; color: var(--form-ink, var(--ink)); background: var(--ground); font-family: var(--form-font, var(--ui)); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.gl-main { position: absolute; z-index: 2; }
.gl-main a { color: inherit; }
.gl-main > * { animation: gl-rise .5s .3s both; }
@keyframes gl-rise { from { opacity: 0; transform: translateY(8px); } }
.login-client { position: absolute; z-index: 2; height: 50px; }
.claim { position: absolute; z-index: 2; margin: 0; font-weight: 600; color: var(--claim, var(--on-ground)); }

/* Shared form parts */
.gl h1 { margin: 0 0 24px; font-weight: 700; letter-spacing: -.012em; }
.field { display: block; margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.field input { display: block; width: 100%; height: 46px; margin-top: 6px; padding: 0 13px; font: 400 16px var(--form-font, var(--ui)); color: var(--ink); background: #fff; border: 1.5px solid var(--field-line); border-radius: 10px; box-sizing: border-box; }
.field input:focus { border-color: var(--link); outline: 3px solid color-mix(in srgb, var(--link) 20%, transparent); outline-offset: 0; }
.field input.invalid { border-color: var(--late); outline: none; }
.gl .validation-message { display: block; margin-top: 5px; font-size: 13.5px; font-weight: 500; color: var(--form-late, var(--late)); }
.gl .alert { margin: 0 0 16px; padding: 10px 13px; font-size: 14.5px; font-weight: 500; color: var(--form-late, var(--late)); background: color-mix(in srgb, var(--late) 8%, #fff); border: 0; border-radius: 8px; }
.gl-remember { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 14.5px; font-weight: 400; cursor: pointer; }
.gl-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.gl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 20px; font-size: 14.5px; }
.gl-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0 18px; font: 600 16px var(--form-font, var(--ui)); color: var(--primary-ink); text-decoration: none; background: var(--primary); border: 0; border-radius: 10px; cursor: pointer; transition: background .12s, opacity .12s; }
.gl-primary:hover { background: var(--primary-hover); }
.logging-in .gl-primary { opacity: .6; cursor: progress; }
.gl-main .gl-quiet { margin: 16px 0 0; font-size: 14px; color: var(--form-muted, var(--muted)); }
.gl-main a:hover { color: var(--form-ink, var(--ink)); }

/* The other public pages (two-factor, forgot password...) keep their own markup; this makes it match. */
.gl-main h1 { font-size: 30px; line-height: 1.15; }
.gl-main .gl-form h1 { font-size: inherit; }
.gl-main h2, .gl-main h3 { margin: 0 0 14px; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--form-muted, var(--muted)); }
.gl-main hr { display: none; }
.gl-main p:not([class]) { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--form-muted, var(--muted)); }
.gl-main .row { display: block; margin: 0; }
.gl-main [class*="col-"] { width: auto; max-width: none; padding: 0; }
.gl-main .form-floating { display: flex; flex-direction: column-reverse; margin-bottom: 16px; }
.gl-main .form-floating > label { position: static; height: auto; padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: inherit; opacity: 1; transform: none; border: 0; }
.gl-main .form-floating > .validation-message, .gl-main .form-floating > .text-danger { order: -1; }
.gl-main .form-floating > .form-control { height: 46px; min-height: 0; padding: 0 13px; font: 400 16px var(--form-font, var(--ui)); color: var(--ink); background: #fff; border: 1.5px solid var(--field-line); border-radius: 10px; }
.gl-main .form-floating > .form-control:focus { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 20%, transparent); }
.gl-main .form-floating > .form-control::placeholder { color: transparent; }
.gl-main .btn { width: 100%; height: 48px; padding: 0 18px; font: 600 16px var(--form-font, var(--ui)); color: var(--primary-ink); background: var(--primary); border: 0; border-radius: 10px; }
.gl-main .btn:hover { background: var(--primary-hover); }
.gl-main .btn.nav-link, .gl-main .btn-outline-secondary { display: none; }
.gl-main .checkbox { font-size: 14.5px; }
.gl-main .form-label { margin: 0; }
.gl-main .text-danger { color: var(--form-late, var(--late)) !important; font-size: 13.5px; }
.gl-main ul[role="alert"]:empty, .gl-main .validation-errors:empty { display: none; }
.gl-main .validation-errors { margin: 0 0 14px; padding: 0; list-style: none; }

/* ---------- Sheet: bars on the left, the form on the same white sheet the app uses */
.gl-sheet { --form-font: var(--ui); --logo-h: 40px; --logo-x: clamp(28px, 3.4vw, 52px); --ay: 54px; --ax: 0px; }
.gl-sheet .art .bars { top: 118px; bottom: 110px; left: 0; right: 0; --bar-h: 14px; }
.gl-sheet .claim { left: clamp(28px, 3.4vw, 52px); bottom: 34px; font-size: 24px; }
.gl-sheet .gl-main { top: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: clamp(420px, 41vw, 620px); padding: 32px; background: #fff; border-radius: 16px; box-sizing: border-box; }
.gl-sheet .gl-main > * { width: 100%; max-width: 372px; }
.gl-sheet .gl-main > .login-client { position: absolute; top: 24px; right: 28px; width: auto; height: 44px; max-width: none; animation: none; }
.gl-sheet .gl-form h1 { font-size: 34px; }

/* ---------- Beam: the ray from the C carries the form */
.gl-beam { --form-font: 'Figtree', system-ui, sans-serif; --display: 'Bricolage Grotesque', system-ui, sans-serif; --logo-h: clamp(62px, 5.9vw, 92px); --logo-x: clamp(28px, 4vw, 64px); --ax: calc(var(--logo-x) + var(--logo-h) * 1.66773); --ay: 50%; min-height: max(100vh, 760px); }
.gl-beam .art .ray { --fade-b: calc(100% - 490px); }
.gl-beam .login-client { top: 32px; left: var(--logo-x); height: 56px; }
.gl-beam .claim { left: var(--logo-x); bottom: 40px; width: 420px; font: 600 clamp(26px, 2.7vw, 38px)/1.08 var(--display); letter-spacing: -.012em; }
.gl-beam .gl-main { top: 50%; right: clamp(32px, 8.4vw, 150px); width: 380px; transform: translateY(-50%); }
.gl-beam h1, .gl-beam .gl-main h1 { font: 700 48px/1 var(--display); letter-spacing: -.02em; }
.gl-beam .field input, .gl-beam .gl-primary { border-radius: 8px; }
.gl-beam .field input { height: 50px; }
.gl-beam .gl-primary { height: 52px; font-size: 16.5px; }
.gl-beam .gl-remember { margin: 2px 0 22px; font-size: 15px; }
.gl-beam .gl-links { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0 0; font-size: 14px; color: var(--form-muted, var(--muted)); }

/* ---------- Note: a big logo, a faint ray and one line of fields */
.gl-note { --form-font: 'Instrument Sans', system-ui, sans-serif; --serif: 'EB Garamond', Georgia, serif; --logo-h: clamp(58px, 7.8vw, 116px); --logo-x: clamp(24px, 8.5vw, 136px); --logo-y: 29vh; --ax: calc(var(--logo-x) + var(--logo-h) * 1.66773); --ay: calc(var(--logo-y) + var(--logo-h) * .56873); min-height: max(100vh, 640px); background: var(--canvas); }
.gl-note .login-client { top: 34px; right: var(--logo-x); height: 44px; }
.gl-note .gl-main { left: var(--logo-x); right: var(--logo-x); top: calc(var(--logo-y) + var(--logo-h) + clamp(44px, 8vh, 80px)); }
.gl-note .gl-main > *:not(.gl-form) { max-width: 460px; }
.gl-note .gl-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; gap: 28px; }
.gl-note .gl-form h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.gl-note .gl-form .alert { grid-column: 1 / -1; margin: 0; }
.gl-note .field { margin: 0; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--muted); }
.gl-note .field input { height: 48px; margin: 0; padding: 0; font: 400 26px var(--serif); background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; }
.gl-note .field input:focus { outline: 0; border-bottom: 2.5px solid var(--link); }
.gl-note .gl-primary { width: auto; height: 52px; margin-top: 13px; padding: 0 44px; border-radius: 4px; font-weight: 500; }
.gl-note .gl-small { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: -6px 0 0; font-size: 14.5px; color: var(--muted); }
.gl-note .gl-main > * { animation-delay: .35s; }

/* ---------- Inbox: a fan of lines, the form on a plain card */
.gl-inbox { --form-font: 'Hanken Grotesk', system-ui, sans-serif; --logo-h: clamp(52px, 5vw, 76px); --logo-x: clamp(28px, 4vw, 64px); --ax: calc(var(--logo-x) + var(--logo-h) * 1.66773); --ay: 50%; display: grid; align-items: center; justify-items: end; padding: 32px clamp(32px, 8vw, 130px) 32px 32px; box-sizing: border-box; }
.gl-inbox .login-client { top: 30px; left: var(--logo-x); }
.gl-inbox .claim { left: var(--logo-x); bottom: 40px; font-size: 22px; }
.gl-inbox .gl-main { position: relative; width: 100%; max-width: 420px; padding: 34px 38px 30px; background: #fff; border-radius: 12px; box-sizing: border-box; }
.gl-inbox .gl-form h1 { margin-bottom: 20px; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.gl-inbox .field input { height: 44px; border-width: 1px; border-radius: 7px; }
.gl-inbox .gl-primary { height: 46px; border-radius: 8px; }

/* ---------- Focus: everything centered, the logo lights up */
.gl-focus { --form-font: 'Red Hat Text', system-ui, sans-serif; --form-ink: var(--on-ground); --form-muted: var(--on-ground-muted); --form-late: #FFB4A9; --logo-h: clamp(44px, 5vw, 62px); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: max(100vh, 680px); padding: 40px 24px; box-sizing: border-box; }
.gl-focus .art { position: static; overflow: visible; flex: none; height: var(--logo-h); margin-bottom: 44px; }
.gl-focus .art-logo { position: static; height: 100%; }
.gl-focus .login-client { top: 28px; right: 32px; height: 46px; }
.gl-focus .gl-main { position: static; width: 100%; max-width: 360px; }
.gl-focus .gl-main > * { animation-delay: .95s; animation-duration: .6s; }
.gl-focus .gl-form h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.gl-focus .field { font-weight: 500; }
.gl-focus .field input { border-width: 1px; border-radius: 8px; }
.gl-focus .field input:focus { outline: 3px solid color-mix(in srgb, var(--ray) 55%, transparent); }
.gl-focus .gl-primary { color: var(--cta-ground-ink); background: var(--cta-ground); border-radius: 8px; }
.gl-focus .gl-primary:hover { filter: brightness(1.07); background: var(--cta-ground); }
.gl-focus .gl-remember input { accent-color: var(--ray-deep); }
.gl-focus .gl-row { color: var(--on-ground-muted); }
.gl-focus .gl-quiet { text-align: center; }
.gl-focus .alert { background: color-mix(in srgb, var(--late) 24%, var(--ground)); }
.gl-focus .btn { color: var(--cta-ground-ink); background: var(--cta-ground); }

/* Light site colors: the ground is pale, so the darker client logo and dark text apply */
:is([data-palette="daylight"], [data-palette="tangerine"], [data-palette="raspberry"], [data-palette="violet"]) .gl-focus { --form-late: var(--late); }

/* ---------- The logo opens the look popup, and beacon.js places it under the logo */
.gl button.art-logo { display: block; padding: 0; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.gl button.art-logo:focus-visible { outline: 2px solid var(--ray); outline-offset: 4px; }
#look-pop { position: fixed; top: 12px; left: 12px; right: auto; z-index: 30; width: 292px; max-height: calc(100vh - 24px); padding: 6px 14px 14px; box-sizing: border-box; animation: none; }
#look-pop .look-reset[hidden] { display: none; }

/* ---------- Smaller screens */
@media (max-width: 900px) {
  .gl { min-height: 100vh; }
  .gl .claim { display: none; }
  .gl-sheet { padding-top: 180px; }
  .gl-sheet .art .bars { top: 76px; bottom: auto; height: 90px; --bar-h: 4px; }
  .gl-sheet { --logo-h: 34px; --logo-x: 20px; --ay: 40px; }
  .gl-sheet .gl-main { position: relative; top: auto; right: auto; bottom: auto; width: auto; margin: 0 8px 8px; min-height: calc(100vh - 188px); }
  .gl-beam, .gl-note { padding: 150px 20px 24px; box-sizing: border-box; }
  .gl-beam { --logo-h: 52px; --logo-x: 20px; --ay: 90px; }
  .gl-beam .login-client, .gl-note .login-client { top: 16px; right: 16px; left: auto; height: 38px; }
  .gl-beam .gl-main { position: relative; top: auto; right: auto; width: auto; transform: none; padding: 20px; background: #fff; border-radius: 12px; }
  .gl-beam h1, .gl-beam .gl-main h1 { font-size: 36px; }
  .gl-note { --logo-h: 52px; --logo-x: 20px; --logo-y: 70px; }
  .gl-note .gl-main { position: relative; left: auto; right: auto; top: auto; }
  .gl-note .gl-form { grid-template-columns: 1fr; gap: 18px; }
  .gl-note .gl-primary { width: 100%; margin: 0; }
  .gl-note .gl-small { margin: 0; }
  .gl-inbox { padding: 96px 12px 12px; align-items: start; justify-items: stretch; }
  .gl-inbox { --logo-h: 40px; --logo-x: 20px; --ay: 56px; }
  .gl-inbox .login-client { top: 12px; right: 16px; left: auto; height: 38px; }
  .gl-inbox .gl-main { max-width: none; padding: 26px 22px; }
  .gl-focus .login-client { top: 16px; right: 16px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .gl *, .gl *::before, .gl *::after { animation: none !important; transition: none !important; }
}
