/* GAAS public pages (sign-in, join links): the Studio look as a small standalone sheet. Everything here is a
 * `.pub-` class or a `--pub-` token, so the older join pages that still load app.css keep their own styles.
 * Dark is the default; the sign-in page (body.pub-themed) also follows the light theme of the device or the
 * theme chosen in GAAS Studio (data-theme on <html>, applied by studio/theme.js before paint). */
:root {
  --pub-bg: #070a12; --pub-card: #0f1422; --pub-card-2: #151b2d; --pub-border: #1f2740; --pub-border-strong: #2e3857;
  --pub-text: #eef1f8; --pub-muted: #a9b2cc; --pub-faint: #8d97b3; --pub-accent: #a48bff; --pub-accent-soft: rgba(154, 125, 255, .14);
  --pub-err: #ff6b70; --pub-err-soft: rgba(255, 107, 112, .13); --pub-err-line: rgba(255, 107, 112, .3);
  --pub-grad: linear-gradient(135deg, #9a7dff, #5ad1f0); --pub-on-grad: #0b0e14; --pub-mark-bg: #171c27;
  --pub-glow: radial-gradient(60% 50% at 50% 0%, rgba(154, 125, 255, .16), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(90, 209, 240, .10), transparent 70%);
  --pub-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --pub-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pub-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .pub-themed {
    --pub-bg: #f5f6fa; --pub-card: #ffffff; --pub-card-2: #f0f2f7; --pub-border: #e1e5ee; --pub-border-strong: #c9d0de;
    --pub-text: #0e1220; --pub-muted: #4d566b; --pub-faint: #626b80; --pub-accent: #6a4df0; --pub-accent-soft: rgba(106, 77, 240, .10);
    --pub-err: #cf2f36; --pub-err-soft: rgba(207, 47, 54, .08); --pub-err-line: rgba(207, 47, 54, .3); --pub-mark-bg: #ffffff;
    --pub-glow: radial-gradient(60% 50% at 50% 0%, rgba(106, 77, 240, .10), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(14, 143, 179, .08), transparent 70%);
    --pub-shadow: 0 18px 50px rgba(16, 24, 40, .16);
  }
}
:root[data-theme="light"] .pub-themed {
  --pub-bg: #f5f6fa; --pub-card: #ffffff; --pub-card-2: #f0f2f7; --pub-border: #e1e5ee; --pub-border-strong: #c9d0de;
  --pub-text: #0e1220; --pub-muted: #4d566b; --pub-faint: #626b80; --pub-accent: #6a4df0; --pub-accent-soft: rgba(106, 77, 240, .10);
  --pub-err: #cf2f36; --pub-err-soft: rgba(207, 47, 54, .08); --pub-err-line: rgba(207, 47, 54, .3); --pub-mark-bg: #ffffff;
  --pub-glow: radial-gradient(60% 50% at 50% 0%, rgba(106, 77, 240, .10), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(14, 143, 179, .08), transparent 70%);
  --pub-shadow: 0 18px 50px rgba(16, 24, 40, .16);
}

.pub-body {
  /* longhands: --pub-glow holds two image layers and a colour is only valid in the last layer of the shorthand.
   * html has no background of its own, so this body background also paints the whole canvas (overscroll too). */
  margin: 0; min-height: 100vh; background-color: var(--pub-bg); background-image: var(--pub-glow);
  background-repeat: no-repeat; color: var(--pub-text);
  font-family: var(--pub-font); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased;
}
.pub-body *, .pub-body *::before, .pub-body *::after { box-sizing: border-box; }
.pub-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  min-height: 100vh; padding: 40px 16px; width: 100%;
}
.pub-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pub-text); text-decoration: none; }
.pub-brand:hover { text-decoration: none; }
.pub-mark { width: 40px; height: 40px; }
.pub-mark-bg { fill: var(--pub-mark-bg); stroke: url(#pub-g); stroke-width: 2; }
.pub-mark-core { fill: url(#pub-g); }
.pub-word { font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
.pub-word-sub { font-weight: 500; color: var(--pub-muted); }

.pub-card {
  position: relative; width: 100%; max-width: 400px; padding: 32px 28px 28px; background: var(--pub-card);
  border: 1px solid var(--pub-border); border-radius: 20px; box-shadow: var(--pub-shadow);
}
.pub-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: var(--pub-grad); opacity: .8;
}
.pub-title { margin: 0; font-size: 26px; line-height: 32px; font-weight: 650; letter-spacing: -.01em; }
.pub-sub { margin: 6px 0 22px; color: var(--pub-muted); overflow-wrap: anywhere; }
.pub-sub strong { color: var(--pub-text); font-weight: 600; }
.pub-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.pub-field { display: flex; flex-direction: column; gap: 6px; }
.pub-label { font-size: 13px; font-weight: 550; color: var(--pub-muted); }
.pub-input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--pub-border-strong); border-radius: 10px;
  background: var(--pub-card-2); color: var(--pub-text); font: inherit; font-size: 15px;
  transition: border-color 90ms, box-shadow 90ms;
}
.pub-input:hover { border-color: var(--pub-faint); }
.pub-input:focus { outline: none; border-color: var(--pub-accent); box-shadow: 0 0 0 3px var(--pub-accent-soft); }
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin-top: 4px;
  border: 0; border-radius: 10px; background: var(--pub-grad); color: var(--pub-on-grad); font: inherit; font-size: 15px;
  font-weight: 650; cursor: pointer; transition: filter 90ms, transform 90ms;
}
.pub-btn:hover { filter: brightness(1.06); }
.pub-btn:active { transform: translateY(1px); }
.pub-btn[disabled], .pub-btn.busy { opacity: .7; cursor: progress; }
.pub-btn:focus-visible, .pub-input:focus-visible, .pub-brand:focus-visible, .pub-link:focus-visible { outline: 2px solid var(--pub-accent); outline-offset: 2px; }
.pub-error {
  margin: 0; padding: 10px 12px; border: 1px solid var(--pub-err-line); border-radius: 10px; background: var(--pub-err-soft);
  color: var(--pub-text); font-size: 13.5px;
}
.pub-error.hidden { display: none; }
.pub-hint { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--pub-border); color: var(--pub-muted); font-size: 13px; line-height: 19px; }
.pub-hint code, .pub-code { font-family: var(--pub-mono); font-size: 12.5px; padding: 1px 5px; border-radius: 6px; background: var(--pub-card-2); border: 1px solid var(--pub-border); color: var(--pub-text); overflow-wrap: anywhere; }
.pub-link { color: var(--pub-accent); }
.pub-foot { margin: 0; color: var(--pub-faint); font-size: 12px; font-family: var(--pub-mono); }
.pub-toasts:empty { display: none; }

@media (max-width: 480px) {
  .pub-main { justify-content: flex-start; padding-top: 48px; }
  .pub-card { padding: 26px 18px 20px; border-radius: 16px; }
  .pub-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pub-input, .pub-btn { transition: none; }
}
