/* The self sign-up page (/signup; frontend/src/outside/signup*).  It loads nothing of the staff app, so its look is here:
   light and dark (<html data-theme>, set by signup/theme.tsx from the visitor's choice or the browser's), right to left by
   logical properties, one column on phones. */
@font-face { font-family: Inter; font-weight: 400; src: url(/static/fonts/inter/Inter-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 600; src: url(/static/fonts/inter/Inter-SemiBold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 700; src: url(/static/fonts/inter/Inter-Bold.ttf) format("truetype"); font-display: swap; }

:root { color-scheme: light;
        --accent: #2563EB; --accent-2: #4F46E5; --accent-ink: #fff; --soft: #DBEAFE; --ring: rgba(37, 99, 235, .18);
        --ink: #0f172a; --body: #334155; --muted: #64748b; --faint: #94a3b8; --line: #e2e8f0; --line-2: #cbd5e1;
        --bg: #f3f5fa; --card: #ffffff; --field: #f8fafc; --chip: #f1f5f9;
        --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 48px -12px rgba(15, 23, 42, .14);
        --glow: rgba(37, 99, 235, .10);
        --side: #0a1430; --side-2: #142a66; --side-ink: #e2e8f0; --side-muted: #9fb0cf;
        --ok: #059669; --ok-bg: #d1fae5; --bad: #dc2626; --bad-bg: #fee2e2; --info: #1d4ed8; --info-bg: #dbeafe; }
:root[data-theme="dark"] { color-scheme: dark;
        --accent: #3b82f6; --accent-2: #6366f1; --soft: rgba(59, 130, 246, .22); --ring: rgba(59, 130, 246, .28);
        --ink: #e5eaf3; --body: #cbd5e1; --muted: #94a3b8; --faint: #64748b; --line: #1d2a45; --line-2: #2a3a5c;
        --bg: #060b18; --card: #0d1528; --field: #0a1121; --chip: #142038;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 60px -16px rgba(0, 0, 0, .6);
        --glow: rgba(59, 130, 246, .14);
        --side: #050a1a; --side-2: #0f1f4d;
        --ok: #34d399; --ok-bg: rgba(16, 185, 129, .16); --bad: #f87171; --bad-bg: rgba(239, 68, 68, .14);
        --info: #93c5fd; --info-bg: rgba(59, 130, 246, .18); }
@media (prefers-color-scheme: dark) {                 /* before the script runs (the Loading… box) */
  :root:not([data-theme]) { color-scheme: dark; --ink: #e5eaf3; --muted: #94a3b8; --bg: #060b18; --card: #0d1528; --line: #1d2a45; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
b, strong { font-weight: 600; }

.su-wrap { min-height: 100vh; }
.su-small { color: var(--muted); font-size: 13px; }
.su-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.su-wrap > .su-card { max-width: 440px; margin: 80px auto; }
.su-loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.su-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: su-spin .8s linear infinite; }
@keyframes su-spin { to { transform: rotate(360deg); } }

/* ══ The page: the brand panel and the steps' card ══════════════════════════ */
.su-page { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; min-height: 100vh; }

/* the brand panel wears the sign-in screen's background (styles.css #login-screen, loginFx.ts), drawn here in CSS:
   near-black, fine diagonal lines fading downwards, and soft vertical light beams in its cobalt and coral, drifting */
.su-side { position: sticky; top: 0; height: 100vh; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; isolation: isolate;
           color: #F3F2EF; padding: 34px 32px 26px; display: flex; flex-direction: column; gap: 24px; background: #06080D;
           --side-ink: #F3F2EF; --side-muted: #A2A8BA; }
.su-side::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
                   background: repeating-linear-gradient(-14deg, rgba(220, 225, 235, .075) 0 1px, transparent 1px 10px);
                   -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%); }
.su-side::after { content: ""; position: absolute; inset: 0 -30%; z-index: -1; pointer-events: none; mix-blend-mode: screen;
                  background: radial-gradient(ellipse 110px 62% at 24% 60%, rgba(47, 75, 255, .40), transparent 72%),
                              radial-gradient(ellipse 60px 58% at 41% 56%, rgba(124, 149, 255, .30), transparent 72%),
                              radial-gradient(ellipse 160px 66% at 60% 62%, rgba(74, 102, 255, .26), transparent 72%),
                              radial-gradient(ellipse 45px 52% at 74% 58%, rgba(169, 187, 255, .22), transparent 72%),
                              radial-gradient(ellipse 70px 50% at 86% 60%, rgba(255, 122, 89, .16), transparent 72%);
                  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 78%, transparent 100%);
                  mask-image: linear-gradient(180deg, transparent 0%, #000 38%, #000 78%, transparent 100%);
                  animation: su-beams 26s ease-in-out infinite alternate; }
@keyframes su-beams { from { transform: translateX(-9%); } to { transform: translateX(9%); } }
@media (prefers-reduced-motion: reduce) { .su-side::after { animation: none; } }
.su-side > * { position: relative; }
.su-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.su-brand img { width: 40px; height: 40px; object-fit: contain; }
.su-brand b { display: block; font-size: 15px; color: #fff; }
.su-brand span { color: var(--side-muted); font-size: 12px; }

/* the middle: the journey's title and its steps, centred in the space between the brand and the points */
.su-side-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; }
.su-hero { text-align: center; }
.su-label { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 11px; font-weight: 600; letter-spacing: .16em;
            text-transform: uppercase; color: #A9BBFF; }
.su-label i { width: 6px; height: 6px; border-radius: 50%; background: #FF7A59; box-shadow: 0 0 0 4px rgba(255, 122, 89, .16); }
.su-hero h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 10px; color: #fff;
              background: linear-gradient(180deg, #FFFFFF 35%, #AEB4C6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.su-hero p { color: var(--side-muted); margin: 0 auto; max-width: 300px; white-space: pre-line; font-size: 14px; }

/* two glass cards of the same make: the steps, and the points */
.su-steps, .su-points { list-style: none; margin: 0; border-radius: 18px; background: rgba(10, 13, 21, .62);
                        -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
                        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 20px 50px -30px #000; }
.su-steps { padding: 10px; display: flex; flex-direction: column; gap: 0; }
.su-steps li { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; color: var(--side-muted);
               font-weight: 600; font-size: 13.5px; }
/* the line between two circles: rows are equal and the 30px circle sits in the middle of its row, so the line runs from 4px
   under this circle (50% + 19px) to 4px above the next one (the same distance past the row's foot) */
.su-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 26px; top: calc(50% + 19px); bottom: calc(19px - 50%); width: 2px;
                                       border-radius: 2px; background: rgba(255, 255, 255, .16); }
.su-steps li .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.su-steps li .t b { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.su-steps li .t small { font-weight: 400; font-size: 11.5px; line-height: 1.35; color: var(--side-muted); opacity: .8; }
.su-steps li.on .t small { color: #C9CCD6; opacity: 1; }
.su-steps li.done:not(:last-child)::after { background: #34d399; opacity: .7; }
.su-steps li .n { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .26); display: inline-flex; align-items: center;
                  justify-content: center; font-size: 12.5px; flex-shrink: 0; }
.su-steps li.on { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); color: #fff; }
.su-steps li.on .n { background: linear-gradient(135deg, #2F4BFF, #7C95FF); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px rgba(47, 75, 255, .28); }
.su-steps li.done { color: var(--side-ink); }
.su-steps li.done .n { background: rgba(52, 211, 153, .16); border-color: #34d399; color: #34d399; }

.su-points { padding: 4px 18px; }
.su-points li { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--side-muted); font-size: 12.5px; line-height: 1.4; }
.su-points li + li { border-top: 1px solid rgba(255, 255, 255, .07); }
.su-points .pi { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
                 background: rgba(169, 187, 255, .10); color: #A9BBFF; }
.su-side-foot { font-size: 12.5px; color: var(--side-muted); text-align: center; }
.su-side-foot a { color: #fff; font-weight: 600; text-decoration: none; }
.su-side-foot a:hover { text-decoration: underline; }

.su-main { position: relative; padding: 24px 32px; display: flex; flex-direction: column; align-items: center; min-height: 100vh;
           background: radial-gradient(900px 520px at 100% 0%, var(--glow), transparent 65%), var(--bg); }
.su-top { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-height: 38px; }
.su-center { flex: 1; width: 100%; max-width: 600px; display: flex; flex-direction: column; justify-content: safe center; padding-block: 24px 8px; }
.su-main .su-card { width: 100%; padding: 38px 40px 34px; overflow: hidden; }
.su-progress { position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--chip); }
.su-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-start-end-radius: 4px;
                    border-end-end-radius: 4px; transition: width .35s ease; }
.su-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.su-card h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 6px; }
.su-card .lead { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.su-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 20px; }

/* the theme switch and the languages, top right */
.su-theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--body); cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: color .15s, border-color .15s; }
.su-theme:hover, .su-theme:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.i18n-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 12.5px;
               box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.i18n-switch button, .i18n-switch b { padding: 6px 14px; border-radius: 999px; line-height: 1.2; }
.i18n-switch button { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; }
.i18n-switch button:hover { color: var(--ink); }
.i18n-switch b { background: var(--soft); color: var(--accent); font-weight: 600; }

/* ══ Fields and buttons ══════════════════════════════════════════════════════ */
.su-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.su-grid .wide { grid-column: 1 / -1; }
.su-f { display: block; margin-top: 16px; }
.su-f > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--body); margin-bottom: 6px; }
.su-f > span i { font-style: normal; color: var(--bad); margin-inline-start: 2px; }
.in, .su-f select, .su-f textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit;
                                     color: var(--ink); background: var(--field); transition: border-color .15s, box-shadow .15s, background .15s; }
.in:hover, .su-f select:hover, .su-f textarea:hover { border-color: var(--line-2); }
.su-f textarea { min-height: 96px; resize: vertical; }
.in:focus, .su-f select:focus, .su-f textarea:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--ring); }
.in::placeholder { color: var(--faint); }
.in.code { font-size: 26px; letter-spacing: .45em; text-align: center; font-weight: 600; min-height: 58px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.su-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.su-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.su-actions .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid var(--line);
       border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
       transition: transform .12s, box-shadow .15s, filter .15s, border-color .15s; }
.btn:hover:not([disabled]) { border-color: var(--line-2); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--accent-ink); min-width: 140px;
               box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .55); }
.btn.primary:hover:not([disabled]) { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(37, 99, 235, .6); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
a.btn { text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.msg { padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.msg.info { background: var(--info-bg); color: var(--info); white-space: pre-line; }

/* ══ Plans, choices, the summary ═════════════════════════════════════════════ */
.su-plans { display: grid; gap: 12px; }
.su-plan { display: block; border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px; cursor: pointer; position: relative; background: var(--field);
           transition: border-color .15s, box-shadow .15s, background .15s; }
.su-plan:hover { border-color: var(--line-2); }
.su-plan.on { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--ring); }
.su-plan input { position: absolute; opacity: 0; pointer-events: none; }
.su-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.su-plan-head b { font-size: 15.5px; }
.su-price { font-weight: 700; color: var(--ink); }
.su-price small { font-weight: 400; color: var(--muted); }
.su-plan p { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.su-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.su-mods span { padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--body); font-size: 11.5px; font-weight: 600; }
.su-trial { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ok); }
.su-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 18px; }
.su-row .su-f { margin-top: 0; }
.su-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.su-seg button { border: 0; border-radius: 9px; background: none; color: var(--body); font: inherit; font-weight: 600; font-size: 13px; padding: 8px 16px; cursor: pointer; }
.su-seg button.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .6); }

.su-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; }
.su-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.su-sum { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 6px; font-size: 13px; display: grid; background: var(--field);
          grid-template-columns: auto 1fr; gap: 6px 16px; }
.su-sum dt { color: var(--muted); }
.su-sum dd { margin: 0; font-weight: 600; }

.su-done { text-align: center; padding: 18px 0 6px; }
.su-done .ico { width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
                background: var(--ok-bg); color: var(--ok); }
.su-done .ico.wait { background: var(--info-bg); color: var(--info); }
.su-done h2 { margin-bottom: 8px; }
.su-done p { color: var(--muted); margin: 0 auto 18px; max-width: 420px; white-space: pre-line; }

/* sign-up closed: one card in the middle of the window, the mark above it */
.su-closed { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 16px;
             background: radial-gradient(900px 520px at 50% 0%, var(--glow), transparent 65%), var(--bg); }
.su-closed-top { position: absolute; top: 20px; inset-inline-end: 24px; }
.su-closed-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.su-closed-brand img { width: 34px; height: 34px; object-fit: contain; }
.pmark-dark { display: none; }
:root[data-theme="dark"] .pmark-light { display: none; }
:root[data-theme="dark"] .pmark-dark { display: inline; }
.su-closed-card { width: 100%; max-width: 440px; text-align: center; padding: 36px 32px 30px; }
.su-closed-card .ico { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
                       background: var(--info-bg); color: var(--info); }
.su-closed-card h2 { margin-bottom: 10px; }
.su-closed-card p { color: var(--muted); margin: 0 auto 4px; max-width: 340px; }
.su-closed-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 24px; }
.su-closed-acts .btn { min-width: 0; }
.su-closed-mail { margin-top: 12px; font-size: 12.5px; color: var(--faint); }

.su-modal { position: fixed; inset: 0; background: rgba(2, 6, 23, .6); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
            padding: 16px; z-index: 50; }
.su-modal-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 680px; max-height: 86vh; display: flex;
                flex-direction: column; box-shadow: var(--shadow); }
.su-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.su-modal-head h3 { margin: 0; font-size: 16px; }
.su-modal-body { padding: 16px 20px; overflow: auto; color: var(--body); }

/* password boxes: Show and Generate (the translate page's .pwf markup, frontend/src/outside/translate/PasswordBox.tsx) */
.pwf { position: relative; display: block; min-width: 0; }
.pwf > input { width: 100%; }
.pwf-btns { position: absolute; top: 0; inset-inline-end: 6px; bottom: 0; display: flex; align-items: center; gap: 2px; }
.pwf-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px;
           background: none; color: var(--muted); cursor: pointer; }
.pwf-btn:hover, .pwf-btn:focus-visible { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); outline: none; }
.pwf-btn.on { color: var(--accent); }

@media (min-width: 861px) and (max-height: 760px) { .su-points { display: none; } }

@media (max-width: 860px) {
  .su-page { grid-template-columns: 1fr; }
  .su-side { position: static; height: auto; padding: 18px 16px; gap: 14px; }
  .su-hero h1 { font-size: 20px; margin-bottom: 4px; }
  .su-hero p { font-size: 13px; }
  .su-side-mid { gap: 12px; }
  .su-steps { flex-direction: row; justify-content: center; gap: 6px; overflow-x: auto; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  .su-steps li { padding: 4px 8px; }
  .su-steps li::after { display: none; }
  .su-steps li .t { display: none; }
  .su-steps li.on .t { display: flex; }
  .su-steps li .t small { display: none; }
  .su-points, .su-side-foot { display: none; }
  .su-main { padding: 14px 16px; min-height: 0; }
  .su-center { padding-block: 12px 4px; }
  .su-main .su-card { padding: 28px 18px 22px; border-radius: 16px; }
  .su-card h2 { font-size: 21px; }
  .su-grid { grid-template-columns: 1fr; }
  .su-actions .btn.primary { flex: 1; }
}

/* Cloudflare Turnstile, when switched on (D62) */
.su-challenge { margin-top: 16px; min-height: 65px; }
