/* Atlan sign-in pages ("gate"): login and its code, the lockout, registration and its code, and password reset.
   They look like the app's sign-in screen (owner 2026-11-13): the app's picture on the rail at the left, a 420 px column
   at the right. Ported from the website prototype (docs/redesign/website/site.css, "gate"); its container queries are
   media queries here. Fields, buttons, messages and PL / EN come from base.css. */

/* ---------- the frame: the picture, then the column ---------- */
.gate { position: relative; display: grid; grid-template-columns: 46% minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.gart { position: relative; overflow: hidden; background: var(--rail); }
.gart::after { content: ""; position: absolute; inset: 0; box-shadow: inset -1px 0 0 var(--line); pointer-events: none; }
.gart .brand { position: absolute; z-index: 1; left: max(32px, env(safe-area-inset-left, 0px)); top: 26px; }
/* The art is the app's own sign-in picture: the glitched mark on the rail, sized and placed as the app's gate places it,
   whole at any window. The shape's body sits 4% left of the picture's middle, so the picture moves right by that much.
   Only above 900 px, so a phone never downloads it. */
@media (min-width: 901px) {
  .gart::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(105%, 105vh); aspect-ratio: 1; transform: translate(-46%, -50%); background: url("../img/glitch.webp?v=20261113-b") 50% 50% / contain no-repeat; }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .gart::before { animation: glitchin .9s var(--ease-out) both; }
}
@keyframes glitchin { from { opacity: 0; transform: translate(-46%, -48%) scale(.97); } }

.gmain { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 100vh; min-height: 100svh; }
.gtop { display: flex; align-items: center; justify-content: flex-end; gap: 20px; height: var(--hd); padding: 0 max(32px, env(safe-area-inset-right, 0px)) 0 32px; }
.gcol { display: grid; justify-items: center; align-content: start; min-width: 0; padding: clamp(32px, calc(50vh - 340px), 120px) 32px 56px; }
.gbox { display: grid; gap: 14px; width: min(100%, 420px); }

/* ---------- the column ---------- */
.gbox h1 { margin: 0 0 2px -2px; font-weight: 900; font-stretch: 125%; font-size: 32px; line-height: 1.04; letter-spacing: -.012em; color: var(--signal); text-shadow: 0 0 30px rgba(255, 10, 60, .24); text-wrap: balance; overflow-wrap: break-word; }
.gbox .lead { font-size: 15px; line-height: 1.55; color: var(--rose); text-wrap: pretty; }
.gbox .lead b { font-weight: 650; color: var(--blush); overflow-wrap: anywhere; }
.gbox .when { font-size: 13.5px; color: var(--dust); }
/* server messages sit in the column's own rhythm */
.gbox .flashes { padding: 0; }
.gbox .form { margin-top: 10px; }
.gbox > .btn { margin-top: 10px; }
.gbox .stack { display: grid; gap: 10px; margin-top: 2px; }
/* a blocked account's notice brings where to ask: Discord and the contact page */
.gbox .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Django's password rules come as a list */
.gbox .help ul { display: grid; gap: 3px; }
/* Google above an "or" rule (prototype site.css): the rule's two hairlines. The Google button itself is in base.css,
   since the Account page's "Connect Google" uses it too. */
.or { display: flex; align-items: center; gap: 12px; color: var(--dust); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.swap { text-align: center; font-size: 14px; color: var(--dust); }
/* the wait after too many attempts: the user must wait, so it is white */
.note { padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--white); font-size: 15px; line-height: 1.5; color: var(--white); }

/* ---------- the legal line under the column ---------- */
.gfoot { display: flex; align-items: flex-end; justify-content: center; padding: 0 32px 28px; }
.gfoot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.gfoot a, .gfoot button { font-size: 13px; color: var(--dust); transition: color .12s; }
.gfoot a:hover, .gfoot button:hover { color: var(--white); }

/* ---------- 900 px and below: the picture goes (the logo already names the page); its rail becomes a bar ---------- */
@media (max-width: 900px) {
  .gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .gart { height: calc(68px + env(safe-area-inset-top, 0px)); }
  .gart::after { box-shadow: inset 0 -1px 0 var(--line); }
  .gart .brand { left: max(16px, env(safe-area-inset-left, 0px)); top: calc(22px + env(safe-area-inset-top, 0px)); }
  .gart .brand .logo { height: 24px; }
  /* the language switch rides on the bar, level with the logo */
  .gmain { position: static; min-height: 0; grid-template-rows: 1fr auto; }
  .gtop { position: absolute; top: env(safe-area-inset-top, 0px); right: 0; left: auto; height: 68px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 16px; }
  .gcol { padding: 32px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
  .gbox h1 { font-size: 28px; }
  .gfoot { padding: 0 16px max(24px, env(safe-area-inset-bottom, 0px)); }
}

/* ---------- phones: every control a thumb can hit (44 px), looking as it does ---------- */
@media (max-width: 760px) {
  .gart .brand { top: calc(12px + env(safe-area-inset-top, 0px)); } /* the taller link keeps the logo where it was */
  .swap .lnk { padding-block: 15px; }
  /* a button is inline-block, so its padding would push the line down; the margin takes it back, the hit area stays */
  .swap button.lnk { margin-block: -15px; }
  .gfoot nav { gap: 0 22px; }
  .gfoot a, .gfoot button { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- a consent box (registration, the purchase summary): its words the size of the text around it, never fine
   print, and unticked until the buyer ticks it (owner 2026-11-27). Square, as the fields are; ticked, it fills with the
   signal. ---------- */
.cbx { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; line-height: 1.55; color: var(--rose); cursor: pointer; text-wrap: pretty; }
.cbx input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 2px 0 0; background: var(--void); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color .12s, box-shadow .12s; }
.cbx input::after { content: ""; width: 10px; height: 5px; margin-top: -3px; border-left: 2px solid var(--black); border-bottom: 2px solid var(--black); transform: rotate(-45deg) scale(.5); opacity: 0; transition: transform .18s var(--ease-out), opacity .12s; }
.cbx:hover input:not(:checked) { box-shadow: inset 0 0 0 1px var(--dust); }
.cbx input:checked { background: var(--signal); box-shadow: none; }
.cbx input:checked::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.cbx input:focus-visible { outline: 2px solid var(--blush); outline-offset: 3px; }
.cbx input:active { transform: scale(.92); }
.cbx .lnk { font-weight: 600; }
.err .cbx input[aria-invalid="true"]:not(:checked) { box-shadow: inset 0 0 0 1px var(--white); }
.cbxs { display: grid; gap: 14px; }
/* Google's click-wrap line: the Terms beside the one click that makes the account */
.gterms { font-size: 14px; line-height: 1.5; color: var(--rose); text-align: center; text-wrap: pretty; }
/* the purchase summary: the plan's rows, then what the payment does, then the boxes */
.sum { display: grid; margin: 4px 0 0; box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 12px; font-size: 15px; line-height: 1.4; }
.sum > div + div { box-shadow: inset 0 1px 0 var(--line); }
.sum dt { color: var(--dust); }
.sum dd { margin: 0; text-align: right; color: var(--blush); font-weight: 550; font-variant-numeric: tabular-nums; }
.sum dd b { font-size: 18px; font-weight: 750; color: var(--white); }
.sum dd small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 500; color: var(--dust); }
.suml { display: grid; gap: 10px; }
.suml p { font-size: 15px; line-height: 1.55; color: var(--rose); text-wrap: pretty; }

/* ---------- Windows high contrast: the cells' lines are box-shadows, which vanish there ---------- */
@media (forced-colors: active) {
  .note { outline: 1px solid CanvasText; outline-offset: -1px; }
  .cbx input { appearance: auto; -webkit-appearance: auto; }
  .cbx input::after { content: none; }
}
