:root {
  --brand: #ff4d8d;
  --violet: #8a4dff;
  --ink: #15121f;
  --ink-700: #3b3650;
  --ink-500: #6e6a7c;
  --ink-300: #a7a3b5;
  --line: #eceaf3;
  --soft: #f6f5fa;
  --bg: #ffffff;
  --ok: #16a34a;
  --danger: #e5484d;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the rules below set display on elements that scripts hide */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-700);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { background: linear-gradient(120deg, var(--brand), var(--violet)); color: #fff; }
.top .in { max-width: 860px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 12px; }
.top img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.top .name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: #fff; }
.top nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.top nav a { color: rgba(255,255,255,.9); }

.hero { max-width: 860px; margin: 0 auto; padding: 36px 20px 8px; }
.hero h1 { margin: 0; color: var(--ink); font-size: 32px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
.hero p.meta { margin: 8px 0 0; color: var(--ink-500); font-size: 14px; }

main { max-width: 860px; margin: 0 auto; padding: 8px 20px 56px; }
h2 { color: var(--ink); font-size: 20px; margin: 34px 0 8px; letter-spacing: -.01em; }
h3 { color: var(--ink); font-size: 16px; margin: 20px 0 6px; }
p, li { color: var(--ink-700); }
ul { padding-left: 20px; margin: 8px 0; }
li { margin: 4px 0; }
.card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }
.card strong { color: var(--ink); }
.toc { columns: 2; column-gap: 28px; padding: 16px 20px 16px 36px; font-size: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 56px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--violet)); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }

form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
form > div { display: grid; gap: 8px; min-width: 0; }
.field input { width: 100%; }
textarea { display: block; width: 100%; }
.card .field, .card textarea { background: #fff; }
label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.field { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; }
.field:focus-within { border: 1.5px solid var(--brand); }
.field span { font-weight: 600; color: var(--ink); }
.field input, textarea { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); min-width: 0; }
textarea { min-height: 96px; padding: 14px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; font-size: 15px; font-weight: 400; resize: vertical; }
textarea:focus { border: 1.5px solid var(--brand); }
button { height: 54px; border: 0; border-radius: 999px; color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  background: linear-gradient(120deg, var(--brand), var(--violet)); box-shadow: 0 8px 20px rgba(255,77,141,.25); }
button:disabled { opacity: .6; cursor: default; }
/* small text buttons under a form (send a new code, change number) and next to an address (copy) */
button.plain { height: auto; padding: 4px 0; border-radius: 0; background: none; box-shadow: none; color: var(--brand); font-size: 14px; font-weight: 600; }
button.plain:disabled { color: var(--ink-300); opacity: 1; }
form > .actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; }
button.copy { height: 28px; padding: 0 12px; font-size: 12px; box-shadow: none; vertical-align: middle; }
.field input[readonly] { color: var(--ink-500); }
.note { font-size: 13px; color: var(--ink-500); }
.msg { display: none; padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.msg.ok { display: block; background: #e9f9ef; color: var(--ok); }
.msg.err { display: block; background: #fdecec; color: var(--danger); }

footer { border-top: 1px solid var(--line); }
footer .in { max-width: 860px; margin: 0 auto; padding: 22px 20px 34px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-500); }
footer .in a { color: var(--ink-500); }

/* Landing */
.land { max-width: 860px; margin: 0 auto; padding: 56px 20px; text-align: center; }
.land img { width: 112px; height: 112px; border-radius: 30px; box-shadow: 0 14px 34px rgba(255,77,141,.35); }
.land h1 { color: var(--ink); font-size: 36px; margin: 22px 0 6px; letter-spacing: -.02em; }
.land p { color: var(--ink-500); font-size: 17px; margin: 0 auto; max-width: 520px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.links a { padding: 12px 18px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }

/* Inside the app (?app=1): no site chrome, a little tighter */
.in-app .top, .in-app footer { display: none; }
.in-app .hero { padding-top: 20px; }
.in-app .hero h1 { font-size: 26px; }

@media (max-width: 600px) {
  .top nav { display: none; }
  .hero h1 { font-size: 26px; }
  .toc { columns: 1; }
  body { font-size: 15.5px; }
}

/* Invite */
.invite { max-width: 560px; margin: 0 auto; padding: 44px 20px 24px; text-align: center; }
.invite img.logo { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 14px 34px rgba(255,77,141,.35); }
.invite h1 { color: var(--ink); font-size: 30px; margin: 20px 0 6px; letter-spacing: -.02em; line-height: 1.2; }
.invite p.lead { color: var(--ink-500); font-size: 16px; margin: 0 auto; }
.gift { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 14px; border-radius: 999px; background: #fff3f8; color: var(--brand); font-weight: 700; font-size: 14px; }
.codebox { margin: 22px 0 6px; padding: 16px; border-radius: 18px; border: 1.5px dashed var(--brand); background: var(--soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.codebox .label { font-size: 12px; color: var(--ink-500); text-align: left; }
.codebox .code { font-size: 28px; font-weight: 800; letter-spacing: .12em; color: var(--ink); }
.codebox button { height: 42px; padding: 0 18px; font-size: 14px; box-shadow: none; }
.invite .cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-top: 16px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(120deg, var(--brand), var(--violet)); box-shadow: 0 8px 20px rgba(255,77,141,.25); }
.invite .steps { text-align: left; margin-top: 26px; }
