/* join.css - the email-first sign-up (/join, /join/code, /join/profile, /join/install).
   Mockup: _scratch/design-mockups/signup-v1-mockup.html. Dark is the bare :root default,
   matching theme.css; light when theme.js stamps data-theme="light". The brand bar keeps
   the fixed brand chrome in both themes, as the app's header does. */

:root {
    --j-bg: #000;
    --j-panel: #101418;
    --j-panel2: #171d23;
    --j-inset: #0b0f13;
    --j-line: #242c34;
    --j-line2: #313b45;
    --j-fg: #eef3f7;
    --j-fg2: #c2ccd5;
    --j-muted: #8b98a4;
    --j-faint: #66727d;
    --j-accent: #59c1ee;
    --j-accent-ink: #7fd2f5;
    --j-on-accent: #04141c;
    --j-good: #37b96b;
    --j-good-tint: rgba(55, 185, 107, .14);
    --j-warn: #e8a33c;
    --j-bad: #ff8a80;
    --j-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .45);
    --j-mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}
:root[data-theme="light"] {
    --j-bg: #eef1f5;
    --j-panel: #fff;
    --j-panel2: #eef2f6;
    --j-inset: #f4f7fa;
    --j-line: #dde4ea;
    --j-line2: #c8d2db;
    --j-fg: #182129;
    --j-fg2: #3c4954;
    --j-muted: #64717d;
    --j-faint: #8b97a2;
    --j-accent: #2b8fc4;
    --j-accent-ink: #1877b0;
    --j-on-accent: #fff;
    --j-good: #1e8e4f;
    --j-good-tint: rgba(30, 142, 79, .12);
    --j-warn: #b3731a;
    --j-bad: #c0392b;
    --j-shadow: 0 1px 2px rgba(20, 35, 50, .08), 0 14px 34px rgba(20, 35, 50, .12);
}

* { box-sizing: border-box; }
body.join {
    margin: 0; min-height: 100vh; background: var(--j-bg); color: var(--j-fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.join h1, .join p { margin: 0; }
.join a { color: var(--j-accent-ink); }

/* ---- brand bar ---- */
.join-bar {
    display: flex; align-items: center; gap: 20px; padding: 8px 24px;
    background: var(--chrome-bg, #00497e); color: var(--chrome-fg, #fff);
}
.join-logo img { display: block; }
.join-right { margin-left: auto; font-size: 14px; font-weight: 600; }
.join-right a { color: var(--chrome-fg, #fff); text-decoration: none; }
.join-me { display: inline-flex; align-items: center; gap: 9px; }
.join-av {
    width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .18);
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
}
.join-prog { list-style: none; display: flex; gap: 18px; align-items: center; margin: 0 auto; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--chrome-muted, #cfe4f5); }
.join-prog li { display: flex; align-items: center; gap: 7px; opacity: .65; }
.join-prog li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.join-prog li.done { opacity: .9; }
.join-prog li.done::before { background: #37b96b; }
.join-prog li.on { opacity: 1; color: #fff; }
.join-prog li.on::before { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }

/* ---- main ---- */
.join-main { display: flex; justify-content: center; padding: 44px 16px 64px; }
.join-card {
    width: 100%; max-width: 440px; background: var(--j-panel); border: 1px solid var(--j-line);
    border-radius: 14px; padding: 30px 32px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--j-shadow);
}
.join-card h1 { font-size: 23px; letter-spacing: -.01em; text-wrap: balance; }
.join .lede { color: var(--j-fg2); font-size: 14.5px; margin-top: 6px; }
.join-stack { display: flex; flex-direction: column; gap: 16px; }

.join-field { display: flex; flex-direction: column; gap: 6px; }
.join-field label { font-size: 12.5px; font-weight: 700; color: var(--j-fg2); }
.join-help { font-size: 12.5px; color: var(--j-faint); }
.join-input {
    font: inherit; font-size: 15px; width: 100%; background: var(--j-inset); color: var(--j-fg);
    border: 1px solid var(--j-line2); border-radius: 9px; padding: 12px 14px;
}
.join-input:focus, .join-box:focus { outline: none; border-color: var(--j-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--j-accent) 25%, transparent); }
.join-input.ro { color: var(--j-muted); }
.join-inwrap { position: relative; }
.join-inwrap .join-input { padding-right: 150px; }
.join-tag { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--j-muted); max-width: 140px; text-align: right; }
.join-tag.ok { color: var(--j-good); }
.join-tag.bad { color: var(--j-warn); cursor: pointer; }

.join-btn {
    display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 9px; padding: 13px 20px;
    font: inherit; font-weight: 700; font-size: 15px; background: var(--j-accent); color: var(--j-on-accent); cursor: pointer; text-decoration: none;
}
.join-btn:hover { filter: brightness(1.08); }
/* A link styled as a button keeps the button's colours - ".join a" (the link colour) otherwise
   wins and paints accent text on the accent button (Start free trial, Go to my dashboard). */
.join a.join-btn { color: var(--j-on-accent); text-decoration: none; }
.join a.join-btn.ghost { color: var(--j-fg); }
.join-btn:focus-visible, .join-linkbtn:focus-visible, .join a:focus-visible { outline: 2px solid var(--j-accent); outline-offset: 2px; }
.join-btn[disabled] { opacity: .6; cursor: default; }
.join-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--j-accent-ink); cursor: pointer; }
.join-linkbtn[disabled] { color: var(--j-muted); cursor: default; }
.join-link { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.join-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.join-fine { font-size: 12.5px; color: var(--j-muted); }
.join-err { color: var(--j-bad); font-size: 13.5px; margin: 0; padding: 0; list-style: none; }
.join-err:empty { display: none; }
.join-note { color: var(--j-good); font-size: 13.5px; }

/* ---- code boxes ---- */
.join-boxes { display: grid; grid-template-columns: repeat(3, 1fr) 14px repeat(3, 1fr); gap: 8px; align-items: center; }
.join-box {
    width: 100%; min-width: 0; height: 60px; border-radius: 10px; border: 1px solid var(--j-line2); background: var(--j-inset);
    color: var(--j-fg); text-align: center; font-family: var(--j-mono); font-size: 28px; font-weight: 700; padding: 0;
}
.join-dash { text-align: center; color: var(--j-faint); }

/* ---- password checklist ---- */
.join-checks { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; font-size: 12.5px; color: var(--j-muted); }
.join-checks li::before { content: "○ "; color: var(--j-faint); }
.join-checks li.ok { color: var(--j-good); }
.join-checks li.ok::before { content: "✓ "; color: var(--j-good); }

/* ---- install ---- */
.join-install { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.join-install h1 { font-size: 27px; letter-spacing: -.02em; }
.join-trial { display: inline-block; margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--j-good); background: var(--j-good-tint); border-radius: 7px; padding: 4px 10px; }
.join-steps { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.join-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; background: var(--j-panel); border: 1px solid var(--j-line); border-radius: 12px; padding: 16px 18px; }
.join-steps .sn { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--j-line2); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--j-muted); font-size: 13px; }
.join-steps li.now { border-color: var(--j-accent); }
.join-steps li.now .sn { border-color: var(--j-accent); color: var(--j-accent-ink); }
.join-steps li.done .sn { border-color: var(--j-good); background: var(--j-good); color: var(--j-on-accent); }
.join-steps b { font-size: 15px; }
.join-steps p { font-size: 13.5px; color: var(--j-muted); margin-top: 3px; }
.join-steps p b { font-size: inherit; color: var(--j-fg2); }
.join-store {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; background: var(--j-fg); color: var(--j-bg) !important;
    border-radius: 9px; padding: 9px 16px; font-weight: 700; font-size: 13.5px; text-decoration: none;
}
.join-later { margin-top: 20px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--j-muted); }
.join-status { background: var(--j-panel); border: 1px solid var(--j-line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.join-status .k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--j-faint); }
.join-status .wait { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.join-status p { font-size: 13px; color: var(--j-muted); }
.join-status.ok { border-color: var(--j-good); background: linear-gradient(var(--j-good-tint), var(--j-good-tint)), var(--j-panel); }
.join-status .okline { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 800; color: var(--j-good); }
.join-status .okline i { width: 26px; height: 26px; border-radius: 50%; background: var(--j-good); color: var(--j-on-accent); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 14px; }
.pulse { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--j-warn); animation: join-pulse 1.8s infinite; }
@keyframes join-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--j-warn) 60%, transparent); }
    70%, 100% { box-shadow: 0 0 0 12px transparent; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

@media (max-width: 760px) {
    .join-bar { flex-wrap: wrap; gap: 8px 16px; padding: 8px 16px; }
    .join-prog { order: 3; width: 100%; justify-content: center; margin: 0 0 4px; }
    .join-main { padding-top: 24px; }
    .join-card { padding: 24px 20px; }
    .join-install { grid-template-columns: 1fr; }
    .join-checks { grid-template-columns: 1fr; }
    .join-box { height: 52px; font-size: 24px; }
}

/* ---- /connect (client browser sign-in) ---- */
.join-btn.ghost { background: transparent; border: 1px solid var(--j-line2); color: var(--j-fg); }
.join-acts { display: flex; gap: 10px; }
.join-acts .join-btn { flex: 1; }
.join-device { display: flex; gap: 14px; align-items: center; background: var(--j-panel2); border-radius: 10px; padding: 14px 16px; color: var(--j-fg2); }
.join-device svg { flex: none; }
.join-device b { display: block; color: var(--j-fg); }
.join-device span { font-size: 12.5px; color: var(--j-muted); }
.join-perms { margin: 0; padding-left: 18px; color: var(--j-fg2); font-size: 14px; }
.join-perms li { margin-bottom: 4px; }

/* ---- /buy (web app trial first, PC Version beside it) ---- */
.buy { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 26px; }
.buy-intro { text-align: center; }
.buy-intro h1 { font-size: 32px; letter-spacing: -.02em; text-wrap: balance; }
.buy-intro .lede { font-size: 16px; margin-top: 10px; }
.buy-have { background: var(--j-good-tint); border: 1px solid var(--j-good); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--j-fg2); max-width: 640px; margin: 0 auto; }
.buy-have b { color: var(--j-good); }
.buy-have a { font-weight: 600; text-decoration: none; margin-left: 6px; }
.buy-editions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: stretch; }
.buy-editions.solo { grid-template-columns: minmax(0, 640px); justify-content: center; }
.buy-ed { background: var(--j-panel); border: 1px solid var(--j-line); border-radius: 16px; padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.buy-ed.lead { border: 2px solid var(--j-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--j-accent) 12%, transparent); }
.buy-ed h2 { font-size: 22px; letter-spacing: -.01em; }
.buy-ed .sub { color: var(--j-fg2); font-size: 14px; margin: 0; }
.buy-tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--j-accent-ink);
    background: color-mix(in srgb, var(--j-accent) 15%, transparent); border-radius: 6px; padding: 3px 8px; }
.buy-tag.quiet { color: var(--j-muted); background: var(--j-panel2); }
.buy-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.buy-price small { font-size: 14px; font-weight: 600; color: var(--j-muted); margin-left: 6px; letter-spacing: 0; }
.buy-ed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--j-fg2); }
.buy-ed li::before { content: "\2713"; color: var(--j-good); font-weight: 800; margin-right: 9px; }
.buy-ed li.no { color: var(--j-muted); }
.buy-ed li.no::before { content: "\2013"; color: var(--j-faint); }
.buy-ed .join-btn { margin-top: auto; }
.buy-ed .join-fine { text-align: center; }
.buy-compare h2 { font-size: 15px; margin-bottom: 10px; }
.buy-table { overflow-x: auto; }
.buy-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.buy-table th, .buy-table td { padding: 10px 12px; border-bottom: 1px solid var(--j-line); text-align: left; }
.buy-table th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--j-faint); }
.buy-table th + th, .buy-table td + td { text-align: center; width: 24%; }
.buy-table td.y { color: var(--j-good); font-weight: 800; }
.buy-table td.n { color: var(--j-faint); }
.buy-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; font-size: 13.5px; color: var(--j-fg2); }
.buy-faq b { display: block; color: var(--j-fg); margin-bottom: 2px; }
.buy-thanks { max-width: 520px; }
.buy-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.buy-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--j-fg2); }
.buy-steps .sn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--j-accent); color: var(--j-accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.buy-steps b { color: var(--j-fg); display: block; }
/* Signed-in buyers: their account flights can come with them (spec 13a). */
.buy-carry { font-size: 14px; color: var(--j-fg2); border: 1px solid var(--j-line); border-radius: 10px; padding: 12px 14px; }
.buy-carry b { color: var(--j-fg); }
@media (max-width: 760px) {
    .buy-editions, .buy-faq { grid-template-columns: 1fr; }
    .buy-intro h1 { font-size: 26px; }
}
