:root {
    --bg: #000; --surface: #08080a; --surface-2: #0d0d10;
    --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
    --text: #f3f5f9; --text-2: #c3c8d4; --muted: #8a92a3;
    --accent: #4c8dff; --accent-2: #86adff; --sell: #ff6b7d;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; background: #000; }
body { font-family: var(--sans); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 10%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 10%, transparent 75%); }

/* ───── header: logo left, back link right ───── */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px max(24px, 4vw); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.025em; font-weight: 400; }
.logo img { border-radius: 9px; display: block; }
.logo b { font-weight: 700; } .logo em { font-style: normal; color: var(--accent); font-weight: 500; }
.back { font-size: 14px; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--text); }

.stage { flex: 1; display: grid; place-items: center; padding: 16px 20px 56px; }

/* ───── glass card ───── */
.card {
    width: min(480px, 100%); padding: 38px 36px 30px; border-radius: 26px;
    background: linear-gradient(155deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 40px 90px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.25);
    animation: rise .6s cubic-bezier(.22,.68,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.eyebrow { display: inline-block; font-size: 11.5px; letter-spacing: .16em; font-weight: 600; color: var(--accent-2); }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.035em; font-weight: 600; margin: 0 0 26px; }
h1 span { color: var(--accent-2); }
.sub { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }

.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.trust li { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--text-2); padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); }
.trust svg { width: 13px; height: 13px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.brokers { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.brokers legend { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text-2); }
.broker { position: relative; cursor: pointer; display: block; }
.broker input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.b-body { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); transition: border-color .2s, background .2s; position: relative; height: 100%; }
.broker:hover .b-body { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.broker input:focus-visible + .b-body { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.broker input:checked + .b-body { background: linear-gradient(155deg, rgba(76,141,255,.2), rgba(76,141,255,.06)); border-color: rgba(120,170,255,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 24px -12px rgba(76,141,255,.6); }
.b-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.b-ico svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.broker input:checked + .b-body .b-ico { background: rgba(76,141,255,.18); }
.broker input:checked + .b-body .b-ico svg { stroke: var(--accent-2); }
.b-text { display: grid; line-height: 1.3; min-width: 0; }
.b-text b { font-size: 14.5px; font-weight: 600; }
.b-text small { font-size: 11.5px; color: var(--muted); }
.b-check { position: absolute; top: 9px; right: 9px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: all .2s; }
.broker input:checked + .b-body .b-check { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6 5-5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; border-color: var(--accent); }

.field-label { display: block; font-size: 13px; font-weight: 600; margin: 18px 0 8px; color: var(--text-2); }
#idInput { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); color: var(--text); font: inherit; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
#idInput:focus { border-color: var(--accent); background: rgba(255,255,255,.07); box-shadow: 0 0 0 3px rgba(76,141,255,.18); }
#idInput::placeholder { color: #5b6272; }

.tz { position: relative; }
.tz-trigger { width: 100%; text-align: left; padding: 13px 38px 13px 14px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; transition: border-color .2s; }
.tz-trigger::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.tz-trigger:hover { border-color: var(--line-2); }
.tz-menu { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); background: rgba(14,15,19,.82); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 8px; box-shadow: 0 24px 50px rgba(0,0,0,.7); }
.tz-menu input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font: inherit; outline: none; margin-bottom: 6px; }
.tz-options { max-height: 220px; overflow: auto; display: grid; scrollbar-width: thin; }
.tz-option { text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 8px 10px; border-radius: 8px; display: grid; cursor: pointer; }
.tz-option:hover { background: rgba(255,255,255,.06); }
.tz-option small { color: var(--muted); font-family: var(--mono); font-size: 11px; }

.msg { min-height: 22px; margin-top: 14px; font-size: 13.5px; font-weight: 500; color: var(--sell); }
.msg.info { color: var(--accent-2); }
.btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border: 0; border-radius: 11px; background: linear-gradient(180deg, #5b98ff, #3f7ef0); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 28px -12px rgba(76,141,255,.75); transition: background .2s, transform .15s; }
.btn:hover { background: linear-gradient(180deg, #6ba3ff, #4a87f5); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.fine { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.fine a { color: var(--accent-2); font-weight: 600; text-decoration: none; transition: color .2s; }
.fine a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 480px) {
    .card { padding: 28px 20px 24px; }
    .brokers { grid-template-columns: 1fr; }
    h1 { font-size: 24px; }
}
/* ───── Phone ───── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; min-height: 100dvh; }
a, button, label { touch-action: manipulation; }
@media (max-width: 480px) {
    .top { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
    .stage { padding: 8px 14px max(32px, env(safe-area-inset-bottom)); place-items: start center; }
    .card { border-radius: 22px; -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
    h1 { margin-bottom: 18px; }
    #idInput, .tz-trigger, .tz-menu input { font-size: 16px; min-height: 48px; }     /* 16px stops iOS zooming on focus */
    .tz-menu input { min-height: 44px; }
    .btn { min-height: 50px; }
    .b-body { padding: 12px; }
    .tz-options { max-height: 36vh; }
    .tz-option { padding: 12px 10px; }
    .back { padding: 10px 0; }
    .fine a { display: inline-block; padding: 6px 0; }
}
@media (max-height: 520px) and (orientation: landscape) { .stage { place-items: start center; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
