/* Gains Global Markets — sign-in pages and member pages */

:root {
  --bg: #050505;
  --surface: rgba(255, 255, 255, 0.025);
  --line: rgba(212, 166, 58, 0.18);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold-light: #f7e08f;
  --gold: #d4a63a;
  --gold-deep: #9a6f1c;
  --text: #ece6d6;
  --muted: #9b9484;
  --dim: #6d675b;
  --up: #3fd69a;
  --down: #ff5f6d;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gold-grad: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 28%, var(--gold-light) 50%, var(--gold) 72%, var(--gold-deep) 100%);
}

*, *::before, *::after { box-sizing: border-box; }

/* No tap highlight (the blue box Android draws over a tapped link or button); keyboard focus still shows. */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

/* Scrollbars in the site's colours, thin, rather than the browser's light ones. Lists that hide
   theirs (scrollbar-width: none) keep doing so. */
* { scrollbar-width: thin; scrollbar-color: rgba(212, 166, 58, 0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(212, 166, 58, 0.3); }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 166, 58, 0.5); }
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: rgba(212, 166, 58, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
@media (min-width: 640px) { .container { width: min(1200px, 100% - 64px); } }

/* ---------- Ambient layers ---------- */

.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop span {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 166, 58, 0.11), transparent 62%);
  animation: drift 26s ease-in-out infinite alternate;
}
.backdrop span:nth-child(1) { left: -25vmax; top: -30vmax; }
.backdrop span:nth-child(2) { right: -30vmax; top: 30vh; animation-duration: 32s; animation-delay: -8s; opacity: 0.7; }
.backdrop span:nth-child(3) { left: 20vw; bottom: -45vmax; animation-duration: 38s; animation-delay: -16s; opacity: 0.5; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); }
}

.grain {
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Shared pieces ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  font: 600 0.92rem/1 var(--font);
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s, background-color 0.35s, opacity 0.35s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-sm { padding: 11px 20px; font-size: 0.82rem; }
.btn-block { width: 100%; }

.btn-gold {
  color: #1b1307;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 12px 34px -12px rgba(212, 166, 58, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  overflow: hidden;
}
.btn-gold::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out 1.5s infinite;
}
.btn-gold:hover { box-shadow: 0 18px 44px -12px rgba(212, 166, 58, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

.btn-ghost { color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: rgba(212, 166, 58, 0.55); background: rgba(212, 166, 58, 0.06); }

/* Waiting on the server: the label stays put, a ring spins over it. */
.btn.is-busy { pointer-events: none; color: transparent; }
.btn.is-busy::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(27, 19, 7, 0.25);
  border-top-color: #1b1307;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-light);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: color 0.25s;
}
.link-btn:hover { color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(212, 166, 58, 0.06);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light);
}

.live-dot {
  position: relative;
  width: 8px; height: 8px; flex: none;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 10px var(--up);
}
.live-dot::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--up);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3); opacity: 0; } }

h1 em, h2 em {
  font-style: normal;
  background: var(--gold-grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -120% 0; } }

.notice {
  display: grid; gap: 4px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(212, 166, 58, 0.06);
  font-size: 0.86rem; line-height: 1.5;
  color: var(--text);
}
.notice b { font-weight: 700; color: var(--gold-light); }
.notice span { color: var(--muted); }
.notice code { color: var(--text); font-size: 0.8rem; }
.notice-error { border-color: rgba(255, 95, 109, 0.35); background: rgba(255, 95, 109, 0.07); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Sign-in layout ---------- */

.auth { display: grid; min-height: 100vh; min-height: 100dvh; }

@media (min-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.showcase {
  position: relative;
  display: flex; flex-direction: column; gap: 28px;
  padding: 40px clamp(32px, 4vw, 64px);
  border-right: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(212, 166, 58, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
  overflow: hidden;
}
/* Faint blueprint grid that fades out towards the edges. */
.showcase::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212, 166, 58, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 166, 58, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent 75%);
  pointer-events: none;
}
.showcase > * { position: relative; }

@media (min-width: 1000px) {
  .showcase { position: sticky; top: 0; height: 100vh; height: 100dvh; }
}

.showcase-logo { align-self: flex-start; animation: rise 0.9s var(--ease) both; }
.showcase-logo img { width: 200px; height: auto; }

.showcase-visual {
  flex: 1;
  min-height: 240px;
  animation: rise 1.1s var(--ease) 0.15s both;
}
.showcase-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.showcase-copy { display: grid; gap: 22px; animation: rise 1s var(--ease) 0.3s both; }
.showcase-copy h2 { font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

.trust { display: grid; gap: 16px; }
.trust li { display: flex; gap: 14px; align-items: flex-start; }
.trust svg {
  flex: none;
  width: 38px; height: 38px; padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(212, 166, 58, 0.07);
  fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.trust b { display: block; font-size: 0.92rem; font-weight: 600; }
.trust span { display: block; font-size: 0.84rem; line-height: 1.5; color: var(--muted); }

.showcase-note { font-size: 0.76rem; color: var(--dim); letter-spacing: 0.02em; }

@media (min-width: 1000px) and (max-height: 820px) {
  .showcase { gap: 20px; padding-block: 28px; }
  .showcase-logo img { width: 160px; }
  .trust { gap: 12px; }
  .trust span { display: none; }
}

.auth-main {
  display: flex; flex-direction: column;
  padding: 24px 16px 48px;
}
@media (min-width: 640px) { .auth-main { padding: 32px 40px 56px; } }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-mark img { width: 52px; height: 42px; object-fit: contain; }
.auth-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
  font-size: 0.82rem; font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
}
.auth-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.auth-back:hover { color: var(--text); }
.auth-back:hover svg { transform: translateX(-3px); }

@media (min-width: 1000px) { .auth-mark { display: none; } }

/* The card has a thin gold light that travels around its edge. */
@property --edge {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.auth-card {
  position: relative;
  display: grid; gap: 22px;
  width: min(460px, 100%);
  margin: 32px auto auto;
  padding: 32px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)), rgba(7, 7, 6, 0.85);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
@media (min-width: 640px) { .auth-card { padding: 38px 36px; } }
@media (min-width: 1000px) { .auth-card { margin-block: auto; } }

.auth-card::before {
  content: "";
  position: absolute; inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--edge), transparent 0 64%, rgba(212, 166, 58, 0.15) 72%, var(--gold-light) 80%, rgba(212, 166, 58, 0.15) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: edge 7s linear infinite;
  pointer-events: none;
}
@keyframes edge { to { --edge: 360deg; } }

.auth-card > * { animation: rise 0.8s var(--ease) both; }
.auth-card > :nth-child(2) { animation-delay: 0.08s; }
.auth-card > :nth-child(3) { animation-delay: 0.16s; }
.auth-card > :nth-child(4) { animation-delay: 0.24s; }
.auth-card > :nth-child(5) { animation-delay: 0.32s; }
.auth-card > :nth-child(n+6) { animation-delay: 0.4s; }

.auth-card .pill { justify-self: start; }
.auth-card h1 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.auth-lede { margin-top: -10px; font-size: 0.94rem; color: var(--muted); }

.auth-panel { display: grid; gap: 12px; animation: rise 0.55s var(--ease) both; }
.auth-panel > .link-btn { justify-self: center; margin-top: 4px; }

.auth-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }

.auth-switch { padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 0.86rem; text-align: center; color: var(--muted); }
.auth-switch a { font-weight: 600; color: var(--gold-light); transition: color 0.25s; }
.auth-switch a:hover { color: #fff; }

/* ---------- Register and welcome ---------- */

.invite {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(212, 166, 58, 0.4);
  border-radius: 14px;
  font-size: 0.86rem;
  color: var(--muted);
}
.invite svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.invite span { flex: 1; min-width: 0; }
.invite b { color: var(--text); }
.invite code { font-size: 0.76rem; color: var(--gold-light); }

.auth-form { gap: 16px; }

.field { display: grid; gap: 7px; }
.field label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.8rem; font-weight: 600; color: var(--text); }
.field label span { font-size: 0.72rem; font-weight: 500; color: var(--dim); }
.field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field input::placeholder { color: var(--dim); }
.field input:hover { border-color: rgba(255, 255, 255, 0.14); }
.field input:focus { outline: none; border-color: var(--gold); background: rgba(212, 166, 58, 0.04); box-shadow: 0 0 0 4px rgba(212, 166, 58, 0.12); }
.field input.is-code { font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.field input.is-code::placeholder { text-transform: none; }

/* Pickers, like the country code beside a mobile number, and longer messages. */
.field-phone { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; }
.field select {
  width: 100%; min-width: 0;
  padding: 13px 30px 13px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9484' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  font: 500 1rem/1.6 var(--font);
  color: var(--text);
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field select option { background: #10100e; color: var(--text); }
.field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background-color: rgba(212, 166, 58, 0.04); box-shadow: 0 0 0 4px rgba(212, 166, 58, 0.12); }
.field textarea {
  width: 100%; min-height: 120px;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font: 0.95rem/1.5 var(--font);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field.has-error select, .field.has-error textarea { border-color: rgba(255, 95, 109, 0.6); }

/* The country picker shows just the flag and code once app.js is running: the real select sits
   on top, see-through, so tapping it still opens the full list. */
.country-pick { position: relative; min-width: 0; }
.country-pick-shown { display: none; }
.country-pick.is-ready .country-pick-shown {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 0 30px 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9484' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  font: 500 0.95rem var(--font);
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.country-pick.is-ready select { position: relative; opacity: 0; }
.country-pick.is-ready:focus-within .country-pick-shown { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 166, 58, 0.12); }
.field.has-error .country-pick.is-ready .country-pick-shown { border-color: rgba(255, 95, 109, 0.6); }

/* An email with its Send code button, and what happened when it was pressed. */
.field-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.field-send .btn { padding-inline: 16px; }
.field-note { font-size: 0.76rem; line-height: 1.5; color: var(--up); }
.field-note.is-error { color: #ff8a94; }
.field-note:empty { display: none; }

/* A security check: its picture, a button for different characters, and where to type them. */
.captcha { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; }
.captcha img { width: 180px; height: 52px; border: 1px solid var(--line-soft); border-radius: 12px; background: #161512; }
.captcha-new {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.captcha-new:hover { border-color: var(--line); color: var(--gold-light); }
.captcha-new:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 166, 58, 0.12); }
.captcha-new svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
  .captcha { grid-template-columns: auto auto; justify-content: start; }
  .captcha input { grid-column: 1 / -1; }
}

/* On the forgotten password page: the member ID being reset, and asking for a new code. */
.member-id-line { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.member-id-line code { font-size: 1rem; letter-spacing: 0.06em; color: var(--gold-light); }
.member-id-line .link-btn { font-size: 0.78rem; }
.auth-resend { margin-top: -6px; font-size: 0.8rem; text-align: center; color: var(--muted); }
.auth-resend .link-btn { font-size: 0.8rem; }
.field label .link-btn { font-size: 0.76rem; }

/* A password field with Show / Hide inside its right edge. */
.field-password { position: relative; }
.field-password input { padding-right: 68px; }
.field-password .link-btn { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); font-size: 0.78rem; }

.field-error { font-size: 0.78rem; color: #ff8a94; }
.field-error:empty { display: none; }
.field.has-error input { border-color: rgba(255, 95, 109, 0.6); }
.field.has-error input:focus { box-shadow: 0 0 0 4px rgba(255, 95, 109, 0.12); }

.check { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 0.82rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check-box {
  flex: none;
  display: grid; place-items: center;
  width: 20px; height: 20px; margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transition: background-color 0.25s, border-color 0.25s;
}
.check-box::after {
  content: "";
  width: 10px; height: 6px;
  border: 2px solid #1b1307;
  border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.25s var(--ease);
}
.check input:checked + .check-box { border-color: var(--gold); background: var(--gold); }
.check input:checked + .check-box::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check input:focus-visible + .check-box { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.member-id {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(212, 166, 58, 0.14), transparent 60%), rgba(212, 166, 58, 0.04);
}
.member-id .auth-label { grid-column: 1 / -1; }
.member-id b { font: 600 clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem)/1.1 var(--mono); letter-spacing: 0.06em; color: var(--gold-light); }

/* ---------- Narrow screens: form first, story below ---------- */

@media (max-width: 999px) {
  .showcase { order: 2; border-right: 0; border-top: 1px solid var(--line-soft); padding: 40px 16px 56px; }
  /* The mark above the card already brands the page. */
  .showcase-logo { display: none; }
  .showcase-visual { flex: none; height: min(68vw, 340px); }
  .showcase-copy { width: min(520px, 100%); margin-inline: auto; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .grain { display: none; }
}

/* Notifications: the bell in the admin and member headers, and the panel it opens */

.nt { position: relative; flex: none; }
.nt-bell {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s;
}
.nt-bell:hover, .nt-bell[aria-expanded="true"] { color: var(--text); border-color: var(--line); }
.nt-bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nt-count {
  position: absolute; top: -6px; right: -7px;
  min-width: 19px; padding: 1px 5px;
  border: 2px solid #080807;
  border-radius: 999px;
  background: var(--gold);
  font: 700 0.6rem/1.3 var(--mono); text-align: center;
  color: #1b1307;
}

.nt-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70;
  width: 380px; max-width: calc(100vw - 24px);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #0d0d0b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.nt-head b { font-size: 0.86rem; font-weight: 600; }
.nt-head .link-btn { font-size: 0.76rem; }
.nt-body { max-height: min(60vh, 460px); overflow-y: auto; overscroll-behavior: contain; }
.nt-body[aria-busy="true"] { opacity: 0.6; }
.nt-state { padding: 26px 16px; text-align: center; font-size: 0.78rem; color: var(--dim); }

.nt-list li + li { border-top: 1px solid var(--line-soft); }
.nt-list a {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px;
  padding: 11px 14px 11px 24px;
  transition: background-color 0.2s;
}
.nt-list a:hover { background: rgba(255, 255, 255, 0.03); }
.nt-list b { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.nt-list time { font: 0.68rem/1.9 var(--mono); color: var(--dim); white-space: nowrap; }
.nt-list span { grid-column: 1 / -1; font-size: 0.76rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.nt-list .is-new a::before {
  content: "";
  position: absolute; top: 18px; left: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}
.nt-list .is-new b { color: var(--gold-light); }

/* Phones: the panel spans the screen under the header. */
@media (max-width: 600px) {
  .nt-panel { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; max-width: none; }
}
