/* JoMoCo Social CI in a calm, minimal form on warm white: deep navy ink, indigo accent,
   Vend Sans (self-hosted, no third-party requests). Always light, also inside GHL.
   The brand gradient appears only on the balance and the sign-in headline. */
@font-face { font-family:"Vend Sans"; font-weight:400; font-display:swap; src:url("/fonts/vend-sans-regular.woff2") format("woff2"); }
@font-face { font-family:"Vend Sans"; font-weight:600; font-display:swap; src:url("/fonts/vend-sans-600.woff2") format("woff2"); }
@font-face { font-family:"Vend Sans"; font-weight:700; font-display:swap; src:url("/fonts/vend-sans-700.woff2") format("woff2"); }
:root {
  --bg:#faf8f4; --surface:#fff; --tint:#f3f0ea; --ink:#07071a; --muted:#5e5e72; --line:#ebe7df;
  --accent:#4b4ddb; --accent-soft:#ecebfe; --btn:#07071a; --btn-ink:#fff;
  --brand:linear-gradient(120deg,#6d6ffb,#9a73ff 38%,#b200bb);
  --ok:#2e6b4f; --ok-soft:#e5efe9; --warn:#9a5412; --warn-soft:#f6ece1; --danger:#a3321f; --danger-soft:#f7e7e3;
  --radius:16px; --radius-sm:12px;
  color-scheme:light;
}

* { box-sizing:border-box; }
html,body { margin:0; background:var(--bg); color:var(--ink); }
body {
  font:16px/1.5 "Vend Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  min-height:100dvh; display:flex; flex-direction:column;
}
a { color:var(--accent); text-underline-offset:3px; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:6px; }

/* Shell */
.top, main, .foot { width:100%; max-width:560px; margin:0 auto; padding-left:20px; padding-right:20px; }
.top { display:flex; align-items:center; justify-content:space-between; padding-top:calc(env(safe-area-inset-top) + 18px); padding-bottom:6px; }
.brand { color:var(--ink); text-decoration:none; font-weight:700; font-size:17px; letter-spacing:-.01em; }
#nav { display:flex; gap:18px; }
#nav a { color:var(--muted); text-decoration:none; font-size:15px; }
#nav a:hover { color:var(--ink); }
main { flex:1; padding-top:12px; padding-bottom:calc(env(safe-area-inset-bottom) + 32px); }
.foot { display:flex; justify-content:center; gap:20px; font-size:13px; padding-top:8px; padding-bottom:calc(env(safe-area-inset-bottom) + 20px); }
.foot a { color:var(--muted); text-decoration:none; }

/* Type */
h1 { font-size:30px; line-height:1.15; font-weight:700; letter-spacing:-.02em; margin:20px 0 20px; text-wrap:balance; }
h2 { font-size:15px; font-weight:600; color:var(--muted); margin:32px 0 10px; }
p { margin:10px 0; }
.muted { color:var(--muted); }
.small { font-size:14px; line-height:1.45; }

/* Surfaces */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px; margin-bottom:12px; }
.card > strong { display:block; font-weight:600; }

/* Balance: the one big moment on the start screen */
.balance-block { margin:28px 0 24px; }
h1 + .balance-block, [data-push]:empty + .balance-block { margin-top:4px; }
.balance { font-size:64px; line-height:1; font-weight:700; letter-spacing:-.03em; font-variant-numeric:tabular-nums; margin:6px 0 10px; }
/* Brand gradient as text: the balance and the sign-in headline */
.brand-text { width:fit-content; background:var(--brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.balance-block p { max-width:36ch; }

/* Forms */
label { display:block; font-size:14px; font-weight:600; margin:18px 0 6px; }
form > label:first-child, .card > label:first-child { margin-top:0; }
input,textarea,select {
  width:100%; padding:12px 14px; font:inherit; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:var(--radius-sm); transition:border-color .15s, box-shadow .15s;
}
input::placeholder,textarea::placeholder { color:var(--muted); opacity:.7; }
input:focus,textarea:focus,select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
textarea { min-height:140px; resize:vertical; line-height:1.5; }
.row { display:flex; gap:10px; }
.row > * { flex:1; }
.check { display:flex; gap:12px; align-items:flex-start; font-weight:400; font-size:14px; line-height:1.45; }
.check input { width:18px; height:18px; margin-top:1px; flex:none; accent-color:var(--accent); }

/* Buttons */
.btn {
  display:block; width:100%; text-align:center; padding:14px 16px; margin-top:16px; border:1px solid transparent;
  border-radius:var(--radius-sm); background:var(--btn); color:var(--btn-ink);
  font:inherit; font-weight:600; text-decoration:none; cursor:pointer; transition:transform .1s, opacity .15s;
}
.btn:active { transform:scale(.985); }
.btn.secondary { background:transparent; color:var(--ink); border-color:var(--line); }
.btn.ok { background:var(--ok); color:var(--surface); }
.btn:disabled { opacity:.45; cursor:default; transform:none; }

/* Messages */
.msg { padding:12px 14px; border-radius:var(--radius-sm); margin-top:14px; font-size:15px; }
.msg.error { background:var(--danger-soft); color:var(--danger); }
.msg.ok { background:var(--ok-soft); color:var(--ok); }
.msg.info { background:var(--accent-soft); color:var(--accent); }

/* Lists */
.list { padding-top:4px; padding-bottom:4px; }
.list a.item { display:block; color:inherit; text-decoration:none; }
.item { padding:14px 0; border-top:1px solid var(--line); }
.item:first-child { border-top:0; }
.item-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:2px; }
.item-head > :first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.badge { flex:none; display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:500; background:var(--tint); color:var(--muted); font-variant-numeric:tabular-nums; }
.badge.due { background:var(--warn-soft); color:var(--warn); }
.members { margin:8px 0 0 18px; padding:0; }
.members a { display:inline; }

/* Order */
.post-meta { margin-bottom:10px; }
.post-text { white-space:pre-wrap; max-height:240px; overflow:auto; font-size:15px; line-height:1.55; }

/* Phone pairing: QR code on the computer, camera on the phone */
.qr { width:220px; max-width:100%; margin:14px 0 4px; padding:10px; background:#fff; border:1px solid var(--line); border-radius:var(--radius-sm); }
.qr svg { display:block; width:100%; height:auto; }
.scan-video { display:block; width:100%; aspect-ratio:1; object-fit:cover; margin-top:12px; border-radius:var(--radius-sm); background:var(--ink); }
.steps { margin:0; padding-left:20px; }
.steps li { margin:6px 0; }

/* Legal pages */
main > p { max-width:65ch; }

@media (prefers-reduced-motion: reduce) { * { transition:none !important; } }
