/* =========================================================================
   Sign-in / sign-up: one clean card (Google, e-mail), brand panel on wide screens
   ========================================================================= */
.auth { height: var(--app-h, 100dvh); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--bg); overflow: hidden; }
.auth-main { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.auth-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: calc(var(--s3) + var(--safe-top)) clamp(var(--s4), 4vw, var(--s6)) var(--s3); }
.auth-nav .brand-home { font-size: 16px; }
.auth-nav .tools { display: flex; align-items: center; gap: 2px; }
.auth-center { flex: 1; display: grid; place-items: center; padding: var(--s4) clamp(var(--s4), 4vw, var(--s6)); }
.auth-card { width: min(420px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); animation: rise .5s var(--ease) both; }
.auth-head { display: grid; justify-items: center; gap: var(--s3); text-align: center; }
.auth-head .k { width: 68px; height: 68px; border-radius: 20px; box-shadow: 0 0 0 1px var(--line), 0 14px 36px rgba(0, 0, 0, .25); }
.auth-head h1 { font-size: clamp(24px, 5vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.auth-head h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-head p { color: var(--muted); font-size: 15.5px; }
.auth-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); min-width: 0; }
.auth-form .field { margin-bottom: 0; }
.auth-form .btn.primary { min-height: 48px; font-size: 15.5px; }
.auth-error { color: var(--danger); font-size: 14px; min-height: 0; margin: 0; padding: 0; }
.auth-error:not(:empty) { padding: 10px 14px; border-radius: var(--r-md); background: var(--danger-soft); }
.auth-info { padding: 10px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; line-height: 1.6; }
.auth-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 4px 0; }
.auth-back:hover { color: var(--ink); }
.who { display: flex; align-items: center; gap: var(--s3); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.who .email { font-weight: 600; direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: start; }
.switch-line { text-align: center; color: var(--muted); font-size: 14.5px; }
.legal { text-align: center; color: var(--faint); font-size: 12.5px; line-height: 1.6; }

/* Google button: rendered by Google Identity Services into this box (official look, localized "Continue with Google") */
.google-box { display: grid; justify-items: center; min-height: 44px; min-width: 0; overflow: hidden; }
.google-box > div { width: 100%; display: flex; justify-content: center; }
.google-box iframe { color-scheme: normal; }
.google-fallback { display: none; }

.auth-foot { display: grid; justify-items: center; gap: var(--s3); padding: var(--s4) var(--s4) calc(var(--s4) + var(--safe-bottom)); color: var(--faint); font-size: 12.5px; }
.auth-foot .channels-row { justify-content: center; }
.auth-foot a { color: inherit; }
.auth-about { max-width: 46ch; margin: 0; text-align: center; line-height: 1.6; color: var(--muted); }
/* what a visitor without JavaScript (or a crawler that does not run it) reads on the home page */
.public-intro { max-width: 720px; margin: 0 auto; padding: 32px 16px; line-height: 1.7; font-family: system-ui, sans-serif; }
.public-intro h1 { font-size: 28px; margin: 0 0 12px; }
.public-intro p { margin: 0 0 12px; }
.public-intro ul { padding-inline-start: 20px; }

/* brand panel */
.auth-art { position: relative; overflow: hidden; background: #050A1E; color: #EAF0FF; display: grid; align-content: end; padding: clamp(var(--s5), 5vw, 56px); isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/static/brand/khalilak-ai-hero-1672.webp") center / cover no-repeat; opacity: .95; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 10, 30, .05) 0%, rgba(5, 10, 30, .38) 52%, rgba(5, 10, 30, .94) 100%); }
.auth-art h2 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.02em; max-width: 18ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.auth-art ul { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.auth-art li { padding: 7px 14px; border-radius: var(--r-full); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 500; }
.auth-art .by { margin-top: var(--s4); font-size: 13px; color: #A9B6E6; }

@media (max-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
}
@media (max-width: 480px) {
  .auth-center { align-items: start; padding-top: var(--s2); }
  .auth-head .k { width: 60px; height: 60px; border-radius: 18px; }
}

/* "I am at least N and I accept the Terms and the Privacy Policy" — the sign-up box and the one-time confirmation screen */
.check { display: flex; align-items: flex-start; gap: var(--s3); font-size: 14px; line-height: 1.55; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.check a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.consent-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: var(--s5) var(--s4); overflow-y: auto; background: var(--bg); }
.consent-gate[hidden] { display: none; }
.consent-card { width: min(520px, 100%); display: grid; gap: var(--s4); margin-block: auto; }
.consent-card h1 { margin: 0; font-size: 24px; }
.consent-card .hint { margin: 0; color: var(--muted); }
.consent-leave { border-top: 1px solid var(--line); padding-top: var(--s3); color: var(--muted); font-size: 14px; }
.consent-leave summary { cursor: pointer; }
.consent-leave .stack { display: grid; gap: var(--s3); margin-top: var(--s3); }

/* Privacy / Terms links: under the sign-in card and in the page footer */
.legal, .legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s4); }
/* clearly readable and recognisable as links (they were small, grey and undecorated): the same words Google and visitors look for */
.legal a, .legal-links a { color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:hover, .legal-links a:hover { text-decoration-thickness: 2px; }
.legal a:focus-visible, .legal-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

/* e-mail + password form: label row with "Forgot password?" at the far end, hint under the Google button */
.field-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.link-quiet { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-hint { text-align: center; color: var(--faint); font-size: 12.5px; margin: 0; }
.auth-card .divider { margin: var(--s2) 0; }
.auth-form .field input:hover { border-color: var(--line-strong); }
