/* The public Invite link page (2026-11-07). From the approved mockup docs/mocks/connect-page.html, with the panel's
   colour tokens (DESIGN.md) and Mulish; colour only for state (green = done / found, rose = refused). */
:root {
  --bg: #ffffff; --surface: #f9f6fb; --surface-2: #f2eaf8; --border: #e8ddf2;
  --text: #2d0150; --muted: #7C6B8D; --purple: #410270; --purple-light: #5a0a94;
  --new: #00A880; --new-text: #008263; --danger: #D92D55; --danger-text: #a8213f; --amber-text: #A36200;
  --ring: rgba(90, 10, 148, .14); --shadow: 0 4px 24px rgba(65, 2, 112, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #150a24; --surface: #1d1030; --surface-2: #26173d; --border: #3a2555; --text: #f0e8f7; --muted: #a898b8;
    --purple: #c98cff; --purple-light: #c98cff; --new-text: #00C99A; --danger: #DE4A6C; --danger-text: #ff7b98;
    --amber-text: #FF9900; --ring: rgba(201, 140, 255, .2); --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 'Mulish', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--purple-light); font-weight: 700; }
a:focus-visible, button:focus-visible, summary:focus-visible, .drop:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { border-bottom: 1px solid var(--border); }
.top-in { max-width: 680px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 10px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: #410270; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 13px; }
.brand { font-weight: 800; color: var(--purple); letter-spacing: -.2px; }

main { max-width: 680px; margin: 0 auto; padding: 36px 20px 80px; }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.6px; color: var(--purple); margin: 0 0 12px; font-weight: 800; }
.greet { font-size: 17px; font-weight: 800; color: var(--text); margin: 0 0 6px; overflow-wrap: anywhere; }
.lede { font-size: 17px; margin: 0 0 34px; max-width: 60ch; }
h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 800; }

ol.steps { list-style: none; margin: 0 0 30px; padding: 0; counter-reset: s; scroll-margin-top: 16px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr 150px; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--border); }
ol.steps li:last-child { border-bottom: 1px solid var(--border); }
ol.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--purple); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.st-t { font-weight: 700; }
.st-d { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ill { width: 150px; height: 84px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: block; }

.card { border: 1px solid var(--border); border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); padding: 22px; margin: 0; }
.drop { border: 2px dashed var(--border); border-radius: 12px; background: var(--surface); padding: 30px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--purple-light); background: var(--surface-2); }
.drop .big { font-weight: 800; font-size: 17px; color: var(--purple); }
.drop .small { font-size: 14px; color: var(--muted); margin-top: 4px; }
.file { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.file .ic { flex: none; width: 36px; height: 40px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font: 500 11px 'JetBrains Mono', monospace; color: var(--purple); }
.file-txt { min-width: 0; }
.file .nm { font-weight: 700; overflow-wrap: anywhere; }
.file .meta { font-size: 13px; color: var(--new-text); font-weight: 700; }
.file .chg { margin-left: auto; flex: none; font-size: 14px; background: none; border: none; color: var(--purple-light); font-weight: 700; cursor: pointer; font-family: inherit; padding: 6px 0 6px 8px; }
.err { border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 6%, var(--bg)); color: var(--danger-text); border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-top: 12px; }
.err b { display: block; margin-bottom: 2px; }
.err a { color: inherit; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 4px; }
.fields .full { grid-column: 1 / -1; }
label.f { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
label.f span { color: var(--muted); font-weight: 500; }
input[type=text], input[type=email] { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; outline: none; }
input[type=text]:focus, input[type=email]:focus { border-color: var(--purple-light); box-shadow: 0 0 0 4px var(--ring); }

.privacy { margin: 18px 0; padding: 14px 16px; border-radius: 12px; background: var(--surface); font-size: 14px; color: var(--muted); }
.privacy .ph { color: var(--amber-text); font-weight: 700; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 0 0 18px; cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--purple-light); }
.turnstile { min-height: 65px; margin-bottom: 16px; }

.btn { width: 100%; font: inherit; font-weight: 800; font-size: 16px; border: none; border-radius: 12px; padding: 14px; background: #410270; color: #fff; cursor: pointer; }
.btn[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.btn.busy { background: #410270; color: #fff; cursor: progress; }
.btn .spin { display: none; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
.btn.busy .spin { display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }

.faq { margin-top: 34px; }
details { border-top: 1px solid var(--border); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.center { text-align: center; padding: 30px 10px; }
.center h1 { font-size: 26px; overflow-wrap: anywhere; }
.center p { color: var(--muted); max-width: 44ch; margin: 0 auto 6px; }
.badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.ok { background: color-mix(in srgb, var(--new) 14%, var(--bg)); color: var(--new); }
.no { background: var(--surface-2); color: var(--muted); }
.num { font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--text); }
.loader { width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid var(--surface-2); border-top-color: var(--purple-light); border-radius: 50%; animation: sp .8s linear infinite; }

footer { max-width: 680px; margin: 0 auto; padding: 0 20px 30px; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .loader, .btn .spin { animation-duration: 2.4s; } .drop { transition: none; } }

/* Phone (the mockup's layout): steps without drawings, one field per row, tighter padding so Turnstile's 300px
   widget fits a 375px screen (375 - 2x16 page - 2x16 card = 311px). */
@media (max-width: 600px) {
  main { padding: 26px 16px 60px; }
  .top-in, footer { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 25px; }
  ol.steps li { grid-template-columns: 30px 1fr; gap: 12px; }
  .ill { display: none; }
  .card { padding: 16px; }
  .fields { grid-template-columns: 1fr; }
}
