

.gate { display: grid; grid-template-columns: 1fr 1fr; height: var(--gate-h, calc(100vh - 101px)); min-height: 560px; }
.gate-world { position: relative; overflow: hidden; color: #fff; padding: clamp(28px, 4vh, 48px) clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3vh, 32px);
  background: radial-gradient(900px 500px at 110% -10%, rgba(255,255,255,.16), transparent 60%), radial-gradient(700px 500px at -20% 120%, rgba(0,0,0,.22), transparent 60%), linear-gradient(150deg, var(--brand-700, #047857), var(--brand-500, #10b981)); }
.gate-world::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); pointer-events: none; }
.gate-world > * { position: relative; z-index: 1; max-width: 620px; }
.gate-kicker { display: inline-flex; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.gate-world h2 { font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: clamp(24px, 2.3vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; margin: 10px 0 0; }
.gate-world h2 span { display: block; font-weight: 300; opacity: .9; }
.gate-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gate-tile { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: background-color .2s ease, border-color .2s ease; }
.gate-tile:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); }
.gate-tile i { --gate-accent: #fde68a; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, rgba(255,255,255,.24), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px -8px rgba(0,0,0,.35); }
.gate-tile i .gi-a { fill: var(--gate-accent); stroke: var(--gate-accent); opacity: 1; }
.gate-tile i .gi-s { stroke: var(--gate-accent); opacity: 1; }
/* The shared drawings (the ones the LEFT MENU also uses) tint through --mi-soft rather than
   .gi-a, so without this the panel showed two treatments at once: amber on its own icons, soft
   white on the shared ones. One accent, whichever drawing a tile happens to use. */
.gate-tile i .bx-ic { --mi-soft: color-mix(in srgb, var(--gate-accent) 55%, transparent); }
.gate-tile b { display: block; font-size: 14px; font-weight: 600; }
.gate-tile small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.45; opacity: .82; margin-top: 2px; }
.gate-proof { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px; margin: 14px 0 0; font-size: 14px; opacity: .88; }
.gate-proof b { font-weight: 600; }
.gate-proof span { white-space: nowrap; }
.gate-proof i { font-style: normal; opacity: .6; margin: 0 6px; }
.gate-form { overflow-y: auto; display: flex; padding: 24px; background: rgb(var(--white-rgb, 255 255 255)); }
html.dark .gate-form { background: rgb(2 6 23); }
.gate-card { width: 100%; max-width: 460px; margin: auto; }
.gate-card h1 { font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
.gate-sub { font-size: 15px; color: rgb(100 116 139); margin: 6px 0 22px; }
.gate-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gate-role { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; border: 1.5px solid rgb(226 232 240); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
html.dark .gate-role { border-color: rgb(30 41 59); }
.gate-role:hover { border-color: var(--brand-400, #34d399); }
.gate-role.on { border-color: var(--brand-600, #059669); background: var(--brand-50, #ecfdf5); }
html.dark .gate-role.on { background: rgba(var(--brand-500-rgb, 16 185 129), .1); }
.gate-role .e { font-size: 20px; }
.gate-role b { display: block; font-size: 14px; font-weight: 600; }
.gate-role small { display: block; font-size: 11.5px; line-height: 1.35; color: rgb(100 116 139); }
.gate-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Register: two steps share one cell, so switching never moves the page and the Cloudflare check stays laid out. */
.gate-panes { display: grid; }
.gate-pane { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .18s ease; }
.gate-pane.on { visibility: visible; opacity: 1; }
.gate-gap { margin-top: 16px; }
.gate-captcha .cf-turnstile { margin: 16px 0 0 !important; min-height: 65px; }
.gate-toggle { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgb(241 245 249); }
html.dark .gate-toggle { background: rgb(15 23 42); }
.gate-toggle button { border: 0; border-radius: 9px; padding: 9px 10px; font-size: 14px; font-weight: 600; color: rgb(71 85 105); background: transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.gate-toggle button.on { background: rgb(var(--white-rgb, 255 255 255)); color: var(--brand-700, #047857); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
html.dark .gate-toggle button { color: rgb(148 163 184); }
html.dark .gate-toggle button.on { background: rgb(30 41 59); color: #fff; }
.gate-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.gate-steps span { height: 4px; width: 28px; border-radius: 4px; background: rgb(226 232 240); transition: background-color .2s ease, width .2s ease; }
.gate-steps span.on { width: 44px; background: var(--brand-600, #059669); }
html.dark .gate-steps span { background: rgb(30 41 59); }
.gate-stack > * + * { margin-top: 12px; }
/* Shorter screens (laptops): tighter spacing so the whole form still fits without scrolling. */
@media (min-width: 1024px) and (max-height: 860px) {
  .gate-form { padding: 14px 24px; }
  .gate-card h1 { font-size: 22px; }
  .gate-sub { margin: 4px 0 12px; font-size: 14px; }
  .gate-gap { margin-top: 12px; }
  .gate-stack > * + * { margin-top: 9px; }
  .gate-form input[type=text], .gate-form input[type=email], .gate-form input[type=password], .gate-form input[type=tel] { padding-top: 7px; padding-bottom: 7px; }
  .gate-form label.block { margin-bottom: 2px; }
  .gate-tile { padding: 11px 12px; }
}
/* The gate's footer (layouts.app, auth_gate): copyright left, links right; stacked and centred on phones. */
.agf { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 48px; padding: 0 clamp(96px, 7vw, 120px) 0 clamp(28px, 4vw, 56px); border-top: 1px solid rgb(226 232 240); background: rgb(var(--white-rgb, 255 255 255)); font-size: 13px; color: rgb(100 116 139); }
html.dark .agf { background: rgb(2 6 23); border-color: rgb(30 41 59); color: rgb(148 163 184); }
.agf-copy { margin: 0; }
.agf-links { display: flex; align-items: center; gap: 4px; }
.agf-links a { padding: 6px 10px; border-radius: 8px; color: inherit; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.agf-links a:hover { background: rgb(241 245 249); color: rgb(15 23 42); }
html.dark .agf-links a:hover { background: rgb(30 41 59); color: #fff; }
@media (max-width: 1023px), (max-height: 599px) {
  /* Left-aligned with the content above; the right side is kept clear for the chat bubble instead of padding
     the bottom (which left an empty band under the footer). */
  .agf { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 88px 16px 24px; text-align: left; }
  .agf-links { flex-wrap: wrap; margin-left: -10px; }
  .agf-copy { font-size: 12px; }
}
/* One still screen on a desktop; the page itself never scrolls. */
@media (min-width: 1024px) and (min-height: 600px) {
  html.auth-gate-lock, html.auth-gate-lock body { overflow: hidden; height: 100%; }
}
@media (max-width: 1023px), (max-height: 599px) {
  .gate { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .gate-world { order: 2; padding: 36px 24px; }
  .gate-form { order: 1; overflow: visible; padding: 32px 24px 36px; }
  /* The inactive step takes no height on phones (it stays laid out, so the Cloudflare check still renders). */
  .gate-pane:not(.on) { height: 0; overflow: hidden; }
}
@media (max-width: 520px) {
  .gate-row2 { grid-template-columns: 1fr; }
  /* Phones: a compact 2-column grid of icon + title; the descriptions are for the desktop view. */
  .gate-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gate-tile { grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 10px; }
  .gate-tile i { width: 34px; height: 34px; border-radius: 10px; }
  .gate-tile i svg { width: 19px; height: 19px; }
  .gate-tile b { font-size: 13px; line-height: 1.3; }
  .gate-tile small { display: none; }
}

