@font-face {
  font-family: 'Manrope';
  src: url('./vendor/manrope/manrope-latin-wght-normal.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --ink: #141a18;
  --ink-2: #4b5652;
  --muted: #78837e;
  --hair: #dde3dd;
  --accent: #12946a;
  --accent-ink: #0c6e4f;
  --qr: #eb6834;
  --official: #2a78d6;
  --danger: #cf3b3b;
  --ok: #0ca30c;
  --radius: 10px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1311;
    --surface: #171c1a;
    --surface-2: #1f2523;
    --ink: #f1f4f0;
    --ink-2: #b9c2bc;
    --muted: #8a958f;
    --hair: #2a322e;
    --accent: #2bb184;
    --accent-ink: #58d3a9;
    --qr: #d95926;
    --official: #3987e5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.85em; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 20px; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: 0.85rem; color: var(--ink-2); font-weight: 600; }
input, select { font: inherit; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 8px; background: var(--bg); color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: transparent; }
.btn.small { padding: 5px 9px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: default; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.logo { font-size: 1.3rem; }
.brand-word { color: var(--ink); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.055em; }
.brand-word span { color: var(--accent); }
.error { color: var(--danger); font-size: 0.85rem; min-height: 1em; margin: 0; }

.tabs { display: flex; gap: 4px; }
.tab { font: inherit; font-weight: 600; font-size: 0.9rem; padding: 7px 12px; border: 0; background: transparent; color: var(--ink-2); border-radius: 8px; cursor: pointer; }
.tab[aria-selected='true'] { background: var(--surface-2); color: var(--ink); }

.auth-wrap {
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.1fr);
  background: #fffdf8;
  color: #17201c;
}
.auth-story {
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 88%, rgba(57, 217, 163, 0.28), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(255, 114, 94, 0.18), transparent 27%),
    #0b3428;
  color: #fff;
}
.auth-story::before,
.auth-story::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  pointer-events: none;
}
.auth-story::before { width: 440px; height: 440px; right: -210px; bottom: -110px; }
.auth-story::after { width: 620px; height: 620px; right: -300px; bottom: -200px; }
.auth-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.075em;
  position: relative;
  z-index: 1;
  width: fit-content;
}
.auth-brand span { color: #39d9a3; }
.auth-brand-mobile { display: none; color: #17201c; }
.auth-brand-mobile span { color: #087a57; }
.auth-story-copy { margin: auto 0; position: relative; z-index: 1; max-width: 620px; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9bf2d2;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-story h1 {
  margin: 18px 0 16px;
  max-width: 680px;
  font-size: clamp(2.55rem, 4.5vw, 4.8rem);
  line-height: .99;
  letter-spacing: -.07em;
}
.auth-story h1 em { color: #52ddb0; font-style: normal; }
.auth-story-copy > p { margin: 0; max-width: 560px; color: rgba(255,255,255,.72); font-size: clamp(1rem, 1.35vw, 1.22rem); }
.auth-benefits { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 11px; }
.auth-benefits li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.78); }
.auth-benefits li > i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: rgba(57,217,163,.16); color: #74e8c2; font-size: .9rem; }
.auth-benefits strong { color: #fff; font-weight: 750; }
.auth-proof { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.proof-icon { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.07); border-radius: 12px; display: grid; place-items: center; color: #74e8c2; font-size: 1.25rem; }
.auth-proof div:last-child { display: grid; gap: 1px; }
.auth-proof strong { font-size: .82rem; }
.auth-proof span { color: rgba(255,255,255,.55); font-size: .72rem; }
.auth-main {
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px clamp(32px, 5vw, 72px);
  background: #fffdf8;
}
.auth-card { width: min(460px, 100%); display: grid; gap: 12px; }
.auth-heading { display: grid; gap: 4px; }
.auth-kicker { color: #087a57; font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; color: #17201c; font-size: clamp(2rem, 3vw, 2.35rem); line-height: 1.08; letter-spacing: -.055em; }
.auth-heading p { margin: 0; color: #68746f; font-size: .86rem; }
.google-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9ddd8;
  border-radius: 12px;
  background: #fff;
  color: #26312d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(13,41,31,.03);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.google-button:hover { border-color: #abb5b0; box-shadow: 0 7px 22px rgba(13,41,31,.07); transform: translateY(-1px); }
.google-button:focus-visible { outline: 3px solid rgba(8,122,87,.2); outline-offset: 2px; }
.google-button svg { width: 20px; height: 20px; flex: 0 0 auto; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: #8a9490; font-size: .68rem; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: #e5e8e4; }
.auth-divider span { white-space: nowrap; }
.auth-form { display: grid; gap: 9px; }
.field { display: grid; gap: 4px; color: #26312d; font-size: .76rem; font-weight: 750; }
.input-shell {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #dfe3de;
  border-radius: 11px;
  color: #84908a;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input-shell:focus-within { border-color: #087a57; box-shadow: 0 0 0 3px rgba(8,122,87,.11); }
.field[data-invalid='true'] .input-shell { border-color: #c94c4c; box-shadow: 0 0 0 3px rgba(201,76,76,.08); }
.input-shell > i { font-size: 1.1rem; }
.input-shell input { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #17201c; font: inherit; font-weight: 500; }
.input-shell input::placeholder { color: #a1aaa5; }
.input-shell input:focus { outline: 0; border: 0; }
.password-toggle { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #73807a; display: grid; place-items: center; cursor: pointer; font-size: 1.05rem; }
.password-toggle:hover { background: #f0f4f1; color: #17201c; }
.password-hint { color: #7b8781; font-size: .62rem; font-weight: 500; line-height: 1.3; }
.field-error { display: none; color: #b83d3d; font-size: .72rem; font-weight: 600; }
.field[data-invalid='true'] .field-error { display: block; }
.auth-submit { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 1px; border-radius: 11px; box-shadow: 0 10px 24px rgba(8,122,87,.18); }
.auth-submit i { font-size: 1rem; transition: transform .18s; }
.auth-submit:hover i { transform: translateX(3px); }
.auth-submit[aria-busy='true'] i { animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-error { min-height: 0; text-align: center; line-height: 1.4; }
.auth-error:not(:empty) { padding: 10px 12px; border-radius: 9px; background: #fff0ed; }
.auth-legal { margin: 0; color: #87918d; text-align: center; font-size: .62rem; line-height: 1.35; }
.auth-switch { margin: 0; color: #6d7973; text-align: center; font-size: .78rem; }
.auth-switch button { border: 0; background: transparent; padding: 3px; color: #087a57; font: inherit; font-weight: 800; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.topbar #nav { margin-right: auto; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.wrap { max-width: 940px; margin: 0 auto; padding: 24px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }

.list { display: grid; gap: 10px; }
.item { border: 1px solid var(--hair); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); display: grid; gap: 10px; }
.item-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.pill { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--hair); }
.pill.qr { color: var(--qr); border-color: var(--qr); }
.pill.official { color: var(--official); border-color: var(--official); }
.pill.mock { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.connected { background: var(--ok); }
.dot.connecting { background: #e0a400; }
.dot.disconnected, .dot.banned, .dot.created { background: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; word-break: break-all; }
.qr-box { display: grid; place-items: center; gap: 8px; padding: 14px; background: var(--surface-2); border-radius: 8px; }
.qr-box img { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; border-radius: 6px; }
.secret { background: var(--surface-2); border: 1px dashed var(--accent); border-radius: 8px; padding: 10px 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hair); }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 0.88rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--hair); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; }
.plan .price { font-size: 1.3rem; font-weight: 800; }
@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: auto; }
  .auth-story { display: none; }
  .auth-main { place-items: start center; height: auto; min-height: 100vh; padding: 20px clamp(20px, 7vw, 72px) 26px; }
  .auth-main .auth-brand-mobile { display: block; justify-self: start; margin-bottom: 26px; }
}
@media (max-width: 640px) {
  .wrap, .topbar { padding-left: 14px; padding-right: 14px; }
  .auth-main { padding: 20px 20px 28px; }
  .auth-main .auth-brand-mobile { margin-bottom: 22px; }
  .auth-card { gap: 12px; }
  .auth-heading h2 { font-size: 2rem; }
}
