/* The front page, the sign-up, the privacy notice and the admin page: the app's own look (slate, lime, sage, Manrope),
   roomier, for a phone or a computer. */
@font-face { font-family: "Manrope"; src: url("/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #2a2c35; --card: #383b47; --card-2: #454959; --line: rgba(224,226,210,.1);
  --text: #e0e2d2; --muted: rgba(224,226,210,.7); --faint: rgba(224,226,210,.45);
  --accent: #b4c540; --accent-2: #c3d35a; --ink: #23252d; --good: #3686c9; --bad: #ff6b6b;
  --grad: linear-gradient(135deg, #b4c540, #c9d76a);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(120% 80% at 10% 0%, #343748 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text); font: 500 16px/1.5 var(--font); }
a { color: var(--accent-2); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: var(--text); }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1 { font: 800 clamp(30px, 6vw, 46px)/1.08 var(--font); letter-spacing: -.02em; margin: 0 0 14px; }
h1 span { color: var(--accent-2); }
h2 { font: 800 clamp(25px, 4.5vw, 32px)/1.15 var(--font); letter-spacing: -.015em; margin: 0 0 8px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 22px; max-width: 34em; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--card-2); font-weight: 700; text-decoration: none; color: var(--text); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--grad); color: var(--ink); }
.btn.big { width: 100%; min-height: 56px; font-size: 18px; margin-top: 22px; }
.btn:disabled { opacity: .6; }
.btn:active { transform: scale(.98); }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 6px 4px; letter-spacing: .02em; }
.field input, .find input, .pc input { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: rgba(255,255,255,.05); font-size: 18px; outline: none; transition: border-color .15s, background .15s; }
.field input:focus, .find input:focus, .pc input:focus { border-color: var(--accent); background: rgba(255,255,255,.08); }
::placeholder { color: var(--faint); }
.addr { display: flex; align-items: center; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255,255,255,.05); overflow: hidden; }
.addr:focus-within { border-color: var(--accent); }
.addr input { border: 0 !important; background: none !important; min-width: 0; flex: 1; padding-right: 2px !important; font-weight: 700; }
.addr span { padding: 0 16px 0 0; color: var(--muted); font-size: 16px; white-space: nowrap; }
.hint { font-size: 14px; color: var(--faint); margin: 2px 4px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hint svg { width: 18px; height: 18px; stroke-width: 3; }
.hint.ok { color: #9ad97f; } .hint.bad { color: var(--bad); }

/* the front page */
.hero { max-width: 760px; margin: 0 auto; padding: max(48px, 8vh) 22px 40px; }
.hero-logo, .step-logo { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.feats.tight { margin: 4px 0 6px; }
.feat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.05); }
.feat i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(180,197,64,.16); color: var(--accent-2); margin-bottom: 6px; }
.feat i svg { width: 22px; height: 22px; }
.feat b { font-weight: 800; } .feat span { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); }
.foot { margin-top: 30px; font-size: 14px; }
@media (max-width: 620px) { .feats { grid-template-columns: 1fr; } .feat { flex-direction: row; align-items: center; gap: 12px; } .feat i { margin: 0; flex: none; }
  .feat b { display: block; } .feat > :not(i) { flex: 1; } }
@media (max-width: 620px) { .feat { display: grid; grid-template-columns: 40px 1fr; } .feat i { grid-row: span 2; } }

/* the sign-up: steps on the right, their app filling in on the left (wide screens) */
.wiz { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.wiz-side { display: none; }
.wiz-main { width: 100%; max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px calc(env(safe-area-inset-bottom, 0px) + 30px); }
@media (min-width: 900px) {
  .wiz { grid-template-columns: minmax(380px, 1fr) minmax(480px, 1.15fr); }
  .wiz-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; position: sticky; top: 0; height: 100dvh;
    background: radial-gradient(70% 60% at 50% 45%, rgba(180,197,64,.14), transparent 70%); }
  .wiz-main { align-self: center; padding: 60px 48px; margin: 0; }
}
.wiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.back { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.06); display: grid; place-items: center; }
.back svg { width: 22px; height: 22px; }
.dots { display: flex; gap: 6px; flex: 1; }
.dots i { height: 5px; flex: 1; border-radius: 3px; background: rgba(255,255,255,.1); transition: background .3s; }
.dots i.done { background: rgba(180,197,64,.55); } .dots i.on { background: var(--accent); }
.count { font-size: 13px; color: var(--faint); font-weight: 700; }
.step.fwd { animation: in-r .35s cubic-bezier(.2,.9,.3,1); } .step.bwd { animation: in-l .35s cubic-bezier(.2,.9,.3,1); }
@keyframes in-r { from { opacity: 0; transform: translateX(26px); } } @keyframes in-l { from { opacity: 0; transform: translateX(-26px); } }

/* people */
.pcs { display: flex; flex-direction: column; gap: 12px; }
.pc { display: grid; grid-template-columns: 60px 1fr 32px; gap: 10px 12px; padding: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  animation: pop .3s cubic-bezier(.2,.9,.3,1); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.pc-em { width: 60px; height: 60px; border-radius: 18px; font-size: 30px; font-weight: 800; transition: transform .15s; }
.pc-em:active { transform: scale(.94); }
.pc-names { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc input { min-height: 44px; font-size: 16px; border-radius: 12px; }
.pc-x { width: 32px; height: 32px; border-radius: 50%; color: var(--faint); font-size: 22px; line-height: 1; }
.pc-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: rgba(255,255,255,.06); border-radius: 999px; padding: 3px; }
.seg button { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card-2); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.pc-cols { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-cols button { width: 28px; height: 28px; border-radius: 50%; }
.pc-cols button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
.pc-emojis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding-top: 4px; animation: pop .25s; }
.pc-emojis button { height: 44px; border-radius: 12px; font-size: 24px; background: rgba(255,255,255,.05); }
.pc-emojis button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.adds { display: flex; gap: 10px; margin: 14px 0 8px; } .adds .btn { flex: 1; }

/* home */
.find { display: flex; gap: 10px; } .find input { flex: 1; min-width: 0; }
.wxcard { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); animation: pop .3s; }
.wxcard.loading { color: var(--muted); }
.wxcard .wx { width: 64px; height: 64px; flex: none; }
.wxcard b { display: block; font-size: 20px; } .wxcard span { color: var(--muted); }
.wx { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.wx .s, .wx > circle, .wx > path:not([class]) { stroke: #ffc94d; }
.wx .c { stroke: #e8eef7; fill: rgba(232,238,247,.12); }
.wx .m { stroke: #f2e6a8; } .wx .r { stroke: #7cc0ff; } .wx .f { stroke: #c9d0dc; } .wx .l { stroke: #ffd84d; } .wx .sn { stroke: #fff; }

/* privacy */
.promises { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.promise { display: flex; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.04); }
.promise i { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: rgba(54,134,201,.2); color: #8fc2ee; }
.promise i svg { width: 21px; height: 21px; }
.promise b { display: block; } .promise span { color: var(--muted); font-size: 14px; }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; cursor: pointer; }
.tick input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.tick small { display: block; color: var(--faint); font-size: 13px; margin-top: 2px; }

/* done */
.tada { font-size: 64px; margin-bottom: 8px; animation: pop .5s; }
.qrbox { display: flex; gap: 20px; align-items: center; padding: 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.qrbox .qr { width: 170px; flex: none; background: #fff; padding: 10px; border-radius: 16px; }
.qrbox .qr svg { display: block; width: 100%; height: auto; }
.qrbox b { display: block; font-size: 18px; } .qrbox span { color: var(--muted); }

/* the live preview: their app, on a phone */
.pv-phone { width: 300px; height: 610px; border-radius: 48px; padding: 12px; background: #15161b; box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 2px #3b3e4c; }
.pv-screen { position: relative; height: 100%; border-radius: 38px; background: var(--bg); padding: 46px 16px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.pv-screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; border-radius: 14px; background: #000; }
.pv-top { display: flex; align-items: center; justify-content: space-between; }
.pv-top b { font: 800 26px var(--font); }
.pv-wx { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; }
.pv-wx .wx { width: 22px; height: 22px; }
.pv-hello { color: var(--muted); font-size: 14px; margin-top: -6px; }
.pv-card { background: var(--card); border-radius: 22px; padding: 12px 12px 6px; }
.pv-day { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.pv-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pv-row:first-of-type { border-top: 0; }
.pv-e { font-style: normal; width: 22px; text-align: center; }
.pv-sq { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; font-size: 12px; font-weight: 800; font-style: normal; margin-right: 6px; }
.pv-people { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-badge { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; animation: pop .25s; }
.pv-hint { color: var(--faint); font-size: 13px; }
.pv-name { margin-top: auto; text-align: center; color: var(--faint); font-weight: 700; font-size: 13px; }
.pv-addr { margin-top: 18px; color: var(--muted); font-size: 15px; } .pv-addr b { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #e8ead8; color: var(--ink); padding: 12px 18px; border-radius: 16px; font-weight: 700; max-width: calc(100% - 32px); transition: .25s; z-index: 9; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* the privacy notice */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 22px 60px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--muted); } .doc b { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; } .doc td, .doc th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.doc th { color: var(--text); }
.doc .summary { margin: 20px 0; }

/* the admin page */
.adm { max-width: 980px; margin: 0 auto; padding: 32px 20px 60px; }
.adm h1 { font-size: 32px; } .adm h2 { font-size: 20px; margin: 28px 0 10px; }
.adm table { width: 100%; border-collapse: collapse; } .adm td, .adm th { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); font-size: 15px; }
.adm th { color: var(--muted); font-size: 13px; }
.adm .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm .row input { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255,255,255,.05); flex: 1; min-width: 200px; }
.adm .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.adm .stat { padding: 14px 16px; border-radius: 18px; background: var(--card); } .adm .stat b { display: block; font-size: 28px; } .adm .stat span { color: var(--muted); font-size: 13px; }
.adm .small { font-size: 13px; color: var(--faint); }
.adm .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.adm .btn.danger { color: var(--bad); }
.adm .made { display: flex; gap: 18px; align-items: center; margin-top: 12px; } .adm .made .qr { width: 140px; background: #fff; padding: 8px; border-radius: 12px; }
.adm .made .qr svg { display: block; width: 100%; height: auto; } .adm code { word-break: break-all; color: var(--text); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); }
.pill.on { background: rgba(154,217,127,.2); color: #9ad97f; } .pill.off { background: rgba(255,107,107,.18); color: var(--bad); }
.qr svg, .qr svg * { stroke: none; }            /* (a QR is filled squares: the icons' outline style would smudge it) */

/* The privacy step: a letter from the person who runs it */
.letter { margin-bottom: 18px; }
.letter .from { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.letter .face { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal;
  font-weight: 800; font-size: 22px; background: linear-gradient(135deg, #ffb870, #f48fb8); color: #2a2c35; }
.letter .from b { display: block; font-size: 22px; } .letter .from span { color: var(--muted); font-size: 14px; }
.letter p, .plain { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.plain b { color: var(--text); }
.card.ask { margin: 4px 0 10px; } .card.ask p { color: var(--muted); font-size: 14px; margin: 8px 0; line-height: 1.45; }
.sig { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 30px; margin: 4px 4px 12px; opacity: .85; }

/* A screen being paired (screen.js) */
body.screen { min-height: 100dvh; }
.scr-pair { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 80px); padding: 32px; flex-wrap: wrap; }
.scr-qr { background: #fff; padding: clamp(14px, 2vw, 22px); border-radius: 28px; width: clamp(220px, 34vw, 420px); }
.scr-qr svg { display: block; width: 100%; height: auto; }
.scr-say { max-width: 520px; } .scr-logo { width: 64px; height: 64px; border-radius: 16px; }
.scr-say h1 { font-size: clamp(28px, 4vw, 44px); margin: 14px 0; } .scr-say ol { padding-left: 22px; color: var(--muted); font-size: clamp(16px, 2vw, 21px); line-height: 1.5; }
.scr-code { font-size: clamp(44px, 7vw, 84px); font-weight: 800; line-height: 1; letter-spacing: .12em; color: var(--accent); margin: 10px 0 14px; }
.scr-small { color: var(--faint); font-size: 14px; }
.scr-wait, .scr-ask { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 14px; }
.scr-ask .addr { width: min(420px, 100%); }
