:root {
  --bg:#ffffff;
  --bg-soft:#faf6f1;
  --ink:#1b1713;
  --ink-2:#443e37;
  --ink-3:#7c746a;
  --hair:#ece4d9;
  --accent:#e2570f;
  --accent-2:#c24808;
  --green:#1fb254;
  --radius:18px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body { min-height:100%; }
body {
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a { color:inherit; }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }

/* Access page */
.page { min-height:100vh; background:var(--bg); }
.topbar {
  max-width:1120px; margin:0 auto; padding:22px 28px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand { font-size:15px; font-weight:700; letter-spacing:-.02em; }
.built { font-size:12px; color:var(--ink-3); display:flex; align-items:center; gap:7px; }
.built img { height:12px; filter:invert(1); opacity:.65; }
.wrap { max-width:1120px; margin:0 auto; padding:8px 28px 64px; }

.hero {
  display:grid; grid-template-columns:1.05fr .95fr; gap:48px; align-items:center;
  padding:56px 0 40px;
}
.hero-copy { display:flex; flex-direction:column; }
.eyebrow {
  display:inline-flex; align-items:center; gap:9px;
  font-size:11px; font-weight:600; letter-spacing:.22em; text-transform:uppercase;
  color:var(--ink-3); margin-bottom:18px;
}
.live-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 0 0 rgba(31,178,84,.45); animation:pulse 2.4s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow:0 0 0 0 rgba(31,178,84,.45); }
  70% { box-shadow:0 0 0 9px rgba(31,178,84,0); }
  100% { box-shadow:0 0 0 0 rgba(31,178,84,0); }
}
.hero h1 { font-size:clamp(38px, 5.4vw, 60px); font-weight:700; letter-spacing:-.045em; line-height:1.04; text-wrap:balance; }
.hero h1 .accent { color:var(--accent); }
.hero .sub { color:var(--ink-2); font-size:17px; line-height:1.6; margin:20px 0 0; max-width:470px; text-wrap:pretty; }
.chips { display:flex; flex-wrap:wrap; gap:9px; margin-top:26px; }
.chip { font-size:12.5px; font-weight:600; color:var(--ink-2); background:var(--bg-soft); border:1px solid var(--hair); border-radius:999px; padding:8px 13px; }

.hero-visual { display:flex; justify-content:center; align-items:flex-start; }
.hero-phone {
  width:262px; border-radius:46px; padding:11px;
  background:linear-gradient(160deg, #5a5a61 0%, #1c1c20 42%, #26262b 100%);
  box-shadow:0 44px 80px -34px rgba(27,23,19,.5), inset 0 1px 0 rgba(255,255,255,.22);
}
.hp-screen { border-radius:36px; background:#fff; overflow:hidden; display:flex; flex-direction:column; padding:18px 12px 16px; height:486px; }
.hp-status { display:flex; justify-content:space-between; font-size:12px; font-weight:700; color:#111; padding:0 8px 6px; }
.hp-status span:last-child { color:#c7c7cc; letter-spacing:2px; }
.hp-who { display:flex; flex-direction:column; align-items:center; margin:10px 0 4px; }
.hp-avatar { width:46px; height:46px; border-radius:50%; background:#e9d9c4; box-shadow:0 1px 2px rgba(0,0,0,.14); }
.hp-name { margin-top:-8px; background:#fff; border-radius:12px; padding:2px 9px 2px 11px; font-size:12px; font-weight:700; color:#111; box-shadow:0 1px 3px rgba(0,0,0,.14); }
.hp-name span { color:#c7c7cc; font-size:15px; line-height:1; }
.hp-thread { display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.hp-thread .row { max-width:88%; }
.hp-thread .bubble { font-size:12.5px; line-height:16px; padding:7px 11px; border-radius:15px; }

.section-head { margin:40px 0 22px; display:flex; flex-direction:column; gap:6px; }
.section-head h2 { font-size:26px; font-weight:700; letter-spacing:-.03em; }
.section-head p { color:var(--ink-3); font-size:14px; }

.cards { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:20px; }
.card {
  background:var(--bg); border:1px solid var(--hair); border-radius:var(--radius);
  padding:28px 28px 26px; display:flex; flex-direction:column;
  box-shadow:0 1px 2px rgba(27,23,19,.04), 0 16px 40px -26px rgba(27,23,19,.22);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform:translateY(-4px); box-shadow:0 2px 4px rgba(27,23,19,.05), 0 30px 60px -30px rgba(27,23,19,.32); border-color:#e2d7c9; }
.tag { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); margin-bottom:14px; }
.card h2 { font-size:22px; font-weight:700; letter-spacing:-.025em; line-height:1.15; margin-bottom:10px; }
.card p:not(.tag) { color:var(--ink-2); font-size:14.5px; line-height:1.6; margin-bottom:24px; flex:1; text-wrap:pretty; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; align-self:flex-start;
  min-height:42px; padding:0 19px; border-radius:999px; background:var(--ink); color:#fff;
  font-weight:600; font-size:14px; letter-spacing:-.005em; text-decoration:none; gap:9px;
  transition:background .2s, transform .2s;
}
.btn .arrow { width:14px; height:14px; position:relative; flex:none; transition:transform .25s cubic-bezier(.2,.7,.2,1); }
.btn .arrow::before { content:""; position:absolute; left:0; top:50%; width:12px; height:1.5px; background:currentColor; transform:translateY(-50%); }
.btn .arrow::after { content:""; position:absolute; right:1px; top:50%; width:7px; height:7px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:translateY(-50%) rotate(45deg); }
.btn:hover { background:var(--accent); }
.btn:hover .arrow { transform:translateX(4px); }
.btn:active { transform:scale(.98); }

.reveal { opacity:0; transform:translateY(14px); animation:rise .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay:calc(var(--i, 0) * 90ms + 80ms); }
@keyframes rise { to { opacity:1; transform:translateY(0) scale(1); } }
.card.reveal:hover { animation:none; opacity:1; }
.footer { margin-top:56px; display:flex; align-items:center; gap:8px; color:var(--ink-3); font-size:12px; }
.footer img { height:13px; filter:invert(1); opacity:.7; }

@media (max-width:900px) {
  .hero { grid-template-columns:1fr; gap:36px; padding:36px 0 24px; }
  .hero-visual { order:2; }
}
@media (max-width:640px) {
  .wrap { padding:8px 18px 48px; }
  .cards { grid-template-columns:1fr; gap:16px; }
  .card { padding:24px 22px 22px; }
  .btn { align-self:stretch; }
  .hero-phone { transform:scale(.9); transform-origin:top center; }
}
@media (prefers-reduced-motion:reduce) {
  .card, .btn, .btn .arrow { transition:none; }
  .card:hover { transform:none; }
  .reveal { animation:none; opacity:1; transform:none; }
  .live-dot { animation:none; }
}

/* Phone stage (chat + reputation) */
.stage {
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:28px 16px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 42%, #ffffff 0%, #f7f7f8 55%, #f1f1f3 100%);
}
.away {
  font-size:13px;
  color:var(--ink-3);
  text-decoration:none;
  letter-spacing:.01em;
}
.away:hover { color:var(--ink); }

.device {
  animation:phone-in .8s cubic-bezier(.2,.7,.2,1) both;
  position:relative;
  height:min(812px, calc(100dvh - 64px));
  aspect-ratio:393 / 812;
  width:auto;
  max-width:min(393px, calc(100vw - 24px));
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;
  color:#111;
  filter:drop-shadow(0 30px 50px rgba(11,11,12,.22)) drop-shadow(0 2px 6px rgba(11,11,12,.10));
}
.hw {
  position:absolute;
  background:#1a1a1c;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.hw.silent { left:-3px; top:118px; width:3px; height:22px; border-radius:2px 0 0 2px; }
.hw.vol-up { left:-3px; top:168px; width:3px; height:52px; border-radius:2px 0 0 2px; }
.hw.vol-dn { left:-3px; top:228px; width:3px; height:52px; border-radius:2px 0 0 2px; }
.hw.power { right:-3px; top:196px; width:3px; height:92px; border-radius:0 2px 2px 0; }
.bezel {
  position:absolute;
  inset:0;
  padding:11px;
  border-radius:58px;
  background:linear-gradient(160deg, #6a6a70 0%, #2c2c30 18%, #111113 46%, #2a2a2e 100%);
  box-shadow:
    inset 0 1.2px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(0,0,0,.7),
    0 0 0 1px #0b0b0c;
}
.screen {
  height:100%;
  border-radius:47px;
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
  position:relative;
  color-scheme:light;
}
.island {
  position:absolute;
  top:11px;
  left:50%;
  transform:translateX(-50%);
  width:120px;
  height:35px;
  background:#000;
  border-radius:19px;
  z-index:8;
}
.status {
  position:relative;
  z-index:7;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  padding:14px 26px 0;
  height:52px;
  font-size:15px;
  font-weight:600;
  letter-spacing:.02em;
}
.sig { display:flex; align-items:center; gap:6px; color:#111; }
.nav {
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:start;
  padding:6px 14px 8px;
  background:linear-gradient(#fff 60%, rgba(255,255,255,.86));
}
.fab {
  width:36px;
  height:36px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.06);
  display:grid;
  place-items:center;
  color:#111;
  text-decoration:none;
  margin-top:18px;
}
.fab.ghost { pointer-events:none; }
.who { display:flex; flex-direction:column; align-items:center; margin-top:2px; }
.photo {
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  background:#d8d8dc;
  box-shadow:0 1px 2px rgba(0,0,0,.16);
}
.name-pill {
  margin-top:-8px;
  background:#fff;
  border-radius:14px;
  padding:3px 9px 3px 11px;
  font-size:13px;
  font-weight:600;
  box-shadow:0 1px 3px rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  gap:2px;
}
.caret { color:#c7c7cc; font-size:16px; line-height:1; }
.thread {
  flex:1;
  overflow:auto;
  padding:6px 10px 10px;
  display:flex;
  flex-direction:column;
  gap:3px;
  background:#fff;
}
.im-day { align-self:center; margin:10px 0 8px; font-size:12px; font-weight:600; color:#8e8e93; }
.row { display:flex; flex-direction:column; max-width:78%; animation:pop .18s ease-out; }
@keyframes pop { from { transform:scale(.94); opacity:0; } to { transform:scale(1); opacity:1; } }
.row.them { align-self:flex-start; align-items:flex-start; }
.row.me { align-self:flex-end; align-items:flex-end; }
.bubble {
  position:relative;
  padding:8px 13px;
  border-radius:18px;
  font-size:17px;
  line-height:22px;
  letter-spacing:-.02em;
  white-space:pre-wrap;
  word-wrap:break-word;
}
.row.them .bubble { background:#e9e9eb; color:#111; }
.row.me .bubble { background:#64d256; color:#111; }
.row.them.tail .bubble { border-bottom-left-radius:5px; }
.row.me.tail .bubble { border-bottom-right-radius:5px; }
.row.them.tail .bubble::before, .row.them.tail .bubble::after,
.row.me.tail .bubble::before, .row.me.tail .bubble::after { content:""; position:absolute; bottom:0; }
.row.them.tail .bubble::before { left:-7px; width:20px; height:20px; background:#e9e9eb; border-bottom-right-radius:16px; }
.row.them.tail .bubble::after { left:-10px; width:10px; height:20px; background:#fff; border-bottom-right-radius:10px; }
.row.me.tail .bubble::before { right:-7px; width:20px; height:20px; background:#64d256; border-bottom-left-radius:16px; }
.row.me.tail .bubble::after { right:-10px; width:10px; height:20px; background:#fff; border-bottom-left-radius:10px; }
.bubble a { color:#007aff; text-decoration:underline; word-break:break-all; }
.preview {
  margin-top:3px;
  width:min(230px, 70vw);
  background:#f2f2f7;
  border-radius:14px;
  padding:10px 12px;
  text-decoration:none;
  color:#111;
  display:block;
}
.preview strong { display:block; font-size:14px; }
.preview span { display:block; font-size:12px; color:#8e8e93; margin-top:2px; }
.meta, .receipt { font-size:11px; color:#8e8e93; padding:3px 6px 1px; background:none; border:0; }
.fb { display:flex; gap:6px; padding:4px 6px 2px; align-self:flex-start; }
.fb-btn {
  width:26px; height:26px; border:0; border-radius:50%; background:#fff; color:#8e8e93;
  box-shadow:0 0 0 .5px #d8d8dc inset; display:grid; place-items:center; cursor:pointer;
  transition:color .15s, background .15s, box-shadow .15s;
}
.fb-btn svg { width:13px; height:13px; }
.fb-btn:hover { color:#111; }
.fb-btn.up.active { color:#fff; background:#34c759; box-shadow:none; }
.fb-btn.down.active { color:#fff; background:#ff3b30; box-shadow:none; }
.fb[data-rated] .fb-btn { pointer-events:none; }
.fb[data-rated] .fb-btn:not(.active) { opacity:.35; }
.toast {
  position:absolute; top:64px; left:50%; transform:translate(-50%, -8px);
  background:rgba(20,20,22,.92); color:#fff; font-size:13px; font-weight:600;
  padding:9px 14px; border-radius:18px; opacity:0; pointer-events:none;
  transition:opacity .2s, transform .2s; z-index:20; white-space:nowrap;
}
.toast.show { opacity:1; transform:translate(-50%, 0); }
.fb-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:60; padding:20px; }
.fb-dialog { background:#fff; border-radius:18px; padding:20px; width:100%; max-width:360px; box-shadow:0 20px 50px rgba(0,0,0,.25); display:flex; flex-direction:column; gap:14px; }
.fb-dialog h3 { margin:0; font-size:17px; font-weight:700; color:#111; letter-spacing:-.01em; }
.fb-sub { margin:0; font-size:13px; color:#6e6e73; }
.fb-chips { display:flex; flex-wrap:wrap; gap:8px; }
.fb-chip { border:1px solid #d8d8dc; background:#fff; color:#111; border-radius:999px; padding:7px 13px; font-size:13px; font-weight:500; cursor:pointer; font-family:inherit; }
.fb-chip.selected { background:#111; color:#fff; border-color:#111; }
.fb-note { width:100%; border:1px solid #d8d8dc; border-radius:12px; padding:10px 12px; font:inherit; font-size:14px; resize:none; color:#111; box-sizing:border-box; }
.fb-note:focus { outline:none; border-color:#111; }
.fb-actions { display:flex; gap:10px; justify-content:flex-end; }
.fb-btn2 { border-radius:10px; padding:10px 16px; font-size:14px; font-weight:600; cursor:pointer; border:0; font-family:inherit; }
.fb-btn2.secondary { background:#f2f2f7; color:#111; }
.fb-btn2.primary { background:#007aff; color:#fff; }
.row.failed .meta { color:#ff3b30; cursor:pointer; font-weight:600; }
.typing { display:flex; gap:5px; padding:12px 16px; width:58px; }
.typing i { width:7px; height:7px; border-radius:50%; background:#8e8e93; animation:dot 1.05s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay:.14s; }
.typing i:nth-child(3) { animation-delay:.28s; }
@keyframes dot { 0%, 80%, 100% { opacity:.28; transform:translateY(0); } 40% { opacity:1; transform:translateY(-2px); } }
.bar { display:flex; align-items:center; gap:8px; padding:8px 10px 22px; background:linear-gradient(#f7f7f8, #f2f2f7); }
.plus {
  width:33px; height:33px; border-radius:50%; background:#fff;
  box-shadow:0 0 0 .5px #d8d8dc inset;
  display:grid; place-items:center;
  color:#8e8e93; font-size:22px; line-height:1; font-weight:400;
}
.bar input {
  flex:1; height:36px; border:0; background:#fff;
  box-shadow:0 0 0 .5px #d8d8dc inset; border-radius:18px;
  padding:0 14px; font:inherit; font-size:17px; outline:none;
}
.mic, .go { width:33px; height:33px; border:0; border-radius:50%; display:grid; place-items:center; flex-shrink:0; }
.mic { background:#fff; color:#8e8e93; box-shadow:0 0 0 .5px #d8d8dc inset; pointer-events:none; }
.go { background:#007aff; cursor:pointer; }
.go:disabled { opacity:.4; cursor:default; }
.setup { padding:18px 16px 0; display:flex; flex-direction:column; gap:0; }
.setup .ios-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 0 0 .5px #d8d8dc inset; margin-bottom:18px; }
.setup label { display:flex; flex-direction:column; gap:3px; padding:10px 14px 11px; border-bottom:.5px solid #e5e5ea; color:#111; position:relative; }
.setup label:last-child { border-bottom:0; }
.setup label span { color:#8e8e93; font-size:12px; font-weight:500; letter-spacing:.01em; text-transform:uppercase; }
.setup input, .setup select { width:100%; min-width:0; border:0; background:transparent; font:inherit; font-size:17px; line-height:24px; color:#111; outline:none; padding:0; }
.setup input::placeholder { color:#c7c7cc; }
.setup select { -webkit-appearance:none; appearance:none; padding-right:26px; cursor:pointer; }
.setup select:required:invalid { color:#c7c7cc; }
.setup select option { color:#111; }
.setup select option[value=""] { color:#8e8e93; }
.setup label:has(select)::after { content:""; position:absolute; right:16px; bottom:19px; width:8px; height:8px; border-right:1.5px solid #8e8e93; border-bottom:1.5px solid #8e8e93; transform:rotate(45deg); pointer-events:none; }
.ios-start { height:50px; border:0; border-radius:14px; background:#007aff; color:#fff; font:inherit; font-size:17px; font-weight:600; cursor:pointer; }
.muted { color:#8e8e93; font-size:15px; line-height:1.45; margin:8px 2px 16px; }
.err { color:#ff3b30; font-size:13px; }
.home { position:absolute; left:50%; bottom:7px; transform:translateX(-50%); width:128px; height:5px; border-radius:4px; background:#111; opacity:.9; }
#chat-wrap { flex:1; min-height:0; display:flex; flex-direction:column; }
#setup-wrap { flex:1; min-height:0; overflow:auto; }
#chat-wrap[hidden], #setup-wrap[hidden] { display:none !important; }
@keyframes phone-in { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .device { animation:none; } }
@media (max-width:480px) {
  .stage { padding:0; gap:0; background:#000; }
  .away { display:none; }
  .device { width:100%; height:100dvh; max-width:none; max-height:none; filter:none; }
  .hw { display:none; }
  .bezel { padding:0; border-radius:0; background:#000; box-shadow:none; }
  .screen { border-radius:0; }
}
