/* bragwire.com/signup: the app's sign-up pages in the website's look (Inter, Signal Green, Midnight / Stadium Navy).
   Loaded after /css/styles.css and only on /signup, so every rule is scoped to the sign-up page.
   html[data-theme] (set by signup-config.js from the device setting) is the source of truth for light / dark.
   The only fixed colours besides the site palette are the official Google / Microsoft button specs. */

html[data-theme="dark"] {
  --su-bad: #ff8a8a; --su-ok: #00E69A; --su-ink-on-brand: #0A1018; --su-focus: rgba(0, 230, 154, 0.55);
}
html[data-theme="light"] {
  --su-bad: #b42318; --su-ok: #067a52; --su-ink-on-brand: #0A1018; --su-focus: rgba(0, 150, 100, 0.5);
}

/* Sign-up tokens, scoped to the sign-up app so the site header / footer keep the site's own --border. */
.su-app {
  --bg: var(--midnight); --surface-1: var(--stadium-navy); --surface-2: var(--midnight); --surface-3: rgba(147, 165, 179, 0.12);
  --text: var(--ice-white); --text-muted: var(--steel-gray); --border: rgba(147, 165, 179, 0.28);
  --brand: var(--signal-green); --brand-2: #2affb4; --brand-text: var(--signal-green);
  color: var(--text);
}
html[data-theme="light"] .su-app {
  --bg: var(--ice-white); --surface-1: #FFFFFF; --surface-2: var(--ice-white); --surface-3: rgba(10, 16, 24, 0.05);
  --text: var(--midnight); --text-muted: #4E6170; --border: rgba(10, 16, 24, 0.16);
  --brand: var(--signal-green); --brand-2: #2affb4; --brand-text: #067a52;
}

/* ---- Page frame (website layout: sticky site header, footer at the bottom) ---- */
body.su-site { display: flex; flex-direction: column; }
.su-wrap { max-width: 480px; margin: 0 auto; padding: 32px 20px 56px; }
.su-eyebrow { text-align: center; margin-bottom: 8px; }
.su-noscript { padding: 24px 0; color: var(--steel-gray); text-align: center; }
.su-page { display: flex; flex-direction: column; }

/* Back · title · Sign out */
.su-bar {
  display: grid; grid-template-columns: minmax(72px, auto) 1fr minmax(72px, auto); align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 0;
}
.su-title {
  margin: 0; text-align: center; outline: none; color: var(--text);
  font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
}
.su-back, .su-signout {
  min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-weight: 600;
  font-size: 0.92rem; cursor: pointer; border-radius: 999px;
}
.su-back:hover, .su-signout:hover { color: var(--brand-text); }
.su-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; }
.su-back span { font-size: 22px; line-height: 1; margin-top: -2px; }
.su-signout { justify-self: end; font-weight: 500; }
.su-bar-spacer { display: block; min-height: 44px; }

.su-main { width: 100%; margin: 0 auto; padding: 0; }
.su-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius, 16px);
  padding: 24px 20px;
}
html[data-theme="light"] .su-card { box-shadow: 0 10px 30px rgba(10, 16, 24, 0.06); }
.su-center { text-align: center; }
.su-lede { margin: 0 0 18px; font-size: 1rem; line-height: 1.55; color: var(--text); }
.su-main > .su-lede { color: var(--text-muted); text-align: center; font-size: 1.05rem; }
.su-h2 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.su-price { margin: 0 0 6px; font-size: 1rem; font-weight: 600; color: var(--text); }
.su-muted, .su-hint { color: var(--text-muted); }
.su-muted { margin: 0 0 16px; font-size: 0.92rem; line-height: 1.5; }
.su-strong { margin: 0 0 4px; font-weight: 700; }
.su-fine { margin: 18px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); text-align: center; }
.su-label {
  margin: 8px 0 6px; font-size: 11px; font-weight: 600; color: var(--brand-text);
  text-transform: uppercase; letter-spacing: 0.22em;
}

/* Steps */
.su-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: su; }
.su-steps li {
  flex: 1; counter-increment: su; font-size: 12px; font-weight: 600; color: var(--text-muted);
  padding-top: 8px; border-top: 3px solid var(--border);
}
.su-steps li::before { content: counter(su) ". "; }
.su-steps li.done { border-top-color: rgba(0, 230, 154, 0.5); }
.su-steps li.now { border-top-color: var(--brand); color: var(--text); }

/* Forms (site .form look) */
.su-form { display: grid; gap: 14px; }
.su-field { display: grid; gap: 6px; }
.su-field label, .su-discount label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.su-input {
  width: 100%; min-height: 46px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 16px;
}
.su-input::placeholder { color: var(--text-muted); opacity: 0.8; }
.su-input:focus { outline: 2px solid var(--su-focus); outline-offset: 1px; border-color: var(--brand); }
.su-input[aria-invalid="true"] { border-color: var(--su-bad); }
.su-input:disabled { opacity: 0.55; cursor: not-allowed; }
.su-upper { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.su-code-input { letter-spacing: 0.4em; font-size: 22px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.su-hint { margin: 0; font-size: 0.8rem; }
.su-field-msg { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.su-field-msg:empty { display: none; }
.su-note { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.su-note[hidden] { display: none; }
.su-bad { color: var(--su-bad) !important; }
.su-ok { color: var(--su-ok) !important; font-weight: 600; }
.su-muted.su-note, .su-note.su-muted { color: var(--text-muted); }
.su-form .su-note { margin: 0; }

/* Buttons (site pill buttons) */
.su-btn {
  min-height: 46px; padding: 10px 22px; border-radius: 999px; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: normal; line-height: 1.25; text-align: center;
}
.su-btn:active { transform: translateY(1px); }
.su-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.su-btn:focus-visible, .su-sso:focus-visible, .su-back:focus-visible, .su-signout:focus-visible, .su-links a:focus-visible {
  outline: 2px solid var(--su-focus); outline-offset: 2px;
}
.su-primary { width: 100%; background: var(--brand); color: var(--su-ink-on-brand); }
.su-primary:not(:disabled):hover { background: var(--brand-2); }
.su-secondary { background: transparent; color: var(--text); border-color: rgba(147, 165, 179, 0.35); }
.su-secondary:not(:disabled):hover { border-color: var(--brand); color: var(--brand-text); }
.su-wide { width: 100%; margin-top: 10px; }
.su-link-btn { background: transparent; border: 0; color: var(--brand-text); padding: 0; min-height: 44px; font-weight: 600; font-size: 0.95rem; border-radius: 0; }
.su-link-btn:disabled { color: var(--text-muted); opacity: 1; }
.su-links { margin-top: 14px; display: grid; gap: 4px; text-align: center; font-size: 0.95rem; }
.su-links a, .su-switch a, .su-note a { color: var(--brand-text); font-weight: 600; text-decoration: none; }
.su-links a:hover, .su-switch a:hover, .su-note a:hover { text-decoration: underline; }
.su-links > a { display: inline-block; padding: 10px 0; justify-self: center; }
.su-switch { margin: 6px 0 0; color: var(--text-muted); text-align: center; font-size: 0.95rem; }
.su-resend { text-align: center; margin-top: 8px; }
.su-inline { display: flex; gap: 8px; }
.su-inline .su-input { flex: 1; min-width: 0; text-transform: uppercase; }
.su-discount { display: grid; gap: 8px; margin: 4px 0 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.su-panel { margin-top: 14px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.su-panel .su-muted { margin-bottom: 12px; }
.su-panel .su-btn { width: 100%; }
.su-panel .su-note { margin: 10px 0 0; }
.su-check {
  width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-soft, rgba(0, 230, 154, 0.12)); color: var(--brand-text); font-size: 30px; font-weight: 800;
}
.su-code-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.su-code {
  font-size: 30px; font-weight: 800; letter-spacing: 0.12em; padding: 8px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed rgba(0, 230, 154, 0.45); color: var(--text); user-select: all; -webkit-user-select: all;
}
.su-copy { min-height: 44px; }
.su-center .su-note { margin-top: 12px; }

/* "or" divider */
.su-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-muted); font-size: 0.8rem; }
.su-or::before, .su-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Official provider buttons (unchanged from the app: Google / Microsoft branding guidelines) ---- */
.su-sso-group { display: grid; gap: 12px; border-radius: 6px; }
.su-sso {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%;
  cursor: pointer; -webkit-appearance: none; appearance: none; margin: 0; white-space: nowrap; overflow: hidden;
}
.su-sso-icon { position: absolute; top: 50%; transform: translateY(-50%); display: flex; }
.su-sso-icon img { display: block; max-width: none; }
.su-sso-text { overflow: hidden; text-overflow: ellipsis; }
.su-sso-google {
  height: 40px; padding: 0 12px 0 42px; border-radius: 4px;
  font-family: "Google Sans", Roboto, Arial, sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: 0.25px;
  background: #FFFFFF; color: #1F1F1F; border: 1px solid #747775;
}
.su-sso-google .su-sso-icon { left: 12px; width: 20px; height: 20px; }
html[data-theme="dark"] .su-sso-google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
.su-sso-google:hover { box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
.su-sso-microsoft {
  height: 41px; padding: 0 12px 0 45px; border-radius: 0;
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  font-weight: 600; font-size: 15px;
  background: #FFFFFF; color: #5E5E5E; border: 1px solid #8C8C8C;
}
.su-sso-microsoft .su-sso-icon { left: 12px; width: 21px; height: 21px; }
html[data-theme="dark"] .su-sso-microsoft { background: #2F2F2F; color: #FFFFFF; border-color: #2F2F2F; }

@keyframes su-attn { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px var(--su-focus); } }
.su-attn { animation: su-attn 1.2s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .su-attn { animation: none; box-shadow: 0 0 0 3px var(--su-focus); } }

/* ---- Light: the site chrome in the light palette (this page only) ---- */
html[data-theme="light"] body.su-site {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 230, 154, 0.10), transparent 55%), var(--ice-white);
  color: var(--midnight);
}
html[data-theme="light"] .su-site .site-header a, html[data-theme="light"] .su-site .site-footer a { color: var(--midnight); }
html[data-theme="light"] .su-site .site-header a:hover, html[data-theme="light"] .su-site .site-footer a:hover { color: #067a52; }
html[data-theme="light"] .su-site .site-header { background: rgba(255, 255, 255, 0.88); border-bottom-color: rgba(10, 16, 24, 0.1); }
html[data-theme="light"] .su-site .brand, html[data-theme="light"] .su-site .brand:hover { color: var(--midnight); }
html[data-theme="light"] .su-site .brand .pulse path { stroke: #00b97c; }
html[data-theme="light"] .su-site .nav a { color: #4E6170; }
html[data-theme="light"] .su-site .nav a.btn-primary { color: var(--midnight); }
html[data-theme="light"] .su-site .menu-toggle { color: var(--midnight); border-color: rgba(10, 16, 24, 0.16); }
html[data-theme="light"] .su-site .eyebrow { color: #067a52; }
html[data-theme="light"] .su-site .site-footer { background: #FFFFFF; border-top-color: rgba(10, 16, 24, 0.1); }
html[data-theme="light"] .su-site .footer-links a, html[data-theme="light"] .su-site .footer-disclaimer { color: #4E6170; }
html[data-theme="light"] .su-site .footer-links strong { color: var(--midnight); }
html[data-theme="light"] .su-site .footer-disclaimer { border-top-color: rgba(10, 16, 24, 0.1); }
html[data-theme="light"] .su-site .footer-grid p { color: #4E6170 !important; }
html[data-theme="light"] .su-site .footer-copy { color: #6B7C89; }
@media (max-width: 760px) {
  html[data-theme="light"] .su-site .nav { background: rgba(255, 255, 255, 0.98); border-bottom-color: rgba(10, 16, 24, 0.1); }
}

@media (max-width: 360px) {
  .su-wrap { padding-left: 14px; padding-right: 14px; }
  .su-code { font-size: 26px; }
}

/* Sign-in didn't finish (#/sso-error) and the sign-ups-off pages (#/waitlist, #/closed): plain pages, no pop-ups. */
.su-actions { display: grid; gap: 0; margin-top: 4px; }
.su-actions .su-wide:first-child { margin-top: 0; }
.su-pause { background: var(--surface-3); color: var(--text-muted); font-size: 22px; letter-spacing: 0.08em; }
.su-note.su-hint-line { margin: 12px 0 0; text-align: center; }

/* Stripe Checkout: price next to "Continue to payment", and the confirming page's spinner. */
.su-panel .su-price { margin: 0 0 12px; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.su-trial-until { margin: 0 0 12px; overflow-wrap: anywhere; }
.su-spin {
  width: 36px; height: 36px; margin: 6px auto 14px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand); animation: su-spin 0.9s linear infinite;
}
@keyframes su-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .su-spin { animation: none; } }

/* After sign-in: Create a group / Join a group (two full-width choices on their own page, no modal). */
.su-choices { display: grid; gap: 12px; }
.su-choice {
  position: relative; display: grid; gap: 4px; padding: 18px 44px 18px 18px; border-radius: var(--radius, 16px);
  background: var(--surface-1); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.su-choice:hover { border-color: var(--brand); }
.su-choice:active { transform: translateY(1px); }
.su-choice:focus-visible { outline: 2px solid var(--su-focus); outline-offset: 2px; }
.su-choice-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.su-choice-text { font-size: 0.92rem; line-height: 1.5; color: var(--text-muted); }
.su-choice-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; color: var(--brand-text); }
html[data-theme="light"] .su-choice { box-shadow: 0 10px 30px rgba(10, 16, 24, 0.06); }
.su-main > .su-lede + .su-choices { margin-top: 0; }

/* Join: group code shown above the handle form, and the new / existing handle switch (radio buttons on the page). */
.su-join-code-row { margin: 0 0 14px; color: var(--text-muted); font-size: 0.9rem; }
.su-join-code-row a { color: var(--brand-text); font-weight: 600; text-decoration: none; margin-left: 6px; }
.su-join-code { font-size: 1.25rem; letter-spacing: 0.12em; color: var(--text); }
.su-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.su-seg-btn {
  min-height: 44px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted);
  font: inherit; font-size: 0.86rem; font-weight: 600; line-height: 1.25; cursor: pointer;
}
.su-seg-btn[aria-checked="true"] { background: var(--surface-1); color: var(--text); box-shadow: 0 0 0 1px var(--brand) inset; }
.su-seg-btn:focus-visible { outline: 2px solid var(--su-focus); outline-offset: 1px; }
.su-panel.su-left { text-align: left; margin-top: 16px; }
.su-pay-hint { margin: 8px 0 0; text-align: center; }
